summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 0d93c2e..862e6bc 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -247,6 +247,11 @@ shopt -s nullglob
ln -sft /srcdest /srcdest_host/*
ln -sft /startdir /startdir_host/*
+# Keep PKGBUILD writable for pkgver()
+rm /startdir/PKGBUILD*
+cp /startdir_host/PKGBUILD* /startdir
+chown nobody /startdir/PKGBUILD*
+
cd /startdir
sudo -u nobody makepkg $makepkg_args || exit 1