From 4c3874a784875d6fa85664e6322157c8a29933b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 2 Dec 2009 13:56:58 +0000 Subject: [PATCH] do Product kiwi building as "abuild" user --- build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build b/build index 4bfc627..338c017 100755 --- a/build +++ b/build @@ -1261,7 +1261,6 @@ for SPECFILE in "${SPECFILES[@]}" ; do egrep '^#[ ]*norootforbuild[ ]*$' >/dev/null <$SPECFILE && BUILD_USER=abuild fi test -n "$NOROOTFORBUILD" && BUILD_USER=abuild - test "$BUILDTYPE" = kiwi && BUILD_USER=root if test $BUILD_USER = abuild ; then if ! egrep '^abuild:' >/dev/null <$BUILD_ROOT/etc/passwd ; then @@ -1639,10 +1638,11 @@ for SPECFILE in "${SPECFILES[@]}" ; do fi for imgtype in $imagetype ; do echo "running kiwi --prepare for $imgtype..." - if chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && kiwi --prepare $TOPDIR/SOURCES --logfile terminal --root $TOPDIR/KIWIROOT-$imgtype" - $BUILD_USER < /dev/null ; then + # Do not use $BUILD_USER here, since we always need root permissions + if chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && kiwi --prepare $TOPDIR/SOURCES --logfile terminal --root $TOPDIR/KIWIROOT-$imgtype" - root < /dev/null ; then echo "running kiwi --create for $imgtype..." mkdir -p $BUILD_ROOT/$TOPDIR/KIWI-$imgtype - chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && kiwi --create $TOPDIR/KIWIROOT-$imgtype --logfile terminal --type $imgtype -d $TOPDIR/KIWI-$imgtype" - $BUILD_USER < /dev/null || cleanup_and_exit 1 + chroot $BUILD_ROOT su -c "cd $TOPDIR/SOURCES && kiwi --create $TOPDIR/KIWIROOT-$imgtype --logfile terminal --type $imgtype -d $TOPDIR/KIWI-$imgtype" - root < /dev/null || cleanup_and_exit 1 else cleanup_and_exit 1 fi -- 2.7.4