From 677b7ba5c317778df2ad7e70df94b9b7eec4adbc Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 10 Sep 2021 04:21:55 +0100 Subject: gentoo resync : 10.09.2021 --- sys-fs/zfs/Manifest | 8 +- sys-fs/zfs/zfs-0.8.6-r1.ebuild | 242 +++++++++++++++++++++++++++++++++ sys-fs/zfs/zfs-0.8.6.ebuild | 244 ---------------------------------- sys-fs/zfs/zfs-2.0.5-r1.ebuild | 292 ++++++++++++++++++++++++++++++++++++++++ sys-fs/zfs/zfs-2.0.5.ebuild | 294 ----------------------------------------- sys-fs/zfs/zfs-2.1.0-r1.ebuild | 289 ++++++++++++++++++++++++++++++++++++++++ sys-fs/zfs/zfs-2.1.0.ebuild | 291 ---------------------------------------- sys-fs/zfs/zfs-9999.ebuild | 18 ++- 8 files changed, 835 insertions(+), 843 deletions(-) create mode 100644 sys-fs/zfs/zfs-0.8.6-r1.ebuild delete mode 100644 sys-fs/zfs/zfs-0.8.6.ebuild create mode 100644 sys-fs/zfs/zfs-2.0.5-r1.ebuild delete mode 100644 sys-fs/zfs/zfs-2.0.5.ebuild create mode 100644 sys-fs/zfs/zfs-2.1.0-r1.ebuild delete mode 100644 sys-fs/zfs/zfs-2.1.0.ebuild (limited to 'sys-fs/zfs') diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest index 81d53511b638..87766f15f1b0 100644 --- a/sys-fs/zfs/Manifest +++ b/sys-fs/zfs/Manifest @@ -5,8 +5,8 @@ DIST zfs-2.0.5.tar.gz 13166149 BLAKE2B 4505c43a3b9a6c2b925383d00bbd9f17505290ded DIST zfs-2.0.5.tar.gz.asc 836 BLAKE2B 6bc53160ce650f63c717b67116fb754c7a8196c9aa99bb6e43f0145bb30a0446a1ba5695b8207b085435da289fa0058643201ef2f8827e12b0803ab20b0df305 SHA512 91e73a8da45e4f49113fc1af684143902a23c9cf5e59f8cd2f3a1214aeff57af63a7fa05dbe3fa0465f002521b89a43d6086d765d03209d83a41761d56b358aa DIST zfs-2.1.0.tar.gz 34810470 BLAKE2B f7cc1cde711c255bacb000207b8e9a594105d18601a503d75a2a3055ed29ca941e148492fe52809f81a250848cfb5868b3d1c42860464a3d7d744a416db08929 SHA512 2121b90a1d4d92353801c48a2e34e2dd42bd295dacc3c30aa77cde967a1326e17c983bdd6905552421df0a652c09e84b3d4d2ba01001e053b8afb12e189c046f DIST zfs-2.1.0.tar.gz.asc 195 BLAKE2B d5a7c01c7fd1798a235d5bc9ba89353a85978ac8bb1eaec1c587b8cc6d7cd24b0d7613c465a8da7ba29a172e4ebd6e465f893145d9dd7adf11d7e3858fea835a SHA512 1c5c8d20adbcc27c5e5d760a84e258a897dee7c3950ef1eb56f3ef6bd1c85516c7776ce30b3e63229cd65315d43e06b5e04c587e9483b96b00adb42d24749c1a -EBUILD zfs-0.8.6.ebuild 6450 BLAKE2B 05ad21e2c5fb3877d1cbd8067f7f5ad25ad777da2cf26158a42812f084c6f4c95ad1000fd443f290b9ffc3174f3ed08e72438dab748ad3e46fb19eff15b66bcd SHA512 6d4864aeadfca743966b6d73d168d9a1e663dc3232b6215838a91cd72d25e7939c273ebb1f084530bdbd7d414c3ca4a03a0f0febaadeb7c1c0a946864c538708 -EBUILD zfs-2.0.5.ebuild 8170 BLAKE2B 69ab49691a8cf84bb4e66a8b56a23bbae7c6af4fd906fcdd368455e62512fdfec7cb0ffdee4d95f93c6436e7bc1dd6858bdcf51e4c932e78a005105ed72b2ced SHA512 435fb1d0b41e1a1cf7d93e45fe41153afc075fdf01a017fa29c63ca1c1010f0d0fdb9a632c49387328c841e9d4c985eeb64d60c2923b819e88c02f2666e2c43a -EBUILD zfs-2.1.0.ebuild 8130 BLAKE2B 9c3216a59d4c669f4eb5eaee58d596ec1958f3516fbb24663fba1021dd4993ed15be2008c06c6b3004ef71bd5c2862f4ffc882636d4d7b48a208f2e7ef247383 SHA512 e2ec59460b3c43006c7e0a9d9c777c212ae4f000f9ca137bc411503b84baa003c1704aad64ec2396b66de6ad6e16fb8a7b9174c4a4d5a047bdf60f1a30f1563a -EBUILD zfs-9999.ebuild 8171 BLAKE2B 1b2a68ca8e66600850a347ffba66df82379dfb1e9be7a78c40e666067dcdcdee525a0d4a32d54008fbe106d0605149c025989e7d4548094e80a94eb793723ff8 SHA512 f85f82370be258da0ad8a98da1900a144c51a64a53ff1d3dbe23d14b32d5480597cba2a0b18157c9c9bdafd13d432dc9242b4f07dc71bfbdd10c0425509d1b55 +EBUILD zfs-0.8.6-r1.ebuild 6315 BLAKE2B 063ec7b7374c26035f05614ce2cab7e9d73993571edd22fbaa6eeff51b26ebdeba98fe7fae398f4201a12774a672fe444c1f0f56cfae8da7acd1ec35d92cd5c4 SHA512 5ee8f85b288eca30d3540b1fa8de11616f9095385190139478aa59942e0df7e5f089522e145c35ce900c288b1a4f1d13dda66c569a206da73050630b2f3e787b +EBUILD zfs-2.0.5-r1.ebuild 8035 BLAKE2B 757cfe559c0f3f97f8feb4dae98938cfef68336947057a4520857842e3ff037ef26a78a7cd191183a439b3aab123a4b4b98bb544c5ea31b144beba6241a820b5 SHA512 4a918715cff7d63c00a4d6bcd7b72ecc0f9f76a27180552a98bbec59161ca920b53b077127163f81944a0d3afda7000bcc2dc5aecb7cc3a0d1bf12c347ab0b2e +EBUILD zfs-2.1.0-r1.ebuild 7995 BLAKE2B 321bd30c228300f0fca5b02d7ea1f15dd2fbbec596039f5eb52ef9f2e8443e6c949799de613e07477a1be5bf74e8c54609dc1f65962f883d25e0ed7e826952b7 SHA512 f9c12203fe81b773e0c2925c88e64a441e0c54086b878b643ae5968063304e97f41308fe094c06c32c59e965c46244d6445585fd593dbac624905e9adc473aa8 +EBUILD zfs-9999.ebuild 8036 BLAKE2B dc4b1ab167033e5589130c917c3ca7f0649f1595a8ffecb914f263d6d601aef3d6e299c040ab333441c8bc9b1967deb646de91b10a7906a24aec4b5cfcd44ce3 SHA512 b46877f8f2de727f5f8704da02661cbf7d73f8c570b7a95aad9419636cf80af9ee634c606e987a91ff8578a1fb3a3270269beffd0cecf0d45bd42b91d0af5d87 MISC metadata.xml 1000 BLAKE2B 1f3e75ef73d5680d5863f0fda415931a6af19ab1a535c9795c417526ccce2a826ede05abee88ff27c2ec99f1f23aa06cce02cd3cb6d49b2952e90eb94ab95a6b SHA512 f8b30ce788d80c8f65db738f251fe5ebdc4d3ec7206dc78e0b9e53c2cf92153b90e20f6799b2a36bf8e616147b28f9660421bbc2ad17e7dbd804d47f430f6e40 diff --git a/sys-fs/zfs/zfs-0.8.6-r1.ebuild b/sys-fs/zfs/zfs-0.8.6-r1.ebuild new file mode 100644 index 000000000000..ac6c6017eaaf --- /dev/null +++ b/sys-fs/zfs/zfs-0.8.6-r1.ebuild @@ -0,0 +1,242 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_OPTIONAL=1 +DISTUTILS_USE_SETUPTOOLS=manual +PYTHON_COMPAT=( python3_{7,8,9} ) + +inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info 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 + SRC_URI="https://github.com/openzfs/${PN}/releases/download/${P}/${P}.tar.gz" + KEYWORDS="amd64 arm64 ppc64" +fi + +LICENSE="BSD-2 CDDL MIT" +SLOT="0/2" # just libzfs soname major for now. possible candidates: libuutil, libzpool, libnvpair +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/awk + virtual/libudev:= + dev-libs/openssl:0= + !minimal? ( ${PYTHON_DEPS} ) + python? ( + virtual/python-cffi[${PYTHON_USEDEP}] + ) +" + +BDEPEND="virtual/awk + virtual/pkgconfig + nls? ( sys-devel/gettext ) + python? ( + dev-python/setuptools[${PYTHON_USEDEP}] + ) +" + +RDEPEND="${DEPEND} + !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 + !" + eerror " Block devices --->" + eerror " [X] Loopback device support" + fi + fi + fi + fi +} + +src_prepare() { + default + + if [[ ${PV} == "9999" ]]; then + eautoreconf + else + # 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 + + local myconf=( + --bindir="${EPREFIX}/bin" + --enable-shared + --enable-systemd + --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-systemdunitdir="$(systemd_get_systemunitdir)" + --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset" + $(use_enable debug) + $(use_enable nls) + $(use_enable python pyzfs) + --disable-static + $(usex minimal --without-python --with-python="${EPYTHON}") + ) + + CONFIG_SHELL="${EPREFIX}/bin/bash" 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 uutil nvpair zpool zfs zfs_core + + use test-suite || rm -rf "${ED}/usr/share/zfs" + + 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() { + # 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" + elog "the following packages known to provide one and tested on regular basis:" + elog " sys-kernel/dracut" + 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}/lib/systemd/system-preset/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-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() { + if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then + remove_moduledb + fi +} diff --git a/sys-fs/zfs/zfs-0.8.6.ebuild b/sys-fs/zfs/zfs-0.8.6.ebuild deleted file mode 100644 index b3237b143306..000000000000 --- a/sys-fs/zfs/zfs-0.8.6.ebuild +++ /dev/null @@ -1,244 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_OPTIONAL=1 -DISTUTILS_USE_SETUPTOOLS=manual -PYTHON_COMPAT=( python3_{7,8,9} ) - -inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info 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 - SRC_URI="https://github.com/openzfs/${PN}/releases/download/${P}/${P}.tar.gz" - KEYWORDS="amd64 arm64 ppc64" -fi - -LICENSE="BSD-2 CDDL MIT" -SLOT="0/2" # just libzfs soname major for now. possible candidates: libuutil, libzpool, libnvpair -IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs test-suite static-libs" - -DEPEND=" - net-libs/libtirpc[static-libs?] - sys-apps/util-linux[static-libs?] - sys-libs/zlib[static-libs(+)?] - virtual/awk - virtual/libudev[static-libs(-)?] - dev-libs/openssl:0=[static-libs?] - !minimal? ( ${PYTHON_DEPS} ) - python? ( - virtual/python-cffi[${PYTHON_USEDEP}] - ) -" - -BDEPEND="virtual/awk - virtual/pkgconfig - nls? ( sys-devel/gettext ) - python? ( - dev-python/setuptools[${PYTHON_USEDEP}] - ) -" - -RDEPEND="${DEPEND} - !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 - !" - eerror " Block devices --->" - eerror " [X] Loopback device support" - fi - fi - fi - fi -} - -src_prepare() { - default - - if [[ ${PV} == "9999" ]]; then - eautoreconf - else - # 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 - - local myconf=( - --bindir="${EPREFIX}/bin" - --enable-shared - --enable-systemd - --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-systemdunitdir="$(systemd_get_systemunitdir)" - --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset" - $(use_enable debug) - $(use_enable nls) - $(use_enable python pyzfs) - $(use_enable static-libs static) - $(usex minimal --without-python --with-python="${EPYTHON}") - ) - - CONFIG_SHELL="${EPREFIX}/bin/bash" 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 uutil nvpair zpool zfs zfs_core - - use test-suite || rm -rf "${ED}/usr/share/zfs" - - if ! use static-libs; then - find "${ED}/" -name '*.la' -delete || die - fi - - 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() { - # 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" - elog "the following packages known to provide one and tested on regular basis:" - elog " sys-kernel/dracut" - 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}/lib/systemd/system-preset/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-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() { - if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then - remove_moduledb - fi -} diff --git a/sys-fs/zfs/zfs-2.0.5-r1.ebuild b/sys-fs/zfs/zfs-2.0.5-r1.ebuild new file mode 100644 index 000000000000..6b91c6f5b816 --- /dev/null +++ b/sys-fs/zfs/zfs-2.0.5-r1.ebuild @@ -0,0 +1,292 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_OPTIONAL=1 +DISTUTILS_USE_SETUPTOOLS=manual +PYTHON_COMPAT=( python3_{7,8,9} ) + +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" + 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/4" +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="virtual/awk + virtual/pkgconfig + nls? ( sys-devel/gettext ) + python? ( + dev-python/setuptools[${PYTHON_USEDEP}] + ) +" + +if [[ ${PV} != "9999" ]] ; then + BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-openzfs )" +fi + +# awk is used for some scripts, completions, and the Dracut module +RDEPEND="${DEPEND} + !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 + !" + 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_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 + + local myconf=( + --bindir="${EPREFIX}/bin" + --enable-shared + --enable-systemd + --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="${EPREFIX}/lib/systemd/system-preset" + --with-vendor=gentoo + $(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" || 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() { + # 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" + 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}/lib/systemd/system-preset/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-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() { + if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then + remove_moduledb + fi +} diff --git a/sys-fs/zfs/zfs-2.0.5.ebuild b/sys-fs/zfs/zfs-2.0.5.ebuild deleted file mode 100644 index 67d297759f10..000000000000 --- a/sys-fs/zfs/zfs-2.0.5.ebuild +++ /dev/null @@ -1,294 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_OPTIONAL=1 -DISTUTILS_USE_SETUPTOOLS=manual -PYTHON_COMPAT=( python3_{7,8,9} ) - -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" - 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/4" -IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs test-suite static-libs" - -DEPEND=" - net-libs/libtirpc[static-libs?] - sys-apps/util-linux[static-libs?] - sys-libs/zlib[static-libs(+)?] - virtual/libudev[static-libs(-)?] - dev-libs/openssl:0=[static-libs?] - !minimal? ( ${PYTHON_DEPS} ) - pam? ( sys-libs/pam ) - python? ( - virtual/python-cffi[${PYTHON_USEDEP}] - ) -" - -BDEPEND="virtual/awk - virtual/pkgconfig - nls? ( sys-devel/gettext ) - python? ( - dev-python/setuptools[${PYTHON_USEDEP}] - ) -" - -if [[ ${PV} != "9999" ]] ; then - BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-openzfs )" -fi - -# awk is used for some scripts, completions, and the Dracut module -RDEPEND="${DEPEND} - !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 - !" - 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_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 - - local myconf=( - --bindir="${EPREFIX}/bin" - --enable-shared - --enable-systemd - --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="${EPREFIX}/lib/systemd/system-preset" - --with-vendor=gentoo - $(use_enable debug) - $(use_enable nls) - $(use_enable pam) - $(use_enable python pyzfs) - $(use_enable static-libs 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" || die ; } - - if ! use static-libs; then - find "${ED}" -name '*.la' -delete || die - fi - - 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() { - # 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" - 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}/lib/systemd/system-preset/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-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() { - if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then - remove_moduledb - fi -} diff --git a/sys-fs/zfs/zfs-2.1.0-r1.ebuild b/sys-fs/zfs/zfs-2.1.0-r1.ebuild new file mode 100644 index 000000000000..9f8ac5af2207 --- /dev/null +++ b/sys-fs/zfs/zfs-2.1.0-r1.ebuild @@ -0,0 +1,289 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_OPTIONAL=1 +DISTUTILS_USE_SETUPTOOLS=manual +PYTHON_COMPAT=( python3_{7,8,9} ) + +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" + 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="virtual/awk + virtual/pkgconfig + nls? ( sys-devel/gettext ) + python? ( + dev-python/setuptools[${PYTHON_USEDEP}] + ) +" + +if [[ ${PV} != "9999" ]] ; then + BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-openzfs )" +fi + +# awk is used for some scripts, completions, and the Dracut module +RDEPEND="${DEPEND} + !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 + !" + 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_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 + + local myconf=( + --bindir="${EPREFIX}/bin" + --enable-shared + --enable-systemd + --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="${EPREFIX}/lib/systemd/system-preset" + --with-vendor=gentoo + $(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" || 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() { + # 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" + 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}/lib/systemd/system-preset/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-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() { + if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then + remove_moduledb + fi +} diff --git a/sys-fs/zfs/zfs-2.1.0.ebuild b/sys-fs/zfs/zfs-2.1.0.ebuild deleted file mode 100644 index 81159a7d8e25..000000000000 --- a/sys-fs/zfs/zfs-2.1.0.ebuild +++ /dev/null @@ -1,291 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_OPTIONAL=1 -DISTUTILS_USE_SETUPTOOLS=manual -PYTHON_COMPAT=( python3_{7,8,9} ) - -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" - 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 static-libs" - -DEPEND=" - net-libs/libtirpc[static-libs?] - sys-apps/util-linux[static-libs?] - sys-libs/zlib[static-libs(+)?] - virtual/libudev[static-libs(-)?] - dev-libs/openssl:0=[static-libs?] - !minimal? ( ${PYTHON_DEPS} ) - pam? ( sys-libs/pam ) - python? ( - virtual/python-cffi[${PYTHON_USEDEP}] - ) -" - -BDEPEND="virtual/awk - virtual/pkgconfig - nls? ( sys-devel/gettext ) - python? ( - dev-python/setuptools[${PYTHON_USEDEP}] - ) -" - -if [[ ${PV} != "9999" ]] ; then - BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-openzfs )" -fi - -# awk is used for some scripts, completions, and the Dracut module -RDEPEND="${DEPEND} - !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 - !" - 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_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 - - local myconf=( - --bindir="${EPREFIX}/bin" - --enable-shared - --enable-systemd - --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="${EPREFIX}/lib/systemd/system-preset" - --with-vendor=gentoo - $(use_enable debug) - $(use_enable nls) - $(use_enable pam) - $(use_enable python pyzfs) - $(use_enable static-libs 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" || die ; } - - if ! use static-libs; then - find "${ED}" -name '*.la' -delete || die - fi - - 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() { - # 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" - 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}/lib/systemd/system-preset/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-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() { - 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 22e4286a8654..c089c475f30c 100644 --- a/sys-fs/zfs/zfs-9999.ebuild +++ b/sys-fs/zfs/zfs-9999.ebuild @@ -34,14 +34,14 @@ 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 dist-kernel 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" DEPEND=" - net-libs/libtirpc[static-libs?] - sys-apps/util-linux[static-libs?] - sys-libs/zlib[static-libs(+)?] - virtual/libudev[static-libs(-)?] - dev-libs/openssl:0=[static-libs?] + net-libs/libtirpc + sys-apps/util-linux + sys-libs/zlib + virtual/libudev:= + dev-libs/openssl:0= !minimal? ( ${PYTHON_DEPS} ) pam? ( sys-libs/pam ) python? ( @@ -201,7 +201,7 @@ src_configure() { $(use_enable nls) $(use_enable pam) $(use_enable python pyzfs) - $(use_enable static-libs static) + --disable-static $(usex minimal --without-python --with-python="${EPYTHON}") ) @@ -226,9 +226,7 @@ src_install() { use test-suite || { rm -r "${ED}/usr/share/zfs" || die ; } - if ! use static-libs; then - find "${ED}" -name '*.la' -delete || die - fi + find "${ED}" -name '*.la' -delete || die dobashcomp contrib/bash_completion.d/zfs bashcomp_alias zfs zpool -- cgit v1.2.3