summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-11 01:28:44 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-11 01:28:44 +0100
commitb46b9834b3fbf80b22ccc12e95f660512cd0fa75 (patch)
treef7eb18ccc89e078e2f175e5249fe0d4dfdb5b104 /sys-fs
parent62f7102650b24618880e8e6f08fcb8fbd235025b (diff)
gentoo auto-resync : 11:07:2022 - 01:28:44
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/Manifest.gzbin21695 -> 21689 bytes
-rw-r--r--sys-fs/loop-aes/Manifest4
-rw-r--r--sys-fs/loop-aes/loop-aes-3.7x.ebuild (renamed from sys-fs/loop-aes/loop-aes-3.7v.ebuild)4
-rw-r--r--sys-fs/zfs/Manifest2
-rw-r--r--sys-fs/zfs/files/2.1.5-dracut-mount.patch29
-rw-r--r--sys-fs/zfs/zfs-2.1.5-r4.ebuild321
6 files changed, 357 insertions, 3 deletions
diff --git a/sys-fs/Manifest.gz b/sys-fs/Manifest.gz
index 5b67447f4639..daf6fd050587 100644
--- a/sys-fs/Manifest.gz
+++ b/sys-fs/Manifest.gz
Binary files differ
diff --git a/sys-fs/loop-aes/Manifest b/sys-fs/loop-aes/Manifest
index 801b67e22861..742053c0ea57 100644
--- a/sys-fs/loop-aes/Manifest
+++ b/sys-fs/loop-aes/Manifest
@@ -1,6 +1,6 @@
AUX loop-aes-3.7w-build-initrd_explicit-losetup.patch 944 BLAKE2B 1fe676ac40df6a08c2e75769fba02fd627ac3411e1657ece64bcf368111b5e9180c9ee5fc392dc3a0bd58299dbffd18cd49a1ba4738bf798915869594f4749ca SHA512 d4f04cec3c39885464e3254366d1c0959ed778c8f60b4353669061b5fecb03c0bc23ecfb9b8cdfc8d143ff5e386d935183e9bb68942d526822ab4f0ebacd06a4
-DIST loop-AES-v3.7v.tar.bz2 378465 BLAKE2B 01d9c3719242846696c1e199a02a42254c06472abce6cee7ccc3882e456921176f7469e9c61331193dd86ee2fcf0d24972f9012026eadad150a8e6116dd4e275 SHA512 62c0bafd97bc07d78d128ba3bbcf471bf16bd979264ad9180132b83f01a1e8d4f6d9aa874c602a00bc85360abfefe16f72b28b2c73cc2ad863ea2d36eb7bc478
DIST loop-AES-v3.7w.tar.bz2 379844 BLAKE2B 00877a1711afa0a232f6cf0d568fd667fe891393c4cf4602666c68169c71b4a1308806e37ce48f7e5372d5e2416be2f5f1a680302d6ccc795057ccc1d3716f4b SHA512 882653341edba90a4717624382826296d490cd71d4e8843c9f44f606eda0d30a9e685a5310ed3b996b04ab9095d7be6adccff2a16f1c68a2349c052a69fd0a15
-EBUILD loop-aes-3.7v.ebuild 1528 BLAKE2B 9774785e6db9f11ad9191e3b4b761b05507b6f613de6d347a3a756aa5abc4d63b7db56826b6345bf836ca837fcb8bc4f81fde6555c027772d2434931e32672c0 SHA512 8edae2efb1686106bc3f4a625f9a7e0e5da5034e80019b37be5ea568eefcc289916aa81c919e7d64223efcec5e21172994aa9db557f3b3d2b675102ff443c58a
+DIST loop-AES-v3.7x.tar.bz2 380098 BLAKE2B 328e9eefcd22875ceb8b64b632032a63f5edac03c1ac6897cd05e0ca5d28b32a03428ba5da92c88361c1c115d28576c21c4d66e840137e203aab75926b5fd0fa SHA512 2d5986e524e11e1c69c4052d9545bd270e1726e0128884a0a942fef4491a90549fac7bf914348f6a8a8a9c3c38b77ebbf4af78a95a5d12d4c1db9d2a2cd04fc2
EBUILD loop-aes-3.7w.ebuild 1605 BLAKE2B add42c581a6f42a56a52eaab09a57745cc69c97a6e3d5e685faaf9cc48b135819a3030626813bdd7fcda84aef2259bbcc8019859860bd4fa2d834ff18cf82879 SHA512 b52794651103e6383d687dfda5bf7ed890482e54a8eddcb9c92aba49c30eb5732ab866799b2cd4bddf9b36f1005455adaa19f671c6721767bf160f3e6f9f56c8
+EBUILD loop-aes-3.7x.ebuild 1605 BLAKE2B add42c581a6f42a56a52eaab09a57745cc69c97a6e3d5e685faaf9cc48b135819a3030626813bdd7fcda84aef2259bbcc8019859860bd4fa2d834ff18cf82879 SHA512 b52794651103e6383d687dfda5bf7ed890482e54a8eddcb9c92aba49c30eb5732ab866799b2cd4bddf9b36f1005455adaa19f671c6721767bf160f3e6f9f56c8
MISC metadata.xml 648 BLAKE2B 283db8a905c756bf44779739a188d2555ff87bdf77ff46ef2d0d947661633a45a0b163a1ad3a7bcc00a50e6502e01886178245af2c73d86947adda24c948c37a SHA512 8fa7faf71248ce5dc0c217869a2109ea3275c84de1b5f4b898fe97be5c0c4c91d38405699b41a8e591336993d52d69357becba2b2a7f15369dc5e0508c4788b4
diff --git a/sys-fs/loop-aes/loop-aes-3.7v.ebuild b/sys-fs/loop-aes/loop-aes-3.7x.ebuild
index 3061d50ad0a8..5f6b4ed8f398 100644
--- a/sys-fs/loop-aes/loop-aes-3.7v.ebuild
+++ b/sys-fs/loop-aes/loop-aes-3.7x.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -18,6 +18,8 @@ IUSE="cpu_flags_x86_aes extra-ciphers keyscrub cpu_flags_x86_padlock"
DEPEND="app-crypt/loop-aes-losetup"
+PATCHES=( "${FILESDIR}"/loop-aes-3.7w-build-initrd_explicit-losetup.patch )
+
S="${WORKDIR}/${MY_P}"
pkg_setup() {
diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index dbdfa3360ff6..944a820e9557 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -2,6 +2,7 @@ AUX 2.0.7-scrub-timers.patch 3128 BLAKE2B f7f55905df7e804bef3818c4b5ce9c34595bcf
AUX 2.1.2-musl-tests.patch 1923 BLAKE2B 0029cba42b7914166cec894e30730f205f2c1508dd7f0c46b2567c365b5c6daa1d65cfc9ede9180f4831c924760b6a9a9ac81972e991c439148ad21bfcb3dfda SHA512 be96efa5b0b407388fe4f0066c5516a1b882bb158376d072373d6c73f2dc1414a61eda925fa12a0708d15e5c791c590f4b83809262d21e2160a0d931e608ab80
AUX 2.1.2-openrc-vendor.patch 1469 BLAKE2B d8c20bbeee95db8eb4c26e6d5b1798e89c3b152c03ddc852dea6810fb170f70e77a200bdbda00953a792d05467f268260ccfcc1d1b20576bfb21c65fde6e93df SHA512 ae5709acef0531146f7ac020fd4038dc76f99dd43c8322b3934522c2e74f90d60106c30de679cb9aaaa3f6ece00ed93e490c0787e573fc0871c30d73842ea04e
AUX 2.1.5-build-issues.patch 2262 BLAKE2B 6d7540c2b8f97ba1a4e84109cda702cb6dd78b89979e757ffe7b7ce6ed98792daae0b56696dfbf264c772d2a90836a9ad5786ca81c13737cb2a5f6a6eb50e7dc SHA512 1b1e8e29db530c16385e8461a0f068cf2cbcd08f347d516ffecf26c3c995e20f454b8a77a380bce5b789ab6d5fd83a77c45d4f356532a6144cdf230cc38c9672
+AUX 2.1.5-dracut-mount.patch 1093 BLAKE2B b22c3195332a6be3656282a16a5a10622effe64b5b4d852285a9d1fb4d59be852421b401c5ff9753a3a9febf6066c7120851199d04e837193a9f794b2304722f SHA512 e482880bc714c60da8758140c4560592de6eabd5a010febccc8bb8f81388ed009d944149c7b463006c67116d240c67d69d58fcaaa6b2f1984cbc64230f7de33d
AUX 2.1.5-dracut-non-root.patch 1418 BLAKE2B ed5e530c05b586ae73bacf274448574b72bd48aa395ad03c6ce943979ab880cae221feaaa975329979124a21a2159fc60d92dbced0bcadc678a600dc84a6461b SHA512 ce5834d12ba746e0063df3f23f17b5e7a15e5b84d840fa870a9bd02ae8fdef2a9e2d18dbbac4a3de299d2bddf379ae062338c7fb5acaa2101e55bfcbfa2dc261
AUX 2.1.5-dracut-zfs-missing.patch 309 BLAKE2B e66e700757aa6498b71d714c13e29e671455c77b1b319c7e951b10edc7179f37149b093c5b24fa17b487b9025112bcf31dffb441bbdde7943d90d16443140384 SHA512 0de374270a4814a937e5d97ec4261c5f77ef44fb8f3afc74c4b802d140e4595362b288ff91b8a5c4e9754871969d1f6af05eafa9c91e38c8b913c26ba78b1676
AUX 2.1.5-r2-dracut-non-root.patch 1823 BLAKE2B b6954c1648742cb19b1cea5709bdba78477731232bfd6a180f2b2aa179ba2e10ac968af6658fc9fd9a7a03127098c7e4401f3ad803e603d4e114d995b370da3d SHA512 33b3244de91f3d51ef2c2eff2ea4515890b7fa9b39a077b4034f770772077e75e6c5db187c76aa19dd2fb60dac91de35d70fbd84be3704bb950bbf8d4656c29a
@@ -16,6 +17,7 @@ EBUILD zfs-2.0.7-r1.ebuild 8668 BLAKE2B 5ee2a32d4d623e526ae551752f911cf816d8a912
EBUILD zfs-2.1.4-r1.ebuild 8878 BLAKE2B 047fa1439d2cf2bc6b4eedcd2e324403a5461b5856b88b880951253981192c0e87525de45e5658aef2e5f3e8eb67326ca17b5961a2b19870c96256c1a92f5a7b SHA512 b57efc204eb954aad1765ac84ae8ae3349e931d54aab955d0be5b3dec2ef8cd55ca7ae263038c9f0e6d4b2511b4d90ea0259cf042f454ceafaccd02f324fab0e
EBUILD zfs-2.1.5-r1.ebuild 8755 BLAKE2B 117d334d76866f6aa2c78ef0be12da14bf7f00f2a6dddd5a6c46f4f04f846f8c43e360237f3875b92c43bfd313cdc34c3c7eff4a0527de05fb2baeb1072a3c6b SHA512 c287e39dd0bc1869d41209505b7c4af28708a423f1aeb40a52371e5be90a15e6288e8eef5a3cfab3c02e0bbace87f731789503c411a5dd641a8e6b152c9732e0
EBUILD zfs-2.1.5-r3.ebuild 9012 BLAKE2B aba14b0ecb731dc05354186be733f0f3fcdc195cf9dcd369b30bb1cc63bda9ef9b3de9f65f6a6bfdecdbb1f71350eb52b125a0897648dee92ae06c84e5612c9d SHA512 cd60ca314e1daad078816cb6ff94cc8ba36294db514c5076c0971a3a7de079f6a7893470eedc622fbde990455c066ef9247ee991c461433b5ed30f6509184a30
+EBUILD zfs-2.1.5-r4.ebuild 9067 BLAKE2B 9f87319cb3ab043a0ca9328ade65626d0900bd54db08bd72d2a921e64dc86971b5841077f1a76bcc3aa5b9124b00857e8e2138cc4975ac7d05a1d8a0bc0825ff SHA512 5ff2d0f351883ef51728e9dc5dea017e7d59711fd5faddde4da841e7276137033c00edf0a1aef8f320743fc3ab0d277a1963438dfdc2f742841125b6d03a095c
EBUILD zfs-2.1.5.ebuild 8629 BLAKE2B 1a41e5f11c63238de677cd39af866b5670801c3e289b6e5bbf34a145219d89995ff07f9f2ce49ec57b3ddab73546213f549be396d58d2e6adfcf265a5cb5687b SHA512 9cbfa779f28e399de1695b199939fa46bf248eb88b2ec0b5e924698312360c25673381b426a120850374f17c8a23ee29337ed6e857d8389160a490f7da891f35
EBUILD zfs-9999.ebuild 8893 BLAKE2B 34446b9139f93a8e8fd45fd8d82dd55c788bb453fef41453b517388e2a9980bdd0d1768b78d85e47bc42e36400364c1e546ff5c68a9fea3a8abea2b016c6f9bd SHA512 1f80d3cb72bbb1eaac7542ed3d0c3119ab1223cfbe454acc474cff5a462bd126638dd6a380274673b14835625288e614763226e4721ed5f6fa5c387025879f38
MISC metadata.xml 2194 BLAKE2B 57b0d1bcbcd78039d0cfd20f087bdfc339eefebbec3150af3c06d2e1a6dee882c4f8f97a9e470f63d4d628441a10650bda8b1843e33240dcc8d3e2ad55d104ec SHA512 fac8750d64d844b397fbbdcca9b7aea671f7642c64da92b89480439919ced80b9b6292ee3a2cc55e412e3c55dd02c418ef7c056f2973b7eb0f53ee763e099098
diff --git a/sys-fs/zfs/files/2.1.5-dracut-mount.patch b/sys-fs/zfs/files/2.1.5-dracut-mount.patch
new file mode 100644
index 000000000000..758f4b3a3e99
--- /dev/null
+++ b/sys-fs/zfs/files/2.1.5-dracut-mount.patch
@@ -0,0 +1,29 @@
+https://github.com/openzfs/zfs/commit/07f2793e869196fcbcd5057d9ada377674262fe3
+https://bugs.gentoo.org/857228
+
+From: Brian Behlendorf <behlendorf1@llnl.gov>
+Date: Wed, 29 Jun 2022 15:33:38 -0700
+Subject: [PATCH] dracut: fix typo in mount-zfs.sh.in
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Format the `zpool get` command correctly. The -o option must
+be followed by "all" or the requested field name.
+
+Reviewed-by: Ahelenia ZiemiaƄska <nabijaczleweli@nabijaczleweli.xyz>
+Reviewed-by: George Melikov <mail@gmelikov.ru>
+Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Closes #13602
+--- a/contrib/dracut/90zfs/mount-zfs.sh.in
++++ b/contrib/dracut/90zfs/mount-zfs.sh.in
+@@ -82,7 +82,7 @@ ZFS_DATASET="${ZFS_DATASET:-${root}}"
+ ZFS_POOL="${ZFS_DATASET%%/*}"
+
+
+-if ! zpool get -Ho name "${ZFS_POOL}" > /dev/null 2>&1; then
++if ! zpool get -Ho value name "${ZFS_POOL}" > /dev/null 2>&1; then
+ info "ZFS: Importing pool ${ZFS_POOL}..."
+ # shellcheck disable=SC2086
+ if ! zpool import -N ${ZPOOL_IMPORT_OPTS} "${ZFS_POOL}"; then
+
diff --git a/sys-fs/zfs/zfs-2.1.5-r4.ebuild b/sys-fs/zfs/zfs-2.1.5-r4.ebuild
new file mode 100644
index 000000000000..2cf49118a4f5
--- /dev/null
+++ b/sys-fs/zfs/zfs-2.1.5-r4.ebuild
@@ -0,0 +1,321 @@
+# 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 ~riscv"
+ 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}]
+ || (
+ 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=(
+ # bug #855182
+ "${FILESDIR}"/${PV}-build-issues.patch
+ # bug #854333
+ "${FILESDIR}"/${PV}-r2-dracut-non-root.patch
+ #
+ "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch
+ # bug #857228
+ "${FILESDIR}"/${PV}-dracut-mount.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-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
+}