3
0
Fork 0
forked from mirrors/nixpkgs

make-disk-image.nix: Really fix write permissions in the store

I think the current one applies the -exec only to those that match
'-type d'. Let's switch it to something that humans can understand...
This commit is contained in:
Tuomas Tynkkynen 2017-12-17 00:26:51 +02:00 committed by Tuomas Tynkkynen
parent 3c82e6fc82
commit 758b4c1ea4

View file

@ -130,7 +130,7 @@ let format' = format; in let
fakeroot nixos-prepare-root $root ${channelSources} ${config.system.build.toplevel} closure
# fakeroot seems to always give the owner write permissions, which we do not want
find $root/nix/store -mindepth 1 -maxdepth 1 -type f -o -type d -exec chmod -R a-w '{}' \;
find $root/nix/store -mindepth 1 -maxdepth 1 -type f -o -type d | xargs chmod -R a-w
echo "copying staging root to image..."
cptofs ${optionalString partitioned "-P 1"} -t ${fsType} -i $diskImage $root/* /