From deb9e6f71eb7d1b6372cbcfc12400f3ed1816cb5 Mon Sep 17 00:00:00 2001 From: Georgy Yakovlev Date: Wed, 21 Oct 2020 19:28:42 -0700 Subject: sys-fs/zfs-kmod: bump to 2.0.0_rc4 Closes: https://bugs.gentoo.org/750689 Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Georgy Yakovlev --- sys-fs/zfs-kmod/Manifest | 1 + sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc4.ebuild | 175 ++++++++++++++++++++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc4.ebuild (limited to 'sys-fs') diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest index 238f7e1e23d9..6e725fd662a8 100644 --- a/sys-fs/zfs-kmod/Manifest +++ b/sys-fs/zfs-kmod/Manifest @@ -1,3 +1,4 @@ DIST zfs-0.8.4.tar.gz 9285838 BLAKE2B 776bcd6dfab8825c07d315085e288b29bf543d6957325d5d566b7b78c04505dde9bd25eb6684cb4a1b6a657de8a4e1290d04d2b9079d26d6b834a70f1ec3b569 SHA512 9086dc6a6262dd93ca6ec43f1b4c2e5c804deba708c8a7460b8531aa4802b0bf8cac0917a1a00e6af2e96d4a21cd68b85e226bf571bd94041d0325c457106eb1 DIST zfs-0.8.5.tar.gz 9196381 BLAKE2B 8376f360369c4657ff1fc040fb2bba780bbd5d6a98d149d2fa4ba39478588e213dbf6db218c7bd970839f015a69ae00ac951b90afc1c26b34aadf666b2976cab SHA512 3e6e70b76f7cc5b018adb78ce7c3009f88faf5b3da0a03170b03577cd84a2937b6056621c41fc819fd08bf59b28053caf8fec375cf375816a6786bb5646ed773 DIST zfs-2.0.0-rc3.tar.gz 12860212 BLAKE2B bd29ceb17938180ffda9a26cfee97f4b9b42752cd7a3bf5d72705d94967d219889cc84a71d4c0f59aaf718d596011ecdbf07000788aa39a424087eb7cf62a944 SHA512 c09bebb1d1b19079b51305eea1b3d1a428a46bf1301afc9dfa20871ac670d94dc9f7f9127384b2db501fd909f22a16fad0c1b7383eb9ce31a7c0e696e66a097f +DIST zfs-2.0.0-rc4.tar.gz 12861762 BLAKE2B 638eb426955de38efbbb390cb02642298dd73caa5d9c9e28d8aea89bb40967c251bbbe66fbd38e08c922fb1c6fa935c959572abf237ea57ee7d9a5982693e275 SHA512 3972b92c7c0e92416fcde1fa01e7d1c20046de2e21d83a6694d0dc8753f13009b38f0f656202364da85b798886feffd06292b5fd5d23b0b3afc4f81fd86a540b diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc4.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc4.ebuild new file mode 100644 index 000000000000..715dde627549 --- /dev/null +++ b/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc4.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2020 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.9" +fi + +LICENSE="CDDL 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." +} -- cgit v1.2.3-65-gdbad