This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 891bc3dbe724a626cc0af01e6bb953bb754fac3c Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Dec 8 19:02:06 2016 +0100 bin/build-rpm-package: use EPEL5 compat key for SUSE versions < 12. --- bin/build-rpm-package | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 47f379a..42542b3 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -843,7 +843,19 @@ build_packages() { find "/var/cache/obs-build/${l_DIST}/${l_CODENAME}/x86_64/${BUILD_RESULT}/RPMS/" -type f \( -iname '*.rpm' -and -not -iname '*.src.rpm' \) -print0 | while read -r -d '' rpmfile; do cp "${rpmfile}" "${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64/" done - rpmsign-unattended -D "%_gpg_name ${GPG_KEY}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64/"*.rpm + + typeset -i tmp_suse_major_version="0" + tmp_suse_major_version="$(get_suse_major_version "${l_CODENAME}")" + + if [ "${?}" -ne "0" ]; then + echo "Unable to extract SUSE version." + exit "1" + fi + + typeset gpg_sign_with="${GPG_KEY}" + [ "${tmp_suse_major_version}" -lt "12" ] && gpg_sign_with="${GPG_KEY_EPEL5}" + + rpmsign-unattended -D "%_gpg_name ${gpg_sign_with}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64/"*.rpm # also copy and sign source RPM's # For information on why this weird -print0 | read -r -d '' construction works, @@ -851,7 +863,7 @@ build_packages() { find "/var/cache/obs-build/${l_DIST}/${l_CODENAME}/x86_64/${BUILD_RESULT}/SRPMS/" -type f -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do cp "${rpmfile}" "$PKGDIST/${l_DIST}/${l_CODENAME}/SRPM/" done - rpmsign-unattended -D "%_gpg_name ${GPG_KEY}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/"*.rpm + rpmsign-unattended -D "%_gpg_name ${gpg_sign_with}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/"*.rpm else exit 1 fi @@ -918,7 +930,19 @@ build_packages() { find "/var/cache/obs-build/${l_DIST}/${l_CODENAME}/i586/${BUILD_RESULT}/RPMS/" -type 'f' \( -iname '*.rpm' -and -not -iname '*.src.rpm' \) -print0 | while read -r -d '' rpmfile; do cp "${rpmfile}" "${PKGDIST}/${l_DIST}/${l_CODENAME}/i586/" done - rpmsign-unattended -D "%_gpg_name ${GPG_KEY}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/i586/"*.rpm + + typeset -i tmp_suse_major_version="0" + tmp_suse_major_version="$(get_suse_major_version "${l_CODENAME}")" + + if [ "${?}" -ne "0" ]; then + echo "Unable to extract SUSE version." + exit "1" + fi + + typeset gpg_sign_with="${GPG_KEY}" + [ "${tmp_suse_major_version}" -lt "12" ] && gpg_sign_with="${GPG_KEY_EPEL5}" + + rpmsign-unattended -D "%_gpg_name ${gpg_sign_with}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/i586/"*.rpm # copy and later sign source RPM's, if needed (that is, not already generated by x86_64/noarch code above) SEARCH_SRPM="$(find "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM" -type 'f' -iname "*.src.rpm" -print)" @@ -928,7 +952,7 @@ build_packages() { find "/var/cache/obs-build/${l_DIST}/${l_CODENAME}/i586/${BUILD_RESULT}/SRPMS/" -type 'f' -iname '*.src.rpm' -print0 | while read -r -d '' rpmfile; do cp "${rpmfile}" "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/" done - rpmsign-unattended -D "%_gpg_name ${GPG_KEY}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/"*.rpm + rpmsign-unattended -D "%_gpg_name ${gpg_sign_with}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/"*.rpm fi else exit 1 @@ -1048,6 +1072,7 @@ upload_packages() { if [ "${l_DIST}" = "opensuse" ] || [ "${l_DIST}" = "sle" ]; then typeset use_sha256="1" typeset distro_string="" + typeset gpg_sign_with="${GPG_KEY}" if [ "${l_DIST}" = "opensuse" ]; then distro_string="OpenSuSE:" @@ -1067,6 +1092,8 @@ upload_packages() { exit "1" fi + [ "${tmp_suse_major_version}" -lt "12" ] && gpg_sign_with="${GPG_KEY_EPEL5}" + [ "${tmp_suse_major_version}" -gt "13" ] && distro_string="${distro_string}Leap:" distro_string="${distro_string}${l_CODENAME}" @@ -1108,6 +1135,8 @@ upload_packages() { distro_string="${distro_string}${major}" [ "${sp}" -gt "0" ] && distro_string="${distro_string}:SP${sp}" [ -n "${other}" ] && distro_string="${distro_string}${other}" + + [ "${major}" -lt 12 ] && gpg_sign_with="${GPG_KEY_EPEL5}" fi 0</dev/null ssh "${REPOS_SERVER}" "cd '${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/' && ~/bin/createsusetagsrepo '.' '${distro_string}' '${COMPONENT}' '${gpg_sign_with}' '${use_sha256}'" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git