Makefile.gbuild | 12 ++++++++++++ Makefile.in | 3 +++ bin/update/create_full_mar.py | 14 ++++---------- bin/update/create_partial_update.py | 5 +++-- bin/update/make_incremental_update.sh | 12 ++++++------ bin/update/signing.py | 11 +++++++++++ bin/update/tools.py | 4 ++++ 7 files changed, 43 insertions(+), 18 deletions(-)
New commits: commit c434223f4b3f28aff960b6364de23df1a735fe57 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Apr 26 02:43:25 2017 +0200 add the generation of partial update files to the makefiles It seems that the generated partial update files are now generated correctly. We now need to handle languages and sign the partial files as well as upload them. Change-Id: I69fbdad42da2c8a2d9695bc852956b82ce773f4c diff --git a/Makefile.gbuild b/Makefile.gbuild index 6d625bb5e5fc..dbf0e0d40888 100644 --- a/Makefile.gbuild +++ b/Makefile.gbuild @@ -46,4 +46,16 @@ upload-update-info: $(SRCDIR)/bin/update/upload_builds.py "$(PRODUCTNAME)" "$(BUILDID)" "$(PLATFORM)" "$(UPDATE_DIR)" "$(UPDATE_CONFIG)" $(SRCDIR)/bin/update/upload_build_config.py "$(UPDATE_DIR)" "$(UPDATE_CONFIG)" +create-partial-info: + $(eval BUILDID := $(shell git -C $(SRCDIR) log -1 --format=%H)) + $(eval VERSION := $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)) + $(eval PLATFORM := $(RTL_OS)_$(RTL_ARCH)) + $(eval MAR_NAME_PREFIX := $(PRODUCTNAME)_$(VERSION)_$(PLATFORM)_$(BUILDID)) + $(eval UPDATE_DIR := $(WORKDIR)/update-info) + $(eval MAR_DIR := $(WORKDIR)/mar) + $(eval CURRENT_BUILD := $(WORKDIR)/mar/current-build/) + mkdir -p $(UPDATE_DIR) + mkdir -p $(UPDATE_DIR)/previous-builds + MAR=$(INSTDIR)/program/mar $(SRCDIR)/bin/update/create_partial_update.py "$(PRODUCTNAME)" "$(WORKDIR)" "$(UPDATE_DIR)" "$(MAR_DIR)/previous-builds/" "$(MAR_NAME_PREFIX)" "$(UPDATE_CONFIG)" "$(PLATFORM)" "$(CURRENT_BUILD)" "$(BUILDID)" + # vim: set noet sw=4 ts=4: diff --git a/Makefile.in b/Makefile.in index e245a8dd3f77..3823ae1653f0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -419,6 +419,9 @@ create-update-info: upload-update-info: $(MAKE) -f $(SRCDIR)/Makefile.gbuild upload-update-info +create-partial-info: + $(MAKE) -f $(SRCDIR)/Makefile.gbuild create-partial-info + dump-deps: @$(SRCDIR)/bin/module-deps.pl $(MAKE) $(SRCDIR)/Makefile.gbuild commit 71f39686cb37ab76a9ae2f31b09e2668eb536d90 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Apr 26 02:43:02 2017 +0200 extract the mar signing code Change-Id: I007b0b68a61242b7255a1a58a3637e3307d675aa diff --git a/bin/update/create_full_mar.py b/bin/update/create_full_mar.py index f4990304857e..649eafe2bfa6 100755 --- a/bin/update/create_full_mar.py +++ b/bin/update/create_full_mar.py @@ -7,6 +7,7 @@ import json from tools import uncompress_file_to_dir, get_file_info, make_complete_mar_name from config import parse_config +from signing import sign_mar_file current_dir_path = os.path.dirname(os.path.realpath(__file__)) @@ -37,10 +38,8 @@ def main(): mar_file = make_complete_mar_name(target_dir, filename_prefix) subprocess.call([os.path.join(current_dir_path, 'make_full_update.sh'), mar_file, uncompress_dir]) - signed_mar_file = make_mar_name(target_dir, filename_prefix + '_signed') - subprocess.check_call([mar_executable, '-C', target_dir, '-d', config.certificate_path, '-n', config.certificate_name, '-s', mar_file, signed_mar_file]) - os.rename(signed_mar_file, mar_file) + sign_mar_file(target_dir, config, mar_file, filename_prefix) file_info = { 'complete' : get_file_info(mar_file, config.base_url) } diff --git a/bin/update/signing.py b/bin/update/signing.py new file mode 100644 index 000000000000..e6ac2832d844 --- /dev/null +++ b/bin/update/signing.py @@ -0,0 +1,11 @@ +from tools import make_complete_mar_name + +import os +import subprocess + +def sign_mar_file(target_dir, config, mar_file, filename_prefix): + signed_mar_file = make_complete_mar_name(target_dir, filename_prefix + '_signed') + mar_executable = os.environ.get('MAR', 'mar') + subprocess.check_call([mar_executable, '-C', target_dir, '-d', config.certificate_path, '-n', config.certificate_name, '-s', mar_file, signed_mar_file]) + + os.rename(signed_mar_file, mar_file) commit 26354ce3738838f0902c6714b4de2505e44c11b3 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Apr 26 02:42:15 2017 +0200 extract mar file name generation Change-Id: If928cae4c722354d5c3e415e7cb8426a3a4412f7 diff --git a/bin/update/create_full_mar.py b/bin/update/create_full_mar.py index ebe2a01cd2cf..f4990304857e 100755 --- a/bin/update/create_full_mar.py +++ b/bin/update/create_full_mar.py @@ -5,15 +5,11 @@ import os import subprocess import json -from tools import uncompress_file_to_dir, get_file_info +from tools import uncompress_file_to_dir, get_file_info, make_complete_mar_name from config import parse_config current_dir_path = os.path.dirname(os.path.realpath(__file__)) -def make_mar_name(target_dir, filename_prefix): - filename = filename_prefix + "_complete.mar" - return os.path.join(target_dir, filename) - def main(): print(sys.argv) if len(sys.argv) < 7: @@ -38,8 +34,7 @@ def main(): uncompress_dir = uncompress_file_to_dir(tar_file, temp_dir) - mar_executable = os.environ.get('MAR', 'mar') - mar_file = make_mar_name(target_dir, filename_prefix) + mar_file = make_complete_mar_name(target_dir, filename_prefix) subprocess.call([os.path.join(current_dir_path, 'make_full_update.sh'), mar_file, uncompress_dir]) signed_mar_file = make_mar_name(target_dir, filename_prefix + '_signed') diff --git a/bin/update/tools.py b/bin/update/tools.py index 84c7ae6fb0ab..5a3e34521b40 100644 --- a/bin/update/tools.py +++ b/bin/update/tools.py @@ -49,3 +49,7 @@ def replace_variables_in_string(string, **kwargs): new_string = new_string.replace('$(%s)'%key, val) return new_string + +def make_complete_mar_name(target_dir, filename_prefix): + filename = filename_prefix + "_complete.mar" + return os.path.join(target_dir, filename) commit 4ad2df85af41b9b0616b53de43cb4d14db8ae31b Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Apr 26 02:13:45 2017 +0200 reuse the new extract mar code for the partial update generation Change-Id: Ie8c92472631034935e73e55c934ce128c7b6ecd2 diff --git a/bin/update/create_partial_update.py b/bin/update/create_partial_update.py index 90c2abd697e3..0382f82e79d3 100755 --- a/bin/update/create_partial_update.py +++ b/bin/update/create_partial_update.py @@ -8,6 +8,7 @@ import subprocess import errno from config import parse_config +from uncompress_mar import extract_mar BUF_SIZE = 1024 current_dir_path = os.path.dirname(os.path.realpath(__file__)) @@ -53,7 +54,7 @@ def handle_language(lang_entries, filedir): download_file(lang_file , data["url"], data["hash"]) dir_path = os.path.join(lang_dir, "lang") mkdir_p(dir_path) - subprocess.call([mar, "-C", dir_path, "-x", lang_file]) + extract_mar(lang_file, dir_path) langs[lang] = dir_path return langs @@ -83,7 +84,7 @@ def download_mar_for_update_channel_and_platform(config, platform, temp_dir): dir_path = os.path.join(filedir, "complete") mkdir_p(dir_path) - subprocess.call([mar, "-C", dir_path, "-x", filepath]) + extract_mar(filepath, dir_path) downloaded_updates[build] = {"complete": dir_path} commit d5f1ab7aa7f0d337eeccfeeab72220bdf5cc6583 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Apr 26 01:55:01 2017 +0200 ignore the precomplete file at least for now Change-Id: I997bdc38f705d7536a99a168815ece93dcf0c0de diff --git a/bin/update/make_incremental_update.sh b/bin/update/make_incremental_update.sh index 7c5e10826ba8..72286f06ce8a 100755 --- a/bin/update/make_incremental_update.sh +++ b/bin/update/make_incremental_update.sh @@ -122,12 +122,12 @@ if test $? -ne 0 ; then exit 1 fi -if [ ! -f "precomplete" ]; then - if [ ! -f "Contents/Resources/precomplete" ]; then - notice "precomplete file is missing!" - exit 1 - fi -fi +# if [ ! -f "precomplete" ]; then +# if [ ! -f "Contents/Resources/precomplete" ]; then +# notice "precomplete file is missing!" +# exit 1 +# fi +# fi list_dirs newdirs list_files newfiles _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits