From a1ede4dd4ba2682f408feddc118ad138e31d5b63 Mon Sep 17 00:00:00 2001 From: Nezmer Date: Sun, 27 Dec 2009 05:42:11 -0500 Subject: 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 Signed-off-by: Aaron Griffin --- makechrootpkg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'makechrootpkg') diff --git a/makechrootpkg b/makechrootpkg index b31a2ae..e48db6f 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -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" -- cgit v1.2.3-24-g4f1b