summaryrefslogtreecommitdiff
path: root/makechrootpkg
diff options
context:
space:
mode:
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"