Commit Graph

403 Commits

Author SHA1 Message Date
Joseph Hall
829f7008f1 Fill in a couple more spots 2017-03-02 05:27:20 -07:00
Joseph Hall
7ebf1cf104 Fix paths from SPM files PR 2017-03-02 05:17:42 -07:00
rallytime
609e6e4b23 Merge branch '2016.11' into 'develop'
Conflicts:
  - salt/config/__init__.py
  - salt/modules/win_lgpo.py
  - salt/utils/aws.py
  - tests/unit/utils/schema_test.py
2017-02-09 10:29:40 -07:00
Morgan Willcock
d7e05091a2 Remove global options from Install 2017-02-04 19:00:36 +00:00
markuskramerIgitt
5375bf5cb4 Option to compile the Salt-Minion installer offline 2017-01-27 22:55:41 +01:00
markuskramerIgitt
b4aa2ffaab Option to compile the Salt-Minion installer offline 2017-01-27 22:52:21 +01:00
Mike Place
4956d7d5a3
Merge branch '2016.3' into 2016_3_develop 2016-09-26 21:47:32 +09:00
rallytime
d5bbd91c14 Merge branch '2016.3' into 'carbon'
Conflicts:
  - conf/master
2016-09-23 17:01:17 -06:00
rallytime
52cf40db8c Merge branch '2015.8' into '2016.3'
No conflicts.
2016-09-23 08:32:47 -06:00
rallytime
7bcbf8dc36 Merge branch '2016.3' into 'carbon'
Conflicts:
  - doc/faq.rst
  - salt/modules/win_service.py
2016-09-20 10:43:55 -06:00
twangboy
fc4a03a75d Check for existing library on Windows 2016-09-20 09:31:13 -06:00
rallytime
c64e489f6f Merge branch '2015.8' into '2016.3'
No conflicts.
2016-09-19 11:22:54 -06:00
twangboy
a817aef1c2 Add windows requirements file 2016-09-16 15:43:36 -06:00
rallytime
95dbe1ade4 Merge branch '2016.3' into 'carbon'
Conflicts:
  - salt/fileserver/__init__.py
  - setup.py
  - tests/integration/modules/git.py
2016-09-14 09:15:29 -06:00
rallytime
f603757b55 Merge branch '2015.8' into '2016.3'
Conflicts:
  - tests/unit/modules/mount_test.py
  - tests/unit/states/file_test.py
2016-09-13 08:21:48 -06:00
twangboy
dc1988add5 fix download when requests not present 2016-09-07 09:59:51 -06:00
twangboy
b4479bff5f Add additional required dll's 2016-09-06 17:36:38 -06:00
Jacob Hammons
a028796eff copy spm.1 man page during setup
Refs #25213
2016-07-20 12:21:08 -06:00
Sergey Kizunov
49f89250d3 PY3 support for Windows master/minion using TCP transport
This allows masters and minions to run on Windows using Python 3. Tested
with Python 3.5.1 64-bit on Windows 7. Only the TCP transport has been
ported. It will likely not work with other transports such as ZeroMQ or
RAET without further work.

Since there were many changes necessary to make this work, here is a list
of common changes:
- Python 3 distinguishes `bytes` from `str`. In some cases `bytes` must be
used (eg read/write to binary file). In other cases `str` must be used
(eg general Salt dictionary look-ups, read/write to text file). Due to
this, there are a lot of extra uses of `salt.utils.to_bytes` in necessary
locations.
- Use `six.itervalues(varname)` instead of `varname.itervalues()`.
- In Python 2.6 and 2.7, the 'b' prefix is ignored. So instead of

```
if six.PY2:
    some_var = 'some_value'
else:
    some_var = b'some_value'
```

we choose to simply use:

```
some_var = b'some_value'

```

`salt/engine/__init__.py`:
- In Python 3, `engine.items()` will return an iterator instead of
a list. Due to this, needed to change `engine.items()[0]` to
`list(engine.items())[0]`.

`salt/minion.py`:
- `contextlib.nested` no longer supported in Python 3. Use
`contextlib.ExitStack` in this case.
- In `Minion.handle_event`, in PY3, `package` is of type `bytes` and `tag`
is of type `str`. Due to this, do all string searches via `tag` instead
of `package` since you can't search for a `str` in a `bytes` object.

