diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-01-29 13:31:04 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-01-29 13:31:04 +0100 |
commit | e83fc7d677fec7cf97bdd0790c88fb94668e25be (patch) | |
tree | 3343ea3da2a53402f88b8eefe730fa61999b9ee6 /bin | |
parent | 5bc1bd9c898634ad4255dbe2bd86f527cf2ea56a (diff) | |
download | buildscripts-e83fc7d677fec7cf97bdd0790c88fb94668e25be.tar.gz buildscripts-e83fc7d677fec7cf97bdd0790c88fb94668e25be.tar.bz2 buildscripts-e83fc7d677fec7cf97bdd0790c88fb94668e25be.zip |
obs-build: when building for SLE 11.2 and 11.3, obs-build drops the (S)RPM build results in /usr/src/packages
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/build-rpm-package | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 0680e4e..b91d2d1 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -251,10 +251,14 @@ build_packages() { if [ "x$SKIP_ARCH" != "xx86_64" ] || [ "$IS_NOARCH" = "yes" ]; then if [ "x$l_DIST" = "xopensuse" ] || [ "x$l_DIST" = "xsle" ]; then + BUILD_RESULT=/home/abuild/rpmbuild/ if [ "x$l_DIST" = "xopensuse" ]; then DOWNLOAD_URL=$(echo "$OPENSUSE_DOWNLOAD_URL" | sed "s/#VERSION#/$l_CODENAME/") elif [ "x$l_DIST" = "xsle" ]; then DOWNLOAD_URL=$(echo "$SLE_DOWNLOAD_URL" | sed "s/#VERSION#/$l_CODENAME/") + if [ "$l_CODENAME" = "11.2" ] || [ "$l_CODENAME" = "11.3" ]; then + BUILD_RESULT=/usr/src/packages + fi fi 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..." @@ -268,13 +272,13 @@ build_packages() { --clean \ $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SOURCES/$PROJECT.spec; then mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/x86_64/" - find "/var/cache/obs-build/$l_DIST/$l_CODENAME/x86_64/home/abuild/rpmbuild/RPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do + find "/var/cache/obs-build/$l_DIST/$l_CODENAME/x86_64/$BUILD_RESULT/RPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do cp "$rpmfile" "$PKGDIST/$l_DIST/$l_CODENAME/x86_64/" done rpmsign-unattended -D "%_gpg_name debian@x2go.org" --addsign "$PKGDIST/$l_DIST/$l_CODENAME/x86_64/"*.rpm # also copy and sign source RPM's - find "/var/cache/obs-build/$l_DIST/$l_CODENAME/x86_64/home/abuild/rpmbuild/SRPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do + find "/var/cache/obs-build/$l_DIST/$l_CODENAME/x86_64/$BUILD_RESULT/SRPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do cp "$rpmfile" "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/" done rpmsign-unattended -D "%_gpg_name debian@x2go.org" --addsign "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/"*.rpm @@ -315,10 +319,14 @@ build_packages() { fi if [ "x$SKIP_ARCH" != "xi386" ] && [ "$IS_NOARCH" != "yes" ]; then if [ "x$l_DIST" = "xopensuse" ] || [ "x$l_DIST" = "xsle" ]; then + BUILD_RESULT=/home/abuild/rpmbuild/ if [ "x$l_DIST" = "xopensuse" ]; then DOWNLOAD_URL=$(echo "$OPENSUSE_DOWNLOAD_URL" | sed "s/#VERSION#/$l_CODENAME/") elif [ "x$l_DIST" = "xsle" ]; then DOWNLOAD_URL=$(echo "$SLE_DOWNLOAD_URL" | sed "s/#VERSION#/$l_CODENAME/") + if [ "$l_CODENAME" = "11.2" ] || [ "$l_CODENAME" = "11.3" ]; then + BUILD_RESULT=/usr/src/packages + fi fi while ps ax | grep -E "build.*/var/cache/obs-build/$l_DIST/$l_CODENAME/i386/" | grep "sudo obs"; do echo "Waiting for some other build to finish..." @@ -332,7 +340,7 @@ build_packages() { --clean \ $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SOURCES/$PROJECT.spec; then mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/i386/" - find "/var/cache/obs-build/$l_DIST/$l_CODENAME/i386/home/abuild/rpmbuild/RPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do + find "/var/cache/obs-build/$l_DIST/$l_CODENAME/i386/$BUILD_RESULT/RPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do cp "$rpmfile" "$PKGDIST/$l_DIST/$l_CODENAME/i386/" done rpmsign-unattended -D "%_gpg_name debian@x2go.org" --addsign "$PKGDIST/$l_DIST/$l_CODENAME/i386/"*.rpm @@ -340,7 +348,7 @@ build_packages() { # 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" -name "*.rpm" -print)" if [ -z "$SEARCH_SRPM" ]; then - find "/var/cache/obs-build/$l_DIST/$l_CODENAME/i386/home/abuild/rpmbuild/SRPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do + find "/var/cache/obs-build/$l_DIST/$l_CODENAME/i386/$BUILD_RESULT/SRPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do cp "$rpmfile" "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/" done rpmsign-unattended -D "%_gpg_name debian@x2go.org" --addsign "$PKGDIST/$l_DIST/$l_CODENAME/SRPM/"*.rpm |