netsrpms: use tmpdir as %_topdir so that packager permissions are not required to write to /usr/src/RPM

This commit is contained in:
Silvan Calarco 2022-06-28 12:34:44 +02:00
parent 3543d6e579
commit 2468755541

View File

@ -120,7 +120,7 @@ for pckname in $PACKAGES; do
${SPEC_PATHNAME} >> $tmpfile
rpmbuild --ba \
--define="%_rpmdir $tmpdir" \
--define="%_topdir $tmpdir" \
--define="%_sourcedir ${SRPM_PATH}" \
$tmpfile
@ -129,7 +129,7 @@ for pckname in $PACKAGES; do
notify-send -a $"Network software installation" -i $icon "$pckname" $"There was an error building"" $pckname!"
exit 255
fi
RPM_PATH=`find $tmpdir -name \*.rpm`
RPM_PATH=`find ${tmpdir}/RPMS -name \*.rpm`
# install rpm
if [ "$FORCE_MODE" = "1" ]; then