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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxxxxxxxx>
---
 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



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux