Skip to content

Commit

Permalink
mdadm4: init at 4.0
Browse files Browse the repository at this point in the history
Would be just mdadm: 3.3.4 -> 4.0, but it doesn't look like there are
urgent bugfixes, and it is a major release, and wrong RAID handling
kills data, so let's let the early adopters test it a bit.
  • Loading branch information
7c6f434c committed Jan 10, 2017
1 parent 93197aa commit 5b9d806
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
42 changes: 42 additions & 0 deletions pkgs/os-specific/linux/mdadm/4.nix
@@ -0,0 +1,42 @@
{ stdenv, fetchurl, groff }:

assert stdenv.isLinux;

stdenv.mkDerivation rec {
name = "mdadm-4.0";

src = fetchurl {
url = "mirror://kernel/linux/utils/raid/mdadm/${name}.tar.xz";
sha256 = "1ad3mma641946wn5lsllwf0lifw9lps34fv1nnkhyfpd9krffshx";
};

# This is to avoid self-references, which causes the initrd to explode
# in size and in turn prevents mdraid systems from booting.
allowedReferences = [ stdenv.glibc.out ];

patches = [ ./no-self-references.patch ];

makeFlags = [
"NIXOS=1" "INSTALL=install" "INSTALL_BINDIR=$(out)/sbin"
"MANDIR=$(out)/share/man" "RUN_DIR=/dev/.mdadm"
] ++ stdenv.lib.optionals (stdenv ? cross) [
"CROSS_COMPILE=${stdenv.cross.config}-"
];

nativeBuildInputs = [ groff ];

# Attempt removing if building with gcc5 when updating
NIX_CFLAGS_COMPILE = "-std=gnu89";

preConfigure = ''
sed -e 's@/lib/udev@''${out}/lib/udev@' \
-e 's@ -Werror @ @' \
-e 's@/usr/sbin/sendmail@/var/setuid-wrappers/sendmail@' -i Makefile
'';

meta = {
description = "Programs for managing RAID arrays under Linux";
homepage = http://neil.brown.name/blog/mdadm;
platforms = stdenv.lib.platforms.linux;
};
}
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -11496,6 +11496,7 @@ in
mbpfan = callPackage ../os-specific/linux/mbpfan { };

mdadm = callPackage ../os-specific/linux/mdadm { };
mdadm4 = callPackage ../os-specific/linux/mdadm/4.nix { };

mingetty = callPackage ../os-specific/linux/mingetty { };

Expand Down

0 comments on commit 5b9d806

Please sign in to comment.