From b9308e3609fdc903a6cbad9e5f4afd55cb31d2fe Mon Sep 17 00:00:00 2001 From: "Dr. Peter Poeml" Date: Wed, 21 Mar 2007 00:27:26 +0000 Subject: [PATCH] make needsrootforbuild / norootforbuild work --- build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build b/build index bf1ab9b..7859ee9 100755 --- a/build +++ b/build @@ -646,14 +646,17 @@ for SPECFILE in $SPECFILES ; do # # check if we want to build with the abuild user + # build as root per default, unless option --norootforbuild was given + # override with "needsrootforbuild" or "norootforbuild" in the spec file # BUILD_USER=root + test -n "$NOROOTFORBUILD" && BUILD_USER=abuild if test "$BUILD_USER" = abuild ; then egrep '^#[ ]*needsrootforbuild[ ]*$' >/dev/null <$SPECFILE && BUILD_USER=root else egrep '^#[ ]*norootforbuild[ ]*$' >/dev/null <$SPECFILE && BUILD_USER=abuild fi - test -n "$NOROOTFORBUILD" && BUILD_USER=abuild + if test $BUILD_USER = abuild ; then if ! egrep '^abuild:' >/dev/null <$BUILD_ROOT/etc/passwd ; then echo 'abuild::99:99:Autobuild:/home/abuild:/bin/bash' >>$BUILD_ROOT/etc/passwd -- 2.7.4