From c8a77dfe4d3d307c1d5dd2650b7297447d8b609d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 12 Jan 2019 16:58:08 +0000 Subject: gentoo resync : 12.01.2019 --- sys-fs/zfs-kmod/Manifest | 2 + .../files/zfs-kmod-0.7.12-kernel-4.20-compat.patch | 31 +++++ sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild | 148 +++++++++++++++++++++ 3 files changed, 181 insertions(+) create mode 100644 sys-fs/zfs-kmod/files/zfs-kmod-0.7.12-kernel-4.20-compat.patch create mode 100644 sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild (limited to 'sys-fs/zfs-kmod') diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest index 31c650ebfe5a..61324aee453d 100644 --- a/sys-fs/zfs-kmod/Manifest +++ b/sys-fs/zfs-kmod/Manifest @@ -1,3 +1,4 @@ +AUX zfs-kmod-0.7.12-kernel-4.20-compat.patch 1213 BLAKE2B 037d0979fe16d3693f3ae60176f737bfaa9e4df2fcd36d785469f0aa548f50a5014b0806bc83070e07c82ef8353ff4093776b4b624bb78a7f56e14182c671309 SHA512 48d7e08951f6f91831636b89d6031394641eb0a021ce5c944b5e7f69aae71d1b48ee81dc9ac3cd7c95b037afc2a83cd243b17fb98bb7308234e38f557fcadc35 DIST zfs-0.6.5.11.tar.gz 2521959 BLAKE2B 95b145a26620995343df1a468367b882bc71ab3e4812c05839d49d0cd877b756185c91b2609986f91939fbfda322809ddefc8ff9207fe076db03e0038e585ea2 SHA512 877052da2a0cdc78b10cb5041da55e31242db2618c502997f4df9aa46a14482c7f33adce8d21aaf16164a9fe52edc358922ea89c8e109c3247e107bf607d6451 DIST zfs-0.7.11.tar.gz 6561125 BLAKE2B ee579aa01272d5565fe78ae6074dc1acdd34c8e9a26838462aea937132c322b0fb915c4dadec230560d586db2b2af129735ed6b5e41def4183c9c7ed456ca7aa SHA512 b53c92de2c2542a1b0189368e4b298e93bea13aec8ba415559e86bfc01a9c7deaf436e694aa047ef8a302c79224f96edd150ea93a57eb88c9e26d054cf7ccd2b DIST zfs-0.7.12.tar.gz 6565017 BLAKE2B 493df30ecce1f169e02d6c8262ba71cc9e7b01d5b17ce188004f522f0c93943b858434067cba8173ccb3e08cde24a1d3e8a3996b2e852f8bc35251f8c4ab3809 SHA512 278e411eac5fb2a91108671b64521c2bd5c08024d5829e1679d8f243dfc3c6317363ed9c79dabfddecf425acb6b3003eeaf4e7d991513cbcae4d2644f5d30bf2 @@ -6,6 +7,7 @@ DIST zfs-0.7.9-r1-patches.tar.xz 10920 BLAKE2B 50a0b8533061b5eecc103179e6fd51499 DIST zfs-0.7.9.tar.gz 6548649 BLAKE2B aa2f1b9d0ba0eda1af7d420c43d65d5d4183169cfe97c693356e1e0b15967ea512c25454f2d77285600f2209d778e4299f420754932e403a390b87b4f488dc94 SHA512 af5d9c320885ee84019fb04250c4b12c7ac3bb3d1037b1961ec4584701a737558374dc22521743e197356efb1d1f0ced9beff675ae9cfcccf3cd8407467f18fa EBUILD zfs-kmod-0.6.5.11.ebuild 4065 BLAKE2B 15ba31f70e1c0c884752bc56893b576791028b78e61ad0b2be83ac8f609385568a9b311ddd04698d430186f3b44f4641774d2102f758c2b4f2934bcbeb11560d SHA512 dbab278cb0311e3c3737a5805d5cf8ecdba75508353ae8f25985b345dca62e895353d5deb43417c5159bb0ef4f64fe5f6e1e0476cc5deed92fb5f1ef3eef05ee EBUILD zfs-kmod-0.7.11.ebuild 4052 BLAKE2B f9ec807898302d8a699849c54b2b5db8c994c47a781c0fb9216b10929ca78df5705f4fa2a646dc4b3012641b3a70f814c6a38b0f33b943f23f9f3e2a6044438b SHA512 dd064db96ee9cd02fa87ced7553aced371d39e40e268b933679dd081da11d64c9abc13fc6a2e7cf5fa7c165faa4ccabefeeeea3bf96a4dd203cb3f6398aaf39d +EBUILD zfs-kmod-0.7.12-r1.ebuild 4130 BLAKE2B 4881bbcc95739423581845787a08ec4ea4928133e18e40c91d7e775aedf64742d413caebac4063b7ff75e75e439293e2d0accbbc06b3f095ef3165fb63bb50ec SHA512 7da379848280164cbde951978bd43c6fc4734b174fafc7f0336fdf938017532fd3bedd416fefa5369187eab530b78888dfcb5b983302476bf47f5e5df8982cba EBUILD zfs-kmod-0.7.12.ebuild 4073 BLAKE2B 47d6fba29a8937a2fd529798f247b497a32612dda1cb8d8654b6b86f70570bb491fc6da48486e55fa08b8ed94dd2ba3586f458d99161a5872af90f84d81e515e SHA512 1dce4eadb5c374581b399006fba146b3b53a0a960a1b5bb1dcfa4b27156b35376f22ddcfbd3c9a89347e33f47d87eff4250a7eb985f63785fcbb264e6654ecbc EBUILD zfs-kmod-0.7.8.ebuild 4051 BLAKE2B 209b79790d9f60bcf6c6275f7786b48fc336075d7409b34909a3df3f2860c1d755472eb885ea7b5907321eeafcfbf89959f5a14071af08fd01a7982f535ed0d1 SHA512 c99b33de8ff155db0472dbcc7174753efa9b2ad24d9676c0515ae8fe8415d9829d1aa37c73f6065d349bad9faaeeeefc5b32bb2098845444a15fda2702adab17 EBUILD zfs-kmod-0.7.9-r1.ebuild 4258 BLAKE2B e6860043ae564501a2c5aa64f11096d00416e78d703753057d923de15ea4e3e031f246ddc69d43700dc89b694dad92261baf93e717bbc80b800bcd75a825590f SHA512 b3f1aaeb53c717b0b5a1ae8e43a04bf13c53258ad2d54b6011ffd1b8118e2d8da61f4e097737800e281c657c615188cbd973fb7caca42c44b24ee60a955e96f2 diff --git a/sys-fs/zfs-kmod/files/zfs-kmod-0.7.12-kernel-4.20-compat.patch b/sys-fs/zfs-kmod/files/zfs-kmod-0.7.12-kernel-4.20-compat.patch new file mode 100644 index 000000000000..75ed3c579920 --- /dev/null +++ b/sys-fs/zfs-kmod/files/zfs-kmod-0.7.12-kernel-4.20-compat.patch @@ -0,0 +1,31 @@ +From 4f981f6ab614a908f912f7dc147b248f96b498a2 Mon Sep 17 00:00:00 2001 +From: satmandu +Date: Wed, 26 Dec 2018 12:36:28 -0500 +Subject: [PATCH] Additional fixes for current_kernel_time in 4.20 on 0.7.x + +While https://github.com/zfsonlinux/spl/commit/cd1b28e0cfa923db988611df28958f7b84b53530 fixed the 4.20 current_kernel_time issues in spl as per https://github.com/zfsonlinux/zfs/pull/8074 in .07.x, current_kernel_time is still being used inside zpios-ctl.h in 0.7.x. + +I believe this may fix this issue in 0.7.x to allow it to compile successfully for kernel 4.2.0. +--- + include/zpios-ctl.h | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/include/zpios-ctl.h b/include/zpios-ctl.h +index f17f1153260..068c9eaf173 100644 +--- a/include/zpios-ctl.h ++++ b/include/zpios-ctl.h +@@ -181,9 +181,12 @@ zpios_timespec_t + zpios_timespec_now(void) + { + zpios_timespec_t zts_now; +- struct timespec ts_now; ++ #if defined(HAVE_INODE_TIMESPEC64_TIMES) ++ inode_timespec_t ts_now = current_kernel_time64(); ++ #else ++ inode_timespec_t ts_now = current_kernel_time(); ++ #endif + +- ts_now = current_kernel_time(); + zts_now.ts_sec = ts_now.tv_sec; + zts_now.ts_nsec = ts_now.tv_nsec; + diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild new file mode 100644 index 000000000000..ad9bf31d87c5 --- /dev/null +++ b/sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +if [ ${PV} == "9999" ]; then + AUTOTOOLS_AUTORECONF="1" + 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" + S="${WORKDIR}/zfs-${PV}" + KEYWORDS="~amd64" +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 debug? ( GPL-2+ )" +SLOT="0" +IUSE="custom-cflags debug +rootfs" +RESTRICT="debug? ( strip ) test" + +DEPEND=" + =sys-kernel/spl-${PV}* + dev-lang/perl + virtual/awk +" + +RDEPEND="${DEPEND} + !sys-fs/zfs-fuse +" + +AT_M4DIR="config" +AUTOTOOLS_IN_SOURCE_BUILD="1" + +DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown ) + +PATCHES=( "${FILESDIR}/${P}-kernel-4.20-compat.patch" ) + +pkg_setup() { + linux-info_pkg_setup + CONFIG_CHECK=" + !DEBUG_LOCK_ALLOC + EFI_PARTITION + IOSCHED_NOOP + 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 ge 2 6 32 || die "Linux 2.6.32 or newer required" + + [ ${PV} != "9999" ] && \ + { kernel_is le 4 20 || die "Linux 4.20 is the latest supported version."; } + + 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" + + # Set module revision number + [ ${PV} != "9999" ] && \ + { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; } + + autotools-utils_src_prepare +} + +src_configure() { + local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))" + use custom-cflags || strip-flags + filter-ldflags -Wl,* + + set_arch_to_kernel + local myeconfargs=(${myeconfargs} + --bindir="${EPREFIX}/bin" + --sbindir="${EPREFIX}/sbin" + --with-config=kernel + --with-linux="${KV_DIR}" + --with-linux-obj="${KV_OUT_DIR}" + --with-spl="${EROOT}usr/src/${SPL_PATH}" + --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}" + $(use_enable debug) + ) + + autotools-utils_src_configure +} + +src_install() { + autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}" +} + +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 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