`salt/payload.py`:
- Added `encoding` parameter to `Serial.loads`. See description in comments
for details.
- Added `use_bin_type` parameter to `Serial.dumps`. See description in
comments for details.
- When reading / writing local files, encode using `use_bin_type=True` and
decode using `encoding='utf-8'` to distinguish `bytes` and `str` types.

`salt/transport/frame.py`:
- Added `frame_msg_ipc`. This is used for IPC communications where it is
safe to break the wire protocol and so we encode using `use_bin_type=True`.
- Added `decode_embedded_strs`. This is used when it is not safe to break
the wire protocol (eg external communications). This will convert `bytes`
objects to `str` objects if possible. This will search for such objects
within dicts and lists.

`salt/transport/ipc.py`:
- Use `salt.transport.frame.frame_msg_ipc` to encode using
`use_bin_type=True`.
- Use `encoding='utf-8'` to decode such messages and ensure proper
distinction of `bytes` and `str` types.

`salt/transport/tpc.py`:
- Since we need to preserve the wire protocol, we don't use
`use_bin_type=True`. When decoding, we use `decode_embedded_strs` to
convert the embedded `bytes` objects that can be converted to `str`.
- `urlparse` doesn't exist in PY3. Use `urllib.parse` instead.
- `sys.maxint` not supported in PY3. Use `int((1 << 31) - 1)` instead.
Hence `sys.maxint - 1` becomes `int((1 << 31) - 2)`.

`salt/utils/__init__.py`:
- `libc = ctypes.cdll.LoadLibrary(ctypes.util.find_library("c"))` returns
`TypeError` in PY3. This is because `ctypes.util.find_library("c")`
returns `None` and in PY3 `ctypes.cdll.LoadLibrary(None)` is a
`TypeError`.
- On Windows, `salt.utils.fopen` would always read and write files in
binary mode. This has been changed for Python 3 since `bytes` must be
used for binary mode and `str` must be used for text mode and forcing
binary mode would screw things up if you want to read/write to `str`
objects. Preserved original behavior on PY2.
- For `salt.utils.fopen`, when reading and writing text files in PY3, if
an encoding is not specified, it will choose 'utf-8'.

`salt/utils/args.py`:
- In Python 3.5, every time `inspect.getargsspec` is used, a warning would
appear announcing its deprecation (it will be removed entirely in Python
3.6). Due to this, implemented our own version using
`inspect.getfullargspec`.

`salt/utils/event.py`:
- Since all functionality here is used only in IPC (the mechanism for
firing an event from minion to master is outside this file), we can break
the wire protocol and hence encode using `use_bin_type=True` and decode
using `encoding='utf-8'`.

`salt/utils/vt.py`:
- `_subprocess` is not available in PY3 under Windows, so we use an
alternate method to invoke `TerminateProcess` and `GetExitCodeProcess`.

`setup.py`:
- In PY3, `req.read(4096)` returns a `bytes` object. If you try to for
loop through it, each element is an `int` which represents an individual
byte. Trying to write an `int` to `wfh.write` raises an exception. Due to
this, use an alternate approach when writing from a
`http.client.HTTPResponse` object to file in PY3.

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2016-04-04 13:35:50 -05:00
rallytime
73d73e80c1 Merge branch '2016.3' into 'develop'
Conflicts:
  - doc/topics/releases/2015.8.4.rst
  - doc/topics/releases/2015.8.5.rst
  - doc/topics/thorium/index.rst
  - salt/cloud/clouds/opennebula.py
  - salt/engines/thorium.py
  - salt/loader.py
  - salt/modules/archive.py
  - salt/modules/boto_vpc.py
  - salt/modules/data.py
  - salt/modules/reg.py
  - salt/pillar/mysql.py
  - salt/runners/cache.py
  - salt/states/archive.py
  - salt/states/cron.py
  - salt/states/file.py
  - salt/states/glance.py
  - salt/states/reg.py
  - salt/thorium/__init__.py
  - salt/thorium/check.py
  - salt/thorium/file.py
  - salt/thorium/reg.py
  - salt/utils/jid.py
  - salt/utils/parsers.py
  - setup.py
