diff --git a/webbuild/webbuild-sudo b/webbuild/webbuild-sudo index 34530e2..ac05c6a 100755 --- a/webbuild/webbuild-sudo +++ b/webbuild/webbuild-sudo @@ -88,10 +88,11 @@ if [ "$MODE" = "specinfo" ]; then done < ${ENVPREFIX}${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec [ "$AUTOBUILDREQ_BEGIN" -a "$AUTOBUILDREQ_END" -a ! "$AUTOBUILDREQ_UNDONE" ] || \ echo "SPECVAR_CHECK_NOAUTOBUILDREQ=1" - $SUCMDPREFIX "rpmspec -P ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec > ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec.tmp 2>/dev/null" + # _setup: prevent %setup macro expansion + $SUCMDPREFIX "rpmspec -P ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec --define \"%setup _setup\" > ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec.tmp 2>/dev/null" if [ -e $SPECFILE.tmp ]; then echo "SPECVAR_Specfile=\"$SPECFILE\"" - BUILDDIR=`grep -m1 "^%setup.*-n " $SPECFILE.tmp | sed "s|.*-n \([^[:space:]]*\).*|\1|"` + BUILDDIR=`grep -m1 "^_setup.*-n " $SPECFILE.tmp | sed "s|.*-n \([^[:space:]]*\).*|\1|"` while read line; do set -- $line [ "$1" = "%package" -o "$1" = "%description" ] && break