From dc7cbdfa65fd814b3b9aa3c56257da201109e807 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 5 Apr 2019 21:17:31 +0100 Subject: gentoo resync : 05.04.2019 --- sys-fs/zfs-kmod/Manifest | 2 +- sys-fs/zfs-kmod/zfs-kmod-9999.ebuild | 131 ++++++++++++++++++++++++----------- 2 files changed, 90 insertions(+), 43 deletions(-) (limited to 'sys-fs/zfs-kmod') diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest index 1f6dd732a2c3..b18c3a554495 100644 --- a/sys-fs/zfs-kmod/Manifest +++ b/sys-fs/zfs-kmod/Manifest @@ -15,5 +15,5 @@ EBUILD zfs-kmod-0.7.8.ebuild 4072 BLAKE2B d148372b05ac609549329f337792e8087841b5 EBUILD zfs-kmod-0.7.9-r1.ebuild 4279 BLAKE2B 793f8e6257e52f67b2a6aeae8da3e6f86e3ac76798e3afcbc253b3b56d203548e883740031f4a973730c50da8c4309ae4804e5b9b95ec91af5489e82faa9765c SHA512 e5a6c17c6fb4f6ab37cbcc5fc4fbdace31585a41292ced5eda922a19178c8e3d85c0b7a1e52eaea94490416111922e5b85a5f7abd7c5aa3f4b815eebae17e7ca EBUILD zfs-kmod-0.7.9.ebuild 4072 BLAKE2B 301b09e71e36e279d2fb8532884bbf7599ae7c1bdc81188b008420039a227ea2efa251b00ebf8b434d5d0e6c3fe41fe0b4dfb27fe599ceb414045a64848f8914 SHA512 d22123433d5cf24e385737076743a515ab2280b5a4e851ab657f78225aed2315c05edf13e15156be172218fcce2d049a1d2f5a353bca39e2061fb61504b0675f EBUILD zfs-kmod-0.7.9999.ebuild 4131 BLAKE2B 10f0553102967537d42f5b2da8ede7c8894ca9134a1421efadd1db538b3381d588fe6729dc37c84ab025212ca01a74c2e60768fe8f7808acbd21f0179b2a9abb SHA512 ad59815b9e2ce844e6caa5232d1e4f17c70b930b8295a28e44f37b8293c602fb8b98f939bb1ea22cef68c8e724de6a581b09073d41fd7a14aa181a0cadb6250c -EBUILD zfs-kmod-9999.ebuild 2737 BLAKE2B 45cc57c6c4f5270e56fe6631843e8ef241bef3848bd8fad4eb941eb028fb00bee9e84e2e7226a898d49574272a0e41b54109ee11b071fb77224e3cfc16655242 SHA512 fd5a3ce13a3f854ac44e1662f5a6c9c6aa0dd209d4369fa42ebb7c19ac2def29071cd6a1ccef2e870c5151aee8faba20aa514065b40c4bcfc7a41e48f5372bc3 +EBUILD zfs-kmod-9999.ebuild 4189 BLAKE2B 716f0a07888b59592e5bc0ad063f5865b1ddbee07617dedb1744a6c5b13f98e3658b01d00260ee60f6ac921f3c64b3038cc2581df45019964e7028487503bc58 SHA512 ea0972a782e3e25fd12156f1b13d07eb89155ac3dbf8bc3026557ba04c11f224f12f603e90672abd6899a6153ce96612359d4907a779abada3b4f53ca8519cab MISC metadata.xml 551 BLAKE2B c8dc35c8f884d3f5d8720ad838c34ae5be7dc3b3cc63ab7713330a5611bca2829942eeb640b7e00ef285af9b52dd2d134cd793a20baeecff2af56f6b60116e21 SHA512 1cfd4a6a6ec4a120c8e02d3dde831b1f73294a06b798388ff8d4e761ef986e625a56fa980f8d412fab082630f58932116cf795bc5e5728c6485dd9ad54e22a7a diff --git a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild index 19b0a9a5a511..268f01711031 100644 --- a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild +++ b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild @@ -1,53 +1,52 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="5" +EAPI=7 -if [ ${PV} == "9999" ]; then - AUTOTOOLS_AUTORECONF="1" +inherit flag-o-matic linux-info linux-mod toolchain-funcs + +DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs" +HOMEPAGE="https://zfsonlinux.org/" + +if [[ ${PV} == "9999" ]]; then + inherit autotools git-r3 EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git" - inherit git-r3 else SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz" + KEYWORDS="~amd64" + ZFS_KERNEL_COMPAT="${ZFS_KERNEL_COMPAT_OVERRIDE:-5.0}" S="${WORKDIR}/zfs-${PV}" - KEYWORDS="~amd64 ~arm ~ppc ~ppc64" fi -inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils - -DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs" -HOMEPAGE="https://zfsonlinux.org/" - -LICENSE="CDDL GPL-2+" +LICENSE="CDDL debug? ( GPL-2+ )" SLOT="0" IUSE="custom-cflags debug +rootfs" -RESTRICT="debug? ( strip ) test" -DEPEND=" - dev-lang/perl - virtual/awk -" +DEPEND="" RDEPEND="${DEPEND} !sys-fs/zfs-fuse !sys-kernel/spl " -AT_M4DIR="config" -AUTOTOOLS_IN_SOURCE_BUILD="1" +BDEPEND=" + dev-lang/perl + virtual/awk +" + +RESTRICT="debug? ( strip ) test" -DOCS=( AUTHORS COPYRIGHT NOTICE META README.md ) +DOCS=( AUTHORS COPYRIGHT META README.md ) pkg_setup() { linux-info_pkg_setup + CONFIG_CHECK=" !DEBUG_LOCK_ALLOC - !GRKERNSEC_RANDSTRUCT - !PAX_KERNEXEC_PLUGIN_METHOD_OR - !TRIM_UNUSED_KSYMS EFI_PARTITION - KALLSYMS MODULES + !PAX_KERNEXEC_PLUGIN_METHOD_OR + !TRIM_UNUSED_KSYMS ZLIB_DEFLATE ZLIB_INFLATE " @@ -64,31 +63,42 @@ pkg_setup() { DEVTMPFS " - kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required" + kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP" + + kernel_is -ge 2 6 32 || die "Linux 2.6.32 or newer required" - [ ${PV} != "9999" ] && \ - { kernel_is le 4 17 || die "Linux 4.17 is the latest supported version."; } + if [[ ${PV} != "9999" ]]; then + local KV_MAJOR_MAX="${ZFS_KERNEL_COMPAT%%.*}" + local KV_MINOR_MAX="${ZFS_KERNEL_COMPAT##*.}" + kernel_is -le "${KV_MAJOR_MAX}" "${KV_MINOR_MAX}" || die \ + "Linux ${KV_MAJOR_MAX}.${KV_MINOR_MAX} is the latest supported version" + fi check_extra_config } src_prepare() { - # Remove GPLv2-licensed ZPIOS unless we are debugging - use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in" + default - # Set module revision number - [ ${PV} != "9999" ] && \ - { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; } + 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 - autotools-utils_src_prepare + # Remove GPLv2-licensed ZPIOS unless we are debugging + use debug || sed -e 's/^subdir-m += zpios$//' -i module/Makefile.in } src_configure() { + set_arch_to_kernel + use custom-cflags || strip-flags + filter-ldflags -Wl,* - set_arch_to_kernel - local myeconfargs=(${myeconfargs} + local myconf=( --bindir="${EPREFIX}/bin" --sbindir="${EPREFIX}/sbin" --with-config=kernel @@ -97,23 +107,60 @@ src_configure() { $(use_enable debug) ) - autotools-utils_src_configure + econf "${myconf[@]}" +} + +src_compile() { + set_arch_to_kernel + + default } src_install() { - autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}" + set_arch_to_kernel + + emake \ + DEPMOD="/bin/true" \ + DESTDIR="${D}" \ + INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}" \ + 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" + 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" + 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 ZFSOnLinux 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