Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfsUnstable: 2.1.13 -> 2.2.0-rc4 #246163

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 23 additions & 35 deletions pkgs/os-specific/linux/zfs/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,7 @@ stdenv'.mkDerivation {
inherit rev sha256;
};

patches = [
(fetchpatch {
name = "musl.patch";
url = "https://github.com/openzfs/zfs/commit/1f19826c9ac85835cbde61a7439d9d1fefe43a4a.patch";
sha256 = "XEaK227ubfOwlB2s851UvZ6xp/QOtYUWYsKTkEHzmo0=";
})
] ++ extraPatches;
patches = extraPatches;

postPatch = optionalString buildKernel ''
patchShebangs scripts
Expand All @@ -82,31 +76,22 @@ 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"
substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)" "$out/etc"

substituteInPlace ./contrib/initramfs/hooks/Makefile.am \
--replace "/usr/share/initramfs-tools/hooks" "$out/usr/share/initramfs-tools/hooks"
substituteInPlace ./contrib/initramfs/Makefile.am \
--replace "/usr/share/initramfs-tools" "$out/usr/share/initramfs-tools"
substituteInPlace ./contrib/initramfs/scripts/Makefile.am \
--replace "/usr/share/initramfs-tools/scripts" "$out/usr/share/initramfs-tools/scripts"
substituteInPlace ./contrib/initramfs/scripts/local-top/Makefile.am \
--replace "/usr/share/initramfs-tools/scripts/local-top" "$out/usr/share/initramfs-tools/scripts/local-top"
substituteInPlace ./contrib/initramfs/scripts/Makefile.am \
--replace "/usr/share/initramfs-tools/scripts" "$out/usr/share/initramfs-tools/scripts"
substituteInPlace ./contrib/initramfs/scripts/local-top/Makefile.am \
--replace "/usr/share/initramfs-tools/scripts/local-top" "$out/usr/share/initramfs-tools/scripts/local-top"
substituteInPlace ./etc/systemd/system/Makefile.am \
--replace '$(DESTDIR)$(systemdunitdir)' "$out"'$(DESTDIR)$(systemdunitdir)'

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 ./cmd/vdev_id/vdev_id \
--replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \
"PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}"
# 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 ]}"
''}
'';

nativeBuildInputs = [ autoreconfHook269 nukeReferences ]
Expand Down Expand Up @@ -168,10 +153,12 @@ stdenv'.mkDerivation {
# Remove provided services as they are buggy
rm $out/etc/systemd/system/zfs-import-*.service

sed -i '/zfs-import-scan.service/d' $out/etc/systemd/system/*

for i in $out/etc/systemd/system/*; do
substituteInPlace $i --replace "zfs-import-cache.service" "zfs-import.target"
if [ -L $i ]; then
continue
fi
sed -i '/zfs-import-scan.service/d' $i
substituteInPlace $i --replace "zfs-import-cache.service" "zfs-import.target"
done

# Remove tests because they add a runtime dependency on gcc
Expand Down Expand Up @@ -232,3 +219,4 @@ stdenv'.mkDerivation {
broken = buildKernel && (kernelCompatible != null) && !kernelCompatible;
};
}

8 changes: 8 additions & 0 deletions pkgs/os-specific/linux/zfs/stable.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
, stdenv
, linuxKernel
, removeLinuxDRM ? false
, fetchpatch
, ...
} @ args:

Expand All @@ -16,6 +17,13 @@ callPackage ./generic.nix args {
then kernel.kernelOlder "6.4"
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=";
})
];

# this package should point to the latest release.
version = "2.1.12";
Expand Down
9 changes: 4 additions & 5 deletions pkgs/os-specific/linux/zfs/unstable.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@ callPackage ./generic.nix args {
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_4
else linuxKernel.packages.linux_6_1;
Comment on lines +19 to +20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inconsistent with the rest of the file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you nitpicking a formatting inconsistency 3 weeks after a PR was merged?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I only stumbled upon this PR yesterday when I dug up my old zfsUnstable bump PR.


# 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.1.13-unstable-2023-08-02";
rev = "245850b66c1e93ec19744ca55aae143d007d2c32";
version = "2.2.0-rc4";

sha256 = "TtgKV02W8OfU6hssULF/IoFXAPHBTvTKXn5hJ/RGAc0=";
sha256 = "sha256-zTG6iujlWB2H8j6i+t59zdyztoDFk373AjgHzC8x5mQ=";

isUnstable = true;
}