diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:21 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:48 +0100 |
commit | 048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch) | |
tree | f8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/os-specific/linux/zfs | |
parent | 030c5028b07afcedce7c5956015c629486cc79d9 (diff) | |
parent | 4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff) | |
download | nixpkgs-rootfs.tar nixpkgs-rootfs.tar.gz nixpkgs-rootfs.tar.bz2 nixpkgs-rootfs.tar.lz nixpkgs-rootfs.tar.xz nixpkgs-rootfs.tar.zst nixpkgs-rootfs.zip |
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/os-specific/linux/zfs')
-rw-r--r-- | pkgs/os-specific/linux/zfs/generic.nix | 38 | ||||
-rw-r--r-- | pkgs/os-specific/linux/zfs/stable.nix | 18 | ||||
-rw-r--r-- | pkgs/os-specific/linux/zfs/unstable.nix | 11 |
3 files changed, 32 insertions, 35 deletions
diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix index 41aa909532f..8adbb8cab8f 100644 --- a/pkgs/os-specific/linux/zfs/generic.nix +++ b/pkgs/os-specific/linux/zfs/generic.nix @@ -76,22 +76,14 @@ stdenv'.mkDerivation { 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" \ --replace "/etc/default" "$out/etc/default" - # TODO: drop when upgrading to 2.2.0 - ${if isUnstable then '' - substituteInPlace ./contrib/initramfs/Makefile.am \ - --replace "/usr/share/initramfs-tools" "$out/usr/share/initramfs-tools" - substituteInPlace ./udev/vdev_id \ - --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ - "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" - '' else '' - substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)/zfs" "$out/etc/zfs" - - find ./contrib/initramfs -name Makefile.am -exec sed -i -e 's|/usr/share/initramfs-tools|'$out'/share/initramfs-tools|g' {} \; - - substituteInPlace ./cmd/vdev_id/vdev_id \ - --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ - "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" - ''} + substituteInPlace ./contrib/initramfs/Makefile.am \ + --replace "/usr/share/initramfs-tools" "$out/usr/share/initramfs-tools" + substituteInPlace ./udev/vdev_id \ + --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ + "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" + substituteInPlace ./config/zfs-build.m4 \ + --replace "bashcompletiondir=/etc/bash_completion.d" \ + "bashcompletiondir=$out/share/bash-completion/completions" ''; nativeBuildInputs = [ autoreconfHook269 nukeReferences ] @@ -138,6 +130,14 @@ stdenv'.mkDerivation { "INSTALL_MOD_PATH=\${out}" ]; + preConfigure = '' + # The kernel module builds some tests during the configurePhase, this envvar controls their parallelism + export TEST_JOBS=$NIX_BUILD_CORES + if [ -z "$enableParallelBuilding" ]; then + export TEST_JOBS=1 + fi + ''; + # Enabling BTF causes zfs to be build with debug symbols. # Since zfs compress kernel modules on installation, our strip hooks skip stripping them. # Hence we strip modules prior to compression. @@ -202,15 +202,15 @@ stdenv'.mkDerivation { changelog = "https://github.com/openzfs/zfs/releases/tag/zfs-${version}"; license = lib.licenses.cddl; - # The case-block for TARGET_CPU has branches for only five CPU families, + # The case-block for TARGET_CPU has branches for only some CPU families, # which prevents ZFS from building on any other platform. Since the NixOS # `boot.zfs.enabled` property is `readOnly`, excluding platforms where ZFS # does not build is the only way to produce a NixOS installer on such # platforms. - # https://github.com/openzfs/zfs/blob/6a6bd493988c75331deab06e5352a9bed035a87d/config/always-arch.m4#L16 + # https://github.com/openzfs/zfs/blob/6723d1110f6daf93be93db74d5ea9f6b64c9bce5/config/always-arch.m4#L12 platforms = with lib.systems.inspect.patterns; - map (p: p // isLinux) [ isx86_32 isx86_64 isPower isAarch64 isSparc ]; + map (p: p // isLinux) ([ isx86_32 isx86_64 isPower isAarch64 isSparc ] ++ isArmv7); maintainers = with lib.maintainers; [ jcumming jonringer globin raitobezarius ]; mainProgram = "zfs"; diff --git a/pkgs/os-specific/linux/zfs/stable.nix b/pkgs/os-specific/linux/zfs/stable.nix index 14cda12e6f3..3e53ba902cb 100644 --- a/pkgs/os-specific/linux/zfs/stable.nix +++ b/pkgs/os-specific/linux/zfs/stable.nix @@ -14,19 +14,15 @@ callPackage ./generic.nix args { # check the release notes for compatible kernels kernelCompatible = if stdenv'.isx86_64 || removeLinuxDRM - then kernel.kernelOlder "6.4" + then kernel.kernelOlder "6.6" else kernel.kernelOlder "6.2"; - latestCompatibleLinuxPackages = linuxKernel.packages.linux_6_1; - extraPatches = [ - (fetchpatch { - name = "musl.patch"; - url = "https://github.com/openzfs/zfs/commit/1f19826c9ac85835cbde61a7439d9d1fefe43a4a.patch"; - sha256 = "XEaK227ubfOwlB2s851UvZ6xp/QOtYUWYsKTkEHzmo0="; - }) - ]; + + latestCompatibleLinuxPackages = if stdenv'.isx86_64 || removeLinuxDRM + then linuxKernel.packages.linux_6_5 + else linuxKernel.packages.linux_6_1; # this package should point to the latest release. - version = "2.1.12"; + version = "2.2.0"; - sha256 = "eYUR5d4gpTrlFu6j1uL83DWL9uPGgAUDRdSEb73V5i4="; + sha256 = "sha256-s1sdXSrLu6uSOmjprbUa4cFsE2Vj7JX5i75e4vRnlvg="; } diff --git a/pkgs/os-specific/linux/zfs/unstable.nix b/pkgs/os-specific/linux/zfs/unstable.nix index 592d94b0030..9c7e14c31bf 100644 --- a/pkgs/os-specific/linux/zfs/unstable.nix +++ b/pkgs/os-specific/linux/zfs/unstable.nix @@ -12,20 +12,21 @@ in callPackage ./generic.nix args { # check the release notes for compatible kernels kernelCompatible = if stdenv'.isx86_64 || removeLinuxDRM - then kernel.kernelOlder "6.5" + then kernel.kernelOlder "6.6" else kernel.kernelOlder "6.2"; latestCompatibleLinuxPackages = if stdenv'.isx86_64 || removeLinuxDRM - then linuxKernel.packages.linux_6_4 - else linuxKernel.packages.linux_6_1; + then linuxKernel.packages.linux_6_5 + else linuxKernel.packages.linux_6_1; # this package should point to a version / git revision compatible with the latest kernel release # IMPORTANT: Always use a tagged release candidate or commits from the # zfs-<version>-staging branch, because this is tested by the OpenZFS # maintainers. - version = "2.2.0-rc4"; + version = "2.2.1-unstable-2023-10-21"; + rev = "95785196f26e92d82cf4445654ba84e4a9671c57"; - sha256 = "sha256-zTG6iujlWB2H8j6i+t59zdyztoDFk373AjgHzC8x5mQ="; + sha256 = "sha256-s1sdXSrLu6uSOmjprbUa4cFsE2Vj7JX5i75e4vRnlvg="; isUnstable = true; } |