diff --git a/AUTHORS.rst b/AUTHORS.rst index 5becf05..98e1618 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -13,6 +13,7 @@ Alec Koumjian akoumjian akoumjian@gmail.com Alex Van't Hof alexvh Alexander Krasnukhin themalkolm the.malkolm@gmail.com Alexey dmitrievav +Ali Rizvi-Santiago arizvisa amendlik amendlik Andrew Dean ndrwdn ndrwdn@gmail.com Andy Boff caelor github@plek.me.uk @@ -30,6 +31,7 @@ bruce-one bruce-one Вячеслав Спиридонов sp1r C. R. Oldham cro cr@saltstack.com Cam camereonsparr +Charles McLaughlin cmclaughlin Megan Wilhite Ch3LL megan.wilhite@gmail.com Chris Rebert cvrebert chris.rebert@hulu.com Chris Buechler cbuechler cmb@pfsense.org @@ -139,5 +141,6 @@ Vladimir Kozhukalov kozhukalov Whit Morriss whitmo whit@nocoast.us Wolodja Wentland babilen w@babilen5.org Wout wfhg +Yann Masson ymasson Yushi Nakai nyushi ========================== ===================== ============================ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..11614af --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,273 @@ +# Contributing Guidelines + +## License Notice + +The Salt Bootstrap project is open and encouraging to code contributions. Please be +advised that all code contributions will be licensed under the Apache 2.0 License. +We cannot accept contributions that already hold a License other than Apache 2.0 +without explicit exception. + +## Reporting Issues + +The Salt Bootstrap issue tracker is used for feature requests and bug reports. + +### Bugs + +A bug is a *demonstrable problem* that is caused by the code in the repository. + +Please read the following guidelines before you +[file an issue](https://github.com/saltstack/salt-bootstrap/issues/new). + +1. **Use the GitHub issue search** -- check if the issue has + already been reported. If it has been, please comment on the existing issue. + +2. **Check if the issue has been fixed** -- If you found a possible problem, or bug, + please try to bootstrap using the bootstrap scirpt from the develop branch. The + issue you are having might have already been fixed and it's just not yet included + in the stable release. + + ``` + curl -o bootstrap-salt.sh -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh + sudo sh bootstrap-salt.sh git develop + ``` + +3. **Isolate the demonstrable problem** -- make sure that the + code in the project's repository is *definitely* responsible for the issue. + +4. **Include a reproducible example** -- Provide the steps which + led you to the problem. + +Please try to be as detailed as possible in your report. What is your +environment? What steps will reproduce the issue? What operating system? What +would you expect to be the outcome? All these details will help people to +assess and fix any potential bugs. + +**Including the version and system information will always help,** such as: + +- Output of `salt --versions-report` +- Output of `bootstrap-salt.sh -v` +- System type +- Cloud/VM provider as appropriate + +Valid bugs will worked on as quickly as resources can be reasonably allocated. + +### Features + +Feature additions and requests are welcomed. When requesting a feature it will +be placed under the `Feature` label. + +If a new feature is desired, the fastest way to get it into Salt Bootstrap is +to contribute the code. Before starting on a new feature, an issue should be +filed for it. The one requesting the feature will be able to then discuss the +feature with the Salt Bootstrap maintainers and discover the best way to get +the feature included into the bootstrap script and if the feature makes sense. + +It is possible that the desired feature has already been completed. +Look for it in the [README](https://github.com/saltstack/salt-bootstrap/blob/develop/README.rst) +or exploring the wide list of options detailed at the top of the script. These +options are also available by running the `-h` help option for the script. It +is also common that the problem which would be solved by the new feature can be +easily solved another way, which is a great reason to ask first. + +## Fixing Issues + +Fixes for issues are very welcome! + +Once you've fixed the issue you have in hand, create a +[pull request](https://help.github.com/articles/creating-a-pull-request/). + +Salt Bootstrap maintainers will review your fix. If everything is OK and all +tests pass, you fix will be merged into Salt Bootstrap's code. + +### Branches + +There are two main branches in the Salt Bootstrap repository: + +- develop +- stable + +All fixes and features should be submitted to the `develop` branch. The `stable` +branch only contains released versions of the bootstrap script. + +## Pull Requests + +The Salt Bootstrap repo has several pull request checks that must pass before +a bug fix or feature implementation can be merged in. + +### PR Tests + +There are several Jenkins jobs that run on each Pull Request. Most of these are +CI jobs that set up different steps, such as setting up the job, cloning the +repo from the PR, etc. + +#### Lint Check + +The pull request test that matters the most, and the contributor is directly +responsible for fixing, is the Lint check. This check *must* be passing before +the contribution can be merged into the codebase. + +If the lint check has failed on your pull request, you can view the errors by +clicking `Details` in the test run output. Then, click the `Violations` link on +the left side. There you will see a list of files that have errors. By clicking +on the file, you will see `!` icons on the affected line. Hovering over the `!` +icons will explain what the issue is. + +To run the lint tests locally before submitting a pull request, use the +`tests/runtests.py` file. The `-L` option runs the lint check: + +``` +python tests/runtests.py -L +``` + +### GPG Verification + +SaltStack has enabled [GPG Probot](https://probot.github.io/apps/gpg/) to +enforce GPG signatures for all commits included in a Pull Request. + +In order for the GPG verification status check to pass, *every* contributor in +the pull request must: + +- Set up a GPG key on local machine +- Sign all commits in the pull request with key +- Link key with GitHub account + +This applies to all commits in the pull request. + +GitHub hosts a number of +[help articles](https://help.github.com/articles/signing-commits-with-gpg/) for +creating a GPG key, using the GPG key with `git` locally, and linking the GPG +key to your GitHub account. Once these steps are completed, the commit signing +verification will look like the example in GitHub's +[GPG Signature Verification feature announcement](https://github.com/blog/2144-gpg-signature-verification). + +## Release Cadence + +There is no defined release schedule for the bootstrap script at this time. +Typically, SaltStack's release team determines when it would be good to release +a new stable version. + +Timing the release usually involves an analysis of the following: + +- Updates for major feature releases in [Salt](https://github.com/saltstack/salt) +- Support for new versions of major operating systems +- Types of fixes submitted to `develop` since the last release +- Fixes needed for inclusion in an upcoming version of [Salt](https://github.com/saltstack/salt) +- Length of time since the last bootstrap release + +## Adding Support for Other Operating Systems + +The following operating systems are detected, but Salt and its dependency +installation functions are not developed yet: + +- BSD: + - NetBSD +- Linux: + - Slackware +- SunOS: + - OpenIndiana + - Oracle Solaris + - OmniOS (Illumos) + + +In order to install Salt for a distribution, you need to define the following: + +1. To Install Dependencies, which is required, one of: + + ``` + install____deps + install_____deps + install___deps + install____deps + install___deps + install__deps + ``` + +2. Optionally, define a minion configuration function, which will be called if the + ``-c`` option is passed. One of: + + ``` + config____salt + config_____salt + config___salt + config____salt + config___salt + config__salt + config_salt (THIS ONE IS ALREADY DEFINED AS THE DEFAULT) + ``` + +3. Optionally, define a Salt master pre-seed function, which will be called if the + ``-k`` (pre-seed master keys) option is passed. One of: + + ``` + preseed____master + preseed_____master + preseed___master + preseed____master + preseed___master + preseed__master + preseed_master (THIS ONE IS ALREADY DEFINED AS THE DEFAULT) + ``` + +4. To install salt, which, of course, is required, one of: + + ``` + install___ + install____ + install__ + ``` + +5. Optionally, define a post install function, one of: + + ``` + install____post + install_____post + install___post + install____post + install___post + install__post + ``` + +6. Optionally, define a start daemons function, one of: + + ``` + install____restart_daemons + install_____restart_daemons + install___restart_daemons + install____restart_daemons + install___restart_daemons + install__restart_daemons + ``` + +**NOTE** + +The start daemons function should be able to restart any daemons which are running, or +start if they're not running. + +7. Optionally, define a daemons running function, one of: + + ``` + daemons_running___ + daemons_running____ + daemons_running__ + daemons_running___ + daemons_running__ + daemons_running_ + daemons_running (THIS ONE IS ALREADY DEFINED AS THE DEFAULT) + ``` + +8. Optionally, check enabled Services: + + ``` + install____check_services + install_____check_services + install___check_services + install____check_services + install___check_services + install__check_services + ``` + +**NOTE** + +The bootstrapping script must be plain POSIX `sh` only, **not** `bash` or another shell script. +By design, the targeting for each operating system and version is very specific. Assumptions of +supported versions or variants should not be made, to avoid failed or broken installations. diff --git a/ChangeLog b/ChangeLog index 3e9aba5..f5618a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +Version 2017.12.13: + * Use HTTPS URL for OpenSuse's saltstack repo (gdm85) #1174 + * Respect disable repos (-r) option on OpenBSD (eradman) #1171 + * Fix #1168 : -b option causes error (vutny) #1170 + * Fix fatal error with using the -b option. (arizvisa) #1169 + * Devuan support (ymasson) #1165 + * Fix yum repo on AWS Linux (cmclaughlin) #1164 + * Use suse repo to install packages, rather than defining them (rallytime) #1157 + * Remove patch-level-1 specific code for SLES installs (rallytime) #1156 + * priority sort fedora-release (toanju) #1153 + * Declare EOL for SUSE Linux Enterprise Server releases (vutny) #1150 + * Fix #1142: allow git install on Raspbian 9 (vutny) #1146 + * Follow symlinks when parsing distro release files (vutny) #1145 + * fedora: use dnf-utils for F26 and above (toanju) #1144 + * Declare EOL for openSUSE LEAP 42.1 (vutny) #1143 + * Fix #1137: import GPG key through an HTTP(S) proxy (vutny) #1139 + * Fix #1138: git install on Debian/Ubuntu various arches (vutny) #1141 + * Declare EOL for openSUSE releases earlier and including 13.X (vutny) #1136 + * Update Fedora support: 24 is EOL (rallytime) #1134 + Version 2017.08.17: * Add new authors (rallytime) #1130 * README: Fix typo and Table of Contents for Debian section (vutny) #1129 @@ -32,47 +52,47 @@ Version 2017.08.17: * Declare End-Of-Life for Ubuntu 12.04 LTS (vutny) #1080 Version 2017.05.24: - * Use freebsd repo to query for salt dependencies (Ch3LL) #1076 - * Allow amazon to work with python2.7 on installs over 2016.11 (Ch3LL) #1073 - * ensure sles12 enables services with stable installs (Ch3LL) #1075 - * Declare End-of-Life for RHEL 5 and its variants (vutny) #1070 - * Fix configuring SaltStack's repo URL for RHEL variants (vutny) #1068 - * Add Manjaro as Arch derivative (luthes) #1063 - * Add "unmarkComment" option to probot-stale config (rallytime) #1064 - * Properly detect all supported Debian GNU/Linux derivatives (vutny) #1062 - * Archlinux must always update (gtmanfred) #1060 - * Alpine: fix adding, checking and running Salt Syndic in stable mode (vutny) #1059 - * Add KDE neon... (EHJ-52n) #1058 - * Update probot-stale message formatting. (rallytime) #1057 - * Fix `git` bootstrap mode for CentOS (vutny) #1054 - * update install_freebsd_10_stable to use FreeBSD repo (bytesatwork-xx) #1053 - * Support OpenBSD 6.1 (eradman) #1048 - * Update daysUntilStale value in probot-stale config (rallytime) #1055 - * Add ability to install and use a different python version when installing salt (Ch3LL) #1049 - * Add non-LTS type support for Ubuntu 17.04 (rallytime) #1051 - * Allow -R option to work for Debian/Ubuntu (rallytime) #1045 - * Adjust "daysUntilStale" variable to 190 days. #1047 - * Reduce the number of days an issue is considered "stale" (rallytime) #1046 - * Alpine: fix bootstrapping from Git -- install OpenRC initscripts (vutny) #1044 - * Add probot-stale config file (rallytime) #1042 - * Shallow cloning and Python setup fix for BSD (amontalban) #1040 - * Fix not needed quoting for salt/salt-bootstrap#1026 (amontalban) #1039 - * Update README file with supported release documentation (rallytime) #1034 - * Remove <<< bashism (The-Loeki) #1032 - * [-R option] Fix logic error where we trying to enable epel with -R (rallytime) #1033 - * Alpine: check Salt services have been enabled to start on boot (vutny) #1031 - * AWS Linux Native Support (bkruger99) #1022 - * Correct package name for FreeBSD installation (amontalban) #1030 - * README: describe architectures support for Salt deps on Linux distros (vutny) #1029 - * This commit addresses some of the issues in salt/salt-bootstrap#996 (amontalban) #1026 - * Add support for stable installation on Alpine Linux release 3.5 (vutny) #1028 - * Alpine Linux: fix installation of multiple pkgs ("stable" bootstrap) (vutny) #1027 - * Add Void Linux support (ndrwdn) #1025 - * RHEL6: disable stdin to fix shell session hang on killing tee pipe (vutny) #1018 - * Adding 2016.11 to stable version (ashokrajar) #1017 - * Update bootstrap-salt.sh (caelor) #1015 - * Alpine Linux support #1009 (ek9) #1010 - * Add Table of Contents in README (vutny) #1014 + * Use freebsd repo to query for salt dependencies (Ch3LL) #1076 + * Allow amazon to work with python2.7 on installs over 2016.11 (Ch3LL) #1073 + * ensure sles12 enables services with stable installs (Ch3LL) #1075 + * Declare End-of-Life for RHEL 5 and its variants (vutny) #1070 + * Fix configuring SaltStack's repo URL for RHEL variants (vutny) #1068 + * Add Manjaro as Arch derivative (luthes) #1063 + * Add "unmarkComment" option to probot-stale config (rallytime) #1064 + * Properly detect all supported Debian GNU/Linux derivatives (vutny) #1062 + * Archlinux must always update (gtmanfred) #1060 + * Alpine: fix adding, checking and running Salt Syndic in stable mode (vutny) #1059 + * Add KDE neon... (EHJ-52n) #1058 + * Update probot-stale message formatting. (rallytime) #1057 + * Fix `git` bootstrap mode for CentOS (vutny) #1054 + * update install_freebsd_10_stable to use FreeBSD repo (bytesatwork-xx) #1053 + * Support OpenBSD 6.1 (eradman) #1048 + * Update daysUntilStale value in probot-stale config (rallytime) #1055 + * Add ability to install and use a different python version when installing salt (Ch3LL) #1049 + * Add non-LTS type support for Ubuntu 17.04 (rallytime) #1051 + * Allow -R option to work for Debian/Ubuntu (rallytime) #1045 + * Adjust "daysUntilStale" variable to 190 days. #1047 + * Reduce the number of days an issue is considered "stale" (rallytime) #1046 + * Alpine: fix bootstrapping from Git -- install OpenRC initscripts (vutny) #1044 + * Add probot-stale config file (rallytime) #1042 + * Shallow cloning and Python setup fix for BSD (amontalban) #1040 + * Fix not needed quoting for salt/salt-bootstrap#1026 (amontalban) #1039 + * Update README file with supported release documentation (rallytime) #1034 + * Remove <<< bashism (The-Loeki) #1032 + * [-R option] Fix logic error where we trying to enable epel with -R (rallytime) #1033 + * Alpine: check Salt services have been enabled to start on boot (vutny) #1031 + * AWS Linux Native Support (bkruger99) #1022 + * Correct package name for FreeBSD installation (amontalban) #1030 + * README: describe architectures support for Salt deps on Linux distros (vutny) #1029 + * This commit addresses some of the issues in salt/salt-bootstrap#996 (amontalban) #1026 + * Add support for stable installation on Alpine Linux release 3.5 (vutny) #1028 + * Alpine Linux: fix installation of multiple pkgs ("stable" bootstrap) (vutny) #1027 + * Add Void Linux support (ndrwdn) #1025 + * RHEL6: disable stdin to fix shell session hang on killing tee pipe (vutny) #1018 + * Adding 2016.11 to stable version (ashokrajar) #1017 + * Update bootstrap-salt.sh (caelor) #1015 + * Alpine Linux support #1009 (ek9) #1010 + * Add Table of Contents in README (vutny) #1014 Version 2017.01.10: * Update AUTHORS.rst with new contributors (rallytime) #1011 @@ -172,486 +192,486 @@ Version 2016.05.10: * Fix Amazon Linux EOL check. (vutny) #818 Version 2016.04.18: - * Add support for openSUSE Leap. Thanks Roman Inflianskas(rominf). #693 - * Fix missing deps installation on Debian. Thanks Steve Groesz(wolfpackmars2). #699 - * Update SaltStack repo location and latest version for Windows. (brandon099) #711 - * Better EPEL repository detection on RHEL and CentOS. (vutny) #717 - * Fix git invocation fail when `man` command is not available. (vutny) #718 - * Fix `epel-release` package installation on CentOS/RHEL 5. (vutny) #719 - * Removed deprecated cli option. (abednarik) #705 - * Remove RHEL optional repo check and enable. (vutny) #720 - * Remove SaltStack COPR repository configuration for CentOS/RHEL5. (vutny) #721 - * Add opensuse_Tumbleweed support. (aboe76) #725 - * Sometimes bootstrap doesn't install zmq. (jtand) #726 - * Process -s (default sleep for service restarts) in bootstrap-salt.sh. (hipikat) #692 - * Minion keys and /etc/salt/minion should be overwritten on -C. (cro) #541 - * Fix for -C (_CONFIG_ONLY). (beaucephus) #544 - * Fix when using upstream tags. (The-Loeki) #564 - * COPR project moved. (rmohr) #738 - * Update license year range. (pra85) #743 - * Use POSIX-Compliant Command-Exists Test. (kojiromike) #741 - * Add -f option to force shallow cloning. (eyj) #660 - * add SLE 12 support, fix OpenSUSE support. (grep4linux) #748 - * Fix CentOS git setup.py syntax error upon installation. (The-Loeki) #746 - * Enable shallow cloning for version branches by default, not only tags. (vutny) #750 - * do not install copr repo on fedora 22+. (toanju) #751 - * Add support for pegged versions on YUM based OS'ses through repo.saltstack.com. (The-Loeki) #685 - * fix for FreeBSD 11 CURRENT install functions. (serge-p) #723 - * Don't add zypp repo if it already exists. (furlongm) #731 - * switch repositories for suse and sles fixes `#706`_. (aboe76) #734 - * Reformat and correct usage instructions. (vutny) #755 - * fixed missing repo for suse 12. (aboe76) #756 - * fix for Amazon Linux. (shawnbutts) #700 - * adding support for OpenBSD distribution. (serge-p) #722 - * fixing syntax errors. (beardedeagle) #760 - * Import CentOS 7 GPG key on RHEL for installing base dependencies from Salt corp repo. (vutny) #765 - * Fix multiple lint errors (shellcheck) and make some refactoring. (vutny) #768 - * Fix sleep time option to recognize a numeric argument. (vutny) #771 - * Update README. (vutny) #787 - * get tornado from pip on a fedora git install. (jfindlay) #785 - * Remove the Saltstack repo's alias. (cro) #794 - * Ability to change cache dir. (clarkperkins) #761 - * Add config_freebsd_salt func so freebsd puts cfgs in the right place. (ryanwalder) #779 - * Allow archive versions. (clarkperkins) #769 - * Lack of HTTPS for RPM packages. (jaredestroud) #783 - * Ability to change cache dir. (clarkperkins) #761 - * Bootstrap on Docker. (vutny) #793 - * add downstream pkg repo for SUSE. (jfindlay) #791 - * Fixed use of HTTP over HTTPS for anonscm.debian.org. (gdm85) #788 - * Bump Salt version to latest stable in PS bootstrap script for Windows. (vutny) #801 - * Add an -l option to switch https to http links. (rallytime) #795 - * Virtualenv support for Ubuntu. (l2ol33rt) #666 - * Lint. (jfindlay) #805 - * use portable command check. (jfindlay) #806 - * Update epel-release version number (RuriRyan) #809 + * Add support for openSUSE Leap. Thanks Roman Inflianskas(rominf). #693 + * Fix missing deps installation on Debian. Thanks Steve Groesz(wolfpackmars2). #699 + * Update SaltStack repo location and latest version for Windows. (brandon099) #711 + * Better EPEL repository detection on RHEL and CentOS. (vutny) #717 + * Fix git invocation fail when `man` command is not available. (vutny) #718 + * Fix `epel-release` package installation on CentOS/RHEL 5. (vutny) #719 + * Removed deprecated cli option. (abednarik) #705 + * Remove RHEL optional repo check and enable. (vutny) #720 + * Remove SaltStack COPR repository configuration for CentOS/RHEL5. (vutny) #721 + * Add opensuse_Tumbleweed support. (aboe76) #725 + * Sometimes bootstrap doesn't install zmq. (jtand) #726 + * Process -s (default sleep for service restarts) in bootstrap-salt.sh. (hipikat) #692 + * Minion keys and /etc/salt/minion should be overwritten on -C. (cro) #541 + * Fix for -C (_CONFIG_ONLY). (beaucephus) #544 + * Fix when using upstream tags. (The-Loeki) #564 + * COPR project moved. (rmohr) #738 + * Update license year range. (pra85) #743 + * Use POSIX-Compliant Command-Exists Test. (kojiromike) #741 + * Add -f option to force shallow cloning. (eyj) #660 + * add SLE 12 support, fix OpenSUSE support. (grep4linux) #748 + * Fix CentOS git setup.py syntax error upon installation. (The-Loeki) #746 + * Enable shallow cloning for version branches by default, not only tags. (vutny) #750 + * do not install copr repo on fedora 22+. (toanju) #751 + * Add support for pegged versions on YUM based OS'ses through repo.saltstack.com. (The-Loeki) #685 + * fix for FreeBSD 11 CURRENT install functions. (serge-p) #723 + * Don't add zypp repo if it already exists. (furlongm) #731 + * switch repositories for suse and sles fixes `#706`_. (aboe76) #734 + * Reformat and correct usage instructions. (vutny) #755 + * fixed missing repo for suse 12. (aboe76) #756 + * fix for Amazon Linux. (shawnbutts) #700 + * adding support for OpenBSD distribution. (serge-p) #722 + * fixing syntax errors. (beardedeagle) #760 + * Import CentOS 7 GPG key on RHEL for installing base dependencies from Salt corp repo. (vutny) #765 + * Fix multiple lint errors (shellcheck) and make some refactoring. (vutny) #768 + * Fix sleep time option to recognize a numeric argument. (vutny) #771 + * Update README. (vutny) #787 + * get tornado from pip on a fedora git install. (jfindlay) #785 + * Remove the Saltstack repo's alias. (cro) #794 + * Ability to change cache dir. (clarkperkins) #761 + * Add config_freebsd_salt func so freebsd puts cfgs in the right place. (ryanwalder) #779 + * Allow archive versions. (clarkperkins) #769 + * Lack of HTTPS for RPM packages. (jaredestroud) #783 + * Ability to change cache dir. (clarkperkins) #761 + * Bootstrap on Docker. (vutny) #793 + * add downstream pkg repo for SUSE. (jfindlay) #791 + * Fixed use of HTTP over HTTPS for anonscm.debian.org. (gdm85) #788 + * Bump Salt version to latest stable in PS bootstrap script for Windows. (vutny) #801 + * Add an -l option to switch https to http links. (rallytime) #795 + * Virtualenv support for Ubuntu. (l2ol33rt) #666 + * Lint. (jfindlay) #805 + * use portable command check. (jfindlay) #806 + * Update epel-release version number (RuriRyan) #809 Version 2015.11.09 - * Make sure that wget is installed. #868 + * Make sure that wget is installed. #868 Version 2015.11.04: - * Allow bypassing dependencies installation. Thanks EYJ. #656. - * Add FreeBSD 11 support. Thanks Chris Buechler(cbuechler). #653 - * Move RHEL installations to use repo.saltstack.com #674 - * Move Debian 8 installation to use repo.saltstack.com #674 - * Fix error finding python-jinja2 in RHEL 7. Thanks Rob Eden(hedinfaok). #654 - * Move Ubuntu 12 and 14 installations to use repo.saltstack.com #674 - * Move FreeBSD installations to use repo.saltstack.com #674 - * Use dnf on Fedora 22 and later. Thanks Michele Bologna (mbologna). #665 + * Allow bypassing dependencies installation. Thanks EYJ. #656. + * Add FreeBSD 11 support. Thanks Chris Buechler(cbuechler). #653 + * Move RHEL installations to use repo.saltstack.com #674 + * Move Debian 8 installation to use repo.saltstack.com #674 + * Fix error finding python-jinja2 in RHEL 7. Thanks Rob Eden(hedinfaok). #654 + * Move Ubuntu 12 and 14 installations to use repo.saltstack.com #674 + * Move FreeBSD installations to use repo.saltstack.com #674 + * Use dnf on Fedora 22 and later. Thanks Michele Bologna (mbologna). #665 Version 2015.08.06: - * Fix python-requests installations for Ubuntu >= 14.04 LTS. #631, #632, #633 - * Install python-crypto from Chris Lea's PPA for Ubuntu < 14.04 - * Exit the git checkout directory before deleting it. Thanks Bret Fisher. #634 - * Use prefix /usr for centos git install. Thanks Stanislav B. #638 - * Drop Ubuntu EOL versions. All Ubuntu version before 12.04. - * Make sure python-dev is installed wheb trying to install tornado from PyPi. #640 + * Fix python-requests installations for Ubuntu >= 14.04 LTS. #631, #632, #633 + * Install python-crypto from Chris Lea's PPA for Ubuntu < 14.04 + * Exit the git checkout directory before deleting it. Thanks Bret Fisher. #634 + * Use prefix /usr for centos git install. Thanks Stanislav B. #638 + * Drop Ubuntu EOL versions. All Ubuntu version before 12.04. + * Make sure python-dev is installed wheb trying to install tornado from PyPi. #640 Version 2015.07.22: - * Fix tornado installation in Ubuntu. Thanks Yushi Nakai. #627 - * Install tornado using pip on Ubuntu for Salt's v2015.8.xx onward stable releases. - * Install requests on Ubuntu from Chris Lea's PPA. #630 + * Fix tornado installation in Ubuntu. Thanks Yushi Nakai. #627 + * Install tornado using pip on Ubuntu for Salt's v2015.8.xx onward stable releases. + * Install requests on Ubuntu from Chris Lea's PPA. #630 Version 2015.07.17: - * Make sure setuptools is installed before using it. #598. - * `systemd` is only fully supported from 15.04 onwards. #602 - * Fix debian mirrors issue. Thanks Wolodja Wentland(babilen). #606 - * Fix python-jinja2 repo move on RHEL6. Thanks lomeroe. #621 - * Allow skipping services. Thanks denmat. #455 - * Fix missing Debian init script. #607 saltstack/salt#25270 and saltstack/salt#25456 - * Fix SmartOS etc path. Thanks Bret Fisher. #624 - * Fix possible unbound variable in Gentoo. #625 - * Properly detect the git binary in SmartOS. #611 + * Make sure setuptools is installed before using it. #598. + * `systemd` is only fully supported from 15.04 onwards. #602 + * Fix debian mirrors issue. Thanks Wolodja Wentland(babilen). #606 + * Fix python-jinja2 repo move on RHEL6. Thanks lomeroe. #621 + * Allow skipping services. Thanks denmat. #455 + * Fix missing Debian init script. #607 saltstack/salt#25270 and saltstack/salt#25456 + * Fix SmartOS etc path. Thanks Bret Fisher. #624 + * Fix possible unbound variable in Gentoo. #625 + * Properly detect the git binary in SmartOS. #611 Version 2015.05.07: - * Lower required requests version dependency. Use system requests package where possible. - * Allow Ubuntu alternate ppas. Thanks Peter Tripp(notpeter). #563 + * Lower required requests version dependency. Use system requests package where possible. + * Allow Ubuntu alternate ppas. Thanks Peter Tripp(notpeter). #563 Version 2015.05.04: - * Fix the configuration path for FreeBSD. #567/#552. Thanks Ronald van Zantvoort(The-Loeki). - + Fix non grouping support in POSIX sed. Thanks Ronald van Zantvoort(The-Loeki). - * Add Debian 8 support. Thanks Matt Black(mafrosis) - * Improve Debian version parsing. Thanks Mark Lee(malept) - * Make sure we update packages list one Chris Lea's PPA repository is added. - * Hard code the Debian Squeeze backports to the DE mirror since the main repository is down. - Thanks @panticz. #589. - * Only install git if not already installed. #560 - * Fix openSUSE 13.2 where we need to pass --replaceflags. Thanks Roman Inflianskas(rominf). - #504. - * Make sure that a recent enough requests package is installed in Debian/Ubuntu. - * Install tornado on git installs for the develop branch if necessary. #580 - * Add support for Ubuntu 15.04 + * Fix the configuration path for FreeBSD. #567/#552. Thanks Ronald van Zantvoort(The-Loeki). + + Fix non grouping support in POSIX sed. Thanks Ronald van Zantvoort(The-Loeki). + * Add Debian 8 support. Thanks Matt Black(mafrosis) + * Improve Debian version parsing. Thanks Mark Lee(malept) + * Make sure we update packages list one Chris Lea's PPA repository is added. + * Hard code the Debian Squeeze backports to the DE mirror since the main repository is down. + Thanks @panticz. #589. + * Only install git if not already installed. #560 + * Fix openSUSE 13.2 where we need to pass --replaceflags. Thanks Roman Inflianskas(rominf). + #504. + * Make sure that a recent enough requests package is installed in Debian/Ubuntu. + * Install tornado on git installs for the develop branch if necessary. #580 + * Add support for Ubuntu 15.04 Version 2015.03.15: - * Add multi-master support. Thanks Fred Reimer(freimer). #555 + * Add multi-master support. Thanks Fred Reimer(freimer). #555 Version 2015.03.04: - * Fix the salt package selection on Arch stable installs. + * Fix the salt package selection on Arch stable installs. Version 2015.02.28: - * Fix Debian backports repository. + * Fix Debian backports repository. Version 2015.02.27: - * Try other tools besides wget when downloading the COPR repo file. Thanks Ronald van - Zantvoort(The-Loeki) - * No need to install packages from the Unstable repository for debian, use backports. Thanks - Ari Aosved(devaos) - * Fix an issue in CentOS where the syndic package wasn't being installed(since it's now a - separate package). Thanks Ronald van Zantvoort(The-Loeki) - * Enable the server-optionals repository for RHEL >= 7 - * RHEL/CentOS 5 now uses the COPR repository. #533 + * Try other tools besides wget when downloading the COPR repo file. Thanks Ronald van + Zantvoort(The-Loeki) + * No need to install packages from the Unstable repository for debian, use backports. Thanks + Ari Aosved(devaos) + * Fix an issue in CentOS where the syndic package wasn't being installed(since it's now a + separate package). Thanks Ronald van Zantvoort(The-Loeki) + * Enable the server-optionals repository for RHEL >= 7 + * RHEL/CentOS 5 now uses the COPR repository. #533 Version 2015.01.12: - * Add package upgrades support to FreeBSD. Thanks William Eshagh(eshagl). - * Make sure wget is installed on debian bare systems. - * Make sure the Arch pacman database is up to date - * Install `python-hashlib` in CentOS 5 in order to use the COPR repository + * Add package upgrades support to FreeBSD. Thanks William Eshagh(eshagl). + * Make sure wget is installed on debian bare systems. + * Make sure the Arch pacman database is up to date + * Install `python-hashlib` in CentOS 5 in order to use the COPR repository Version 2014.12.11: - * Enable binary installations on CentOS 7. Thanks ggillies - * Updated the URL for EPEL 7 + * Enable binary installations on CentOS 7. Thanks ggillies + * Updated the URL for EPEL 7 Version 2014.10.30: - * Apply the forking patch to openSUSE git installations. + * Apply the forking patch to openSUSE git installations. Version 2014.10.28: - * Install the python systemd bindings for Arch and Fedora git installations - * Allow cloning from Salt's git repository using HTTPS. #475 + * Install the python systemd bindings for Arch and Fedora git installations + * Allow cloning from Salt's git repository using HTTPS. #475 Version 2014.10.21: - * Fix path to python on FreeBSD. Thanks Pavel Snagovsky(paha) - * Fix syndic installation on RHEL based installations. Thanks markgaylard - * Properly detect the git checkout `basename` directory instead of hard coding it. Thanks - Howard Mei(HowardMei). - * Allow installing ZMQ for SaltStack's COPR repository. - * Allow installing ZMQ4/PyZMQ14 from Chris Lea's PPA repository. + * Fix path to python on FreeBSD. Thanks Pavel Snagovsky(paha) + * Fix syndic installation on RHEL based installations. Thanks markgaylard + * Properly detect the git checkout `basename` directory instead of hard coding it. Thanks + Howard Mei(HowardMei). + * Allow installing ZMQ for SaltStack's COPR repository. + * Allow installing ZMQ4/PyZMQ14 from Chris Lea's PPA repository. Version 2014.10.14: - * Fixed a regex issue with matching Salt's tags. Match v2014.7 but not 2014.7 as a valid tag - * Distro Support Added: - * Added Linux Mint 17 support(Thanks Skyler Berg) - * Disrto Suuport Fixed: - * Init pacman keys if not done so previously + * Fixed a regex issue with matching Salt's tags. Match v2014.7 but not 2014.7 as a valid tag + * Distro Support Added: + * Added Linux Mint 17 support(Thanks Skyler Berg) + * Disrto Suuport Fixed: + * Init pacman keys if not done so previously Version 2014.09.25: - * Properly detect Amazon AMI's >= 2014.9. #468 + * Properly detect Amazon AMI's >= 2014.9. #468 Version 2014.09.09: - * Distro Support Fixes: - * Updated the URL for EPEL 7 - * PIP based installations on Ubuntu 10.04 need setuptools installed - * Arch stopped providing the version information on `/etc/arch-release` - * Complete `salt-api` services checking. #450 + * Distro Support Fixes: + * Updated the URL for EPEL 7 + * PIP based installations on Ubuntu 10.04 need setuptools installed + * Arch stopped providing the version information on `/etc/arch-release` + * Complete `salt-api` services checking. #450 Version 2014.08.30: - * Skip service checks for `salt-api`, since this should be an opt-in service not necessarily - meant to start at boot time. - * Distro Support Fixes: - * Also install the salt-api service on RHEL based distributions for git based - installations. - * Properly detect Arch Linux when lsb-release is available - * Updated the URL for EPEL 7 + * Skip service checks for `salt-api`, since this should be an opt-in service not necessarily + meant to start at boot time. + * Distro Support Fixes: + * Also install the salt-api service on RHEL based distributions for git based + installations. + * Properly detect Arch Linux when lsb-release is available + * Updated the URL for EPEL 7 Version 2014.08.23: - * Avoid redirect breakage when installing EPEL with rpm on RHEL 5 - * Ensure python-apt is installed by the bootstrap script for Debian & Ubuntu minions. Thanks - @garethgreenaway. - * Don't shallow clone on git versions lower than 1.7.10 - * Only shallow clone on git tag based installations - * Configurable Salt repository clone directory for git based installations - * Distro Support Fixed: - * Fixed the URL to download EPEL for Cent 5 - * Use the full path to the `chkconfig` binary when checking for services in SysV init - systems. - * Fixed an issue where the default sleep period(3 secs) on Ubuntu would cause a race - condition with upstart wherein the package installation would call an upstart start and - before it could complete, bootstrap would call another. The result was *two* copies of salt - running which ended up causing a most stubborn bug that's documented in - https://github.com/saltstack/salt/issues/12248 + * Avoid redirect breakage when installing EPEL with rpm on RHEL 5 + * Ensure python-apt is installed by the bootstrap script for Debian & Ubuntu minions. Thanks + @garethgreenaway. + * Don't shallow clone on git versions lower than 1.7.10 + * Only shallow clone on git tag based installations + * Configurable Salt repository clone directory for git based installations + * Distro Support Fixed: + * Fixed the URL to download EPEL for Cent 5 + * Use the full path to the `chkconfig` binary when checking for services in SysV init + systems. + * Fixed an issue where the default sleep period(3 secs) on Ubuntu would cause a race + condition with upstart wherein the package installation would call an upstart start and + before it could complete, bootstrap would call another. The result was *two* copies of salt + running which ended up causing a most stubborn bug that's documented in + https://github.com/saltstack/salt/issues/12248 Version 2014.07.29: - * Shallow clone Salt's repository for speed improvements. In case of failure, resume old - behaviour. - * Fixed bug introduced in 0577622 when salt-api service install and checks were added - * Distro Support Fixed: - * Fixed infinite loop when handling RHEL dependencies. Thanks Dan Mick(@dmick). + * Shallow clone Salt's repository for speed improvements. In case of failure, resume old + behaviour. + * Fixed bug introduced in 0577622 when salt-api service install and checks were added + * Distro Support Fixed: + * Fixed infinite loop when handling RHEL dependencies. Thanks Dan Mick(@dmick). Version 2014.07.27: - * Amazon Linux AMI 2010.xx is not explicitly not supported. - * Install the `salt-api` scripts if available when the `salt-master` is also installed. - * Added support for a configurable sleep time when starting, restarting and checking for - enabled services. - * Drop the `tsflags` requirement for RHEL and RHEL based distributions. - * When sorting release files, oracle-release has higher priority than redhat-release. - * Distro Support Fixed: - * Debian >= 7 uses system's python-requests package, not PIP - * Install 'python-zypp' in SuSE and openSUSE(required by Salt's zypper module) - * Only install EPEL on requiring distributions if not already installed - * CentOS 7 now uses systemd and the script now properly handles it - * systemd in openSUSE 12.2 complains if service does not contain `.service`` - * Properly detect openSUSE using `lsb_release - * SLES 11 SP3 ships with both python-M2Crypto-0.22.* and python-m2crypto-0.21 and we will - be asked which we want to install, even with --non-interactive. Let's try to install the - higher version first and then the lower one in case of failure. - * Allow some extra time on RHEL for the optionals repo check in case the repository - subscription is being managed externally. + * Amazon Linux AMI 2010.xx is not explicitly not supported. + * Install the `salt-api` scripts if available when the `salt-master` is also installed. + * Added support for a configurable sleep time when starting, restarting and checking for + enabled services. + * Drop the `tsflags` requirement for RHEL and RHEL based distributions. + * When sorting release files, oracle-release has higher priority than redhat-release. + * Distro Support Fixed: + * Debian >= 7 uses system's python-requests package, not PIP + * Install 'python-zypp' in SuSE and openSUSE(required by Salt's zypper module) + * Only install EPEL on requiring distributions if not already installed + * CentOS 7 now uses systemd and the script now properly handles it + * systemd in openSUSE 12.2 complains if service does not contain `.service`` + * Properly detect openSUSE using `lsb_release + * SLES 11 SP3 ships with both python-M2Crypto-0.22.* and python-m2crypto-0.21 and we will + be asked which we want to install, even with --non-interactive. Let's try to install the + higher version first and then the lower one in case of failure. + * Allow some extra time on RHEL for the optionals repo check in case the repository + subscription is being managed externally. Version 2014.06.30: - * Distro Support Fixed: - * Bump build/maintenance version for epel-release package. Thanks Gregory Meno(GregMeno) - * Properly detect Amazon Linux AMI when using `lsb_release` - * Fix `tsflags` installation. + * Distro Support Fixed: + * Bump build/maintenance version for epel-release package. Thanks Gregory Meno(GregMeno) + * Properly detect Amazon Linux AMI when using `lsb_release` + * Fix `tsflags` installation. Version 2014.06.28: - * Fixed `tsflags` packages detection for RHEL and Oracle Linux 6.5 + * Fixed `tsflags` packages detection for RHEL and Oracle Linux 6.5 Version 2014.06.21: - * Also export the HTTPS proxy environment variable. Thanks Giuseppe Iannello(gianello). - * Distro Support Fixed: - * Improve Oracle Linux Server detection - * Overcome the Oracle Linux awkwardness. `--enablerepo=XYX` disables ALL OTHER REPOS!!!! - * Oracle Linux also support testing repositories installation + * Also export the HTTPS proxy environment variable. Thanks Giuseppe Iannello(gianello). + * Distro Support Fixed: + * Improve Oracle Linux Server detection + * Overcome the Oracle Linux awkwardness. `--enablerepo=XYX` disables ALL OTHER REPOS!!!! + * Oracle Linux also support testing repositories installation Version 2014.06.19: - * Allow passing the master address as an environment variable, `BS_SALT_MASTER_ADDRESS` - * Fixed an issue with the keys pre-seed. We were passing absolute paths where we only needed - basenames. - * Added HTTP proxy configuration support. Thanks Giuseppe Iannello(gianello), - * Distro Support Added: - * Elementary OS - * RHEL 7 Beta/RC - * Kali Linux. Thanks Valentin Bud(valentinbud) - * Distro Support Fixed: - * Improved RHEL optionals repository detection + * Allow passing the master address as an environment variable, `BS_SALT_MASTER_ADDRESS` + * Fixed an issue with the keys pre-seed. We were passing absolute paths where we only needed + basenames. + * Added HTTP proxy configuration support. Thanks Giuseppe Iannello(gianello), + * Distro Support Added: + * Elementary OS + * RHEL 7 Beta/RC + * Kali Linux. Thanks Valentin Bud(valentinbud) + * Distro Support Fixed: + * Improved RHEL optionals repository detection Version 2014.04.16: - * Fixed a bug for RHEL 6 based distributions where yum-utils was not getting installed. - * Added minor version check for RHEL 6 optional channel. - * Added quotes around "apache-libcloud>=$_LIBCLOUD_MIN_VERSION" for proper version requirements - handling. - * Install the python 'requests' package which is now a hard dependency in Salt. - * When installing from a user defined repository add the official one as a remote and fetch - its tags for proper versioning. - * Distro Support Fixed: - * CentOS netinstall ISO's don't install `chkconfig` - * Improved RHEL optional repository detection. This allows user repository usage, which - don't need the optional repository support since they usually provide their packages. - * Distro Support Added: - * Oracle Linux - * Scientific Linux + * Fixed a bug for RHEL 6 based distributions where yum-utils was not getting installed. + * Added minor version check for RHEL 6 optional channel. + * Added quotes around "apache-libcloud>=$_LIBCLOUD_MIN_VERSION" for proper version requirements + handling. + * Install the python 'requests' package which is now a hard dependency in Salt. + * When installing from a user defined repository add the official one as a remote and fetch + its tags for proper versioning. + * Distro Support Fixed: + * CentOS netinstall ISO's don't install `chkconfig` + * Improved RHEL optional repository detection. This allows user repository usage, which + don't need the optional repository support since they usually provide their packages. + * Distro Support Added: + * Oracle Linux + * Scientific Linux Version 2014.03.10-1: - * Distro Support Fixed: - * Fix the Debian services running function + * Distro Support Fixed: + * Fix the Debian services running function Version 2014.03.10: - * Debian based distributions which don't use upstart now also check if the salt services are - enabled. - * Distro Support Fixed: - * RedHat based distributions now have a proper services enabled checker. + * Debian based distributions which don't use upstart now also check if the salt services are + enabled. + * Distro Support Fixed: + * RedHat based distributions now have a proper services enabled checker. Version 2014.02.27: - * Fixed a bug on the services enabled function searching logic. - * Arch, Fedora, openSUSE and SuSE now check for services enabled, if using systemd - * CentOS(and any RedHat based) and Ubuntu now check for services enabled is using upstart - * Distro Support Added: - * Debian 8. Thank You Boris Feld(Lothiraldan). + * Fixed a bug on the services enabled function searching logic. + * Arch, Fedora, openSUSE and SuSE now check for services enabled, if using systemd + * CentOS(and any RedHat based) and Ubuntu now check for services enabled is using upstart + * Distro Support Added: + * Debian 8. Thank You Boris Feld(Lothiraldan). Version 2014.02.19: - * Fixed a problem with the quotes of an error message - * Arch installations now uses the community repository - * Distro Support Fixed: - * Fixed Fedora Git based installations(git was not being installed) + * Fixed a problem with the quotes of an error message + * Arch installations now uses the community repository + * Distro Support Fixed: + * Fixed Fedora Git based installations(git was not being installed) Version 2014.02.18: - * Debian based distribution now get a warning stating that NOT starting daemons does not work - as supposed, mainly because that's the Debian policy. - * Fix bug introduced when implementing the master ip flag. The default minion includes - directory is `minion.d`, not `minion.conf.d` + * Debian based distribution now get a warning stating that NOT starting daemons does not work + as supposed, mainly because that's the Debian policy. + * Fix bug introduced when implementing the master ip flag. The default minion includes + directory is `minion.d`, not `minion.conf.d` Version 2014.02.16: - * The script now allows setting up the salt-master address as a separate configuration file by - passing `-A` to the script. - * Add support to install apache-libcloud by passing the `-L` flag. In some distribution it's - also needed to pass `-P` because the minimal apache-libcloud version is `0.14.0`. This support - is still missing for FreeBSD and SmartOS. - * Fixed an issue when copying or moving files. We now test to see if the destination is a - directory and create a full path from that so that the "do not override" logic works as - supposed. #294. - * Allow passing additional package names to install while installing Salt's dependencies. #262 - * Pass the salt configuration directory, default or from environment variable to the setup.py - script for git based installations. #305 - * Distro Support Fixed: - * FreeBSD `fetch` now has a notion of insecure certificates. Handle this properly. Thank - You Mike Carlson(m87carlson). - * Arch, openSUSE and SuSE are now upgradable when the `-U` flag is passed. - * Force overwrites now works for existing init.d scripts on CentOS git installations. #259 - * Distro Support Added: - * FreeBSD 10 is now also supported. Thank You Mike Carlson(m87carlson). - * Red Had Enterprise Workstation is now supported. + * The script now allows setting up the salt-master address as a separate configuration file by + passing `-A` to the script. + * Add support to install apache-libcloud by passing the `-L` flag. In some distribution it's + also needed to pass `-P` because the minimal apache-libcloud version is `0.14.0`. This support + is still missing for FreeBSD and SmartOS. + * Fixed an issue when copying or moving files. We now test to see if the destination is a + directory and create a full path from that so that the "do not override" logic works as + supposed. #294. + * Allow passing additional package names to install while installing Salt's dependencies. #262 + * Pass the salt configuration directory, default or from environment variable to the setup.py + script for git based installations. #305 + * Distro Support Fixed: + * FreeBSD `fetch` now has a notion of insecure certificates. Handle this properly. Thank + You Mike Carlson(m87carlson). + * Arch, openSUSE and SuSE are now upgradable when the `-U` flag is passed. + * Force overwrites now works for existing init.d scripts on CentOS git installations. #259 + * Distro Support Added: + * FreeBSD 10 is now also supported. Thank You Mike Carlson(m87carlson). + * Red Had Enterprise Workstation is now supported. Version 1.5.11: - * Fixed an out of scope variable missed when moving functions around. + * Fixed an out of scope variable missed when moving functions around. Version 1.5.10: - * Salt no longer has the master branch in git, install from develop as default. - * Installing from Git on Red Hat based distributions now also needs `yum-utils` installed. - * Allow the script to use a different git repository to install from. - * Fixed a bug where a branch name with dashes would be wrongly detected as an option to the - script. - * Default to secure file downloads(if any). - * Distro Support Fixed: - * Minimal Ubuntu installation might not have upstart installed, fixed. - * FreeBSD now uses the official FreeBSD repository. Thank You Paul Brian(lifeisstillgood)! + * Salt no longer has the master branch in git, install from develop as default. + * Installing from Git on Red Hat based distributions now also needs `yum-utils` installed. + * Allow the script to use a different git repository to install from. + * Fixed a bug where a branch name with dashes would be wrongly detected as an option to the + script. + * Default to secure file downloads(if any). + * Distro Support Fixed: + * Minimal Ubuntu installation might not have upstart installed, fixed. + * FreeBSD now uses the official FreeBSD repository. Thank You Paul Brian(lifeisstillgood)! Version 1.5.9: - * Allow to not start the daemons after bootstrapping salt. This will allow `vagrant-lxc` - installations, `debootstrap*`, etc, to finish properly. Thanks Henrik Holmboe (holmboe). - * Distro Support Fixed: - * Salt >= 0.17 requires ElementTree which is on the python standard library after python - 2.6 but openSUSE split that into a separate package. - * Fixed a logic preventing proper Ubuntu bootstrapping on some situations. + * Allow to not start the daemons after bootstrapping salt. This will allow `vagrant-lxc` + installations, `debootstrap*`, etc, to finish properly. Thanks Henrik Holmboe (holmboe). + * Distro Support Fixed: + * Salt >= 0.17 requires ElementTree which is on the python standard library after python + 2.6 but openSUSE split that into a separate package. + * Fixed a logic preventing proper Ubuntu bootstrapping on some situations. Version 1.5.8: - * Fixed an Ubuntu regression. `add-apt-repository` is only available on - `software-properties-common` after 12.10, inclusive. Thanks Diego Woitasen(diegows) + * Fixed an Ubuntu regression. `add-apt-repository` is only available on + `software-properties-common` after 12.10, inclusive. Thanks Diego Woitasen(diegows) Version 1.5.7: - * For RedHat based distributions which rely on `epel`, the user can now pass `testing` to the - script and `epel-testing` shall be used to bootstrap salt and it's dependencies. - * No full system upgrades, if optional by the distribution, shall be done unless `-U` is passed - to the bootstrap script(required upgrade procedures must exist on the script, currently Debian - and RedHat based distributions support system upgrades). - * Fixed an issue where passing BS_KEEP_TEMP_FILES=1 to the script was causing an error. #206. - * Switched FreeBSD default packages repository to PCBSD(http://www.pcbsd.org) and added - multiple repository support to install salt from the SaltStack's FreeBSD repository. Thanks - Christer Edwards(cedwards). - * Improved Gentoo Support. Thanks Elias Probst(eliasp). - * Stop execution soon for end of life distributions or non supported distribution versions. - * Distro Support Fixed: - * Fixed an unbound variable while bootstraping Gentoo. - * Fixed CentOS/RHEL 5. - * Fixed crypto++ compilation. Thanks Kenneth Wilke(KennethWilke)! - * Fixed FreeBSD git installations not pointing to the proper salt configuration directory, - which on FreeBSD is '/usr/local/etc/salt'. - * Fixed testing installation for Red Hat based distributions. Thanks Jeff Strunk(jstrunk) - * Fixed wrong package name on Arch. Thanks Niels Abspoel(aboe76) - * Make sure the Ubuntu universe repository is enabled. Thanks Karl Grzeszczak(karlgrz). - * Fixed SmartOS installation. Thanks Matthieu Guegan(mguegan). + * For RedHat based distributions which rely on `epel`, the user can now pass `testing` to the + script and `epel-testing` shall be used to bootstrap salt and it's dependencies. + * No full system upgrades, if optional by the distribution, shall be done unless `-U` is passed + to the bootstrap script(required upgrade procedures must exist on the script, currently Debian + and RedHat based distributions support system upgrades). + * Fixed an issue where passing BS_KEEP_TEMP_FILES=1 to the script was causing an error. #206. + * Switched FreeBSD default packages repository to PCBSD(http://www.pcbsd.org) and added + multiple repository support to install salt from the SaltStack's FreeBSD repository. Thanks + Christer Edwards(cedwards). + * Improved Gentoo Support. Thanks Elias Probst(eliasp). + * Stop execution soon for end of life distributions or non supported distribution versions. + * Distro Support Fixed: + * Fixed an unbound variable while bootstraping Gentoo. + * Fixed CentOS/RHEL 5. + * Fixed crypto++ compilation. Thanks Kenneth Wilke(KennethWilke)! + * Fixed FreeBSD git installations not pointing to the proper salt configuration directory, + which on FreeBSD is '/usr/local/etc/salt'. + * Fixed testing installation for Red Hat based distributions. Thanks Jeff Strunk(jstrunk) + * Fixed wrong package name on Arch. Thanks Niels Abspoel(aboe76) + * Make sure the Ubuntu universe repository is enabled. Thanks Karl Grzeszczak(karlgrz). + * Fixed SmartOS installation. Thanks Matthieu Guegan(mguegan). Version 1.5.6: - * If there's a `grains` file on the provided temporary configuration directory, move it to the - proper place while moving the minion configuration file. - * Gentoo bootstraps can now use a bin host to provide binary packages, just set the - `BS_GENTOO_USE_BINHOST` environment variable. - * If `BS_KEEP_TEMP_FILES=1` is found on the environment, the script will copy the files instead - of moving them. - * There were still some `mv` and `cp` occurrences which were not using their `{move,copy}file` - replacements which ended up on now respecting the "Do not override existing configuration" - feature. - * Distro Support Fixed: - * Arch now upgrades it's system package properly as suggested on their mailing list. - * Arch now moves back any configuration files provided by the user renamed by pacman on the - installation process. - * Fixed SmartOS detection(was being detected as Solaris) and bootstrapping. Fixed SmartOS - different gcc package names for different package sets. - * Fixed FreeBSD git based installations(no rc.d scripts were available). - * Fixed FreeBSD not re-evaluating the `PKI_DIR` variable since the `SALT_ETC_DIR` was - redefined. - * Distro Support Added: - * Linux Mint. Thanks Alex Van't Hof(alexvh)! - * Linaro. + * If there's a `grains` file on the provided temporary configuration directory, move it to the + proper place while moving the minion configuration file. + * Gentoo bootstraps can now use a bin host to provide binary packages, just set the + `BS_GENTOO_USE_BINHOST` environment variable. + * If `BS_KEEP_TEMP_FILES=1` is found on the environment, the script will copy the files instead + of moving them. + * There were still some `mv` and `cp` occurrences which were not using their `{move,copy}file` + replacements which ended up on now respecting the "Do not override existing configuration" + feature. + * Distro Support Fixed: + * Arch now upgrades it's system package properly as suggested on their mailing list. + * Arch now moves back any configuration files provided by the user renamed by pacman on the + installation process. + * Fixed SmartOS detection(was being detected as Solaris) and bootstrapping. Fixed SmartOS + different gcc package names for different package sets. + * Fixed FreeBSD git based installations(no rc.d scripts were available). + * Fixed FreeBSD not re-evaluating the `PKI_DIR` variable since the `SALT_ETC_DIR` was + redefined. + * Distro Support Added: + * Linux Mint. Thanks Alex Van't Hof(alexvh)! + * Linaro. Version 1.5.5: - * Fixed a variable error in the new pre-seed feature. - * Fixed the destination path to where the pre-seed minions keys should be copied. - * Debian installations now use SaltStack's repository. - * Configuration files can now be passed as an URL to a compressed file. Thanks Geoff Garside! - * Distro Support Fixed: - * Debian's optional ZMQ3 support was fixed (libzmq3 has moved from experimental to - unstable). - * Ubuntu Lucid Daily PPA - * SmartOS no longer ignores $SALT_ETC_DIR. Matthieu Guegan! - * FreeBSD no longer ignores $SALT_ETC_DIR. Thanks Geoff Garside! - * FreeBSD does not try to install pkgng if pkg is installed. Thanks Geoff Garside! - * SunOS (Make use of XPG4 binaries on SunOS). Thanks Matthieu Guegan! - * openSUSE (Don't fail if only one of the repositories failed to update) - * Arch (Fixed the GPG issues for git installations) - * Distro Support Added: - * Gentoo. Thanks kaithar! + * Fixed a variable error in the new pre-seed feature. + * Fixed the destination path to where the pre-seed minions keys should be copied. + * Debian installations now use SaltStack's repository. + * Configuration files can now be passed as an URL to a compressed file. Thanks Geoff Garside! + * Distro Support Fixed: + * Debian's optional ZMQ3 support was fixed (libzmq3 has moved from experimental to + unstable). + * Ubuntu Lucid Daily PPA + * SmartOS no longer ignores $SALT_ETC_DIR. Matthieu Guegan! + * FreeBSD no longer ignores $SALT_ETC_DIR. Thanks Geoff Garside! + * FreeBSD does not try to install pkgng if pkg is installed. Thanks Geoff Garside! + * SunOS (Make use of XPG4 binaries on SunOS). Thanks Matthieu Guegan! + * openSUSE (Don't fail if only one of the repositories failed to update) + * Arch (Fixed the GPG issues for git installations) + * Distro Support Added: + * Gentoo. Thanks kaithar! Version 1.5.4: - * Fixed an issue we had when /proc/cpuinfo had more than one CPU. Detected on AMD CPUs. - * OpenSUSE 12.3 uses lsb_release. Fix the returned distro name "openSUSE project" to "openSUSE" - which the script handles. - * Added an custom move function which will only override if required and if we permit it. - * Implemented the necessary function to pre-seed minion keys on a salt master as an optional - argument. - * Distro Support Fixed: - * FreeBSD (Don't let the script fail if PACKAGESITE is not set) - * Debian Stable installations (the function search was not working as supposed) - * Distro Support Added: - * Ubuntu 13.04 (Was disabled because of a bad beta1. Fixed in beta2) + * Fixed an issue we had when /proc/cpuinfo had more than one CPU. Detected on AMD CPUs. + * OpenSUSE 12.3 uses lsb_release. Fix the returned distro name "openSUSE project" to "openSUSE" + which the script handles. + * Added an custom move function which will only override if required and if we permit it. + * Implemented the necessary function to pre-seed minion keys on a salt master as an optional + argument. + * Distro Support Fixed: + * FreeBSD (Don't let the script fail if PACKAGESITE is not set) + * Debian Stable installations (the function search was not working as supposed) + * Distro Support Added: + * Ubuntu 13.04 (Was disabled because of a bad beta1. Fixed in beta2) Version 1.5.3: - * Return 0 or 1 from functions - * Convert several pipes into a single awk call - * Fixed `/etc/os-release` parsing - * Fixed `config_salt()` - * Distro Support Fixed: - * EPEL-based installations (CentOS, Amazon Linux, RedHat) - * SuSE/OpenSUSE (problem running the script twice, ie, existing `devel_languages_python` - repository) - * SuSE 11 SP1 (pip based install and config trigger) - * Distro Support Added: - * Debian 7 (Only git installations at the moment) + * Return 0 or 1 from functions + * Convert several pipes into a single awk call + * Fixed `/etc/os-release` parsing + * Fixed `config_salt()` + * Distro Support Fixed: + * EPEL-based installations (CentOS, Amazon Linux, RedHat) + * SuSE/OpenSUSE (problem running the script twice, ie, existing `devel_languages_python` + repository) + * SuSE 11 SP1 (pip based install and config trigger) + * Distro Support Added: + * Debian 7 (Only git installations at the moment) Version 1.5.2: - * Fix issue with Travis testing (it installs it's own ZeroMQ3 lib - * Allow setting the debug output from an environment variable - * Fix an escape issue in the `printf` calls used in our echo calls - * Don't overwrite files (`config`, `init.d`, etc). Use a specific flag to force overwrites. - * Distro Support Fixed: - * Ubuntu daily installs. - * Distro Support Added: - * Trisquel 6.0 (Ubuntu 12.04) + * Fix issue with Travis testing (it installs it's own ZeroMQ3 lib + * Allow setting the debug output from an environment variable + * Fix an escape issue in the `printf` calls used in our echo calls + * Don't overwrite files (`config`, `init.d`, etc). Use a specific flag to force overwrites. + * Distro Support Fixed: + * Ubuntu daily installs. + * Distro Support Added: + * Trisquel 6.0 (Ubuntu 12.04) Version 1.5.1: - * Improved unittesting. - * Starting daemons. - * Make sure that daemons are really running. - * For the users to make the choice if installing from PIP (if required since there aren't system - pacakges). - * Fixed salt's git cloning when the salt git tree is already present on the system. - * Distro Support Fixed: - * Debian 6 - * Ubuntu 12.10 - * CentOS - * Distro Support Added: - * SuSE 11 SP1/11 SP2 - * OpenSUSE 12.x + * Improved unittesting. + * Starting daemons. + * Make sure that daemons are really running. + * For the users to make the choice if installing from PIP (if required since there aren't system + pacakges). + * Fixed salt's git cloning when the salt git tree is already present on the system. + * Distro Support Fixed: + * Debian 6 + * Ubuntu 12.10 + * CentOS + * Distro Support Added: + * SuSE 11 SP1/11 SP2 + * OpenSUSE 12.x Version 1.5: - * First stable version of the script - * Support for: - * Ubuntu 10.x/11.x/12.x - * Debian 6.x - * CentOS 5/6 - * Red Hat 5/6 - * Red Hat Enterprise 5/6 - * Fedora - * Arch - * SmartOS - * FreeBSD 9.0 + * First stable version of the script + * Support for: + * Ubuntu 10.x/11.x/12.x + * Debian 6.x + * CentOS 5/6 + * Red Hat 5/6 + * Red Hat Enterprise 5/6 + * Fedora + * Arch + * SmartOS + * FreeBSD 9.0 # Don't remove the line below. diff --git a/LICENSE b/LICENSE index 8a7d7a2..552a71d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Salt Bootstrap - Generic Salt Bootstrap Script - Copyright 2012-2016 Salt Stack (saltstack.org) + Copyright 2012-2017 Salt Stack (saltstack.org) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.rst b/README.rst index 6f1d10f..37307ad 100644 --- a/README.rst +++ b/README.rst @@ -13,16 +13,11 @@ the `Salt`_ installation process is handled by this shell script ``bootstrap-sal script runs through a series of checks to determine operating system type and version to then install the `Salt`_ binaries using the appropriate methods. -.. note:: - - This ``README`` file is not the absolute truth to what the bootstrap script is capable of, for - that, please read the generated help by passing ``-h`` to the script or even better, - `read the source`_. - -**In case you found a bug, please read** `I Found a Bug`_ **first before submitting a new issue.** -The examples there show how to get the latest development version of the bootstrap script. Chances -are high that your issue was already fixed. +**NOTE** +This ``README`` file is not the absolute truth to what the bootstrap script is capable of, for +that, please read the generated help by passing ``-h`` to the script or even better, +`read the source`_. Bootstrap ========= @@ -32,11 +27,17 @@ of the downloaded ``bootstrap-salt.sh`` file. The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is: +- 2017.08.17: ``909b4d35696b9867b34b22ef4b60edbc5a0e9f8d1ed8d05f922acb79a02e46e3`` - 2017.05.24: ``8c42c2e5ad3d4384ddc557da5c214ba3e40c056ca1b758d14a392c1364650e89`` If you're looking for the *one-liner* to install Salt, please scroll to the bottom and use the instructions for `Installing via an Insecure One-Liner`_. +Contributing +------------ + +The Salt Bootstrap project is open and encouraging to code contributions. Please review the +`Contributing Guidelines`_ for information on filing issues, fixing bugs, and submitting features. Examples -------- @@ -44,11 +45,11 @@ Examples The Salt Bootstrap script has a wide variety of options that can be passed as well as several ways of obtaining the bootstrap script itself. -.. note:: +**NOTE** - These examples below show how to bootstrap Salt directly from GitHub or other Git repository. - Run the script without any parameters to get latest stable Salt packages for your system from - `SaltStack's corporate repository`_. See first example in the `Install using wget`_ section. +These examples below show how to bootstrap Salt directly from GitHub or other Git repository. +Run the script without any parameters to get latest stable Salt packages for your system from +`SaltStack's corporate repository`_. See first example in the `Install using wget`_ section. Install using curl @@ -108,10 +109,10 @@ Installing a specific version from git using ``wget``: wget -O bootstrap-salt.sh https://bootstrap.saltstack.com sudo sh bootstrap-salt.sh -P git v2016.11.5 -.. note:: +**NOTE** - On the above example we added `-P` which will allow PIP packages to be installed if required but - it's not a necessary flag for Git based bootstraps. +On the above example we added `-P` which will allow PIP packages to be installed if required but +it's not a necessary flag for Git based bootstraps. Install using Python @@ -163,14 +164,14 @@ Or link them to the right place: Installing via an Insecure One-Liner ------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The following examples illustrate how to install Salt via a one-liner. -.. note:: +**NOTE** - Warning! These methods do not involve a verification step and assume that the delivered file is - trustworthy. +Warning! These methods do not involve a verification step and assume that the delivered file is +trustworthy. Any of the example above which use two-lines can be made to run in a single-line configuration with minor modifications. @@ -205,7 +206,7 @@ listed on the official supported operating systems document, the level of suppor Since Salt is written in Python, the packages available from `SaltStack's corporate repository`_ are CPU architecture independent and could be installed on any hardware supported by Linux kernel. However, SaltStack does package Salt's binary dependencies only for ``x86_64`` (``amd64``) and -``AArch32`` (``armhf``), which is limited for Debian/Raspbian 8 platforms. +``AArch32`` (``armhf``). The latter is available only for Debian/Raspbian 8 platforms. It is recommended to use ``git`` bootstrap mode as described above to install Salt on other architectures, such as ``x86`` (``i386``), ``AArch64`` (``arm64``) or ``ARM EABI`` (``armel``). @@ -216,12 +217,11 @@ You also may need to disable repository configuration and allow ``pip`` installa sudo sh bootstrap-salt.sh -r -P git develop -.. note:: +**NOTE** - Bootstrap may fail to install Salt on the cutting-edge version of distributions with frequent - release cycles such as: Amazon Linux, Fedora, openSUSE Tumbleweed, or Ubuntu non-LTS. Check the - versions from the list below. Also, see the `Unsupported Distro`_ and - `Adding Support for Other Operating Systems`_ sections. +Bootstrap may fail to install Salt on the cutting-edge version of distributions with frequent +release cycles such as: Amazon Linux, Fedora, openSUSE Tumbleweed, or Ubuntu non-LTS. Check the +versions from the list below. Also, see the `Unsupported Distro`_ section. Debian and derivatives @@ -229,9 +229,10 @@ Debian and derivatives - Cumulus Linux 2/3 - Debian GNU/Linux 7/8/9 +- Devuan GNU/Linux 1/2 - Linux Mint Debian Edition 1 (based on Debian 8) - Kali Linux 1.0 (based on Debian 7) -- Raspbian 8 (``armhf``) +- Raspbian 8 (``armhf`` packages) and 9 (using ``git`` installation mode only) Debian Best Effort Support: Testing Release ******************************************* @@ -252,7 +253,7 @@ Red Hat family - Amazon Linux 2012.3 and later - CentOS 6/7 - Cloud Linux 6/7 -- Fedora 24/25 +- Fedora 25/26 - Oracle Linux 6/7 - Red Hat Enterprise Linux 6/7 - Scientific Linux 6/7 @@ -261,10 +262,9 @@ Red Hat family SUSE family ~~~~~~~~~~~ -- openSUSE 12/13 -- openSUSE Leap 42 +- openSUSE Leap 42.2/42.3 - openSUSE Tumbleweed 2015 -- SUSE Linux Enterprise Server 11 SP1/11 SP2/11 SP3/12 +- SUSE Linux Enterprise Server 11 SP4, 12 SP2 Ubuntu and derivatives @@ -306,7 +306,6 @@ UNIX systems - SmartOS - Unsupported Distro ------------------ @@ -318,211 +317,14 @@ Please run the following commands and report their output when creating a ticket sudo find /etc/ -name \*-release -print -exec cat {} \; command lsb_release -a +For information on how to add support for a currently unsupported distro, please refer to the +`Contributing Guidelines`_. -Adding Support for Other Operating Systems ------------------------------------------- - -The following operating systems are detected, but Salt and its dependencies installation functions -are not developed yet: - -**BSD**: - -- NetBSD - -**Linux**: - -- Slackware - -**SunOS** - -- OpenIndiana -- Oracle Solaris -- OmniOS (Illumos) - - -In order to install Salt for a distribution you need to define: - -1. To Install Dependencies, which is required, one of: - -.. code:: bash - - install____deps - install_____deps - install___deps - install____deps - install___deps - install__deps - - -2. Optionally, define a minion configuration function, which will be called if the - ``-c`` option is passed. One of: - -.. code:: bash - - config____salt - config_____salt - config___salt - config____salt - config___salt - config__salt - config_salt [THIS ONE IS ALREADY DEFINED AS THE DEFAULT] - - -3. Optionally, define a Salt master pre-seed function, which will be called if the - ``-k`` (pre-seed master keys) option is passed. One of: - -.. code:: bash - - preseed____master - preseed_____master - preseed___master - preseed____master - preseed___master - preseed__master - preseed_master [THIS ONE IS ALREADY DEFINED AS THE DEFAULT] - - -4. To install salt, which, of course, is required, one of: - -.. code:: bash - - install___ - install____ - install__ - - -5. Optionally, define a post install function, one of: - -.. code:: bash - - install____post - install_____post - install___post - install____post - install___post - install__post - - -6. Optionally, define a start daemons function, one of: - -.. code:: bash - - install____restart_daemons - install_____restart_daemons - install___restart_daemons - install____restart_daemons - install___restart_daemons - install__restart_daemons - - -.. admonition:: Attention! - - The start daemons function should be able to restart any daemons which are running, or start if - they're not running. - - -7. Optionally, define a daemons running function, one of: - -.. code:: bash - - daemons_running___ - daemons_running____ - daemons_running__ - daemons_running___ - daemons_running__ - daemons_running_ - daemons_running [THIS ONE IS ALREADY DEFINED AS THE DEFAULT] - - -8. Optionally, check enabled Services: - -.. code:: bash - - install____check_services - install_____check_services - install___check_services - install____check_services - install___check_services - install__check_services - - ----- - -Below is an example for Ubuntu Oneiric (the example may not be up to date with the script): - -.. code:: bash - - install_ubuntu_11_10_deps() { - apt-get update - apt-get -y install python-software-properties - add-apt-repository -y 'deb http://us.archive.ubuntu.com/ubuntu/ oneiric universe' - add-apt-repository -y ppa:saltstack/salt - } - - install_ubuntu_11_10_post() { - add-apt-repository -y --remove 'deb http://us.archive.ubuntu.com/ubuntu/ oneiric universe' - } - - install_ubuntu_stable() { - apt-get -y install salt-minion - } - - install_ubuntu_restart_daemons() { - for fname in minion master syndic; do - - # Skip if not meant to be installed - [ $fname = "minion" ] && [ $INSTALL_MINION -eq $BS_FALSE ] && continue - [ $fname = "master" ] && [ $INSTALL_MASTER -eq $BS_FALSE ] && continue - [ $fname = "syndic" ] && [ $INSTALL_SYNDIC -eq $BS_FALSE ] && continue - - if [ -f /sbin/initctl ]; then - # We have upstart support - /sbin/initctl status salt-$fname > /dev/null 2>&1 - if [ $? -eq 0 ]; then - # upstart knows about this service, let's stop and start it. - # We could restart but earlier versions of the upstart script - # did not support restart, so, it's safer this way - /sbin/initctl stop salt-$fname > /dev/null 2>&1 - /sbin/initctl start salt-$fname > /dev/null 2>&1 - [ $? -eq 0 ] && continue - # We failed to start the service, let's test the SysV code bellow - fi - fi - /etc/init.d/salt-$fname stop > /dev/null 2>&1 - /etc/init.d/salt-$fname start - done - } - - -Since there is no ``install_ubuntu_11_10_stable()`` it defaults to the unspecified version script. - -The bootstrapping script must be plain POSIX ``sh`` only, **not** ``bash`` or another shell script. -By design the targeting for each operating system and version is very specific. Assumptions of -supported versions or variants should not be made, to avoid failed or broken installations. - - -I Found a Bug -============= - -If you found a possible problem, or bug, please try to bootstrap using the develop version. The -issue you are having might have already been fixed and it's just not yet included in the stable -version. - -.. code:: console - - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com/develop - sudo sh bootstrap-salt.sh git develop - - -Or the insecure one liner: - -.. code:: console - - curl -L https://bootstrap.saltstack.com/develop | sudo sh -s -- git develop - - -If after trying this and the problem still occurs, please `file an issue`_. +Testing +------- +There are a couple of ways to test the bootstrap script. Running the script on a full-fledged +VM is one way. Other options include using Vagrant or Docker. Testing in Vagrant ================== @@ -535,7 +337,6 @@ Ubuntu box. First, install Vagrant, then: vagrant up vagrant ssh - Running in Docker ================= @@ -562,15 +363,14 @@ And finally "enter" the running container and make Salt fully operational: Salt is ready and working in the Docker container with Minion authenticated on Master. -.. note:: - - The ``Dockerfile`` here inherits Ubuntu 14.04 public image with Upstart configured as init system. - Consider it as an example or starting point of how to make your own Docker images with suitable - Salt components, custom configurations and even `pre-accepted Minion key`_ already installed. +**NOTE** +The ``Dockerfile`` here inherits Ubuntu 14.04 public image with Upstart configured as init system. +Consider it as an example or starting point of how to make your own Docker images with suitable +Salt components, custom configurations and even `pre-accepted Minion key`_ already installed. +.. _Contributing Guidelines: https://github.com/saltstack/salt-bootstrap/blob/develop/CONTRIBUTING.md .. _Docker: https://www.docker.com/ -.. _`file an issue`: https://github.com/saltstack/salt-bootstrap/issues/new .. _`pre-accepted Minion key`: https://docs.saltstack.com/en/latest/topics/tutorials/preseed_key.html .. _`read the source`: https://github.com/saltstack/salt-bootstrap/blob/develop/bootstrap-salt.sh .. _`Salt`: https://saltstack.com/community/ diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ddda8e6..f1e86bb 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -18,7 +18,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2017.08.17" +__ScriptVersion="2017.12.13" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0" @@ -710,10 +710,24 @@ else SETUP_PY_INSTALL_ARGS="" fi +# Handle the insecure flags +if [ "$_INSECURE_DL" -eq $BS_TRUE ]; then + _CURL_ARGS="${_CURL_ARGS} --insecure" + _FETCH_ARGS="${_FETCH_ARGS} --no-verify-peer" + _GPG_ARGS="${_GPG_ARGS} --keyserver-options no-check-cert" + _WGET_ARGS="${_WGET_ARGS} --no-check-certificate" +else + _GPG_ARGS="${_GPG_ARGS} --keyserver-options ca-cert-file=/etc/ssl/certs/ca-certificates.crt" +fi + # Export the http_proxy configuration to our current environment if [ "${_HTTP_PROXY}" != "" ]; then - export http_proxy="$_HTTP_PROXY" - export https_proxy="$_HTTP_PROXY" + export http_proxy="${_HTTP_PROXY}" + export https_proxy="${_HTTP_PROXY}" + # Using "deprecated" option here, but that appears the only way to make it work. + # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818802 + # and https://bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/1625848 + _GPG_ARGS="${_GPG_ARGS},http-proxy=${_HTTP_PROXY}" fi # Work around for 'Docker + salt-bootstrap failure' https://github.com/saltstack/salt-bootstrap/issues/394 @@ -737,15 +751,6 @@ if [ -d "${_VIRTUALENV_DIR}" ]; then exit 1 fi -# Handle the insecure flags -if [ "$_INSECURE_DL" -eq $BS_TRUE ]; then - _CURL_ARGS="${_CURL_ARGS} --insecure" - _FETCH_ARGS="${_FETCH_ARGS} --no-verify-peer" - _GPG_ARGS="${_GPG_ARGS} --keyserver-options no-check-cert" - _WGET_ARGS="${_WGET_ARGS} --no-check-certificate" -else - _GPG_ARGS="${_GPG_ARGS} --keyserver-options ca-cert-file=/etc/ssl/certs/ca-certificates.crt" -fi #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __fetch_url @@ -915,7 +920,7 @@ __sort_release_files() { done # Now let's sort by know files importance, max important goes last in the max_prio list - max_prio="redhat-release centos-release oracle-release" + max_prio="redhat-release centos-release oracle-release fedora-release" for entry in $max_prio; do if [ "$(echo "${primary_release_files}" | grep "$entry")" != "" ]; then primary_release_files=$(echo "${primary_release_files}" | sed -e "s:\(.*\)\($entry\)\(.*\):\2 \1 \3:g") @@ -1001,7 +1006,6 @@ __gather_linux_system_info() { echo redhat-release lsb-release )"); do - [ -L "/etc/${rsource}" ] && continue # Don't follow symlinks [ ! -f "/etc/${rsource}" ] && continue # Does not exist n=$(echo "${rsource}" | sed -e 's/[_-]release$//' -e 's/[_-]version$//') @@ -1397,13 +1401,16 @@ __debian_derivatives_translation() { # If the file does not exist, return [ ! -f /etc/os-release ] && return - DEBIAN_DERIVATIVES="(cumulus_.+|kali|linuxmint|raspbian)" + DEBIAN_DERIVATIVES="(cumulus_.+|devuan|kali|linuxmint|raspbian)" # Mappings cumulus_2_debian_base="7.0" cumulus_3_debian_base="8.0" + devuan_1_debian_base="8.0" + devuan_2_debian_base="9.0" kali_1_debian_base="7.0" linuxmint_1_debian_base="8.0" raspbian_8_debian_base="8.0" + raspbian_9_debian_base="9.0" # Translate Debian derivatives to their base Debian version match=$(echo "$DISTRO_NAME_L" | egrep ${DEBIAN_DERIVATIVES}) @@ -1414,6 +1421,10 @@ __debian_derivatives_translation() { _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') _debian_derivative="cumulus" ;; + devuan) + _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') + _debian_derivative="devuan" + ;; kali) _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') _debian_derivative="kali" @@ -1428,12 +1439,13 @@ __debian_derivatives_translation() { ;; esac - _debian_version=$(eval echo "\$${_debian_derivative}_${_major}_debian_base") + _debian_version=$(eval echo "\$${_debian_derivative}_${_major}_debian_base" 2>/dev/null) if [ "$_debian_version" != "" ]; then echodebug "Detected Debian $_debian_version derivative" DISTRO_NAME_L="debian" DISTRO_VERSION="$_debian_version" + DISTRO_MAJOR_VERSION="$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g')" fi fi } @@ -1489,8 +1501,8 @@ __check_end_of_life_versions() { # = 14.10 # = 15.04, 15.10 if [ "$DISTRO_MAJOR_VERSION" -lt 14 ] || \ - [ "$DISTRO_MAJOR_VERSION" -eq 15 ] || \ - ([ "$DISTRO_MAJOR_VERSION" -lt 16 ] && [ "$DISTRO_MINOR_VERSION" -eq 10 ]); then + [ "$DISTRO_MAJOR_VERSION" -eq 15 ] || \ + ([ "$DISTRO_MAJOR_VERSION" -lt 16 ] && [ "$DISTRO_MINOR_VERSION" -eq 10 ]); then echoerror "End of life distributions are not supported." echoerror "Please consider upgrading to the next stable. See:" echoerror " https://wiki.ubuntu.com/Releases" @@ -1501,8 +1513,10 @@ __check_end_of_life_versions() { opensuse) # openSUSE versions not supported # - # <= 12.1 - if ([ "$DISTRO_MAJOR_VERSION" -eq 12 ] && [ "$DISTRO_MINOR_VERSION" -eq 1 ]) || [ "$DISTRO_MAJOR_VERSION" -lt 12 ]; then + # <= 13.X + # <= 42.1 + if [ "$DISTRO_MAJOR_VERSION" -le 13 ] || \ + ([ "$DISTRO_MAJOR_VERSION" -eq 42 ] && [ "$DISTRO_MINOR_VERSION" -le 1 ]); then echoerror "End of life distributions are not supported." echoerror "Please consider upgrading to the next stable. See:" echoerror " http://en.opensuse.org/Lifetime" @@ -1513,21 +1527,25 @@ __check_end_of_life_versions() { suse) # SuSE versions not supported # - # < 11 SP2 + # < 11 SP4 + # < 12 SP2 SUSE_PATCHLEVEL=$(awk '/PATCHLEVEL/ {print $3}' /etc/SuSE-release ) if [ "${SUSE_PATCHLEVEL}" = "" ]; then SUSE_PATCHLEVEL="00" fi - if ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$SUSE_PATCHLEVEL" -lt 02 ]) || [ "$DISTRO_MAJOR_VERSION" -lt 11 ]; then - echoerror "Versions lower than SuSE 11 SP2 are not supported." + if [ "$DISTRO_MAJOR_VERSION" -lt 11 ] || \ + ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$SUSE_PATCHLEVEL" -lt 04 ]) || \ + ([ "$DISTRO_MAJOR_VERSION" -eq 12 ] && [ "$SUSE_PATCHLEVEL" -lt 02 ]); then + echoerror "Versions lower than SuSE 11 SP4 or 12 SP2 are not supported." echoerror "Please consider upgrading to the next stable" + echoerror " https://www.suse.com/lifecycle/" exit 1 fi ;; fedora) - # Fedora lower than 24 are no longer supported - if [ "$DISTRO_MAJOR_VERSION" -lt 24 ]; then + # Fedora lower than 25 are no longer supported + if [ "$DISTRO_MAJOR_VERSION" -lt 25 ]; then echoerror "End of life distributions are not supported." echoerror "Please consider upgrading to the next stable. See:" echoerror " https://fedoraproject.org/wiki/Releases" @@ -1729,18 +1747,6 @@ if ([ "${DISTRO_NAME_L}" != "ubuntu" ] && [ $_PIP_ALL -eq $BS_TRUE ]); then exit 1 fi -# Starting from Debian 9 and Ubuntu 16.10, gnupg-curl has been renamed to gnupg1-curl. -GNUPG_CURL="gnupg-curl" -if [ "$DISTRO_NAME_L" = "debian" ]; then - if [ "$DISTRO_MAJOR_VERSION" -gt 8 ]; then - GNUPG_CURL="gnupg1-curl" - fi -elif [ "$DISTRO_NAME_L" = "ubuntu" ]; then - if [ "${DISTRO_VERSION}" = "16.10" ] || [ "$DISTRO_MAJOR_VERSION" -gt 16 ]; then - GNUPG_CURL="gnupg1-curl" - fi -fi - #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __function_defined @@ -1786,8 +1792,6 @@ __apt_get_upgrade_noinput() { __apt_key_fetch() { url=$1 - __apt_get_install_noinput ${GNUPG_CURL} || return 1 - # shellcheck disable=SC2086 apt-key adv ${_GPG_ARGS} --fetch-keys "$url"; return $? } # ---------- end of function __apt_key_fetch ---------- @@ -2539,7 +2543,6 @@ __enable_universe_repository() { } __install_saltstack_ubuntu_repository() { - # Workaround for latest non-LTS ubuntu if [ "$DISTRO_VERSION" = "16.10" ] || [ "$DISTRO_MAJOR_VERSION" -gt 16 ]; then echowarn "Non-LTS Ubuntu detected, but stable packages requested. Trying packages from latest LTS release. You may experience problems." @@ -2550,15 +2553,27 @@ __install_saltstack_ubuntu_repository() { UBUNTU_CODENAME=$DISTRO_CODENAME fi - # SaltStack's stable Ubuntu repository: - SALTSTACK_UBUNTU_URL="${HTTP_VAL}://${_REPO_URL}/apt/ubuntu/${UBUNTU_VERSION}/${__REPO_ARCH}/${STABLE_REV}" - echo "deb $SALTSTACK_UBUNTU_URL $UBUNTU_CODENAME main" > /etc/apt/sources.list.d/saltstack.list + __PACKAGES='' + + # Install downloader backend for GPG keys fetching + if [ "$DISTRO_VERSION" = "16.10" ] || [ "$DISTRO_MAJOR_VERSION" -gt 16 ]; then + __PACKAGES="${__PACKAGES} gnupg2 dirmngr" + else + __PACKAGES="${__PACKAGES} gnupg-curl" + fi # Make sure https transport is available if [ "$HTTP_VAL" = "https" ] ; then - __apt_get_install_noinput apt-transport-https ca-certificates || return 1 + __PACKAGES="${__PACKAGES} apt-transport-https ca-certificates" fi + # shellcheck disable=SC2086,SC2090 + __apt_get_install_noinput ${__PACKAGES} || return 1 + + # SaltStack's stable Ubuntu repository: + SALTSTACK_UBUNTU_URL="${HTTP_VAL}://${_REPO_URL}/apt/ubuntu/${UBUNTU_VERSION}/${__REPO_ARCH}/${STABLE_REV}" + echo "deb $SALTSTACK_UBUNTU_URL $UBUNTU_CODENAME main" > /etc/apt/sources.list.d/saltstack.list + __apt_key_fetch "$SALTSTACK_UBUNTU_URL/SALTSTACK-GPG-KEY.pub" || return 1 apt-get update @@ -2640,9 +2655,8 @@ install_ubuntu_stable_deps() { __apt_get_upgrade_noinput || return 1 fi - __check_dpkg_architecture || return 1 - if [ "$_DISABLE_REPOS" -eq "$BS_FALSE" ] || [ "$_CUSTOM_REPO_URL" != "null" ]; then + __check_dpkg_architecture || return 1 __install_saltstack_ubuntu_repository || return 1 fi @@ -2936,18 +2950,30 @@ __install_saltstack_debian_repository() { DEBIAN_CODENAME="$DISTRO_CODENAME" fi + __PACKAGES='' + + # Install downloader backend for GPG keys fetching + if [ "$DISTRO_MAJOR_VERSION" -ge 9 ]; then + __PACKAGES="${__PACKAGES} gnupg2 dirmngr" + else + __PACKAGES="${__PACKAGES} gnupg-curl" + fi + + # Make sure https transport is available + if [ "$HTTP_VAL" = "https" ] ; then + __PACKAGES="${__PACKAGES} apt-transport-https ca-certificates" + fi + + # shellcheck disable=SC2086,SC2090 + __apt_get_install_noinput ${__PACKAGES} || return 1 + # amd64 is just a part of repository URI, 32-bit pkgs are hosted under the same location SALTSTACK_DEBIAN_URL="${HTTP_VAL}://${_REPO_URL}/apt/debian/${DEBIAN_RELEASE}/${__REPO_ARCH}/${STABLE_REV}" echo "deb $SALTSTACK_DEBIAN_URL $DEBIAN_CODENAME main" > "/etc/apt/sources.list.d/saltstack.list" - if [ "$HTTP_VAL" = "https" ] ; then - __apt_get_install_noinput apt-transport-https ca-certificates || return 1 - fi - __apt_key_fetch "$SALTSTACK_DEBIAN_URL/SALTSTACK-GPG-KEY.pub" || return 1 apt-get update - } install_debian_deps() { @@ -2970,23 +2996,17 @@ install_debian_deps() { __apt_get_upgrade_noinput || return 1 fi - __check_dpkg_architecture || return 1 - # Additionally install procps and pciutils which allows for Docker bootstraps. See 366#issuecomment-39666813 __PACKAGES='procps pciutils' # YAML module is used for generating custom master/minion configs __PACKAGES="${__PACKAGES} python-yaml" - # Debian 9 needs the dirmgr package in order to import the GPG key later - if [ "$DISTRO_MAJOR_VERSION" -ge 9 ]; then - __PACKAGES="${__PACKAGES} dirmngr" - fi - # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || return 1 if [ "$_DISABLE_REPOS" -eq "$BS_FALSE" ] || [ "$_CUSTOM_REPO_URL" != "null" ]; then + __check_dpkg_architecture || return 1 __install_saltstack_debian_repository || return 1 fi @@ -3318,7 +3338,13 @@ install_fedora_deps() { __install_saltstack_copr_salt_repository || return 1 fi - __PACKAGES="yum-utils PyYAML libyaml python-crypto python-jinja2 python-zmq python2-msgpack python2-requests" + __PACKAGES="PyYAML libyaml python-crypto python-jinja2 python-zmq python2-msgpack python2-requests" + + if [ "$DISTRO_MAJOR_VERSION" -lt 26 ]; then + __PACKAGES="${__PACKAGES} yum-utils" + else + __PACKAGES="${__PACKAGES} dnf-utils" + fi # shellcheck disable=SC2086 dnf install -y ${__PACKAGES} || return 1 @@ -4404,7 +4430,7 @@ install_amazon_linux_ami_deps() { repo_rev="$(echo "${STABLE_REV}" | sed 's|.*\/||g')" if echo "$repo_rev" | egrep -q '^(latest|2016\.11)$' || \ - ( echo "$repo_rev" | egrep -q '^[0-9]+$' && [ "$(echo "$repo_rev" | cut -c1-4)" -gt 2016 ] ); then + [ "$(echo "$repo_rev" | cut -c1-4)" -gt 2016 ]; then _USEAWS=$BS_TRUE pkg_append="python27" fi @@ -5075,7 +5101,7 @@ install_freebsd_restart_daemons() { __choose_openbsd_mirror() { OPENBSD_REPO='' MINTIME='' - MIRROR_LIST=$(ftp -w 15 -Vao - 'http://ftp.openbsd.org/cgi-bin/ftplist.cgi?dbversion=1' | awk '/^http/ {print $1}') + MIRROR_LIST=$(ftp -w 15 -Vao - 'https://ftp.openbsd.org/cgi-bin/ftplist.cgi?dbversion=1' | awk '/^http/ {print $1}') for MIRROR in $MIRROR_LIST; do MIRROR_HOST=$(echo "$MIRROR" | sed -e 's|.*//||' -e 's|+*/.*$||') @@ -5096,10 +5122,12 @@ __choose_openbsd_mirror() { } install_openbsd_deps() { - __choose_openbsd_mirror || return 1 - echoinfo "setting package repository to $OPENBSD_REPO with ping time of $MINTIME" - [ -n "$OPENBSD_REPO" ] || return 1 - echo "${OPENBSD_REPO}" >>/etc/installurl || return 1 + if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then + __choose_openbsd_mirror || return 1 + echoinfo "setting package repository to $OPENBSD_REPO with ping time of $MINTIME" + [ -n "$OPENBSD_REPO" ] || return 1 + echo "${OPENBSD_REPO}" >>/etc/installurl || return 1 + fi if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" @@ -5383,9 +5411,30 @@ install_smartos_restart_daemons() { # __ZYPPER_REQUIRES_REPLACE_FILES=-1 +__set_suse_pkg_repo() { + + # Set distro repo variable + if [ "${DISTRO_MAJOR_VERSION}" -gt 2015 ]; then + DISTRO_REPO="openSUSE_Tumbleweed" + elif [ "${DISTRO_MAJOR_VERSION}" -ge 42 ]; then + DISTRO_REPO="openSUSE_Leap_${DISTRO_MAJOR_VERSION}.${DISTRO_MINOR_VERSION}" + elif [ "${DISTRO_MAJOR_VERSION}" -lt 42 ]; then + DISTRO_REPO="SLE_${DISTRO_MAJOR_VERSION}_SP${SUSE_PATCHLEVEL}" + fi + + if [ "$_DOWNSTREAM_PKG_REPO" -eq $BS_TRUE ]; then + suse_pkg_url_base="https://download.opensuse.org/repositories/systemsmanagement:/saltstack" + suse_pkg_url_path="${DISTRO_REPO}/systemsmanagement:saltstack.repo" + else + suse_pkg_url_base="${HTTP_VAL}://repo.saltstack.com/opensuse" + suse_pkg_url_path="${DISTRO_REPO}/systemsmanagement:saltstack:products.repo" + fi + SUSE_PKG_URL="$suse_pkg_url_base/$suse_pkg_url_path" +} + __check_and_refresh_suse_pkg_repo() { # Check to see if systemsmanagement_saltstack exists - __zypper repos | grep systemsmanagement_saltstack >/dev/null 2>&1 + __zypper repos | grep -q systemsmanagement_saltstack if [ $? -eq 1 ]; then # zypper does not yet know anything about systemsmanagement_saltstack @@ -5393,16 +5442,6 @@ __check_and_refresh_suse_pkg_repo() { fi } -__set_suse_pkg_repo() { - suse_pkg_url_path="${DISTRO_REPO}/systemsmanagement:saltstack.repo" - if [ "$_DOWNSTREAM_PKG_REPO" -eq $BS_TRUE ]; then - suse_pkg_url_base="http://download.opensuse.org/repositories/systemsmanagement:/saltstack" - else - suse_pkg_url_base="${HTTP_VAL}://repo.saltstack.com/opensuse" - fi - SUSE_PKG_URL="$suse_pkg_url_base/$suse_pkg_url_path" -} - __version_lte() { if ! __check_command_exists python; then zypper zypper --non-interactive install --replacefiles --auto-agree-with-licenses python || \ @@ -5435,14 +5474,6 @@ __zypper_install() { } install_opensuse_stable_deps() { - if [ "${DISTRO_MAJOR_VERSION}" -gt 2015 ]; then - DISTRO_REPO="openSUSE_Tumbleweed" - elif [ "${DISTRO_MAJOR_VERSION}" -ge 42 ]; then - DISTRO_REPO="openSUSE_Leap_${DISTRO_MAJOR_VERSION}.${DISTRO_MINOR_VERSION}" - elif [ "${DISTRO_MAJOR_VERSION}" -lt 42 ]; then - DISTRO_REPO="openSUSE_${DISTRO_MAJOR_VERSION}.${DISTRO_MINOR_VERSION}" - fi - if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then # Is the repository already known __set_suse_pkg_repo @@ -5466,25 +5497,14 @@ install_opensuse_stable_deps() { __zypper --gpg-auto-import-keys update || return 1 fi + # YAML module is used for generating custom master/minion configs + # requests is still used by many salt modules # Salt needs python-zypp installed in order to use the zypper module - __PACKAGES="python-zypp" - __PACKAGES="${__PACKAGES} python python-Jinja2 python-M2Crypto python-PyYAML python-requests" - __PACKAGES="${__PACKAGES} python-msgpack-python python-pycrypto python-pyzmq python-xml" - - if [ "$DISTRO_MAJOR_VERSION" -lt 13 ]; then - __PACKAGES="${__PACKAGES} libzmq3" - elif [ "$DISTRO_MAJOR_VERSION" -eq 13 ]; then - __PACKAGES="${__PACKAGES} libzmq3" - elif [ "$DISTRO_MAJOR_VERSION" -gt 13 ]; then - __PACKAGES="${__PACKAGES} libzmq5" - fi + __PACKAGES="python-PyYAML python-requests python-zypp" # shellcheck disable=SC2086 __zypper_install ${__PACKAGES} || return 1 - # Fix for OpenSUSE 13.2 and 2015.8 - gcc should not be required. Work around until package is fixed by SuSE - _EXTRA_PACKAGES="${_EXTRA_PACKAGES} gcc python-devel libgit2-devel" - if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" # shellcheck disable=SC2086 @@ -5509,7 +5529,7 @@ install_opensuse_git_deps() { __git_clone_and_checkout || return 1 - __PACKAGES="" + __PACKAGES="libzmq5 python-Jinja2 python-msgpack-python python-pycrypto python-pyzmq python-xml" if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then # We're on the develop branch, install whichever tornado is on the requirements file @@ -5678,18 +5698,6 @@ install_opensuse_check_services() { # install_suse_12_stable_deps() { - SUSE_PATCHLEVEL=$(awk '/PATCHLEVEL/ {print $3}' /etc/SuSE-release ) - - if [ "${SUSE_PATCHLEVEL}" != "" ]; then - DISTRO_PATCHLEVEL="_SP${SUSE_PATCHLEVEL}" - fi - DISTRO_REPO="SLE_${DISTRO_MAJOR_VERSION}${DISTRO_PATCHLEVEL}" - - # SLES 12 repo name does not use a patch level so PATCHLEVEL will need to be updated with SP1 - #DISTRO_REPO="SLE_${DISTRO_MAJOR_VERSION}${DISTRO_PATCHLEVEL}" - - DISTRO_REPO="SLE_${DISTRO_MAJOR_VERSION}" - if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then # Is the repository already known __set_suse_pkg_repo @@ -5703,18 +5711,10 @@ install_suse_12_stable_deps() { __zypper --gpg-auto-import-keys update || return 1 fi + # YAML module is used for generating custom master/minion configs + # requests is still used by many salt modules # Salt needs python-zypp installed in order to use the zypper module - __PACKAGES="python-zypp" - # shellcheck disable=SC2089 - __PACKAGES="${__PACKAGES} libzmq5 python python-Jinja2 python-msgpack-python" - __PACKAGES="${__PACKAGES} python-pycrypto python-pyzmq python-pip python-xml python-requests" - - if [ "$SUSE_PATCHLEVEL" -eq 1 ]; then - __check_pip_allowed - echowarn "PyYaml will be installed using pip" - else - __PACKAGES="${__PACKAGES} python-PyYAML" - fi + __PACKAGES="python-PyYAML python-requests python-zypp" if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then __PACKAGES="${__PACKAGES} python-apache-libcloud" @@ -5723,41 +5723,6 @@ install_suse_12_stable_deps() { # shellcheck disable=SC2086,SC2090 __zypper_install ${__PACKAGES} || return 1 - if [ "$SUSE_PATCHLEVEL" -eq 1 ]; then - # There's no python-PyYaml in SP1, let's install it using pip - pip install PyYaml || return 1 - fi - - # PIP based installs need to copy configuration files "by hand". - if [ "$SUSE_PATCHLEVEL" -eq 1 ]; then - # Let's trigger config_salt() - if [ "$_TEMP_CONFIG_DIR" = "null" ]; then - # Let's set the configuration directory to /tmp - _TEMP_CONFIG_DIR="/tmp" - CONFIG_SALT_FUNC="config_salt" - - for fname in api master minion syndic; do - # Skip salt-api since there is no example config for it in the Salt git repo - [ $fname = "api" ] && continue - - # Skip if not meant to be installed - [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue - [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue - - # Syndic uses the same configuration file as the master - [ $fname = "syndic" ] && fname=master - - # Let's download, since they were not provided, the default configuration files - if [ ! -f "$_SALT_ETC_DIR/$fname" ] && [ ! -f "$_TEMP_CONFIG_DIR/$fname" ]; then - # shellcheck disable=SC2086 - curl $_CURL_ARGS -s -o "$_TEMP_CONFIG_DIR/$fname" -L \ - "https://raw.githubusercontent.com/saltstack/salt/develop/conf/$fname" || return 1 - fi - done - fi - fi - if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" # shellcheck disable=SC2086 @@ -5777,6 +5742,9 @@ install_suse_12_git_deps() { __git_clone_and_checkout || return 1 __PACKAGES="" + # shellcheck disable=SC2089 + __PACKAGES="${__PACKAGES} libzmq3 python-Jinja2 python-msgpack-python python-pycrypto" + __PACKAGES="${__PACKAGES} python-pyzmq python-xml" if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then # We're on the develop branch, install whichever tornado is on the requirements file @@ -5803,14 +5771,7 @@ install_suse_12_git_deps() { } install_suse_12_stable() { - if [ "$SUSE_PATCHLEVEL" -gt 1 ]; then - install_opensuse_stable || return 1 - else - # USE_SETUPTOOLS=1 To work around - # error: option --single-version-externally-managed not recognized - USE_SETUPTOOLS=1 pip install salt || return 1 - fi - + install_opensuse_stable || return 1 return 0 } @@ -5820,34 +5781,7 @@ install_suse_12_git() { } install_suse_12_stable_post() { - if [ "$SUSE_PATCHLEVEL" -gt 1 ]; then - install_opensuse_stable_post || return 1 - else - for fname in api master minion syndic; do - # Skip if not meant to be installed - [ $fname = "api" ] && \ - ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || ! __check_command_exists "salt-${fname}") && continue - [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue - [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue - - if [ -f /bin/systemctl ]; then - # shellcheck disable=SC2086 - curl $_CURL_ARGS -L "https://github.com/saltstack/salt/raw/develop/pkg/salt-$fname.service" \ - -o "/usr/lib/systemd/system/salt-$fname.service" || return 1 - fi - - # Skip salt-api since the service should be opt-in and not necessarily started on boot - [ $fname = "api" ] && continue - - if [ -f /bin/systemctl ]; then - systemctl is-enabled salt-$fname.service || (systemctl preset salt-$fname.service && systemctl enable salt-$fname.service) - sleep 0.1 - systemctl daemon-reload - fi - done - fi - + install_opensuse_stable_post || return 1 return 0 } @@ -5872,16 +5806,6 @@ install_suse_12_restart_daemons() { # install_suse_11_stable_deps() { - SUSE_PATCHLEVEL=$(awk '/PATCHLEVEL/ {print $3}' /etc/SuSE-release ) - if [ "${SUSE_PATCHLEVEL}" != "" ]; then - if [ "${SUSE_PATCHLEVEL}" != "4" ]; then - echowarn "Salt packages for SLE 11 are only build for SP4." - echowarn "Attempting to install SP4 packages on SP${SUSE_PATCHLEVEL}." - fi - DISTRO_PATCHLEVEL="_SP4" - fi - DISTRO_REPO="SLE_${DISTRO_MAJOR_VERSION}${DISTRO_PATCHLEVEL}" - if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then # Is the repository already known __set_suse_pkg_repo @@ -5895,57 +5819,12 @@ install_suse_11_stable_deps() { __zypper --gpg-auto-import-keys update || return 1 fi - # Salt needs python-zypp installed in order to use the zypper module - __PACKAGES="python-zypp" - # shellcheck disable=SC2089 - __PACKAGES="${__PACKAGES} libzmq5 python python-Jinja2 python-msgpack-python" - __PACKAGES="${__PACKAGES} python-pycrypto python-pyzmq python-pip python-xml python-requests" - - if [ "$SUSE_PATCHLEVEL" -eq 1 ]; then - __check_pip_allowed - echowarn "PyYaml will be installed using pip" - else - __PACKAGES="${__PACKAGES} python-PyYAML" - fi + # YAML module is used for generating custom master/minion configs + __PACKAGES="python-PyYAML" # shellcheck disable=SC2086,SC2090 __zypper_install ${__PACKAGES} || return 1 - if [ "$SUSE_PATCHLEVEL" -eq 1 ]; then - # There's no python-PyYaml in SP1, let's install it using pip - pip install PyYaml || return 1 - fi - - # PIP based installs need to copy configuration files "by hand". - if [ "$SUSE_PATCHLEVEL" -eq 1 ]; then - # Let's trigger config_salt() - if [ "$_TEMP_CONFIG_DIR" = "null" ]; then - # Let's set the configuration directory to /tmp - _TEMP_CONFIG_DIR="/tmp" - CONFIG_SALT_FUNC="config_salt" - - for fname in api master minion syndic; do - # Skip salt-api since there is no example config for it in the Salt git repo - [ $fname = "api" ] && continue - - # Skip if not meant to be installed - [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue - [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue - - # Syndic uses the same configuration file as the master - [ $fname = "syndic" ] && fname=master - - # Let's download, since they were not provided, the default configuration files - if [ ! -f "$_SALT_ETC_DIR/$fname" ] && [ ! -f "$_TEMP_CONFIG_DIR/$fname" ]; then - # shellcheck disable=SC2086 - curl $_CURL_ARGS -s -o "$_TEMP_CONFIG_DIR/$fname" -L \ - "https://raw.githubusercontent.com/saltstack/salt/develop/conf/$fname" || return 1 - fi - done - fi - fi - if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" # shellcheck disable=SC2086 @@ -5965,6 +5844,9 @@ install_suse_11_git_deps() { __git_clone_and_checkout || return 1 __PACKAGES="" + # shellcheck disable=SC2089 + __PACKAGES="${__PACKAGES} libzmq4 python-Jinja2 python-msgpack-python python-pycrypto" + __PACKAGES="${__PACKAGES} python-pyzmq python-xml python-zypp" if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then # We're on the develop branch, install whichever tornado is on the requirements file @@ -5991,13 +5873,7 @@ install_suse_11_git_deps() { } install_suse_11_stable() { - if [ "$SUSE_PATCHLEVEL" -gt 1 ]; then - install_opensuse_stable || return 1 - else - # USE_SETUPTOOLS=1 To work around - # error: option --single-version-externally-managed not recognized - USE_SETUPTOOLS=1 pip install salt || return 1 - fi + install_opensuse_stable || return 1 return 0 } @@ -6007,32 +5883,7 @@ install_suse_11_git() { } install_suse_11_stable_post() { - if [ "$SUSE_PATCHLEVEL" -gt 1 ]; then - install_opensuse_stable_post || return 1 - else - for fname in api master minion syndic; do - # Skip if not meant to be installed - [ $fname = "api" ] && \ - ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || ! __check_command_exists "salt-${fname}") && continue - [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue - [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue - - if [ -f /bin/systemctl ]; then - # shellcheck disable=SC2086 - curl $_CURL_ARGS -L "https://github.com/saltstack/salt/raw/develop/pkg/salt-$fname.service" \ - -o "/lib/systemd/system/salt-$fname.service" || return 1 - continue - fi - - # shellcheck disable=SC2086 - curl $_CURL_ARGS -L "https://github.com/saltstack/salt/raw/develop/pkg/rpm/salt-$fname" \ - -o "/etc/init.d/salt-$fname" || return 1 - chmod +x "/etc/init.d/salt-$fname" - - done - fi - + install_opensuse_stable_post || return 1 return 0 } @@ -6050,6 +5901,8 @@ install_suse_11_restart_daemons() { # # End of SUSE Enterprise 11 # +####################################################################################################################### + ####################################################################################################################### # # SUSE Enterprise General Functions @@ -6078,7 +5931,7 @@ install_suse_check_services() { } # -# SUSE Enterprise General Functions +# End of SUSE Enterprise General Functions # ####################################################################################################################### @@ -6698,7 +6551,7 @@ for FUNC_NAME in $(__strip_duplicates "$CHECK_SERVICES_FUNC_NAMES"); do done echodebug "CHECK_SERVICES_FUNC=${CHECK_SERVICES_FUNC}" -if [ "$DEPS_INSTALL_FUNC" = "null" ]; then +if [ ${_NO_DEPS} -eq $BS_FALSE ] && [ "$DEPS_INSTALL_FUNC" = "null" ]; then echoerror "No dependencies installation function found. Exiting..." exit 1 fi @@ -6709,7 +6562,7 @@ if [ "$INSTALL_FUNC" = "null" ]; then fi # Install dependencies -if [ "$_CONFIG_ONLY" -eq $BS_FALSE ]; then +if [ ${_NO_DEPS} -eq $BS_FALSE ] && [ $_CONFIG_ONLY -eq $BS_FALSE ]; then # Only execute function is not in config mode only echoinfo "Running ${DEPS_INSTALL_FUNC}()" $DEPS_INSTALL_FUNC @@ -6725,7 +6578,7 @@ if [ "$_CUSTOM_MASTER_CONFIG" != "null" ] || [ "$_CUSTOM_MINION_CONFIG" != "null _TEMP_CONFIG_DIR="$_SALT_ETC_DIR" fi - if [ "$_CONFIG_ONLY" -eq $BS_TRUE ]; then + if [ ${_NO_DEPS} -eq $BS_FALSE ] && [ $_CONFIG_ONLY -eq $BS_TRUE ]; then # Execute function to satisfy dependencies for configuration step echoinfo "Running ${DEPS_INSTALL_FUNC}()" $DEPS_INSTALL_FUNC