This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository buildscripts. from 4859c0e bin/createsusetagsrepo: fix up repository generation. new 73b0400 bin/build-rpm-package: make SUSE version fetching more generic by using functions. new 891bc3d bin/build-rpm-package: use EPEL5 compat key for SUSE versions < 12. new 27853a7 bin/build-rpm-package: build noarch packages for i386 on non-SuSE-platforms. The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: bin/build-rpm-package | 107 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 92 insertions(+), 15 deletions(-) -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 73b040092d17cb9c262513f801d410a40d8ea88a Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Dec 8 18:44:15 2016 +0100 bin/build-rpm-package: make SUSE version fetching more generic by using functions. --- bin/build-rpm-package | 66 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 9 deletions(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 21b97cf..47f379a 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -567,6 +567,48 @@ get_extra_repository () { return 0 } +# Fetches major version out of a SUSE version string. +# The format is expected to be "X.Y" with X and Y being positive integers. +# The return code is either 0 or 1, with 0 meaning success and 1 failure. +# The detected major version is written to STDOUT. +get_suse_major_version () { + typeset suse_version="${1}" + typeset -i ret="0" + + if [ -z "${suse_version}" ]; then + ret="1" + else + typeset -i tmp_suse_major_version="0" + tmp_suse_major_version="$(sed -e '/^\([0-9][0-9]*\)\.[0-9][0-9]*$/!d;s//\1/' <<< "${suse_version}")" + + if [ "${tmp_suse_major_version}" -ne "0" ]; then + echo "${tmp_suse_major_version}" + fi + fi + + return "${ret}" +} + +# Fetches minor version out of a SUSE version string. +# The format is expected to be "X.Y" with X and Y being positive integers. +# The return code is either 0 or 1, with 0 meaning success and 1 failure. +# The detected minor version is written to STDOUT. +get_suse_minor_version () { + typeset suse_version="${1}" + typeset -i ret="0" + + if [ -z "${suse_version}" ]; then + ret="1" + else + typeset -i tmp_suse_minor_version="-1" + tmp_suse_minor_version="$(sed -e '/^[0-9][0-9]*\.\([0-9][0-9]*\)$/!d;s//\1/' <<< "${suse_version}")" + + echo "${tmp_suse_minor_version}" + fi + + return "${ret}" +} + prepare_workspace() { # make sure our local working copy is up to date... if [ -d "${PROJECT_DIR}/.git" ]; then @@ -752,11 +794,11 @@ build_packages() { BUILD_RESULT="/home/abuild/rpmbuild/" typeset -i tmp_suse_major_version="0" - tmp_suse_major_version="$(sed -e '/^\([0-9][0-9]*\)\.[0-9][0-9]*$/!d;s//\1/' <<< "${l_CODENAME}")" + tmp_suse_major_version="$(get_suse_major_version "${l_CODENAME}")" - if [ "x${tmp_suse_major_version}" = "x0" ]; then + if [ "${?}" -ne "0" ]; then echo "Unable to extract SUSE version." - exit 1 + exit "1" fi if [ "x${l_DIST}" = "xopensuse" ]; then @@ -1010,13 +1052,19 @@ upload_packages() { 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}")" + typeset -i tmp_suse_minor_version="0" + tmp_suse_major_version="$(get_suse_major_version "${l_CODENAME}")" - if [ "x${tmp_suse_major_version}" = "x0" ]; then - echo "Unable to extract SUSE version." - exit 1 + if [ "${?}" -ne "0" ]; then + echo "Unable to extract major SUSE version." + exit "1" + fi + + tmp_suse_minor_version="$(get_suse_minor_version "${l_CODENAME}")" + + if [ "${?}" -ne "0" ]; then + echo "Unable to extract minor SUSE version." + exit "1" fi [ "${tmp_suse_major_version}" -gt "13" ] && distro_string="${distro_string}Leap:" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
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
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 27853a719cca777701b7ee86ba0bcce1f0ec98c3 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Dec 8 20:05:27 2016 +0100 bin/build-rpm-package: build noarch packages for i386 on non-SuSE-platforms. --- bin/build-rpm-package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 42542b3..dc713dc 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -906,8 +906,8 @@ build_packages() { done fi fi - if [ "x${SKIP_ARCH}" != "xi386" ] && [ "${IS_NOARCH}" != "yes" ]; then - if [ "x${l_DIST}" = "xopensuse" ] || [ "x${l_DIST}" = "xsle" ]; then + if [ "x${SKIP_ARCH}" != "xi386" ]; then + if { [ "x${l_DIST}" = "xopensuse" ] || [ "x${l_DIST}" = "xsle" ]; } && [ "${IS_NOARCH}" != "yes" ]; then while ps ax | grep -E "build.*/var/cache/obs-build/${l_DIST}/${l_CODENAME}/i586/" | grep "sudo obs"; do echo "Waiting for some other build to finish..." sleep 30 -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git