From 0e1aed0a370a99806f9eb639fc43704a192f23e7 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Fri, 17 May 2013 15:11:39 +0200 Subject: [PATCH] add creation of gpg file --- conf/opsi-builder.cfg | 3 +++ lib/builder-targets.sh | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/conf/opsi-builder.cfg b/conf/opsi-builder.cfg index 2ad44fb..8633aed 100644 --- a/conf/opsi-builder.cfg +++ b/conf/opsi-builder.cfg @@ -112,6 +112,9 @@ OPSI_REPOS_PURGE_LIMIT=3 OPSI_REPOS_PURGE_LIMIT_productname1=2 OPSI_REPOS_PURGE_LIMIT_productname2=6 +# create an gpg signfile +OPSI_REPOS_UPLOAD_OPSI_GPG=false +GPG_PASSPHRASE="" ############################### # Distribution / Vendor settings diff --git a/lib/builder-targets.sh b/lib/builder-targets.sh index eb41555..b4e9c84 100644 --- a/lib/builder-targets.sh +++ b/lib/builder-targets.sh @@ -25,6 +25,7 @@ builder_config() { CMD_sha1sum="`which sha1sum`" ; builder_check_error "Command 'sha1sum' not installed" CMD_iniset="`which ini-set`" ; builder_check_error "Command 'ini-set' (martINI a pypi project) not installed" CMD_ruby="`which ruby`" ; builder_check_error "Command 'ruby' not installed" + CMD_gpg="`which gpg`" ; builder_check_error "Command 'gpg' not installed" # Check temp dir test -d ${TMP_DIR} @@ -340,7 +341,11 @@ builder_publish() { ${CMD_zsyncmake} -u ${OPSI_REPOS_FILE_PATTERN}.opsi -o "${dst}.opsi.zsync" "${src}.opsi" builder_check_error "Can't create zsync file" fi - + + if [ "${OPSI_REPOS_UPLOAD_OPSI_GPG}" = "true" ] ; then + ${CMD_gpg} --batch --passphrase ${GPG_PASSPHRASE} --output "${dst}.opsi.gpg" --detach-sig "${src}.opsi" + builder_check_error "Can't create gpg file" + fi # Create revision file for this local rev_file=${OPSI_REPOS_PRODUCT_DIR}/${PN}-${VERSION}-${CREATOR_TAG}${RELEASE}.cfg cat > $rev_file <