nixpkgs/nixos/modules
aszlig e662e035f9
nixos/systemd-boot-builder: Don't write .pyc files
This has surfaced since d990aa7163.

The "simpleUefiGummiboot" installer test fails since this commit,
because that commit introduced a small check to verify whether the store
was altered.

While installing NixOS for the first time, the store is usually in
/mnt/nix/store and without the read-only bind mount that's preventing
programs from altering the store.

So after nixos-install is done creating the system closure and setting
it as the active system profile, the bootloader is written from the
closure inside the chroot. The systemd-boot-builder is invoked during
this step, which adds .pyc files for various Python modules of the
Python 3 store path, which in turn invalidates the hash of the Python 3
store path itself.

At the time the system is booted up again, the nix-store is verified and
fails with something like this:

path /nix/store/zvm545rqc4d97caqq9h7344bnd06jhzb-python3-3.5.3 was
modified! expected hash
b2c975f4b8d197443fbb09690fb3f6545e165dd44c9309d7d6df2fce0579ebeb, got
bccca19f39c9d26d857ccf1fb72818b2b817967e6d497a25a1283e36ed0acf01

Running the interpreter with the -B argument prevents Python from
writing those byte code files:

https://docs.python.org/3/using/cmdline.html#cmdoption-B

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2017-04-20 00:37:02 +02:00
..
config treewide: use boolToString function 2017-04-11 18:18:53 +02:00
hardware rtl8192su-firmware: init at unstable-2016-10-05 2017-03-31 10:49:38 +02:00
i18n/input-method Remove top-level kde5 attribute 2017-02-27 11:49:10 -06:00
installer Refactor nixos-install to separate out filesystem build logic 2017-04-16 16:09:41 +00:00
misc Remove static uid/gid 2017-03-18 13:54:39 +01:00
profiles nixos: fix renaming warning in graphical profile 2017-03-03 07:27:41 -06:00
programs Merge pull request #24962 from makefu/modules/command-not-found/refactor 2017-04-18 17:18:20 +02:00
security acme: Add "domain" option to separate domain from name 2017-04-11 18:28:05 +02:00
services Merge pull request #24601 from pbogdan/unclutter 2017-04-19 18:40:43 +02:00
system nixos/systemd-boot-builder: Don't write .pyc files 2017-04-20 00:37:02 +02:00
tasks network-interfaces-scripted: Add static parameter for default gateway 2017-04-16 22:59:53 +02:00
testing kdm: drop service 2017-02-11 13:55:09 -05:00
virtualisation Merge pull request #24360 from clefru/gce-image-shrink-on-master 2017-04-10 12:01:53 +02:00
module-list.nix Merge pull request #24486 from srp/master 2017-04-16 21:40:21 +02:00
rename.nix nixos/fontconfig: remove renderMonoTTFAsBitmap 2017-04-03 08:24:32 -05:00