From 5a1e5a6812ca9c9555657cce48fe09d2ffa44401 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 2 Dec 2022 08:55:38 +0000 Subject: gentoo auto-resync : 02:12:2022 - 08:55:37 --- sys-fs/zfs/Manifest | 9 +- sys-fs/zfs/zfs-2.1.5-r6.ebuild | 4 +- sys-fs/zfs/zfs-2.1.6.ebuild | 4 +- sys-fs/zfs/zfs-2.1.7.ebuild | 330 +++++++++++++++++++++++++++++++++++++++++ sys-fs/zfs/zfs-9999.ebuild | 8 +- 5 files changed, 344 insertions(+), 11 deletions(-) create mode 100644 sys-fs/zfs/zfs-2.1.7.ebuild (limited to 'sys-fs/zfs') diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest index ffdbe86aea1f..3e65c8f77fef 100644 --- a/sys-fs/zfs/Manifest +++ b/sys-fs/zfs/Manifest @@ -8,7 +8,10 @@ DIST zfs-2.1.5.tar.gz 34951632 BLAKE2B c6e3efd9c0cda91654767eaad0eaaa05cd9a5daf1 DIST zfs-2.1.5.tar.gz.asc 836 BLAKE2B 4a81c266967540850a2cc824e79555ca9d05b2e17e45fa2723893cbd85b55e3d7d791986d6667b7ee1530e7692c03818f15e8b6798393b54989f90801b775786 SHA512 224b0dcf4982c63a8eff0a39d054537e7d023f7c35e154e4d20490b8daf184c076bc8e4de7d2c5af4059f8a802b747e637aad4479cd8d1330cf5b26da2f19c94 DIST zfs-2.1.6.tar.gz 34951282 BLAKE2B 615fe7a2128af77c6c855ea52b6503a78f0c992ea845b02875ac19aa9dd155c5d4110b668da91c463f96a54767ab92e67e5303572337352484c055c0a0ff9e46 SHA512 75639e4cecb281fe73a6e6bd116693f6609ace9b358385450297d175087b10938c2f489a08c657cf0a64250a8db995cbd19abc808a8523cb4c5344b3f76668d6 DIST zfs-2.1.6.tar.gz.asc 836 BLAKE2B d85a79f8824a92c4d0a9682646f79c14871ebe27764289dc87cd9b0a773b7295538780401e70c492a9e4e7097ff2b3e459f7e0a7fdce2e2a59d3f467c41d88b3 SHA512 a83fcc00a8b35f1a1f9b94097d453019333a5351a3d78656dbd9ef732655ee817ccc88068c5ba11b5ff4a285e02250aee4169cc1450025edf547a2329fca7e15 -EBUILD zfs-2.1.5-r6.ebuild 9454 BLAKE2B 15f19ae3739796159bd70beccda1bbeeb3cfa1044bb55dd1dc29dce6c210acc6442f77ea9bddd7f8ae7c204ae8755af7127fdcadbe3a9fc5ad91a3162d571965 SHA512 f2233c3120ad0468765bedae231c4ab57a1884c00dd3d7c79d4ca0a692ec45ffea5a2eccb6975713887434a4e8649a275c9378887a73fa0ca356fc858e8189be -EBUILD zfs-2.1.6.ebuild 9208 BLAKE2B d6f3d2336c24dd838edf4cc291a6036aa37a9fb0ba8706b5ab63c1f2bce3d061c2813a712e06b05106aeed5e4997bc843529d1cc87c5676c4b9735be406e027c SHA512 82fca89fb25d0f0e4536694e4230e1d02f50627a54d7932203eb3527b8d5f67ec19259a71f415254d1daa0e97dc6089c2febb51b39205fd692784b06ca87910b -EBUILD zfs-9999.ebuild 8860 BLAKE2B f866be6f204ad6dba9afc1d5e696731af97aedcd5800a76c9e9ca0f8fc148fd9f4506ff9bd1af30f56df106a8da2375c90e276af980f4519c309f3583f9e38eb SHA512 a34498a45d1d42f4e8baac011c45c993693b37382aa6f7c41ca5f814415d5e992be7f051a72ed2499cfe9840b54b58edd4ad778a8906834ea26565d9a81b5115 +DIST zfs-2.1.7.tar.gz 35092436 BLAKE2B 9c85c3eb72f3bb39bc4fd44aaa80338ca197a4e8183436fee73cd56705abfdaecfaf1b6fbe8dd508ccce707c8259c7ab6e1733b60b17757f0a7ff92d4e52bbad SHA512 6a31eb8fbee90ad1abcfedb9000991761aff7591b11362eb5ec6e0bb4b785a7004a251439409d7bd3f51fc995c859614da6313655337952f70bae07ac8ee0140 +DIST zfs-2.1.7.tar.gz.asc 836 BLAKE2B 648fb818860a1cecc2ec42f23102e0466c038bfe48f5feca1ab58afb9cb439a0fe51cb89941f63a05c14d3b6f95c64dd3910c9a06b9cac14c467b963c65c2948 SHA512 4d4fef707bdfc37a82eb79aa0a21c71e30779bcf2ac54fe2df45a03e3302e2a45cb9f4e4ff0122b892b1e608a9f09e86d1334e0c7d9bf681780505f6e1439f9f +EBUILD zfs-2.1.5-r6.ebuild 9472 BLAKE2B 4a32822462e28f5287636ff20027f0ede74bba5bb8e3a0cae9d5d1c5c87ca27afb0ad09ad48c9bd4355e4f502fdad6c41020c056226010154f1d9972a62fe5fd SHA512 7155a9f5e2dd3846e8da81f7267a735822d4fdc3c6fbfdd2759a6397c28042e4321cbc2c13d1df38d9d69bcf4ce2c64f2fd946e08eee5231cd212b63972ac47d +EBUILD zfs-2.1.6.ebuild 9226 BLAKE2B 4006858ddca53a4557b64b15b97534112f7e6046903281a8469abd4a3c5cb4bd740fdf17e728739b92812a5e6c2b739ff954ff693bc72afa4764bd4c9807fcb3 SHA512 65a84504afcf29c80587ff130ada4840ac244c4bb2189ae3ea4137602add1f17f6023c55b3f39fab7fae81e40d0f442a298ad44fc07a8292ae27abd679a678ae +EBUILD zfs-2.1.7.ebuild 9226 BLAKE2B c2799f2e526aefa013ff9ca57ef88f9a6b16c79b4cb0b7016711b8a0a4697b678c120ce9e01c0739ada30044fd6ed63470d297b878a12517bb28b5a592b88e3e SHA512 59a380b5bc48cd90521329678e175ed960deca0fde6b6ab7967e183e04ba9477735bebeefc3a3f9a14a8aa4aed37284a5d88658222875c856871fa1a6e994c50 +EBUILD zfs-9999.ebuild 8885 BLAKE2B a4fc2460820726fd75f5bad5c842953147cbb1eb685641dfa7dde983c433d553d502c0777d0b38b4e79761f6d7304164c462b04ea2346aaaf46fe6dd4ff934dc SHA512 91bf1425db022c8a38665cd6e0936e0b6e4faee25ee99a51fd339f9cee9fdaf4b793b32dd24881f240591c9ee98855811f301b286eb8ba67cd179f4d66817fc6 MISC metadata.xml 2205 BLAKE2B 82e20a6f5906b8cbbc6eb6e9520cf4e4213ce9cba2b056df5d5db0d4deaa4a20822a88e26286446d105326a8f61c807047a0e1e64494faac48d8ed5708807c02 SHA512 222981f945e98ddef646c593cbc8889f3526af4901c28ab5775ba760ca7d3aff3129b2699e8b7337b59fd33cbba388915cb5b2dc09674432c606f41ff27dbd9b diff --git a/sys-fs/zfs/zfs-2.1.5-r6.ebuild b/sys-fs/zfs/zfs-2.1.5-r6.ebuild index b641b3d163ea..dbfd77a25323 100644 --- a/sys-fs/zfs/zfs-2.1.5-r6.ebuild +++ b/sys-fs/zfs/zfs-2.1.5-r6.ebuild @@ -49,7 +49,7 @@ DEPEND=" ) " -BDEPEND="virtual/awk +BDEPEND="app-alternatives/awk virtual/pkgconfig nls? ( sys-devel/gettext ) python? ( @@ -70,7 +70,7 @@ RDEPEND="${DEPEND} !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= ) !prefix? ( virtual/udev ) sys-fs/udev-init-scripts - virtual/awk + app-alternatives/awk dist-kernel? ( virtual/dist-kernel:= ) rootfs? ( app-arch/cpio diff --git a/sys-fs/zfs/zfs-2.1.6.ebuild b/sys-fs/zfs/zfs-2.1.6.ebuild index ae3f9d431093..7f711822cf48 100644 --- a/sys-fs/zfs/zfs-2.1.6.ebuild +++ b/sys-fs/zfs/zfs-2.1.6.ebuild @@ -48,7 +48,7 @@ DEPEND=" ) " -BDEPEND="virtual/awk +BDEPEND="app-alternatives/awk virtual/pkgconfig nls? ( sys-devel/gettext ) python? ( @@ -69,7 +69,7 @@ RDEPEND="${DEPEND} !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= ) !prefix? ( virtual/udev ) sys-fs/udev-init-scripts - virtual/awk + app-alternatives/awk dist-kernel? ( virtual/dist-kernel:= ) rootfs? ( app-arch/cpio diff --git a/sys-fs/zfs/zfs-2.1.7.ebuild b/sys-fs/zfs/zfs-2.1.7.ebuild new file mode 100644 index 000000000000..5a8695deb4c4 --- /dev/null +++ b/sys-fs/zfs/zfs-2.1.7.ebuild @@ -0,0 +1,330 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( python3_{8..10} ) + +inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd udev usr-ldscript + +DESCRIPTION="Userland utilities for ZFS Linux kernel module" +HOMEPAGE="https://github.com/openzfs/zfs" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 linux-mod + EGIT_REPO_URI="https://github.com/openzfs/zfs.git" +else + VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/openzfs.asc + inherit verify-sig + + MY_P="${P/_rc/-rc}" + SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz" + SRC_URI+=" verify-sig? ( https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz.asc )" + S="${WORKDIR}/${P%_rc?}" + + if [[ ${PV} != *_rc* ]]; then + KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~sparc" + fi +fi + +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. +# see libsoversion_check() below as well +SLOT="0/5" +IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs test-suite" + +DEPEND=" + net-libs/libtirpc:= + sys-apps/util-linux + sys-libs/zlib + virtual/libudev:= + dev-libs/openssl:0= + !minimal? ( ${PYTHON_DEPS} ) + pam? ( sys-libs/pam ) + python? ( + virtual/python-cffi[${PYTHON_USEDEP}] + ) +" + +BDEPEND="app-alternatives/awk + virtual/pkgconfig + nls? ( sys-devel/gettext ) + python? ( + dev-python/setuptools[${PYTHON_USEDEP}] + || ( + dev-python/packaging[${PYTHON_USEDEP}] + dev-python/distlib[${PYTHON_USEDEP}] + ) + ) +" + +if [[ ${PV} != "9999" ]] ; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )" +fi + +# awk is used for some scripts, completions, and the Dracut module +RDEPEND="${DEPEND} + !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= ) + !prefix? ( virtual/udev ) + sys-fs/udev-init-scripts + app-alternatives/awk + dist-kernel? ( virtual/dist-kernel:= ) + rootfs? ( + app-arch/cpio + app-misc/pax-utils + ) + test-suite? ( + app-shells/ksh + sys-apps/kmod[tools] + sys-apps/util-linux + sys-devel/bc + sys-block/parted + sys-fs/lsscsi + sys-fs/mdadm + sys-process/procps + ) +" + +# PDEPEND in this form is needed to trick portage suggest +# enabling dist-kernel if only 1 package have it set, without suggesting to disable +PDEPEND="dist-kernel? ( ~sys-fs/zfs-kmod-${PV}[dist-kernel] )" + +REQUIRED_USE=" + !minimal? ( ${PYTHON_REQUIRED_USE} ) + python? ( !minimal ) + test-suite? ( !minimal ) +" + +RESTRICT="test" + +PATCHES=( + # bug #854333 + "${FILESDIR}"/2.1.5-r2-dracut-non-root.patch + + "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch + + # bug #857228 + "${FILESDIR}"/2.1.5-dracut-mount.patch + + "${FILESDIR}"/2.1.6-fgrep.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; then + linux-info_pkg_setup + + if ! linux_config_exists; then + ewarn "Cannot check the linux kernel configuration." + else + if use test-suite; then + if linux_chkconfig_present BLK_DEV_LOOP; then + eerror "The ZFS test suite requires loop device support enabled." + eerror "Please enable it:" + eerror " CONFIG_BLK_DEV_LOOP=y" + eerror "in /usr/src/linux/.config or" + eerror " Device Drivers --->" + eerror " Block devices --->" + eerror " [X] Loopback device support" + fi + fi + fi + fi +} + +libsoversion_check() { + local bugurl libzfs_sover + bugurl="https://bugs.gentoo.org/enter_bug.cgi?form_name=enter_bug&product=Gentoo+Linux&component=Current+packages" + + libzfs_sover="$(grep 'libzfs_la_LDFLAGS += -version-info' lib/libzfs/Makefile.am \ + | grep -Eo '[0-9]+:[0-9]+:[0-9]+')" + libzfs_sover="${libzfs_sover%%:*}" + + if [[ ${libzfs_sover} -ne $(ver_cut 2 ${SLOT}) ]]; then + echo + eerror "BUG BUG BUG BUG BUG BUG BUG BUG" + eerror "ebuild subslot does not match libzfs soversion!" + eerror "libzfs soversion: ${libzfs_sover}" + eerror "ebuild value: $(ver_cut 2 ${SLOT})" + eerror "This is a bug in the ebuild, please use the following URL to report it" + eerror "${bugurl}&short_desc=${CATEGORY}%2F${P}+update+subslot" + echo + # we want to abort for releases, but just print a warning for live ebuild + # to keep package installable + [[ ${PV} == "9999" ]] || die + fi +} + +src_unpack() { + if use verify-sig ; then + # Needed for downloaded patch (which is unsigned, which is fine) + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc} + fi + + default +} + +src_prepare() { + default + libsoversion_check + + # Run unconditionally (bug #792627) + eautoreconf + + if [[ ${PV} != "9999" ]]; then + # Set revision number + sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release" + fi + + if use python; then + pushd contrib/pyzfs >/dev/null || die + distutils-r1_src_prepare + popd >/dev/null || die + fi + + # prevent errors showing up on zfs-mount stop, #647688 + # openrc will unmount all filesystems anyway. + sed -i "/^ZFS_UNMOUNT=/ s/yes/no/" "etc/default/zfs.in" || die +} + +src_configure() { + use custom-cflags || strip-flags + use minimal || python_setup + + # All the same issue: + # Segfaults w/ GCC 12 and 'zfs send' + # bug #856373 + # https://github.com/openzfs/zfs/issues/13620 + # https://github.com/openzfs/zfs/issues/13605 + append-flags -fno-tree-vectorize + + local myconf=( + --bindir="${EPREFIX}/bin" + --enable-shared + --enable-sysvinit + --localstatedir="${EPREFIX}/var" + --sbindir="${EPREFIX}/sbin" + --with-config=user + --with-dracutdir="${EPREFIX}/usr/lib/dracut" + --with-linux="${KV_DIR}" + --with-linux-obj="${KV_OUT_DIR}" + --with-udevdir="$(get_udevdir)" + --with-pamconfigsdir="${EPREFIX}/unwanted_files" + --with-pammoduledir="$(getpam_mod_dir)" + --with-systemdunitdir="$(systemd_get_systemunitdir)" + --with-systemdpresetdir="$(systemd_get_systempresetdir)" + --with-vendor=gentoo + # Building zfs-mount-generator.c on musl breaks as strndupa + # isn't available. But systemd doesn't support musl anyway, so + # just disable building it. + $(use_enable !elibc_musl systemd) + $(use_enable debug) + $(use_enable nls) + $(use_enable pam) + $(use_enable python pyzfs) + --disable-static + $(usex minimal --without-python --with-python="${EPYTHON}") + ) + + econf "${myconf[@]}" +} + +src_compile() { + default + if use python; then + pushd contrib/pyzfs >/dev/null || die + distutils-r1_src_compile + popd >/dev/null || die + fi +} + +src_install() { + default + + gen_usr_ldscript -a nvpair uutil zfsbootenv zfs zfs_core zpool + + use pam && { rm -rv "${ED}/unwanted_files" || die ; } + + use test-suite || { rm -r "${ED}"/usr/share/zfs/{test-runner,zfs-tests,runfiles,*sh} || die ; } + + find "${ED}" -name '*.la' -delete || die + + dobashcomp contrib/bash_completion.d/zfs + bashcomp_alias zfs zpool + + # strip executable bit from conf.d file + fperms 0644 /etc/conf.d/zfs + + if use python; then + pushd contrib/pyzfs >/dev/null || die + distutils-r1_src_install + popd >/dev/null || die + fi + + # enforce best available python implementation + use minimal || python_fix_shebang "${ED}/bin" +} + +pkg_postinst() { + udev_reload + + # 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" + elog "The following packages provide one and are tested on a regular basis:" + elog " sys-kernel/dracut ( preferred, module maintained by zfs developers )" + elog " sys-kernel/genkernel" + fi + fi + + if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then + einfo "Adding ${P} to the module database to ensure that the" + einfo "kernel modules and userland utilities stay in sync." + update_moduledb + fi + + if systemd_is_booted || has_version sys-apps/systemd; then + einfo "Please refer to ${EROOT}/$(systemd_get_systempresetdir)/50-zfs.preset" + einfo "for default zfs systemd service configuration" + else + [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \ + einfo "You should add zfs-import to the boot runlevel." + [[ -e "${EROOT}/etc/runlevels/boot/zfs-load-key" ]] || \ + einfo "You should add zfs-load-key to the boot runlevel." + [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \ + einfo "You should add zfs-mount to the boot runlevel." + [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \ + einfo "You should add zfs-share to the default runlevel." + [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \ + einfo "You should add zfs-zed to the default runlevel." + fi +} + +pkg_postrm() { + udev_reload + + if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then + remove_moduledb + fi +} diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild index 8e77d0480577..cc2bf2afec68 100644 --- a/sys-fs/zfs/zfs-9999.ebuild +++ b/sys-fs/zfs/zfs-9999.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 DISTUTILS_OPTIONAL=1 PYTHON_COMPAT=( python3_{8..10} ) @@ -24,7 +24,7 @@ else S="${WORKDIR}/${P%_rc?}" if [[ ${PV} != *_rc* ]]; then - KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv" + KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~sparc" fi fi @@ -48,7 +48,7 @@ DEPEND=" ) " -BDEPEND="virtual/awk +BDEPEND="app-alternatives/awk virtual/pkgconfig nls? ( sys-devel/gettext ) python? ( @@ -69,7 +69,7 @@ RDEPEND="${DEPEND} !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= ) !prefix? ( virtual/udev ) sys-fs/udev-init-scripts - virtual/awk + app-alternatives/awk dist-kernel? ( virtual/dist-kernel:= ) rootfs? ( app-arch/cpio -- cgit v1.2.3