commit:     4004788442379d438aae8b0ec359ccd416e63229
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 18 21:56:17 2020 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Sep 18 21:56:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40047884

sys-fs/zfs-kmod: bump to 2.0.0_rc2

Package-Manager: Portage-3.0.7, Repoman-3.0.1
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 sys-fs/zfs-kmod/Manifest                  |   1 +
 sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc2.ebuild | 175 ++++++++++++++++++++++++++++++
 2 files changed, 176 insertions(+)

diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index 4b1225f94a5..7165523a32c 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,2 +1,3 @@
 DIST zfs-0.8.4.tar.gz 9285838 BLAKE2B 
776bcd6dfab8825c07d315085e288b29bf543d6957325d5d566b7b78c04505dde9bd25eb6684cb4a1b6a657de8a4e1290d04d2b9079d26d6b834a70f1ec3b569
 SHA512 
9086dc6a6262dd93ca6ec43f1b4c2e5c804deba708c8a7460b8531aa4802b0bf8cac0917a1a00e6af2e96d4a21cd68b85e226bf571bd94041d0325c457106eb1
 DIST zfs-2.0.0-rc1.tar.gz 12820598 BLAKE2B 
6ea935447e4f95eb4040533843677f0091c9620fc387c76818df69a6653467e10aecd07ece22b2a32f849dc52ab0160149147416af90d78c5284f403571f7962
 SHA512 
b70cd10672d4424a6ffaaa58b4fa14b7d1b6481413463abd9b6d75698e80d94301fd54c7e091d63ebad9c8838eaaef6449223a55f041a62ae8292882feb195b5
+DIST zfs-2.0.0-rc2.tar.gz 12854085 BLAKE2B 
73cabd565c11eef1bebbc391f8c4ba18acd1610f98f1b8afb507bc844f4b6a64ba32d9727e634c7f26c48fe365a841bf071513df234b9b7a87e954610a6d7f3b
 SHA512 
14b17d06124890efef15b3b073e103c9faeecaea761779fff9a8420e3ab72fa611df9875fa766a323d69646e9025f8b19f918ded4c6705af116cf9f14eea4f40

diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc2.ebuild 
b/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc2.ebuild
new file mode 100644
index 00000000000..689dcbc4494
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc2.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.8"
+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."
+}

Reply via email to