[X2Go-Commits] [buildscripts] 01/01: bin/build-rpm-package: "externally" switch to i585 architecture for x86 on OpenSuSE and SLE{S, D}.

git-admin at x2go.org git-admin at x2go.org
Tue Mar 22 05:31:42 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 9ea171a51376672b4cf8af058a1dc8fe28664591
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Tue Mar 22 05:23:13 2016 +0100

    bin/build-rpm-package: "externally" switch to i585 architecture for x86 on OpenSuSE and SLE{S,D}.
---
 bin/build-rpm-package |   29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 297bb93..d2671de 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -657,9 +657,9 @@ build_packages() {
 				# modify changelog for this build
 				### TODO: add changelog entry for this automatic build
 
-				mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/"{x86_64,i386,SRPM}
-
 				if [ "x${l_DIST}" = "xopensuse" ] || [ "x${l_DIST}" = "xsle" ]; then
+					mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/"{x86_64,i586,SRPM}
+
 					BUILD_RESULT="/home/abuild/rpmbuild/"
 
 					typeset -i tmp_suse_major_version="0"
@@ -684,6 +684,8 @@ build_packages() {
 							BUILD_RESULT="/usr/src/packages"
 						fi
 					fi
+				else
+					mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/"{x86_64,i386,SRPM}
 				fi
 
 				if [ "x${SKIP_ARCH}" != "xx86_64" ] || [ "${IS_NOARCH}" = "yes" ]; then
@@ -763,36 +765,36 @@ build_packages() {
 				fi
 				if [ "x${SKIP_ARCH}" != "xi386" ] && [ "${IS_NOARCH}" != "yes" ]; then
 					if [ "x${l_DIST}" = "xopensuse" ] || [ "x${l_DIST}" = "xsle" ]; then
-						while ps ax | grep -E "build.*/var/cache/obs-build/${l_DIST}/${l_CODENAME}/i386/" | grep "sudo obs"; do
+						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
 						done
 
 						# Obtain packages from our RPM repository.
-						get_extra_repository "suse" "${l_DIST}" "${l_CODENAME}" "${COMPONENT}" "${PROJECT}" "i386" "${RPM_WANT_EXTRA_REPOS}"
+						get_extra_repository "suse" "${l_DIST}" "${l_CODENAME}" "${COMPONENT}" "${PROJECT}" "i586" "${RPM_WANT_EXTRA_REPOS}"
 						if linux32 sudo obs-build \
 						                    --nosignature \
 						                    ${OTHERMIRROR} \
 						                    --repo "${DOWNLOAD_URL}" \
-						                    --root "/var/cache/obs-build/${l_DIST}/${l_CODENAME}/i386/" \
+						                    --root "/var/cache/obs-build/${l_DIST}/${l_CODENAME}/i586/" \
 						                    --arch "i585"
 						                    --clean \
 						                    "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/rpmbuild/SOURCES/${PROJECT}.spec"; then
-							mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/i386/"
+							mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/i586/"
 
 							# For information on why this weird -print0 | read -r -d '' construction works,
 							# refer to the first instance of this in this script.
-							find "/var/cache/obs-build/${l_DIST}/${l_CODENAME}/i386/${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}/i386/"
+							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}/i386/"*.rpm
+							rpmsign-unattended -D "%_gpg_name ${GPG_KEY}" --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)"
 							if [ -z "${SEARCH_SRPM}" ]; then
 								# For information on why this weird -print0 | read -r -d '' construction works,
 								# refer to the first instance of this in this script.
-								find "/var/cache/obs-build/${l_DIST}/${l_CODENAME}/i386/${BUILD_RESULT}/SRPMS/" -type 'f' -iname '*.src.rpm' -print0 | while read -r -d '' rpmfile; do
+								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
@@ -869,6 +871,13 @@ upload_packages() {
 			# Yes, "SRPM" is technically not an architecture.
 			for l_ARCH in x86_64 i386 SRPM; do
 				if [ "x${SKIP_ARCH}" != "x${l_ARCH}" ]; then
+					# Rename the i386 arch to i585 for OpenSuSE and SLE{S,D}.
+					if [ "${l_DIST}" = "opensuse" ] || [ "${l_DIST}" = "sle" ]; then
+						if [ "${l_ARCH}" = "i386" ]; then
+							l_ARCH="i585"
+						fi
+					fi
+
 					# create remote directories in archive
 					0</dev/null ssh "${REPOS_SERVER}" "mkdir -p -- ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}"
 					0</dev/null ssh "${REPOS_SERVER}" "mkdir -p -- ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata"

--
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