2016-02-12 14:38:50 -07:00
Colton Myers
076b49a4ca Merge remote-tracking branch 'upstream/2015.8' into merge-forward-2016.3
Conflicts:
    README.rst
    doc/conf.py
    doc/ref/index.rst
    doc/ref/proxy/all/salt.proxy.ssh_sample.rst
    doc/topics/installation/rhel.rst
    doc/topics/releases/2015.8.4.rst
    doc/topics/tutorials/states_pt5.rst
    salt/cloud/clouds/ec2.py
    salt/cloud/clouds/opennebula.py
    salt/config/__init__.py
    salt/modules/boto_dynamodb.py
    salt/modules/boto_ec2.py
    salt/modules/boto_elasticache.py
    salt/modules/boto_elb.py
    salt/modules/boto_iam.py
    salt/modules/boto_rds.py
    salt/modules/boto_sns.py
    salt/modules/boto_sqs.py
    salt/modules/dracr.py
    salt/modules/git.py
    salt/modules/mine.py
    salt/modules/systemd.py
    salt/modules/win_pkg.py
    salt/modules/yumpkg.py
    salt/pillar/__init__.py
    salt/states/git.py
    salt/states/rabbitmq_vhost.py
    salt/states/saltmod.py
    salt/utils/pkg/rpm.py
    setup.py
    tests/unit/modules/systemd_test.py
    tests/unit/states/rabbitmq_vhost_test.py
2016-02-11 22:33:49 -07:00
rallytime
742d0a6b04 Change all relevant Boron references to 2016.3.0
And more Boron deprecation warnings to Carbon
2016-02-10 15:45:28 -07:00
Justin Findlay
ae10c71b6b setup.py: remove Boron deprecated code 2016-02-10 11:33:41 -07:00
Justin Findlay
7bfb28c5db Revert "setup.py: remove Boron deprecated code" 2016-02-10 11:27:08 -07:00
twangboy
7decec2cae Backport uname fix from #30951 2016-02-08 13:20:27 -07:00
Mike Place
dd57535a87 Merge pull request #30951 from skizunov/develop2
Added Windows master related scripts
2016-02-08 11:59:34 -07:00
Tom X. Tobin
ca3bbced33 Fix missing salt.1 man page in setup.py
setup.py wasn't installing the salt.1 man page; downstream packages
using setup.py to build ended up with salt.1 missing.
2016-02-05 16:23:30 -05:00
Sergey Kizunov
b10ef84279 setup.py won't run on Windows
Fixed an issue where setup.py will not run at all in Windows due to
the script attempting to invoke `os.uname()` which isn't supported on
Windows.

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2016-02-05 15:08:17 -06:00
Sergey Kizunov
afca3d6733 Added Windows master related scripts
Added the following scripts to Windows installations:
- salt
- salt-key
- salt-master
- salt-run

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
2016-02-05 15:08:01 -06:00
Benjamin Drung
089c869ec3 Make build reproducible
The build is not reproducible because it embeds the build time. Embed
the date of the last modification to the source code instead (in case it
is provided via the SOURCE_DATE_EPOCH environment variable).

