diff options
author | Christoph Hrdinka <c.github@hrdinka.at> | 2014-09-09 10:53:52 +0200 |
---|---|---|
committer | Christoph Hrdinka <c.github@hrdinka.at> | 2014-09-09 12:10:54 +0200 |
commit | 4f5b4ceb858c36f77a83dbcd7e5ecccae36696d0 (patch) | |
tree | e5d16c152fc8f6b0a6b8887594e299892c00c3a7 /pkgs | |
parent | 04b2f732360c1ab09089c42fd2f80a9cc809c278 (diff) | |
download | nixpkgs-4f5b4ceb858c36f77a83dbcd7e5ecccae36696d0.tar nixpkgs-4f5b4ceb858c36f77a83dbcd7e5ecccae36696d0.tar.gz nixpkgs-4f5b4ceb858c36f77a83dbcd7e5ecccae36696d0.tar.bz2 nixpkgs-4f5b4ceb858c36f77a83dbcd7e5ecccae36696d0.tar.lz nixpkgs-4f5b4ceb858c36f77a83dbcd7e5ecccae36696d0.tar.xz nixpkgs-4f5b4ceb858c36f77a83dbcd7e5ecccae36696d0.tar.zst nixpkgs-4f5b4ceb858c36f77a83dbcd7e5ecccae36696d0.zip |
build-fhs-chrootenv: bind mount chroots /tmp to hosts /tmp
Diffstat (limited to 'pkgs')
4 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/build-support/build-fhs-chrootenv/destroy.sh.in b/pkgs/build-support/build-fhs-chrootenv/destroy.sh.in index 30b51cb5068..8ddf350913e 100644 --- a/pkgs/build-support/build-fhs-chrootenv/destroy.sh.in +++ b/pkgs/build-support/build-fhs-chrootenv/destroy.sh.in @@ -3,7 +3,7 @@ chrootenvDest=/run/chrootenv/@name@ # Remove bind mount points -rmdir $chrootenvDest/{dev,nix/store,nix,proc,sys,host-etc,home,var,run} +rmdir $chrootenvDest/{dev,nix/store,nix,proc,sys,host-etc,home,var,run,tmp} # Remove symlinks to the software that should be part of the chroot system profile for i in @chrootEnv@/sw/* @@ -15,7 +15,8 @@ do done # Remove the remaining folders -rm -Rf $chrootenvDest/{etc,root,tmp} +rm -Rf $chrootenvDest/{etc,root} +rm -Rf /tmp/chrootenv-@name@ # Remove the chroot environment folder rmdir $chrootenvDest diff --git a/pkgs/build-support/build-fhs-chrootenv/init.sh.in b/pkgs/build-support/build-fhs-chrootenv/init.sh.in index 5b0ab94bc4e..079ec09d60f 100644 --- a/pkgs/build-support/build-fhs-chrootenv/init.sh.in +++ b/pkgs/build-support/build-fhs-chrootenv/init.sh.in @@ -45,4 +45,5 @@ ln -s ../../../host-etc/static/fonts/conf.d/00-nixos.conf $chrootenvDest/etc/fon mkdir $chrootenvDest/root # Create tmp folder -mkdir -m1777 $chrootenvDest/tmp +mkdir -m1777 $chrootenvDest/tmp +mkdir -m1777 -p /tmp/chrootenv-@name@ diff --git a/pkgs/build-support/build-fhs-chrootenv/mount.sh.in b/pkgs/build-support/build-fhs-chrootenv/mount.sh.in index 225d9dbc4f7..c64f9356283 100644 --- a/pkgs/build-support/build-fhs-chrootenv/mount.sh.in +++ b/pkgs/build-support/build-fhs-chrootenv/mount.sh.in @@ -21,3 +21,6 @@ mount --rbind /run $chrootenvDest/run # Bind mount the host system's /etc mount --bind /etc $chrootenvDest/host-etc + +# Bind mount /tmp +mount --bind /tmp/chrootenv-@name@ /run/chrootenv/steam/tmp diff --git a/pkgs/build-support/build-fhs-chrootenv/umount.sh.in b/pkgs/build-support/build-fhs-chrootenv/umount.sh.in index 5089141c0aa..b8222a4121a 100644 --- a/pkgs/build-support/build-fhs-chrootenv/umount.sh.in +++ b/pkgs/build-support/build-fhs-chrootenv/umount.sh.in @@ -3,4 +3,4 @@ chrootenvDest=/run/chrootenv/@name@ # Unmount all (r)bind mounts -umount -l $chrootenvDest/{dev/pts,dev/shm,dev,nix/store,proc,sys,host-etc,home,var,run} +umount -l $chrootenvDest/{dev/pts,dev/shm,dev,nix/store,proc,sys,host-etc,home,var,tmp,run} |