From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1247689-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 603AA13835A
	for <garchives@archives.gentoo.org>; Tue,  2 Feb 2021 23:52:58 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B358AE0972;
	Tue,  2 Feb 2021 23:52:57 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 87D52E0972
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Feb 2021 23:52:57 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 6444934190D
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Feb 2021 23:52:56 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 1BD52B9
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Feb 2021 23:52:55 +0000 (UTC)
From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" <gyakovlev@gentoo.org>
Message-ID: <1612309933.5de36fd5af0c0cec6a54dcdc2b71c80f6db3abd5.gyakovlev@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-fs/zfs-kmod/Manifest sys-fs/zfs-kmod/zfs-kmod-2.0.2.ebuild
X-VCS-Directories: sys-fs/zfs-kmod/
X-VCS-Committer: gyakovlev
X-VCS-Committer-Name: Georgy Yakovlev
X-VCS-Revision: 5de36fd5af0c0cec6a54dcdc2b71c80f6db3abd5
X-VCS-Branch: master
Date: Tue,  2 Feb 2021 23:52:55 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 864d7dc3-2a1a-46d0-bce8-c9758de28d0e
X-Archives-Hash: 7ad9f73259700dcde89877bf90d184e0

commit:     5de36fd5af0c0cec6a54dcdc2b71c80f6db3abd5
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  2 20:42:39 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Feb  2 23:52:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5de36fd5

sys-fs/zfs-kmod: bump to 2.0.2

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

 sys-fs/zfs-kmod/Manifest              |   1 +
 sys-fs/zfs-kmod/zfs-kmod-2.0.2.ebuild | 179 ++++++++++++++++++++++++++++++++++
 2 files changed, 180 insertions(+)

diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index 2235bb47828..2eeae4f5d3e 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,3 +1,4 @@
 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.1.tar.gz 12970188 BLAKE2B ec1ec4cfcc64adbe7ac0ce65e4fa118a77495886b1c8f2daea0b76f8bb32f0c4bbb6bc7fc16000b6c828f58e60b6ce8359a55ec1f2d2eef1279dd4f430e54f01 SHA512 7e8f490605cb80747a2e471ac5bdd184038f514da379ea7cadf14d5635d5f4cd1b47a7c92c95c4c1b7b0cf5ec22ea905d0d3e8d24e71733484f34cc9429f0f94
+DIST zfs-2.0.2.tar.gz 12980696 BLAKE2B 34f4168365d36372349a4986f17cff64987a697e445c2de2ff0bf5d218725fad4aab12b0436ca816300a65856f5918f0cdb8931abeeacd894046daf013bb944f SHA512 5033645ad8fc2afd73187cc00e775ad79ac89e9a69841e1bda2867c2f05dab082f55fc83eedf2fdff1dab322f0eaac1ba2f8411def94e9cd7c011a03e84d5363

diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.0.2.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.0.2.ebuild
new file mode 100644
index 00000000000..2fbfd85f7cc
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.0.2.ebuild
@@ -0,0 +1,179 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools dist-kernel-utils 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 [[ -z ${ROOT} ]] && use dist-kernel; then
+		dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
+	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."
+}