summaryrefslogtreecommitdiff
path: root/makechrootpkg
diff options
context:
space:
mode:
authorNezmer <Nezmer@allurelinux.org>2009-12-27 05:42:11 -0500
committerAaron Griffin <aaronmgriffin@gmail.com>2010-01-11 13:38:50 -0800
commita1ede4dd4ba2682f408feddc118ad138e31d5b63 (patch)
tree1bd883357596ce5f0cd112de589c5453aaec3bf8 /makechrootpkg
parent7ce9cd696515c9baf13f2181e64c2ea8df6a4b02 (diff)
downloaddevtools-a1ede4dd4ba2682f408feddc118ad138e31d5b63.tar.xz
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>
Diffstat (limited to 'makechrootpkg')
-rwxr-xr-xmakechrootpkg8
1 files changed, 4 insertions, 4 deletions
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"