From 2e25c615459cece02218e36e03915942c08188a6 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Mon, 13 Jan 2020 20:15:32 -0500 Subject: [PATCH] zfs: 0.8.2 -> 0.8.3 --- pkgs/os-specific/linux/zfs/default.nix | 24 +++++++++++++------ pkgs/os-specific/linux/zfs/null-systemd.patch | 14 +++++++++++ 2 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 pkgs/os-specific/linux/zfs/null-systemd.patch diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index ae72aad6c0775..d81bf3f14ca0c 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -40,9 +40,18 @@ let inherit rev sha256; }; - patches = extraPatches; - - postPatch = optionalString buildKernel '' + patches = [ ./null-systemd.patch ] ++ extraPatches; + + postPatch = '' + substituteInPlace ./contrib/initramfs/Makefile.am \ + --replace "/usr/share/initramfs-tools" "$out/share/initramfs-tools" + substituteInPlace ./contrib/initramfs/hooks/Makefile.am \ + --replace "/usr/share/initramfs-tools/hooks" "$out/share/initramfs-tools/hooks" + substituteInPlace ./contrib/initramfs/scripts/Makefile.am \ + --replace "/usr/share/initramfs-tools/scripts" "$out/share/initramfs-tools/scripts" + substituteInPlace ./contrib/initramfs/scripts/local-top/Makefile.am \ + --replace "/usr/share/initramfs-tools/scripts/local-top" "$out/share/initramfs-tools/scripts/local-top" + '' + optionalString buildKernel '' patchShebangs scripts # The arrays must remain the same length, so we repeat a flag that is # already part of the command and therefore has no effect. @@ -56,6 +65,7 @@ let substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d" substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)" "$out/etc" substituteInPlace ./cmd/zed/Makefile.am --replace "\$(sysconfdir)" "$out/etc" + substituteInPlace ./etc/systemd/system/zfs-share.service.in \ --replace "/bin/rm " "${coreutils}/bin/rm " @@ -163,9 +173,9 @@ in { # incompatibleKernelVersion = "4.20"; # this package should point to the latest release. - version = "0.8.2"; + version = "0.8.3"; - sha256 = "0miax0h2wg4b2kn8n93804faajy2n1sh25knyy2hg3k77nlr4pni"; + sha256 = "0viql8rnqr32diapkpdsrwm6xj8vw5vi4dk2x2m7s7g0q2zdkahw"; }; zfsUnstable = common { @@ -173,9 +183,9 @@ in { # incompatibleKernelVersion = "4.19"; # this package should point to a version / git revision compatible with the latest kernel release - version = "0.8.2"; + version = "0.8.3"; - sha256 = "0miax0h2wg4b2kn8n93804faajy2n1sh25knyy2hg3k77nlr4pni"; + sha256 = "0viql8rnqr32diapkpdsrwm6xj8vw5vi4dk2x2m7s7g0q2zdkahw"; isUnstable = true; }; } diff --git a/pkgs/os-specific/linux/zfs/null-systemd.patch b/pkgs/os-specific/linux/zfs/null-systemd.patch new file mode 100644 index 0000000000000..60355297dc35b --- /dev/null +++ b/pkgs/os-specific/linux/zfs/null-systemd.patch @@ -0,0 +1,14 @@ +diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am +index 130c6c757..9249f15eb 100644 +--- a/etc/systemd/system/Makefile.am ++++ b/etc/systemd/system/Makefile.am +@@ -31,9 +31,5 @@ $(systemdunit_DATA) $(systemdpreset_DATA):%:%.in + -e 's,@sysconfdir\@,$(sysconfdir),g' \ + $< >'$@' + +-install-data-hook: +- $(MKDIR_P) "$(DESTDIR)$(systemdunitdir)" +- ln -sf /dev/null "$(DESTDIR)$(systemdunitdir)/zfs-import.service" +- + distclean-local:: + -$(RM) $(systemdunit_DATA) $(systemdpreset_DATA)