[PATCH] devtools: give a writable home to nobody for use in makechrootpkg

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



Hi,

This is to ensure $HOME is a writable directory during makechrootpkg
runs. I suspect this is helpful to build various packages - in the
example I have in mind (uim in [extra]), the home directory was
determined by getpwuid(getuid())->pw_dir, so simply exporting a new HOME
environment variable in the PKGBUILD wasn't enough.

Best,
  --Gaetan


diff -aur devtools-0.9.9/mkarchroot devtools-0.9.9.new/mkarchroot
--- devtools-0.9.9/mkarchroot	2010-08-20 12:44:16.000000000 +0200
+++ devtools-0.9.9.new/mkarchroot	2010-08-23 11:11:45.036666760 +0200
@@ -194,5 +194,9 @@
 	if [ ! -e "${working_dir}/.arch-chroot" ]; then
 		date +%s > "${working_dir}/.arch-chroot"
 	fi
+
+	# give nobody a writable home (for makechrootpkg)
+	chroot "${working_dir}" usermod -d /build nobody
+
 	# }}}
 fi


[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