From 0f558761aa2dee1017b4751e4017205e015a9560 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 29 Jun 2022 12:04:12 +0100 Subject: gentoo resync : 29.12.2022 --- sys-fs/zfs/Manifest | 15 +- sys-fs/zfs/files/2.1.2-scrub-timers.patch | 147 --------------- sys-fs/zfs/zfs-0.8.6-r2.ebuild | 245 ------------------------ sys-fs/zfs/zfs-2.0.7.ebuild | 4 + sys-fs/zfs/zfs-2.1.2-r1.ebuild | 303 ------------------------------ sys-fs/zfs/zfs-2.1.4.ebuild | 4 + sys-fs/zfs/zfs-2.1.5.ebuild | 303 ++++++++++++++++++++++++++++++ sys-fs/zfs/zfs-9999.ebuild | 6 +- 8 files changed, 322 insertions(+), 705 deletions(-) delete mode 100644 sys-fs/zfs/files/2.1.2-scrub-timers.patch delete mode 100644 sys-fs/zfs/zfs-0.8.6-r2.ebuild delete mode 100644 sys-fs/zfs/zfs-2.1.2-r1.ebuild create mode 100644 sys-fs/zfs/zfs-2.1.5.ebuild (limited to 'sys-fs/zfs') diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest index be1ded722866..04ea52a86227 100644 --- a/sys-fs/zfs/Manifest +++ b/sys-fs/zfs/Manifest @@ -1,18 +1,15 @@ 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 AUX bash-completion-sudo.patch 905 BLAKE2B 92e58ff097893436d589f7df0134e09d2e0699ae82618c4c14caf4b26cb466367a5372d7e0a030aa857d024e3db0faef4bb5fa32c54f41f0d4766693a95ba5ab SHA512 e53c79401f4c634a94af27b2f88a40440b68a4c192fd1944668786650aaa0f1f08dff851dca5b9666ce8bba1f0e2b7cb195314cd9d1314c9bab1194d03122319 -DIST zfs-0.8.6.tar.gz 9295260 BLAKE2B 45424d710aaf75a05f766ae523ae157a24b5cbdcefe72a59e4cede81e42f7a92ae7f01150388437b78cd49f3d28b9664599f2a624516e6b3f1073497194a99f2 SHA512 626b172554f39a5c70f6ea5c599a92fae52534590d1b0273de2bbfc3676d29dff0eade8ca17e5f179a59870c12bc758fb53b7900f8a1fdbdef3a9161b93f9cce 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 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 -EBUILD zfs-0.8.6-r2.ebuild 6527 BLAKE2B ac889061cc532d89d87705f610fa3220d1f0d8ef08a8e948a61c1eeab616ebb4815c1a5abf9bcc2a662a89a2a43cc1d659183b06fc170bf1f7bb716a2fa1dc4e SHA512 b21b4e0ca160a17f7fb3729cebdfc4efcd83898265445ef5cc4dfc1a6fcaf692552a8300f8465bad3b07fda73e78a212a5c868bae702d1896448945f22d4588d -EBUILD zfs-2.0.7.ebuild 8435 BLAKE2B ecb10942cd6d51d0c5cb9c0e8ad5beef3afb580507514478b10dc3d59355262e87b2714c5f641e497bb2b351355400acb31b3aee81b98912c9a4753d7bcf55da SHA512 caeba0a22fefd58d0f7675c50d11d9a71f006e802960bdd810ff1799219526ab73e4d6993e8428af9823629a99d95932494911fcba8e0e6578c0cf697b0ad4e6 -EBUILD zfs-2.1.2-r1.ebuild 8611 BLAKE2B 65f5e13bdf9ed34e248b9d0e6245fb76ee5b829398e0ee40a790b2f049042ea851ef4b35244264ddc899f31b5511e14c8bf9bc6ad77e2e11c811ccd4d8e2290f SHA512 03274ba778d38678cbf818f79b7ed124cd25af8071a00233d9d01fb86d8d8907a3a53a032dd464558fec196245a75dec95f6117a99371900fa4a6fb6fec2bd90 -EBUILD zfs-2.1.4.ebuild 8645 BLAKE2B 480e950c3daaeeb4bc12f2df38f8ca828d9e0e67ef5244e8d36783444ba1390e13be8a68cd67fe85470c5d7a76fd0edbeba6c92f1ef3fdb09bb8c36882008f17 SHA512 cbf6e54dd05f63b84a3a4560131a7ad75fe423ef61b607ce0c1274b3a4b0129cc8bf952e0ff32a6fbee17c20e6cdd37b3f0a9dfadc684f2f23a65c8fc7b3dca6 -EBUILD zfs-9999.ebuild 8602 BLAKE2B c3154af855d5e81642f6dd39a846e19c96a9bb7879217a00c675d5b689fd2574ae486bec0682be921374ff20456f4dadc1f88129c185eb0fb095a0d7eeecc5dd SHA512 172c44e8c88613e0713d3647a8ed2e8b0d552a57c5d16c4e34cf0ccaaa7bf438b8cb54953519d1885b46000ba21448973881e3730c6fa1d7e4a0a3634c461f39 +DIST zfs-2.1.5.tar.gz 34951632 BLAKE2B c6e3efd9c0cda91654767eaad0eaaa05cd9a5daf1cb0384c9c78b30062f5c29142ac37ab9dbdaf96c91456d11c317d782d3524ade293f03fda983e5992b79e49 SHA512 d9ccf1049cefa9167d25f71fbdca70092cd02368b60f09341e6489fb68dc5f89e87b026b0191f4d81181a8851449124d824a1d959d0e2fb29c8a3d624edc4f03 +DIST zfs-2.1.5.tar.gz.asc 836 BLAKE2B 4a81c266967540850a2cc824e79555ca9d05b2e17e45fa2723893cbd85b55e3d7d791986d6667b7ee1530e7692c03818f15e8b6798393b54989f90801b775786 SHA512 224b0dcf4982c63a8eff0a39d054537e7d023f7c35e154e4d20490b8daf184c076bc8e4de7d2c5af4059f8a802b747e637aad4479cd8d1330cf5b26da2f19c94 +EBUILD zfs-2.0.7.ebuild 8463 BLAKE2B 652e7b21478954257ed02ef341264da7d5ded2ac7f7361e760ede9638e589c61c95b5862878343935ee4271850f943562358546c9c521c1eb1e4959e6bf74b5e SHA512 f8d8ef189af7597c67ec8769ac8e615ab366eca16f797f77e596d7a2791eaa628c1e66557f751ad3de66f971c41845ae505d7a397b873ff91de391a57e1e0a37 +EBUILD zfs-2.1.4.ebuild 8673 BLAKE2B d8c05a44f18adfc4a0e95b12576947ca3aa90333e2d1cf06ea1975f49e56446b8e5cbeba19250c82722f558432406f27ed9a798daafda147023f31e6aa699c86 SHA512 d054c058b248b88158ba165fa33c5f7772bde2efc6eadb2c6792243e353ae025b5bf7cab8101689ffc57960e8827018b34165dce7f14c17e855016c6f64006ed +EBUILD zfs-2.1.5.ebuild 8629 BLAKE2B 1a41e5f11c63238de677cd39af866b5670801c3e289b6e5bbf34a145219d89995ff07f9f2ce49ec57b3ddab73546213f549be396d58d2e6adfcf265a5cb5687b SHA512 9cbfa779f28e399de1695b199939fa46bf248eb88b2ec0b5e924698312360c25673381b426a120850374f17c8a23ee29337ed6e857d8389160a490f7da891f35 +EBUILD zfs-9999.ebuild 8629 BLAKE2B 1a41e5f11c63238de677cd39af866b5670801c3e289b6e5bbf34a145219d89995ff07f9f2ce49ec57b3ddab73546213f549be396d58d2e6adfcf265a5cb5687b SHA512 9cbfa779f28e399de1695b199939fa46bf248eb88b2ec0b5e924698312360c25673381b426a120850374f17c8a23ee29337ed6e857d8389160a490f7da891f35 MISC metadata.xml 2194 BLAKE2B 57b0d1bcbcd78039d0cfd20f087bdfc339eefebbec3150af3c06d2e1a6dee882c4f8f97a9e470f63d4d628441a10650bda8b1843e33240dcc8d3e2ad55d104ec SHA512 fac8750d64d844b397fbbdcca9b7aea671f7642c64da92b89480439919ced80b9b6292ee3a2cc55e412e3c55dd02c418ef7c056f2973b7eb0f53ee763e099098 diff --git a/sys-fs/zfs/files/2.1.2-scrub-timers.patch b/sys-fs/zfs/files/2.1.2-scrub-timers.patch deleted file mode 100644 index f1c5b5699f62..000000000000 --- a/sys-fs/zfs/files/2.1.2-scrub-timers.patch +++ /dev/null @@ -1,147 +0,0 @@ -From 2c9844d159024d4c742d24639a218213fb53d537 Mon Sep 17 00:00:00 2001 -From: Georgy Yakovlev -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 ---- - 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 - -From 4bac4eae0345fb322337b66a9b4923e9f3f52b0f Mon Sep 17 00:00:00 2001 -From: Georgy Yakovlev -Date: Fri, 29 Oct 2021 21:40:50 -0700 -Subject: [PATCH 2/2] zpool-scrub.8: add PERIODIC SCRUB section - -Signed-off-by: Georgy Yakovlev ---- - man/man8/zpool-scrub.8 | 21 +++++++++++++++++++++ - 1 file changed, 21 insertions(+) - -diff --git a/man/man8/zpool-scrub.8 b/man/man8/zpool-scrub.8 -index 768f71539..69ae825b6 100644 ---- a/man/man8/zpool-scrub.8 -+++ b/man/man8/zpool-scrub.8 -@@ -116,8 +116,29 @@ scanned at 100M/s, and 68.4M of that file data has been - scrubbed sequentially at 10.0M/s. - .El - .El -+.Sh PERIODIC SCRUB -+On machines using systemd, scrub timers can be enabled on per-pool basis. -+.Nm weekly -+and -+.Nm monthly -+timer units are provided. -+.Bl -tag -width Ds -+.It Xo -+.Xc -+.Nm systemctl -+.Cm enable -+.Cm zfs-scrub-\fIweekly\fB@\fIrpool\fB.timer -+.Cm --now -+.It Xo -+.Xc -+.Nm systemctl -+.Cm enable -+.Cm zfs-scrub-\fImonthly\fB@\fIotherpool\fB.timer -+.Cm --now -+.El - . - .Sh SEE ALSO -+.Xr systemd.timer 5 , - .Xr zpool-iostat 8 , - .Xr zpool-resilver 8 , - .Xr zpool-status 8 --- -2.34.1 - diff --git a/sys-fs/zfs/zfs-0.8.6-r2.ebuild b/sys-fs/zfs/zfs-0.8.6-r2.ebuild deleted file mode 100644 index 46403d3bc9b8..000000000000 --- a/sys-fs/zfs/zfs-0.8.6-r2.ebuild +++ /dev/null @@ -1,245 +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_{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}:= ) - !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="$(systemd_get_systempresetdir)" - $(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 ( 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.0.7.ebuild b/sys-fs/zfs/zfs-2.0.7.ebuild index e4ff7efbdefa..2a638aee9616 100644 --- a/sys-fs/zfs/zfs-2.0.7.ebuild +++ b/sys-fs/zfs/zfs-2.0.7.ebuild @@ -256,6 +256,8 @@ src_install() { } 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 @@ -296,6 +298,8 @@ pkg_postinst() { } pkg_postrm() { + udev_reload + 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 deleted file mode 100644 index d119026f5c74..000000000000 --- a/sys-fs/zfs/zfs-2.1.2-r1.ebuild +++ /dev/null @@ -1,303 +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,9,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 - !" - 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-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() { - # 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.4.ebuild b/sys-fs/zfs/zfs-2.1.4.ebuild index 7d1292a10c0a..465412d2cee6 100644 --- a/sys-fs/zfs/zfs-2.1.4.ebuild +++ b/sys-fs/zfs/zfs-2.1.4.ebuild @@ -252,6 +252,8 @@ src_install() { } 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 @@ -294,6 +296,8 @@ pkg_postinst() { } pkg_postrm() { + udev_reload + if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then remove_moduledb fi diff --git a/sys-fs/zfs/zfs-2.1.5.ebuild b/sys-fs/zfs/zfs-2.1.5.ebuild new file mode 100644 index 000000000000..6e0b78a9c125 --- /dev/null +++ b/sys-fs/zfs/zfs-2.1.5.ebuild @@ -0,0 +1,303 @@ +# 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 + !" + 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-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 +} diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild index cd2bdc26966b..6e0b78a9c125 100644 --- a/sys-fs/zfs/zfs-9999.ebuild +++ b/sys-fs/zfs/zfs-9999.ebuild @@ -4,7 +4,7 @@ EAPI=7 DISTUTILS_OPTIONAL=1 -PYTHON_COMPAT=( python3_{8,9,10} ) +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 @@ -251,6 +251,8 @@ src_install() { } 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 @@ -293,6 +295,8 @@ pkg_postinst() { } pkg_postrm() { + udev_reload + if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then remove_moduledb fi -- cgit v1.2.3