summaryrefslogtreecommitdiff
path: root/sys-fs/zfs-kmod
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-13 02:01:50 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-13 02:01:50 +0000
commit2a3e0d61b3d88306b6fae46756f9ba7d230222ae (patch)
treea0d3259dd259861a49a2d3e6e9220beaa8ec39c2 /sys-fs/zfs-kmod
parent39c32f4d5dca9f6293fccb69e9d50baf494c8de4 (diff)
gentoo auto-resync : 13:12:2024 - 02:01:50
Diffstat (limited to 'sys-fs/zfs-kmod')
-rw-r--r--sys-fs/zfs-kmod/Manifest3
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-2.2.7.ebuild207
2 files changed, 210 insertions, 0 deletions
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index e229e90a28fd..9ac815b5093f 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -7,6 +7,8 @@ DIST zfs-2.2.5.tar.gz 33896824 BLAKE2B ec73c866bf931e4af63a35b3e61e1254d681d21aa
DIST zfs-2.2.5.tar.gz.asc 836 BLAKE2B ae6e47ce82ffda8834047e03f361ca096448f98ea811a09c0c68b202996c613e6524501cda49873acc4bca9f60c298635f89e5d7fe8f00ffa05b192fc98e16ef SHA512 0a397471c3f1ee9675eb9fcd589409c5085f8692930275ea15d92042fadaf1d3772666a3cca5adb1730c953464e0ec00f501cc5333a303d322c636020c2a7060
DIST zfs-2.2.6.tar.gz 33900138 BLAKE2B 0bbe36df779aaf19460a75725af9c9b13e64e77a6020974ad18d60d9fd52db2ddd6ea98b3e6c7451195bdfb347b8aab51db9b3f9a7c15c77bff47329bbd07dd2 SHA512 c217a3397b67d7239bc30bc492d58fff96bb29c9cf73e390d1787a4fb787cb297557e594a926453fed11faaab80363d40853af271f8ee18ce9a317dfde4c6745
DIST zfs-2.2.6.tar.gz.asc 836 BLAKE2B db66f3e2e629ab8a344a8e0c2609bcbb98d69d110fc9e064760ee0c5c25cd67421a71764c4b65d7005e8ff66167bf24beb4be2560a47318eabffa888c1539f26 SHA512 d09f343b3acc3a81e96c069072cfb16d0b490ee77562f50e14524faf05560f9e1d1325ec4bc1760c86ed29186d5860d59646d4ea07385ee3b28d879f2374b9b4
+DIST zfs-2.2.7.tar.gz 33852602 BLAKE2B 31a066d5d543e3328d1afd065a8da4f9b4c52433d585cdbb41936900fd1453431585c6bc4b6e6d9a497a03e79969bae883e17cf4677099686feb3e32577d2777 SHA512 6493faa8e31d9c042c4e8f748d32cb9243212fdf4e0341c19568b47bcf302e60beb89940b80374610b71e1dca1ca5813f3efaddbf1a2453ceabb38381165b271
+DIST zfs-2.2.7.tar.gz.asc 836 BLAKE2B e8fc5e04f5b37a22c741bda46b4573e0cebe85da051c73cf3c5fc267de3c313399b235fc346ca06f4c22d37d2500044a26adb3ea241a65fbcf8760d0ef880039 SHA512 8d22a64c920c2a983429688a340f4ae281decdd30e465591e6b40af9f3016b8f168f4e8ea460600c832a2f46b383ff307986649a645585fb25c34fdfda75ad6e
DIST zfs-2.3.0-rc1.tar.gz 33887119 BLAKE2B dd4e159bef6de216cc51c1dd22620e6edb5b7503d95402022d0b9439471fe432181b1e5df2142e63cdac812a74b62657a96573b3bf48ad78bd6fd885a5f8913e SHA512 fe7de046dd48dbb67545726482a501788a1d5601e6e9a17deeb29047946689d9c8deb95f72b2b47c26a205a3c94fa1f0123437479a06b1376b9dac3dd6faf463
DIST zfs-2.3.0-rc1.tar.gz.asc 195 BLAKE2B f70e6223e94a3f79d6d685b2b06254fba845d79768c82b7a3fedb865b6e6c97499c497def0f4c3e4a2869fed88b0965650ae88d5eb72c0ffaed43c4479d3bf96 SHA512 26b395feaf03e2be20b75ef64e573aa98a0706c46a1eb57503925731bf0cb9bf7fef8a2cdcf163233bccd7da9f5aedc0cae73f0183f39e0f13dcf315b4a5d809
DIST zfs-2.3.0-rc3.tar.gz 33897910 BLAKE2B 518e2c56130a71d4c35f27328184e882815e2ca5b0524e660e174176bee4fdc554e4d1c8264d71f84b6c9641c08088f96a5c35adb5ef6f21b814ccadf093a256 SHA512 1ac53d3a006580f4a32fa33dddd6600d8abac401ed9fc86a2950a8241e0a9dc4a8954a32c44b28b10f22ba7c5cbd8871d9f21c13ccc291c366e9745e83431723
@@ -15,6 +17,7 @@ EBUILD zfs-kmod-2.1.15.ebuild 4188 BLAKE2B 5c8a646f0a674f6caf6fb65bcd785af9eb26c
EBUILD zfs-kmod-2.1.16.ebuild 4191 BLAKE2B 8dd7d93e44b4e12d931c884ce31cbc6f0e3172ca8da925f401840ab019a8c429df8074d43cf2e2c93b8f1b94457eec23633ba803804ac7e3d389dbaed11a9fe4 SHA512 404931126cb21b58f0bb1a566e12403871f03aa2192d8e598d94098c46b5bf34e6c06dce657b94201e2d04b7042b96f4ea78020a28b2730f77b14c7b8fbf59fa
EBUILD zfs-kmod-2.2.5.ebuild 5523 BLAKE2B bb672c18784633c6d1605eb0d46018a015f73853e217a92922043b1183c36ebacc0292708f361b3379b19668f74ebaa6b63019faf9f78bb9e967754d1d0732cd SHA512 198f84fc9946a0f580c8b5b8176ef15aaa7fd6c1c04aff4f75f24a0f1851c1d8ba98b6fa343c6b8c62d96832b4d17b2ece2e20e6dff46803846f605e2cf03885
EBUILD zfs-kmod-2.2.6.ebuild 5527 BLAKE2B adf536ab3827f6568fdd565c828e4ffc1baee7f2138642058c9d1265b3ab7c5b0dec68da365a85e0b95fbdd6ff8ecef55f522d65920e652ca17eec6eb4a72762 SHA512 76e8d5657b07c7258c1877bdd951346d97b9f23560bcadd449919a6929fec1dcf44e7df40a6f1376f5a5a92c0fecf78376c322fcad09ec59010758288905e15a
+EBUILD zfs-kmod-2.2.7.ebuild 5527 BLAKE2B 6c05385c4a5201b4c26acbc9019c33a446922e677f5ff1e071e4f5dda9f76656b22f267b8d98c92cf745ac9c389929b9f0b6364a7614d4d902969b2b89c764f9 SHA512 6a46a6769f03c98426f6f147e519fa21ab9fab1b25e78c322a00a03f7aa414ac327b605ad2c49a290aba070db26dd8be4d688e5f0bd5768cc0d0573e975b46a4
EBUILD zfs-kmod-2.3.0_rc1.ebuild 5527 BLAKE2B e34140a512985eaac32c2842abf7b988761287a66d3ae8e0de6867442b33a940917a961cfc46d0a7256440d1bc7abcd4f36258003403c2718b498c23583615af SHA512 c9287792af68052357a940328d14717a9eb832e6628774a6b354595c585ee87f4a16212ddc67e6dbc818012e7ccb27a678a442078a3c72d8e0a3568c259f714f
EBUILD zfs-kmod-2.3.0_rc3.ebuild 5527 BLAKE2B e34140a512985eaac32c2842abf7b988761287a66d3ae8e0de6867442b33a940917a961cfc46d0a7256440d1bc7abcd4f36258003403c2718b498c23583615af SHA512 c9287792af68052357a940328d14717a9eb832e6628774a6b354595c585ee87f4a16212ddc67e6dbc818012e7ccb27a678a442078a3c72d8e0a3568c259f714f
EBUILD zfs-kmod-9999.ebuild 5527 BLAKE2B 6c05385c4a5201b4c26acbc9019c33a446922e677f5ff1e071e4f5dda9f76656b22f267b8d98c92cf745ac9c389929b9f0b6364a7614d4d902969b2b89c764f9 SHA512 6a46a6769f03c98426f6f147e519fa21ab9fab1b25e78c322a00a03f7aa414ac327b605ad2c49a290aba070db26dd8be4d688e5f0bd5768cc0d0573e975b46a4
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.2.7.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.2.7.ebuild
new file mode 100644
index 000000000000..6f064f20b142
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.2.7.ebuild
@@ -0,0 +1,207 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MODULES_INITRAMFS_IUSE=+initramfs
+inherit autotools flag-o-matic linux-mod-r1 multiprocessing
+
+DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
+HOMEPAGE="https://github.com/openzfs/zfs"
+
+MODULES_KERNEL_MAX=6.12
+MODULES_KERNEL_MIN=4.18
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
+ inherit git-r3
+ unset MODULES_KERNEL_MAX
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH=/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-${MY_PV}"
+
+ ZFS_KERNEL_COMPAT="${MODULES_KERNEL_MAX}"
+ # 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 ~loong ~ppc64 ~riscv ~sparc"
+ fi
+fi
+
+LICENSE="CDDL MIT debug? ( GPL-2+ )"
+SLOT="0/${PVR}"
+IUSE="custom-cflags debug +rootfs"
+RESTRICT="test"
+
+BDEPEND="
+ app-alternatives/awk
+ dev-lang/perl
+"
+
+if [[ ${PV} != 9999 ]] ; then
+ BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )"
+
+ IUSE+=" +dist-kernel-cap"
+ RDEPEND="
+ dist-kernel-cap? ( dist-kernel? (
+ <virtual/dist-kernel-${ZFS_KERNEL_DEP}
+ ) )
+ "
+fi
+
+# Used to suggest matching USE, but without suggesting to disable
+PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.1.11-gentoo.patch
+)
+
+pkg_pretend() {
+ use rootfs || return 0
+}
+
+pkg_setup() {
+ local CONFIG_CHECK="
+ EFI_PARTITION
+ ZLIB_DEFLATE
+ ZLIB_INFLATE
+ !DEBUG_LOCK_ALLOC
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR
+ "
+ use debug && CONFIG_CHECK+="
+ DEBUG_INFO
+ FRAME_POINTER
+ !DEBUG_INFO_REDUCED
+ "
+ use rootfs && CONFIG_CHECK+="
+ BLK_DEV_INITRD
+ DEVTMPFS
+ "
+
+ kernel_is -lt 5 && 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
+
+ linux-mod-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # Run unconditionally (bug #792627)
+ eautoreconf
+
+ if [[ ${PV} != 9999 ]] ; then
+ # Set module revision number
+ sed -Ei "s/(Release:.*)1/\1${PR}-gentoo/" META || die
+ fi
+}
+
+src_configure() {
+ use custom-cflags || strip-flags
+ filter-ldflags -Wl,*
+
+ local myconf=(
+ --bindir="${EPREFIX}"/bin
+ --sbindir="${EPREFIX}"/sbin
+ --with-config=kernel
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ $(use_enable debug)
+
+ # See gentoo.patch
+ GENTOO_MAKEARGS_EVAL="${MODULES_MAKEARGS[*]@Q}"
+ TEST_JOBS="$(makeopts_jobs)"
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ emake "${MODULES_MAKEARGS[@]}"
+}
+
+src_install() {
+ emake "${MODULES_MAKEARGS[@]}" DESTDIR="${ED}" install
+ modules_post_process
+
+ dodoc AUTHORS COPYRIGHT META README.md
+}
+
+_old_layout_cleanup() {
+ # new files are just extra/{spl,zfs}.ko with no subdirs.
+ local olddir=(
+ avl/zavl
+ icp/icp
+ lua/zlua
+ nvpair/znvpair
+ spl/spl
+ unicode/zunicode
+ zcommon/zcommon
+ zfs/zfs
+ zstd/zzstd
+ )
+
+ # kernel/module/Kconfig contains possible compressed extentions.
+ local kext kextfiles
+ for kext in .ko{,.{gz,xz,zst}}; do
+ kextfiles+=( "${olddir[@]/%/${kext}}" )
+ done
+
+ local oldfile oldpath
+ for oldfile in "${kextfiles[@]}"; do
+ oldpath="${EROOT}/lib/modules/${KV_FULL}/extra/${oldfile}"
+ if [[ -f "${oldpath}" ]]; then
+ ewarn "Found obsolete zfs module ${oldfile} for current kernel ${KV_FULL}, removing."
+ rm -rv "${oldpath}" || die
+ # we do not remove non-empty directories just for safety in case there's something else.
+ # also it may fail if there are both compressed and uncompressed modules installed.
+ rmdir -v --ignore-fail-on-non-empty "${oldpath%/*.*}" || die
+ fi
+ done
+}
+
+pkg_postinst() {
+ # Check for old module layout before doing anything else.
+ # only attempt layout cleanup if new .ko location is used.
+ local newko=( "${EROOT}/lib/modules/${KV_FULL}/extra"/{zfs,spl}.ko* )
+ # We check first array member, if glob above did not exand, it will be "zfs.ko*" and -f will return false.
+ # if glob expanded -f will do correct file precense check.
+ [[ -f ${newko[0]} ]] && _old_layout_cleanup
+
+ linux-mod-r1_pkg_postinst
+
+ 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 new pool 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
+}