This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository buildscripts.

commit 63902ced2d48124aaf9ee9406335049f38ea182b
Author: Mihai Moldovan <io...@ionic.de>
Date:   Sat Jun 17 21:25:32 2017 +0200

    bin/build-rpm-package: correctly use l_ARCH variable in build section.
    
    Previously, this variable was initialized to an empty string and kept
    that way, but used with a different value in mind. This lead to source
    RPMs accumulating in the wrong directory.
---
 bin/build-rpm-package | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index e2662c8..29b304c 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -665,7 +665,7 @@ build_packages() {
                                test -z "${CODENAMES}" || grep "${CODENAMES}" 
<<< "${line}" || break
 
                                # FIXME: Builds currently break without this. 
This should really be merged/transformed into an arch loop.
-                               typeset l_ARCH=""
+                               typeset l_ARCH="SRPM"
 
                                # create rpmbuild subdirectories
                                mkdir -p -- 
"${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/rpmbuild/SOURCES"
@@ -798,6 +798,8 @@ build_packages() {
                                fi
 
                                if [ "x${SKIP_ARCH}" != "xx86_64" ] || [ 
"${IS_NOARCH}" = "yes" ]; then
+                                       l_ARCH="x86_64"
+
                                        if [ "x${l_DIST}" = "xopensuse" ] || [ 
"x${l_DIST}" = "xsle" ]; then
                                                while ps ax | grep -E 
"build.*/var/cache/obs-build/${l_DIST}/${l_CODENAME}/x86_64/" | grep "sudo 
obs"; do
                                                        echo "Waiting for some 
other build to finish..."
@@ -812,7 +814,7 @@ build_packages() {
                                                             --repo 
"${DOWNLOAD_URL}" \
                                                             --root 
"/var/cache/obs-build/${l_DIST}/${l_CODENAME}/x86_64/" \
                                                             --clean \
-                                                            
"${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/rpmbuild/SOURCES/${PROJECT}.spec";
 then
+                                                            
"${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/rpmbuild/SOURCES/${PROJECT}.spec"; then
                                                        mkdir -p -- 
"${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64/"
 
                                                        # -r parameter to read: 
Backslashes may NOT escape any characters!
@@ -850,7 +852,7 @@ build_packages() {
 
                                                # For information on why this 
weird -print0 | read -r -d '' construction works,
                                                # refer to the first instance 
of this in this script.
-                                               find 
"${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/rpmbuild/SRPMS/" -type 'f' -iname 
"${PROJECT}-${UPSTREAM_VERSION}-${PKG_SRCRELEASE}.${IS_RELEASE}.git${DATE}.${GITREV}.${COMPONENT}.*.src.rpm"
 -print0 | while read -r -d '' srpm; do
+                                               find 
"${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/rpmbuild/SRPMS/" -type 'f' -iname 
"${PROJECT}-${UPSTREAM_VERSION}-${PKG_SRCRELEASE}.${IS_RELEASE}.git${DATE}.${GITREV}.${COMPONENT}.*.src.rpm"
 -print0 | while read -r -d '' srpm; do
                                                        if mock 
${MOCK_CHROOT_CONFIG} --resultdir="${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64" 
"${srpm}"; then
                                                                # copy and 
later sign source RPM
                                                                cp "${srpm}" 
"${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/"
@@ -880,6 +882,8 @@ build_packages() {
                                        fi
                                fi
                                if [ "x${SKIP_ARCH}" != "xi386" ]; then
+                                       l_ARCH="i386"
+
                                        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..."
@@ -895,7 +899,7 @@ build_packages() {
                                                                    --root 
"/var/cache/obs-build/${l_DIST}/${l_CODENAME}/i586/" \
                                                                    --arch 
"i586" \
                                                                    --clean \
-                                                                   
"${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/rpmbuild/SOURCES/${PROJECT}.spec";
 then
+                                                                   
"${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/rpmbuild/SOURCES/${PROJECT}.spec"; then
                                                        mkdir -p -- 
"${PKGDIST}/${l_DIST}/${l_CODENAME}/i586/"
 
                                                        # For information on 
why this weird -print0 | read -r -d '' construction works,
@@ -935,7 +939,7 @@ build_packages() {
 
                                                # For information on why this 
weird -print0 | read -r -d '' construction works,
                                                # refer to the first instance 
of this in this script.
-                                               find 
"${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}/rpmbuild/SRPMS/" -type 'f' -iname 
"${PROJECT}-${UPSTREAM_VERSION}-${PKG_SRCRELEASE}.${IS_RELEASE}.git${DATE}.${GITREV}.${COMPONENT}.*.src.rpm"
 -print0 | while read -r -d '' srpm; do
+                                               find 
"${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/rpmbuild/SRPMS/" -type 'f' -iname 
"${PROJECT}-${UPSTREAM_VERSION}-${PKG_SRCRELEASE}.${IS_RELEASE}.git${DATE}.${GITREV}.${COMPONENT}.*.src.rpm"
 -print0 | while read -r -d '' srpm; do
                                                        if nice mock 
${MOCK_CHROOT_CONFIG} --resultdir="${PKGDIST}/${l_DIST}/${l_CODENAME}/i386" 
"${srpm}"; then
                                                                # only copy and 
sign source RPM if necessary
                                                                SIGN_SRPM="0"

--
Alioth's 
/srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on 
/srv/git/code.x2go.org/buildscripts.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-commits

Reply via email to