From: Adrian Schröter Date: Tue, 8 Dec 2009 08:24:51 +0000 (+0100) Subject: fix building of products with user(abuild) permissions X-Git-Tag: obs_2.0~137 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=515adfb0a795caf527342836ef1255c773647876;p=platform%2Fupstream%2Fbuild.git fix building of products with user(abuild) permissions --- diff --git a/build b/build index f46e97a..1e0693d 100755 --- a/build +++ b/build @@ -1608,7 +1608,11 @@ for SPECFILE in "${SPECFILES[@]}" ; do chroot $BUILD_ROOT su -c "kiwi --version" - if test "$imagetype" = product ; then echo "running kiwi --create-instsource..." - chroot $BUILD_ROOT su -c "APPID=- KIWI_COLLECT_TERMINAL_LOG=1 LANG=POSIX kiwi --root $TOPDIR/KIWIROOT -v -v --instsource-local --logfile terminal -p $TOPDIR/SOURCES --create-instsource $TOPDIR/SOURCES" - $BUILD_USER < /dev/null && BUILD_SUCCEEDED=true + # runs always as abuild user + mkdir -p "$BUILD_ROOT/$TOPDIR/KIWIROOT" + chroot "$BUILD_ROOT" chown -R abuild.abuild "$TOPDIR" + # --instsource-local is only needed for openSUSE 11.1 and SLE 11 SP0 kiwi. + chroot "$BUILD_ROOT" su -c "APPID=- LANG=POSIX /usr/sbin/kiwi --root $TOPDIR/KIWIROOT -v -v --logfile terminal -p $TOPDIR/SOURCES --instsource-local --create-instsource $TOPDIR/SOURCES" - abuild < /dev/null && BUILD_SUCCEEDED=true ### This block is obsolete with current kiwi versions, only needed for kiwi 3.01 version # for i in $BUILD_ROOT/$TOPDIR/KIWIROOT/main/* ; do # test -d "$i" || continue