[arch-general] [PATCH] devtools: Make sure build files are owned by nobody

Nezmer Nezmer at allurelinux.org
Sat Dec 26 07:17:52 EST 2009


makechrootpkg copies files to "$uniondir/build" after chowning the
directory. This means those files are not owned by nobody.

This yields to failure when the files are supposed to be dynamically
edited. A common use-case is when we build from git or svn and we want
$pkver to be upgraded dynamically.

Signed-off-by: Nezmer <Nezmer at allurelinux.org>
---
 makechrootpkg |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/makechrootpkg b/makechrootpkg
index 1d2282c..9e36f10 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -200,6 +200,9 @@ if [ -f "ChangeLog" ]; then
     cp ChangeLog "$uniondir/build/"
 fi
 
+# Make sure "$uniondir/build/*" owned by nobody before we start building
+chown -R nobody "$uniondir/build"
+
 if ! grep "^nobody" "$uniondir/etc/sudoers" >/dev/null 2>&1; then
     echo "allowing 'nobody' sudo rights in the chroot"
     touch "$uniondir/etc/sudoers"
-- 
1.6.6



More information about the arch-general mailing list