changeset 1366:8c829345ecfa

(issue179) Write signature date in linux installer and add to test script
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 24 Nov 2014 12:40:49 +0100
parents 3d7ddf698480
children e7a8ec3185f2
files packaging/linux-installer-common.inc.in ui/tests/append-sig.sh
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/packaging/linux-installer-common.inc.in	Fri Nov 21 18:33:58 2014 +0100
+++ b/packaging/linux-installer-common.inc.in	Mon Nov 24 12:40:49 2014 +0100
@@ -22,12 +22,14 @@
 HELPNAMES_STATIC="###HELPNAMES_STATIC###"
 HELPNAMES_IMG="###HELPNAMES_IMG###"
 LICENSENAMES="###LICENSES###"
+SIGNATURE_DATE="###SIGNATURE_DATE###"
 ARCH="###ARCH###"
 
 declare -A instcfg oldinstcfg
 declare inst_default_prefix instdata_path instcfg_path instcfg_file
 instcfg=(
   [TIMESTMP]=`date -u +%Y%m%d%H%M%S`
+  [SIG_DATE]=$SIGNATURE_DATE
   [VERSION]='@PROJECT_VERSION@'
   [PREFIX]=''
 )
--- a/ui/tests/append-sig.sh	Fri Nov 21 18:33:58 2014 +0100
+++ b/ui/tests/append-sig.sh	Mon Nov 24 12:40:49 2014 +0100
@@ -1,3 +1,6 @@
 #!/bin/bash
-cp $2 $3
-echo -e \\r\\nS:$(openssl dgst -sha256 -sign $1 < $2 | base64 -w0) >> $3
+cp "$2" "$3"
+CUR_DT=$(date +%s)
+sed -i "s/###SIGNATURE_DATE###/${CUR_DT}/" "$3"
+echo -e \\r\\nS_DT:$CUR_DT >> "$3"
+echo -e \\r\\nS:$(openssl dgst -sha256 -sign "$1" < "$2" | base64 -w0) >> "$3"

http://wald.intevation.org/projects/trustbridge/