From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 8998413835A for ; Wed, 9 Jun 2021 05:20:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7577BE0827; Wed, 9 Jun 2021 05:20:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 4FF92E0827 for ; Wed, 9 Jun 2021 05:20:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 05ECE340BDE for ; Wed, 9 Jun 2021 05:20:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 347D87A5 for ; Wed, 9 Jun 2021 05:20:37 +0000 (UTC) From: "Georgy Yakovlev" 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" Message-ID: <1623215993.80c9b77b4b7dd9355a28b7067f5d84687775beb6.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/, sys-fs/zfs/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc6.ebuild sys-fs/zfs-kmod/zfs-kmod-9999.ebuild sys-fs/zfs/zfs-0.8.6.ebuild sys-fs/zfs/zfs-2.0.4-r1.ebuild sys-fs/zfs/zfs-2.1.0_rc6.ebuild sys-fs/zfs/zfs-9999.ebuild X-VCS-Directories: sys-fs/zfs-kmod/ sys-fs/zfs/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 80c9b77b4b7dd9355a28b7067f5d84687775beb6 X-VCS-Branch: master Date: Wed, 9 Jun 2021 05:20:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a06f5958-051b-41cd-813c-804dbb725af0 X-Archives-Hash: cea8ec24a790a1de366e2ba0fb539638 commit: 80c9b77b4b7dd9355a28b7067f5d84687775beb6 Author: Georgy Yakovlev gentoo org> AuthorDate: Tue Jun 8 08:04:13 2021 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Wed Jun 9 05:19:53 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80c9b77b sys-fs/zfs*: consistently require dist-kernel flag to be in sync Signed-off-by: Georgy Yakovlev gentoo.org> sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild | 15 +++++++++++++++ sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild | 15 +++++++++++++++ sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc6.ebuild | 15 +++++++++++++++ sys-fs/zfs-kmod/zfs-kmod-9999.ebuild | 15 +++++++++++++++ sys-fs/zfs/zfs-0.8.6.ebuild | 30 ++++++++++++++++++++++++++---- sys-fs/zfs/zfs-2.0.4-r1.ebuild | 30 ++++++++++++++++++++++++++---- sys-fs/zfs/zfs-2.1.0_rc6.ebuild | 29 +++++++++++++++++++++++++---- sys-fs/zfs/zfs-9999.ebuild | 29 +++++++++++++++++++++++++---- 8 files changed, 162 insertions(+), 16 deletions(-) diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild index ee2d06498d4..68776243c4f 100644 --- a/sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild +++ b/sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild @@ -33,10 +33,25 @@ BDEPEND=" virtual/awk " +# PDEPEND in this form is needed to trick portage suggest +# enabling dist-kernel if only 1 package have it set +PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )" + RESTRICT="debug? ( strip ) test" DOCS=( AUTHORS COPYRIGHT META README.md ) +pkg_pretend() { + use rootfs || return 0 + + if has_version virtual/dist-kernel && ! use dist-kernel; then + ewarn "You have virtual/dist-kernel installed, but" + ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" + ewarn "It's recommended to globally enable dist-kernel USE flag" + ewarn "to auto-trigger initrd rebuilds with kernel updates" + fi +} + # https://github.com/openzfs/zfs/pull/11371 PATCHES=( "${FILESDIR}/${PV}-copy-builtin.patch" ) diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild index fd0f8f8997e..636c4c76d07 100644 --- a/sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild +++ b/sys-fs/zfs-kmod/zfs-kmod-2.0.4-r1.ebuild @@ -34,10 +34,25 @@ BDEPEND=" virtual/awk " +# PDEPEND in this form is needed to trick portage suggest +# enabling dist-kernel if only 1 package have it set +PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )" + RESTRICT="debug? ( strip ) test" DOCS=( AUTHORS COPYRIGHT META README.md ) +pkg_pretend() { + use rootfs || return 0 + + if has_version virtual/dist-kernel && ! use dist-kernel; then + ewarn "You have virtual/dist-kernel installed, but" + ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" + ewarn "It's recommended to globally enable dist-kernel USE flag" + ewarn "to auto-trigger initrd rebuilds with kernel updates" + fi +} + PATCHES=( "${FILESDIR}"/zfs-8.0.4_5.12_compat_idmapped_mounts.patch "${FILESDIR}"/zfs-8.0.4_5.12_compat_bio_max_segs.patch diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc6.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc6.ebuild index 2530036595a..34cc83a6093 100644 --- a/sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc6.ebuild +++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.0_rc6.ebuild @@ -43,10 +43,25 @@ if [[ ${PV} != "9999" ]] ; then BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-openzfs )" fi +# PDEPEND in this form is needed to trick portage suggest +# enabling dist-kernel if only 1 package have it set +PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )" + RESTRICT="debug? ( strip ) test" DOCS=( AUTHORS COPYRIGHT META README.md ) +pkg_pretend() { + use rootfs || return 0 + + if has_version virtual/dist-kernel && ! use dist-kernel; then + ewarn "You have virtual/dist-kernel installed, but" + ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" + ewarn "It's recommended to globally enable dist-kernel USE flag" + ewarn "to auto-trigger initrd rebuilds with kernel updates" + fi +} + pkg_setup() { CONFIG_CHECK=" !DEBUG_LOCK_ALLOC diff --git a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild index 2530036595a..34cc83a6093 100644 --- a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild +++ b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild @@ -43,10 +43,25 @@ if [[ ${PV} != "9999" ]] ; then BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-openzfs )" fi +# PDEPEND in this form is needed to trick portage suggest +# enabling dist-kernel if only 1 package have it set +PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )" + RESTRICT="debug? ( strip ) test" DOCS=( AUTHORS COPYRIGHT META README.md ) +pkg_pretend() { + use rootfs || return 0 + + if has_version virtual/dist-kernel && ! use dist-kernel; then + ewarn "You have virtual/dist-kernel installed, but" + ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" + ewarn "It's recommended to globally enable dist-kernel USE flag" + ewarn "to auto-trigger initrd rebuilds with kernel updates" + fi +} + pkg_setup() { CONFIG_CHECK=" !DEBUG_LOCK_ALLOC diff --git a/sys-fs/zfs/zfs-0.8.6.ebuild b/sys-fs/zfs/zfs-0.8.6.ebuild index 6a772829a36..54845ae7556 100644 --- a/sys-fs/zfs/zfs-0.8.6.ebuild +++ b/sys-fs/zfs/zfs-0.8.6.ebuild @@ -7,7 +7,7 @@ DISTUTILS_OPTIONAL=1 DISTUTILS_USE_SETUPTOOLS=manual PYTHON_COMPAT=( python3_{7,8,9} ) -inherit autotools bash-completion-r1 flag-o-matic linux-info distutils-r1 systemd toolchain-funcs udev usr-ldscript +inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info systemd toolchain-funcs udev usr-ldscript DESCRIPTION="Userland utilities for ZFS Linux kernel module" HOMEPAGE="https://github.com/openzfs/zfs" @@ -22,7 +22,7 @@ fi LICENSE="BSD-2 CDDL MIT" SLOT="0/2" # just libzfs soname major for now. possible candidates: libuutil, libzpool, libnvpair -IUSE="custom-cflags debug kernel-builtin minimal nls python +rootfs test-suite static-libs" +IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs test-suite static-libs" DEPEND=" net-libs/libtirpc[static-libs?] @@ -46,9 +46,11 @@ BDEPEND="virtual/awk " RDEPEND="${DEPEND} - !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= ) + !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:=[dist-kernel?] ) !prefix? ( virtual/udev ) sys-fs/udev-init-scripts + virtual/awk + dist-kernel? ( virtual/dist-kernel:= ) rootfs? ( app-arch/cpio app-misc/pax-utils @@ -77,8 +79,19 @@ PATCHES=( "${FILESDIR}/bash-completion-sudo.patch" ) +pkg_pretend() { + use rootfs || return 0 + + if has_version virtual/dist-kernel && ! use dist-kernel; then + ewarn "You have virtual/dist-kernel installed, but" + ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" + ewarn "It's recommended to globally enable dist-kernel USE flag" + ewarn "to auto-trigger initrd rebuilds with kernel updates" + fi +} + pkg_setup() { - if use kernel_linux && use test-suite; then + if use kernel_linux; then linux-info_pkg_setup if ! linux_config_exists; then @@ -185,6 +198,15 @@ src_install() { } pkg_postinst() { + # we always need userspace utils in sync with zfs-kmod + # so force initrd update for userspace as well, to avoid + # situation when zfs-kmod trigger initrd rebuild before + # userspace component is rebuilt + # KV_* variables are provided by linux-info.eclass + if [[ -z ${ROOT} ]] && use dist-kernel; then + dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}" + fi + if use rootfs; then if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then elog "root on zfs requires initramfs to boot" diff --git a/sys-fs/zfs/zfs-2.0.4-r1.ebuild b/sys-fs/zfs/zfs-2.0.4-r1.ebuild index 98198b67e82..e6152b9eb7e 100644 --- a/sys-fs/zfs/zfs-2.0.4-r1.ebuild +++ b/sys-fs/zfs/zfs-2.0.4-r1.ebuild @@ -7,7 +7,7 @@ DISTUTILS_OPTIONAL=1 DISTUTILS_USE_SETUPTOOLS=manual PYTHON_COMPAT=( python3_{7,8,9} ) -inherit autotools bash-completion-r1 distutils-r1 flag-o-matic linux-info pam systemd toolchain-funcs udev usr-ldscript +inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd toolchain-funcs udev usr-ldscript DESCRIPTION="Userland utilities for ZFS Linux kernel module" HOMEPAGE="https://github.com/openzfs/zfs" @@ -26,7 +26,7 @@ LICENSE="BSD-2 CDDL MIT" # just libzfs soname major for now. # possible candidates: libuutil, libzpool, libnvpair. Those do not provide stable abi, but are considered. SLOT="0/4" -IUSE="custom-cflags debug kernel-builtin minimal nls pam python +rootfs test-suite static-libs" +IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs test-suite static-libs" DEPEND=" net-libs/libtirpc[static-libs?] @@ -51,9 +51,11 @@ BDEPEND="virtual/awk " RDEPEND="${DEPEND} - !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= ) + !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:=[dist-kernel?] ) !prefix? ( virtual/udev ) sys-fs/udev-init-scripts + virtual/awk + dist-kernel? ( virtual/dist-kernel:= ) rootfs? ( app-arch/cpio app-misc/pax-utils @@ -83,8 +85,19 @@ PATCHES=( "${FILESDIR}/2.0.4-scrub-timers.patch" ) +pkg_pretend() { + use rootfs || return 0 + + if has_version virtual/dist-kernel && ! use dist-kernel; then + ewarn "You have virtual/dist-kernel installed, but" + ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" + ewarn "It's recommended to globally enable dist-kernel USE flag" + ewarn "to auto-trigger initrd rebuilds with kernel updates" + fi +} + pkg_setup() { - if use kernel_linux && use test-suite; then + if use kernel_linux; then linux-info_pkg_setup if ! linux_config_exists; then @@ -193,6 +206,15 @@ src_install() { } pkg_postinst() { + # we always need userspace utils in sync with zfs-kmod + # so force initrd update for userspace as well, to avoid + # situation when zfs-kmod trigger initrd rebuild before + # userspace component is rebuilt + # KV_* variables are provided by linux-info.eclass + if [[ -z ${ROOT} ]] && use dist-kernel; then + dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}" + fi + if use rootfs; then if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then elog "root on zfs requires initramfs to boot" diff --git a/sys-fs/zfs/zfs-2.1.0_rc6.ebuild b/sys-fs/zfs/zfs-2.1.0_rc6.ebuild index fbc90164dad..1cd4e63b4e6 100644 --- a/sys-fs/zfs/zfs-2.1.0_rc6.ebuild +++ b/sys-fs/zfs/zfs-2.1.0_rc6.ebuild @@ -7,7 +7,7 @@ DISTUTILS_OPTIONAL=1 DISTUTILS_USE_SETUPTOOLS=manual PYTHON_COMPAT=( python3_{7,8,9} ) -inherit autotools bash-completion-r1 distutils-r1 flag-o-matic linux-info pam systemd toolchain-funcs udev usr-ldscript +inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd toolchain-funcs udev usr-ldscript DESCRIPTION="Userland utilities for ZFS Linux kernel module" HOMEPAGE="https://github.com/openzfs/zfs" @@ -34,7 +34,7 @@ LICENSE="BSD-2 CDDL MIT" # possible candidates: libuutil, libzpool, libnvpair. Those do not provide stable abi, but are considered. # see libsoversion_check() below as well SLOT="0/5" -IUSE="custom-cflags debug kernel-builtin minimal nls pam python +rootfs test-suite static-libs" +IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs test-suite static-libs" DEPEND=" net-libs/libtirpc[static-libs?] @@ -63,10 +63,11 @@ fi # awk is used for some scripts, completions, and the Dracut module RDEPEND="${DEPEND} - !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= ) + !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:=[dist-kernel?] ) !prefix? ( virtual/udev ) sys-fs/udev-init-scripts virtual/awk + dist-kernel? ( virtual/dist-kernel:= ) rootfs? ( app-arch/cpio app-misc/pax-utils @@ -91,8 +92,19 @@ REQUIRED_USE=" RESTRICT="test" +pkg_pretend() { + use rootfs || return 0 + + if has_version virtual/dist-kernel && ! use dist-kernel; then + ewarn "You have virtual/dist-kernel installed, but" + ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" + ewarn "It's recommended to globally enable dist-kernel USE flag" + ewarn "to auto-trigger initrd rebuilds with kernel updates" + fi +} + pkg_setup() { - if use kernel_linux && use test-suite; then + if use kernel_linux; then linux-info_pkg_setup if ! linux_config_exists; then @@ -230,6 +242,15 @@ src_install() { } pkg_postinst() { + # we always need userspace utils in sync with zfs-kmod + # so force initrd update for userspace as well, to avoid + # situation when zfs-kmod trigger initrd rebuild before + # userspace component is rebuilt + # KV_* variables are provided by linux-info.eclass + if [[ -z ${ROOT} ]] && use dist-kernel; then + dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}" + fi + if use rootfs; then if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then elog "Root on zfs requires an initramfs to boot" diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild index fbc90164dad..1cd4e63b4e6 100644 --- a/sys-fs/zfs/zfs-9999.ebuild +++ b/sys-fs/zfs/zfs-9999.ebuild @@ -7,7 +7,7 @@ DISTUTILS_OPTIONAL=1 DISTUTILS_USE_SETUPTOOLS=manual PYTHON_COMPAT=( python3_{7,8,9} ) -inherit autotools bash-completion-r1 distutils-r1 flag-o-matic linux-info pam systemd toolchain-funcs udev usr-ldscript +inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd toolchain-funcs udev usr-ldscript DESCRIPTION="Userland utilities for ZFS Linux kernel module" HOMEPAGE="https://github.com/openzfs/zfs" @@ -34,7 +34,7 @@ LICENSE="BSD-2 CDDL MIT" # possible candidates: libuutil, libzpool, libnvpair. Those do not provide stable abi, but are considered. # see libsoversion_check() below as well SLOT="0/5" -IUSE="custom-cflags debug kernel-builtin minimal nls pam python +rootfs test-suite static-libs" +IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs test-suite static-libs" DEPEND=" net-libs/libtirpc[static-libs?] @@ -63,10 +63,11 @@ fi # awk is used for some scripts, completions, and the Dracut module RDEPEND="${DEPEND} - !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= ) + !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:=[dist-kernel?] ) !prefix? ( virtual/udev ) sys-fs/udev-init-scripts virtual/awk + dist-kernel? ( virtual/dist-kernel:= ) rootfs? ( app-arch/cpio app-misc/pax-utils @@ -91,8 +92,19 @@ REQUIRED_USE=" RESTRICT="test" +pkg_pretend() { + use rootfs || return 0 + + if has_version virtual/dist-kernel && ! use dist-kernel; then + ewarn "You have virtual/dist-kernel installed, but" + ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" + ewarn "It's recommended to globally enable dist-kernel USE flag" + ewarn "to auto-trigger initrd rebuilds with kernel updates" + fi +} + pkg_setup() { - if use kernel_linux && use test-suite; then + if use kernel_linux; then linux-info_pkg_setup if ! linux_config_exists; then @@ -230,6 +242,15 @@ src_install() { } pkg_postinst() { + # we always need userspace utils in sync with zfs-kmod + # so force initrd update for userspace as well, to avoid + # situation when zfs-kmod trigger initrd rebuild before + # userspace component is rebuilt + # KV_* variables are provided by linux-info.eclass + if [[ -z ${ROOT} ]] && use dist-kernel; then + dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}" + fi + if use rootfs; then if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then elog "Root on zfs requires an initramfs to boot"