diff options
Diffstat (limited to 'sys-fs/zfs-kmod')
-rw-r--r-- | sys-fs/zfs-kmod/Manifest | 6 | ||||
-rw-r--r-- | sys-fs/zfs-kmod/files/zfs-kmod-2.1.11-gentoo.patch | 24 | ||||
-rw-r--r-- | sys-fs/zfs-kmod/metadata.xml | 1 | ||||
-rw-r--r-- | sys-fs/zfs-kmod/zfs-kmod-2.1.11-r1.ebuild | 163 | ||||
-rw-r--r-- | sys-fs/zfs-kmod/zfs-kmod-9999.ebuild | 141 |
5 files changed, 243 insertions, 92 deletions
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest index df942702f7fb..9f53aebf0ef8 100644 --- a/sys-fs/zfs-kmod/Manifest +++ b/sys-fs/zfs-kmod/Manifest @@ -1,5 +1,6 @@ AUX 2.1.10-Revert-ZFS_IOC_COUNT_FILLED-does-unnecessary-txg_wai.patch 1932 BLAKE2B 761f1ed4a17c946fb08aa46c3b9defb0672897311dc61225f28298af7569f6350b264cb917696c091ebbf2a95aec8e2005385d27d3f996b99cc424ae0b503082 SHA512 ebdb7c6562eba403397b17dc0830f5c10a80b339ff62f52b569b4ddc28660e8ba353f2e54927e546812fe17539249ba6d1757d5cc150d3a2a75f41e702bcd239 AUX 2.1.7-ppc64-ieee128-compat.patch 6889 BLAKE2B 9214915ed5b1d149927d46f749903fbb9b4d243d993041b8c6db039dcb7a3968a315f211e010ef9373b721336d45daef264d951e7ea1e0aed01818ebccae9d02 SHA512 4e3edbe396d0c1fdb7b286417b2bf7fe114b392e09158b3f5d3e3d1c4844bf0d59263309883363175dacd63194fd0d6a120ace35c83989d0546dae825bbb91bd +AUX zfs-kmod-2.1.11-gentoo.patch 1076 BLAKE2B d2b0fe2ff1ac31c2a2a184141f107010dae61d2de465462b8177db1a07918be2bd2fc4d4570ad8758da87ef14cf3878db062fe9eb5b53fa3156e7db5c06073d4 SHA512 9e103aae75036e52f89e79c4d4ed3cffe670ef423cda7c2f936533b9329e994c7a02d241289f6565e9d086e5b0bdd6865ab3677c3ad84eaadf3abe310977b6a8 AUX zfs-kmod-2.1.6-fgrep.patch 2183 BLAKE2B b8c9b58cc6d94e9ddeacbe3c5eca9d040f1c6fba84b814c8c553d5c1e15334765d3190286a4ad2298762bc54f66a8b89ef69d115cfbd5a25d928170a1d46a770 SHA512 f65e7ffa8cfd00da7ad6d1fcbf5d61172c52e55ea2630f719b49750692c1c046e8baed0e04cadc841adbd804cf861ec712b0d07dbbcae7c1c3b475326045ae8c DIST zfs-2.1.10.tar.gz 35101856 BLAKE2B 5b1a17d192097f5eab1ef3192217fa34b276b6f344a5114a5411be43208616ac682ae2129ae9da15b4ba6207171ae82140f823041a8067441459d51d994df271 SHA512 3189c6f822c7b6caba650a43f321114ef0bd42b72f566c44ba2400005c61cc3d420149a72520aed5b94494c51c35629a6f645273941774d964f2b61c31c366b2 DIST zfs-2.1.10.tar.gz.asc 836 BLAKE2B 5a6b408932cb4f39f5a226598527115aa4fa6c105c8b8ad9f236a5909a948150db712bb1f35e4e16a2b7fc7e434530f93c6a6cd2aab40d628b1ded9891694578 SHA512 a45bcce13e7261f90feda51a131fa0c86e2d3c2711286a462072fb120ccbc85719c2bbecb441147a057accffb841ca82df0ba65e1abc0ece9dea8a97cfa31af5 @@ -10,8 +11,9 @@ DIST zfs-2.1.7.tar.gz.asc 836 BLAKE2B 648fb818860a1cecc2ec42f23102e0466c038bfe48 DIST zfs-2.1.9.tar.gz 35106538 BLAKE2B d7553cc162687531b254089e29e2e15e2eb6b362cecd8e70c24bbb5dbffbde82036ad2d416f4caeceaa324bee8a2e59d9e3cd8a3bf55a2e3c0718c7af9562812 SHA512 a3c410abe911be7d3d66af8ad7023a810eb4ae3284001e544c3a34275eb17a4916a7c094936a2628a590007c007eea84673efa9f3201fd9f24c499fd5ed3ed75 DIST zfs-2.1.9.tar.gz.asc 836 BLAKE2B 1e76525eab338398dd6ff7539ea4e7d18847d0f40e9093d813ec93fce5fa4c16e09f91c0805ba01a29190f673d131f85442c13035166d6f2d007a7e42dc15486 SHA512 35e1213fcac0458e1243355beba021dfefef455df2b341fbc4b10047f9ed4747df84e319d10ffe4bbcd572fbf014019e0dec200eb4e7d3c116fb805369182cb0 EBUILD zfs-kmod-2.1.10-r1.ebuild 5576 BLAKE2B 815dd6a12488b0a17e67edc6b77709dc67c8c4eaa12b636fc878df712ce39c3abf5b80960d56cfa314ed9257a3b810b5c067305febd6af451dd6346246ce2f13 SHA512 d77feb3c9ac5698c8d1db64ff22dcd96bff54144e674ad1ef254fa5d1c047c5e0f29b165c037ece23dee9abe89f4ce0e93d1e71267841c69d209ab9dc1a7e65e +EBUILD zfs-kmod-2.1.11-r1.ebuild 4037 BLAKE2B 7627f4d740f94b6f3682603553c07a9d48a362111a4ca99f02bf51e792c4e3683b17418288bf031ab941e81062289cb6256f0e559e238a60fe942a4a4045e3d2 SHA512 4ac66f8c38397ab60b1ffc1bf15beab0116fe68b25959ddd5eb52d08b2238287f89bcda024b76da62beef00f9f0543055df78b12bf9f1d9dc9c776a03aed1290 EBUILD zfs-kmod-2.1.11.ebuild 5435 BLAKE2B 792a37580d9cc5452a9b200751d82d337a61f42f01db006b31d1a26b14c0e4c12c654addad3c2eb8b7368062c277dd32bc9e10d8e124e05d66caa753efaf7432 SHA512 ac23176a1c1bba0a6309d4f4c8d2114b2a720409789759c88a94264041495c01d6f3dbc8c8e2515428ca33b87d56886bb535e46015e5c1848bf924e1006629a0 EBUILD zfs-kmod-2.1.7.ebuild 5580 BLAKE2B 5e4ef24ec54cf5dda899cf9151de0df0a2ef981a9f6a465ab381392dfe8a9214aecc29da61e83c8b317eb568abaa1abff6231660e1c608f709c88d6610da5264 SHA512 253c5cda1e71b51bd2938151ae62872e780a3e2ff3129ef14d39176697f23693c4692da167a3cfa9b386d8521bed63e5345ea8adb60b480d3bac44b198f7a477 EBUILD zfs-kmod-2.1.9.ebuild 5432 BLAKE2B 1f3473798cb522c80b1d9d244aad191c0118ebaafc8d2041cfad82513b16d68221467473efed4a7b084a44cd0a19331089510ddc402fa064cb15bf21914766ff SHA512 ed69ee9fcfb0ab1db51c1e3ee2a0a155a3eccdd1d297f83dffc3376ef20558e0421e441db0b00302cc2dd499e1693e4b63bbb95102da800e42635f00be2e7f54 -EBUILD zfs-kmod-9999.ebuild 6569 BLAKE2B 2bf117650742e0044bf78d4838c0f8b1a2895d4bac31df742be78ce93aa321074840233d825b8844d01a2de0d1923d0f42bacb53109b7c034592babdb5c4dde9 SHA512 f0342de93072653647992b0b1c22c81f026697446b721fb44cde9808beea93651d58323ebdefb783adfc9eb3b2d8ff02fb267fdf6e4109e1b2355e1867ffedba -MISC metadata.xml 651 BLAKE2B 477c5d768a2eddab7bc0c14d0845801e25bfd9298fe229a132d7ff11a8560988d0230ec5d4b1447df32f58b9754df0cbe989f2a5600cd3fa99124ea4edc45cdd SHA512 d9bf0598c87bcdaab7d81dd5502caf1400f3c8d3834a6770630d85ed365cd4ebb3beeebae72d2d4d49bcdd0aa6cd709aa57cb2af4195dfc04a9c0cef89cfd724 +EBUILD zfs-kmod-9999.ebuild 5367 BLAKE2B 9b1c77345362ca3f60bbcd2897288778794beb86f5ca3ff3fdd58fb78aee59a510d47c8045941d3c6e2602bf909cc7bb51418692db76ba33166069037ebbaea1 SHA512 156d64dd90d22a63bdefcbadcc0639fa27c896f6ca7cf56e96246afe35a72d6ffd1023d0ec982de2c4f7fd62aebf7381ba78442c4b97480f363959a2ba4a24c2 +MISC metadata.xml 776 BLAKE2B 4c48182f7ceee679b4d947a70cb232980969b59bdc425463a929b6ae8be5f79450a3869bf3cc4d00069b65cda8a06f42eba29a7974c5e1b34a2998992901bcbe SHA512 f3f0af7dcdd26a01fc1b00af46ff64e7e6d7bb83a2225ea4cbff5c1a56651ddfdf3e7f59af914833f52828b9d059c6a8cb7f32037319abed129c40987349745f diff --git a/sys-fs/zfs-kmod/files/zfs-kmod-2.1.11-gentoo.patch b/sys-fs/zfs-kmod/files/zfs-kmod-2.1.11-gentoo.patch new file mode 100644 index 000000000000..53c5f27b3bed --- /dev/null +++ b/sys-fs/zfs-kmod/files/zfs-kmod-2.1.11-gentoo.patch @@ -0,0 +1,24 @@ +Hack to pass the full linux-mod-r1 toolchain to make during ./configure. +Not needed at build time given can pass it normally then. + +Eclass has workarounds, compiler/version matching, and its own set of +user variables which creates disparity between ebuilds if not used. + +For the (normal) alternative: KERNEL_{CC,LD} alone is insufficient, +but combining with KERNEL_LLVM=1 when CC_IS_CLANG will allow it +to work for *most* people (will likely still need KERNEL_LD from +linux-mod-r1, or ThinLTO kernels may fail with sandbox violations). + +Note KERNEL_* also cause failure if they contain spaces. + +https://bugs.gentoo.org/865157 +--- a/config/kernel.m4 ++++ b/config/kernel.m4 +@@ -646,6 +646,5 @@ + AC_TRY_COMMAND([ + KBUILD_MODPOST_NOFINAL="$5" KBUILD_MODPOST_WARN="$6" +- make modules -k -j$TEST_JOBS ${KERNEL_CC:+CC=$KERNEL_CC} +- ${KERNEL_LD:+LD=$KERNEL_LD} ${KERNEL_LLVM:+LLVM=$KERNEL_LLVM} ++ make modules -k -j$TEST_JOBS '${GENTOO_MAKEARGS_EVAL}' + CONFIG_MODULES=y CFLAGS_MODULE=-DCONFIG_MODULES + -C $LINUX_OBJ $ARCH_UM M=$PWD/$1 >$1/build.log 2>&1]) diff --git a/sys-fs/zfs-kmod/metadata.xml b/sys-fs/zfs-kmod/metadata.xml index 936f4ff82c8e..7e27782c6aeb 100644 --- a/sys-fs/zfs-kmod/metadata.xml +++ b/sys-fs/zfs-kmod/metadata.xml @@ -10,6 +10,7 @@ <name>Sam James</name> </maintainer> <use> + <flag name="dist-kernel-cap">Prevents upgrading to an unsupported kernel version when combined with USE=dist-kernel</flag> <flag name="rootfs">Pull dependencies and check kernel options required for root-on-zfs</flag> </use> <upstream> diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.11-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.11-r1.ebuild new file mode 100644 index 000000000000..cd38e7bd2037 --- /dev/null +++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.11-r1.ebuild @@ -0,0 +1,163 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools dist-kernel-utils 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.2 +MODULES_KERNEL_MIN=3.10 + +if [[ ${PV} == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/openzfs/zfs.git" + unset MODULES_KERNEL_MAX +else + 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?}" + VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/openzfs.asc + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~sparc" + fi +fi + +LICENSE="CDDL MIT debug? ( GPL-2+ )" +SLOT="0/${PVR}" +IUSE="custom-cflags debug +rootfs" +RESTRICT="test" + +BDEPEND=" + dev-lang/perl + app-alternatives/awk +" + +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-${MODULES_KERNEL_MAX%%.*}.$(( ${MODULES_KERNEL_MAX##*.} + 1)) + ) ) + " +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 + + 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() { + 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" + + 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 +} + +pkg_postinst() { + linux-mod-r1_pkg_postinst + + if [[ -z ${ROOT} ]] && use dist-kernel ; then + 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 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 +} diff --git a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild index 1df8508ad03d..82ac6d7c464a 100644 --- a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild +++ b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild @@ -3,29 +3,29 @@ EAPI=8 -inherit autotools dist-kernel-utils flag-o-matic linux-mod toolchain-funcs +inherit autotools dist-kernel-utils flag-o-matic linux-mod-r1 multiprocessing DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs" HOMEPAGE="https://github.com/openzfs/zfs" -if [[ ${PV} == "9999" ]]; then +MODULES_KERNEL_MAX=6.2 +MODULES_KERNEL_MIN=3.10 + +if [[ ${PV} == 9999 ]] ; then inherit git-r3 EGIT_REPO_URI="https://github.com/openzfs/zfs.git" + unset MODULES_KERNEL_MAX else - VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/openzfs.asc inherit verify-sig - MY_PV="${PV/_rc/-rc}" + 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="6.2" - - # 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))" + VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/openzfs.asc - if [[ ${PV} != *_rc* ]]; then + if [[ ${PV} != *_rc* ]] ; then KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~sparc" fi fi @@ -33,32 +33,30 @@ fi LICENSE="CDDL MIT debug? ( GPL-2+ )" SLOT="0/${PVR}" IUSE="custom-cflags debug +rootfs" - -RDEPEND="${DEPEND}" +RESTRICT="test" BDEPEND=" dev-lang/perl app-alternatives/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}:= ) +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-${MODULES_KERNEL_MAX%%.*}.$(( ${MODULES_KERNEL_MAX##*.} + 1)) + ) ) " fi -# PDEPEND in this form is needed to trick portage suggest -# enabling dist-kernel if only 1 package have it set +# Used to suggest matching USE, but without suggesting to disable PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )" -RESTRICT="debug? ( strip ) test" - -DOCS=( AUTHORS COPYRIGHT META README.md ) +PATCHES=( + "${FILESDIR}"/${PN}-2.1.11-gentoo.patch +) pkg_pretend() { use rootfs || return 0 @@ -72,44 +70,26 @@ pkg_pretend() { } pkg_setup() { - CONFIG_CHECK=" - !DEBUG_LOCK_ALLOC + local CONFIG_CHECK=" EFI_PARTITION - MODULES - !PAX_KERNEXEC_PLUGIN_METHOD_OR - !TRIM_UNUSED_KSYMS ZLIB_DEFLATE ZLIB_INFLATE + !DEBUG_LOCK_ALLOC + !PAX_KERNEXEC_PLUGIN_METHOD_OR " - - use debug && CONFIG_CHECK="${CONFIG_CHECK} - FRAME_POINTER + use debug && CONFIG_CHECK+=" DEBUG_INFO + FRAME_POINTER !DEBUG_INFO_REDUCED " - - use rootfs && \ - CONFIG_CHECK="${CONFIG_CHECK} - BLK_DEV_INITRD - DEVTMPFS + use rootfs && CONFIG_CHECK+=" + BLK_DEV_INITRD + DEVTMPFS " - kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP" + 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 - - kernel_is -ge 3 10 || die "Linux 3.10 or newer required" - - linux-mod_pkg_setup + linux-mod-r1_pkg_setup } src_prepare() { @@ -118,60 +98,41 @@ src_prepare() { # Run unconditionally (bug #792627) eautoreconf - if [[ ${PV} != "9999" ]]; then + if [[ ${PV} != 9999 ]] ; then # Set module revision number - sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release" + sed -Ei "s/(Release:.*)1/\1${PR}-gentoo/" META || die 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" + --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() { - set_arch_to_kernel - - myemakeargs=( - HOSTCC="$(tc-getBUILD_CC)" - V=1 - ) - - emake "${myemakeargs[@]}" + emake "${MODULES_MAKEARGS[@]}" } src_install() { - set_arch_to_kernel + emake "${MODULES_MAKEARGS[@]}" DESTDIR="${ED}" install + modules_post_process - myemakeargs+=( - DEPMOD=: - # INSTALL_MOD_PATH ?= $(DESTDIR) in module/Makefile - DESTDIR="${D}" - ) - - emake "${myemakeargs[@]}" install - - einstalldocs + dodoc AUTHORS COPYRIGHT META README.md } _old_layout_cleanup() { @@ -190,7 +151,7 @@ _old_layout_cleanup() { # kernel/module/Kconfig contains possible compressed extentions. local kext kextfiles - for kext in .ko{,.{gz,xz,zst}}; do + for kext in .ko{,.{gz,xz,zst}}; do kextfiles+=( "${olddir[@]/%/${kext}}" ) done @@ -214,19 +175,19 @@ pkg_postinst() { # 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_pkg_postinst - if [[ -z ${ROOT} ]] && use dist-kernel; then - set_arch_to_pkgmgr + linux-mod-r1_pkg_postinst + + if [[ -z ${ROOT} ]] && use dist-kernel ; then dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}" fi - if use x86 || use arm; then + 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 + 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." |