From 24fd814c326e282c4321965c31f341dad77e270d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 8 Jan 2021 11:28:34 +0000 Subject: gentoo resync : 08.01.2021 --- sys-fs/zfs-kmod/Manifest | 4 +- sys-fs/zfs-kmod/zfs-kmod-2.0.1.ebuild | 175 ++++++++++++++++++++++++++++++++++ sys-fs/zfs-kmod/zfs-kmod-9999.ebuild | 2 +- 3 files changed, 179 insertions(+), 2 deletions(-) create mode 100644 sys-fs/zfs-kmod/zfs-kmod-2.0.1.ebuild (limited to 'sys-fs/zfs-kmod') diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest index 6105784e505e..102cdc2c8c70 100644 --- a/sys-fs/zfs-kmod/Manifest +++ b/sys-fs/zfs-kmod/Manifest @@ -2,8 +2,10 @@ AUX 0.8.6-copy-builtin.patch 988 BLAKE2B f79add4b341075e3cd98b6aee4bb74b8fadd28b DIST zfs-0.8.5.tar.gz 9196381 BLAKE2B 8376f360369c4657ff1fc040fb2bba780bbd5d6a98d149d2fa4ba39478588e213dbf6db218c7bd970839f015a69ae00ac951b90afc1c26b34aadf666b2976cab SHA512 3e6e70b76f7cc5b018adb78ce7c3009f88faf5b3da0a03170b03577cd84a2937b6056621c41fc819fd08bf59b28053caf8fec375cf375816a6786bb5646ed773 DIST zfs-0.8.6.tar.gz 9295260 BLAKE2B 45424d710aaf75a05f766ae523ae157a24b5cbdcefe72a59e4cede81e42f7a92ae7f01150388437b78cd49f3d28b9664599f2a624516e6b3f1073497194a99f2 SHA512 626b172554f39a5c70f6ea5c599a92fae52534590d1b0273de2bbfc3676d29dff0eade8ca17e5f179a59870c12bc758fb53b7900f8a1fdbdef3a9161b93f9cce DIST zfs-2.0.0.tar.gz 12989903 BLAKE2B 2961b97aa6736af9b4a2bc968d1488f49ec0c0fd7bb22b6bc015047239279efd2d48f8d7c593f9b467ac9d40f99d67363ab551bdfaf1dd71335c37c48c759875 SHA512 2706ae1aa54b882b272502e7a46e57ff41f9db9b123e8cd5dafbdd7f61975d05538167016f943804145d22aa018a1f11c884f692dc3992b28c24eac08112650f +DIST zfs-2.0.1.tar.gz 12970188 BLAKE2B ec1ec4cfcc64adbe7ac0ce65e4fa118a77495886b1c8f2daea0b76f8bb32f0c4bbb6bc7fc16000b6c828f58e60b6ce8359a55ec1f2d2eef1279dd4f430e54f01 SHA512 7e8f490605cb80747a2e471ac5bdd184038f514da379ea7cadf14d5635d5f4cd1b47a7c92c95c4c1b7b0cf5ec22ea905d0d3e8d24e71733484f34cc9429f0f94 EBUILD zfs-kmod-0.8.5.ebuild 4537 BLAKE2B 4cc63f9a5645b5ea988f9a4ccc3aacb1d0e0091047192210a39273ba35cbf7bdde85c495194e9777c84478de2041ed4b44692bacfc82830c6105264d07c8076a SHA512 9bf1464089fa6b0b1dadf4799174ad87331c9f322b59dd234a01542714eabec8fefdc677cbfe7a7f14af0c0067e58599c7342ef0cfea1517aa913781cb62a322 EBUILD zfs-kmod-0.8.6.ebuild 4636 BLAKE2B b3fb6e9f08bdae9c641e350076c3ca9281428510c696932014a72216b7622176471055a32d629c38941f87b92fffb3f895718f87dba1fe36513542aa68beb551 SHA512 3f7b55b7d9c93222997f5ce4f2d45dba5840799ecdb86e99ec35cff4a5f855230355c79ff3c9b6b7fb47aee2355c73ae38f806a1e5c6c6a49f7df1fdd1e11c51 EBUILD zfs-kmod-2.0.0.ebuild 4316 BLAKE2B 1e999fd68487f8fb2f4fa66210a530820858e89984985d069d9b4ec0668fc7d385a316ce724334d92893c30cf115a6c91c674f8f0ea06f4b1b10bb285afaf859 SHA512 18bb55ac74eb466d04832fcfab34b2f7e4d118d341314474f7d25b3fba6769161732d3bb50ac91845c8f6d71350ddf023911ddad2470c5331e1e7c04ef0a6c89 -EBUILD zfs-kmod-9999.ebuild 4317 BLAKE2B f805e2c20a65d928b89496aaff71f548c49594b5f4d7decf776339a173b16f39ea5a7e0bfca78f5b1fc01c08ea3a06fa11317458dc2cc4022bdf459d273d68ed SHA512 4ce6398c6ec3cb2015751b0deb6e8694afa22a6b19b0ca83661eed0e195f7ac06f5fb73eaa52a4d86ad2c039dd300de4d49c8901a51e1d80dd37b3e1b0185319 +EBUILD zfs-kmod-2.0.1.ebuild 4317 BLAKE2B 8288eb07f607415f25433fb5b80fc329e9c3063c9a58fd310c536840ed50f5167dc072a5ba782cd20e3ede8db176800fc637cc20b831046916fe8b4c4224157a SHA512 be4dc816b2a7ddd022601cc50e0b7c57192b2138fd8043fdb67d673a9425438a65009e38dcdb41926e1175c688d59d38276b8aab31e0c3858685d08961cca8dd +EBUILD zfs-kmod-9999.ebuild 4317 BLAKE2B 8288eb07f607415f25433fb5b80fc329e9c3063c9a58fd310c536840ed50f5167dc072a5ba782cd20e3ede8db176800fc637cc20b831046916fe8b4c4224157a SHA512 be4dc816b2a7ddd022601cc50e0b7c57192b2138fd8043fdb67d673a9425438a65009e38dcdb41926e1175c688d59d38276b8aab31e0c3858685d08961cca8dd MISC metadata.xml 551 BLAKE2B c8dc35c8f884d3f5d8720ad838c34ae5be7dc3b3cc63ab7713330a5611bca2829942eeb640b7e00ef285af9b52dd2d134cd793a20baeecff2af56f6b60116e21 SHA512 1cfd4a6a6ec4a120c8e02d3dde831b1f73294a06b798388ff8d4e761ef986e625a56fa980f8d412fab082630f58932116cf795bc5e5728c6485dd9ad54e22a7a diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.0.1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.0.1.ebuild new file mode 100644 index 000000000000..4ea7b063affe --- /dev/null +++ b/sys-fs/zfs-kmod/zfs-kmod-2.0.1.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools 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 + MY_PV="${PV/_rc/-rc}" + SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~ppc64" + S="${WORKDIR}/zfs-${PV%_rc?}" + ZFS_KERNEL_COMPAT="5.10" +fi + +LICENSE="CDDL MIT debug? ( GPL-2+ )" +SLOT="0" +IUSE="custom-cflags debug +rootfs" + +DEPEND="" + +RDEPEND="${DEPEND} + !sys-kernel/spl +" + +BDEPEND=" + dev-lang/perl + virtual/awk +" + +RESTRICT="debug? ( strip ) test" + +DOCS=( AUTHORS COPYRIGHT META README.md ) + +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 + + if [[ ${PV} == "9999" ]]; then + eautoreconf + else + # 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,* + + local myconf=( + CROSS_COMPILE="${CHOST}-" + 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=( + CROSS_COMPILE="${CHOST}-" + HOSTCC="$(tc-getBUILD_CC)" + V=1 + ) + + emake "${myemakeargs[@]}" +} + +src_install() { + set_arch_to_kernel + + myemakeargs+=( + DEPMOD="/bin/true" + DESTDIR="${D}" + INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}" + ) + + emake "${myemakeargs[@]}" install + + einstalldocs +} + +pkg_postinst() { + linux-mod_pkg_postinst + + # Remove old modules + if [[ -d "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" ]]; then + ewarn "${PN} now installs modules in ${EROOT}/lib/modules/${KV_FULL}/extra/zfs" + ewarn "Old modules were detected in ${EROOT}/lib/modules/${KV_FULL}/addon/zfs" + ewarn "Automatically removing old modules to avoid problems." + rm -r "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules" + rmdir --ignore-fail-on-non-empty "${EROOT}/lib/modules/${KV_FULL}/addon" + 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 + + 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 ZFSOnLinux. To" + ewarn "create a newpool that is backward compatible wih GRUB2, use " + ewarn + ewarn "zpool create -d -o feature@async_destroy=enabled " + ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled" + ewarn " -o feature@spacemap_histogram=enabled" + ewarn " -o feature@enabled_txg=enabled " + ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled" + ewarn " ..." + ewarn + ewarn "GRUB2 support will be updated as soon as either the GRUB2" + ewarn "developers do a tag or the Gentoo developers find time to backport" + ewarn "support from GRUB2 HEAD." +} diff --git a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild index e0bcf6bac5bb..4ea7b063affe 100644 --- a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild +++ b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -- cgit v1.2.3