devtools: make sure all files are owned by nobody before building

In makechrootpkg, build dirs are chowned to nobody before we move files
to "$uniondir/build". This could lead to failure If the files are
supposed to be dynamically upgraded when we run makepkg.

A common use-case is when we upgrade $pkgver in git,svn PKGBUILDS.

Signed-off-by: Nezmer <Nezmer@allurelinux.org>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
Nezmer 2009-12-27 05:42:11 -05:00 committed by Aaron Griffin
parent 7ce9cd6965
commit a1ede4dd4b
1 changed files with 4 additions and 4 deletions

View File

@ -167,10 +167,6 @@ if ! grep "SRCDEST=/srcdest" "$uniondir/etc/makepkg.conf" >/dev/null 2>&1; then
echo "SRCDEST=/srcdest" >> "$uniondir/etc/makepkg.conf"
fi
chown -R nobody "$uniondir/build"
chown -R nobody "$uniondir/srcdest"
chown -R nobody "$uniondir/pkgdest"
# Copy PKGBUILD and sources
source PKGBUILD
cp PKGBUILD "$uniondir/build/"
@ -201,6 +197,10 @@ if [ -f "ChangeLog" ]; then
cp ChangeLog "$uniondir/build/"
fi
chown -R nobody "$uniondir/build"
chown -R nobody "$uniondir/srcdest"
chown -R nobody "$uniondir/pkgdest"
if ! grep "^nobody" "$uniondir/etc/sudoers" >/dev/null 2>&1; then
echo "allowing 'nobody' sudo rights in the chroot"
touch "$uniondir/etc/sudoers"