[Libreoffice-commits] core.git: 2 commits - configure.ac onlineupdate/CustomTarget_generated.mk onlineupdate/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Sun May 21 00:29:56 UTC 2017
configure.ac | 3 +++
onlineupdate/CustomTarget_generated.mk | 4 ++--
onlineupdate/source/update/updater/gen_cert_header.py | 7 +++++--
3 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 20d04d6938a104124ac06271f17978a290cccf6c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sun May 21 00:38:10 2017 +0200
take the certifcate info from the update config
Change-Id: I15856f21d19b45ec50bd3d63d2e526c9e8db450d
diff --git a/onlineupdate/CustomTarget_generated.mk b/onlineupdate/CustomTarget_generated.mk
index 0c0f230387a8..346629976328 100644
--- a/onlineupdate/CustomTarget_generated.mk
+++ b/onlineupdate/CustomTarget_generated.mk
@@ -15,13 +15,13 @@ $(onlineupdate_INC)/primaryCert.h : \
$(SRCDIR)/onlineupdate/source/update/updater/gen_cert_header.py
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,,1)
mkdir -p $(dir $@)
- $(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/onlineupdate/source/update/updater/gen_cert_header.py "primaryCertData" /lo/users/moggi/NSSDBDir/master-daily.der > $(onlineupdate_INC)/primaryCert.h #"$(UPDATE_CONFIG)"
+ $(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/onlineupdate/source/update/updater/gen_cert_header.py "primaryCertData" $(UPDATE_CONFIG) > $(onlineupdate_INC)/primaryCert.h #"$(UPDATE_CONFIG)"
$(onlineupdate_INC)/secondaryCert.h : \
$(SRCDIR)/onlineupdate/source/update/updater/gen_cert_header.py
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,,1)
mkdir -p $(dir $@)
- $(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/onlineupdate/source/update/updater/gen_cert_header.py "secondaryCertData" /lo/users/moggi/NSSDBDir/master-daily.der > $(onlineupdate_INC)/secondaryCert.h #"$(UPDATE_CONFIG)"
+ $(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/onlineupdate/source/update/updater/gen_cert_header.py "secondaryCertData" $(UPDATE_CONFIG) > $(onlineupdate_INC)/secondaryCert.h #"$(UPDATE_CONFIG)"
$(call gb_CustomTarget_get_target,onlineupdate/generated) : \
$(onlineupdate_INC)/primaryCert.h \
diff --git a/onlineupdate/source/update/updater/gen_cert_header.py b/onlineupdate/source/update/updater/gen_cert_header.py
index 5b70758db3f2..8fedcd9bcf62 100755
--- a/onlineupdate/source/update/updater/gen_cert_header.py
+++ b/onlineupdate/source/update/updater/gen_cert_header.py
@@ -2,6 +2,7 @@
import sys
import binascii
+import configparser
def file_byte_generator(filename):
with open(filename, "rb") as f:
@@ -17,6 +18,8 @@ def create_header(array_name, in_filename):
if __name__ == '__main__':
if len(sys.argv) < 3:
- print('ERROR: usage: gen_cert_header.py array_name in_filename')
+ print('ERROR: usage: gen_cert_header.py array_name update_config_file')
sys.exit(1);
- sys.exit(create_header(sys.argv[1], sys.argv[2]))
+ config = configparser.ConfigParser()
+ config.read(sys.argv[2])
+ sys.exit(create_header(sys.argv[1], config['Updater']['certificate-der']))
commit 3964bfa04f5aa09a9199225a8763cdec74d92ee3
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sun May 21 00:12:58 2017 +0200
check that a update config is specified for mar based updater
Change-Id: I1fb87b33d4db8e5b0608aef13013be6dc9e8657e
diff --git a/configure.ac b/configure.ac
index 585c47efdfb7..cd4f0fa2ebaf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11299,6 +11299,9 @@ else
if test "$enable_online_update" = "mar"; then
AC_MSG_RESULT([yes - MAR-based online update])
ENABLE_ONLINE_UPDATE_MAR="TRUE"
+ if test "$with_update_config" = ""; then
+ AC_MSG_ERROR([mar based online updater needs an update config specified with "with-update-config])
+ fi
UPDATE_CONFIG="$with_update_config"
AC_DEFINE(HAVE_FEATURE_UPDATE_MAR)
elif test "$enable_online_update" = "yes"; then
More information about the Libreoffice-commits
mailing list