Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2019-11-29 12:35:19 +0300
committerSybren A. Stüvel <sybren@blender.org>2019-11-29 12:35:19 +0300
commitae13bba24e4a104d17478be40e714a789d062fb0 (patch)
treee8bbfad553ef7f16acdd3389bdeb8f0a69a47844 /build_files/package_spec
parent9e168b63b4a45f63f17491a0e1eba025c42d0963 (diff)
Archive build script: fix compatibility with older tar on CentOS 7
On CentOS 7, `tar --use-compress-program='xz -9'` tries to run `xz -9` as executable, rather than running `xz` with `-9` as argument. Passing the `-9` option via the `XZ_OPT` environment variable, as suggested by @campbellbarton in D6138, works fine.
Diffstat (limited to 'build_files/package_spec')
-rwxr-xr-xbuild_files/package_spec/build_archive.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/build_files/package_spec/build_archive.py b/build_files/package_spec/build_archive.py
index 58a970bca31..754bb8cd402 100755
--- a/build_files/package_spec/build_archive.py
+++ b/build_files/package_spec/build_archive.py
@@ -49,11 +49,14 @@ try:
if not os.path.exists(output_dir):
os.mkdir(output_dir)
+ archive_env = os.environ.copy()
+
if extension == 'zip':
archive_cmd = ['zip', '-9', '-r', package_archive, package_dir]
elif extension == 'tar.xz':
archive_cmd = ['tar', '-cf', package_archive, '--owner=0', '--group=0',
- '--use-compress-program=xz -9', package_dir]
+ '--use-compress-program=xz', package_dir]
+ archive_env['XZ_OPT'] = '-9'
else:
sys.stderr.write('Unknown archive extension: ' + extension)
sys.exit(-1)