From 20207419457c676f156e212bf03cf27982eea494 Mon Sep 17 00:00:00 2001 From: Georgy Yakovlev Date: Tue, 26 May 2020 16:56:58 -0700 Subject: sys-fs/zfs: revbump 0.8.4, fix not loading /etc/conf.d/zfs Upstream issue: https://github.com/openzfs/zfs/issues/10375 Upstream issue: https://github.com/openzfs/zfs/issues/10341 Bug: https://bugs.gentoo.org/647688 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Georgy Yakovlev --- sys-fs/zfs/files/0.8.4-initconfdir.patch | 35 +++++ sys-fs/zfs/zfs-0.8.4-r1.ebuild | 212 +++++++++++++++++++++++++++++++ sys-fs/zfs/zfs-0.8.4.ebuild | 209 ------------------------------ 3 files changed, 247 insertions(+), 209 deletions(-) create mode 100644 sys-fs/zfs/files/0.8.4-initconfdir.patch create mode 100644 sys-fs/zfs/zfs-0.8.4-r1.ebuild delete mode 100644 sys-fs/zfs/zfs-0.8.4.ebuild (limited to 'sys-fs') diff --git a/sys-fs/zfs/files/0.8.4-initconfdir.patch b/sys-fs/zfs/files/0.8.4-initconfdir.patch new file mode 100644 index 000000000000..aac40896f39b --- /dev/null +++ b/sys-fs/zfs/files/0.8.4-initconfdir.patch @@ -0,0 +1,35 @@ +From 5dbe98184278878746a5f548fead1d2ef1e98dbe Mon Sep 17 00:00:00 2001 +From: Georgy Yakovlev +Date: Tue, 26 May 2020 16:44:54 -0700 +Subject: [PATCH] 0.8.4 initconfdir + +fix for https://github.com/openzfs/zfs/issues/10375 + +--- + etc/zfs/Makefile.am | 1 + + etc/zfs/Makefile.in | 9 +++++---- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/etc/zfs/Makefile.am b/openzfs/etc/zfs/Makefile.am +index 81567a4..5370f41 100644 +--- a/etc/zfs/Makefile.am ++++ b/etc/zfs/Makefile.am +@@ -1,4 +1,5 @@ + pkgsysconfdir = $(sysconfdir)/zfs ++initconfdir = $(DEFAULT_INITCONF_DIR) + + pkgsysconf_DATA = \ + vdev_id.conf.alias.example \ +diff --git a/etc/zfs/Makefile.in b/etc/zfs/Makefile.in +index fb02811..795d3b1 100644 +@@ -571,6 +571,7 @@ udevdir = @udevdir@ + udevruledir = @udevruledir@ + zfsexecdir = @zfsexecdir@ + pkgsysconfdir = $(sysconfdir)/zfs ++initconfdir = $(DEFAULT_INITCONF_DIR) + pkgsysconf_DATA = \ + vdev_id.conf.alias.example \ + vdev_id.conf.sas_direct.example \ +-- +2.26.2 + diff --git a/sys-fs/zfs/zfs-0.8.4-r1.ebuild b/sys-fs/zfs/zfs-0.8.4-r1.ebuild new file mode 100644 index 000000000000..5f7c23109c09 --- /dev/null +++ b/sys-fs/zfs/zfs-0.8.4-r1.ebuild @@ -0,0 +1,212 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( python3_{6,7} ) + +inherit autotools bash-completion-r1 flag-o-matic linux-info distutils-r1 systemd toolchain-funcs 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" +IUSE="custom-cflags debug kernel-builtin libressl python +rootfs test-suite static-libs" + +DEPEND=" + ${PYTHON_DEPS} + net-libs/libtirpc[static-libs?] + sys-apps/util-linux[static-libs?] + sys-libs/zlib[static-libs(+)?] + virtual/awk + virtual/libudev[static-libs(-)?] + libressl? ( dev-libs/libressl:0=[static-libs?] ) + !libressl? ( dev-libs/openssl:0=[static-libs?] ) + python? ( + virtual/python-cffi[${PYTHON_USEDEP}] + ) +" + +BDEPEND="virtual/awk + virtual/pkgconfig + python? ( + dev-python/setuptools[${PYTHON_USEDEP}] + ) +" + +RDEPEND="${DEPEND} + !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV} ) + !prefix? ( virtual/udev ) + sys-fs/udev-init-scripts + 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 + 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-python="${EPYTHON}" + --with-systemdunitdir="$(systemd_get_systemunitdir)" + --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset" + $(use_enable debug) + $(use_enable python pyzfs) + $(use_enable static-libs static) + ) + + 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 + python_fix_shebang "${ED}/bin" +} + +pkg_postinst() { + 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 + + [[ -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." +} + +pkg_postrm() { + if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then + remove_moduledb + fi +} diff --git a/sys-fs/zfs/zfs-0.8.4.ebuild b/sys-fs/zfs/zfs-0.8.4.ebuild deleted file mode 100644 index c7cc180b9ea0..000000000000 --- a/sys-fs/zfs/zfs-0.8.4.ebuild +++ /dev/null @@ -1,209 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_OPTIONAL=1 -PYTHON_COMPAT=( python3_{6,7} ) - -inherit autotools bash-completion-r1 flag-o-matic linux-info distutils-r1 systemd toolchain-funcs 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" -IUSE="custom-cflags debug kernel-builtin libressl python +rootfs test-suite static-libs" - -DEPEND=" - ${PYTHON_DEPS} - net-libs/libtirpc[static-libs?] - sys-apps/util-linux[static-libs?] - sys-libs/zlib[static-libs(+)?] - virtual/awk - virtual/libudev[static-libs(-)?] - libressl? ( dev-libs/libressl:0=[static-libs?] ) - !libressl? ( dev-libs/openssl:0=[static-libs?] ) - python? ( - virtual/python-cffi[${PYTHON_USEDEP}] - ) -" - -BDEPEND="virtual/awk - virtual/pkgconfig - python? ( - dev-python/setuptools[${PYTHON_USEDEP}] - ) -" - -RDEPEND="${DEPEND} - !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV} ) - !prefix? ( virtual/udev ) - sys-fs/udev-init-scripts - 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 - 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-python="${EPYTHON}" - --with-systemdunitdir="$(systemd_get_systemunitdir)" - --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset" - $(use_enable debug) - $(use_enable python pyzfs) - $(use_enable static-libs static) - ) - - 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 - python_fix_shebang "${ED}/bin" -} - -pkg_postinst() { - 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 - - [[ -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." -} - -pkg_postrm() { - if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then - remove_moduledb - fi -} -- cgit v1.2.3-65-gdbad