See the SOURCE_DATE_EPOCH specification for details:
https://reproducible-builds.org/specs/source-date-epoch/
2016-02-05 10:36:19 +01:00
Justin Findlay
b03f95bf0f setup.py: remove Boron deprecated code 2016-02-04 14:44:16 -07:00
Benjamin Drung
20e79981e1 Fix typo preferrably -> preferably 2016-02-04 12:51:38 +01:00
Thomas S Hatch
b563e227ca Add thorium roots to setup.py 2016-02-03 18:34:16 -07:00
Thomas S Hatch
f126f2011a Add thorium roots to setup.py 2016-02-02 10:49:23 -07:00
Hamza Sheikh
bb599a61a2 Fix indent in setup.py 2016-01-25 15:37:06 -08:00
Jorge Schrauwen
701b240224 fix indent 2016-01-23 14:04:13 +00:00
Jorge Schrauwen
8417f8da08 drop augeas as libaugeas is a pain to patch 2016-01-23 14:02:59 +00:00
Jorge Schrauwen
83b6935ab0 including said modules, would probably be a good idea too 2016-01-23 13:32:18 +00:00
Pedro Algarvio
cc3219fcde Don't install futures under Python 3 and above 2015-10-18 09:44:54 +01:00
Colton Myers
35425b14ad Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    doc/man/salt-api.1
    doc/man/salt-call.1
    doc/man/salt-cloud.1
    doc/man/salt-cp.1
    doc/man/salt-key.1
    doc/man/salt-master.1
    doc/man/salt-minion.1
    doc/man/salt-run.1
    doc/man/salt-ssh.1
    doc/man/salt-syndic.1
    doc/man/salt-unity.1
    doc/man/salt.1
    doc/man/salt.7
    salt/modules/pip.py
    salt/states/user.py
2015-10-07 12:06:12 -06:00
Dennis Harper
3e08d3de8a fix for: https://github.com/saltstack/salt/issues/27373
Setup::DownloadWindowsDlls is downloading and writing the file as
a text not a binary file.

When creating the file handle to write the binary after being download from salt's
dependency repo, the file handle was being created with just the 'write' attribute,
however it also needs the 'binary' attribute.

Change-Id: I2f67d27ee847cd7808a78cd5ec0b2151d6a0c0e7
2015-10-05 11:51:29 -06:00
Dennis Harper
cc391b6862 fix for: https://github.com/saltstack/salt/issues/27373
Setup::DownloadWindowsDlls is downloading and writing the file as
a text not a binary file.

When creating the file handle to write the binary after being download from salt's
dependency repo, the file handle was being created with just the 'write' attribute,
however it also needs the 'binary' attribute.

Change-Id: I2f67d27ee847cd7808a78cd5ec0b2151d6a0c0e7
2015-09-28 15:45:30 -05:00
Pedro Algarvio
10a9189d83 Merge remote-tracking branch 'upstream/2015.8' into hotfix/merge-forward-develop 2015-09-06 12:42:58 +01:00
C. R. Oldham
acc73fc546 Add salt-proxy to setup.py so it gets installed. 2015-09-04 12:05:14 -06:00
Colton Myers
307d3d05a4 Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    doc/man/salt.7
    salt/modules/yumpkg.py
2015-09-03 14:24:45 -06:00
Jacob Hammons
701f47a658 Added rst source for salt-proxy man page, added build and copy lines for this man page to doc/conf.py and setup.py
Added salt-proxy release notes topic
Added note to pip state for Refs #21845
Regenerated and versioned man pages
2015-09-01 17:09:35 -06:00
Pedro Algarvio
58df84e0d1 Revert "setup.py: remove raw string formatting"
This reverts commit b6c732219c.

We actually need the `repr()` version of the object.

Fixes #26774
2015-08-31 12:13:37 +01:00
Pedro Algarvio
2188867b3d Revert "We need the repr() for the version tuple."
This reverts commit 03af591129.
2015-08-31 12:10:53 +01:00
Colton Myers
1bbe45538e Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/cloud/__init__.py
    salt/modules/smartos_vmadm.py
    salt/utils/s3.py
    setup.py
2015-08-28 16:44:08 -06:00
Pedro Algarvio
03af591129 We need the repr() for the version tuple. 2015-08-28 17:42:08 +01:00
Pedro Algarvio
3f30d2a135 Use the correct names 2015-08-28 01:25:48 +01:00
Pedro Algarvio
f041653746 Handle SPM paths in the setup script 2015-08-28 01:22:14 +01:00
Erik Johnson
b6c732219c setup.py: remove raw string formatting 2015-08-26 23:26:07 -05:00
Pedro Algarvio
60c5d16330 One more missed typo 2015-08-19 19:43:37 +01:00
Colton Myers
73282d51cc Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/cli/daemons.py
    salt/master.py
    salt/minion.py
    salt/modules/gpg.py
    salt/modules/pw_group.py
    salt/utils/http.py
    setup.py
    tests/unit/modules/schedule_test.py
