nixpkgs/nixos/modules/system/boot/loader
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
..
generations-dir fix indentation in several nixos option descriptions 2016-12-16 18:29:25 +01:00
generic-extlinux-compatible extlinux-conf-builder: Choose whether to use DTBs on per-generation basis 2016-07-10 03:03:51 +03:00
grub Revert "grub module: fix efiInstallAsRemovable description" 2017-04-18 14:26:36 +02:00
init-script init-script-builder: handle containers without a kernel 2016-02-10 23:27:28 +00:00
raspberrypi raspberryPi boot loader: don't remove xx-initrd files 2017-02-12 02:48:57 +02:00
systemd-boot nixos/systemd-boot-builder: Don't write .pyc files 2017-04-20 00:37:02 +02:00
efi.nix Use systemd-boot instead of gummiboot 2016-05-31 17:02:47 +02:00
loader.nix nixos: loader: added generic config.boot.loader.timeout option 2015-01-30 09:53:44 +01:00