summaryrefslogtreecommitdiff
path: root/sys-fs/zfs-kmod
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-24 23:59:54 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-24 23:59:54 +0000
commit401101f9c8077911929d3f2b60a37098460a5d89 (patch)
treec2bef4719f6787550f0916aeaa8f4f403a9296af /sys-fs/zfs-kmod
parent4cbcc855382a06088e2f016f62cafdbcb7e40665 (diff)
gentoo resync : 25.03.2022
Diffstat (limited to 'sys-fs/zfs-kmod')
-rw-r--r--sys-fs/zfs-kmod/Manifest8
-rw-r--r--sys-fs/zfs-kmod/files/2.1.3-werror.patch30
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-2.1.3.ebuild4
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-2.1.4.ebuild205
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-9999.ebuild2
5 files changed, 246 insertions, 3 deletions
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index f0ad77c19e77..a589a7a4fd56 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,4 +1,5 @@
AUX 0.8.6-copy-builtin.patch 988 BLAKE2B f79add4b341075e3cd98b6aee4bb74b8fadd28b5ee1062f9260c0418909d380cdd2d637b52d4959ec19cafec1e55b1d05cd6bc358fdffbd6dc1b159e9935083d SHA512 af6b73a2d9d1b4e028c9b959950934798f4d048211d6e4a7e94595982ad2dc8bb4befd52122e3fa0890548e192f2f2ae41d877cad057543e940a7c2710c81a23
+AUX 2.1.3-werror.patch 1008 BLAKE2B 612c91254cef19ef05fd35e5a458f28d22a8d9f51656b8ffdf3be0b07c7c72668c954c0caa2b8eb215060df1c190cb77248baed41568aded6076a048dfee0f6e SHA512 075a3ff6800420e56662c6453a0d4ccf9ea63c8f1e76e690d46f7a3cb0eff3b392caa6a050e306e7b8b14e20ed925cbb6381d442b4845f6178f5026667ae9081
DIST zfs-0.8.6.tar.gz 9295260 BLAKE2B 45424d710aaf75a05f766ae523ae157a24b5cbdcefe72a59e4cede81e42f7a92ae7f01150388437b78cd49f3d28b9664599f2a624516e6b3f1073497194a99f2 SHA512 626b172554f39a5c70f6ea5c599a92fae52534590d1b0273de2bbfc3676d29dff0eade8ca17e5f179a59870c12bc758fb53b7900f8a1fdbdef3a9161b93f9cce
DIST zfs-2.0.7.tar.gz 14550055 BLAKE2B 80f7297f04a21cd8f3f2043d895b0325512ba0cea3bb9223561237754495c8233d29af5a9418a3c06a87510100240a45ef3d59c7ce776fffb5aafdcd18167c21 SHA512 1135abf74bf74685439018f7cd65fc52088f179d113bdd2e6481689bb0f4a016716a07d859107b74501fda00689e80b2488c7c2c53d5f058d6b659909ed85f6f
DIST zfs-2.0.7.tar.gz.asc 836 BLAKE2B 65e7df58c33ccadc4e0ca9dbc1e8c006abbec8442e2da50872a1ab0cbb841fc45152298e8d3b93ee4320ddae6416e3a856caf80d8efb21b19db53dfedbf00e38 SHA512 b901d8e92faa6cfe6010bd54de88c7d18057f434cb07f8a89672d6c446a0a97b23209ee8f02cfd3b2a8f431c68ec977e7dc9f95fe5d385dba0bb6d37338ba682
@@ -6,9 +7,12 @@ DIST zfs-2.1.2.tar.gz 34829045 BLAKE2B ab4e2d85200438373c7eeeaa5256a712dbfb2862b
DIST zfs-2.1.2.tar.gz.asc 836 BLAKE2B 8f5666f5c3d7016a4d79191f42d0a220fe8c654a0d64e3da3b575644fe52c83dcb9f9ef49ba0553771a127bba44e2802f1d366a7a38f670e73612deef76755c3 SHA512 da6bfccd19a249a6891f5e1de6c4b332e98ce4f125f638c046b9cedac3fd79c56a99dd9a620105a40741e5f04b382f5d5996b56cbe576fb268b31e57e0fed6eb
DIST zfs-2.1.3.tar.gz 34898999 BLAKE2B b4fc59ae97c74661f1303e4ce6efd5304842d382e278633debc4475c32074b9d272379d5d4caf8155f7a8cb1cb2b871b8c61fc36e14a612220757c5703a4c50b SHA512 26525bff7d0a831de780883c11eec5b3a142bded269c1dce95a4c466e753feb851cbbc001f0fe40f40209801192f9094fe179570fd117f90931cf11116439aeb
DIST zfs-2.1.3.tar.gz.asc 836 BLAKE2B 305d44ae02a28bc1dc24bb429a0454fdffe19a21e4a5f45ed924e81f8f1972638166a0cf64f99e92e53a50161886935a86c7d42d8fd9533b6b46c6c16c316d9a SHA512 6cdc92bc834f0b6bff9c0939224f1898729f2ae9b865f84906abb2a6b44a75f6aed6c256f03f81fe888d4edc7c421073b9b2f730b804fe532fd43cd127fdc505
+DIST zfs-2.1.4.tar.gz 34896310 BLAKE2B be303f1181f604770536aa4aa61d5319ec408abbd04964cedadd15b3101a15deba6539bb5d833f4fed357f323d74f622d035305df699b213df41ae45bffdd200 SHA512 c7b57c43fc287b22905067ab022df4133d32e1a5dc335f7baf743b4ef88f64c2bf9d41318c2083230d077dd49e68f7d9e6172266e13d4b1eee29d359860f969e
+DIST zfs-2.1.4.tar.gz.asc 836 BLAKE2B b311730f72d534c87a782515f35a354bfbefba0513dc0cee5b0b497cf742590f13be6a49ff8a70d7d6503d0ba06b0266e7d290d718337add614812c3d1b0731a SHA512 53880cd5369f468551bab685eb83739ed76aa286886fdd2cbad4270755fe809da730082a91bba61011f59594fac297ce05645ae32c2c73b4a9aa835f2991a1ee
EBUILD zfs-kmod-0.8.6.ebuild 5746 BLAKE2B b8d5cfa1c83f6ae0b565a0469f0c69def97fd536dc2645b623fe31cd2ca6d802976b3aacd05023ede636abb45c5a968256270809e4c080ace95993d640646f4b SHA512 758cbe8be086ade139b4559684e4cfd6b8b1c61273c88f15b7bb612ae49b89b59f05b8f843a8a4993833406769ca017c582e7dadeef41fc70732bac7d1aa944c
EBUILD zfs-kmod-2.0.7.ebuild 5624 BLAKE2B ec04bc269acb6ea08e202b2a52e9883bd7b16d436c9c0fea54247e73c163664a449997bf06058c24602aba7718c49a224f4e1adc74228a5837290b02bacabf37 SHA512 31b39f7a831e034fe6aeecb169dc46e1641c6844f74c4d74127b30cb691bb4fe4a52a998008c2a16b860398192508727cc3b87f9325d30b6e45f2d0d48ea2ee8
EBUILD zfs-kmod-2.1.2.ebuild 5260 BLAKE2B 4b518043257f793b8f3ec0e4aee6f758ae6cd7ab9ea587507e4517c9431c305fd82da279eceee860869677f52e93ac589507d4fedb200687d20d6cb6508c08d1 SHA512 ae320718801a32eec16f37d9937e6f0aebf31a362b04bc830642d510992a4810147980bf9826e747930e7b6c0ed885169436251aaffcabc796e535f0bfb3ebba
-EBUILD zfs-kmod-2.1.3.ebuild 5245 BLAKE2B 0c4f801a8f4d865be45756462fa533ad86064392e88f3e1cbdd580ffc51cf0ac4584650142c9a7fe0d08e43b7206551cd146b195d1bce3c1287e610df35be312 SHA512 ab5c86fe0dd03b49026b7ef0767ebd39e7a0f2bcc34faff16769f46055a4b5b43cdc0222fb8d97f3b5417936bd3b6129e53d2ef42413a9193704b12cf46f9942
-EBUILD zfs-kmod-9999.ebuild 5245 BLAKE2B 0c4f801a8f4d865be45756462fa533ad86064392e88f3e1cbdd580ffc51cf0ac4584650142c9a7fe0d08e43b7206551cd146b195d1bce3c1287e610df35be312 SHA512 ab5c86fe0dd03b49026b7ef0767ebd39e7a0f2bcc34faff16769f46055a4b5b43cdc0222fb8d97f3b5417936bd3b6129e53d2ef42413a9193704b12cf46f9942
+EBUILD zfs-kmod-2.1.3.ebuild 5292 BLAKE2B 80d9d7cb25cf56286e6808a313a5033af257c5dbaaea8c29ad33c62f8ffb9372cfb50e1217435ab8eac57adac297f5f1b701412201229891e7cae05e16a48d16 SHA512 d26725a3274346917775a21e51b77ada79f025c00d477a9c8a888fca74fd2dedcb8d36af58616678cda7f48ed43da6fa5f2b157c4572b8dcde426831e31cf029
+EBUILD zfs-kmod-2.1.4.ebuild 5245 BLAKE2B 8614756dc32cca2fd5cf61048385b94b646f2d2b35fe5f20029afc5c3faf1e8fc1b1b2ec3e5abe4f9b120dd8c25af689911f130e9771626e2fae7b9fe14191e2 SHA512 96d80fa36f7c55aa6e8fd1ddd62be1ac5b4f5db16446729d82ccc15d6c18c803ccecc49355558bc779b0916d4832e7d24e367a6295a289268911863cce7bfa3f
+EBUILD zfs-kmod-9999.ebuild 5245 BLAKE2B 8614756dc32cca2fd5cf61048385b94b646f2d2b35fe5f20029afc5c3faf1e8fc1b1b2ec3e5abe4f9b120dd8c25af689911f130e9771626e2fae7b9fe14191e2 SHA512 96d80fa36f7c55aa6e8fd1ddd62be1ac5b4f5db16446729d82ccc15d6c18c803ccecc49355558bc779b0916d4832e7d24e367a6295a289268911863cce7bfa3f
MISC metadata.xml 651 BLAKE2B 477c5d768a2eddab7bc0c14d0845801e25bfd9298fe229a132d7ff11a8560988d0230ec5d4b1447df32f58b9754df0cbe989f2a5600cd3fa99124ea4edc45cdd SHA512 d9bf0598c87bcdaab7d81dd5502caf1400f3c8d3834a6770630d85ed365cd4ebb3beeebae72d2d4d49bcdd0aa6cd709aa57cb2af4195dfc04a9c0cef89cfd724
diff --git a/sys-fs/zfs-kmod/files/2.1.3-werror.patch b/sys-fs/zfs-kmod/files/2.1.3-werror.patch
new file mode 100644
index 000000000000..b4aba47d8324
--- /dev/null
+++ b/sys-fs/zfs-kmod/files/2.1.3-werror.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/835646
+https://github.com/openzfs/zfs/commit/7b215d93bcc0a72d7020ccc050c64f39aa7f2be8.patch
+
+From: Ryan Moeller <freqlabs@FreeBSD.org>
+Date: Thu, 17 Mar 2022 13:18:23 -0400
+Subject: [PATCH] Fix module build with -Werror
+
+This is a direct commit to zfs-2.1-release to fix release builds that
+error out on an unused variable. The issue is avoided on master by a
+huge series of commits that change how the ASSERT macros work, but that
+is not feasible to backport.
+
+Reviewed-by: Tony Hutter <hutter2@llnl.gov>
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Reviewed-by: Igor Kozhukhov <igor@dilos.org>
+Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
+Closes #13194
+Closes #13196
+--- a/module/zfs/arc.c
++++ b/module/zfs/arc.c
+@@ -1205,7 +1205,7 @@ static void
+ hdr_l2only_dest(void *vbuf, void *unused)
+ {
+ (void) unused;
+- arc_buf_hdr_t *hdr = vbuf;
++ arc_buf_hdr_t *hdr __maybe_unused = vbuf;
+
+ ASSERT(HDR_EMPTY(hdr));
+ arc_space_return(HDR_L2ONLY_SIZE, ARC_SPACE_L2HDRS);
+
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.3.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.3.ebuild
index 2c6ab28bcfde..39f9cc590a1a 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-2.1.3.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.3.ebuild
@@ -62,6 +62,10 @@ RESTRICT="debug? ( strip ) test"
DOCS=( AUTHORS COPYRIGHT META README.md )
+PATCHES=(
+ "${FILESDIR}"/${PV}-werror.patch
+)
+
pkg_pretend() {
use rootfs || return 0
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.4.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.4.ebuild
new file mode 100644
index 000000000000..415a0f781f18
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.4.ebuild
@@ -0,0 +1,205 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools dist-kernel-utils flag-o-matic linux-mod toolchain-funcs
+
+DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
+HOMEPAGE="https://github.com/openzfs/zfs"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/openzfs.asc
+ inherit verify-sig
+
+ MY_PV="${PV/_rc/-rc}"
+ SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz"
+ SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )"
+ S="${WORKDIR}/zfs-${PV%_rc?}"
+ ZFS_KERNEL_COMPAT="5.17"
+
+ # increments minor eg 5.14 -> 5.15, and still supports override.
+ ZFS_KERNEL_DEP="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
+ ZFS_KERNEL_DEP="${ZFS_KERNEL_DEP%%.*}.$(( ${ZFS_KERNEL_DEP##*.} + 1))"
+
+ if [[ ${PV} != *_rc* ]]; then
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
+ fi
+fi
+
+LICENSE="CDDL MIT debug? ( GPL-2+ )"
+SLOT="0/${PVR}"
+IUSE="custom-cflags debug +rootfs"
+
+RDEPEND="${DEPEND}
+ !sys-kernel/spl
+"
+
+BDEPEND="
+ dev-lang/perl
+ virtual/awk
+"
+
+# we want dist-kernel block in BDEPEND because of portage resolver.
+# since linux-mod.eclass already sets version-unbounded dep, portage
+# will pull new versions. So we set it in BDEPEND which takes priority.
+# and we don't need in in git ebuild.
+if [[ ${PV} != "9999" ]] ; then
+ BDEPEND+="
+ verify-sig? ( sec-keys/openpgp-keys-openzfs )
+ dist-kernel? ( <virtual/dist-kernel-${ZFS_KERNEL_DEP}:= )
+ "
+fi
+
+# PDEPEND in this form is needed to trick portage suggest
+# enabling dist-kernel if only 1 package have it set
+PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
+
+RESTRICT="debug? ( strip ) test"
+
+DOCS=( AUTHORS COPYRIGHT META README.md )
+
+pkg_pretend() {
+ use rootfs || return 0
+
+ if has_version virtual/dist-kernel && ! use dist-kernel; then
+ ewarn "You have virtual/dist-kernel installed, but"
+ ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
+ ewarn "It's recommended to globally enable dist-kernel USE flag"
+ ewarn "to auto-trigger initrd rebuilds with kernel updates"
+ fi
+}
+
+pkg_setup() {
+ CONFIG_CHECK="
+ !DEBUG_LOCK_ALLOC
+ EFI_PARTITION
+ MODULES
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR
+ !TRIM_UNUSED_KSYMS
+ ZLIB_DEFLATE
+ ZLIB_INFLATE
+ "
+
+ use debug && CONFIG_CHECK="${CONFIG_CHECK}
+ FRAME_POINTER
+ DEBUG_INFO
+ !DEBUG_INFO_REDUCED
+ "
+
+ use rootfs && \
+ CONFIG_CHECK="${CONFIG_CHECK}
+ BLK_DEV_INITRD
+ DEVTMPFS
+ "
+
+ kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP"
+
+ if [[ ${PV} != "9999" ]]; then
+ local kv_major_max kv_minor_max zcompat
+ zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
+ kv_major_max="${zcompat%%.*}"
+ zcompat="${zcompat#*.}"
+ kv_minor_max="${zcompat%%.*}"
+ kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
+ "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
+
+ fi
+
+ kernel_is -ge 3 10 || die "Linux 3.10 or newer required"
+
+ linux-mod_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # Run unconditionally (bug #792627)
+ eautoreconf
+
+ if [[ ${PV} != "9999" ]]; then
+ # Set module revision number
+ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
+ fi
+}
+
+src_configure() {
+ set_arch_to_kernel
+
+ use custom-cflags || strip-flags
+
+ filter-ldflags -Wl,*
+
+ # Set CROSS_COMPILE in the environment.
+ # This allows the user to override it via make.conf or via a local Makefile.
+ # https://bugs.gentoo.org/811600
+ export CROSS_COMPILE=${CROSS_COMPILE-${CHOST}-}
+
+ local myconf=(
+ HOSTCC="$(tc-getBUILD_CC)"
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=kernel
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ $(use_enable debug)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ set_arch_to_kernel
+
+ myemakeargs=(
+ HOSTCC="$(tc-getBUILD_CC)"
+ V=1
+ )
+
+ emake "${myemakeargs[@]}"
+}
+
+src_install() {
+ set_arch_to_kernel
+
+ myemakeargs+=(
+ DEPMOD=:
+ # INSTALL_MOD_PATH ?= $(DESTDIR) in module/Makefile
+ DESTDIR="${D}"
+ )
+
+ emake "${myemakeargs[@]}" install
+
+ einstalldocs
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ if [[ -z ${ROOT} ]] && use dist-kernel; then
+ set_arch_to_portage
+ dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
+ fi
+
+ if use x86 || use arm; then
+ ewarn "32-bit kernels will likely require increasing vmalloc to"
+ ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
+ fi
+
+ if has_version sys-boot/grub; then
+ ewarn "This version of OpenZFS includes support for new feature flags"
+ ewarn "that are incompatible with previous versions. GRUB2 support for"
+ ewarn "/boot with the new feature flags is not yet available."
+ ewarn "Do *NOT* upgrade root pools to use the new feature flags."
+ ewarn "Any new pools will be created with the new feature flags by default"
+ ewarn "and will not be compatible with older versions of OpenZFS. To"
+ ewarn "create a newpool that is backward compatible wih GRUB2, use "
+ ewarn
+ ewarn "zpool create -o compatibility=grub2 ..."
+ ewarn
+ ewarn "Refer to /usr/share/zfs/compatibility.d/grub2 for list of features."
+ fi
+}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
index 2c6ab28bcfde..415a0f781f18 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
@@ -19,7 +19,7 @@ else
SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz"
SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )"
S="${WORKDIR}/zfs-${PV%_rc?}"
- ZFS_KERNEL_COMPAT="5.16"
+ ZFS_KERNEL_COMPAT="5.17"
# increments minor eg 5.14 -> 5.15, and still supports override.
ZFS_KERNEL_DEP="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"