[X2Go-Commits] [buildscripts] 03/06: bin/build-rpm-package: pass gpg-key and sha256 parameter to createsusetags (remote) script.
git-admin at x2go.org
git-admin at x2go.org
Sun Dec 4 06:54:35 CET 2016
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository buildscripts.
commit 48ba9d0fa40845801b88fabeec311f187c5bef66
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sun Dec 4 04:32:35 2016 +0100
bin/build-rpm-package: pass gpg-key and sha256 parameter to createsusetags (remote) script.
---
bin/build-rpm-package | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 15633cc..611b4b6 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -1004,12 +1004,15 @@ upload_packages() {
# For *SUSE, we only need to run the repo generation once, since all architectures are part of one repository.
if [ "${l_DIST}" = "opensuse" ] || [ "${l_DIST}" = "sle" ]; then
+ typeset use_sha256="1"
typeset distro_string=""
if [ "${l_DIST}" = "opensuse" ]; then
distro_string="OpenSuSE:"
typeset -i tmp_suse_major_version="0"
+ typeset -i tmp_suse_minor_version="-1"
tmp_suse_major_version="$(sed -e '/^\([0-9][0-9]*\)\.[0-9][0-9]*$/!d;s//\1/' <<< "${l_CODENAME}")"
+ tmp_suse_minor_version="$(sed -e '/^[0-9][0-9]*\.\([0-9][0-9]*\)$/!d;s//\1/' <<< "${l_CODENAME}")"
if [ "x${tmp_suse_major_version}" = "x0" ]; then
echo "Unable to extract SUSE version."
@@ -1018,6 +1021,11 @@ upload_packages() {
[ "${tmp_suse_major_version}" -gt "13" ] && distro_string="${distro_string}Leap:"
distro_string="${distro_string}${l_CODENAME}"
+
+ # 11.1 and below only support SHA1 checksums (or at least the upstream repositories exclusively use SHA1 checksums.)
+ if [ "${tmp_suse_major_version}" -lt "11" ] || { [ "${tmp_suse_major_version}" -eq "11" ] && [ "${tmp_suse_minor_version}" -le "1" ]; }; then
+ use_sha256="0"
+ fi
else
distro_string="SLE:"
@@ -1054,7 +1062,7 @@ upload_packages() {
[ -n "${other}" ] && distro_string="${distro_string}${other}"
fi
- 0</dev/null ssh "${REPOS_SERVER}" "cd '${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/' && ~/bin/createsusetagsrepo '.' '${distro_string}' '${l_CODENAME}'"
+ 0</dev/null ssh "${REPOS_SERVER}" "cd '${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/' && ~/bin/createsusetagsrepo '.' '${distro_string}' '${l_CODENAME}' '${gpg_sign_with}' '${use_sha256}'"
# Sign repository data, otherwise zypper will fail adding the repository.
0</dev/null ssh "${REPOS_SERVER}" "cd '${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/' && rm -f -- 'content.asc' && gpg -a -u '${gpg_sign_with}' --detach-sign 'content'" 1>/dev/null 2>/dev/null
--
Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
More information about the x2go-commits
mailing list