Okay, this update is a bit more tricky and the patch I've included is
not very nice to be honest.
So the patch causes "mdadm --udev-rules" to search for the right store
path using /proc/self/exec. This has the disadvantage that we could end
up having /run/current-system/bin/mdadm in the rule file.
But on the other hand, when we're on NixOS, we don't need to use that
command *at*all*, so we should be safe.
The patch also sets BINDIR to /sbin, which causes the included rule and
systemd files to not work out of the box on NixOS. But we have a
substituteInPlace where we do rewrite /sbin/mdadm to the right store
path in our udev rule generator, so that shouldn't be an issue.
I've tested this using the mdraid installer test and it succeeded.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This reverts commit 7719f7f23b, again!
It prevents systems from booting, for two reasons:
* The initrd size is going to explode, but I think this is not the
REAL issue. We had that in 666cf99 already, which reverted this
update already.
* Another reason I don't yet know, which is the REAL issue. We need to
investigate and fix that before attempting another update.
Because of that I've also added a small comment before the src attribute
to prevent further updates like this.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This reverts commit 1faf6106c3. It
causes the size of the initrd to explode from ~6 MB to 19 MB:
http://hydra.nixos.org/build/15728196
The reason is that mdadm now contains a self-reference:
$ strings ./result/sbin/mdadm | grep /nix/store
...
ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="%s", ENV{ID_PATH}=="%s", RUN+="/nix/store/y1ap6va0av6jhxf7ddnr8vdwxd7b44gd-mdadm-3.3.2/sbin/mdadm --incremental $env{DEVNAME}"
ACTION=="add", SUBSYSTEM=="block", ENV{ID_PATH}=="%s", RUN+="/nix/store/y1ap6va0av6jhxf7ddnr8vdwxd7b44gd-mdadm-3.3.2/sbin/mdadm --incremental $env{DEVNAME}"
/nix/store/y1ap6va0av6jhxf7ddnr8vdwxd7b44gd-mdadm-3.3.2/sbin/mdmon
(Previously, it referred to /sbin/mdadm.) This causes mdadm, glibc and
linux-headers to be added to the initrd.