summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2022-09-17 15:10:37 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2022-09-17 15:14:00 -0700
commit33344d7dd6b44bd93c17485d77d60c0e25ef71ee (patch)
tree58623aa7b439841f84e63b0b934c1049dfdeb04e /sys-fs
parentsys-fs/zfs-kmod: drop 2.0.7 (diff)
downloadgentoo-33344d7dd6b44bd93c17485d77d60c0e25ef71ee.tar.gz
gentoo-33344d7dd6b44bd93c17485d77d60c0e25ef71ee.tar.bz2
gentoo-33344d7dd6b44bd93c17485d77d60c0e25ef71ee.zip
sys-fs/zfs: drop 2.0.7-r1
Closes: https://bugs.gentoo.org/850508 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/zfs/Manifest2
-rw-r--r--sys-fs/zfs/files/2.0.7-scrub-timers.patch99
-rw-r--r--sys-fs/zfs/files/2.1.2-musl-tests.patch58
-rw-r--r--sys-fs/zfs/files/2.1.2-openrc-vendor.patch42
-rw-r--r--sys-fs/zfs/files/bash-completion-sudo.patch35
-rw-r--r--sys-fs/zfs/zfs-2.0.7-r1.ebuild313
6 files changed, 0 insertions, 549 deletions
diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index 7b982f51e740..e252f0fccc10 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -1,5 +1,3 @@
-DIST zfs-2.0.7.tar.gz 14550055 BLAKE2B 80f7297f04a21cd8f3f2043d895b0325512ba0cea3bb9223561237754495c8233d29af5a9418a3c06a87510100240a45ef3d59c7ce776fffb5aafdcd18167c21 SHA512 1135abf74bf74685439018f7cd65fc52088f179d113bdd2e6481689bb0f4a016716a07d859107b74501fda00689e80b2488c7c2c53d5f058d6b659909ed85f6f
-DIST zfs-2.0.7.tar.gz.asc 836 BLAKE2B 65e7df58c33ccadc4e0ca9dbc1e8c006abbec8442e2da50872a1ab0cbb841fc45152298e8d3b93ee4320ddae6416e3a856caf80d8efb21b19db53dfedbf00e38 SHA512 b901d8e92faa6cfe6010bd54de88c7d18057f434cb07f8a89672d6c446a0a97b23209ee8f02cfd3b2a8f431c68ec977e7dc9f95fe5d385dba0bb6d37338ba682
DIST zfs-2.1.4.tar.gz 34896310 BLAKE2B be303f1181f604770536aa4aa61d5319ec408abbd04964cedadd15b3101a15deba6539bb5d833f4fed357f323d74f622d035305df699b213df41ae45bffdd200 SHA512 c7b57c43fc287b22905067ab022df4133d32e1a5dc335f7baf743b4ef88f64c2bf9d41318c2083230d077dd49e68f7d9e6172266e13d4b1eee29d359860f969e
DIST zfs-2.1.4.tar.gz.asc 836 BLAKE2B b311730f72d534c87a782515f35a354bfbefba0513dc0cee5b0b497cf742590f13be6a49ff8a70d7d6503d0ba06b0266e7d290d718337add614812c3d1b0731a SHA512 53880cd5369f468551bab685eb83739ed76aa286886fdd2cbad4270755fe809da730082a91bba61011f59594fac297ce05645ae32c2c73b4a9aa835f2991a1ee
DIST zfs-2.1.5-patches.tar.xz 13324 BLAKE2B bfef8abd298cebd54491272b8c1deacace901d9a1acce67cb927bab6447eafd985352fd09f64336aa9d6611bab0e5c761d7973f0a65c408d77bb735a94c60253 SHA512 d2b009664f8eb4f2a8596693011fde578b6eae123c6169e5dfb70bd920c0f987f5177f7b1be008705a421574a8a9bc930f99823785c69e81573f18b0350cb9bd
diff --git a/sys-fs/zfs/files/2.0.7-scrub-timers.patch b/sys-fs/zfs/files/2.0.7-scrub-timers.patch
deleted file mode 100644
index 7c7bd1b874ea..000000000000
--- a/sys-fs/zfs/files/2.0.7-scrub-timers.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 2c9844d159024d4c742d24639a218213fb53d537 Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Sat, 22 May 2021 22:27:39 -0700
-Subject: [PATCH 1/2] systemd: add weekly and monthly scrub timers
-
-timers can be enabled as follows:
-
-systemctl enable zfs-scrub-weekly@rpool.timer --now
-systemctl enable zfs-scrub-monthly@datapool.timer --now
-
-Each timer will pull in zfs-scrub@${poolname}.service, which is not
-schedule-specific.
-
-Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
----
- etc/systemd/system/.gitignore | 1 +
- etc/systemd/system/Makefile.am | 5 ++++-
- etc/systemd/system/zfs-scrub-monthly@.timer.in | 12 ++++++++++++
- etc/systemd/system/zfs-scrub-weekly@.timer.in | 12 ++++++++++++
- etc/systemd/system/zfs-scrub@.service.in | 14 ++++++++++++++
- 5 files changed, 43 insertions(+), 1 deletion(-)
- create mode 100644 etc/systemd/system/zfs-scrub-monthly@.timer.in
- create mode 100644 etc/systemd/system/zfs-scrub-weekly@.timer.in
- create mode 100644 etc/systemd/system/zfs-scrub@.service.in
-
-diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am
-index c374a52ac..5e65e1db4 100644
---- a/etc/systemd/system/Makefile.am
-+++ b/etc/systemd/system/Makefile.am
-@@ -12,7 +12,10 @@ systemdunit_DATA = \
- zfs-volume-wait.service \
- zfs-import.target \
- zfs-volumes.target \
-- zfs.target
-+ zfs.target \
-+ zfs-scrub-monthly@.timer \
-+ zfs-scrub-weekly@.timer \
-+ zfs-scrub@.service
-
- SUBSTFILES += $(systemdpreset_DATA) $(systemdunit_DATA)
-
-diff --git a/etc/systemd/system/zfs-scrub-monthly@.timer.in b/etc/systemd/system/zfs-scrub-monthly@.timer.in
-new file mode 100644
-index 000000000..903068468
---- /dev/null
-+++ b/etc/systemd/system/zfs-scrub-monthly@.timer.in
-@@ -0,0 +1,12 @@
-+[Unit]
-+Description=Monthly zpool scrub timer for %i
-+Documentation=man:zpool-scrub(8)
-+
-+[Timer]
-+OnCalendar=monthly
-+Persistent=true
-+RandomizedDelaySec=1h
-+Unit=zfs-scrub@%i.service
-+
-+[Install]
-+WantedBy=timers.target
-diff --git a/etc/systemd/system/zfs-scrub-weekly@.timer.in b/etc/systemd/system/zfs-scrub-weekly@.timer.in
-new file mode 100644
-index 000000000..ede699500
---- /dev/null
-+++ b/etc/systemd/system/zfs-scrub-weekly@.timer.in
-@@ -0,0 +1,12 @@
-+[Unit]
-+Description=Weekly zpool scrub timer for %i
-+Documentation=man:zpool-scrub(8)
-+
-+[Timer]
-+OnCalendar=weekly
-+Persistent=true
-+RandomizedDelaySec=1h
-+Unit=zfs-scrub@%i.service
-+
-+[Install]
-+WantedBy=timers.target
-diff --git a/etc/systemd/system/zfs-scrub@.service.in b/etc/systemd/system/zfs-scrub@.service.in
-new file mode 100644
-index 000000000..c04ac292a
---- /dev/null
-+++ b/etc/systemd/system/zfs-scrub@.service.in
-@@ -0,0 +1,14 @@
-+[Unit]
-+Description=zpool scrub on %i
-+Documentation=man:zpool-scrub(8)
-+Requires=zfs.target
-+After=zfs.target
-+ConditionACPower=true
-+ConditionPathIsDirectory=/sys/module/zfs
-+
-+[Service]
-+ExecStart=/bin/sh -c '\
-+if @sbindir@/zpool status %i | grep "scrub in progress"; then\
-+exec @sbindir@/zpool wait -t scrub %i;\
-+else exec @sbindir@/zpool scrub -w %i; fi'
-+ExecStop=-/bin/sh -c '@sbindir@/zpool scrub -p %i 2>/dev/null || true'
---
-2.34.1
diff --git a/sys-fs/zfs/files/2.1.2-musl-tests.patch b/sys-fs/zfs/files/2.1.2-musl-tests.patch
deleted file mode 100644
index 3d2c563f8c51..000000000000
--- a/sys-fs/zfs/files/2.1.2-musl-tests.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 123c87b3c2d75636da79f57a4b0ed60d2a3133a8 Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Mon, 20 Dec 2021 12:25:11 -0800
-Subject: [PATCH] zfs-test/mmap_seek: fix build on musl
-
-it needs linux/fs.h for SEEK_DATA and friends
-
-without linux/fs.h:
-
-```
-mmap_seek.c
-mmap_seek.c: In function 'seek_data':
-mmap_seek.c:37:40: error: 'SEEK_DATA' undeclared (first use in this function);
-did you mean 'SEEK_SET'?
- 37 | off_t data_offset = lseek(fd, offset, SEEK_DATA);
-```
-
-also it needs sys/sysmacros.h for P2ROUNDUP
-without it:
-
-```
-mmap_seek.c: In function 'main':
-mmap_seek.c:122:19: warning:
-implicit declaration of function 'P2ROUNDUP' [-Wimplicit-function-declaration]
- 122 | seek_hole(fd, 0, P2ROUNDUP(file_size / 2, block_size));
- | ^~~~~~~~~
-powerpc64-gentoo-linux-musl/bin/ld: mmap_seek.o: in function `main':
-mmap_seek.c:(.text.startup+0x1b8): undefined reference to `P2ROUNDUP'
-powerpc64-gentoo-linux-musl/bin/ld: mmap_seek.c:(.text.startup+0x1d8):
- undefined reference to `P2ROUNDUP'
-powerpc64-gentoo-linux-musl/bin/ld: mmap_seek.c:(.text.startup+0x21c):
- undefined reference to `P2ROUNDUP'
-collect2: error: ld returned 1 exit status
-make[5]: *** [Makefile:754: mmap_seek] Error 1
-```
-
-Closes: https://github.com/openzfs/zfs/pull/12891
-Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
----
- tests/zfs-tests/cmd/mmap_seek/mmap_seek.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c b/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c
-index f476e1dba9a..bb36527aafe 100644
---- a/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c
-+++ b/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c
-@@ -29,7 +29,11 @@
- #include <stdlib.h>
- #include <string.h>
- #include <sys/mman.h>
-+#include <sys/sysmacros.h>
- #include <errno.h>
-+#ifdef __linux__
-+#include <linux/fs.h>
-+#endif
-
- static void
- seek_data(int fd, off_t offset, off_t expected)
diff --git a/sys-fs/zfs/files/2.1.2-openrc-vendor.patch b/sys-fs/zfs/files/2.1.2-openrc-vendor.patch
deleted file mode 100644
index abe222aa5b84..000000000000
--- a/sys-fs/zfs/files/2.1.2-openrc-vendor.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6ef28c526ba7199a3740407d764b6505618ca8ba Mon Sep 17 00:00:00 2001
-From: Peter Levine <plevine457@gmail.com>
-Date: Fri, 29 Oct 2021 18:34:37 -0400
-Subject: [PATCH] Set DEFAULT_INIT_SHELL to /sbin/openrc-run for Gentoo and
- Alpine
-
-Gentoo and Alpine always set the rc init scripts' shebang to
-#!/sbin/openrc-run, whether or not openrc is installed.
-
-Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Signed-off-by: Peter Levine <plevine457@gmail.com>
-Closes #12683
-Closes #12692
----
- config/zfs-build.m4 | 14 +++++---------
- 1 file changed, 5 insertions(+), 9 deletions(-)
-
-diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
-index 27041c054c2..ec4a2026bf5 100644
---- a/config/zfs-build.m4
-+++ b/config/zfs-build.m4
-@@ -564,15 +564,11 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
- *) DEFAULT_INIT_SCRIPT=lsb ;;
- esac
-
-- # On gentoo, it's possible that OpenRC isn't installed. Check if
-- # /sbin/openrc-run exists, and if not, fall back to generic defaults.
--
-- DEFAULT_INIT_SHELL="/bin/sh"
-- AS_IF([test "$DEFAULT_INIT_SCRIPT" = "openrc"], [
-- AS_IF([test -x "/sbin/openrc-run"],
-- [DEFAULT_INIT_SHELL="/sbin/openrc-run"],
-- [DEFAULT_INIT_SCRIPT=lsb])
-- ])
-+ case "$VENDOR" in
-+ gentoo) DEFAULT_INIT_SHELL="/sbin/openrc-run";;
-+ alpine) DEFAULT_INIT_SHELL="/sbin/openrc-run";;
-+ *) DEFAULT_INIT_SHELL="/bin/sh" ;;
-+ esac
-
- AC_MSG_RESULT([$DEFAULT_INIT_SCRIPT:$DEFAULT_INIT_SHELL])
- AC_SUBST(DEFAULT_INIT_SCRIPT)
diff --git a/sys-fs/zfs/files/bash-completion-sudo.patch b/sys-fs/zfs/files/bash-completion-sudo.patch
deleted file mode 100644
index 8ae9d25d2761..000000000000
--- a/sys-fs/zfs/files/bash-completion-sudo.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 3829d0b867f6aa4bde8798147dee74a86435d12c Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Fri, 22 Mar 2019 22:04:40 -0700
-Subject: [PATCH] contrib/bash_completion.d/zfs: remove sudo reference
-
----
- contrib/bash_completion.d/zfs | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/contrib/bash_completion.d/zfs b/contrib/bash_completion.d/zfs
-index 914db43c..b1aded36 100644
---- a/contrib/bash_completion.d/zfs
-+++ b/contrib/bash_completion.d/zfs
-@@ -21,13 +21,13 @@
- # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- # OTHER DEALINGS IN THE SOFTWARE.
-
--if [[ -w /dev/zfs ]]; then
-+#if [[ -w /dev/zfs ]]; then
- __ZFS_CMD="zfs"
- __ZPOOL_CMD="zpool"
--else
-- __ZFS_CMD="sudo zfs"
-- __ZPOOL_CMD="sudo zpool"
--fi
-+#else
-+# __ZFS_CMD="sudo zfs"
-+# __ZPOOL_CMD="sudo zpool"
-+#fi
-
- __zfs_get_commands()
- {
---
-2.21.0
-
diff --git a/sys-fs/zfs/zfs-2.0.7-r1.ebuild b/sys-fs/zfs/zfs-2.0.7-r1.ebuild
deleted file mode 100644
index 68d9116fd3de..000000000000
--- a/sys-fs/zfs/zfs-2.0.7-r1.ebuild
+++ /dev/null
@@ -1,313 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-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"
- 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}]
- || (
- 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
- virtual/awk
- dist-kernel? ( virtual/dist-kernel:= )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-kernel/genkernel-3.5.1.1
- )
- 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=(
- "${FILESDIR}/bash-completion-sudo.patch"
- "${FILESDIR}/2.0.7-scrub-timers.patch"
- "${FILESDIR}/2.1.2-openrc-vendor.patch"
- "${FILESDIR}/2.1.2-musl-tests.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_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-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="$(systemd_get_systempresetdir)"
- --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() {
- 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-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
-}