summaryrefslogtreecommitdiff
path: root/sys-fs/zfs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-25 20:34:27 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-25 20:34:27 +0000
commit0f15659d48c193027158492acb726297501202c5 (patch)
tree5502ba879a78b759da28441d418dbbfe08bd8f03 /sys-fs/zfs
parent93a93e9a3b53c1a73142a305ea1f8136846942ee (diff)
gentoo xmass resync : 25.12.2021
Diffstat (limited to 'sys-fs/zfs')
-rw-r--r--sys-fs/zfs/Manifest14
-rw-r--r--sys-fs/zfs/files/2.0.7-scrub-timers.patch99
-rw-r--r--sys-fs/zfs/metadata.xml20
-rw-r--r--sys-fs/zfs/zfs-0.8.6-r2.ebuild2
-rw-r--r--sys-fs/zfs/zfs-2.0.6-r1.ebuild2
-rw-r--r--sys-fs/zfs/zfs-2.0.7.ebuild303
-rw-r--r--sys-fs/zfs/zfs-2.1.2-r1.ebuild2
-rw-r--r--sys-fs/zfs/zfs-9999.ebuild2
8 files changed, 434 insertions, 10 deletions
diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index c9a9350056b8..a64a8bf581ee 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -1,4 +1,5 @@
AUX 2.0.4-scrub-timers.patch 2873 BLAKE2B 40986e258ddc3c5b4dfdebc8c2126fbb2c0ff9ac947700fa30c547795612fb98b2778f364ee10ec47c05a6837c4d4129918a6efe7cf3ab5854910e1892a3e348 SHA512 0e557974fe8992a7b0e6c15e46fac55d265e469aa13f85e85b0abe449b5fe2e8c51cf56510863fa2e33c060f2b38c0c43a910a740172ef1d4c42c0aa85e04ab9
+AUX 2.0.7-scrub-timers.patch 3128 BLAKE2B f7f55905df7e804bef3818c4b5ce9c34595bcfd77c8d0fa3fb94156d878e077f878a3acd76cc92a57a056d9e8643c9d769cce0b1f067ab228f75d3242178b588 SHA512 a2a649e5b59af8dc26312cf8adf5716671da9e897788af3b6598eec653a5cd73ef25f703ac1b549c9927036738c016acc629c9bfc6dca0335b1d1327f85c6af4
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.2-scrub-timers.patch 4260 BLAKE2B 1921e617aa97cb45a60b9f9649adb9ce2ea01a834e452c2af43360b04174ca92a8d2bf1b6e6ad7ebdeff97b82499cadcd996ecde2986d2f05102358f63d2a2d9 SHA512 f12865ebb649c7bba90e5f4ba2f901bb49c9d9d7d71d80bfa7402316773132a8a12ddd77de4bb60007aa5c5c050472d9bded410893a9ae5d9a9e87e0d2f03a40
@@ -6,10 +7,13 @@ AUX bash-completion-sudo.patch 905 BLAKE2B 92e58ff097893436d589f7df0134e09d2e069
DIST zfs-0.8.6.tar.gz 9295260 BLAKE2B 45424d710aaf75a05f766ae523ae157a24b5cbdcefe72a59e4cede81e42f7a92ae7f01150388437b78cd49f3d28b9664599f2a624516e6b3f1073497194a99f2 SHA512 626b172554f39a5c70f6ea5c599a92fae52534590d1b0273de2bbfc3676d29dff0eade8ca17e5f179a59870c12bc758fb53b7900f8a1fdbdef3a9161b93f9cce
DIST zfs-2.0.6.tar.gz 13192941 BLAKE2B 3a83303b016ec4259c286af8a9ceb281829d26508d411df91dd94193bca8c3155ef0ba63604e95f6add5f0c6cf6d100b0f567efc33b6c484c9ff811924da6ccd SHA512 52a5576eed21868b2a3d63d05d3d8c35b5e59ee88c7ddab1dc070644539f9acd56bde43ba5e965ad951a6d50a014fb429a7977d2ab1a2bfcadd92ea78dd57bf8
DIST zfs-2.0.6.tar.gz.asc 836 BLAKE2B 065eba3361ef4234acc67df0236ab9a6737ba9fe5a706be98b55dd64d10360160ca787d8873f27451a2107225ae657dc4cab20a7c2a268cd2de64c8d82d0327a SHA512 123569ecfcee22ac462160acf61b120144c774bc5c0d46a50d2b7312f7565da1a9d780e1a6207dba5834917c66d5b852763e4a3162378d5c9bb90b0dfde35c5c
+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.2.tar.gz 34829045 BLAKE2B ab4e2d85200438373c7eeeaa5256a712dbfb2862b85de1fb7554ad0cc2b9f8e1255ab4564bca62f65a81a823adb8c112957e6e8771b8e5e6944c3731bc894584 SHA512 3e3932259da2a27f1c4cca8da62b909edc43bf51ab0229d2d5d0234d9a7eaa7b63b67c06a98cbe2d29ba1eb5cbcaab16e5062c2a2bc8e84cab770be10ebf2102
DIST zfs-2.1.2.tar.gz.asc 836 BLAKE2B 8f5666f5c3d7016a4d79191f42d0a220fe8c654a0d64e3da3b575644fe52c83dcb9f9ef49ba0553771a127bba44e2802f1d366a7a38f670e73612deef76755c3 SHA512 da6bfccd19a249a6891f5e1de6c4b332e98ce4f125f638c046b9cedac3fd79c56a99dd9a620105a40741e5f04b382f5d5996b56cbe576fb268b31e57e0fed6eb
-EBUILD zfs-0.8.6-r2.ebuild 6508 BLAKE2B 8751f1d3dda492fbdea68898ef30390c90df7cec9fe47a589916cf7beddf7bfa486f14c39ecd35f9ae1abce78435934a70ff761cc789b3ef2fdf5ca840102988 SHA512 e7fe2f7ca4a44aa4cf6f71642c8da4d581d4f7fd80466b688e5f6404920fab93ce110554858477a9705e6a434ed097e3a7b97ab0b77da663227c18c1e623c330
-EBUILD zfs-2.0.6-r1.ebuild 8342 BLAKE2B dad25c713d73cf005157d8112d1006d849f0fb23f8ac3622d126d0e6e6565f46fb2ca390ff797038cf638179bf3321b61494d9e0eac956e11f00cc22ef374041 SHA512 269cc5deecf2778c49db1e61a4dd0b83e5efb34b52c28008cb1967233a596f5de7163a810a2ab1cf634df53cd48557cecbf960f3bc8e37a348370796d0563944
-EBUILD zfs-2.1.2-r1.ebuild 8595 BLAKE2B 83c3496d1d9b21a76294445155e5c6090124ba364c953965d5d5a31499b94ddd73440387178044850725caaa37f5bfcaae20abf57ec940f76664a829b849b0b3 SHA512 5f5894ee61c06a8be07ce4aaca11f1a21657901df0c95877151505383f85bcd1a19da1894323ca4df14c42fa546da159cc3541c8d756d8f3bce8553e40bf347e
-EBUILD zfs-9999.ebuild 8583 BLAKE2B 7a7c9f0c247bee1230969f16e82c62ae92a9d88f9c4682e2cdcf0a41a80eb9bbd6e3aa638d6b06fb620f0f8bdd918c07fa59f8644aeb1898f1c5eebb012ac897 SHA512 6efc5e8a87e1c53efe92c6c6bf8066e497b6d6ad404b4829104799d3398a9aa38a23de60e04b4d472de3450bea1a6c61bdb924af53e957f95e803e4e69a40733
-MISC metadata.xml 1001 BLAKE2B 8e94a0d8e1afff064b3f8e4a7e3e6d34ad12d5fa550df2f3371b1593b0938b3ea0dbfdcd2e40023f4e91bbe12cf1f3633d92977e4f5b4ee10b56d5040f065f90 SHA512 fc7ba310676715f5daa59b30107560f9ba61cc7dc79eb74ff866e4c8f36bd6a414474a216f5c833dc46c6426e4c80a6672b488fab4178a0c00a47b0de1caf6eb
+EBUILD zfs-0.8.6-r2.ebuild 6559 BLAKE2B 6ae2951143257283909f0d0c9499003cbfa005c9bb59fb5ebd85993296ae5de11f0a9508e9d10cccee5acdcc5be99adc9c61ad9999988845b3d1c167ace3a5b7 SHA512 793fe4a87c1146912fc5e87c243b42e8cc22e8e2a75730c0b317b77811a50d1b4b0620afed1169395044ec90613491dac2e09b785f9facb3e83f0a7b4b3b52ee
+EBUILD zfs-2.0.6-r1.ebuild 8393 BLAKE2B 42c547084c53b7c81e9faa0816cc8b48407dde3417c494cb35aede99c71d26721ca4d60648feae26ced588ccbf7053b9e371a18470ad503af75dd62d3727e1d2 SHA512 b57362a83a561dab8accbbefe7d73a9c1336f7cdaa9d0631b254fb5f2a5594d8152a0ba6169321cc0f5d150a0ae06a0ffb1f7ea25afe70e104a59821705cb4da
+EBUILD zfs-2.0.7.ebuild 8467 BLAKE2B 026a5e44ee82c68739e3e7ca6d2ba548a976889dfd901259b20d7d571a10fbdd6c73f8e011745d082d116294c171ad9ca34fef0800bd6d33bd77a33f38202a4f SHA512 9c7ad992b30ec5197338b1bb64cb8e8d7993667110e54c811948eac4f09e002e0a95e3eb48c09e668f64f5e25d277268f09994825204d5edd304c6feb5fb43f7
+EBUILD zfs-2.1.2-r1.ebuild 8646 BLAKE2B 9443265873167bd5985050400d34c552254ed81e33bfc0bdaf0f7c375438bb34c90969f064034f60e60fb687ee088a8e06cc77c6b4fcfecff7253361f1f8363e SHA512 171b29c7ae59bf3ed69e9437f85ab48ddbdc70a27d39a33a812e71f95ee8a0ac52baef15fc6fbaef192b7402ccda273a03126119347e21cb834002b660e6bc70
+EBUILD zfs-9999.ebuild 8634 BLAKE2B a611d956a49fcb371e223a821e58a101a3671e210a21076428a0f3ae2f3b3a3510ab85fd87f112be5ee340ce0208968f87d887dbb8b527c012f5d71ffa0c8302 SHA512 0d2020a7b34c860bd8b8f285300f9e52879178f3a942461801abc9a01b4c03841100b1a7e76bedae8dea5b3dcb9a3be7b880817febbc63182c98225959c24c2b
+MISC metadata.xml 2083 BLAKE2B c2ca05dbbffefbc1dc1cf1f31187831ea1d41af36588527e2209799769154dd944d4afb0279aad6205ead61082113e91d8cc1654e99306ccb4f4949e529014ac SHA512 7227c36aa6ef74b765f67496d4ca1f0cb090e9890d972948dc440094f8c34098ef6618058ece20f4dd38efb426732cb1023a68b402a13290805b635b0204061a
diff --git a/sys-fs/zfs/files/2.0.7-scrub-timers.patch b/sys-fs/zfs/files/2.0.7-scrub-timers.patch
new file mode 100644
index 000000000000..7c7bd1b874ea
--- /dev/null
+++ b/sys-fs/zfs/files/2.0.7-scrub-timers.patch
@@ -0,0 +1,99 @@
+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/metadata.xml b/sys-fs/zfs/metadata.xml
index 29c6291bc939..78f7538fc6a6 100644
--- a/sys-fs/zfs/metadata.xml
+++ b/sys-fs/zfs/metadata.xml
@@ -17,6 +17,24 @@
<flag name="test-suite">Install regression test suite</flag>
</use>
<upstream>
- <remote-id type="github">zfsonlinux/zfs</remote-id>
+ <remote-id type="github">openzfs/zfs</remote-id>
</upstream>
+ <longdescription lang="en">
+ OpenZFS is an advanced file system and volume manager which was originally developed
+ for Solaris and is now maintained by the OpenZFS community
+
+ It includes the functionality of both traditional file systems and volume manager.
+ It has many advanced features including:
+ * Protection against data corruption. Integrity checking for both data and metadata.
+ * Continuous integrity verification and automatic “self-healing” repair
+ * Data redundancy with mirroring, RAID-Z1/2/3 [and DRAID]
+ * Support for high storage capacities — up to 256 trillion yobibytes (2^128 bytes)
+ * Space-saving with transparent compression using LZ4, GZIP or ZSTD
+ * Hardware-accelerated native encryption
+ * Efficient storage with snapshots and copy-on-write clones
+ * Efficient local or remote replication — send only changed blocks with ZFS send and receive
+
+ The OpenZFS project brings together developers from the Linux, FreeBSD, illumos, MacOS, and Windows platforms.
+ OpenZFS is supported by a wide range of companies.
+ </longdescription>
</pkgmetadata>
diff --git a/sys-fs/zfs/zfs-0.8.6-r2.ebuild b/sys-fs/zfs/zfs-0.8.6-r2.ebuild
index df9295794bab..2ac686b80913 100644
--- a/sys-fs/zfs/zfs-0.8.6-r2.ebuild
+++ b/sys-fs/zfs/zfs-0.8.6-r2.ebuild
@@ -213,7 +213,7 @@ pkg_postinst() {
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/dracut ( preferred, module maintained by zfs developers )"
elog " sys-kernel/genkernel"
fi
fi
diff --git a/sys-fs/zfs/zfs-2.0.6-r1.ebuild b/sys-fs/zfs/zfs-2.0.6-r1.ebuild
index b90eb7e6aea6..f5ad730973d9 100644
--- a/sys-fs/zfs/zfs-2.0.6-r1.ebuild
+++ b/sys-fs/zfs/zfs-2.0.6-r1.ebuild
@@ -269,7 +269,7 @@ pkg_postinst() {
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/dracut ( preferred, module maintained by zfs developers )"
elog " sys-kernel/genkernel"
fi
fi
diff --git a/sys-fs/zfs/zfs-2.0.7.ebuild b/sys-fs/zfs/zfs-2.0.7.ebuild
new file mode 100644
index 000000000000..49a33456ec22
--- /dev/null
+++ b/sys-fs/zfs/zfs-2.0.7.ebuild
@@ -0,0 +1,303 @@
+# 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_{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
+
+ 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() {
+ # 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() {
+ if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then
+ remove_moduledb
+ fi
+}
diff --git a/sys-fs/zfs/zfs-2.1.2-r1.ebuild b/sys-fs/zfs/zfs-2.1.2-r1.ebuild
index a5b0419a7ed8..241e00cc3ec6 100644
--- a/sys-fs/zfs/zfs-2.1.2-r1.ebuild
+++ b/sys-fs/zfs/zfs-2.1.2-r1.ebuild
@@ -271,7 +271,7 @@ pkg_postinst() {
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/dracut ( preferred, module maintained by zfs developers )"
elog " sys-kernel/genkernel"
fi
fi
diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
index 9a69934d3bb9..c5b347c4f1a2 100644
--- a/sys-fs/zfs/zfs-9999.ebuild
+++ b/sys-fs/zfs/zfs-9999.ebuild
@@ -265,7 +265,7 @@ pkg_postinst() {
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/dracut ( preferred, module maintained by zfs developers )"
elog " sys-kernel/genkernel"
fi
fi