From 5680a10d1e4d06e73d4c2a784d1cb022657de2ef Mon Sep 17 00:00:00 2001 From: Silvan Date: Sun, 29 Dec 2024 20:41:08 +0100 Subject: [PATCH] webbuild-sudo: support for new builddir scheme required by rpm 4.20 --- webbuild/webbuild-sudo | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webbuild/webbuild-sudo b/webbuild/webbuild-sudo index ac05c6a..48de01d 100755 --- a/webbuild/webbuild-sudo +++ b/webbuild/webbuild-sudo @@ -93,6 +93,7 @@ if [ "$MODE" = "specinfo" ]; then if [ -e $SPECFILE.tmp ]; then echo "SPECVAR_Specfile=\"$SPECFILE\"" BUILDDIR=`grep -m1 "^_setup.*-n " $SPECFILE.tmp | sed "s|.*-n \([^[:space:]]*\).*|\1|"` + PACKAGE_VERSION=`rpmspec -q --srpm --queryformat \"%{VERSION}\" ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec` while read line; do set -- $line [ "$1" = "%package" -o "$1" = "%description" ] && break @@ -111,10 +112,10 @@ if [ "$MODE" = "specinfo" ]; then rm -f $SPECFILE.tmp echo "SPECVAR_BUILDDIR=\"$BUILDDIR\"" echo "SPECVAR_BUILDROOT=\"$PACKAGE-root\"" - echo "SPECVAR_RPMBUILDDIR=\"${WORKINGHOME}/RPM/BUILD\"" - echo "SPECVAR_RPMSOURCESDIR=\"${WORKINGHOME}/RPM/SOURCES\"" - echo "SPECVAR_RPMBUILDROOT=\"$RPMBUILDROOT\"" echo "SPECVAR_WORKINGHOME=\"$WORKINGHOME\"" + echo "SPECVAR_RPMBUILDDIR=\"${WORKINGHOME}/RPM/BUILD/${PACKAGE}-${PACKAGE_VERSION}-build\"" + echo "SPECVAR_RPMSOURCESDIR=\"${WORKINGHOME}/RPM/SOURCES\"" + echo "SPECVAR_RPMBUILDROOT=\"${WORKINGHOME}/RPM/BUILD/${PACKAGE}-${PACKAGE_VERSION}-build/BUILDROOT\"" exit 0 fi else