bin/update/create_full_mar.py | 4 -- bin/update/uncompress_mar.py | 48 ++++++++++++++++++++++++++++ solenv/bin/modules/installer/environment.pm | 1 3 files changed, 49 insertions(+), 4 deletions(-)
New commits: commit a944d673d4fc3fed37bcb70447d7b59b5b3f9067 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Apr 26 01:17:50 2017 +0200 add a script to extract and uncompress from a mar file Change-Id: I87c11b8f7d42bc438b88482a8dd3fd1512a06df8 diff --git a/bin/update/uncompress_mar.py b/bin/update/uncompress_mar.py new file mode 100755 index 000000000000..4c5f40733d41 --- /dev/null +++ b/bin/update/uncompress_mar.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +# Extract a mar file and uncompress the content + +import os +import sys +import subprocess + +def uncompress_content(file_path): + bzip2 = os.environ.get('BZIP2', 'bzip2') + file_path_compressed = file_path + ".bz2" + os.rename(file_path, file_path_compressed) + subprocess.check_call(["bzip2", "-d", file_path_compressed]) + +def extract_mar(mar_file, target_dir): + mar = os.environ.get('MAR', 'mar') + subprocess.check_call([mar, "-C", target_dir, "-x", mar_file]) + file_info = subprocess.check_output([mar, "-t", mar_file]) + lines = file_info.splitlines() + for line in lines: + info = line.split() + # ignore header line + if info[2] == b'NAME': + continue + + uncompress_content(os.path.join(target_dir, info[2].decode("utf-8"))) + +def main(): + if len(sys.argv) != 3: + print("Help: This program takes exactly two arguments pointing to a mar file and a target location") + sys.exit(1) + + mar_file = sys.argv[1] + target_dir = sys.argv[2] + extract_mar(mar_file, target_dir) + +if __name__ == "__main__": + main() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: commit dad8b7813f71752d119bb7782e3c1fb8d22847ee Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Tue Apr 25 21:39:11 2017 +0200 remove the split functionality from the update creation Change-Id: I036cabff089a2cf464c887ee78b702637cce08b0 diff --git a/bin/update/create_full_mar.py b/bin/update/create_full_mar.py index 25e654c9cd8b..ebe2a01cd2cf 100755 --- a/bin/update/create_full_mar.py +++ b/bin/update/create_full_mar.py @@ -38,10 +38,6 @@ def main(): uncompress_dir = uncompress_file_to_dir(tar_file, temp_dir) - # on linux we should stip the symbols from the libraries - if sys.platform.startswith('linux'): - subprocess.call('strip -g ' + os.path.join(uncompress_dir, 'program/') + '*', shell=True) - mar_executable = os.environ.get('MAR', 'mar') mar_file = make_mar_name(target_dir, filename_prefix) subprocess.call([os.path.join(current_dir_path, 'make_full_update.sh'), mar_file, uncompress_dir]) commit bbe935560cb1f71c2d6b4f71d90c4d400e8f1c81 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Tue Apr 25 21:29:09 2017 +0200 add a way to strip symbols from the tarballs Change-Id: I682dcc9c366efea2be00b738f630a82b4cf9d636 diff --git a/solenv/bin/modules/installer/environment.pm b/solenv/bin/modules/installer/environment.pm index 8e5f61e1d052..8afe3c12c782 100644 --- a/solenv/bin/modules/installer/environment.pm +++ b/solenv/bin/modules/installer/environment.pm @@ -123,6 +123,7 @@ sub set_global_environment_variables if ( $ENV{'DONTCOMPRESS'} ) { $installer::globals::solarisdontcompress = 1; } if ( $ENV{'IGNORE_ERROR_IN_LOGFILE'} ) { $installer::globals::ignore_error_in_logfile = 1; } if (( $ENV{'DISABLE_STRIP'} ) && ( $ENV{'DISABLE_STRIP'} ne '' )) { $installer::globals::strip = 0; } + if (( $ENV{'ENABLE_STRIP'} ) && ( $ENV{'ENABLE_STRIP'} ne '' )) { $installer::globals::strip = 1; } if ( $installer::globals::localinstalldir ) { $installer::globals::localinstalldirset = 1; } # Special handling, if LOCALINSTALLDIR contains "~" in the path _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits