From c286d1cb06ab2a93c704a3c8e387967c4d778430 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Thu, 27 Aug 2020 16:49:42 +1200 Subject: [PATCH] zfsUnstable: 0.8.4 -> 2.0.0-rc1 --- pkgs/os-specific/linux/zfs/default.nix | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index 56b36d4f3685..27e26b13a533 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -42,25 +42,27 @@ let inherit rev sha256; }; - patches = [ ./BACKPORT-Linux-5.8-compat-__vmalloc.patch ] ++ extraPatches; + patches = extraPatches; postPatch = 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. - substituteInPlace ./module/zfs/zfs_ctldir.c --replace '"/usr/bin/env", "umount"' '"${utillinux}/bin/umount", "-n"' \ - --replace '"/usr/bin/env", "mount"' '"${utillinux}/bin/mount", "-n"' + substituteInPlace ./module/${optionalString isUnstable "os/linux/"}zfs/zfs_ctldir.c \ + --replace '"/usr/bin/env", "umount"' '"${utillinux}/bin/umount", "-n"' \ + --replace '"/usr/bin/env", "mount"' '"${utillinux}/bin/mount", "-n"' '' + optionalString buildUser '' substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${utillinux}/bin/umount" \ --replace "/bin/mount" "${utillinux}/bin/mount" - substituteInPlace ./lib/libshare/nfs.c --replace "/usr/sbin/exportfs" "${ + substituteInPlace ./lib/libshare/${optionalString isUnstable "os/linux/"}nfs.c --replace "/usr/sbin/exportfs" "${ # We don't *need* python support, but we set it like this to minimize closure size: # If it's disabled by default, no need to enable it, even if we have python enabled # And if it's enabled by default, only change that if we explicitly disable python to remove python from the closure nfs-utils.override (old: { enablePython = old.enablePython or true && enablePython; }) }/bin/exportfs" substituteInPlace ./config/user-systemd.m4 --replace "/usr/lib/modules-load.d" "$out/etc/modules-load.d" - substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d" + substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d" \ + --replace "/etc/default" "$out/etc/default" substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)" "$out/etc" substituteInPlace ./cmd/zed/Makefile.am --replace "\$(sysconfdir)" "$out/etc" @@ -79,6 +81,13 @@ let substituteInPlace ./etc/systemd/system/Makefile.am \ --replace '$(DESTDIR)$(systemdunitdir)' "$out"'$(DESTDIR)$(systemdunitdir)' + ${optionalString isUnstable '' + substituteInPlace ./contrib/initramfs/conf.d/Makefile.am \ + --replace "/usr/share/initramfs-tools/conf.d" "$out/usr/share/initramfs-tools/conf.d" + substituteInPlace ./contrib/initramfs/conf-hooks.d/Makefile.am \ + --replace "/usr/share/initramfs-tools/conf-hooks.d" "$out/usr/share/initramfs-tools/conf-hooks.d" + ''} + substituteInPlace ./etc/systemd/system/zfs-share.service.in \ --replace "/bin/rm " "${coreutils}/bin/rm " @@ -190,6 +199,7 @@ in { version = "0.8.4"; sha256 = "1hl4n900d24gl4vd65qdzq4m62b7bpvckldazcbd1xqcn8xhi6wp"; + extraPatches = [ ./BACKPORT-Linux-5.8-compat-__vmalloc.patch ]; }; zfsUnstable = common { @@ -197,9 +207,9 @@ in { # incompatibleKernelVersion = "4.19"; # this package should point to a version / git revision compatible with the latest kernel release - version = "0.8.4"; + version = "2.0.0-rc1"; - sha256 = "1hl4n900d24gl4vd65qdzq4m62b7bpvckldazcbd1xqcn8xhi6wp"; + sha256 = "0d1m5zwgqzfwbscvb60zvzkjgl5nkbvas22vjsyci3xygz0qwjsb"; isUnstable = true; }; }