mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-20 22:27:17 -08:00
sys-fs/zfs-kmod: drop 2.2.8, 2.2.9, 2.2.10
Signed-off-by: Alexander Moch <mail@alexmoch.com> Part-of: https://codeberg.org/gentoo/gentoo/pulls/1759 Signed-off-by: Marc Schiffbauer <mschiff@gentoo.org>
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
DIST zfs-2.2.10.tar.gz 33889026 BLAKE2B 47d11f1e515e7028ef548d5167bfca26135dc331dccaaf69c3b5095bb49788574f628949f19c423c5ca6cff2c5e6defb6a4575298821ab73a18964335fa3e1a6 SHA512 e15cd145072ebb444d15cbec11c770e28c5642ee7b8e7371f1cff968c32c0b121c591ae61a0d70a1f7dba312ac6ae25bd68af2f0b80b4debf1fa6ea05b60b5de
|
||||
DIST zfs-2.2.10.tar.gz.asc 858 BLAKE2B 3c44fa8ff580388ce8b2d915a2f89ed065179d483ade01e4607a428ba37c42275d7c3ec5e251ab24381f743bb20a81c3b44fb1593dd76244396ca295bf9e6e8a SHA512 a2e6d9e22b41dfc995dfaceb1f1adf7d75fea01b0ec3c66c255a121f7faa0d60e445df4ff0fb6cc85e5a4d68d7d3152923f48fe870ebe16a0c69187a9adbe52e
|
||||
DIST zfs-2.2.11.tar.gz 33878728 BLAKE2B 06ef8007a9585c3179b21bc83df33c33906080ccfc13b5de5c0c5597b2d802aff1edc83901a9105bae04b4571b9281124f1b6e18787dbc0295405d969cf66437 SHA512 fca60239b5d3fb222327e4d4a5c763d717cee887796edd636f10d46f8756d38df56cfb18ecc4b56db491e723c9a5eb4b7ea771362e98beb723bae4acf7e35073
|
||||
DIST zfs-2.2.11.tar.gz.asc 858 BLAKE2B 5c32523caffa97b36814281dd2653cbd91452119f683367ad0eedd174b4992d1ad196659bcc99d7d9632afce58c7b25e142d07db634aa32227144f30f48cbbfd SHA512 d4d06f7d121c7ed1856cf4502bfcd3cf1666fb2026a46a868d50d7c67d67f86343b6b99ba5e11c54b7b4a3252d8eb1892bb12e94d52bd3ab57dda1bf819e4632
|
||||
DIST zfs-2.2.8.tar.gz 33852494 BLAKE2B 9e338544488d00a57594d638138896635ea62b80341ad9289b9faad7b899012206fef22e5742e1f5681c58d61d264127ed1e2dfe5aa9b2e9aac2243421c60b11 SHA512 95c203a97032b8ae46cc84e0e6fd68d61e42fb6c6fde7102b04ac85291579c18b1d52b3e93e345a3bc5491bef8bf07b8e7edcbf69cb6222c5d8454a3c83adb11
|
||||
DIST zfs-2.2.8.tar.gz.asc 224 BLAKE2B c3a06953c22d1b485fbd030c93ad0e744c50a91e51bbed5bef56090a1da57b02ec580499a419201f365c99ade53af5d6f545876e6d0da25ee7870fc86786288b SHA512 fcd6fe2412b5a2e83ad2609d56993ed4ad61e10c4f77f1e94a66403adf66ac90604fb567e7cde6420fe0b6a604abfd817a63e744f7c4fe8452b862c1d8cc4df3
|
||||
DIST zfs-2.2.9.tar.gz 33864041 BLAKE2B abafd4da0c98cf93a2648150c859ffc6847aa2f5bfa59f3b6cc1619a2313a1600923c7a07c9e647c6c0f40eda21fb0985de81a436c44513a5bd99984a18329a5 SHA512 bed0f7794ff7898557a4854d8634a96f9be5368b0264558d980e70664fe1f02a35b05a96b5e92acd40e2b741373ca4a312e31ad4f69c4d639c817cce3988f382
|
||||
DIST zfs-2.2.9.tar.gz.asc 858 BLAKE2B caf76646bb3cba75b65b9b93b63f698d172806d60480785938ca3112a67d3e6d9a9b123217df4c92ad682b695292d9e674c4cba819b94276d154aba11e8dcc7d SHA512 ff3a1789154382b06e778b1847519188d520d5037f8c78089309c1d532e8496f682ead1648991bb9eb58dbdedd0007fa7d3157a8887a525470c9220bab3eb4e2
|
||||
DIST zfs-2.3.4.tar.gz 34386899 BLAKE2B e7619445a9138475e51e1578cb4e85032570830faba5aab44013a652596a07e49cf602acfe7fd0e5411199d11614d4686cc3f14fddf3062695ce3da922075efd SHA512 56b90960de6aa94b76f8efc3c84993454a8d544bd47e1270e02caa8d96569e866102e17ef1f16056722bf5f6624fad0bbe7f9ef0e94bc0c3fc16e61b681db815
|
||||
DIST zfs-2.3.4.tar.gz.asc 858 BLAKE2B 2537afa40b48c07b8ad61a4f6973e40a78b5863afbb6b75674fb7a5950ba2dda22dfa93a180190332d234b0b2e2ce14ed61cb34bc0f56e609dad3cdb805ab5c2 SHA512 cc50fb915d4e8a7eb894bdf919940a8c68828e48a5e1f2a08b08a5e75c0eb8a9cd4feaa84742b65d6b2d85ee839ac2b7d565ed7958006ff079d751145463243b
|
||||
DIST zfs-2.3.6.tar.gz 34410022 BLAKE2B 9d83e296cb4e78c67cb9d30ba79b74b4b53c9fd4b0b58cd7a9e1e7b0fafc2c5a49b002c1023d07736c1a6149c61963ccb45e9a82d25944c0a7bd4486ea7fcde8 SHA512 789f534124173693ad461f0fcd5df442588225d5f42420f658fe5c7cb57549417aa472ae95658c90c9dad6818f91d8fb0cbd1fcef2395d167b3ded38477e18c7
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
From be04f4acfa83261571dad5c9c4bfda9fe38063ff Mon Sep 17 00:00:00 2001
|
||||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Date: Wed, 13 May 2026 17:55:23 +0000
|
||||
Subject: [PATCH] Fix aarch64 build failure by removing earlyclobber
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The UVR macros used "+&w" (read-write + earlyclobber) as the
|
||||
constraint for NEON register operands that are declared as explicit
|
||||
hard-register variables via:
|
||||
|
||||
register unsigned char wN asm("vN") __attribute__((vector_size(16)));
|
||||
|
||||
The + modifier implicitly makes the operand also an input (reading the
|
||||
register before the asm runs). The & (earlyclobber) modifier says "this
|
||||
output may be written before all inputs are consumed." Having an
|
||||
earlyclobber output on the same hard-register that is simultaneously
|
||||
an input is a contradiction — GCC 16 now strictly diagnoses this.
|
||||
|
||||
The fix removes the & from "+&w", yielding "+w". The earlyclobber
|
||||
was both incorrect (contradicts the implicit input) and unnecessary
|
||||
(the physical registers are already hard-bound, so the compiler has no
|
||||
freedom to assign conflicting registers anyway).
|
||||
|
||||
Co-Authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
|
||||
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
Issue #18525
|
||||
---
|
||||
.../zfs/vdev_raidz_math_aarch64_neon_common.h | 18 +++++++++---------
|
||||
1 file changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/module/zfs/vdev_raidz_math_aarch64_neon_common.h b/module/zfs/vdev_raidz_math_aarch64_neon_common.h
|
||||
index 1ec4d0218bb0..3c3370290c88 100644
|
||||
--- a/module/zfs/vdev_raidz_math_aarch64_neon_common.h
|
||||
+++ b/module/zfs/vdev_raidz_math_aarch64_neon_common.h
|
||||
@@ -102,14 +102,14 @@
|
||||
|
||||
#define WVR(X) [w##X] "=w" (w##X)
|
||||
|
||||
-#define UVR0_(REG, ...) [w##REG] "+&w" (w##REG)
|
||||
-#define UVR1_(_1, REG, ...) [w##REG] "+&w" (w##REG)
|
||||
-#define UVR2_(_1, _2, REG, ...) [w##REG] "+&w" (w##REG)
|
||||
-#define UVR3_(_1, _2, _3, REG, ...) [w##REG] "+&w" (w##REG)
|
||||
-#define UVR4_(_1, _2, _3, _4, REG, ...) [w##REG] "+&w" (w##REG)
|
||||
-#define UVR5_(_1, _2, _3, _4, _5, REG, ...) [w##REG] "+&w" (w##REG)
|
||||
-#define UVR6_(_1, _2, _3, _4, _5, _6, REG, ...) [w##REG] "+&w" (w##REG)
|
||||
-#define UVR7_(_1, _2, _3, _4, _5, _6, _7, REG, ...) [w##REG] "+&w" (w##REG)
|
||||
+#define UVR0_(REG, ...) [w##REG] "+w" (w##REG)
|
||||
+#define UVR1_(_1, REG, ...) [w##REG] "+w" (w##REG)
|
||||
+#define UVR2_(_1, _2, REG, ...) [w##REG] "+w" (w##REG)
|
||||
+#define UVR3_(_1, _2, _3, REG, ...) [w##REG] "+w" (w##REG)
|
||||
+#define UVR4_(_1, _2, _3, _4, REG, ...) [w##REG] "+w" (w##REG)
|
||||
+#define UVR5_(_1, _2, _3, _4, _5, REG, ...) [w##REG] "+w" (w##REG)
|
||||
+#define UVR6_(_1, _2, _3, _4, _5, _6, REG, ...) [w##REG] "+w" (w##REG)
|
||||
+#define UVR7_(_1, _2, _3, _4, _5, _6, _7, REG, ...) [w##REG] "+w" (w##REG)
|
||||
|
||||
#define UVR0(r...) UVR0_(r)
|
||||
#define UVR1(r...) UVR1_(r)
|
||||
@@ -120,7 +120,7 @@
|
||||
#define UVR6(r...) UVR6_(r, 36, 35, 34, 33, 32, 31)
|
||||
#define UVR7(r...) UVR7_(r, 36, 35, 34, 33, 32, 31, 30)
|
||||
|
||||
-#define UVR(X) [w##X] "+&w" (w##X)
|
||||
+#define UVR(X) [w##X] "+w" (w##X)
|
||||
|
||||
#define R_01(REG1, REG2, ...) REG1, REG2
|
||||
#define _R_23(_0, _1, REG2, REG3, ...) REG2, REG3
|
||||
@@ -1,208 +0,0 @@
|
||||
# Copyright 1999-2026 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.17
|
||||
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
|
||||
"${FILESDIR}"/2.4.2-gcc16-earlyclobber-fix.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
|
||||
}
|
||||
@@ -1,207 +0,0 @@
|
||||
# Copyright 1999-2025 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.15
|
||||
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
|
||||
}
|
||||
@@ -1,208 +0,0 @@
|
||||
# Copyright 1999-2025 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.17
|
||||
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
|
||||
"${FILESDIR}"/${PN}-2.3.3-bdev-interface.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
|
||||
}
|
||||
Reference in New Issue
Block a user