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

Reply via email to