Merge "Resign all Release files if necesary"

This commit is contained in:
Jenkins 2016-07-18 10:50:04 +00:00 committed by Gerrit Code Review
commit f90ce88b1e
1 changed files with 10 additions and 0 deletions

View File

@ -176,6 +176,16 @@ main() {
${DEB_HOLDBACK_DIST_NAME} ; do
reprepro ${REPREPRO_COMP_OPTS} --architecture source \
remove ${dist_name} ${SRC_NAME} || :
# Fix Codename field and resign Release file if necessary
local _release_file=${DISTDIR}/${dist_name}/Release
if ! gpg --verify "${_release_file}.gpg" "$_release_file" &>/dev/null ; then
sed "s|^Codename:.*$|Codename: ${DEB_BASE_DIST_NAME}|" -i "$_release_file"
if [ "$USE_SIGUL" = "true" ] ; then
retry -c4 -s1 _sigul "$KEY_PASSPHRASE" -u "$SIGUL_USER" sign-data --armor -o "${_release_file}.gpg" "$SIGKEYID" "$_release_file"
else
gpg --sign --local-user "$SIGKEYID" -ba -o "${_release_file}.gpg" "$_release_file"
fi
fi
done
reprepro ${REPREPRO_COMP_OPTS} includedsc ${DEB_DIST_NAME} ${BINSRCLIST} \
|| error "Can't include packages"