From 2719f73b6813d11d13a9650cdd2ab8ec6e69385d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 9 Jul 2022 15:43:36 +0100 Subject: gentoo resync : 09.07.2022 --- sys-fs/Manifest.gz | Bin 21686 -> 21694 bytes sys-fs/btrfs-progs/Manifest | 16 +- sys-fs/btrfs-progs/btrfs-progs-5.10.1-r1.ebuild | 2 +- sys-fs/btrfs-progs/btrfs-progs-5.15.1.ebuild | 2 +- sys-fs/btrfs-progs/btrfs-progs-5.16.2.ebuild | 2 +- sys-fs/btrfs-progs/btrfs-progs-5.16.ebuild | 140 --------- sys-fs/btrfs-progs/btrfs-progs-5.17.ebuild | 2 +- sys-fs/btrfs-progs/btrfs-progs-5.18.1-r1.ebuild | 2 +- sys-fs/btrfs-progs/btrfs-progs-5.18.ebuild | 152 ---------- sys-fs/btrfs-progs/btrfs-progs-9999.ebuild | 2 +- sys-fs/ddrescue/Manifest | 2 +- sys-fs/ddrescue/metadata.xml | 5 +- sys-fs/inotify-tools/Manifest | 5 +- .../files/inotify-tools-3.22.6.0-musl.patch | 26 ++ sys-fs/inotify-tools/inotify-tools-3.22.1.0.ebuild | 42 --- sys-fs/inotify-tools/inotify-tools-3.22.6.0.ebuild | 24 +- sys-fs/lvm2/Manifest | 5 +- sys-fs/lvm2/files/lvm2-2.03.14-freopen_n2.patch | 34 +++ sys-fs/lvm2/lvm2-2.02.188-r3.ebuild | 16 +- sys-fs/lvm2/lvm2-2.03.14-r2.ebuild | 299 ------------------- sys-fs/lvm2/lvm2-2.03.14-r3.ebuild | 310 ++++++++++++++++++++ sys-fs/multipath-tools/Manifest | 3 + .../multipath-tools-0.9.0-respect-flags.patch | 15 + .../multipath-tools/multipath-tools-0.9.0.ebuild | 76 +++++ sys-fs/zfs-kmod/Manifest | 3 +- sys-fs/zfs-kmod/files/2.1.5-build-issues.patch | 74 +++++ sys-fs/zfs-kmod/zfs-kmod-2.1.5.ebuild | 5 + sys-fs/zfs/Manifest | 12 +- sys-fs/zfs/files/2.1.5-build-issues.patch | 74 +++++ sys-fs/zfs/files/2.1.5-dracut-non-root.patch | 33 +++ sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch | 14 + sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch | 60 ++++ sys-fs/zfs/zfs-2.0.7-r1.ebuild | 313 ++++++++++++++++++++ sys-fs/zfs/zfs-2.0.7.ebuild | 306 -------------------- sys-fs/zfs/zfs-2.1.4-r1.ebuild | 311 ++++++++++++++++++++ sys-fs/zfs/zfs-2.1.4.ebuild | 304 -------------------- sys-fs/zfs/zfs-2.1.5-r1.ebuild | 310 ++++++++++++++++++++ sys-fs/zfs/zfs-2.1.5-r3.ebuild | 319 +++++++++++++++++++++ sys-fs/zfs/zfs-9999.ebuild | 11 + 39 files changed, 2047 insertions(+), 1284 deletions(-) delete mode 100644 sys-fs/btrfs-progs/btrfs-progs-5.16.ebuild delete mode 100644 sys-fs/btrfs-progs/btrfs-progs-5.18.ebuild create mode 100644 sys-fs/inotify-tools/files/inotify-tools-3.22.6.0-musl.patch delete mode 100644 sys-fs/inotify-tools/inotify-tools-3.22.1.0.ebuild create mode 100644 sys-fs/lvm2/files/lvm2-2.03.14-freopen_n2.patch delete mode 100644 sys-fs/lvm2/lvm2-2.03.14-r2.ebuild create mode 100644 sys-fs/lvm2/lvm2-2.03.14-r3.ebuild create mode 100644 sys-fs/multipath-tools/files/multipath-tools-0.9.0-respect-flags.patch create mode 100644 sys-fs/multipath-tools/multipath-tools-0.9.0.ebuild create mode 100644 sys-fs/zfs-kmod/files/2.1.5-build-issues.patch create mode 100644 sys-fs/zfs/files/2.1.5-build-issues.patch create mode 100644 sys-fs/zfs/files/2.1.5-dracut-non-root.patch create mode 100644 sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch create mode 100644 sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch create mode 100644 sys-fs/zfs/zfs-2.0.7-r1.ebuild delete mode 100644 sys-fs/zfs/zfs-2.0.7.ebuild create mode 100644 sys-fs/zfs/zfs-2.1.4-r1.ebuild delete mode 100644 sys-fs/zfs/zfs-2.1.4.ebuild create mode 100644 sys-fs/zfs/zfs-2.1.5-r1.ebuild create mode 100644 sys-fs/zfs/zfs-2.1.5-r3.ebuild (limited to 'sys-fs') diff --git a/sys-fs/Manifest.gz b/sys-fs/Manifest.gz index d95524c3a7c7..096c5470e05f 100644 Binary files a/sys-fs/Manifest.gz and b/sys-fs/Manifest.gz differ diff --git a/sys-fs/btrfs-progs/Manifest b/sys-fs/btrfs-progs/Manifest index 3038fc83890d..e5aadcb02b33 100644 --- a/sys-fs/btrfs-progs/Manifest +++ b/sys-fs/btrfs-progs/Manifest @@ -2,16 +2,12 @@ AUX 5.16-linux-headers-before-5.11.patch 1545 BLAKE2B 2e0f333d8ba42a45cde8089070 DIST btrfs-progs-v5.10.1.tar.xz 2204164 BLAKE2B ed83729754f9abd22d4d2e7ae9a7e90e80be9b63d49a4a9692e20e5939467dbd864834b71495661e1c7a1fca89e253a62fbda37f1d01d2eadecb13f5904f0dd0 SHA512 32e5b8bda1863e34613802db91946f240b2cde21288ff8f95c1807e7afd0a67c5a704aa4d2bc0d7b1ca094de6831adbfec83fe61f74e1caf6d1975be7d972f2d DIST btrfs-progs-v5.15.1.tar.xz 2280796 BLAKE2B b460254a6261d3d04a2d265a3b4e05a89385888f7ea4f2b16ec5b73922646c7f47a546fc78ba7c009e65914125435cf38157eabffc74f5d00df2c21c844922e3 SHA512 68ed89e337ae857fdaf077eaa889e259e9f162ea2222bdaa03f4187783a8682c24d45c91b0559b901d81429ba2cd3f84087d032d354092d5512fb226bdf91549 DIST btrfs-progs-v5.16.2.tar.xz 2334464 BLAKE2B a21809a840107c370f1598e19f8b07d8bdd704e8ff3ce4cb78431000e7560802e1047d8200c523a45a761d59a311f1ec384946bd585826a129b05a1a5fd0250e SHA512 c89a763e8b099e0e9d04ff239dfee156a15fc783c515bbd48597f5645f720c377dbb4f2dfe9065971a65d3ade9d8fcb24cf37d527811bf4204153a06f7c8c3a7 -DIST btrfs-progs-v5.16.tar.xz 2327376 BLAKE2B 3bb3b630d465068373bf39776389f733e734cb39801b389a4e94ba2bb325e9625e2cd767c783e4a05e1e18fed92c06190c5d3fbb476b57689a16482357c86b61 SHA512 3ba557134b19f1abb6c63bf3e2092852f92e988677c4bcf9421c824824b87565ae5cc0e5bca0370be81766a8c8fbda21dfb443dcd159f705f31e70b6bf19aa63 DIST btrfs-progs-v5.17.tar.xz 2286016 BLAKE2B 013acc4f9ec294d8d88b04e9f0ee33c450bfa6621b029005d18885add7c0a1da7e645c1f984931749ebd8f3166e8d849ec128a0f95cc189c15878d45acc0901b SHA512 4c2bfafe0fcae47f01bad41910c2e2b3d48a12b88ca1891a9ea63ac1e65699c2e22f481492c7dd11fbea546647ab78718ab9b6997bb257fc29d1482fde9b08d1 DIST btrfs-progs-v5.18.1.tar.xz 2293940 BLAKE2B ce2326cca51a4242895aada860e290c6af69a216dc6369673bb3321ab91bfe1c995fcc37dd0c1e15c8e28aabaedf3d6c9508bde393eb0ba4c7b9327c922f749a SHA512 265a03b0db00a231ad51bb75fb161dee0a7a51cd120a696ca0524f08ef635b18afe43b391fa9889a4a79734ccc3931e4374bd950eb26dc47ddc8482368efed0e -DIST btrfs-progs-v5.18.tar.xz 2293620 BLAKE2B dd5da4618e53d7d1c6636b4dcf9adb0e24e2e735a13ff1858bc55d21a90ad31cb2a7a11ab12beddd44682c62673fda41ebc7517aa80c81cd61cc1b195668a0e1 SHA512 142d9c133a41c0843ab8442018a6caf5186757d6c8d73f9a69a2245f62590d93a448dae6fdde2ebc5f091cc39da9a79ad0e8c94e1873d75e6c723dcc79d74309 -EBUILD btrfs-progs-5.10.1-r1.ebuild 3046 BLAKE2B ca40892695507f2d8ded08d2d43b0cddead63279b84a621eb003e87cdc41b48d98a307363f2e04c5b3ef1d287fcf66c00805c5ac99acd60856abb50be04f2120 SHA512 9c0c0dc2d6991686f076cb2376edabac7253b916b4e4f9446dcce403b70eb10e3c40c7ab6c92035b755a08144e492eb87ea178c9717b20db71d9b4d21f3429e6 -EBUILD btrfs-progs-5.15.1.ebuild 3084 BLAKE2B 1e22d8639ca8792ddf3bc7840091d375831489ad63bab756e445342009f80e3681d1432761a5aad561727c8deb076ece57e74b9ddc32af2cfd7341979f6704a9 SHA512 61c2fa949b59a185cf70ed40ca3109f50d5038b924690a3da543d51962d79e61061042a15e3349a1a3f7ca9a42cae6cad80438ac343bfb78752452c0680d0fce -EBUILD btrfs-progs-5.16.2.ebuild 3139 BLAKE2B 44cd4f768d4d2beffc54a0325b22572096e978742786916f55e539d0573ed2d8f13d452edd94b2adde51a4a17cc64e5d3abc279039a610faded84b2f64ad9fe6 SHA512 deb3b2a793d381a957d2273438e39cb4df1f3b7d9c63cb4a400f7ea4a6745360ca9d3ff2f8cce166daffc58bc1865c34e65b797da0330ef0fa80196a2211c43a -EBUILD btrfs-progs-5.16.ebuild 3155 BLAKE2B 70bedb119f3bc6d90de05558963a3663f763b5919f02dd85c76e3c8d34b515e817e0f579eac4bbdbac9b7513be9e20e6da2445c8b855b6a209321a380255dc9b SHA512 d00762deb927876a4384ec874bcf527c8c69a384fa99a1c15a84805b8dc1e56e9a0fd6e5c4808ea759b0c4988f840ad7735d7fd1564bd8d7e3f870718c67bc78 -EBUILD btrfs-progs-5.17.ebuild 3113 BLAKE2B b55f749346e5a0dc1c004dae7d7f888bafc5da8a0bd1c5032697a1e38f53903950f45e8004fea86ff04cabe4e5488a0dc31f064349a357188c0c21634af76cca SHA512 9e6bc0163180246cc96b992cc90c7960e3141f4cec9bc81fdbe6547051ff1d8e3e7158e36c505cea14f2576125190a99fc81363c56e62f60f33a7c866c5baabe -EBUILD btrfs-progs-5.18.1-r1.ebuild 3315 BLAKE2B 21bcee35074e908afed1b369f07609565bbcc864def87f3c28bc4c5c9b2f8e02e37d7591f655cfdfb640186b0a3bcf4160c7784c556b0754385b9830cf0477a1 SHA512 c483f3ae0784548120a6a9db16c4be656b51097e676e6e333df778a499ba1cce8c6486dd951455468be0be39f26441f798138c4623232fc9431868d8da2a9710 -EBUILD btrfs-progs-5.18.ebuild 3404 BLAKE2B ffca9e8d9839b900e8fe04ae8e0e33564fd994e63b91080c8b4ef857e3259465e7441156192fafbdf8009a1362bf7ca89e0cbe8d93585ab7b86f105899cb39e0 SHA512 b7dcfb64b5a8331330e26e950f448461905a28de523bb0f01cc3c7a7a85dc58b187ed48819113ff4c27ec6c68a927668efe38d26eb0b1c963eb7e28755307e1d -EBUILD btrfs-progs-9999.ebuild 3315 BLAKE2B 21bcee35074e908afed1b369f07609565bbcc864def87f3c28bc4c5c9b2f8e02e37d7591f655cfdfb640186b0a3bcf4160c7784c556b0754385b9830cf0477a1 SHA512 c483f3ae0784548120a6a9db16c4be656b51097e676e6e333df778a499ba1cce8c6486dd951455468be0be39f26441f798138c4623232fc9431868d8da2a9710 +EBUILD btrfs-progs-5.10.1-r1.ebuild 3047 BLAKE2B 8a303a3b29a3feff1023c95b7777361e3d9a267961fb8dc39290991f2856ceaba6862df281d636f9bea3448ac1a84105c6b050afdd961e4f316cf913d7f043ab SHA512 72f2a1cdaa286198d9d160515b5f1b0cd3887220e8d3498906141ea9f8f2c393d84b2a52304c05e4844b68991e4455f807619054b7407db3e2d0c0b09b75fcd7 +EBUILD btrfs-progs-5.15.1.ebuild 3085 BLAKE2B 5c2c91b9aa104a54967db818696acb8284ca7a4042e1d142a2e3db7b53b52a1b5530ecfade95cd51eae51ab1e095078415a36b650dd12430412f4d4fcbde3461 SHA512 4c700962937e4d45ed2b2cedec9c857ac38b2f716384916056abe091b36030cff9a609dbb54f60caf0ce1878a9fb6a3e887428bb44f3d63e0bbc0a2dbce8cf73 +EBUILD btrfs-progs-5.16.2.ebuild 3140 BLAKE2B 3725d3755fe9c1f55ac29c8e43ea71b4829cffad8f24939f5ac9bc222c7e52d44d95468da08945c3f9bf74b6ae62842adcfec4bd9f7a83976cfe226d38f02dca SHA512 bbe6a496de5092c6ce6ddf869418e738dc163e5bb5636921e9f475ceab4383cc30d868ea2fcfac9ca6abb0ccc748208194459d3f37c54a7800d9180c5012043d +EBUILD btrfs-progs-5.17.ebuild 3114 BLAKE2B acecdd2560d5fd72f013e3604a23818608bf2cd87613f8fa4f282be2c6dfaaa5e0e3f7a8617610f11ff9a08dd9dce0fbf97b6c0941c6cf3ad476c4c37246fcaa SHA512 5ae0124a9f8ae4c448fa058c003be65225dc0281a50178bc1fb5cda5feccb684d85e10a86577b62c40341f07da13f06d72386eb876a14a7efce5277439d44818 +EBUILD btrfs-progs-5.18.1-r1.ebuild 3316 BLAKE2B 47162d7502cdcc51a5238d4138b5b84332054e73bb9ea60aa606a8a4019ad334d4e8760c6e639a942224f9c77fb2d311480b3d55a0e9eb940a6c4a1276b2a5fd SHA512 2a5a9821b0030515c1d16a621066457d242898e20077720186933747e7328c10aacaad1aee65254309d57929948b3ffd238f857b980d656c8a963563cff1a8ce +EBUILD btrfs-progs-9999.ebuild 3316 BLAKE2B 47162d7502cdcc51a5238d4138b5b84332054e73bb9ea60aa606a8a4019ad334d4e8760c6e639a942224f9c77fb2d311480b3d55a0e9eb940a6c4a1276b2a5fd SHA512 2a5a9821b0030515c1d16a621066457d242898e20077720186933747e7328c10aacaad1aee65254309d57929948b3ffd238f857b980d656c8a963563cff1a8ce MISC metadata.xml 524 BLAKE2B 4e27833128aeb064271af7a4f3c05699b4603b1d993b32bef3d9d973182d3d0c88ac799c95f0f35495e9a99e645627afd96049273c08c3e1334d8fe1ccf0debe SHA512 471014a98bc3feb75e7930485e89daf6cb3390c37a330b8373d5c3b0b764b9180cbff133839ce4742a3c76f63e6f18895060d5906e6a113d2cd43af0df3b0d5a diff --git a/sys-fs/btrfs-progs/btrfs-progs-5.10.1-r1.ebuild b/sys-fs/btrfs-progs/btrfs-progs-5.10.1-r1.ebuild index 01164d323b79..e1e6443d8c62 100644 --- a/sys-fs/btrfs-progs/btrfs-progs-5.10.1-r1.ebuild +++ b/sys-fs/btrfs-progs/btrfs-progs-5.10.1-r1.ebuild @@ -127,5 +127,5 @@ src_install() { } pkg_postrm() { - [[ -n ${REPLACING_VERSIONS} ]] || udev_reload + [[ -n ${REPLACED_BY_VERSION} ]] || udev_reload } diff --git a/sys-fs/btrfs-progs/btrfs-progs-5.15.1.ebuild b/sys-fs/btrfs-progs/btrfs-progs-5.15.1.ebuild index 8132f35bc6ac..b009cd71b1d4 100644 --- a/sys-fs/btrfs-progs/btrfs-progs-5.15.1.ebuild +++ b/sys-fs/btrfs-progs/btrfs-progs-5.15.1.ebuild @@ -128,5 +128,5 @@ src_install() { } pkg_postrm() { - [[ -n ${REPLACING_VERSIONS} ]] || udev_reload + [[ -n ${REPLACED_BY_VERSION} ]] || udev_reload } diff --git a/sys-fs/btrfs-progs/btrfs-progs-5.16.2.ebuild b/sys-fs/btrfs-progs/btrfs-progs-5.16.2.ebuild index 5c1aabd39fb4..b8bd29ede157 100644 --- a/sys-fs/btrfs-progs/btrfs-progs-5.16.2.ebuild +++ b/sys-fs/btrfs-progs/btrfs-progs-5.16.2.ebuild @@ -133,5 +133,5 @@ src_install() { } pkg_postrm() { - [[ -n ${REPLACING_VERSIONS} ]] || udev_reload + [[ -n ${REPLACED_BY_VERSION} ]] || udev_reload } diff --git a/sys-fs/btrfs-progs/btrfs-progs-5.16.ebuild b/sys-fs/btrfs-progs/btrfs-progs-5.16.ebuild deleted file mode 100644 index 81d242c828ef..000000000000 --- a/sys-fs/btrfs-progs/btrfs-progs-5.16.ebuild +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright 2008-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..10} ) - -inherit bash-completion-r1 python-single-r1 - -libbtrfs_soname=0 - -if [[ ${PV} != 9999 ]]; then - MY_PV="v${PV/_/-}" - [[ "${PV}" = *_rc* ]] || \ - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" - SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz" - S="${WORKDIR}/${PN}-${MY_PV}" -else - WANT_LIBTOOL=none - inherit autotools git-r3 - EGIT_REPO_URI="https://github.com/kdave/btrfs-progs.git" - EGIT_BRANCH="devel" -fi - -DESCRIPTION="Btrfs filesystem utilities" -HOMEPAGE="https://btrfs.wiki.kernel.org" - -LICENSE="GPL-2" -SLOT="0/${libbtrfs_soname}" -IUSE="+convert doc python reiserfs static static-libs +zstd" - -RESTRICT="test" # tries to mount repaired filesystems - -RDEPEND=" - dev-libs/lzo:2= - sys-apps/util-linux:0=[static-libs(+)?] - sys-libs/zlib:0= - convert? ( - sys-fs/e2fsprogs:= - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27 - ) - ) - python? ( ${PYTHON_DEPS} ) - zstd? ( app-arch/zstd:0= ) -" -DEPEND="${RDEPEND} - >=sys-kernel/linux-headers-5.10 - convert? ( sys-apps/acl ) - python? ( - $(python_gen_cond_dep ' - dev-python/setuptools[${PYTHON_USEDEP}] - ') - ) - static? ( - dev-libs/lzo:2[static-libs(+)] - sys-apps/util-linux:0[static-libs(+)] - sys-libs/zlib:0[static-libs(+)] - convert? ( - sys-fs/e2fsprogs[static-libs(+)] - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27[static-libs(+)] - ) - ) - zstd? ( app-arch/zstd:0[static-libs(+)] ) - ) -" -BDEPEND=" - doc? ( - || ( >=app-text/asciidoc-8.6.0 dev-ruby/asciidoctor ) - app-text/docbook-xml-dtd:4.5 - app-text/xmlto - ) -" - -if [[ ${PV} == 9999 ]]; then - BDEPEND+=" sys-devel/gnuconfig" -fi - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -PATCHES=( - "${FILESDIR}"/5.16-linux-headers-before-5.11.patch -) - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -src_prepare() { - default - if [[ ${PV} == 9999 ]]; then - AT_M4DIR=m4 eautoreconf - mkdir config || die - local automakedir="$(autotools_run_tool --at-output automake --print-libdir)" - [[ -e ${automakedir} ]] || die "Could not locate automake directory" - ln -s "${automakedir}"/install-sh config/install-sh || die - ln -s "${BROOT}"/usr/share/gnuconfig/config.guess config/config.guess || die - ln -s "${BROOT}"/usr/share/gnuconfig/config.sub config/config.sub || die - fi -} - -src_configure() { - local myeconfargs=( - --bindir="${EPREFIX}"/sbin - $(use_enable convert) - $(use_enable doc documentation) - $(use_enable elibc_glibc backtrace) - $(use_enable python) - $(use_enable static-libs static) - $(use_enable zstd) - --with-convert=ext2$(usex reiserfs ',reiserfs' '') - ) - - econf "${myeconfargs[@]}" -} - -src_compile() { - emake V=1 all $(usev static) -} - -src_install() { - local makeargs=( - $(usex python install_python '') - $(usex static install-static '') - ) - - emake V=1 DESTDIR="${D}" install "${makeargs[@]}" - - newbashcomp btrfs-completion btrfs - - use python && python_optimize - - # install prebuilt subset of manuals - use doc || doman Documentation/*.[58] -} - -pkg_postrm() { - [[ -n ${REPLACING_VERSIONS} ]] || udev_reload -} diff --git a/sys-fs/btrfs-progs/btrfs-progs-5.17.ebuild b/sys-fs/btrfs-progs/btrfs-progs-5.17.ebuild index a8119d0182c4..ffb791583518 100644 --- a/sys-fs/btrfs-progs/btrfs-progs-5.17.ebuild +++ b/sys-fs/btrfs-progs/btrfs-progs-5.17.ebuild @@ -144,5 +144,5 @@ pkg_postinst() { } pkg_postrm() { - [[ -n ${REPLACING_VERSIONS} ]] || udev_reload + [[ -n ${REPLACED_BY_VERSION} ]] || udev_reload } diff --git a/sys-fs/btrfs-progs/btrfs-progs-5.18.1-r1.ebuild b/sys-fs/btrfs-progs/btrfs-progs-5.18.1-r1.ebuild index cc8ae19c469e..76f2afe1fe01 100644 --- a/sys-fs/btrfs-progs/btrfs-progs-5.18.1-r1.ebuild +++ b/sys-fs/btrfs-progs/btrfs-progs-5.18.1-r1.ebuild @@ -145,5 +145,5 @@ pkg_postinst() { } pkg_postrm() { - [[ -n ${REPLACING_VERSIONS} ]] || udev_reload + [[ -n ${REPLACED_BY_VERSION} ]] || udev_reload } diff --git a/sys-fs/btrfs-progs/btrfs-progs-5.18.ebuild b/sys-fs/btrfs-progs/btrfs-progs-5.18.ebuild deleted file mode 100644 index b6d87b7e0f05..000000000000 --- a/sys-fs/btrfs-progs/btrfs-progs-5.18.ebuild +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright 2008-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..10} ) - -inherit bash-completion-r1 python-single-r1 udev - -libbtrfs_soname=0 - -if [[ ${PV} != 9999 ]]; then - MY_PV="v${PV/_/-}" - SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz" - - if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" - fi - - S="${WORKDIR}"/${PN}-${MY_PV} -else - EGIT_REPO_URI="https://github.com/kdave/btrfs-progs.git" - EGIT_BRANCH="devel" - WANT_LIBTOOL="none" - inherit autotools git-r3 -fi - -DESCRIPTION="Btrfs filesystem utilities" -HOMEPAGE="https://btrfs.wiki.kernel.org" - -LICENSE="GPL-2" -SLOT="0/${libbtrfs_soname}" -IUSE="+convert python +man reiserfs static static-libs udev +zstd" -# Could support it with just !systemd => eudev, see mdadm, but let's -# see if someone asks for it first. -REQUIRED_USE="static? ( !udev )" - -# Tries to mount repaired filesystems -RESTRICT="test" - -RDEPEND=" - dev-libs/lzo:2= - sys-apps/util-linux:=[static-libs(+)?] - sys-libs/zlib:= - convert? ( - sys-fs/e2fsprogs:= - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27 - ) - ) - python? ( ${PYTHON_DEPS} ) - udev? ( virtual/libudev:= ) - zstd? ( app-arch/zstd:= ) -" -DEPEND="${RDEPEND} - >=sys-kernel/linux-headers-5.10 - convert? ( sys-apps/acl ) - python? ( - $(python_gen_cond_dep ' - dev-python/setuptools[${PYTHON_USEDEP}] - ') - ) - static? ( - dev-libs/lzo:2[static-libs(+)] - sys-apps/util-linux:0[static-libs(+)] - sys-libs/zlib:0[static-libs(+)] - convert? ( - sys-fs/e2fsprogs[static-libs(+)] - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27[static-libs(+)] - ) - ) - zstd? ( app-arch/zstd[static-libs(+)] ) - ) -" -BDEPEND="virtual/pkgconfig - man? ( dev-python/sphinx )" - -if [[ ${PV} == 9999 ]]; then - BDEPEND+=" sys-devel/gnuconfig" -fi - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -src_prepare() { - default - if [[ ${PV} == 9999 ]]; then - AT_M4DIR="m4" eautoreconf - - mkdir config || die - local automakedir="$(autotools_run_tool --at-output automake --print-libdir)" - [[ -e ${automakedir} ]] || die "Could not locate automake directory" - - ln -s "${automakedir}"/install-sh config/install-sh || die - ln -s "${BROOT}"/usr/share/gnuconfig/config.guess config/config.guess || die - ln -s "${BROOT}"/usr/share/gnuconfig/config.sub config/config.sub || die - fi -} - -src_configure() { - local myeconfargs=( - --bindir="${EPREFIX}"/sbin - - --enable-lzo - --disable-experimental - $(use_enable convert) - $(use_enable man documentation) - $(use_enable elibc_glibc backtrace) - $(use_enable python) - $(use_enable static-libs static) - $(use_enable udev libudev) - $(use_enable zstd) - - # Could support libgcrypt, libsodium, libkcapi - --with-crypto=builtin - --with-convert=ext2$(usex reiserfs ',reiserfs' '') - ) - - econf "${myeconfargs[@]}" -} - -src_compile() { - emake V=1 all $(usev static) -} - -src_install() { - local makeargs=( - $(usex python install_python '') - $(usex static install-static '') - ) - - emake V=1 DESTDIR="${D}" install "${makeargs[@]}" - - newbashcomp btrfs-completion btrfs - - use python && python_optimize - - # Install prebuilt subset of manuals (very few) - use man || doman Documentation/*.[58] -} - -pkg_postinst() { - udev_reload -} - -pkg_postrm() { - [[ -n ${REPLACING_VERSIONS} ]] || udev_reload -} diff --git a/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild b/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild index cc8ae19c469e..76f2afe1fe01 100644 --- a/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild +++ b/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild @@ -145,5 +145,5 @@ pkg_postinst() { } pkg_postrm() { - [[ -n ${REPLACING_VERSIONS} ]] || udev_reload + [[ -n ${REPLACED_BY_VERSION} ]] || udev_reload } diff --git a/sys-fs/ddrescue/Manifest b/sys-fs/ddrescue/Manifest index 27ce2ca3450b..fb5387d5e16d 100644 --- a/sys-fs/ddrescue/Manifest +++ b/sys-fs/ddrescue/Manifest @@ -2,4 +2,4 @@ DIST ddrescue-1.25.tar.lz 87001 BLAKE2B 45054ecb6ca12f8fe27d6b783f7e339fc11a9a34 DIST ddrescue-1.26.tar.lz 91930 BLAKE2B c545499e380587729eb3fcc90a7baf66288348dc88027dfc14401ec72254cc786d8ab7be076a346964327668ff719048dada916c9f1514a765a255f02c5666c7 SHA512 bbe414563d459a1ad1c4e55848214d195e01f8bc455104eddbeff7046623f5bc21d961457d27ace2605d13dff68c7948182706b8afe6755e5c363e8cad86a1cc EBUILD ddrescue-1.25.ebuild 875 BLAKE2B f536aa8813c6c4b848ff13bcb4a0a7c906d1ab657f512bcbc19d551bdb2e1db45b5724c642577af307294e967d9121122fae36ee59ad6b5bf084a85c4b14c000 SHA512 aa48c34785bc64d91efe68cd2e72c97e60da455d3cdfc694e42a075e85140a6b0d85c7b55dc6ce09b5608f6734593e84ee09cda472cebe63516f96754d35a31e EBUILD ddrescue-1.26.ebuild 882 BLAKE2B 50103fcaaf576b03288821646cc18471c51239a28e8632c5c7aea8e9d07ae727317c14d81bf51839ed00fc4eb67f0887e69c44c354eec25d7c640306cc59699e SHA512 2c315ca5d457e99f4e180f697eaddf64544a51b7aef4acbc63a75611b489934dc19449d36da334f36789185f76648ab33bd65e8da66d2f5f4aae7fdadd5d3442 -MISC metadata.xml 169 BLAKE2B 25149b73446be31f3ea3dd3a6394230987e7d4c601d1605fd3827b37bd99b3301c2e0edb95d0f59a4577ed27919f43c2cc02b1edf62c4012b935a82e709e0c05 SHA512 55c53f74b001bae56ba8c54581a4168335b6b3a28dac23a2102b76795d5fd41de33b8b3e1ec03f9acc6e7a3a77e93b1a6ff3e3967c3156dcbf22b5b5a6245ef5 +MISC metadata.xml 246 BLAKE2B f808bbbcb9c53d005d1a1667cd6217a601a3bd3bd2267121c0043a870ae44bb91bb27bc9825d5d6eafe01b73fe58a553655aa252737c0b066f2286ff9415d65e SHA512 b620abb7732628010a8a3792d40bde878492be97ce14c99c4d2466240df2f25edf7734ad4d210bc954f27323f0e26698e660766c65be5868646a3866020373fd diff --git a/sys-fs/ddrescue/metadata.xml b/sys-fs/ddrescue/metadata.xml index bef24d2c2337..beac02a9af14 100644 --- a/sys-fs/ddrescue/metadata.xml +++ b/sys-fs/ddrescue/metadata.xml @@ -1,5 +1,8 @@ - + + marecki@gentoo.org + Marek Szuba + diff --git a/sys-fs/inotify-tools/Manifest b/sys-fs/inotify-tools/Manifest index 573aed1a70fd..fef7df740b98 100644 --- a/sys-fs/inotify-tools/Manifest +++ b/sys-fs/inotify-tools/Manifest @@ -1,7 +1,6 @@ +AUX inotify-tools-3.22.6.0-musl.patch 827 BLAKE2B 499aa4517af0ae2eb4d59e9f9128e49a76a8551a03f59b32e8e31d42d3e77d8720eab43d14553daac4ef42cd8e67cefc7ee1c1ff5108c17976d7cfe72683ecf3 SHA512 9af49e57302b76d1bcd807846a3e660a4ed342de0767549a572a51a072da8d00b87069e7ef81ca55f7a900b6c226eefb5f1f440161f7811c26d976bfa4526075 DIST inotify-tools-3.20.2.2.tar.gz 81006 BLAKE2B 7dd29985f68096fe2146a3ad84d619b3d1238b0db25eeb125f2fe9591fa678078351f00c7e09b526cf2251e4736201d5625ff0e477523cae370a307ccb667730 SHA512 72d6fdcc216d8083cd384c71c02dc8e800d3a9702613568b3c571f704aee3d42bf084c52f2141c9afb8d28e8b87ebb6391ed3d825b3d664ed51c552debeb1881 -DIST inotify-tools-3.22.1.0.tar.gz 92922 BLAKE2B 42558ca62f79e2bdf5a6071334a05cee826ec00b0666b1c0971af64d769eb7852cbcd8d6e630f88af68f26f5607ca4ef94ec832fbe2e89d42182120aac4896ce SHA512 53317147af4803b69603839c010a2b0b3fa527f0e32b08126f24805600728c0a9570b2a3d94bf987f0b9a4bfbe7207b5faa9337f0d7add91b062e68de4245548 DIST inotify-tools-3.22.6.0.tar.gz 92918 BLAKE2B 601d3ac6896e445d297a04498c63df4f81c59699ba2d5b2eee2e8c499332913ce2783d13c9906d577ff0b6d7ef91ca826d48b01674adeb3d3569dfc1fbc0df63 SHA512 cda445add4b9d80b70eff9189ed50d05f4b5593a755159d0354431166c6fe6fdb33f7bf37fd50bc09aad3ed0a6e3763b9c74f65e554400f2596b8d492f1d0a21 EBUILD inotify-tools-3.20.2.2.ebuild 928 BLAKE2B 4edaa4cc87786d20501912537865ddd7d593e97c621908076c99a0f3e1e94d19edc39891b91f393dcaa6cb58fb2c0aa4cc1d1f525eb2ec0d74dd9b979b121841 SHA512 8c950cb06d35fae591f4ae6d37158fe338ed6e89e66b73058996661b54d2b43fc6c02c38a6f0e890008177f58e345c94e22ce3c2528cbe653599e86802385a57 -EBUILD inotify-tools-3.22.1.0.ebuild 945 BLAKE2B 130a42cc3ebdcf4ecc4071d9a4791077d3ef6f5156e8fc8164aeeae0922e4fe516fa07e3c11c343ad604fd8f5a88aea31807d07dd3adca9463559a0ba6a3bda4 SHA512 1b1a74a363d2722c3244972c5433c2f6e34d529f1f72bc4146d2ef2195bff4928869d02c6b7f7d7e6270722e11045825f4c521291259d700d2040b23cd6902d5 -EBUILD inotify-tools-3.22.6.0.ebuild 945 BLAKE2B 130a42cc3ebdcf4ecc4071d9a4791077d3ef6f5156e8fc8164aeeae0922e4fe516fa07e3c11c343ad604fd8f5a88aea31807d07dd3adca9463559a0ba6a3bda4 SHA512 1b1a74a363d2722c3244972c5433c2f6e34d529f1f72bc4146d2ef2195bff4928869d02c6b7f7d7e6270722e11045825f4c521291259d700d2040b23cd6902d5 +EBUILD inotify-tools-3.22.6.0.ebuild 886 BLAKE2B 9df159f6612d93cc7838ea4cd4b8f6a87ce0cdb245b8a518b5c339ffaa799cd8cd24c4499d4580d2106ac520d8235e790c93ccef5522d4a38d3eed730bed9eff SHA512 6892f99b66268e74158179b186b488fc4deb8379a221bcc02ac7e1030e31fa29e935db051c60f4484047a38e33cd8c924e2ae98ad13700978874462b24630ca5 MISC metadata.xml 644 BLAKE2B faa84a2101847409fcc82427dcbcd1ac7ec4073ee044e970b3f4c65bc1c28484ab4266cdfc4dc4e3980ee1c384186e308d210d02304788d63ccc1b4f54dd5ac8 SHA512 ba77f381e79379995ff395e82c65dacfe9bc3c621d38201bea7ebaac76911aa2de5d472a486e22a5ddbf79565e8d88ea14707d8e5f4abbc7dad8bce3b1e0f05d diff --git a/sys-fs/inotify-tools/files/inotify-tools-3.22.6.0-musl.patch b/sys-fs/inotify-tools/files/inotify-tools-3.22.6.0-musl.patch new file mode 100644 index 000000000000..435adc2e797a --- /dev/null +++ b/sys-fs/inotify-tools/files/inotify-tools-3.22.6.0-musl.patch @@ -0,0 +1,26 @@ +Former fix[1] for musl that got reverted[2] for possibly(?) wrong +reasons[3]. Should be harmless to include here until sorted out. +https://bugs.gentoo.org/831976 + +[1] https://github.com/inotify-tools/inotify-tools/commit/b7889c8d +[2] https://github.com/inotify-tools/inotify-tools/commit/cbab7c0b +[3] https://github.com/inotify-tools/inotify-tools/issues/155 +From: Khem Raj +Date: Mon, 3 Jan 2022 04:42:50 -0800 +Subject: [PATCH] libinotifytools: Bridge differences between musl/glibc/kernel + fnotify.h (#154) +--- a/libinotifytools/src/inotifytools.c ++++ b/libinotifytools/src/inotifytools.c +@@ -54,6 +54,12 @@ struct fanotify_event_fid { + struct fanotify_event_info_fid info; + struct file_handle handle; + }; ++ ++#ifndef __GLIBC__ ++#define val __val ++#define __kernel_fsid_t fsid_t ++#endif ++ + #endif + + /** diff --git a/sys-fs/inotify-tools/inotify-tools-3.22.1.0.ebuild b/sys-fs/inotify-tools/inotify-tools-3.22.1.0.ebuild deleted file mode 100644 index 2d25f84ae71b..000000000000 --- a/sys-fs/inotify-tools/inotify-tools-3.22.1.0.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools - -DESCRIPTION="a set of command-line programs providing a simple interface to inotify" -HOMEPAGE="https://github.com/inotify-tools/inotify-tools" -SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~riscv ~sparc ~x86" -IUSE="doc" - -BDEPEND="doc? ( app-doc/doxygen )" - -src_prepare() { - default - - # Remove -Werror from CFLAGS (#745069) - find -name "Makefile.am" -print0 \ - | xargs --null sed 's@ -Werror@@' -i || die - - eautoreconf -} - -src_configure() { - # only docs installed are doxygen ones, so use /html - local myeconfargs=( - --disable-static - --docdir='$(datarootdir)'/doc/${PF}/html - $(use_enable doc doxygen) - ) - econf "${myeconfargs[@]}" -} - -src_install() { - default - find "${ED}" -type f -name '*.la' -delete || die -} diff --git a/sys-fs/inotify-tools/inotify-tools-3.22.6.0.ebuild b/sys-fs/inotify-tools/inotify-tools-3.22.6.0.ebuild index 2d25f84ae71b..8a96f1e65ec8 100644 --- a/sys-fs/inotify-tools/inotify-tools-3.22.6.0.ebuild +++ b/sys-fs/inotify-tools/inotify-tools-3.22.6.0.ebuild @@ -5,9 +5,9 @@ EAPI=8 inherit autotools -DESCRIPTION="a set of command-line programs providing a simple interface to inotify" -HOMEPAGE="https://github.com/inotify-tools/inotify-tools" -SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +DESCRIPTION="Set of command-line programs providing a simple interface to inotify" +HOMEPAGE="https://github.com/inotify-tools/inotify-tools/" +SRC_URI="https://github.com/inotify-tools/inotify-tools/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2" SLOT="0" @@ -16,27 +16,29 @@ IUSE="doc" BDEPEND="doc? ( app-doc/doxygen )" +PATCHES=( + "${FILESDIR}"/${P}-musl.patch +) + src_prepare() { default - # Remove -Werror from CFLAGS (#745069) - find -name "Makefile.am" -print0 \ - | xargs --null sed 's@ -Werror@@' -i || die + sed -i 's/ -Werror//' {,libinotifytools/}src/Makefile.am || die #745069 eautoreconf } src_configure() { - # only docs installed are doxygen ones, so use /html - local myeconfargs=( - --disable-static - --docdir='$(datarootdir)'/doc/${PF}/html + local econfargs=( + --docdir="${EPREFIX}"/usr/share/doc/${PF}/html $(use_enable doc doxygen) ) - econf "${myeconfargs[@]}" + + econf "${econfargs[@]}" } src_install() { default + find "${ED}" -type f -name '*.la' -delete || die } diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest index ce2807a8684f..4c601b8e7157 100644 --- a/sys-fs/lvm2/Manifest +++ b/sys-fs/lvm2/Manifest @@ -27,6 +27,7 @@ AUX lvm2-2.03.12-dynamic-static-ldflags.patch 2591 BLAKE2B b1edda6bd715d805ae129 AUX lvm2-2.03.12-static-libm.patch 1000 BLAKE2B 4bde7eda80a00f7c692341ebc74ab30308f3157162caba4d789dac42318fd5a16d6b1471463bc2a1f02f50313ce274ecc5aeb039c90e0b979d73146cc9497fba SHA512 cc7764fdaadd767e88d68a3a071f72a7ce30e5bc98fb55b49cf8ba00c3c5a1cac288f2aad0fec94eba5dd2100108756f1315b9704e872d7d64100bbeff1b7a17 AUX lvm2-2.03.12-static-pkgconfig-libs-2.patch 1260 BLAKE2B 3ee43306af649c4d23ac9b096f0649b48f40416a6e77098e449429e6b8a881a23e8e1158be72ab4c2b5d9bf11dda4b983da1b03d13ec614250d530b57d6d8ec1 SHA512 94704e273c82272fcb3e77da66894204f96bfa28343d3f3edc3aa90aeba6334872bace17c57c64cf35114113cd6d20d628702d1516b7c1296f6ceafd75c5c3b6 AUX lvm2-2.03.14-dm_lvm_rules_no_systemd.patch 1502 BLAKE2B 26cc1f98dd8d286bf74e60ddf02b0658e83a69017743aeaa56ce8a05f6dc03a2322deecaa136713c683882fa85517c9798ce18a2a8de05cd3bbb101cb2ba1c2b SHA512 46bda571f85650d5382f173ad7cce9a055f39e783961bbe8272e2492f4e5ec60f5af231302596a01a4f3ca3cba48b05383a5b0458ab6b85c6d726253f0f45d23 +AUX lvm2-2.03.14-freopen_n2.patch 907 BLAKE2B 895bdb47da976a17fa61fc7a18c4647dc2b97f4d7eb665b66d253a880977977a4012a064ef460c2e9e6e24b94ac0a6f8021d73fffe8e56a93461fd8a9804ff52 SHA512 3cce840d54b9c52b4ae1c253fda3e29261284d873442ad646daa5cb41fcf154fd86b5683f7cf919ed226faef2f450b0b50bfc77ab161aa67c2823ecf38538b2b AUX lvm2-2.03.14-r1-add-fcntl.patch 578 BLAKE2B 7368a1853bdd6fa5aac526a39911b848fb446f14a44700586d6c87974cf898e4290a16335c61d515ea41f1a67de72ce887a227bf3a5fc0af8baafe3a6e8a2af1 SHA512 97d9d00831df2715ccfebf5342aaefac8ae1441eae263af5c1785ab34563a52bfc1aa0870e16bd677c5451889bee647bedff5417920d7dd816b3269b5ae23c77 AUX lvm2-2.03.14-r1-fopen-to-freopen.patch 1306 BLAKE2B bba58efc587529f30e187c35be97241519d6d31173605bed72aab876500e4cad057d9de9998834581a3d221f1196c466e45aac5ee86d9a3bbbc0d6a2725401f8 SHA512 29c1bac1f669199d1fcb1ec45e3eed593337ad5e09e238cc871b5878fe2ec2e3c07204f48ad939dad2a12c7e523601bfbd6cec4145fc3e1994b85836c4ed02eb AUX lvm2-2.03.14-r1-mallinfo.patch 665 BLAKE2B 2fdec28a0f889fe8f64b4c134c0b4a86a55a7d2a0dce90f7ed5e314dc89c4b94ec17764aea9307d5b45b89b700e5a89bf905ebdb4b7480d50610b26504cd7c32 SHA512 09ef2e8b3c6019d87e59dce2dcc00bcf243402c92559b38966e800a38ff24028962fcb96bbb1cb22228deb1a2c95ecfc079b1387523799daf477641f43669fec @@ -36,6 +37,6 @@ AUX lvmlockd.initd-2.02.166-r1 390 BLAKE2B aebfa2a654eca784da24fd4e4d46b3e6c9725 AUX lvmpolld.initd-2.02.183 348 BLAKE2B cba0419add6591320dc60ef7616b66706e042b566284a4ec42002fbb5331a7173fc8b4b39be7198426fe4bbdcd3ad94b69fc3d8950705b6331c5f3f4cda4ad66 SHA512 b9b8376cbc8b6703868afab18e5baa4ef5354569e57f0596d38a8005fa725299f6858ac86b39fcca10e5a0f1adbd3a4cfa6cc6b62405e78916cc1287d8b36d0d DIST LVM2.2.02.188.tgz 2421550 BLAKE2B bed90c8454cd4b20fdeec6dcbf5a9f97c9310671aea3b2252f8069cfa439fcb050f5ad95f928a7125a1734a4dc5ac985da99a4a570538e377a7205191a505476 SHA512 8c9db17c49dc8ebcab6c7f246ab85870a80658be811cf7f4d8f36abbebafa355b030bfc1e3bcbad73ccccb7fcd06d4a95ac547ca15d18d33715126da92703dca DIST LVM2.2.03.14.tgz 2639538 BLAKE2B 806f5e9cb76a05febef6f8ce8cfc42c92927b9538f62a21029c5ffc426a4fd7c3f32709be08dbd8028b53891b1075d1d13cb3b0d7b1815071ee8eb927d8f3ed3 SHA512 6a93bed1d5cf36f0f48d4d413d028b0e480cd4fc20e25d173770a892f265d2a0cc68d01a720b1513469953649e989532cd0c45f9538f92a4190eb3dc4555857d -EBUILD lvm2-2.02.188-r3.ebuild 10149 BLAKE2B d7a19efe883eb5a8fc0ec8fa7d41de9ace13cd72f3dcad28148471dff8dddc458b68f65d8d0c1b57af9ef647a3e5102db340521b43a81b8a9fdba1f3388868d7 SHA512 dc0deeb6fafa4f59888b3b4061a2375e2621c5cfe1e8ae061c3b516c8bb6a7260cbe6907739bed161baa7f8db3fd113563be22018618b8d88f92673bd46cd55b -EBUILD lvm2-2.03.14-r2.ebuild 10095 BLAKE2B edaaf7652cbb178abd142f06a04125944a26dc15dd54e929f1ff4b95faff34b6a8393bf5ae4db2ba5ab7ab094db020c0be8b8054cff9dc5c2375f00411d18103 SHA512 ea45bc3f47b5464c2240eeef77590bf8be333382f32a85c702f151c58222a3bf8a9aea8a621658c85596378c3730d2f411abbadd5d47d07cd5c4c4abfdff5e26 +EBUILD lvm2-2.02.188-r3.ebuild 10277 BLAKE2B f276a47825b148aaca7b5248693d59f1fa2fb1cd67207f51f59e2ad3a92496bd63ed7c425ee60560fdaca624a2a81edf2dd1f02c9e80a184df6e1ac115c472ab SHA512 4cfdffdb6555ca357a88a936d560b9314cd1bcd0ef05bcfc9fbbac6069cd73e833bda57d10deed141781b55b8aec3a5f2ac8ee8145c065c55436a46a11284905 +EBUILD lvm2-2.03.14-r3.ebuild 10269 BLAKE2B dd80b933020369555d9b3904c0ca60171af0902ca203828daafae12443fbb7ca4cfaf05438cb8585691c787b3c0ebff35b078b732a1de80b89a4183068ea2236 SHA512 c1932e10550310bc531c096c65baf532c854508f2009ecce84bf6a804b77f14516c94aeaa0b5da0c096a6864f8fb7337c8f5a8f16beb4973867d727f33f7940e MISC metadata.xml 1035 BLAKE2B b9a3162e72e1ea09c7530edca817046434186c3948ef763c1a4efedb45aa8f842b7819efdbb09fb40897368e61b26a43896ef28a4a9d1ae554ea3cdb81f88dc7 SHA512 a16653a343d66eab8bd790eb974cc95d75f48321051ebb37eef87b3c7ad9903b2be1f0c70aff4b711b4469fa2715a5fb0c8566c46e6a83173bf998cf182ce964 diff --git a/sys-fs/lvm2/files/lvm2-2.03.14-freopen_n2.patch b/sys-fs/lvm2/files/lvm2-2.03.14-freopen_n2.patch new file mode 100644 index 000000000000..5ca32f19fc54 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.14-freopen_n2.patch @@ -0,0 +1,34 @@ +In musl, the standard streams are read-only. To modify them we need to +use freopen. This patch does the same as lvm2-2.03.14-r1-fopen-to-freopen.patch + +https://listman.redhat.com/archives/lvm-devel/2022-June/024203.html + +See also: +https://wiki.gentoo.org/wiki/User:Sam/Musl_porting_notes#error:_assignment_of_read-only_variable_.27.5Bstdout.7Cstdin.7Cstderr.5D.27 +https://www.gnu.org/software/libc/manual/html_node/Standard-Streams.html + +--- + lib/log/log.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lib/log/log.c b/lib/log/log.c +index 7b4d537..897c183 100644 +--- a/lib/log/log.c ++++ b/lib/log/log.c +@@ -207,8 +207,12 @@ int reopen_standard_stream(FILE **stream, const char *mode) + } + + _check_and_replace_standard_log_streams(old_stream, new_stream); +- ++ ++#ifdef __GLIBC__ + *stream = new_stream; ++#else ++ freopen(NULL, mode, *stream); ++#endif + return 1; + } + +-- +2.35.1 + diff --git a/sys-fs/lvm2/lvm2-2.02.188-r3.ebuild b/sys-fs/lvm2/lvm2-2.02.188-r3.ebuild index 50111c5fabb3..e6fd683ff142 100644 --- a/sys-fs/lvm2/lvm2-2.02.188-r3.ebuild +++ b/sys-fs/lvm2/lvm2-2.02.188-r3.ebuild @@ -206,6 +206,11 @@ src_compile() { fi } +src_test() { + einfo "Tests are disabled because of device-node mucking, if you want to" + einfo "run tests, compile the package and see ${S}/tests" +} + src_install() { local inst local INSTALL_TARGETS=( install install_tmpfiles_configuration ) @@ -266,6 +271,10 @@ pkg_postinst() { tmpfiles_process lvm2.conf fi + if use udev; then + udev_reload + fi + if [[ -z "${REPLACING_VERSIONS}" ]]; then # This is a new installation ewarn "Make sure the \"lvm\" init script is in the runlevels:" @@ -292,7 +301,8 @@ pkg_postinst() { fi } -src_test() { - einfo "Tests are disabled because of device-node mucking, if you want to" - einfo "run tests, compile the package and see ${S}/tests" +pkg_postrm() { + if use udev && [[ -z ${REPLACED_BY_VERSION} ]]; then + udev_reload + fi } diff --git a/sys-fs/lvm2/lvm2-2.03.14-r2.ebuild b/sys-fs/lvm2/lvm2-2.03.14-r2.ebuild deleted file mode 100644 index 2da81764efe4..000000000000 --- a/sys-fs/lvm2/lvm2-2.03.14-r2.ebuild +++ /dev/null @@ -1,299 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -TMPFILES_OPTIONAL=1 -inherit autotools linux-info systemd toolchain-funcs tmpfiles udev flag-o-matic - -DESCRIPTION="User-land utilities for LVM2 (device-mapper) software" -HOMEPAGE="https://sourceware.org/lvm2/" -SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz - ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" -IUSE="readline static static-libs systemd lvm2create-initrd sanlock selinux +udev +thin device-mapper-only" -REQUIRED_USE="device-mapper-only? ( !lvm2create-initrd !sanlock !thin ) - static? ( !systemd !udev ) - static-libs? ( static !udev ) - systemd? ( udev )" - -DEPEND_COMMON=" - dev-libs/libaio[static-libs?] - static? ( dev-libs/libaio[static-libs] ) - !static? ( dev-libs/libaio[static-libs?] ) - readline? ( sys-libs/readline:0= ) - sanlock? ( sys-cluster/sanlock ) - systemd? ( >=sys-apps/systemd-205:0= ) - udev? ( >=virtual/libudev-208:= )" -# /run is now required for locking during early boot. /var cannot be assumed to -# be available -- thus, pull in recent enough baselayout for /run. -# This version of LVM is incompatible with cryptsetup <1.1.2. -RDEPEND="${DEPEND_COMMON} - >=sys-apps/baselayout-2.2 - >=sys-apps/util-linux-2.16 - lvm2create-initrd? ( sys-apps/makedev ) - !device-mapper-only? ( virtual/tmpfiles ) - thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )" -# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check -DEPEND="${DEPEND_COMMON} - static? ( - readline? ( sys-libs/readline[static-libs] ) - selinux? ( sys-libs/libselinux[static-libs] ) - >=sys-apps/util-linux-2.16[static-libs] - )" -BDEPEND=" - sys-devel/autoconf-archive - virtual/pkgconfig -" - -S="${WORKDIR}/${PN/lvm/LVM}.${PV}" - -PATCHES=( - # Gentoo specific modification(s): - "${FILESDIR}"/${PN}-2.03.06-example.conf.in.patch - - # For upstream -- review and forward: - #"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch # FIXME: breaks libdm/dm-tools build - "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch - "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331 - "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373 - #"${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed - "${FILESDIR}"/${PN}-2.03.12-dynamic-static-ldflags.patch #332905 - "${FILESDIR}"/${PN}-2.03.14-static-pkgconfig-libs.patch #370217, #439414 + blkid - "${FILESDIR}"/${PN}-2.03.12-static-pkgconfig-libs-2.patch - "${FILESDIR}"/${PN}-2.03.05-pthread-pkgconfig.patch #492450 - "${FILESDIR}"/${PN}-2.03.12-static-libm.patch #617756 - "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446 - #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream - "${FILESDIR}"/${PN}-2.03.05-dmeventd-no-idle-exit.patch - #"${FILESDIR}"/${PN}-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch #682380 # merged upstream - "${FILESDIR}"/${PN}-2.02.184-mksh_build.patch #686652 - "${FILESDIR}"/${PN}-2.03.14-r1-add-fcntl.patch - "${FILESDIR}"/${PN}-2.03.14-r1-fopen-to-freopen.patch - "${FILESDIR}"/${PN}-2.03.14-r1-mallinfo.patch -) - -pkg_setup() { - local CONFIG_CHECK="~SYSVIPC" - - if use udev; then - local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n" - if linux_config_exists; then - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) - if [[ -n "${uevent_helper_path}" ]] && [[ "${uevent_helper_path}" != '""' ]]; then - ewarn "It's recommended to set an empty value to the following kernel config option:" - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" - fi - fi - fi - - check_extra_config - - # 1. Genkernel no longer copies /sbin/lvm blindly. - if use static; then - elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with" - elog "their static versions. If you need the static binaries," - elog "you must append .static to the filename!" - fi -} - -src_prepare() { - default - - # Users without systemd get no auto-activation of any logical volume - if ! use systemd ; then - eapply "${FILESDIR}"/${PN}-2.03.14-dm_lvm_rules_no_systemd.patch - fi - - sed -i \ - -e "1iAR = $(tc-getAR)" \ - -e "s:CC ?= @CC@:CC = $(tc-getCC):" \ - make.tmpl.in || die #444082 - - sed -i -e '/FLAG/s:-O2::' configure{.ac,} || die #480212 - - sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514 - - # Don't install thin man page when not requested - if ! use thin ; then - sed -i -e 's/^\(MAN7+=.*\) $(LVMTHINMAN) \(.*\)$/\1 \2/' man/Makefile.in || die - fi - - eautoreconf -} - -src_configure() { - filter-flags -flto - - # Workaround for bug #822210 - tc-ld-disable-gold - - local myeconfargs=() - - # Most of this package does weird stuff. - # The build options are tristate, and --without is NOT supported - # options: 'none', 'internal', 'shared' - myeconfargs+=( - $(use_enable !device-mapper-only dmfilemapd) - $(use_enable !device-mapper-only dmeventd) - $(use_enable !device-mapper-only cmdlib) - $(use_enable !device-mapper-only fsadm) - $(use_enable !device-mapper-only lvmpolld) - $(usex device-mapper-only --disable-udev-systemd-background-jobs '') - - # This only causes the .static versions to become available - $(usex static --enable-static_link '') - - # dmeventd requires mirrors to be internal, and snapshot available - # so we cannot disable them - --with-mirrors="$(usex device-mapper-only none internal)" - --with-snapshots="$(usex device-mapper-only none internal)" - - # disable O_DIRECT support on hppa, breaks pv detection (#99532) - $(usex hppa --disable-o_direct '') - ) - - if use thin; then - myeconfargs+=( --with-thin=internal --with-cache=internal ) - local texec - for texec in check dump repair restore; do - myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} ) - myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} ) - done - else - myeconfargs+=( --with-thin=none --with-cache=none ) - fi - - myeconfargs+=( - $(use_enable readline) - $(use_enable selinux) - --enable-pkgconfig - --with-confdir="${EPREFIX}"/etc - --exec-prefix="${EPREFIX}" - --sbindir="${EPREFIX}/sbin" - --with-staticdir="${EPREFIX}"/sbin - --libdir="${EPREFIX}/$(get_libdir)" - --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" - --with-default-dm-run-dir=/run - --with-default-run-dir=/run/lvm - --with-default-locking-dir=/run/lock/lvm - --with-default-pid-dir=/run - $(use_enable udev udev_rules) - $(use_enable udev udev_sync) - $(use_with udev udevdir "${EPREFIX}$(get_udevdir)"/rules.d) - $(use_enable sanlock lvmlockd-sanlock) - $(use_enable systemd udev-systemd-background-jobs) - $(use_enable systemd notify-dbus) - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" - CLDFLAGS="${LDFLAGS}" - ) - # Hard-wire this to bash as some shells (dash) don't know - # "-o pipefail" #682404 - CONFIG_SHELL="/bin/bash" \ - econf "${myeconfargs[@]}" -} - -src_compile() { - pushd include >/dev/null - emake V=1 - popd >/dev/null - - if use device-mapper-only ; then - emake V=1 device-mapper - else - emake V=1 - emake V=1 CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat - fi -} - -src_install() { - local inst - local INSTALL_TARGETS=( install install_tmpfiles_configuration ) - # install systemd related files only when requested, bug #522430 - use systemd && INSTALL_TARGETS+=( SYSTEMD_GENERATOR_DIR="$(systemd_get_systemgeneratordir)" install_systemd_units install_systemd_generators ) - use device-mapper-only && INSTALL_TARGETS=( install_device-mapper ) - emake V=1 DESTDIR="${D}" "${INSTALL_TARGETS[@]}" - - newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper - newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper - - if use !device-mapper-only ; then - newinitd "${FILESDIR}"/dmeventd.initd-2.02.184-r2 dmeventd - newinitd "${FILESDIR}"/lvm.rc-2.02.187 lvm - newconfd "${FILESDIR}"/lvm.confd-2.02.184-r3 lvm - if ! use udev ; then - # We keep the variable but remove udev from it. - sed -r -i \ - -e '/^rc_need=/s/\//g' \ - "${ED}/etc/conf.d/lvm" || die "Could not drop udev from rc_need" - fi - - newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring - newinitd "${FILESDIR}"/lvmpolld.initd-2.02.183 lvmpolld - fi - - if use sanlock; then - newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd - fi - - if use static-libs; then - dolib.a libdm/ioctl/libdevmapper.a - if use !device-mapper-only; then - # depends on lvmetad - dolib.a libdaemon/client/libdaemonclient.a #462908 - # depends on dmeventd - dolib.a daemons/dmeventd/libdevmapper-event.a - fi - else - rm -f "${ED}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a - fi - - if use lvm2create-initrd; then - dosbin scripts/lvm2create_initrd/lvm2create_initrd - doman scripts/lvm2create_initrd/lvm2create_initrd.8 - newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd - fi - - insinto /etc - doins "${FILESDIR}"/dmtab - - dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf -} - -pkg_postinst() { - if ! use device-mapper-only; then - tmpfiles_process lvm2.conf - fi - - if [[ -z "${REPLACING_VERSIONS}" ]]; then - # This is a new installation - ewarn "Make sure the \"lvm\" init script is in the runlevels:" - ewarn "# rc-update add lvm boot" - ewarn - ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want" - ewarn "to enable lvm autoactivation and metadata caching." - fi - - if use udev && [[ -d /run ]] ; then - local permission_run_expected="drwxr-xr-x" - local permission_run=$(stat -c "%A" /run) - if [[ "${permission_run}" != "${permission_run_expected}" ]] ; then - ewarn "Found the following problematic permissions:" - ewarn "" - ewarn " ${permission_run} /run" - ewarn "" - ewarn "Expected:" - ewarn "" - ewarn " ${permission_run_expected} /run" - ewarn "" - ewarn "This is known to be causing problems for UDEV-enabled LVM services." - fi - fi -} - -src_test() { - einfo "Tests are disabled because of device-node mucking, if you want to" - einfo "run tests, compile the package and see ${S}/tests" -} diff --git a/sys-fs/lvm2/lvm2-2.03.14-r3.ebuild b/sys-fs/lvm2/lvm2-2.03.14-r3.ebuild new file mode 100644 index 000000000000..6af624f3fbc9 --- /dev/null +++ b/sys-fs/lvm2/lvm2-2.03.14-r3.ebuild @@ -0,0 +1,310 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +TMPFILES_OPTIONAL=1 +inherit autotools linux-info systemd toolchain-funcs tmpfiles udev flag-o-matic + +DESCRIPTION="User-land utilities for LVM2 (device-mapper) software" +HOMEPAGE="https://sourceware.org/lvm2/" +SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz + ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="readline static static-libs systemd lvm2create-initrd sanlock selinux +udev +thin device-mapper-only" +REQUIRED_USE="device-mapper-only? ( !lvm2create-initrd !sanlock !thin ) + static? ( !systemd !udev ) + static-libs? ( static !udev ) + systemd? ( udev )" + +DEPEND_COMMON=" + dev-libs/libaio[static-libs?] + static? ( dev-libs/libaio[static-libs] ) + !static? ( dev-libs/libaio[static-libs?] ) + readline? ( sys-libs/readline:0= ) + sanlock? ( sys-cluster/sanlock ) + systemd? ( >=sys-apps/systemd-205:0= ) + udev? ( >=virtual/libudev-208:= )" +# /run is now required for locking during early boot. /var cannot be assumed to +# be available -- thus, pull in recent enough baselayout for /run. +# This version of LVM is incompatible with cryptsetup <1.1.2. +RDEPEND="${DEPEND_COMMON} + >=sys-apps/baselayout-2.2 + >=sys-apps/util-linux-2.16 + lvm2create-initrd? ( sys-apps/makedev ) + !device-mapper-only? ( virtual/tmpfiles ) + thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )" +# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check +DEPEND="${DEPEND_COMMON} + static? ( + readline? ( sys-libs/readline[static-libs] ) + selinux? ( sys-libs/libselinux[static-libs] ) + >=sys-apps/util-linux-2.16[static-libs] + )" +BDEPEND=" + sys-devel/autoconf-archive + virtual/pkgconfig +" + +S="${WORKDIR}/${PN/lvm/LVM}.${PV}" + +PATCHES=( + # Gentoo specific modification(s): + "${FILESDIR}"/${PN}-2.03.06-example.conf.in.patch + + # For upstream -- review and forward: + #"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch # FIXME: breaks libdm/dm-tools build + "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch + "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331 + "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373 + #"${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed + "${FILESDIR}"/${PN}-2.03.12-dynamic-static-ldflags.patch #332905 + "${FILESDIR}"/${PN}-2.03.14-static-pkgconfig-libs.patch #370217, #439414 + blkid + "${FILESDIR}"/${PN}-2.03.12-static-pkgconfig-libs-2.patch + "${FILESDIR}"/${PN}-2.03.05-pthread-pkgconfig.patch #492450 + "${FILESDIR}"/${PN}-2.03.12-static-libm.patch #617756 + "${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446 + #"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream + "${FILESDIR}"/${PN}-2.03.05-dmeventd-no-idle-exit.patch + #"${FILESDIR}"/${PN}-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch #682380 # merged upstream + "${FILESDIR}"/${PN}-2.02.184-mksh_build.patch #686652 + "${FILESDIR}"/${PN}-2.03.14-r1-add-fcntl.patch + "${FILESDIR}"/${PN}-2.03.14-r1-fopen-to-freopen.patch + "${FILESDIR}"/${PN}-2.03.14-r1-mallinfo.patch + "${FILESDIR}"/${PN}-2.03.14-freopen_n2.patch +) + +pkg_setup() { + local CONFIG_CHECK="~SYSVIPC" + + if use udev; then + local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n" + if linux_config_exists; then + local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) + if [[ -n "${uevent_helper_path}" ]] && [[ "${uevent_helper_path}" != '""' ]]; then + ewarn "It's recommended to set an empty value to the following kernel config option:" + ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" + fi + fi + fi + + check_extra_config + + # 1. Genkernel no longer copies /sbin/lvm blindly. + if use static; then + elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with" + elog "their static versions. If you need the static binaries," + elog "you must append .static to the filename!" + fi +} + +src_prepare() { + default + + # Users without systemd get no auto-activation of any logical volume + if ! use systemd ; then + eapply "${FILESDIR}"/${PN}-2.03.14-dm_lvm_rules_no_systemd.patch + fi + + sed -i \ + -e "1iAR = $(tc-getAR)" \ + -e "s:CC ?= @CC@:CC = $(tc-getCC):" \ + make.tmpl.in || die #444082 + + sed -i -e '/FLAG/s:-O2::' configure{.ac,} || die #480212 + + sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514 + + # Don't install thin man page when not requested + if ! use thin ; then + sed -i -e 's/^\(MAN7+=.*\) $(LVMTHINMAN) \(.*\)$/\1 \2/' man/Makefile.in || die + fi + + eautoreconf +} + +src_configure() { + filter-flags -flto + + # Workaround for bug #822210 + tc-ld-disable-gold + + local myeconfargs=() + + # Most of this package does weird stuff. + # The build options are tristate, and --without is NOT supported + # options: 'none', 'internal', 'shared' + myeconfargs+=( + $(use_enable !device-mapper-only dmfilemapd) + $(use_enable !device-mapper-only dmeventd) + $(use_enable !device-mapper-only cmdlib) + $(use_enable !device-mapper-only fsadm) + $(use_enable !device-mapper-only lvmpolld) + $(usex device-mapper-only --disable-udev-systemd-background-jobs '') + + # This only causes the .static versions to become available + $(usex static --enable-static_link '') + + # dmeventd requires mirrors to be internal, and snapshot available + # so we cannot disable them + --with-mirrors="$(usex device-mapper-only none internal)" + --with-snapshots="$(usex device-mapper-only none internal)" + + # disable O_DIRECT support on hppa, breaks pv detection (#99532) + $(usex hppa --disable-o_direct '') + ) + + if use thin; then + myeconfargs+=( --with-thin=internal --with-cache=internal ) + local texec + for texec in check dump repair restore; do + myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} ) + myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} ) + done + else + myeconfargs+=( --with-thin=none --with-cache=none ) + fi + + myeconfargs+=( + $(use_enable readline) + $(use_enable selinux) + --enable-pkgconfig + --with-confdir="${EPREFIX}"/etc + --exec-prefix="${EPREFIX}" + --sbindir="${EPREFIX}/sbin" + --with-staticdir="${EPREFIX}"/sbin + --libdir="${EPREFIX}/$(get_libdir)" + --with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" + --with-default-dm-run-dir=/run + --with-default-run-dir=/run/lvm + --with-default-locking-dir=/run/lock/lvm + --with-default-pid-dir=/run + $(use_enable udev udev_rules) + $(use_enable udev udev_sync) + $(use_with udev udevdir "${EPREFIX}$(get_udevdir)"/rules.d) + $(use_enable sanlock lvmlockd-sanlock) + $(use_enable systemd udev-systemd-background-jobs) + $(use_enable systemd notify-dbus) + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + CLDFLAGS="${LDFLAGS}" + ) + # Hard-wire this to bash as some shells (dash) don't know + # "-o pipefail" #682404 + CONFIG_SHELL="/bin/bash" \ + econf "${myeconfargs[@]}" +} + +src_compile() { + pushd include >/dev/null + emake V=1 + popd >/dev/null + + if use device-mapper-only ; then + emake V=1 device-mapper + else + emake V=1 + emake V=1 CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat + fi +} + +src_test() { + einfo "Tests are disabled because of device-node mucking, if you want to" + einfo "run tests, compile the package and see ${S}/tests" +} + +src_install() { + local inst + local INSTALL_TARGETS=( install install_tmpfiles_configuration ) + # install systemd related files only when requested, bug #522430 + use systemd && INSTALL_TARGETS+=( SYSTEMD_GENERATOR_DIR="$(systemd_get_systemgeneratordir)" install_systemd_units install_systemd_generators ) + use device-mapper-only && INSTALL_TARGETS=( install_device-mapper ) + emake V=1 DESTDIR="${D}" "${INSTALL_TARGETS[@]}" + + newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper + newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper + + if use !device-mapper-only ; then + newinitd "${FILESDIR}"/dmeventd.initd-2.02.184-r2 dmeventd + newinitd "${FILESDIR}"/lvm.rc-2.02.187 lvm + newconfd "${FILESDIR}"/lvm.confd-2.02.184-r3 lvm + if ! use udev ; then + # We keep the variable but remove udev from it. + sed -r -i \ + -e '/^rc_need=/s/\//g' \ + "${ED}/etc/conf.d/lvm" || die "Could not drop udev from rc_need" + fi + + newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring + newinitd "${FILESDIR}"/lvmpolld.initd-2.02.183 lvmpolld + fi + + if use sanlock; then + newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd + fi + + if use static-libs; then + dolib.a libdm/ioctl/libdevmapper.a + if use !device-mapper-only; then + # depends on lvmetad + dolib.a libdaemon/client/libdaemonclient.a #462908 + # depends on dmeventd + dolib.a daemons/dmeventd/libdevmapper-event.a + fi + else + rm -f "${ED}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a + fi + + if use lvm2create-initrd; then + dosbin scripts/lvm2create_initrd/lvm2create_initrd + doman scripts/lvm2create_initrd/lvm2create_initrd.8 + newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd + fi + + insinto /etc + doins "${FILESDIR}"/dmtab + + dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf +} + +pkg_postinst() { + if ! use device-mapper-only; then + tmpfiles_process lvm2.conf + fi + + if use udev; then + udev_reload + fi + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + # This is a new installation + ewarn "Make sure the \"lvm\" init script is in the runlevels:" + ewarn "# rc-update add lvm boot" + ewarn + ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want" + ewarn "to enable lvm autoactivation and metadata caching." + fi + + if use udev && [[ -d /run ]] ; then + local permission_run_expected="drwxr-xr-x" + local permission_run=$(stat -c "%A" /run) + if [[ "${permission_run}" != "${permission_run_expected}" ]] ; then + ewarn "Found the following problematic permissions:" + ewarn "" + ewarn " ${permission_run} /run" + ewarn "" + ewarn "Expected:" + ewarn "" + ewarn " ${permission_run_expected} /run" + ewarn "" + ewarn "This is known to be causing problems for UDEV-enabled LVM services." + fi + fi +} + +pkg_postrm() { + if use udev && [[ -z ${REPLACED_BY_VERSION} ]]; then + udev_reload + fi +} diff --git a/sys-fs/multipath-tools/Manifest b/sys-fs/multipath-tools/Manifest index 1862aea46bec..9b8c058a96ca 100644 --- a/sys-fs/multipath-tools/Manifest +++ b/sys-fs/multipath-tools/Manifest @@ -1,6 +1,9 @@ AUX multipath-tools-0.8.7-respect-flags.patch 693 BLAKE2B 298948ad60635be15ae8b83eb0e43e46a8055b22ac351b317c435ff20728e37dd6d371eb0898c5d764490affa7b8dc878faacb2d3084ff3aa49cc102341774d5 SHA512 03573d907ef34e610e9b4e993640ab2b44be52f0b335390435cdc3d33351c5e378c421eeae0706e62000e9f1d95b118afd5a17292e0a1051c680c717b1b9b0bd +AUX multipath-tools-0.9.0-respect-flags.patch 746 BLAKE2B 8cb64404a5ebfe195d6b9cde8e047df9acb3a08a25645fb20c8c1c1b7cfa59c34b854f33ec064124c33c1fc9c11eba47306d873ed05f4cc37ff80fe0c9b409b4 SHA512 9b17f934317f9251a3a779cb6dfc228697348e3a128dc8cebbd767681bb71006733c196d8b8db14000b008500af81620fc53df52e18545ed3d4893c9a2409d83 AUX multipath.rc 565 BLAKE2B efb26199eddb75c5e87d1ab40aa8cb4fbaf9f7a2bfd7a20add6d55997d25de9a3dbf0d032c977593c2ee8d447539a34be0294ee3a80a80fb004dc2c51c8c64b5 SHA512 f08833fc3c928900f8c29438208b9715581bae426b1f45c246e8c418b210f7f9d35517ef9ad44db3d88944183b34e3411ece909b56892a9f3b7250fed49e43fe AUX multipathd-r1.rc 264 BLAKE2B f08733746c702da27e002b2cb07bbc1a1925002b1592c2f566aa8d66c71da5fd39fd6389636fc49b602f9051190ee5f7f85ad9ff35b924f51a2698e1a6654f0e SHA512 8cf764b59ed4bb13c3c2143cd83ee39bc87eca85c40acb3ed1dcd7cf4c39ecbdea7974b9705231d48377266c034a8623157648b9a99b6cef73617e4b37ad377e DIST multipath-tools-0.8.9.tar.gz 534866 BLAKE2B b5ebf3c393f6b60e85678ac07378ae07056b6777409fc1bc4f4133cdd3f8c75a3d76f6e9342208df7fed8fe7812b089eba8f6b769e47e1dd6c8b7fd321bdbd30 SHA512 25f2a5d436af6a343804988cef45ca1574d4a981655a2b91563ddb89138619158befdf5af92d836a17c95d6dcf901072b614473c2129274e5dcdb1a1d64edb4d +DIST multipath-tools-0.9.0.tar.gz 537311 BLAKE2B e7d4958d24d1e19da2b80be23585ad37f6b0c1b66dc1377014d825ddd2be10ea3b8c30162cb7a23b120427bf0c957c6cad8560018e1cb058c284f37afd5d50d4 SHA512 6c417f6d1d116fa43bedb9f77769ece9cbb7b35b78a9b3558c41df2360e52a65a07314b12ab7e4a7bbc867b9755250de9db96a2f7eb4a6a37f0b0b3f0bbc840e EBUILD multipath-tools-0.8.9.ebuild 2091 BLAKE2B e6fa02e23e152cb1eb730ecf3f8714d75aa391daf48f8a55350780d711ef7239a6dd2aeda1dd4ede09024cdbe4f12d61b22be3d00094482a24318ecc2f1147de SHA512 9aa9722d0fd8927c09b4f1a631f5bdbc2a14d8bdf72fdbfe53da3a74cd7f6a7623d098534fb093e236d694c1a5594d611ffbc94879a4ecd6e046d823bb7830eb +EBUILD multipath-tools-0.9.0.ebuild 1759 BLAKE2B b988f5cc90eb8e8b9d61154e1cdc901fca42a94bd2aef6fd7b999d25d666b43e09611b01a39dc757bb167b04428821225004d3d3dfb85d2e233aba6d246b6b77 SHA512 2849e1ee2e649dea2fa18a9cdd73da06ae6ff28babdd127a122f9a81c416be83f48eeb9556b90e11ba53489b5023e80e2d37e65618fdadb45f07024431e9f5a9 MISC metadata.xml 453 BLAKE2B 2f2a56731716bfb47dee061219c80834aa382daf9e6ce937cef2237fc1bbb05e988672cc178ad471d68e9ab4f9292677be71ef9198a163f85a7f3b8658f5d698 SHA512 e8df3db70f5d919789ff0512409365fc80dfbb31ede6079c49910e8acffc6b5289290a48acef8230bc59899262801255048d1a730f81c3642945f8c872ac5428 diff --git a/sys-fs/multipath-tools/files/multipath-tools-0.9.0-respect-flags.patch b/sys-fs/multipath-tools/files/multipath-tools-0.9.0-respect-flags.patch new file mode 100644 index 000000000000..f2b6dca05776 --- /dev/null +++ b/sys-fs/multipath-tools/files/multipath-tools-0.9.0-respect-flags.patch @@ -0,0 +1,15 @@ +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -140,10 +140,9 @@ + WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int \ + -Werror=implicit-function-declaration -Werror=format-security \ + $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) +-CPPFLAGS := $(FORTIFY_OPT) \ +- -DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" -DRUN_DIR=\"${RUN}\" \ ++CPPFLAGS += -DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" -DRUN_DIR=\"${RUN}\" \ + -DCONFIG_DIR=\"$(configdir)\" -DEXTRAVERSION=\"$(EXTRAVERSION)\" -MMD -MP +-CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe ++CFLAGS += -std=gnu99 $(WARNFLAGS) + BIN_CFLAGS = -fPIE -DPIE + LIB_CFLAGS = -fPIC + SHARED_FLAGS = -shared diff --git a/sys-fs/multipath-tools/multipath-tools-0.9.0.ebuild b/sys-fs/multipath-tools/multipath-tools-0.9.0.ebuild new file mode 100644 index 000000000000..c3ba08e79c7e --- /dev/null +++ b/sys-fs/multipath-tools/multipath-tools-0.9.0.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-info systemd toolchain-funcs udev + +DESCRIPTION="Device mapper target autoconfig" +HOMEPAGE="http://christophe.varoqui.free.fr/" +SRC_URI="https://github.com/opensvc/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~x86" +IUSE="systemd test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/json-c:= + dev-libs/libaio + dev-libs/userspace-rcu:= + >=sys-fs/lvm2-2.02.45 + >=virtual/libudev-232-r3 + sys-libs/readline:= + systemd? ( sys-apps/systemd )" +DEPEND="${RDEPEND} + test? ( dev-util/cmocka )" +BDEPEND="virtual/pkgconfig" + +CONFIG_CHECK="~DM_MULTIPATH" + +PATCHES=( "${FILESDIR}"/${PN}-0.9.0-respect-flags.patch ) + +src_compile() { + tc-export CC + + # LIBDM_API_FLUSH involves grepping files in /usr/include, + # so force the test to go the way we want #411337. + emake \ + prefix="${EPREFIX}" \ + LIB="$(get_libdir)" \ + LIBDM_API_FLUSH=1 \ + PKGCONFIG="$(tc-getPKG_CONFIG)" +} + +src_install() { + dodir /sbin /usr/share/man/man{3,5,8} + emake \ + DESTDIR="${D}" \ + prefix="${EPREFIX}" \ + LIB="$(get_libdir)" \ + RUN=run \ + unitdir="$(systemd_get_systemunitdir)" \ + libudevdir='$(prefix)'/$(get_udevdir) \ + pkgconfdir='$(prefix)/usr/$(LIB)/pkgconfig' \ + install + einstalldocs + + newinitd "${FILESDIR}"/multipathd-r1.rc multipathd + newinitd "${FILESDIR}"/multipath.rc multipath + + find "${ED}" -type f -name '*.la' -delete || die +} + +pkg_postinst() { + udev_reload + + if [[ -z ${REPLACING_VERSIONS} ]] ; then + elog "If you need multipath on your system, you must" + elog "add 'multipath' into your boot runlevel!" + fi +} + +pkg_postrm() { + udev_reload +} diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest index b216ab711d34..cd44b8b5c2de 100644 --- a/sys-fs/zfs-kmod/Manifest +++ b/sys-fs/zfs-kmod/Manifest @@ -1,4 +1,5 @@ AUX 2.1.4-ZERO_RANGE.patch 9454 BLAKE2B 5baaef961eb75ee0b46ccb89a514612795b829fe410da1587330f81c2d9550c3fc049f32952e3d67d06a80a3fcc69fe9121fc9f44c1f467570f2d81f1f3a5386 SHA512 95558f6de1b901cdcd7aaa0cc704bf75375a39a5d89da02a0665494a84646f9974e0bc8ff869b622a3a7031db279ff76029ebc33ec1f5f8a129b560ffa565349 +AUX 2.1.5-build-issues.patch 2262 BLAKE2B 6d7540c2b8f97ba1a4e84109cda702cb6dd78b89979e757ffe7b7ce6ed98792daae0b56696dfbf264c772d2a90836a9ad5786ca81c13737cb2a5f6a6eb50e7dc SHA512 1b1e8e29db530c16385e8461a0f068cf2cbcd08f347d516ffecf26c3c995e20f454b8a77a380bce5b789ab6d5fd83a77c45d4f356532a6144cdf230cc38c9672 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 @@ -7,6 +8,6 @@ DIST zfs-2.1.5.tar.gz 34951632 BLAKE2B c6e3efd9c0cda91654767eaad0eaaa05cd9a5daf1 DIST zfs-2.1.5.tar.gz.asc 836 BLAKE2B 4a81c266967540850a2cc824e79555ca9d05b2e17e45fa2723893cbd85b55e3d7d791986d6667b7ee1530e7692c03818f15e8b6798393b54989f90801b775786 SHA512 224b0dcf4982c63a8eff0a39d054537e7d023f7c35e154e4d20490b8daf184c076bc8e4de7d2c5af4059f8a802b747e637aad4479cd8d1330cf5b26da2f19c94 EBUILD zfs-kmod-2.0.7.ebuild 5623 BLAKE2B fdd099d7a5c1c62b0976883d4294eb5175681cc422724cbe8fecfa15fa220741098f919666e8ccaba21751689f380ae6869fd63c2d9098b117f8c0c465963dd9 SHA512 54908f2ec0c95dd4705837d7c36797fab15764ff3895337ad9f22f963024f5d4feb41962705bd81e34173b0e5901b56cac1197c734308d23f682953a11c931df EBUILD zfs-kmod-2.1.4-r1.ebuild 5292 BLAKE2B b773adbd308aeffac068e0dc4e8055e2ca601efe6440091a8ae82606a3bb7806df171c067dcfec4fef54e77882a7c07bbb8cac9b10fa15107d6ca24643279169 SHA512 7426f4adb9312930bfb07828d512148279dd2b935f7ed796c792b52564afef938efe830df1141cc3a94b5949551f1ca74567ef65beca41ae9cc0cf73fe1ff3df -EBUILD zfs-kmod-2.1.5.ebuild 5244 BLAKE2B 72cc9bf7af52f3172d06354d6faf2c9e76482421ae56a395dab6445b71a3bfc19da994f57d853c2b2a626384a544b07a398b642c7f27f3fa6e9d3c3c7ffc43fc SHA512 d09b9c8c101d2e8260b38376e2ba94e2e86900fe60fdb56bbefc4ff1292c2aa9250f7d7de37eb2b9a49fbd51500f33306d3083a429eb7c0ca90d593e82e3e147 +EBUILD zfs-kmod-2.1.5.ebuild 5312 BLAKE2B 7aa4ac7df6885f0aac60501d270602cf83bb1b5e4db3d0173308cd4b1c0bed4ffcb229a0a52e8739ad08c90d78c214f55931af084fa4c83e69dc14d8fdc96e35 SHA512 e6b62ad35b18cf8f24fba2f499e47b570a3b4fb2065fb79aec91ef3da30236f4d69c57b0a1ca62a99a99cb840eb3e0280285bddbd6555416d59783ce566ed995 EBUILD zfs-kmod-9999.ebuild 5244 BLAKE2B 72cc9bf7af52f3172d06354d6faf2c9e76482421ae56a395dab6445b71a3bfc19da994f57d853c2b2a626384a544b07a398b642c7f27f3fa6e9d3c3c7ffc43fc SHA512 d09b9c8c101d2e8260b38376e2ba94e2e86900fe60fdb56bbefc4ff1292c2aa9250f7d7de37eb2b9a49fbd51500f33306d3083a429eb7c0ca90d593e82e3e147 MISC metadata.xml 651 BLAKE2B 477c5d768a2eddab7bc0c14d0845801e25bfd9298fe229a132d7ff11a8560988d0230ec5d4b1447df32f58b9754df0cbe989f2a5600cd3fa99124ea4edc45cdd SHA512 d9bf0598c87bcdaab7d81dd5502caf1400f3c8d3834a6770630d85ed365cd4ebb3beeebae72d2d4d49bcdd0aa6cd709aa57cb2af4195dfc04a9c0cef89cfd724 diff --git a/sys-fs/zfs-kmod/files/2.1.5-build-issues.patch b/sys-fs/zfs-kmod/files/2.1.5-build-issues.patch new file mode 100644 index 000000000000..cca6561b16f7 --- /dev/null +++ b/sys-fs/zfs-kmod/files/2.1.5-build-issues.patch @@ -0,0 +1,74 @@ +https://github.com/openzfs/zfs/commit/a6e8113fed8a508ffda13cf1c4d8da99a4e8133a +https://github.com/openzfs/zfs/commit/60e389ca10085acfa7cd35f79ab4465d968a942f +Cherry-picked from https://github.com/openzfs/zfs/pull/13575 + +https://bugs.gentoo.org/855182 +--- a/config/always-compiler-options.m4 ++++ b/config/always-compiler-options.m4 +@@ -205,6 +205,29 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER], [ + AC_SUBST([NO_OMIT_FRAME_POINTER]) + ]) + ++dnl # ++dnl # Check if cc supports -Winfinite-recursion option. ++dnl # ++AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION], [ ++ AC_MSG_CHECKING([whether $CC supports -Winfinite-recursion]) ++ ++ saved_flags="$CFLAGS" ++ CFLAGS="$CFLAGS -Werror -Winfinite-recursion" ++ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ ++ INFINITE_RECURSION=-Winfinite-recursion ++ AC_DEFINE([HAVE_INFINITE_RECURSION], 1, ++ [Define if compiler supports -Winfinite-recursion]) ++ AC_MSG_RESULT([yes]) ++ ], [ ++ INFINITE_RECURSION= ++ AC_MSG_RESULT([no]) ++ ]) ++ ++ CFLAGS="$saved_flags" ++ AC_SUBST([INFINITE_RECURSION]) ++]) ++ + dnl # + dnl # Check if cc supports -fno-ipa-sra option. + dnl # +--- a/config/zfs-build.m4 ++++ b/config/zfs-build.m4 +@@ -211,6 +211,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [ + + ZFS_AC_CONFIG_ALWAYS_CC_NO_UNUSED_BUT_SET_VARIABLE + ZFS_AC_CONFIG_ALWAYS_CC_NO_BOOL_COMPARE ++ ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION + ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH + ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN + ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION +--- a/module/lua/ldo.c ++++ b/module/lua/ldo.c +@@ -168,6 +168,13 @@ static void seterrorobj (lua_State *L, int errcode, StkId oldtop) { + L->top = oldtop + 1; + } + ++/* ++ * Silence infinite recursion warning which was added to -Wall in gcc 12.1 ++ */ ++#if defined(HAVE_INFINITE_RECURSION) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Winfinite-recursion" ++#endif + + l_noret luaD_throw (lua_State *L, int errcode) { + if (L->errorJmp) { /* thread has an error handler? */ +@@ -190,6 +197,10 @@ l_noret luaD_throw (lua_State *L, int errcode) { + } + } + ++#if defined(HAVE_INFINITE_RECURSION) ++#pragma GCC diagnostic pop ++#endif ++ + + int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { + unsigned short oldnCcalls = L->nCcalls; diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.5.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.5.ebuild index 65567e49fef7..ac917091d0b4 100644 --- a/sys-fs/zfs-kmod/zfs-kmod-2.1.5.ebuild +++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.5.ebuild @@ -62,6 +62,11 @@ RESTRICT="debug? ( strip ) test" DOCS=( AUTHORS COPYRIGHT META README.md ) +PATCHES=( + # bug #855182 + "${FILESDIR}"/${PV}-build-issues.patch +) + pkg_pretend() { use rootfs || return 0 diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest index 04ea52a86227..dbdfa3360ff6 100644 --- a/sys-fs/zfs/Manifest +++ b/sys-fs/zfs/Manifest @@ -1,6 +1,10 @@ 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.5-build-issues.patch 2262 BLAKE2B 6d7540c2b8f97ba1a4e84109cda702cb6dd78b89979e757ffe7b7ce6ed98792daae0b56696dfbf264c772d2a90836a9ad5786ca81c13737cb2a5f6a6eb50e7dc SHA512 1b1e8e29db530c16385e8461a0f068cf2cbcd08f347d516ffecf26c3c995e20f454b8a77a380bce5b789ab6d5fd83a77c45d4f356532a6144cdf230cc38c9672 +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 AUX bash-completion-sudo.patch 905 BLAKE2B 92e58ff097893436d589f7df0134e09d2e0699ae82618c4c14caf4b26cb466367a5372d7e0a030aa857d024e3db0faef4bb5fa32c54f41f0d4766693a95ba5ab SHA512 e53c79401f4c634a94af27b2f88a40440b68a4c192fd1944668786650aaa0f1f08dff851dca5b9666ce8bba1f0e2b7cb195314cd9d1314c9bab1194d03122319 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 @@ -8,8 +12,10 @@ DIST zfs-2.1.4.tar.gz 34896310 BLAKE2B be303f1181f604770536aa4aa61d5319ec408abbd DIST zfs-2.1.4.tar.gz.asc 836 BLAKE2B b311730f72d534c87a782515f35a354bfbefba0513dc0cee5b0b497cf742590f13be6a49ff8a70d7d6503d0ba06b0266e7d290d718337add614812c3d1b0731a SHA512 53880cd5369f468551bab685eb83739ed76aa286886fdd2cbad4270755fe809da730082a91bba61011f59594fac297ce05645ae32c2c73b4a9aa835f2991a1ee 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.0.7-r1.ebuild 8668 BLAKE2B 5ee2a32d4d623e526ae551752f911cf816d8a9124dea9d0d311fa91c31bcf58c4c8c21d3020bc2174b57fad0e7ebe46ef3cf570e7b8188f8e898bbf9cd2c4d8f SHA512 3b1187a9693ef1c554f2ae7be0a532d694e7cb7c431a017ebc34cfda9d54e63928d0659e8f238c625986c0f2615c8ebc1bfa23599a2a6651833f126fc4eda635 +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.ebuild 8629 BLAKE2B 1a41e5f11c63238de677cd39af866b5670801c3e289b6e5bbf34a145219d89995ff07f9f2ce49ec57b3ddab73546213f549be396d58d2e6adfcf265a5cb5687b SHA512 9cbfa779f28e399de1695b199939fa46bf248eb88b2ec0b5e924698312360c25673381b426a120850374f17c8a23ee29337ed6e857d8389160a490f7da891f35 -EBUILD zfs-9999.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-build-issues.patch b/sys-fs/zfs/files/2.1.5-build-issues.patch new file mode 100644 index 000000000000..cca6561b16f7 --- /dev/null +++ b/sys-fs/zfs/files/2.1.5-build-issues.patch @@ -0,0 +1,74 @@ +https://github.com/openzfs/zfs/commit/a6e8113fed8a508ffda13cf1c4d8da99a4e8133a +https://github.com/openzfs/zfs/commit/60e389ca10085acfa7cd35f79ab4465d968a942f +Cherry-picked from https://github.com/openzfs/zfs/pull/13575 + +https://bugs.gentoo.org/855182 +--- a/config/always-compiler-options.m4 ++++ b/config/always-compiler-options.m4 +@@ -205,6 +205,29 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER], [ + AC_SUBST([NO_OMIT_FRAME_POINTER]) + ]) + ++dnl # ++dnl # Check if cc supports -Winfinite-recursion option. ++dnl # ++AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION], [ ++ AC_MSG_CHECKING([whether $CC supports -Winfinite-recursion]) ++ ++ saved_flags="$CFLAGS" ++ CFLAGS="$CFLAGS -Werror -Winfinite-recursion" ++ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ ++ INFINITE_RECURSION=-Winfinite-recursion ++ AC_DEFINE([HAVE_INFINITE_RECURSION], 1, ++ [Define if compiler supports -Winfinite-recursion]) ++ AC_MSG_RESULT([yes]) ++ ], [ ++ INFINITE_RECURSION= ++ AC_MSG_RESULT([no]) ++ ]) ++ ++ CFLAGS="$saved_flags" ++ AC_SUBST([INFINITE_RECURSION]) ++]) ++ + dnl # + dnl # Check if cc supports -fno-ipa-sra option. + dnl # +--- a/config/zfs-build.m4 ++++ b/config/zfs-build.m4 +@@ -211,6 +211,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [ + + ZFS_AC_CONFIG_ALWAYS_CC_NO_UNUSED_BUT_SET_VARIABLE + ZFS_AC_CONFIG_ALWAYS_CC_NO_BOOL_COMPARE ++ ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION + ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH + ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN + ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION +--- a/module/lua/ldo.c ++++ b/module/lua/ldo.c +@@ -168,6 +168,13 @@ static void seterrorobj (lua_State *L, int errcode, StkId oldtop) { + L->top = oldtop + 1; + } + ++/* ++ * Silence infinite recursion warning which was added to -Wall in gcc 12.1 ++ */ ++#if defined(HAVE_INFINITE_RECURSION) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Winfinite-recursion" ++#endif + + l_noret luaD_throw (lua_State *L, int errcode) { + if (L->errorJmp) { /* thread has an error handler? */ +@@ -190,6 +197,10 @@ l_noret luaD_throw (lua_State *L, int errcode) { + } + } + ++#if defined(HAVE_INFINITE_RECURSION) ++#pragma GCC diagnostic pop ++#endif ++ + + int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { + unsigned short oldnCcalls = L->nCcalls; diff --git a/sys-fs/zfs/files/2.1.5-dracut-non-root.patch b/sys-fs/zfs/files/2.1.5-dracut-non-root.patch new file mode 100644 index 000000000000..6d1caf92cd2d --- /dev/null +++ b/sys-fs/zfs/files/2.1.5-dracut-non-root.patch @@ -0,0 +1,33 @@ +https://github.com/openzfs/zfs/pull/13589 +https://bugs.gentoo.org/854333 + +From ef9d996669cc2ec596d4e90753b89b32a3f0ce59 Mon Sep 17 00:00:00 2001 +From: "Andrew J. Hesford" +Date: Fri, 24 Jun 2022 11:05:53 -0400 +Subject: [PATCH] Dracut module: fix parsing of root= kernel command-line + argument + +Some Dracut modules may read the `root=` kernel command-line argument +and rewrite it; in particular, `rootfs-block` installs a command-line +hook that to canonicalize arguments that specify block devices. If the +`zfs` module is added to an initramfs (which it is, by default, as long +as the core ZFS utilities are available) on a system that does not use a +ZFS root filesystem, the `zfs` module will overwrite the `root` shell +variable with the contents of the kernel command-line in the process of +determining if it should control mounting the root. This breaks the +initramfs. To solve this problem, only parse the kernel command-line +directly if the `root` shell variable is empty; otherwise, rely on the +parsing (and possible rewriting) done by other modules. + +Signed-off-by: Andrew J. Hesford +--- a/contrib/dracut/90zfs/zfs-lib.sh.in ++++ b/contrib/dracut/90zfs/zfs-lib.sh.in +@@ -88,7 +88,7 @@ decode_root_args() { + return + fi + +- root=$(getarg root=) ++ [ -n "$root" ] || root=$(getarg root=) + rootfstype=$(getarg rootfstype=) + + # shellcheck disable=SC2249 diff --git a/sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch b/sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch new file mode 100644 index 000000000000..077bcd55f6d5 --- /dev/null +++ b/sys-fs/zfs/files/2.1.5-dracut-zfs-missing.patch @@ -0,0 +1,14 @@ +https://github.com/openzfs/zfs/commit/ebbfc6cb853d2d2f3f0671362d5ff5588be39e9d +https://github.com/openzfs/zfs/issues/13595 +--- b/contrib/dracut/90zfs/module-setup.sh.in ++++ a/contrib/dracut/90zfs/module-setup.sh.in +@@ -19,7 +19,7 @@ + } + + installkernel() { ++ instmods zfs +- instmods -c zfs + } + + install() { + diff --git a/sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch b/sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch new file mode 100644 index 000000000000..a9c6130f5b00 --- /dev/null +++ b/sys-fs/zfs/files/2.1.5-r2-dracut-non-root.patch @@ -0,0 +1,60 @@ +https://github.com/openzfs/zfs/commit/eefe83eaa68f7cb4a49c580dd940d3688e42c849 +https://bugs.gentoo.org/854333 + +From eefe83eaa68f7cb4a49c580dd940d3688e42c849 Mon Sep 17 00:00:00 2001 +From: Toyam Cox +Date: Thu, 30 Jun 2022 13:47:58 -0400 +Subject: [PATCH] dracut: fix boot on non-zfs-root systems + +Simply prevent overwriting root until it needs to be overwritten. + +Dracut could change this value before this module is called, but won't +change the kernel command line. + +Reviewed-by: Andrew J. Hesford +Signed-off-by: Toyam Cox +Closes #13592 +--- + contrib/dracut/90zfs/zfs-lib.sh.in | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/contrib/dracut/90zfs/zfs-lib.sh.in b/contrib/dracut/90zfs/zfs-lib.sh.in +index e44673c2d75..3a43e514d6f 100755 +--- a/contrib/dracut/90zfs/zfs-lib.sh.in ++++ b/contrib/dracut/90zfs/zfs-lib.sh.in +@@ -88,11 +88,11 @@ decode_root_args() { + return + fi + +- root=$(getarg root=) ++ xroot=$(getarg root=) + rootfstype=$(getarg rootfstype=) + + # shellcheck disable=SC2249 +- case "$root" in ++ case "$xroot" in + ""|zfs|zfs:|zfs:AUTO) + root=zfs:AUTO + rootfstype=zfs +@@ -100,7 +100,7 @@ decode_root_args() { + ;; + + ZFS=*|zfs:*) +- root="${root#zfs:}" ++ root="${xroot#zfs:}" + root="${root#ZFS=}" + root=$(echo "$root" | tr '+' ' ') + rootfstype=zfs +@@ -109,9 +109,9 @@ decode_root_args() { + esac + + if [ "$rootfstype" = "zfs" ]; then +- case "$root" in ++ case "$xroot" in + "") root=zfs:AUTO ;; +- *) root=$(echo "$root" | tr '+' ' ') ;; ++ *) root=$(echo "$xroot" | tr '+' ' ') ;; + esac + return 0 + fi + diff --git a/sys-fs/zfs/zfs-2.0.7-r1.ebuild b/sys-fs/zfs/zfs-2.0.7-r1.ebuild new file mode 100644 index 000000000000..68d9116fd3de --- /dev/null +++ b/sys-fs/zfs/zfs-2.0.7-r1.ebuild @@ -0,0 +1,313 @@ +# 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 + !" + 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 +} diff --git a/sys-fs/zfs/zfs-2.0.7.ebuild b/sys-fs/zfs/zfs-2.0.7.ebuild deleted file mode 100644 index 2a638aee9616..000000000000 --- a/sys-fs/zfs/zfs-2.0.7.ebuild +++ /dev/null @@ -1,306 +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 - !" - 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() { - 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 -} diff --git a/sys-fs/zfs/zfs-2.1.4-r1.ebuild b/sys-fs/zfs/zfs-2.1.4-r1.ebuild new file mode 100644 index 000000000000..fb6aab2ca7e7 --- /dev/null +++ b/sys-fs/zfs/zfs-2.1.4-r1.ebuild @@ -0,0 +1,311 @@ +# 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?}" + + # 2.1.3 unkeyworded briefly for some testing + 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 + + # 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 +} diff --git a/sys-fs/zfs/zfs-2.1.4.ebuild b/sys-fs/zfs/zfs-2.1.4.ebuild deleted file mode 100644 index 465412d2cee6..000000000000 --- a/sys-fs/zfs/zfs-2.1.4.ebuild +++ /dev/null @@ -1,304 +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?}" - - # 2.1.3 unkeyworded briefly for some testing - 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-2.1.5-r1.ebuild b/sys-fs/zfs/zfs-2.1.5-r1.ebuild new file mode 100644 index 000000000000..7f0466ea0e20 --- /dev/null +++ b/sys-fs/zfs/zfs-2.1.5-r1.ebuild @@ -0,0 +1,310 @@ +# 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-2.1.5-r3.ebuild b/sys-fs/zfs/zfs-2.1.5-r3.ebuild new file mode 100644 index 000000000000..a2c22c0ac350 --- /dev/null +++ b/sys-fs/zfs/zfs-2.1.5-r3.ebuild @@ -0,0 +1,319 @@ +# 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 + + # 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 +} diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild index 6e0b78a9c125..eb60343f89b3 100644 --- a/sys-fs/zfs/zfs-9999.ebuild +++ b/sys-fs/zfs/zfs-9999.ebuild @@ -100,6 +100,10 @@ REQUIRED_USE=" RESTRICT="test" +PATCHES=( + "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch +) + pkg_pretend() { use rootfs || return 0 @@ -183,6 +187,13 @@ 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 -- cgit v1.2.3