08133114a1
- Add possibility to generate _version.py at the build time for raw builds: https://github.com/saltstack/salt/pull/43955 - Added: * enable-with-salt-version-parameter-for-setup.py-scri.patch - Update to 2017.7.2 See https://docs.saltstack.com/en/develop/topics/releases/2017.7.2.html for full changelog - Fix for CVE-2017-14695 (bsc#1062462) - Fix for CVE-2017-14696 (bsc#1062464) - Fix salt target-type field returns "String" for existing jids but an empty "Array" for non existing jids. (issue #1711) - Added: * bugfix-always-return-a-string-list-on-unknown-job-ta.patch - Fixed minion resource exhaustion when many functions are being executed in parallel (bsc#1059758) - Added: * introduce-process_count_max-minion-configuration-par.patch * multiprocessing-minion-option-documentation-fixes.patch - Remove 'TasksTask' attribute from salt-master.service in older versions of systemd (bsc#985112) - Provide custom SUSE salt-master.service file. - Fix wrong version reported by Salt (bsc#1061407) - list_pkgs: add parameter for returned attribute selection (bsc#1052264) - Adding the leftover for zypper and yum list_pkgs functionality. - Use $HOME to get the user home directory instead using '~' char (bsc#1042749) OBS-URL: https://build.opensuse.org/request/show/533951 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=96
77 lines
3.2 KiB
Diff
77 lines
3.2 KiB
Diff
From 1949261a504fd01e057b41126d78f142f4977204 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
|
|
<psuarezhernandez@suse.com>
|
|
Date: Fri, 6 Oct 2017 17:12:15 +0100
|
|
Subject: [PATCH] Enable '--with-salt-version' parameter for setup.py
|
|
script
|
|
|
|
---
|
|
setup.py | 20 ++++++++++++++++++--
|
|
1 file changed, 18 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/setup.py b/setup.py
|
|
index effdc2f230..519f753401 100755
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -183,17 +183,22 @@ class WriteSaltVersion(Command):
|
|
'''
|
|
|
|
def run(self):
|
|
- if not os.path.exists(SALT_VERSION_HARDCODED):
|
|
+ if not os.path.exists(SALT_VERSION_HARDCODED) or self.distribution.with_salt_version:
|
|
# Write the version file
|
|
if getattr(self.distribution, 'salt_version_hardcoded_path', None) is None:
|
|
print('This command is not meant to be called on it\'s own')
|
|
exit(1)
|
|
|
|
+ if not self.distribution.with_salt_version:
|
|
+ salt_version = __saltstack_version__
|
|
+ else:
|
|
+ salt_version = SaltStackVersion.parse(self.distribution.with_salt_version)
|
|
+
|
|
# pylint: disable=E0602
|
|
open(self.distribution.salt_version_hardcoded_path, 'w').write(
|
|
INSTALL_VERSION_TEMPLATE.format(
|
|
date=DATE,
|
|
- full_version_info=__saltstack_version__.full_info
|
|
+ full_version_info=salt_version.full_info
|
|
)
|
|
)
|
|
# pylint: enable=E0602
|
|
@@ -731,6 +736,13 @@ class Build(build):
|
|
def run(self):
|
|
# Run build.run function
|
|
build.run(self)
|
|
+ if getattr(self.distribution, 'with_salt_version', False):
|
|
+ # Write the hardcoded salt version module salt/_version.py
|
|
+ self.distribution.salt_version_hardcoded_path = os.path.join(
|
|
+ self.build_lib, 'salt', '_version.py'
|
|
+ )
|
|
+ self.run_command('write_salt_version')
|
|
+
|
|
if getattr(self.distribution, 'running_salt_install', False):
|
|
# If our install attribute is present and set to True, we'll go
|
|
# ahead and write our install time python modules.
|
|
@@ -839,6 +851,7 @@ class SaltDistribution(distutils.dist.Distribution):
|
|
('ssh-packaging', None, 'Run in SSH packaging mode'),
|
|
('salt-transport=', None, 'The transport to prepare salt for. Choices are \'zeromq\' '
|
|
'\'raet\' or \'both\'. Defaults to \'zeromq\'', 'zeromq')] + [
|
|
+ ('with-salt-version=', None, 'Set a fixed version for Salt instead calculating it'),
|
|
# Salt's Paths Configuration Settings
|
|
('salt-root-dir=', None,
|
|
'Salt\'s pre-configured root directory'),
|
|
@@ -893,6 +906,9 @@ class SaltDistribution(distutils.dist.Distribution):
|
|
self.salt_spm_pillar_dir = None
|
|
self.salt_spm_reactor_dir = None
|
|
|
|
+ # Salt version
|
|
+ self.with_salt_version = None
|
|
+
|
|
self.name = 'salt-ssh' if PACKAGED_FOR_SALT_SSH else 'salt'
|
|
self.salt_version = __version__ # pylint: disable=undefined-variable
|
|
self.description = 'Portable, distributed, remote execution and configuration management system'
|
|
--
|
|
2.14.2
|
|
|
|
|