From 632aa90c53a31517c5d2259537aadc192434a332 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 7 Feb 2024 03:59:02 +0000 Subject: gentoo auto-resync : 07:02:2024 - 03:59:02 --- sys-apps/Manifest.gz | Bin 50172 -> 50181 bytes sys-apps/acl/Manifest | 2 +- sys-apps/acl/acl-2.3.2-r1.ebuild | 55 ++ sys-apps/acl/acl-2.3.2.ebuild | 62 --- sys-apps/attr/Manifest | 4 +- sys-apps/attr/attr-2.5.2-r1.ebuild | 68 +++ sys-apps/attr/attr-2.5.2.ebuild | 73 --- sys-apps/attr/attr-9999.ebuild | 7 +- sys-apps/systemd-utils/Manifest | 2 +- .../systemd-utils/systemd-utils-254.9-r1.ebuild | 583 ++++++++++++++++++++ sys-apps/systemd-utils/systemd-utils-254.9.ebuild | 584 --------------------- sys-apps/util-linux/Manifest | 4 +- sys-apps/util-linux/util-linux-2.39.3-r1.ebuild | 413 --------------- sys-apps/util-linux/util-linux-2.39.3-r2.ebuild | 408 ++++++++++++++ sys-apps/util-linux/util-linux-9999.ebuild | 27 +- 15 files changed, 1138 insertions(+), 1154 deletions(-) create mode 100644 sys-apps/acl/acl-2.3.2-r1.ebuild delete mode 100644 sys-apps/acl/acl-2.3.2.ebuild create mode 100644 sys-apps/attr/attr-2.5.2-r1.ebuild delete mode 100644 sys-apps/attr/attr-2.5.2.ebuild create mode 100644 sys-apps/systemd-utils/systemd-utils-254.9-r1.ebuild delete mode 100644 sys-apps/systemd-utils/systemd-utils-254.9.ebuild delete mode 100644 sys-apps/util-linux/util-linux-2.39.3-r1.ebuild create mode 100644 sys-apps/util-linux/util-linux-2.39.3-r2.ebuild (limited to 'sys-apps') diff --git a/sys-apps/Manifest.gz b/sys-apps/Manifest.gz index e79c7b4ac35c..59c8e4462d4b 100644 Binary files a/sys-apps/Manifest.gz and b/sys-apps/Manifest.gz differ diff --git a/sys-apps/acl/Manifest b/sys-apps/acl/Manifest index b11a9c7f9b92..637074e8de6c 100644 --- a/sys-apps/acl/Manifest +++ b/sys-apps/acl/Manifest @@ -2,5 +2,5 @@ AUX acl-2.3.1-musl-1.2.4-lfs64-fix.patch 1028 BLAKE2B 3ce13de7ee1f58b7fd1c39ca9b DIST acl-2.3.1.tar.xz 355676 BLAKE2B 15e81e8159ddb21ef0c262bef3101c0b6fa546738a2ab74c01ccc21fd1c3dc8ab6aaf84a06dee6da22291f3ca4feeffa60c7d11bfac1ab770a6ec28e1f1655e0 SHA512 7d02f05d17305f8587ab485395b00c7fdb8e44c1906d0d04b70a43a3020803e8b2b8c707abb6147f794867dfa87bd51769c2d3e11a3db55ecbd2006a6e6231dc DIST acl-2.3.2.tar.xz 371680 BLAKE2B 9f2abfddcd403df2c716c05f02a1b52453613d10948dc58a65b9ef41b44e37db6de99fb22dcfc4f6f0fb5d0319c939da61bd4e0fba2cdb5643e8087ecd34eeac SHA512 c2d061dbfd28c00cecbc1ae614d67f3138202bf4d39b383f2df4c6a8b10b830f33acec620fb211f268478737dde4037d338a5823af445253cb088c48a135099b EBUILD acl-2.3.1-r2.ebuild 1951 BLAKE2B af49c5dff0ec7e53fdc1f8671eab74fe88184b3a22e62beef1e4a9db1ffe8268ccffca52f9e2f4981862d21da0553c4dece14422bd4201d2df8f37a4c0ab416a SHA512 fff12fef1da544137734a8c524b0f812cb7c353b94ce5e82f35bb266c65300923d5c7dd17f95c30606f673cd23500891246c5b2595ac7589e3fe76564315b456 -EBUILD acl-2.3.2.ebuild 1379 BLAKE2B 20a7fbc8b342726d0ff42fdebc93d18833470f65e998e9698a02b4c2a1ff6ffac27147f27422afbb914ff9fe4c2a5fd03d7d63121070f1ebb08d5740c5f469c8 SHA512 a86bf381a230f885b30a5832a00ac9ebe6803c8b4ddd09c1951e632d31c205f1c1c8b584c7963903f8931bc0538812924f2c5811ba3f525628a26e25306d6321 +EBUILD acl-2.3.2-r1.ebuild 1278 BLAKE2B cbacdd9ea411196be2fe89d4fb24291a6e50905eecc55e2c75dd0f75278bee705082ea29569cdefccbfff7b3e7402a58ed089d20217d782c17bfba5d9bf15146 SHA512 2edc2c2832c978ca160b845939f1121fed68f5d9fbeec687900219e2a491762f81aea4c2074f23c53f762bd2fb4bfdbad06f6842b9cbd584f2d23e930fef8887 MISC metadata.xml 345 BLAKE2B b168c40ceb66cfacdb1fbe9b5031705f5c3249afeb872163663564dac2ea85e6fa857804831a80b4c44323223b417a24a156d27f8231396d5b090e44a0dc9288 SHA512 e0cbeec10fb47ace3d0fd3c1ba8a5a0bba02345a3e0df30aa82777507fb6ab75f2705b06e7635a00406d2b0839bc41d0a9fafcd8926844e1d9877b8cf2ed6f78 diff --git a/sys-apps/acl/acl-2.3.2-r1.ebuild b/sys-apps/acl/acl-2.3.2-r1.ebuild new file mode 100644 index 000000000000..83ade1a687c9 --- /dev/null +++ b/sys-apps/acl/acl-2.3.2-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic libtool multilib-minimal + +DESCRIPTION="Access control list utilities, libraries, and headers" +HOMEPAGE="https://savannah.nongnu.org/projects/acl" +SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz" + +LICENSE="LGPL-2.1+ 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="nls static-libs" + +RDEPEND=" + >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] +" +DEPEND="${RDEPEND}" +BDEPEND="nls? ( sys-devel/gettext )" + +src_prepare() { + default + + # bug #580792 + elibtoolize +} + +multilib_src_configure() { + # Filter out -flto flags as they break getfacl/setfacl binaries (bug #667372) + filter-lto + + local myeconfargs=( + --bindir="${EPREFIX}"/bin + --libexecdir="${EPREFIX}"/usr/$(get_libdir) + --enable-largefile + $(use_enable static-libs static) + $(use_enable nls) + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_test() { + # Tests call native binaries with an LD_PRELOAD wrapper + # bug #772356 + multilib_is_native_abi && default +} + +multilib_src_install_all() { + if ! use static-libs ; then + find "${ED}" -type f -name "*.la" -delete || die + fi +} diff --git a/sys-apps/acl/acl-2.3.2.ebuild b/sys-apps/acl/acl-2.3.2.ebuild deleted file mode 100644 index 1143bebd9578..000000000000 --- a/sys-apps/acl/acl-2.3.2.ebuild +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic libtool multilib-minimal usr-ldscript - -DESCRIPTION="Access control list utilities, libraries, and headers" -HOMEPAGE="https://savannah.nongnu.org/projects/acl" -SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz" - -LICENSE="LGPL-2.1+ 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="nls static-libs" - -RDEPEND=" - >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] -" -DEPEND="${RDEPEND}" -BDEPEND="nls? ( sys-devel/gettext )" - -src_prepare() { - default - - # bug #580792 - elibtoolize -} - -multilib_src_configure() { - # Filter out -flto flags as they break getfacl/setfacl binaries (bug #667372) - filter-lto - - local myeconfargs=( - --bindir="${EPREFIX}"/bin - --libexecdir="${EPREFIX}"/usr/$(get_libdir) - --enable-largefile - $(use_enable static-libs static) - $(use_enable nls) - ) - - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -multilib_src_test() { - # Tests call native binaries with an LD_PRELOAD wrapper - # bug #772356 - multilib_is_native_abi && default -} - -multilib_src_install() { - default - - # Move shared libs to / - gen_usr_ldscript -a acl -} - -multilib_src_install_all() { - if ! use static-libs ; then - find "${ED}" -type f -name "*.la" -delete || die - fi -} diff --git a/sys-apps/attr/Manifest b/sys-apps/attr/Manifest index 97148bc78968..78af3ac68bd9 100644 --- a/sys-apps/attr/Manifest +++ b/sys-apps/attr/Manifest @@ -3,6 +3,6 @@ AUX xattr-shim.h 253 BLAKE2B 2e9a549f208b7eab0871daeebafd1ef9924102e60f68353a04f DIST attr-2.5.1.tar.xz 318188 BLAKE2B 876dcbd802ea79b7851640f208820ffdfb73dc46065af673037c6dd50ad2af158f9f74b34cf45728baf9d0cc5572b40c3f102aa2907245a877db0d3879e38f04 SHA512 9e5555260189bb6ef2440c76700ebb813ff70582eb63d446823874977307d13dfa3a347dfae619f8866943dfa4b24ccf67dadd7e3ea2637239fdb219be5d2932 DIST attr-2.5.2.tar.xz 334180 BLAKE2B cf26348c3a96622e4f62493ac7655e14b6580d36a5784ef4c3750178856eceabd33192fd58516be21c8aa1ad41d56c024ad440ef4bc922bed8f7a4984ea16c63 SHA512 f587ea544effb7cfed63b3027bf14baba2c2dbe3a9b6c0c45fc559f7e8cb477b3e9a4a826eae30f929409468c50d11f3e7dc6d2500f41e1af8662a7e96a30ef3 EBUILD attr-2.5.1-r2.ebuild 2365 BLAKE2B 25f73132b6c1e92a6786474718cf399e5e1958be5b63d455e85d6e466febcab161c4787fda2e35958b55c90999a11d1378805197f5bc21895681ceaf489cebae SHA512 1f81875d8338e9df204cfc75b5c12d3e40fc3c782c2105bf8d02bc2e3b99455303bb99cff2da44bdfd1a20c3146bd1e2c13866f27c70da9b6ed620cc95d9234b -EBUILD attr-2.5.2.ebuild 1569 BLAKE2B 030fb32e6d92e176d411ca3ffcae4f8ef7f2899efa15f26a8467495145be833fd8c75b493b385293e4d2493ea2b9c1861b17a47bf60463d243a1dc7da0370d35 SHA512 9c9e430773fc3a24abfed98bd9eb8ecdfce577a3334bb1ba41e48defc3ff2297842e2cab278d2328a43bca5480a9e852a736fdfdaa08d6344e0fc32b9301e474 -EBUILD attr-9999.ebuild 1569 BLAKE2B 030fb32e6d92e176d411ca3ffcae4f8ef7f2899efa15f26a8467495145be833fd8c75b493b385293e4d2493ea2b9c1861b17a47bf60463d243a1dc7da0370d35 SHA512 9c9e430773fc3a24abfed98bd9eb8ecdfce577a3334bb1ba41e48defc3ff2297842e2cab278d2328a43bca5480a9e852a736fdfdaa08d6344e0fc32b9301e474 +EBUILD attr-2.5.2-r1.ebuild 1426 BLAKE2B bc876babca1c006bac117c2c0c1fbdc2ce178963e302c6dd50541fe79e6360efb0aed20398ac01f1773f652180f967d4ae1b87ec1312d361555e52d380ac8051 SHA512 61effca67ce3d0496d29d1a989eca3fba11d277649613462adf2aa098ea241eb9802befc59181555ae2ae3e27ff990b408c61b9cfca28a4c812f36ae9981f24a +EBUILD attr-9999.ebuild 1426 BLAKE2B bc876babca1c006bac117c2c0c1fbdc2ce178963e302c6dd50541fe79e6360efb0aed20398ac01f1773f652180f967d4ae1b87ec1312d361555e52d380ac8051 SHA512 61effca67ce3d0496d29d1a989eca3fba11d277649613462adf2aa098ea241eb9802befc59181555ae2ae3e27ff990b408c61b9cfca28a4c812f36ae9981f24a MISC metadata.xml 389 BLAKE2B e857460e11e0ea047e3cc0a9ee3f02e9271dc01d12d82fc9412348dc2fd1173fc5ed2c12a9c4de5cb7098eb2de2a78f6865ef88148179f67121a92c04eb509e9 SHA512 ae5a0d549f4226808931af6479c023d6d02a7f40c8eed053e534061458bd3e7a1921bbb24bf4a8f5f02816f66ca6e17b9774c00b3063ffaf2adba7e2a921dd00 diff --git a/sys-apps/attr/attr-2.5.2-r1.ebuild b/sys-apps/attr/attr-2.5.2-r1.ebuild new file mode 100644 index 000000000000..8aac35056b3e --- /dev/null +++ b/sys-apps/attr/attr-2.5.2-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/${PN}.git" + inherit autotools git-r3 +else + inherit libtool + + SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="Extended attributes tools" +HOMEPAGE="https://savannah.nongnu.org/projects/attr" + +LICENSE="LGPL-2.1+" +SLOT="0" +IUSE="debug nls static-libs" + +BDEPEND="nls? ( sys-devel/gettext )" + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + po/update-potfiles || die + eautopoint + eautoreconf + else + # bug #580792 + elibtoolize + fi +} + +multilib_src_configure() { + local myeconfargs=( + --bindir="${EPREFIX}"/bin + --libexecdir="${EPREFIX}"/usr/$(get_libdir) + --enable-shared + $(use_enable static-libs static) + $(use_enable nls) + $(use_enable debug) + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + # Add a wrapper until people upgrade. + # TODO: figure out when this was added & when we can drop it! + insinto /usr/include/attr + newins "${FILESDIR}"/xattr-shim.h xattr.h +} + +multilib_src_install_all() { + if ! use static-libs; then + find "${ED}" -name '*.la' -delete || die + fi + + einstalldocs +} diff --git a/sys-apps/attr/attr-2.5.2.ebuild b/sys-apps/attr/attr-2.5.2.ebuild deleted file mode 100644 index 0c5a2dce3464..000000000000 --- a/sys-apps/attr/attr-2.5.2.ebuild +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib-minimal usr-ldscript - -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://git.savannah.gnu.org/git/${PN}.git" - inherit autotools git-r3 -else - inherit libtool - - SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" -fi - -DESCRIPTION="Extended attributes tools" -HOMEPAGE="https://savannah.nongnu.org/projects/attr" - -LICENSE="LGPL-2.1+" -SLOT="0" -IUSE="debug nls static-libs" - -BDEPEND="nls? ( sys-devel/gettext )" - -src_prepare() { - default - - if [[ ${PV} == 9999 ]] ; then - po/update-potfiles || die - eautopoint - eautoreconf - else - # bug #580792 - elibtoolize - fi -} - -multilib_src_configure() { - local myeconfargs=( - --bindir="${EPREFIX}"/bin - --libexecdir="${EPREFIX}"/usr/$(get_libdir) - --enable-shared - $(use_enable static-libs static) - $(use_enable nls) - $(use_enable debug) - ) - - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -multilib_src_install() { - emake DESTDIR="${D}" install - - if multilib_is_native_abi; then - # We install attr into /bin, so we need the shared lib with it - gen_usr_ldscript -a attr - fi - - # Add a wrapper until people upgrade. - # TODO: figure out when this was added & when we can drop it! - insinto /usr/include/attr - newins "${FILESDIR}"/xattr-shim.h xattr.h -} - -multilib_src_install_all() { - if ! use static-libs; then - find "${ED}" -name '*.la' -delete || die - fi - - einstalldocs -} diff --git a/sys-apps/attr/attr-9999.ebuild b/sys-apps/attr/attr-9999.ebuild index 0c5a2dce3464..8aac35056b3e 100644 --- a/sys-apps/attr/attr-9999.ebuild +++ b/sys-apps/attr/attr-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit multilib-minimal usr-ldscript +inherit multilib-minimal if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://git.savannah.gnu.org/git/${PN}.git" @@ -53,11 +53,6 @@ multilib_src_configure() { multilib_src_install() { emake DESTDIR="${D}" install - if multilib_is_native_abi; then - # We install attr into /bin, so we need the shared lib with it - gen_usr_ldscript -a attr - fi - # Add a wrapper until people upgrade. # TODO: figure out when this was added & when we can drop it! insinto /usr/include/attr diff --git a/sys-apps/systemd-utils/Manifest b/sys-apps/systemd-utils/Manifest index ef3b7b3821e2..cdb2c2f691d8 100644 --- a/sys-apps/systemd-utils/Manifest +++ b/sys-apps/systemd-utils/Manifest @@ -12,5 +12,5 @@ DIST systemd-stable-254.9.tar.gz 14423806 BLAKE2B ab39c0a00b8451b24b40e39f4bf7ec EBUILD systemd-utils-254.5-r2.ebuild 13438 BLAKE2B 62053032c87e27db1ce64ab57c21d59305a681dd79fbeac3c88aef4b29c5dab0f98370a94d2e000ae3a742c9211291e6b6e469b95e3f3fc052942099ecf38921 SHA512 81b918ca31103c1953d92b3c6b9d8bac19c56ad4be59173a4a447e78e2ac7eb1c8789198fc6c33156d024370e94f5c39c8a91d01f17fcf4d28162bdaa7d1270e EBUILD systemd-utils-254.7.ebuild 13438 BLAKE2B 62053032c87e27db1ce64ab57c21d59305a681dd79fbeac3c88aef4b29c5dab0f98370a94d2e000ae3a742c9211291e6b6e469b95e3f3fc052942099ecf38921 SHA512 81b918ca31103c1953d92b3c6b9d8bac19c56ad4be59173a4a447e78e2ac7eb1c8789198fc6c33156d024370e94f5c39c8a91d01f17fcf4d28162bdaa7d1270e EBUILD systemd-utils-254.8.ebuild 13438 BLAKE2B 62053032c87e27db1ce64ab57c21d59305a681dd79fbeac3c88aef4b29c5dab0f98370a94d2e000ae3a742c9211291e6b6e469b95e3f3fc052942099ecf38921 SHA512 81b918ca31103c1953d92b3c6b9d8bac19c56ad4be59173a4a447e78e2ac7eb1c8789198fc6c33156d024370e94f5c39c8a91d01f17fcf4d28162bdaa7d1270e -EBUILD systemd-utils-254.9.ebuild 13446 BLAKE2B 61a389ac353a77e2673c5b1fd23d37099f7dc4491aef107d63668821b794517e7768af5e90c5d69aeb3fa1cd8c9b5e5ded1e1ab28d1a70cdd7d86c5ed85b465c SHA512 85754bbe69776963fe34d9cefb097d8b95c997ff642408b419288fbc6e2a675e81f34190be6e061473803bab74a99aaf2945ec896ea257451fca9d2fc040e27e +EBUILD systemd-utils-254.9-r1.ebuild 13406 BLAKE2B 449e1933a2ab091466acbea019572d098881f55333200cbfcde87e58a7fed83fd4775f10eb2a60033f3fa1c654f6b7ffde11ab9545877a556aef7165a4a2e5f0 SHA512 ecb864a2f00ba37d696a53be92e04a7d57862ec519f9bb0b756e5493e3cc2da92265889cef95f215eb8945942214a937758e62979e3181954db1f1a8feb310cb MISC metadata.xml 888 BLAKE2B b799e1d62a1208dbbec1a1cfb47592b069d5c79cb18efffef922c72b0d61e30938d26c6f4e0d3951f9c327601dd71de14062dad0a47e6b84a61b1a8b125f1a6b SHA512 6debd964f9c127ba4332e0c0b86e506d3cf10cbe3cd45442bf7955b16e790a9eccdd928d473b3722b11b4a75d34fe5bb91f4867a5dc92e786ba73d9ec3f54712 diff --git a/sys-apps/systemd-utils/systemd-utils-254.9-r1.ebuild b/sys-apps/systemd-utils/systemd-utils-254.9-r1.ebuild new file mode 100644 index 000000000000..e0ac974de10f --- /dev/null +++ b/sys-apps/systemd-utils/systemd-utils-254.9-r1.ebuild @@ -0,0 +1,583 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..12} ) + +QA_PKGCONFIG_VERSION=$(ver_cut 1) + +inherit bash-completion-r1 flag-o-matic linux-info meson-multilib optfeature +inherit python-single-r1 secureboot toolchain-funcs udev + +DESCRIPTION="Utilities split out from systemd for OpenRC users" +HOMEPAGE="https://systemd.io/" + +if [[ ${PV} == *.* ]]; then + MY_P="systemd-stable-${PV}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" +else + MY_P="systemd-${PV}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" +fi + +MUSL_PATCHSET="systemd-musl-patches-254.3" +SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )" + +LICENSE="GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+acl boot +kmod kernel-install selinux split-usr sysusers +tmpfiles test +udev ukify" +REQUIRED_USE=" + || ( kernel-install tmpfiles sysusers udev ) + boot? ( kernel-install ) + ukify? ( boot ) + ${PYTHON_REQUIRED_USE} +" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + elibc_musl? ( >=sys-libs/musl-1.2.3 ) + selinux? ( sys-libs/libselinux:0= ) + tmpfiles? ( + acl? ( sys-apps/acl:0= ) + ) + udev? ( + >=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] + sys-libs/libcap:0=[${MULTILIB_USEDEP}] + virtual/libcrypt:=[${MULTILIB_USEDEP}] + acl? ( sys-apps/acl:0= ) + kmod? ( >=sys-apps/kmod-15:0= ) + ) + !udev? ( + >=sys-apps/util-linux-2.30:0= + sys-libs/libcap:0= + virtual/libcrypt:= + ) +" +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-3.11 +" + +PEFILE_DEPEND='dev-python/pefile[${PYTHON_USEDEP}]' + +RDEPEND="${COMMON_DEPEND} + boot? ( !=dev-python/pyelftools-0.30[\${PYTHON_USEDEP}] ) + ukify? ( test? ( ${PEFILE_DEPEND} ) ) + ") +" + +TMPFILES_OPTIONAL=1 +UDEV_OPTIONAL=1 + +QA_EXECSTACK="usr/lib/systemd/boot/efi/*" +QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" + +CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED + ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~UNIX" + +pkg_setup() { + if [[ ${MERGE_TYPE} != buildonly ]] && use udev; then + linux-info_pkg_setup + fi + use boot && secureboot_pkg_setup +} + +src_prepare() { + local PATCHES=( + "${FILESDIR}/${PN}-254.3-add-link-kernel-install-shared-option.patch" + ) + + if use elibc_musl; then + PATCHES+=( + "${WORKDIR}/${MUSL_PATCHSET}" + ) + fi + default + + # Remove install_rpath; we link statically + local rpath_pattern="install_rpath : rootpkglibdir," + grep -q -e "${rpath_pattern}" meson.build || die + sed -i -e "/${rpath_pattern}/d" meson.build || die +} + +src_configure() { + python_setup + meson-multilib_src_configure +} + +multilib_src_configure() { + local emesonargs=( + $(meson_use split-usr) + $(meson_use split-usr split-bin) + -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" + -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" + -Dsysvinit-path= + $(meson_native_use_bool boot bootloader) + $(meson_native_use_bool kernel-install) + $(meson_native_use_bool selinux) + $(meson_native_use_bool sysusers) + $(meson_use test tests) + $(meson_native_use_bool tmpfiles) + $(meson_use udev hwdb) + $(meson_native_use_bool ukify) + + # Link staticly with libsystemd-shared + -Dlink-boot-shared=false + -Dlink-kernel-install-shared=false + -Dlink-udev-shared=false + + # systemd-tmpfiles has a separate "systemd-tmpfiles.standalone" target + -Dstandalone-binaries=true + + # Disable all optional features + -Dadm-group=false + -Danalyze=false + -Dapparmor=false + -Daudit=false + -Dbacklight=false + -Dbinfmt=false + -Dbpf-framework=false + -Dbzip2=false + -Dcoredump=false + -Ddbus=false + -Delfutils=false + -Denvironment-d=false + -Dfdisk=false + -Dgcrypt=false + -Dglib=false + -Dgshadow=false + -Dgnutls=false + -Dhibernate=false + -Dhostnamed=false + -Didn=false + -Dima=false + -Dinitrd=false + -Dfirstboot=false + -Dldconfig=false + -Dlibcryptsetup=false + -Dlibcurl=false + -Dlibfido2=false + -Dlibidn=false + -Dlibidn2=false + -Dlibiptc=false + -Dlocaled=false + -Dlogind=false + -Dlz4=false + -Dmachined=false + -Dmicrohttpd=false + -Dnetworkd=false + -Dnscd=false + -Dnss-myhostname=false + -Dnss-resolve=false + -Dnss-systemd=false + -Doomd=false + -Dopenssl=false + -Dp11kit=false + -Dpam=false + -Dpcre2=false + -Dpolkit=false + -Dportabled=false + -Dpstore=false + -Dpwquality=false + -Drandomseed=false + -Dresolve=false + -Drfkill=false + -Dseccomp=false + -Dsmack=false + -Dsysext=false + -Dtimedated=false + -Dtimesyncd=false + -Dtpm=false + -Dqrencode=false + -Dquotacheck=false + -Duserdb=false + -Dutmp=false + -Dvconsole=false + -Dwheel-group=false + -Dxdg-autostart=false + -Dxkbcommon=false + -Dxz=false + -Dzlib=false + -Dzstd=false + ) + + if use tmpfiles || use udev; then + emesonargs+=( $(meson_native_use_bool acl) ) + else + emesonargs+=( -Dacl=false ) + fi + + if use udev; then + emesonargs+=( $(meson_native_use_bool kmod) ) + else + emesonargs+=( -Dkmod=false ) + fi + + if use elibc_musl; then + # Avoid redefinition of struct ethhdr. + append-cppflags -D__UAPI_DEF_ETHHDR=0 + fi + + if multilib_is_native_abi || use udev; then + meson_src_configure + fi +} + +efi_arch() { + case "$(tc-arch)" in + amd64) echo x64 ;; + arm) echo arm ;; + arm64) echo aa64 ;; + x86) echo x86 ;; + esac +} + +multilib_src_compile() { + local targets=() + if multilib_is_native_abi; then + if use boot; then + targets+=( + bootctl + man/bootctl.1 + src/boot/efi/linux$(efi_arch).efi.stub + src/boot/efi/systemd-boot$(efi_arch).efi + ) + fi + if use kernel-install; then + targets+=( + kernel-install + 90-loaderentry.install + man/kernel-install.8 + ) + fi + if use sysusers; then + targets+=( + systemd-sysusers.standalone + man/sysusers.d.5 + man/systemd-sysusers.8 + ) + if use test; then + targets+=( + systemd-runtest.env + ) + fi + fi + if use tmpfiles; then + targets+=( + systemd-tmpfiles.standalone + man/tmpfiles.d.5 + man/systemd-tmpfiles.8 + tmpfiles.d/{etc,static-nodes-permissions,var}.conf + ) + if use test; then + targets+=( test-tmpfile-util ) + fi + fi + if use udev; then + targets+=( + udevadm + systemd-hwdb + src/udev/ata_id + src/udev/cdrom_id + src/udev/fido_id + src/udev/mtd_probe + src/udev/scsi_id + src/udev/udev.pc + src/udev/v4l_id + man/udev.conf.5 + man/systemd.link.5 + man/hwdb.7 + man/udev.7 + man/systemd-hwdb.8 + man/systemd-udevd.service.8 + man/udevadm.8 + man/libudev.3 + man/udev_device_get_syspath.3 + man/udev_device_has_tag.3 + man/udev_device_new_from_syspath.3 + man/udev_enumerate_add_match_subsystem.3 + man/udev_enumerate_new.3 + man/udev_enumerate_scan_devices.3 + man/udev_list_entry.3 + man/udev_monitor_filter_update.3 + man/udev_monitor_new_from_netlink.3 + man/udev_monitor_receive_device.3 + man/udev_new.3 + hwdb.d/60-autosuspend-chromiumos.hwdb + rules.d/50-udev-default.rules + rules.d/60-persistent-storage.rules + rules.d/64-btrfs.rules + ) + if use test; then + targets+=( + test-fido-id-desc + test-udev-builtin + test-udev-event + test-udev-node + test-udev-util + udev-rule-runner + ) + fi + fi + if use ukify; then + targets+=( + ukify + 60-ukify.install + man/ukify.1 + ) + fi + fi + if use udev; then + targets+=( + udev:shared_library + src/libudev/libudev.pc + ) + if use test; then + targets+=( + test-libudev + test-libudev-sym + test-udev-device-thread + ) + fi + fi + if multilib_is_native_abi || use udev; then + meson_src_compile "${targets[@]}" + fi +} + +multilib_src_test() { + local tests=() + if multilib_is_native_abi; then + if use sysusers; then + tests+=( + test-sysusers.standalone + ) + fi + if use tmpfiles; then + tests+=( + test-systemd-tmpfiles.standalone + test-tmpfile-util + ) + fi + if use udev; then + tests+=( + rule-syntax-check + test-fido-id-desc + test-udev + test-udev-builtin + test-udev-event + test-udev-node + test-udev-util + ) + fi + fi + if use udev; then + tests+=( + test-libudev + test-libudev-sym + test-udev-device-thread + ) + fi + if [[ ${#tests[@]} -ne 0 ]]; then + meson_src_test "${tests[@]}" + fi +} + +src_install() { + local rootprefix="$(usex split-usr '' /usr)" + meson-multilib_src_install +} + +multilib_src_install() { + if multilib_is_native_abi; then + if use boot; then + into /usr + dobin bootctl + doman man/bootctl.1 + insinto usr/lib/systemd/boot/efi + doins src/boot/efi/{linux$(efi_arch).{efi,elf}.stub,systemd-boot$(efi_arch).efi} + fi + if use kernel-install; then + dobin kernel-install + doman man/kernel-install.8 + # copy the default set of plugins + cp "${S}/src/kernel-install/"*.install src/kernel-install || die + exeinto usr/lib/kernel/install.d + doexe src/kernel-install/*.install + fi + if use sysusers; then + into "${rootprefix:-/}" + newbin systemd-sysusers{.standalone,} + doman man/{systemd-sysusers.8,sysusers.d.5} + fi + if use tmpfiles; then + into "${rootprefix:-/}" + newbin systemd-tmpfiles{.standalone,} + doman man/{systemd-tmpfiles.8,tmpfiles.d.5} + insinto /usr/lib/tmpfiles.d + doins tmpfiles.d/{etc,static-nodes-permissions,var}.conf + fi + if use udev; then + into "${rootprefix:-/}" + dobin udevadm systemd-hwdb + dosym ../../bin/udevadm "${rootprefix}"/lib/systemd/systemd-udevd + + exeinto "${rootprefix}"/lib/udev + doexe src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,scsi_id,v4l_id} + + rm -f rules.d/99-systemd.rules + insinto "${rootprefix}"/lib/udev/rules.d + doins rules.d/*.rules + + insinto "${rootprefix}"/lib/udev/hwdb.d + doins hwdb.d/*.hwdb + + insinto /usr/share/pkgconfig + doins src/udev/udev.pc + + doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8} + newman man/systemd-udevd.service.8 systemd-udevd.8 + doman man/libudev.3 + doman man/udev_*.3 + fi + if use ukify; then + exeinto "${rootprefix}"/lib/systemd/ + doexe ukify + doman man/ukify.1 + fi + fi + if use udev; then + meson_install --no-rebuild --tags libudev + insinto "/usr/$(get_libdir)/pkgconfig" + doins src/libudev/libudev.pc + fi +} + +multilib_src_install_all() { + einstalldocs + if use boot; then + into /usr + exeinto usr/lib/kernel/install.d + doexe src/kernel-install/*.install + dobashcomp shell-completion/bash/bootctl + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/{_bootctl,_kernel-install} + fi + if use tmpfiles; then + doinitd "${FILESDIR}"/systemd-tmpfiles-setup + doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev + exeinto /etc/cron.daily + doexe "${FILESDIR}"/systemd-tmpfiles-clean + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/_systemd-tmpfiles + insinto /usr/lib/tmpfiles.d + doins tmpfiles.d/{tmp,x11}.conf + doins "${FILESDIR}"/legacy.conf + fi + if use udev; then + doheader src/libudev/libudev.h + + insinto /etc/udev + doins src/udev/udev.conf + keepdir /etc/udev/{hwdb.d,rules.d} + + insinto "${rootprefix}"/lib/systemd/network + doins network/99-default.link + + # Remove to avoid conflict with elogind + # https://bugs.gentoo.org/856433 + rm rules.d/70-power-switch.rules || die + insinto "${rootprefix}"/lib/udev/rules.d + doins rules.d/*.rules + doins "${FILESDIR}"/40-gentoo.rules + + insinto "${rootprefix}"/lib/udev/hwdb.d + doins hwdb.d/*.hwdb + + dobashcomp shell-completion/bash/udevadm + + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/_udevadm + fi + + use ukify && python_fix_shebang "${ED}" + use boot && secureboot_auto_sign +} + +add_service() { + local initd=$1 + local runlevel=$2 + + ebegin "Adding '${initd}' service to the '${runlevel}' runlevel" + mkdir -p "${EROOT}/etc/runlevels/${runlevel}" && + ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}" + eend $? +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + add_service systemd-tmpfiles-setup-dev sysinit + add_service systemd-tmpfiles-setup boot + fi + if use udev; then + ebegin "Updating hwdb" + systemd-hwdb --root="${ROOT}" update + eend $? + udev_reload + fi + + if use boot; then + optfeature "automatically installing the kernels in systemd-boot's native layout and updating the bootloader configuration" \ + "sys-kernel/installkernel[systemd-boot]" + fi + if use ukify; then + optfeature "automatically generating an unified kernel image on each kernel installation" \ + "sys-kernel/installkernel[ukify]" + fi +} diff --git a/sys-apps/systemd-utils/systemd-utils-254.9.ebuild b/sys-apps/systemd-utils/systemd-utils-254.9.ebuild deleted file mode 100644 index 0f7730c67c88..000000000000 --- a/sys-apps/systemd-utils/systemd-utils-254.9.ebuild +++ /dev/null @@ -1,584 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) - -QA_PKGCONFIG_VERSION=$(ver_cut 1) - -inherit bash-completion-r1 flag-o-matic linux-info meson-multilib optfeature -inherit python-single-r1 secureboot toolchain-funcs udev usr-ldscript - -DESCRIPTION="Utilities split out from systemd for OpenRC users" -HOMEPAGE="https://systemd.io/" - -if [[ ${PV} == *.* ]]; then - MY_P="systemd-stable-${PV}" - S="${WORKDIR}/${MY_P}" - SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" -else - MY_P="systemd-${PV}" - S="${WORKDIR}/${MY_P}" - SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" -fi - -MUSL_PATCHSET="systemd-musl-patches-254.3" -SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )" - -LICENSE="GPL-2 LGPL-2.1 MIT public-domain" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="+acl boot +kmod kernel-install selinux split-usr sysusers +tmpfiles test +udev ukify" -REQUIRED_USE=" - || ( kernel-install tmpfiles sysusers udev ) - boot? ( kernel-install ) - ukify? ( boot ) - ${PYTHON_REQUIRED_USE} -" -RESTRICT="!test? ( test )" - -COMMON_DEPEND=" - elibc_musl? ( >=sys-libs/musl-1.2.3 ) - selinux? ( sys-libs/libselinux:0= ) - tmpfiles? ( - acl? ( sys-apps/acl:0= ) - ) - udev? ( - >=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] - sys-libs/libcap:0=[${MULTILIB_USEDEP}] - virtual/libcrypt:=[${MULTILIB_USEDEP}] - acl? ( sys-apps/acl:0= ) - kmod? ( >=sys-apps/kmod-15:0= ) - ) - !udev? ( - >=sys-apps/util-linux-2.30:0= - sys-libs/libcap:0= - virtual/libcrypt:= - ) -" -DEPEND="${COMMON_DEPEND} - >=sys-kernel/linux-headers-3.11 -" - -PEFILE_DEPEND='dev-python/pefile[${PYTHON_USEDEP}]' - -RDEPEND="${COMMON_DEPEND} - boot? ( !=dev-python/pyelftools-0.30[\${PYTHON_USEDEP}] ) - ukify? ( test? ( ${PEFILE_DEPEND} ) ) - ") -" - -TMPFILES_OPTIONAL=1 -UDEV_OPTIONAL=1 - -QA_EXECSTACK="usr/lib/systemd/boot/efi/*" -QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" - -CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED - ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~UNIX" - -pkg_setup() { - if [[ ${MERGE_TYPE} != buildonly ]] && use udev; then - linux-info_pkg_setup - fi - use boot && secureboot_pkg_setup -} - -src_prepare() { - local PATCHES=( - "${FILESDIR}/${PN}-254.3-add-link-kernel-install-shared-option.patch" - ) - - if use elibc_musl; then - PATCHES+=( - "${WORKDIR}/${MUSL_PATCHSET}" - ) - fi - default - - # Remove install_rpath; we link statically - local rpath_pattern="install_rpath : rootpkglibdir," - grep -q -e "${rpath_pattern}" meson.build || die - sed -i -e "/${rpath_pattern}/d" meson.build || die -} - -src_configure() { - python_setup - meson-multilib_src_configure -} - -multilib_src_configure() { - local emesonargs=( - $(meson_use split-usr) - $(meson_use split-usr split-bin) - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" - -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" - -Dsysvinit-path= - $(meson_native_use_bool boot bootloader) - $(meson_native_use_bool kernel-install) - $(meson_native_use_bool selinux) - $(meson_native_use_bool sysusers) - $(meson_use test tests) - $(meson_native_use_bool tmpfiles) - $(meson_use udev hwdb) - $(meson_native_use_bool ukify) - - # Link staticly with libsystemd-shared - -Dlink-boot-shared=false - -Dlink-kernel-install-shared=false - -Dlink-udev-shared=false - - # systemd-tmpfiles has a separate "systemd-tmpfiles.standalone" target - -Dstandalone-binaries=true - - # Disable all optional features - -Dadm-group=false - -Danalyze=false - -Dapparmor=false - -Daudit=false - -Dbacklight=false - -Dbinfmt=false - -Dbpf-framework=false - -Dbzip2=false - -Dcoredump=false - -Ddbus=false - -Delfutils=false - -Denvironment-d=false - -Dfdisk=false - -Dgcrypt=false - -Dglib=false - -Dgshadow=false - -Dgnutls=false - -Dhibernate=false - -Dhostnamed=false - -Didn=false - -Dima=false - -Dinitrd=false - -Dfirstboot=false - -Dldconfig=false - -Dlibcryptsetup=false - -Dlibcurl=false - -Dlibfido2=false - -Dlibidn=false - -Dlibidn2=false - -Dlibiptc=false - -Dlocaled=false - -Dlogind=false - -Dlz4=false - -Dmachined=false - -Dmicrohttpd=false - -Dnetworkd=false - -Dnscd=false - -Dnss-myhostname=false - -Dnss-resolve=false - -Dnss-systemd=false - -Doomd=false - -Dopenssl=false - -Dp11kit=false - -Dpam=false - -Dpcre2=false - -Dpolkit=false - -Dportabled=false - -Dpstore=false - -Dpwquality=false - -Drandomseed=false - -Dresolve=false - -Drfkill=false - -Dseccomp=false - -Dsmack=false - -Dsysext=false - -Dtimedated=false - -Dtimesyncd=false - -Dtpm=false - -Dqrencode=false - -Dquotacheck=false - -Duserdb=false - -Dutmp=false - -Dvconsole=false - -Dwheel-group=false - -Dxdg-autostart=false - -Dxkbcommon=false - -Dxz=false - -Dzlib=false - -Dzstd=false - ) - - if use tmpfiles || use udev; then - emesonargs+=( $(meson_native_use_bool acl) ) - else - emesonargs+=( -Dacl=false ) - fi - - if use udev; then - emesonargs+=( $(meson_native_use_bool kmod) ) - else - emesonargs+=( -Dkmod=false ) - fi - - if use elibc_musl; then - # Avoid redefinition of struct ethhdr. - append-cppflags -D__UAPI_DEF_ETHHDR=0 - fi - - if multilib_is_native_abi || use udev; then - meson_src_configure - fi -} - -efi_arch() { - case "$(tc-arch)" in - amd64) echo x64 ;; - arm) echo arm ;; - arm64) echo aa64 ;; - x86) echo x86 ;; - esac -} - -multilib_src_compile() { - local targets=() - if multilib_is_native_abi; then - if use boot; then - targets+=( - bootctl - man/bootctl.1 - src/boot/efi/linux$(efi_arch).efi.stub - src/boot/efi/systemd-boot$(efi_arch).efi - ) - fi - if use kernel-install; then - targets+=( - kernel-install - 90-loaderentry.install - man/kernel-install.8 - ) - fi - if use sysusers; then - targets+=( - systemd-sysusers.standalone - man/sysusers.d.5 - man/systemd-sysusers.8 - ) - if use test; then - targets+=( - systemd-runtest.env - ) - fi - fi - if use tmpfiles; then - targets+=( - systemd-tmpfiles.standalone - man/tmpfiles.d.5 - man/systemd-tmpfiles.8 - tmpfiles.d/{etc,static-nodes-permissions,var}.conf - ) - if use test; then - targets+=( test-tmpfile-util ) - fi - fi - if use udev; then - targets+=( - udevadm - systemd-hwdb - src/udev/ata_id - src/udev/cdrom_id - src/udev/fido_id - src/udev/mtd_probe - src/udev/scsi_id - src/udev/udev.pc - src/udev/v4l_id - man/udev.conf.5 - man/systemd.link.5 - man/hwdb.7 - man/udev.7 - man/systemd-hwdb.8 - man/systemd-udevd.service.8 - man/udevadm.8 - man/libudev.3 - man/udev_device_get_syspath.3 - man/udev_device_has_tag.3 - man/udev_device_new_from_syspath.3 - man/udev_enumerate_add_match_subsystem.3 - man/udev_enumerate_new.3 - man/udev_enumerate_scan_devices.3 - man/udev_list_entry.3 - man/udev_monitor_filter_update.3 - man/udev_monitor_new_from_netlink.3 - man/udev_monitor_receive_device.3 - man/udev_new.3 - hwdb.d/60-autosuspend-chromiumos.hwdb - rules.d/50-udev-default.rules - rules.d/60-persistent-storage.rules - rules.d/64-btrfs.rules - ) - if use test; then - targets+=( - test-fido-id-desc - test-udev-builtin - test-udev-event - test-udev-node - test-udev-util - udev-rule-runner - ) - fi - fi - if use ukify; then - targets+=( - ukify - 60-ukify.install - man/ukify.1 - ) - fi - fi - if use udev; then - targets+=( - udev:shared_library - src/libudev/libudev.pc - ) - if use test; then - targets+=( - test-libudev - test-libudev-sym - test-udev-device-thread - ) - fi - fi - if multilib_is_native_abi || use udev; then - meson_src_compile "${targets[@]}" - fi -} - -multilib_src_test() { - local tests=() - if multilib_is_native_abi; then - if use sysusers; then - tests+=( - test-sysusers.standalone - ) - fi - if use tmpfiles; then - tests+=( - test-systemd-tmpfiles.standalone - test-tmpfile-util - ) - fi - if use udev; then - tests+=( - rule-syntax-check - test-fido-id-desc - test-udev - test-udev-builtin - test-udev-event - test-udev-node - test-udev-util - ) - fi - fi - if use udev; then - tests+=( - test-libudev - test-libudev-sym - test-udev-device-thread - ) - fi - if [[ ${#tests[@]} -ne 0 ]]; then - meson_src_test "${tests[@]}" - fi -} - -src_install() { - local rootprefix="$(usex split-usr '' /usr)" - meson-multilib_src_install -} - -multilib_src_install() { - if multilib_is_native_abi; then - if use boot; then - into /usr - dobin bootctl - doman man/bootctl.1 - insinto usr/lib/systemd/boot/efi - doins src/boot/efi/{linux$(efi_arch).{efi,elf}.stub,systemd-boot$(efi_arch).efi} - fi - if use kernel-install; then - dobin kernel-install - doman man/kernel-install.8 - # copy the default set of plugins - cp "${S}/src/kernel-install/"*.install src/kernel-install || die - exeinto usr/lib/kernel/install.d - doexe src/kernel-install/*.install - fi - if use sysusers; then - into "${rootprefix:-/}" - newbin systemd-sysusers{.standalone,} - doman man/{systemd-sysusers.8,sysusers.d.5} - fi - if use tmpfiles; then - into "${rootprefix:-/}" - newbin systemd-tmpfiles{.standalone,} - doman man/{systemd-tmpfiles.8,tmpfiles.d.5} - insinto /usr/lib/tmpfiles.d - doins tmpfiles.d/{etc,static-nodes-permissions,var}.conf - fi - if use udev; then - into "${rootprefix:-/}" - dobin udevadm systemd-hwdb - dosym ../../bin/udevadm "${rootprefix}"/lib/systemd/systemd-udevd - - exeinto "${rootprefix}"/lib/udev - doexe src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,scsi_id,v4l_id} - - rm -f rules.d/99-systemd.rules - insinto "${rootprefix}"/lib/udev/rules.d - doins rules.d/*.rules - - insinto "${rootprefix}"/lib/udev/hwdb.d - doins hwdb.d/*.hwdb - - insinto /usr/share/pkgconfig - doins src/udev/udev.pc - - doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8} - newman man/systemd-udevd.service.8 systemd-udevd.8 - doman man/libudev.3 - doman man/udev_*.3 - fi - if use ukify; then - exeinto "${rootprefix}"/lib/systemd/ - doexe ukify - doman man/ukify.1 - fi - fi - if use udev; then - meson_install --no-rebuild --tags libudev - gen_usr_ldscript -a udev - insinto "/usr/$(get_libdir)/pkgconfig" - doins src/libudev/libudev.pc - fi -} - -multilib_src_install_all() { - einstalldocs - if use boot; then - into /usr - exeinto usr/lib/kernel/install.d - doexe src/kernel-install/*.install - dobashcomp shell-completion/bash/bootctl - insinto /usr/share/zsh/site-functions - doins shell-completion/zsh/{_bootctl,_kernel-install} - fi - if use tmpfiles; then - doinitd "${FILESDIR}"/systemd-tmpfiles-setup - doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev - exeinto /etc/cron.daily - doexe "${FILESDIR}"/systemd-tmpfiles-clean - insinto /usr/share/zsh/site-functions - doins shell-completion/zsh/_systemd-tmpfiles - insinto /usr/lib/tmpfiles.d - doins tmpfiles.d/{tmp,x11}.conf - doins "${FILESDIR}"/legacy.conf - fi - if use udev; then - doheader src/libudev/libudev.h - - insinto /etc/udev - doins src/udev/udev.conf - keepdir /etc/udev/{hwdb.d,rules.d} - - insinto "${rootprefix}"/lib/systemd/network - doins network/99-default.link - - # Remove to avoid conflict with elogind - # https://bugs.gentoo.org/856433 - rm rules.d/70-power-switch.rules || die - insinto "${rootprefix}"/lib/udev/rules.d - doins rules.d/*.rules - doins "${FILESDIR}"/40-gentoo.rules - - insinto "${rootprefix}"/lib/udev/hwdb.d - doins hwdb.d/*.hwdb - - dobashcomp shell-completion/bash/udevadm - - insinto /usr/share/zsh/site-functions - doins shell-completion/zsh/_udevadm - fi - - use ukify && python_fix_shebang "${ED}" - use boot && secureboot_auto_sign -} - -add_service() { - local initd=$1 - local runlevel=$2 - - ebegin "Adding '${initd}' service to the '${runlevel}' runlevel" - mkdir -p "${EROOT}/etc/runlevels/${runlevel}" && - ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}" - eend $? -} - -pkg_postinst() { - if [[ -z ${REPLACING_VERSIONS} ]]; then - add_service systemd-tmpfiles-setup-dev sysinit - add_service systemd-tmpfiles-setup boot - fi - if use udev; then - ebegin "Updating hwdb" - systemd-hwdb --root="${ROOT}" update - eend $? - udev_reload - fi - - if use boot; then - optfeature "automatically installing the kernels in systemd-boot's native layout and updating the bootloader configuration" \ - "sys-kernel/installkernel[systemd-boot]" - fi - if use ukify; then - optfeature "automatically generating an unified kernel image on each kernel installation" \ - "sys-kernel/installkernel[ukify]" - fi -} diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest index a357ce2a8f02..a3414d76027e 100644 --- a/sys-apps/util-linux/Manifest +++ b/sys-apps/util-linux/Manifest @@ -14,6 +14,6 @@ DIST util-linux-2.39.3.tar.sign 833 BLAKE2B 433b9ad6e97d9e2ffbd516addf8406587d00 DIST util-linux-2.39.3.tar.xz 8526168 BLAKE2B cd7b2b3c820e920d4a6ecd46fd807e018fc8e54439292f5e62c5f6863dd0f2505df3ec02c470d9be255a437c6ee8e4077908ac78d19a0d1273854d99eb571df0 SHA512 a2de1672f06ca5d2d431db1265a8499808770c3781019ec4a3a40170df4685826d8e3ca120841dcc5df4681ca8c935a993317bd0dc70465b21bf8e0efef65afa EBUILD util-linux-2.38.1-r3.ebuild 10652 BLAKE2B ffce17852c9c268991be22e76eb9beef14331968f5b8cef20b336a0c58c71b76dd04b757181a31ff5c9f3caf01a48f09dde91d32ee5af1fff0bd2a1d6a5a5a86 SHA512 fe76840ce7d4d37416e51370c1788af1356c8f978683aee5a8d90a240e65905fab1aea7ca3811032f5f4f23d773971ff0614df20215183a12f9f6a1d2caaf7ed EBUILD util-linux-2.39.2-r1.ebuild 10950 BLAKE2B 2be9d6b75028e7e0a1d6e08ae1d03abba6e359b3be8bbbe27cb2863b0d435f4a48e50a2428b78cd3fe46fd3517a36c71c11ba7ea197a3a9878f866f1a75c4261 SHA512 8845c504ebcf28031a9239ba26cc2d9ec03538cd92782ca72ebc402a06673a0a424a5d01de457e82cd49f942888f953756576de7751f396aa9a3def79d95f3f9 -EBUILD util-linux-2.39.3-r1.ebuild 10954 BLAKE2B 9244cb6b8928210b1d08c3a044f51245775a9bb7f0f3719976418be1d54e19541a2a29e0d2a3ee5d1aab414a87a7eb97fa123198463cc4039b6f766fb5346042 SHA512 ddfaa770ab53ddb577204d15e1299c3347602a155d0f6eb98be14a4ab733e0d15c2af63cb845d7af9674634688be571c85fbd5f3ac646f4c52e9174d9b8f5034 -EBUILD util-linux-9999.ebuild 10482 BLAKE2B ada4654d66dac470020c274948442fd531e5221005e0c01f4864c9acfb330b465382656ef1b0152cab1afe0bf815219ca6ecb0fe2056496b1d533fe0373c0b38 SHA512 e95f952e501cb0aa9b8699a5ef13eb43732571f221b2bb6e2f522ae83cc858d2b0276af9c83d67c684d27390e599534bcdfdf5adf188a88fac4e1accf4ffe197 +EBUILD util-linux-2.39.3-r2.ebuild 10824 BLAKE2B 1c84b199627cf7c1286d57814158d7235e2c6977b377e08be3bc8999e75a91c1dbbf486b250724f5fb244019040a9797594feff28e42ea4cdd23b7d19e83dfdd SHA512 72df7f6ab7b8b3382db709d0762ecfe24670776cdaee4f88ff3965f3c4b2c12f3292ff799f24054901c7668f44e2cfef442b3a683500cfdfe77c09f4e54e535b +EBUILD util-linux-9999.ebuild 10471 BLAKE2B 00c7b828d20666fa23bbc289766af5170ee8cacd9afa37b9ee7570d2e5f91d29b1a92276df50d74eeabbf5b528b024cb3a3d5bb91f0de8f70f61eebec561a517 SHA512 696e6acf62b7ace446ccca46ba05d94a23f4aa80fbb21cf6c06f3f3a75e3afea88c819791a5e8bcd06a2bec0624c88a13edd41497dbf6776b354ba99c87c2f5a MISC metadata.xml 1553 BLAKE2B 1c4a18f6d91be4c90bf2505745cae42f6d249a1295c6a46fc1b8ea08297842b4d3a2aa232e679a167af9fef26730ed71f651b2f71b58cbfe66bd7a5cd3743c3b SHA512 e01d390c983ac47b9a6684f70b11cc796cde1355ae7d4c12406b3d6fc5b0897a9471720844e74fceee1648f4c7d685e6b12f157adc1ad951506acefb7441635c diff --git a/sys-apps/util-linux/util-linux-2.39.3-r1.ebuild b/sys-apps/util-linux/util-linux-2.39.3-r1.ebuild deleted file mode 100644 index 6d2aa61d4365..000000000000 --- a/sys-apps/util-linux/util-linux-2.39.3-r1.ebuild +++ /dev/null @@ -1,413 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) - -inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \ - pam python-r1 multilib-minimal multiprocessing systemd - -MY_PV="${PV/_/-}" -MY_P="${PN}-${MY_PV}" - -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git" - inherit autotools git-r3 -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/karelzak.asc - inherit verify-sig - - if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos" - fi - - SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz" - SRC_URI+=" verify-sig? ( https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.sign )" -fi - -S="${WORKDIR}/${MY_P}" - -DESCRIPTION="Various useful Linux utilities" -HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/util-linux/util-linux" - -LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain" -SLOT="0" -IUSE="audit build caps +cramfs cryptsetup fdformat +hardlink kill +logger magic ncurses nls pam python +readline rtas selinux slang static-libs +su +suid systemd test tty-helpers udev unicode" - -# Most lib deps here are related to programs rather than our libs, -# so we rarely need to specify ${MULTILIB_USEDEP}. -RDEPEND=" - virtual/libcrypt:= - audit? ( >=sys-process/audit-2.6:= ) - caps? ( sys-libs/libcap-ng ) - cramfs? ( sys-libs/zlib:= ) - cryptsetup? ( >=sys-fs/cryptsetup-2.1.0 ) - hardlink? ( dev-libs/libpcre2:= ) - ncurses? ( - sys-libs/ncurses:=[unicode(+)?] - magic? ( sys-apps/file:0= ) - ) - nls? ( virtual/libintl[${MULTILIB_USEDEP}] ) - pam? ( sys-libs/pam ) - python? ( ${PYTHON_DEPS} ) - readline? ( sys-libs/readline:0= ) - rtas? ( sys-libs/librtas ) - selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] ) - slang? ( sys-libs/slang ) - !build? ( - systemd? ( sys-apps/systemd ) - udev? ( virtual/libudev:= ) - ) -" -BDEPEND=" - virtual/pkgconfig - nls? ( - app-text/po4a - sys-devel/gettext - ) - test? ( app-alternatives/bc ) -" -DEPEND=" - ${RDEPEND} - virtual/os-headers - acct-group/root -" -RDEPEND+=" - hardlink? ( !app-arch/hardlink ) - logger? ( !>=app-admin/sysklogd-2.0[logger] ) - kill? ( - !sys-apps/coreutils[kill] - !sys-process/procps[kill] - ) - su? ( - !=sys-apps/shadow-4.7-r2[su] - ) - !net-wireless/rfkill -" - -if [[ ${PV} == 9999 ]] ; then - # Required for man-page generation - BDEPEND+=" dev-ruby/asciidoctor" -else - BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-karelzak-20230517 )" -fi - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )" -RESTRICT="!test? ( test )" - -PATCHES=( - "${FILESDIR}"/${PN}-2.39.2-fincore-test.patch - "${FILESDIR}"/${PN}-2.39.2-backport-pr2251.patch - "${FILESDIR}"/${PN}-2.39.2-backport-1d4456d.patch -) - -pkg_pretend() { - if use su && ! use suid ; then - elog "su will be installed as suid despite USE=-suid (bug #832092)" - elog "To use su without suid, see e.g. Portage's suidctl feature." - fi -} - -src_unpack() { - if [[ ${PV} == 9999 ]] ; then - git-r3_src_unpack - return - fi - - if use verify-sig ; then - mkdir "${T}"/verify-sig || die - pushd "${T}"/verify-sig &>/dev/null || die - - # Upstream sign the decompressed .tar - # Let's do it separately in ${T} then cleanup to avoid external - # effects on normal unpack. - cp "${DISTDIR}"/${MY_P}.tar.xz . || die - xz -d ${MY_P}.tar.xz || die - verify-sig_verify_detached ${MY_P}.tar "${DISTDIR}"/${MY_P}.tar.sign - - popd &>/dev/null || die - rm -r "${T}"/verify-sig || die - fi - - default -} - -src_prepare() { - default - - if use test ; then - # Known-failing tests - # TODO: investigate these - local known_failing_tests=( - # Subtest 'options-maximum-size-8192' fails - hardlink/options - - # Fails in sandbox - lsns/ioctl_ns - - lsfd/mkfds-symlink - lsfd/mkfds-rw-character-device - # Fails with network-sandbox at least in nspawn - lsfd/option-inet - utmp/last-ipv6 - ) - - local known_failing_test - for known_failing_test in "${known_failing_tests[@]}" ; do - einfo "Removing known-failing test: ${known_failing_test}" - rm tests/ts/${known_failing_test} || die - done - fi - - if [[ ${PV} == 9999 ]] ; then - po/update-potfiles - eautoreconf - else - elibtoolize - fi -} - -python_configure() { - local myeconfargs=( - "${commonargs[@]}" - --disable-all-programs - --disable-bash-completion - --without-systemdsystemunitdir - --with-python - --enable-libblkid - --enable-libmount - --enable-pylibmount - ) - - mkdir "${BUILD_DIR}" || die - pushd "${BUILD_DIR}" >/dev/null || die - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" - popd >/dev/null || die -} - -multilib_src_configure() { - # The scanf test in a run-time test which fails while cross-compiling. - # Blindly assume a POSIX setup since we require libmount, and libmount - # itself fails when the scanf test fails. bug #531856 - tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms - - # bug #485486 - export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) - # bug #545042 - export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) - - # Undo bad ncurses handling by upstream. Fall back to pkg-config. - # bug #601530 - export NCURSES6_CONFIG=false NCURSES5_CONFIG=false - export NCURSESW6_CONFIG=false NCURSESW5_CONFIG=false - - # Avoid automagic dependency on ppc* - export ac_cv_lib_rtas_rtas_get_sysparm=$(usex rtas) - - # configure args shared by python and non-python builds - local commonargs=( - --localstatedir="${EPREFIX}/var" - --runstatedir="${EPREFIX}/run" - --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" - - # Temporary workaround until ~2.39.2. 2.39.x introduced a big rewrite. - # https://github.com/util-linux/util-linux/issues/2287#issuecomment-1576640373 - --disable-libmount-mountfd-support - ) - - local myeconfargs=( - "${commonargs[@]}" - --with-bashcompletiondir="$(get_bashcompdir)" - --without-python - $(multilib_native_use_enable suid makeinstall-chown) - $(multilib_native_use_enable suid makeinstall-setuid) - $(multilib_native_use_with readline) - $(multilib_native_use_with slang) - $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic') - $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw') - $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses') - $(multilib_native_use_with audit) - $(tc-has-tls || echo --disable-tls) - $(use_enable nls) - $(use_enable nls poman) - $(use_enable unicode widechar) - $(use_enable static-libs static) - $(use_with ncurses tinfo) - $(use_with selinux) - ) - - if use build ; then - myeconfargs+=( - --without-systemd - --without-udev - ) - else - myeconfargs+=( - $(multilib_native_use_with systemd) - $(multilib_native_use_with udev) - ) - fi - - if multilib_is_native_abi ; then - myeconfargs+=( - --disable-chfn-chsh - --disable-login - --disable-newgrp - --disable-nologin - --disable-pylibmount - --disable-raw - --disable-vipw - --enable-agetty - --enable-bash-completion - --enable-line - --enable-partx - --enable-rename - --enable-rfkill - --enable-schedutils - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" - $(use_enable caps setpriv) - $(use_enable cramfs) - $(use_enable fdformat) - $(use_enable hardlink) - $(use_enable kill) - $(use_enable logger) - $(use_enable ncurses pg) - $(use_enable su) - $(use_enable tty-helpers mesg) - $(use_enable tty-helpers wall) - $(use_enable tty-helpers write) - $(use_with cryptsetup) - ) - if [[ ${PV} == *9999 ]] ; then - myeconfargs+=( --enable-asciidoc ) - else - # Upstream is shipping pre-generated man-pages for releases - myeconfargs+=( --disable-asciidoc ) - fi - else - myeconfargs+=( - --disable-all-programs - --disable-asciidoc - --disable-bash-completion - --without-systemdsystemunitdir - --disable-poman - - # build libraries - --enable-libuuid - --enable-libblkid - --enable-libsmartcols - --enable-libfdisk - --enable-libmount - ) - fi - - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" - - if multilib_is_native_abi && use python ; then - python_foreach_impl python_configure - fi -} - -src_configure() { - append-lfs-flags - multilib-minimal_src_configure -} - -python_compile() { - pushd "${BUILD_DIR}" >/dev/null || die - emake all - popd >/dev/null || die -} - -multilib_src_compile() { - emake all - - if multilib_is_native_abi && use python ; then - python_foreach_impl python_compile - fi -} - -python_test() { - pushd "${BUILD_DIR}" >/dev/null || die - emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot" - popd >/dev/null || die -} - -multilib_src_test() { - emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot" - if multilib_is_native_abi && use python ; then - python_foreach_impl python_test - fi -} - -python_install() { - pushd "${BUILD_DIR}" >/dev/null || die - emake DESTDIR="${D}" install - python_optimize - popd >/dev/null || die -} - -multilib_src_install() { - if multilib_is_native_abi && use python ; then - python_foreach_impl python_install - fi - - # This needs to be called AFTER python_install call, bug #689190 - emake DESTDIR="${D}" install - - if multilib_is_native_abi ; then - # Need the libs in / - gen_usr_ldscript -a blkid fdisk mount smartcols uuid - fi -} - -multilib_src_install_all() { - dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*} - - # e2fsprogs-libs didn't install .la files, and .pc work fine - find "${ED}" -name "*.la" -delete || die - - if use pam ; then - # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt - newpamd "${FILESDIR}/runuser.pamd" runuser - newpamd "${FILESDIR}/runuser-l.pamd" runuser-l - - newpamd "${FILESDIR}/su-l.pamd" su-l - fi - - if use su && ! use suid ; then - # Always force suid su, even when USE=-suid, as su is useless - # for the overwhelming-majority case without suid. - # Users who wish to truly have a no-suid su can strip it out - # via e.g. Portage's suidctl or some other hook. - # See bug #832092 - fperms u+s /bin/su - fi - - # Note: - # Bash completion for "runuser" command is provided by same file which - # would also provide bash completion for "su" command. However, we don't - # use "su" command from this package. - # This triggers a known QA warning which we ignore for now to magically - # keep bash completion for "su" command which shadow package does not - # provide. - - local ver=$(tools/git-version-gen .tarballversion) - local major=$(ver_cut 1 ${ver}) - local minor=$(ver_cut 2 ${ver}) - local release=$(ver_cut 3 ${ver}) - export QA_PKGCONFIG_VERSION="${major}.${minor}.${release:-0}" -} - -pkg_postinst() { - if ! use tty-helpers ; then - elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers." - fi - - if [[ -z ${REPLACING_VERSIONS} ]] ; then - elog "The agetty util now clears the terminal by default. You" - elog "might want to add --noclear to your /etc/inittab lines." - fi -} diff --git a/sys-apps/util-linux/util-linux-2.39.3-r2.ebuild b/sys-apps/util-linux/util-linux-2.39.3-r2.ebuild new file mode 100644 index 000000000000..bea51fe15f33 --- /dev/null +++ b/sys-apps/util-linux/util-linux-2.39.3-r2.ebuild @@ -0,0 +1,408 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) + +inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \ + pam python-r1 multilib-minimal multiprocessing systemd + +MY_PV="${PV/_/-}" +MY_P="${PN}-${MY_PV}" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git" + inherit autotools git-r3 +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/karelzak.asc + inherit verify-sig + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos" + fi + + SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz" + SRC_URI+=" verify-sig? ( https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.sign )" +fi + +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Various useful Linux utilities" +HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/util-linux/util-linux" + +LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain" +SLOT="0" +IUSE="audit build caps +cramfs cryptsetup fdformat +hardlink kill +logger magic ncurses nls pam python +readline rtas selinux slang static-libs +su +suid systemd test tty-helpers udev unicode" + +# Most lib deps here are related to programs rather than our libs, +# so we rarely need to specify ${MULTILIB_USEDEP}. +RDEPEND=" + virtual/libcrypt:= + audit? ( >=sys-process/audit-2.6:= ) + caps? ( sys-libs/libcap-ng ) + cramfs? ( sys-libs/zlib:= ) + cryptsetup? ( >=sys-fs/cryptsetup-2.1.0 ) + hardlink? ( dev-libs/libpcre2:= ) + ncurses? ( + sys-libs/ncurses:=[unicode(+)?] + magic? ( sys-apps/file:0= ) + ) + nls? ( virtual/libintl[${MULTILIB_USEDEP}] ) + pam? ( sys-libs/pam ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:0= ) + rtas? ( sys-libs/librtas ) + selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] ) + slang? ( sys-libs/slang ) + !build? ( + systemd? ( sys-apps/systemd ) + udev? ( virtual/libudev:= ) + ) +" +BDEPEND=" + virtual/pkgconfig + nls? ( + app-text/po4a + sys-devel/gettext + ) + test? ( app-alternatives/bc ) +" +DEPEND=" + ${RDEPEND} + virtual/os-headers + acct-group/root +" +RDEPEND+=" + hardlink? ( !app-arch/hardlink ) + logger? ( !>=app-admin/sysklogd-2.0[logger] ) + kill? ( + !sys-apps/coreutils[kill] + !sys-process/procps[kill] + ) + su? ( + !=sys-apps/shadow-4.7-r2[su] + ) + !net-wireless/rfkill +" + +if [[ ${PV} == 9999 ]] ; then + # Required for man-page generation + BDEPEND+=" dev-ruby/asciidoctor" +else + BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-karelzak-20230517 )" +fi + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )" +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.39.2-fincore-test.patch + "${FILESDIR}"/${PN}-2.39.2-backport-pr2251.patch + "${FILESDIR}"/${PN}-2.39.2-backport-1d4456d.patch +) + +pkg_pretend() { + if use su && ! use suid ; then + elog "su will be installed as suid despite USE=-suid (bug #832092)" + elog "To use su without suid, see e.g. Portage's suidctl feature." + fi +} + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + return + fi + + if use verify-sig ; then + mkdir "${T}"/verify-sig || die + pushd "${T}"/verify-sig &>/dev/null || die + + # Upstream sign the decompressed .tar + # Let's do it separately in ${T} then cleanup to avoid external + # effects on normal unpack. + cp "${DISTDIR}"/${MY_P}.tar.xz . || die + xz -d ${MY_P}.tar.xz || die + verify-sig_verify_detached ${MY_P}.tar "${DISTDIR}"/${MY_P}.tar.sign + + popd &>/dev/null || die + rm -r "${T}"/verify-sig || die + fi + + default +} + +src_prepare() { + default + + if use test ; then + # Known-failing tests + # TODO: investigate these + local known_failing_tests=( + # Subtest 'options-maximum-size-8192' fails + hardlink/options + + # Fails in sandbox + lsns/ioctl_ns + + lsfd/mkfds-symlink + lsfd/mkfds-rw-character-device + # Fails with network-sandbox at least in nspawn + lsfd/option-inet + utmp/last-ipv6 + ) + + local known_failing_test + for known_failing_test in "${known_failing_tests[@]}" ; do + einfo "Removing known-failing test: ${known_failing_test}" + rm tests/ts/${known_failing_test} || die + done + fi + + if [[ ${PV} == 9999 ]] ; then + po/update-potfiles + eautoreconf + else + elibtoolize + fi +} + +python_configure() { + local myeconfargs=( + "${commonargs[@]}" + --disable-all-programs + --disable-bash-completion + --without-systemdsystemunitdir + --with-python + --enable-libblkid + --enable-libmount + --enable-pylibmount + ) + + mkdir "${BUILD_DIR}" || die + pushd "${BUILD_DIR}" >/dev/null || die + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + popd >/dev/null || die +} + +multilib_src_configure() { + # The scanf test in a run-time test which fails while cross-compiling. + # Blindly assume a POSIX setup since we require libmount, and libmount + # itself fails when the scanf test fails. bug #531856 + tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms + + # bug #485486 + export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) + # bug #545042 + export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) + + # Undo bad ncurses handling by upstream. Fall back to pkg-config. + # bug #601530 + export NCURSES6_CONFIG=false NCURSES5_CONFIG=false + export NCURSESW6_CONFIG=false NCURSESW5_CONFIG=false + + # Avoid automagic dependency on ppc* + export ac_cv_lib_rtas_rtas_get_sysparm=$(usex rtas) + + # configure args shared by python and non-python builds + local commonargs=( + --localstatedir="${EPREFIX}/var" + --runstatedir="${EPREFIX}/run" + --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" + + # Temporary workaround until ~2.39.2. 2.39.x introduced a big rewrite. + # https://github.com/util-linux/util-linux/issues/2287#issuecomment-1576640373 + --disable-libmount-mountfd-support + ) + + local myeconfargs=( + "${commonargs[@]}" + --with-bashcompletiondir="$(get_bashcompdir)" + --without-python + $(multilib_native_use_enable suid makeinstall-chown) + $(multilib_native_use_enable suid makeinstall-setuid) + $(multilib_native_use_with readline) + $(multilib_native_use_with slang) + $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic') + $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw') + $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses') + $(multilib_native_use_with audit) + $(tc-has-tls || echo --disable-tls) + $(use_enable nls) + $(use_enable nls poman) + $(use_enable unicode widechar) + $(use_enable static-libs static) + $(use_with ncurses tinfo) + $(use_with selinux) + ) + + if use build ; then + myeconfargs+=( + --without-systemd + --without-udev + ) + else + myeconfargs+=( + $(multilib_native_use_with systemd) + $(multilib_native_use_with udev) + ) + fi + + if multilib_is_native_abi ; then + myeconfargs+=( + --disable-chfn-chsh + --disable-login + --disable-newgrp + --disable-nologin + --disable-pylibmount + --disable-raw + --disable-vipw + --enable-agetty + --enable-bash-completion + --enable-line + --enable-partx + --enable-rename + --enable-rfkill + --enable-schedutils + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + $(use_enable caps setpriv) + $(use_enable cramfs) + $(use_enable fdformat) + $(use_enable hardlink) + $(use_enable kill) + $(use_enable logger) + $(use_enable ncurses pg) + $(use_enable su) + $(use_enable tty-helpers mesg) + $(use_enable tty-helpers wall) + $(use_enable tty-helpers write) + $(use_with cryptsetup) + ) + if [[ ${PV} == *9999 ]] ; then + myeconfargs+=( --enable-asciidoc ) + else + # Upstream is shipping pre-generated man-pages for releases + myeconfargs+=( --disable-asciidoc ) + fi + else + myeconfargs+=( + --disable-all-programs + --disable-asciidoc + --disable-bash-completion + --without-systemdsystemunitdir + --disable-poman + + # build libraries + --enable-libuuid + --enable-libblkid + --enable-libsmartcols + --enable-libfdisk + --enable-libmount + ) + fi + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + + if multilib_is_native_abi && use python ; then + python_foreach_impl python_configure + fi +} + +src_configure() { + append-lfs-flags + multilib-minimal_src_configure +} + +python_compile() { + pushd "${BUILD_DIR}" >/dev/null || die + emake all + popd >/dev/null || die +} + +multilib_src_compile() { + emake all + + if multilib_is_native_abi && use python ; then + python_foreach_impl python_compile + fi +} + +python_test() { + pushd "${BUILD_DIR}" >/dev/null || die + emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot" + popd >/dev/null || die +} + +multilib_src_test() { + emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot" + if multilib_is_native_abi && use python ; then + python_foreach_impl python_test + fi +} + +python_install() { + pushd "${BUILD_DIR}" >/dev/null || die + emake DESTDIR="${D}" install + python_optimize + popd >/dev/null || die +} + +multilib_src_install() { + if multilib_is_native_abi && use python ; then + python_foreach_impl python_install + fi + + # This needs to be called AFTER python_install call, bug #689190 + emake DESTDIR="${D}" install +} + +multilib_src_install_all() { + dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*} + + # e2fsprogs-libs didn't install .la files, and .pc work fine + find "${ED}" -name "*.la" -delete || die + + if use pam ; then + # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt + newpamd "${FILESDIR}/runuser.pamd" runuser + newpamd "${FILESDIR}/runuser-l.pamd" runuser-l + + newpamd "${FILESDIR}/su-l.pamd" su-l + fi + + if use su && ! use suid ; then + # Always force suid su, even when USE=-suid, as su is useless + # for the overwhelming-majority case without suid. + # Users who wish to truly have a no-suid su can strip it out + # via e.g. Portage's suidctl or some other hook. + # See bug #832092 + fperms u+s /bin/su + fi + + # Note: + # Bash completion for "runuser" command is provided by same file which + # would also provide bash completion for "su" command. However, we don't + # use "su" command from this package. + # This triggers a known QA warning which we ignore for now to magically + # keep bash completion for "su" command which shadow package does not + # provide. + + local ver=$(tools/git-version-gen .tarballversion) + local major=$(ver_cut 1 ${ver}) + local minor=$(ver_cut 2 ${ver}) + local release=$(ver_cut 3 ${ver}) + export QA_PKGCONFIG_VERSION="${major}.${minor}.${release:-0}" +} + +pkg_postinst() { + if ! use tty-helpers ; then + elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers." + fi + + if [[ -z ${REPLACING_VERSIONS} ]] ; then + elog "The agetty util now clears the terminal by default. You" + elog "might want to add --noclear to your /etc/inittab lines." + fi +} diff --git a/sys-apps/util-linux/util-linux-9999.ebuild b/sys-apps/util-linux/util-linux-9999.ebuild index d7b81f31df52..f0f5f21353c8 100644 --- a/sys-apps/util-linux/util-linux-9999.ebuild +++ b/sys-apps/util-linux/util-linux-9999.ebuild @@ -5,7 +5,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..11} ) -inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \ +inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \ pam python-r1 multilib-minimal multiprocessing systemd MY_PV="${PV/_/-}" @@ -55,8 +55,10 @@ RDEPEND=" rtas? ( sys-libs/librtas ) selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] ) slang? ( sys-libs/slang ) - !build? ( systemd? ( sys-apps/systemd ) ) - udev? ( virtual/libudev:= ) + !build? ( + systemd? ( sys-apps/systemd ) + udev? ( virtual/libudev:= ) + ) " BDEPEND=" virtual/pkgconfig @@ -213,8 +215,6 @@ multilib_src_configure() { $(multilib_native_use_enable suid makeinstall-setuid) $(multilib_native_use_with readline) $(multilib_native_use_with slang) - $(multilib_native_use_with systemd) - $(multilib_native_use_with udev) $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic') $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw') $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses') @@ -228,6 +228,18 @@ multilib_src_configure() { $(use_with selinux) ) + if use build ; then + myeconfargs+=( + --without-systemd + --without-udev + ) + else + myeconfargs+=( + $(multilib_native_use_with systemd) + $(multilib_native_use_with udev) + ) + fi + if multilib_is_native_abi ; then myeconfargs+=( --disable-chfn-chsh @@ -334,11 +346,6 @@ multilib_src_install() { # This needs to be called AFTER python_install call, bug #689190 emake DESTDIR="${D}" install - - if multilib_is_native_abi ; then - # Need the libs in / - gen_usr_ldscript -a blkid fdisk mount smartcols uuid - fi } multilib_src_install_all() { -- cgit v1.2.3