2015-08-19 11:29:45 -06:00
Colton Myers
e57f767244 Merge pull request #26439 from basepi/merge-forward-2015.8
[2015.8] Merge forward from 2015.5 to 2015.8
2015-08-19 10:39:04 -06:00
Pedro Algarvio
dc58dbe5bf The CLI options are not meant to include underscores.
Fixes #26444
2015-08-18 23:18:09 +01:00
Colton Myers
8ec612e9db Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    setup.py
2015-08-18 12:15:03 -06:00
Pedro Algarvio
06dcaefcaa Fix missed typo 2015-08-18 17:18:59 +01:00
Colton Myers
d3d0e004d9 Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    salt/minion.py
    salt/modules/gpg.py
    salt/modules/keystone.py
    salt/modules/pw_user.py
    salt/states/reg.py
    setup.py
2015-08-17 16:54:16 -06:00
Pedro Algarvio
92af1c9572 Fix argument name 2015-08-17 19:48:48 +01:00
Pedro Algarvio
72d2fdb512 Add pypiwin32 >= 219 as a windows install requires.
Refs #26305
2015-08-17 19:48:48 +01:00
Pedro Algarvio
b1105fc706 Allow mimicking the install setup command for develop/editable installations.
To generate Salt's _syspaths.py file, pass `--generate-salt-syspaths` to
the develop command or set the `GENERATE_SALT_SYSPATHS` environment
variable.

Passing `--mimic-salt-install` to the develop command or setting the
`MIMIC_SALT_INSTALL` environment variable will generate `_version.py` and `_syspaths.py`

Fixes #11046
Fixes #25094
2015-08-17 19:48:46 +01:00
Pedro Algarvio
26246a72ee Allow writing Salt's _version.py when installing in develop mode.
Pass `--write-salt-version` or set the `WRITE_SALT_VERSION` environment
variable to trigger the generation of `_version.py`.

Closes #25094
2015-08-17 19:48:00 +01:00
Pedro Algarvio
71928f2194 Prefer HTTPS, fix url argument 2015-08-17 19:48:00 +01:00
Pedro Algarvio
7b25430cc7 Download the necessary DLLs for windows 2015-08-17 19:48:00 +01:00
Pedro Algarvio
86692a92cd Install PyCrypto from a wheel in repo.saltstack.com under Windows 2015-08-17 19:48:00 +01:00
Pedro Algarvio
915da594c2 Skip M2Crypto in Windows.
Wwe're installing M2CryptoWin{32,64} which comes compiled
2015-08-17 19:48:00 +01:00
Pedro Algarvio
1ea426e299 Move code to properly handle default requirements.
Refs #26305
2015-08-17 19:48:00 +01:00
Pedro Algarvio
8fda8c0db3 M2CryptoWin{32,64} should only be installed on Salt < 2015.8.0 2015-08-17 19:48:00 +01:00
Pedro Algarvio
0ff2f19aee Override the develop command in cmdclass 2015-08-17 19:47:59 +01:00
Pedro Algarvio
a5aa752a85 Override the develop command when WITH_SETUPTOOLS is set 2015-08-17 19:47:59 +01:00
Pedro Algarvio
4d6841c761 Install M2CryptoWin{32,64} while installing Salt 2015-08-17 19:47:59 +01:00
Loren Carvalho
33ed315c85 fixed Packaing -> Packaging typo and added a couple comments on the setuptools/distutils abstract methods 2015-08-17 15:33:51 +01:00
Loren Carvalho
4afc820fd5 fixed Packaing -> Packaging typo and added a couple comments on the setuptools/distutils abstract methods 2015-08-15 21:04:51 -07:00
Jacob Hammons
d27ab32d0e copy spm.1 man page during setup
Refs #25213
2015-07-08 19:25:09 -06:00
Colton Myers
785f1575e8 Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    salt/fileclient.py
    salt/modules/glance.py
2015-07-06 12:03:11 -06:00
Colton Myers
187268d879 Merge remote-tracking branch 'upstream/2014.7' into merge-forward-2015.5
Conflicts:
    setup.py
2015-07-02 09:42:57 -06:00
Jay Bendon
c6a501ebda quick fix for issue #18447 2015-06-30 14:59:00 -07:00
Pedro Algarvio
a138a7b83c SPM also works on windows 2015-06-29 15:51:12 +01:00
Pedro Algarvio
ac086c9311 Add the spm script to setup.py 2015-06-29 15:49:48 +01:00
rallytime
9a6b159422 Remove SALT_CLOUD_REQS from setup.py --> develop
Since requirements/cloud.txt was removed, don't reference it in setup.py
2015-06-17 10:00:17 -06:00
rallytime
48769a544d Remove SALT_CLOUD_REQS from setup.py
Since cloud-requirements.txt was removed, don't reference it in setup.py
2015-06-17 09:56:13 -06:00
Thomas S Hatch
cf1c77fc90 Merge pull request #21416 from haim0n/develop
setup.py: fix "invalid command name" error from distutils.dist for write-salt-ssh-packaging-file and write-salt-version
2015-03-17 17:55:25 -06:00
Colton Myers
fd93491a5f Merge remote-tracking branch 'upstream/2015.2' into merge-forward-develop
Conflicts:
	salt/cloud/clouds/linodepy.py
	salt/master.py
	salt/modules/boto_route53.py
	salt/modules/virt.py
	salt/renderers/gpg.py
	salt/runners/doc.py
	salt/runners/jobs.py
	salt/runners/manage.py
	salt/runners/virt.py
	salt/utils/event.py
	salt/utils/http.py
2015-03-16 15:12:02 -06:00
Colton Myers
bdfdd3f232 Merge remote-tracking branch 'upstream/2014.7' into merge-forward-2015.2
Conflicts:
	salt/modules/virt.py
2015-03-11 16:09:57 -06:00
Justin Findlay
e6f8ea3c7c Don't obfuscate internal distutils attributes
Related to #21559, fixes #21522.
2015-03-11 14:54:47 -06:00
Pedro Algarvio
e5a7158069 Don't obfuscate the internal version attribute
Fixes #21522
2015-03-11 19:21:59 +00:00
Haim Daniel
178b61033d setup.py: fix "invalid command name" error from distutils.dist for
write-salt-ssh-packaging-file and write-salt-version
2015-03-09 08:03:38 +02:00
Erik Johnson
94d55889d7 Resolve merge conflicts 2015-02-28 12:35:25 -06:00
Erik Johnson
b23a8788c1 Add imp to windows freezer_includes
Got an ImportError on this line when I was testing on Windows.

https://github.com/terminalmage/salt/blob/43e15d8/salt/loader.py#L624
2015-02-27 14:53:59 -07:00
Erik Johnson
ae5cad196c Add imp to windows freezer_includes
Got an ImportError on this line when I was testing on Windows.

https://github.com/terminalmage/salt/blob/43e15d8/salt/loader.py#L624
2015-02-26 00:23:26 -06:00
Mikhail Matyunin
91200a25e6 Remove breaking "Static" word on line 647 2015-01-28 10:18:32 +03:00
Mikhail Matyunin
71cc779309 Code block start comment typo 2015-01-27 10:12:35 +03:00
Pedro Algarvio
74e513f6f3 Fix requirements files paths 2015-01-12 19:58:09 +00:00
Pedro Algarvio
e2e535824a Use SaltStackVersion since we don't yet know when Boron will come out 2015-01-10 21:18:51 +00:00
Pedro Algarvio
3f14678796 Throw an error when the time comes to remove the deprecated code. 2015-01-10 21:18:51 +00:00
Pedro Algarvio
8a6e0a38ed Remove unnecessary code 2015-01-10 21:18:51 +00:00
Pedro Algarvio
b2c710e375 Salt path options are now global and default to None.
Since we now evaluate each `salt.syspath` entry one by one, we only set
the passed settings in the generated `_syspaths` module.

The default values will mandate unless explicitly overridden in the
setup stage.

Refs #19157, #19160, #19161
Fixes #19514
Closes #19515
2015-01-10 21:18:51 +00:00
Anton D
e8a50ffc5c Explicitly include stdlib csv module in esky build. Fixes missing csv module in Windows builds. 2014-12-10 15:54:49 -07:00