From 8435c842b9e8fbb2bcc80397ab3aa655000459e2 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 3 Jul 2024 08:05:42 +0100 Subject: gentoo auto-resync : 03:07:2024 - 08:05:42 --- sys-apps/Manifest.gz | Bin 51163 -> 51164 bytes sys-apps/coreutils/Manifest | 2 +- sys-apps/coreutils/coreutils-9.5.ebuild | 2 +- sys-apps/flashrom/Manifest | 5 +- .../files/flashrom-1.3.0-llvm-dummyflasher.patch | 11 - .../flashrom/files/flashrom-1.3.0_spi-master.patch | 8 +- sys-apps/flashrom/flashrom-1.3.0-r2.ebuild | 145 ----- sys-apps/flashrom/flashrom-1.3.0-r3.ebuild | 149 +++++ sys-apps/systemd-utils/Manifest | 4 + sys-apps/systemd-utils/systemd-utils-254.14.ebuild | 583 +++++++++++++++++++ sys-apps/systemd-utils/systemd-utils-255.8.ebuild | 621 +++++++++++++++++++++ sys-apps/systemd/Manifest | 4 + sys-apps/systemd/systemd-254.14.ebuild | 536 ++++++++++++++++++ sys-apps/systemd/systemd-255.8.ebuild | 536 ++++++++++++++++++ 14 files changed, 2443 insertions(+), 163 deletions(-) delete mode 100644 sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch delete mode 100644 sys-apps/flashrom/flashrom-1.3.0-r2.ebuild create mode 100644 sys-apps/flashrom/flashrom-1.3.0-r3.ebuild create mode 100644 sys-apps/systemd-utils/systemd-utils-254.14.ebuild create mode 100644 sys-apps/systemd-utils/systemd-utils-255.8.ebuild create mode 100644 sys-apps/systemd/systemd-254.14.ebuild create mode 100644 sys-apps/systemd/systemd-255.8.ebuild (limited to 'sys-apps') diff --git a/sys-apps/Manifest.gz b/sys-apps/Manifest.gz index 5d7bfdf49f28..d2bd265e39df 100644 Binary files a/sys-apps/Manifest.gz and b/sys-apps/Manifest.gz differ diff --git a/sys-apps/coreutils/Manifest b/sys-apps/coreutils/Manifest index f1fd4793ad61..3cf9bff79ac6 100644 --- a/sys-apps/coreutils/Manifest +++ b/sys-apps/coreutils/Manifest @@ -14,6 +14,6 @@ DIST coreutils-9.5.tar.xz.sig 833 BLAKE2B 37c29984bceee0ff3bffde76712f71dbb118c2 EBUILD coreutils-8.32-r1.ebuild 5947 BLAKE2B 19f30ddaa57e16326db783e2396ce653c17c8def86422ac517b45ee3869266a6e8c600d926814720b1b79485f1db34e3d8dbad32dcc5ad285987c53ab2dbab27 SHA512 a552a58864edf6a768933f85b6624f82b3bd1bf94c169acf3577394523c2768d6768d5a141283abac760bdab950a1ea394c8f36cf2c0793b8b9a2a1c6dda9622 EBUILD coreutils-9.4-r1.ebuild 8494 BLAKE2B fdf0bda691689ad97a0c938d91d09f787a8c39f17e99af3ef5720b9aa42f1cd087543fded417d403eac48515095e5a80e93f24037a37e938219696d0407c7f1a SHA512 b360a66ff906e07171ecc124ace3809388154756da4d6f5c19f8f8152d039bb21e3fbdd2db785c4323a98fb8057acb292b044b08acaf4d801f67342ff927916b EBUILD coreutils-9.4.ebuild 8396 BLAKE2B 726efb986d7746043c9cdff74c12a66ff74b7910ec5f4a9b437c644132589155c0351df548e38c8eec2f5681bf1906594aebac6b5611880f2d7d80eac3f5b888 SHA512 4ec7e3b01025800a50bc1b5f772ab621411c142891e65cd77c4bc7d163962ac10e13d66e3add569a4caa78d873afbde8f662151f330768af49f5a45fb2b07732 -EBUILD coreutils-9.5.ebuild 8452 BLAKE2B 264bb7d2f09bc53f6224b54badb2a7099232f09c58332b1fa7299fa8e1f639870ddb876c139e2f90e90e0a89e7294a75fdf03c73a0a8aed8070f370cff7243cd SHA512 8a106a9cadf65840a93f50fe7b6abdb82be056624c729d657cfa5eceec89e88bda4df325b500424095ac0c17afd582ae665961b8ba697b4b6089f1d27e24b748 +EBUILD coreutils-9.5.ebuild 8449 BLAKE2B 31a82e6309a20e1d237997a6f4d989c172db42e741ecb3c9e1db3dfdc56029ed49875fcd68a58efc7b9a52dd0084d08531e91ce594453b13dd7ef2f86419f9ff SHA512 ba24a87db5c49f55973ab3a0abbaa0e90f23337785df8d486cf3242da3bf9cf4126c7f060b7da572a34b61e0ff4e3db21f6c9795b0d497f35b8bf75b9bcfaa5f EBUILD coreutils-9999.ebuild 8358 BLAKE2B 95219e83ffe8a143b33eb7015539240f1480f922e9817b3dc5b8e8d12d7908ec77158361957cefdfb3146ce95f5849b5ef7eb874c74eeec21fe89c79b058fc61 SHA512 385c4aa80c35ccbfdf64b418a1adba4acd671603f9579d95bc05f10f51cb3904857c7f0e718d889e86601bb95f559f51e2a1aa23068959233465e66422ac5073 MISC metadata.xml 1093 BLAKE2B 68a653fe54fc668c7f2c7c01904cfca5a071192de4370dcbba427e673f8e9ec33b5104a868a5493117ef24e277446181383140c621b105689797aec4e077b86e SHA512 bf8f2653a1a81edb6e4090b127c5660e0c5ab41a33c985dea1b5cb05c6656b04f42084ce4e561f4550c3e54630893314d3084011c673e7d5aded022be1c065d1 diff --git a/sys-apps/coreutils/coreutils-9.5.ebuild b/sys-apps/coreutils/coreutils-9.5.ebuild index 0b4053a9b3d9..3e451f36d7cb 100644 --- a/sys-apps/coreutils/coreutils-9.5.ebuild +++ b/sys-apps/coreutils/coreutils-9.5.ebuild @@ -33,7 +33,7 @@ else verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig ) " - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~x86-linux" + KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~x86-linux" fi SRC_URI+=" !vanilla? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_PATCH}.tar.xz )" diff --git a/sys-apps/flashrom/Manifest b/sys-apps/flashrom/Manifest index 465d25b1ac8a..1fd7c807a536 100644 --- a/sys-apps/flashrom/Manifest +++ b/sys-apps/flashrom/Manifest @@ -1,8 +1,7 @@ AUX flashrom-1.3.0-c99.patch 2134 BLAKE2B d1f0216a5281719972208d22ae31ca19fd6e34d10f3e2c9fb9e9633ea04fe989fd9fbe47939b2f1a9a51f99dd7ca450c479ad3abbcda9f61488d3fd8b4ee1209 SHA512 5c1c8a9663f1d584a4a27a8826062127be9ac2737d40a41c90a3e955c293c7151ed6038cbeaf41cdcb5b28ec654024e9d7ec83f7a22a3c7128cf0074b57f1adb AUX flashrom-1.3.0-libflashrom.patch 935 BLAKE2B e982b5872a9588cf7b792ff533911e86cc849180ff79b00c1a9469368f9c8ea2c843de90c7e59128c3c76c414c8376811ceccf5776fb520d3b39d23a3229995a SHA512 dce40f9ab1624942888d2db62169147281aadba448d12e54484b5b14e5df49f62f39b742ac6baf38f13328332336c5e40e8c7b2f964f0ebd22e9f3685a22240c -AUX flashrom-1.3.0-llvm-dummyflasher.patch 316 BLAKE2B 80d496d47faec89b24de8468c78b33ec94f7b4df76a1484f4a6f5f084be257049fdf7c7fde9777a8401cce82dc7965d999b212a0758398078f131ca8331a3317 SHA512 b4992f6906fb8d6302b2f383522132bd71daacc51942fbf8468999c259ea2df34b1c273460017323f74ec3f0793b0ae6a0df55bf77eff41260ad55defd6ab8a5 -AUX flashrom-1.3.0_spi-master.patch 9106 BLAKE2B 594a921aa48ceb67a6370080a0b51665efde24844e3523eaa84d69d49a1384272553bd5dae0642dd8540e13ba67e6d8feb2ac6edfc95949bd0edd8a2eaa164c8 SHA512 78d08c853d9dbe75610b5b0ec14df753a0780bf19309c0d9be34ebfdc4c364b8875a183307da6394456becd19b22f8987569feb9c718ca123764539ef0e52444 +AUX flashrom-1.3.0_spi-master.patch 9287 BLAKE2B 5e85ec4ce06edce61cfaa00a7dc5e954c76f4d404fb096009f14c11771719996679d185a0271ffcfc7518bc3e93b3264c1cc9c3cc61796a651df7a3a6027fef6 SHA512 b97e4546692273e787c8e1f8f01074978484ef8dab4d13887d58e60d3c643368bf853c7ee2a883c8aecdff432281f3539ace3d08253c84c8405cbfbecf9187bc DIST flashrom-v1.3.0.tar.bz2 489782 BLAKE2B e6d2284d83171b003b434251f060fa44edf32ecfd3d397bd4ba39b74c6a0b5c9d1659b703dd6b632b63aa4bf27d08c8aeece72920199712c6a4ae160b2eb3a8a SHA512 73b6e00bd3bc66c98d4ad53966a65b19d3d92f07d7b210d69e041d6f5788605b9791a9bf7aec0a52e13d19fcb62c4bdaf4bab9f805fc31468393ca313129a77b EBUILD flashrom-1.3.0-r1.ebuild 3316 BLAKE2B 8bf9cd5852d5802b40da3446b865608f3a33e8e843acdd548ef3d1a9b1b969bad78f81c2321766b631c5c2ce6d03a508b9082622a0d92863587db49a600673e0 SHA512 508611ca0f0d59062db946fb9d3722db241aa81a78922c1a2ac37490e7ff605e480d301577d455ff2cf682f3daa389106020178def57b7bdfcc9f5e71caaa9d3 -EBUILD flashrom-1.3.0-r2.ebuild 3623 BLAKE2B 19515ed1c5a0bd95229d11e672e070e448f412eef9c3460439498a99304bd02f754cd868ca3f7a800999720b266851e21d1e66a5992768572ee63075c1679051 SHA512 6e85a2d7756a636ffb34f6db4d28daf5681ce994ade3fd84e7ecdc4feceb1718cd4e4c23b1823b1fd8127d7511cc4c889a58906b4ade2e10c17e032f459baff4 +EBUILD flashrom-1.3.0-r3.ebuild 3698 BLAKE2B d5dab9b199d182b226ebb88343fdf13cdbd2f642b8bf11ca629ca38f4e4aa4a9d638ef7e321cac1b82937149a0ebb2e83e711d9ec28c5c90ffe93c9268f05314 SHA512 bcc4a9bc9a2441bdc71313da3c1beb71723bbb0af94e25d747f84dc9110802be8fcd058671b91d33a1879353f346a154f827a14c9eeb2c7e143863a90bd3e875 MISC metadata.xml 5075 BLAKE2B a698e5756c49254e9365a613dc418ac9ba27a0f54d5a0e4550d89c9938b32dbe01f0be03a296bc08973cf31cda4e7af33cd681c81869c8ab91aced6c760d9638 SHA512 6a8d44d70af1d630f791648c05023e059d97e799bf1112e1cdffe3ff1167e52edfe7fd0d9a5aa6834844d305827ef2fa92264277c4c63c6015641da36b028d81 diff --git a/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch b/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch deleted file mode 100644 index 22243937b960..000000000000 --- a/sys-apps/flashrom/files/flashrom-1.3.0-llvm-dummyflasher.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/dummyflasher.c -+++ b/dummyflasher.c -@@ -930,7 +930,7 @@ - .read = default_spi_read, - .write_256 = dummy_spi_write_256, - .write_aai = default_spi_write_aai, -- .probe_opcode = dummy_spi_probe_opcode, -+ .probe_opcode = &dummy_spi_probe_opcode, - }; - - static const struct par_master par_master_dummyflasher = { diff --git a/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch b/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch index 72298f8cfca3..ae2641af4a0a 100644 --- a/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch +++ b/sys-apps/flashrom/files/flashrom-1.3.0_spi-master.patch @@ -1,6 +1,10 @@ Backported upstream commit https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f396719 +This commit didn't apply straight because const/non-const changes were +made inbetween, so there are some additional changes to silence more +picky compilers like https://bugs.gentoo.org/915617 + --- a/bitbang_spi.c +++ b/bitbang_spi.c @@ -148,7 +148,6 @@ @@ -77,7 +81,7 @@ https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f39 int spi_aai_write(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); int spi_chip_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); int spi_chip_read(struct flashctx *flash, uint8_t *buf, unsigned int start, int unsigned len); -+bool spi_probe_opcode(const struct flashctx *flash, uint8_t opcode); ++bool spi_probe_opcode(struct flashctx *flash, uint8_t opcode); /* spi25.c */ int probe_spi_rdid(struct flashctx *flash); @@ -235,7 +239,7 @@ https://github.com/flashrom/flashrom/commit/e1f30bbce7a603d518ecec9d7e6885719f39 } -bool default_spi_probe_opcode(struct flashctx *flash, uint8_t opcode) -+bool spi_probe_opcode(const struct flashctx *flash, uint8_t opcode) ++bool spi_probe_opcode(struct flashctx *flash, uint8_t opcode) { - return true; + if (!flash->mst->spi.probe_opcode) diff --git a/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild b/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild deleted file mode 100644 index 0607f1d76a6d..000000000000 --- a/sys-apps/flashrom/flashrom-1.3.0-r2.ebuild +++ /dev/null @@ -1,145 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit meson - -MY_P="${PN}-v${PV}" - -DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips" -HOMEPAGE="https://flashrom.org/Flashrom" -SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2" - -S="${WORKDIR}"/${MY_P} - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" - -# The defaults should match the upstream "default" flags in meson.build -IUSE_PROGRAMMERS=" - atahpt - atapromise - +atavia - +buspirate-spi - +ch341a-spi - +dediprog - +developerbox-spi - +digilent-spi - +dirtyjtag-spi - +drkaiser - +dummy - +ft2232-spi - +gfxnvidia - +internal - +it8212 - jlink-spi - +linux-mtd - +linux-spi - mediatek-i2c-spi - mstarddc-spi - +nic3com - +nicintel - +nicintel-eeprom - +nicintel-spi - nicnatsemi - +nicrealtek - +ogp-spi - parade-lspcon - +pickit2-spi - +pony-spi - +raiden-debug-spi - +rayer-spi - realtek-mst-i2c-spi - +satamv - +satasii - +serprog - +stlinkv3-spi - +usbblaster-spi" -IUSE="${IUSE_PROGRAMMERS} +internal-dmi test tools" - -RESTRICT="!test? ( test )" - -COMMON="atahpt? ( sys-apps/pciutils ) - atapromise? ( sys-apps/pciutils ) - atavia? ( sys-apps/pciutils ) - ch341a-spi? ( virtual/libusb:1 ) - dediprog? ( virtual/libusb:1 ) - developerbox-spi? ( virtual/libusb:1 ) - digilent-spi? ( virtual/libusb:1 ) - dirtyjtag-spi? ( virtual/libusb:1 ) - drkaiser? ( sys-apps/pciutils ) - ft2232-spi? ( dev-embedded/libftdi:1= ) - gfxnvidia? ( sys-apps/pciutils ) - internal? ( sys-apps/pciutils ) - it8212? ( sys-apps/pciutils ) - jlink-spi? ( dev-embedded/libjaylink ) - nic3com? ( sys-apps/pciutils ) - nicintel? ( sys-apps/pciutils ) - nicintel-eeprom? ( sys-apps/pciutils ) - nicintel-spi? ( sys-apps/pciutils ) - nicnatsemi? ( sys-apps/pciutils ) - nicrealtek? ( sys-apps/pciutils ) - ogp-spi? ( sys-apps/pciutils ) - pickit2-spi? ( virtual/libusb:1 ) - raiden-debug-spi? ( virtual/libusb:1 ) - satamv? ( sys-apps/pciutils ) - satasii? ( sys-apps/pciutils ) - stlinkv3-spi? ( virtual/libusb:1 ) - usbblaster-spi? ( dev-embedded/libftdi:1= )" -RDEPEND="${COMMON} - !internal-dmi? ( sys-apps/dmidecode )" -DEPEND="${COMMON} - sys-apps/diffutils - linux-mtd? ( sys-kernel/linux-headers ) - linux-spi? ( sys-kernel/linux-headers ) - mediatek-i2c-spi? ( sys-kernel/linux-headers ) - mstarddc-spi? ( sys-kernel/linux-headers ) - parade-lspcon? ( sys-kernel/linux-headers ) - realtek-mst-i2c-spi? ( sys-kernel/linux-headers )" -BDEPEND="test? ( dev-util/cmocka )" - -PATCHES=( - "${FILESDIR}"/${PN}-1.3.0_spi-master.patch - "${FILESDIR}"/${PN}-1.3.0-c99.patch - "${FILESDIR}"/${PN}-1.3.0-llvm-dummyflasher.patch - "${FILESDIR}"/${PN}-1.3.0-libflashrom.patch -) - -DOCS=( README Documentation/ ) - -src_prepare() { - default - if use elibc_musl ; then - # skip failing test #908539 - sed -i -e 's/-DCONFIG_LINUX_MTD=1/-UCONFIG_LINUX_MTD/' \ - meson.build || die - fi -} - -src_configure() { - local programmers="$(printf '%s,' $(for flag in ${IUSE_PROGRAMMERS//+/}; do usev ${flag}; done))" - programmers="${programmers%,}" - programmers="${programmers//-/_}" - local emesonargs=( - -Dclassic_cli="enabled" - -Dprogrammer="${programmers}" - $(meson_feature test tests) - $(meson_feature tools ich_descriptors_tool) - ) - meson_src_configure -} - -src_install() { - meson_src_install - - # Upstream requires libflashrom.a to be present at build time because the classic CLI - # executable uses internal symbols from that library. Therefore, we let it be built - # but keep it out of the installed tree. - find "${ED}" -name '*.a' -delete || die - - if use tools; then - dosbin "${BUILD_DIR}"/util/ich_descriptors_tool/ich_descriptors_tool - fi -} diff --git a/sys-apps/flashrom/flashrom-1.3.0-r3.ebuild b/sys-apps/flashrom/flashrom-1.3.0-r3.ebuild new file mode 100644 index 000000000000..ce98d59584d8 --- /dev/null +++ b/sys-apps/flashrom/flashrom-1.3.0-r3.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson + +MY_P="${PN}-v${PV}" + +DESCRIPTION="Utility for reading, writing, erasing and verifying flash ROM chips" +HOMEPAGE="https://flashrom.org/Flashrom" +SRC_URI="https://download.flashrom.org/releases/${MY_P}.tar.bz2" + +S="${WORKDIR}"/${MY_P} + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" + +# The defaults should match the upstream "default" flags in meson.build +IUSE_PROGRAMMERS=" + atahpt + atapromise + +atavia + +buspirate-spi + +ch341a-spi + +dediprog + +developerbox-spi + +digilent-spi + +dirtyjtag-spi + +drkaiser + +dummy + +ft2232-spi + +gfxnvidia + +internal + +it8212 + jlink-spi + +linux-mtd + +linux-spi + mediatek-i2c-spi + mstarddc-spi + +nic3com + +nicintel + +nicintel-eeprom + +nicintel-spi + nicnatsemi + +nicrealtek + +ogp-spi + parade-lspcon + +pickit2-spi + +pony-spi + +raiden-debug-spi + +rayer-spi + realtek-mst-i2c-spi + +satamv + +satasii + +serprog + +stlinkv3-spi + +usbblaster-spi" +IUSE="${IUSE_PROGRAMMERS} +internal-dmi test tools" + +RESTRICT="!test? ( test )" + +COMMON="atahpt? ( sys-apps/pciutils ) + atapromise? ( sys-apps/pciutils ) + atavia? ( sys-apps/pciutils ) + ch341a-spi? ( virtual/libusb:1 ) + dediprog? ( virtual/libusb:1 ) + developerbox-spi? ( virtual/libusb:1 ) + digilent-spi? ( virtual/libusb:1 ) + dirtyjtag-spi? ( virtual/libusb:1 ) + drkaiser? ( sys-apps/pciutils ) + ft2232-spi? ( dev-embedded/libftdi:1= ) + gfxnvidia? ( sys-apps/pciutils ) + internal? ( sys-apps/pciutils ) + it8212? ( sys-apps/pciutils ) + jlink-spi? ( dev-embedded/libjaylink ) + nic3com? ( sys-apps/pciutils ) + nicintel? ( sys-apps/pciutils ) + nicintel-eeprom? ( sys-apps/pciutils ) + nicintel-spi? ( sys-apps/pciutils ) + nicnatsemi? ( sys-apps/pciutils ) + nicrealtek? ( sys-apps/pciutils ) + ogp-spi? ( sys-apps/pciutils ) + pickit2-spi? ( virtual/libusb:1 ) + raiden-debug-spi? ( virtual/libusb:1 ) + satamv? ( sys-apps/pciutils ) + satasii? ( sys-apps/pciutils ) + stlinkv3-spi? ( virtual/libusb:1 ) + usbblaster-spi? ( dev-embedded/libftdi:1= )" +RDEPEND="${COMMON} + !internal-dmi? ( sys-apps/dmidecode )" +DEPEND="${COMMON} + sys-apps/diffutils + linux-mtd? ( sys-kernel/linux-headers ) + linux-spi? ( sys-kernel/linux-headers ) + mediatek-i2c-spi? ( sys-kernel/linux-headers ) + mstarddc-spi? ( sys-kernel/linux-headers ) + parade-lspcon? ( sys-kernel/linux-headers ) + realtek-mst-i2c-spi? ( sys-kernel/linux-headers )" +BDEPEND="test? ( dev-util/cmocka )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.3.0_spi-master.patch + "${FILESDIR}"/${PN}-1.3.0-c99.patch + "${FILESDIR}"/${PN}-1.3.0-libflashrom.patch +) + +DOCS=( README Documentation/ ) + +src_prepare() { + default + if use elibc_musl ; then + # skip failing test #908539 + sed -i -e 's/-DCONFIG_LINUX_MTD=1/-UCONFIG_LINUX_MTD/' \ + meson.build || die + fi + + # enable warnings + sed -i \ + -e 's:^warning_flags = \[:warning_flags = \[ '"'-Wall'"' \]\nno = \[:' \ + meson.build || die +} + +src_configure() { + local programmers="$(printf '%s,' $(for flag in ${IUSE_PROGRAMMERS//+/}; do usev ${flag}; done))" + programmers="${programmers%,}" + programmers="${programmers//-/_}" + local emesonargs=( + -Dclassic_cli="enabled" + -Dprogrammer="${programmers}" + $(meson_feature test tests) + $(meson_feature tools ich_descriptors_tool) + ) + meson_src_configure +} + +src_install() { + meson_src_install + + # Upstream requires libflashrom.a to be present at build time because the classic CLI + # executable uses internal symbols from that library. Therefore, we let it be built + # but keep it out of the installed tree. + find "${ED}" -name '*.a' -delete || die + + if use tools; then + dosbin "${BUILD_DIR}"/util/ich_descriptors_tool/ich_descriptors_tool + fi +} diff --git a/sys-apps/systemd-utils/Manifest b/sys-apps/systemd-utils/Manifest index 4774957439ac..28246363b6f1 100644 --- a/sys-apps/systemd-utils/Manifest +++ b/sys-apps/systemd-utils/Manifest @@ -12,9 +12,13 @@ DIST systemd-musl-patches-255.6.tar.gz 31529 BLAKE2B 14b737968168238c62a776052bd DIST systemd-stable-254.10.tar.gz 14428960 BLAKE2B 488c27b9657ec7452f876ab6c18bbfe711f1351afa022801f5a646f2dd1d76d63c17e52e6ebf43b38a76807907287b654a7eaca3afdb0688f5b05839e98ad727 SHA512 0c127d38d0ade8655ae12172c2edbaa8af68bd29f42d965b988d75e74626846ae859bcf0b39b535c9a99ad8c709ad7575ed4d5ea5bc95ce8729e3caafdb32b70 DIST systemd-stable-254.12.tar.gz 14529517 BLAKE2B ed6e4a78363930840e505c4bd789d1d44c238f30d3c0768d435e1cacb43ac3ab07e0dc9085546b4142152bbb4ceb4e2c0a9560e74e1a2b8c09fc885620695e73 SHA512 fa3679915392e641bed73ccb48f5def386ab13ba5ff7efdac952214193c3311543bec4c4370d6880f9599f63e377506b343805c3c56b7dde7eb5e3bbc0dc7a87 DIST systemd-stable-254.13.tar.gz 14533359 BLAKE2B 6f37bf5f1868840f122652fdca270e1f97ba78f8280f45100b1b5b33c3531cf79587b596ccbbe594f1e623d918c1fdf19f2231d677e27b5421f1852fbe3225b3 SHA512 852cbc992128dc3ab6ded4215c2540fa3c0b7c7ad98e54036f3981d77a2162f5393ee50960773419133e0d584844af329d3726f45829a56c00b1827e33edf3e1 +DIST systemd-stable-254.14.tar.gz 14533129 BLAKE2B 1db933e0f0cdfcabc7a4f3ecfe6e0cf1b10d4b2fa0aee02629d786cb022b18c501a0c48445f9b537a003af22ee64803271fa007e3889b833ec119b4d1346c410 SHA512 bd4e5ce7529f488f7e7199a1ff5976c10cf8e7040893dcf312a23dda5e32eb5c7f40c9ce3676f4a60d5d39197efc3bb1f2a577004b1654d1d0be9a1c617cfcdb DIST systemd-stable-255.7.tar.gz 15068684 BLAKE2B 6fb5415d9e013bc8695ef837affce7063d214027529412a25ea73eb25473d1f07cff6ad3ea3ea18b7bbf9d73d2bb8e39838e1aeb2a14d016b3b47e4ba24d02d0 SHA512 1cd2a00f292751b923bd93c60bdcdd66d82792b45e32dce11d77e2b3b6fc5c8ba4c5db386652deffa8c24e75032af1a745700ba91f1726e249f0c447daf85c2a +DIST systemd-stable-255.8.tar.gz 15070471 BLAKE2B b437404af7fd73ef527f80d9d14d46a781444103d1756c27494ecf2664c9c5efe1169c85b91148a3bf190dc7c5e31cf8d42a13c84102d101ea7e4a0570e8d719 SHA512 7692be761a393924669a90f6f343998a85707a9daa3ce169ce67f62ae2a39338c2c3496066b2659c6500849104fab0529fca5704a3eb32375f2f44131216d1f1 EBUILD systemd-utils-254.10-r1.ebuild 13355 BLAKE2B 9e88dd7b2bc7c280aa4430d9e4ec9bea942b365408c775d0e5a53ae9d6b1eee3f79bada47ac83f3f3b4bd0fa5245b3158fc48e4b5003ba15bb7c3eb9179c9bc2 SHA512 86199fe50859269f739b37d2fa6d345b17ad90edd0aefd203f3beafdfd36c79affb16a61546da919e984836fcaded2831bd406f7123b0a84ee50ef65ac4d8b5c EBUILD systemd-utils-254.12.ebuild 13363 BLAKE2B 21cc042bc1041556b71f12c160a8fd5b23f31a9598d6a85b13b77ccd01b5b0e34350bde236f151662873734003fe2fd5a001c746370c16fb8308fb51e283d843 SHA512 9660bcde5c1a06aa03dd7bc90aad59421eeea53757ed1edc2d674c1cddc0addf6b7670520426bd569c5f3e309f66ab641362c260c1fbdfdd20fb10198032677a EBUILD systemd-utils-254.13.ebuild 13355 BLAKE2B 9e88dd7b2bc7c280aa4430d9e4ec9bea942b365408c775d0e5a53ae9d6b1eee3f79bada47ac83f3f3b4bd0fa5245b3158fc48e4b5003ba15bb7c3eb9179c9bc2 SHA512 86199fe50859269f739b37d2fa6d345b17ad90edd0aefd203f3beafdfd36c79affb16a61546da919e984836fcaded2831bd406f7123b0a84ee50ef65ac4d8b5c +EBUILD systemd-utils-254.14.ebuild 13363 BLAKE2B 21cc042bc1041556b71f12c160a8fd5b23f31a9598d6a85b13b77ccd01b5b0e34350bde236f151662873734003fe2fd5a001c746370c16fb8308fb51e283d843 SHA512 9660bcde5c1a06aa03dd7bc90aad59421eeea53757ed1edc2d674c1cddc0addf6b7670520426bd569c5f3e309f66ab641362c260c1fbdfdd20fb10198032677a EBUILD systemd-utils-255.7-r4.ebuild 14239 BLAKE2B 9eb4a58556fb3bbeb3e53dfb375c3b757d0e0b206261eead1e74fea79d9e58707d80bafbe5d34443df3233e10bd26b8c2cff26a7cab26fcbd474eb7717fff334 SHA512 3662b02df1eb89d642087d017c99a8784894ad60f021797f26609dc3eeed0fe7989eaef006b9b65bf139a3a9f452be10005da2cb9ee6a967a199b5dc685e50bc +EBUILD systemd-utils-255.8.ebuild 14239 BLAKE2B 9eb4a58556fb3bbeb3e53dfb375c3b757d0e0b206261eead1e74fea79d9e58707d80bafbe5d34443df3233e10bd26b8c2cff26a7cab26fcbd474eb7717fff334 SHA512 3662b02df1eb89d642087d017c99a8784894ad60f021797f26609dc3eeed0fe7989eaef006b9b65bf139a3a9f452be10005da2cb9ee6a967a199b5dc685e50bc MISC metadata.xml 888 BLAKE2B b799e1d62a1208dbbec1a1cfb47592b069d5c79cb18efffef922c72b0d61e30938d26c6f4e0d3951f9c327601dd71de14062dad0a47e6b84a61b1a8b125f1a6b SHA512 6debd964f9c127ba4332e0c0b86e506d3cf10cbe3cd45442bf7955b16e790a9eccdd928d473b3722b11b4a75d34fe5bb91f4867a5dc92e786ba73d9ec3f54712 diff --git a/sys-apps/systemd-utils/systemd-utils-254.14.ebuild b/sys-apps/systemd-utils/systemd-utils-254.14.ebuild new file mode 100644 index 000000000000..d76d79f1f07f --- /dev/null +++ b/sys-apps/systemd-utils/systemd-utils-254.14.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-r1" +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 + src/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 + src/kernel-install/60-ukify.install + man/ukify.1 + ) + fi + fi + if use udev; then + targets+=( + libudev + 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 + 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 + dobashcomp shell-completion/bash/bootctl + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/{_bootctl,_kernel-install} + fi + if use kernel-install; then + exeinto usr/lib/kernel/install.d + doexe src/kernel-install/*.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/x11.conf + doins "${FILESDIR}"/{legacy,tmp}.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-255.8.ebuild b/sys-apps/systemd-utils/systemd-utils-255.8.ebuild new file mode 100644 index 000000000000..523af66c5d3b --- /dev/null +++ b/sys-apps/systemd-utils/systemd-utils-255.8.ebuild @@ -0,0 +1,621 @@ +# 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 ninja-utils +inherit python-single-r1 secureboot 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-255.6" +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}] + 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}/systemd-utils-255-musl-fgetxxent.patch" + ) + + if use elibc_musl; then + PATCHES+=( + "${WORKDIR}/${MUSL_PATCHSET}" + "${FILESDIR}/musl-efi-wchar.patch" + ) + fi + default +} + +src_configure() { + python_setup + meson-multilib_src_configure +} + +multilib_src_configure() { + local emesonargs=( + -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) + + # 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 +} + +have_dmi() { + # see dmi_arches in meson.build + case ${CHOST} in + mips64*) + return 1 ;; + aarch64*|arm*|ia64*|i?86*|loongarch64*|mips*|x86_64*) + return 0 ;; + esac + return 1 +} + +multilib_src_compile() { + local targets=() optional_targets=() + if multilib_is_native_abi; then + if use boot; then + local efi_arch= efi_arch_alt= + case ${CHOST} in + aarch64*) efi_arch=aa64 ;; + arm*) efi_arch=arm ;; + loongarch32*) efi_arch=loongarch32 ;; + loongarch64*) efi_arch=loongarch64 ;; + riscv32*) efi_arch=riscv32 ;; + riscv64*) efi_arch=riscv64 ;; + x86_64*) efi_arch=x64 efi_arch_alt=ia32;; + i?86*) efi_arch=ia32 ;; + esac + targets+=( + bootctl + man/bootctl.1 + src/boot/efi/systemd-boot${efi_arch}.efi + src/boot/efi/linux${efi_arch}.efi.stub + src/boot/efi/addon${efi_arch}.efi.stub + ) + if [[ -n ${efi_arch_alt} ]]; then + # If we have a multilib toolchain, meson.build will build the + # "alt" arch (ia32). There's no easy way to detect this, so try + # to build it and ignore failure. + optional_targets+=( + src/boot/efi/systemd-boot${efi_arch_alt}.efi + src/boot/efi/linux${efi_arch_alt}.efi.stub + src/boot/efi/addon${efi_arch_alt}.efi.stub + ) + fi + + fi + if use kernel-install; then + targets+=( + kernel-install + src/kernel-install/90-loaderentry.install + man/kernel-install.8 + ) + fi + if use sysusers; then + targets+=( + systemd-sysusers + 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 + man/tmpfiles.d.5 + man/systemd-tmpfiles.8 + tmpfiles.d/{etc,static-nodes-permissions,var}.conf + ) + if use test; then + targets+=( + test-offline-passwd + test-tmpfile-util + ) + fi + fi + if use udev; then + targets+=( + udevadm + systemd-hwdb + ata_id + cdrom_id + fido_id + iocost + mtd_probe + scsi_id + v4l_id + src/udev/udev.pc + 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 + # Needed for tests + rules.d/99-systemd.rules + ) + if have_dmi; then + targets+=( dmi_memory_id ) + fi + if use test; then + targets+=( + test-fido-id-desc + test-link-config-tables + test-udev-builtin + test-udev-device-thread + test-udev-format + test-udev-manager + test-udev-node + test-udev-rule-runner + test-udev-rules + test-udev-spawn + test-udev-util + ) + fi + fi + if use ukify; then + targets+=( + ukify + src/kernel-install/60-ukify.install + man/ukify.1 + ) + fi + fi + if use udev; then + targets+=( + libudev + src/libudev/libudev.pc + ) + if use test; then + targets+=( + test-libudev + test-libudev-sym + test-udev-device-thread + ) + fi + fi + if [[ ${#targets[@]} -ne 0 ]]; then + meson_src_compile "${targets[@]}" + fi + if [[ ${#optional_targets[@]} -ne 0 ]]; then + ninja ${NINJAOPTS} "${optional_targets[@]}" + fi +} + +multilib_src_test() { + local tests=() + if multilib_is_native_abi; then + if use boot; then + tests+=( --suite boot ) + fi + if use kernel-install; then + tests+=( --suite kernel-install ) + fi + if use sysusers; then + tests+=( --suite sysusers ) + fi + if use tmpfiles; then + tests+=( --suite tmpfiles ) + fi + if use udev; then + tests+=( --suite udev ) + fi + fi + if use udev; then + tests+=( --suite libudev ) + fi + if [[ ${#tests[@]} -ne 0 ]]; then + meson_src_test --no-rebuild "${tests[@]}" + fi +} + +src_install() { + meson-multilib_src_install +} + +set_rpath() { + patchelf --set-rpath "${EPREFIX}/usr/$(get_libdir)/systemd" "$@" || die "patchelf failed" +} + +multilib_src_install() { + if multilib_is_native_abi; then + exeinto "/usr/$(get_libdir)/systemd" + doexe src/shared/libsystemd-shared-${PV%%.*}.so + if use boot; then + set_rpath bootctl + dobin bootctl + doman man/bootctl.1 + meson_install --no-rebuild --tags systemd-boot + fi + if use kernel-install; then + set_rpath kernel-install + dobin kernel-install + doman man/kernel-install.8 + exeinto /usr/lib/kernel/install.d + doexe src/kernel-install/*.install + fi + if use sysusers; then + set_rpath systemd-sysusers + dobin systemd-sysusers + doman man/{systemd-sysusers.8,sysusers.d.5} + fi + if use tmpfiles; then + set_rpath systemd-tmpfiles + dobin systemd-tmpfiles + 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 + set_rpath udevadm systemd-hwdb + dobin udevadm systemd-hwdb + dosym ../../bin/udevadm /usr/lib/systemd/systemd-udevd + if use split-usr; then + # elogind installs udev rules that hard-code /bin/udevadm + dosym ../usr/bin/udevadm /bin/udevadm + fi + + exeinto /usr/lib/udev + set_rpath {ata_id,cdrom_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} + doexe {ata_id,cdrom_id,fido_id,iocost,mtd_probe,scsi_id,v4l_id} + + if have_dmi; then + set_rpath dmi_memory_id + doexe dmi_memory_id + fi + + rm -f rules.d/99-systemd.rules + insinto /usr/lib/udev/rules.d + doins rules.d/*.rules + + insinto /usr/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 + dobin ukify + dosym ../../bin/ukify /usr/lib/systemd/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 + dobashcomp shell-completion/bash/bootctl + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/{_bootctl,_kernel-install} + fi + if use kernel-install; then + exeinto /usr/lib/kernel/install.d + doexe src/kernel-install/*.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/x11.conf + doins "${FILESDIR}"/{legacy,tmp}.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 /usr/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 /usr/lib/udev/rules.d + doins rules.d/*.rules + doins "${FILESDIR}"/40-gentoo.rules + + insinto /usr/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_preinst() { + # Migrate /lib/{systemd,udev} to /usr/lib + if use split-usr; then + local d + for d in systemd udev; do + dosym ../usr/lib/${d} /lib/${d} + if [[ -e ${EROOT}/lib/${d} && ! -L ${EROOT}/lib/${d} ]]; then + einfo "Copying files from '${EROOT}/lib/${d}' to '${EROOT}/usr/lib/${d}'" + cp -rpPT "${EROOT}/lib/${d}" "${EROOT}/usr/lib/${d}" || die + einfo "Removing '${EROOT}/lib/${d}'" + rm -r "${EROOT}/lib/${d}" || die + fi + done + fi +} + +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 +} diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest index 5c18ca18e0f0..6f9884a16448 100644 --- a/sys-apps/systemd/Manifest +++ b/sys-apps/systemd/Manifest @@ -11,19 +11,23 @@ DIST systemd-256.1.tar.gz 15643508 BLAKE2B 2075f5b927107571a80f09bf09ad84f8f4e31 DIST systemd-stable-254.10.tar.gz 14428960 BLAKE2B 488c27b9657ec7452f876ab6c18bbfe711f1351afa022801f5a646f2dd1d76d63c17e52e6ebf43b38a76807907287b654a7eaca3afdb0688f5b05839e98ad727 SHA512 0c127d38d0ade8655ae12172c2edbaa8af68bd29f42d965b988d75e74626846ae859bcf0b39b535c9a99ad8c709ad7575ed4d5ea5bc95ce8729e3caafdb32b70 DIST systemd-stable-254.12.tar.gz 14529517 BLAKE2B ed6e4a78363930840e505c4bd789d1d44c238f30d3c0768d435e1cacb43ac3ab07e0dc9085546b4142152bbb4ceb4e2c0a9560e74e1a2b8c09fc885620695e73 SHA512 fa3679915392e641bed73ccb48f5def386ab13ba5ff7efdac952214193c3311543bec4c4370d6880f9599f63e377506b343805c3c56b7dde7eb5e3bbc0dc7a87 DIST systemd-stable-254.13.tar.gz 14533359 BLAKE2B 6f37bf5f1868840f122652fdca270e1f97ba78f8280f45100b1b5b33c3531cf79587b596ccbbe594f1e623d918c1fdf19f2231d677e27b5421f1852fbe3225b3 SHA512 852cbc992128dc3ab6ded4215c2540fa3c0b7c7ad98e54036f3981d77a2162f5393ee50960773419133e0d584844af329d3726f45829a56c00b1827e33edf3e1 +DIST systemd-stable-254.14.tar.gz 14533129 BLAKE2B 1db933e0f0cdfcabc7a4f3ecfe6e0cf1b10d4b2fa0aee02629d786cb022b18c501a0c48445f9b537a003af22ee64803271fa007e3889b833ec119b4d1346c410 SHA512 bd4e5ce7529f488f7e7199a1ff5976c10cf8e7040893dcf312a23dda5e32eb5c7f40c9ce3676f4a60d5d39197efc3bb1f2a577004b1654d1d0be9a1c617cfcdb DIST systemd-stable-254.8.tar.gz 14418468 BLAKE2B e5a151ece86e57c7224fc95bda1b4ede1277fce4a2ba28d3605ab0431a2aafe1088f90c49a20e3b53a5b56aeef7c0f1f5da0601db740150f5efdf6eae7bbde80 SHA512 a3f35d9fcafcccd8d9c33ab1047241f226146017be95562a67c7dcc9eeb4b77bded92ad80e92f4767f2bf2009df0172a621d4c54a805e07ed5a5ed03940ec28e DIST systemd-stable-255.3.tar.gz 14873273 BLAKE2B e22ef391c691fcf1e765c5112e1a55096d3bba61a9dae3ea1a3958add4e355892a97d5214e63c516ba3b70e2a83bb5d21254812d870f06c16c74a58d4f957d75 SHA512 c2868a53df2176649b0d0c94e5d451c46ba783bcdbc89ce12434ed2d11dba44b4854ffe4c2430f3f64eef2e214cbb51d5f740170afbd9edd66761a8851157453 DIST systemd-stable-255.4.tar.gz 14952427 BLAKE2B 27f5080f83a9e870fbe8e3ebcb500a63c42022f1f96f26f35c76eeeea85dab691291c31ee716cab330b76df5e576910a6a82f51267eff4f766b1d4c304d815c9 SHA512 8a2bde11a55f7f788ba7751789a5e9be6ce9634e88d54e49f6e832c4c49020c6cacaf2a610fe26f92998b0cbf43c6c2150a96b2c0953d23261009f57d71ea979 DIST systemd-stable-255.6.tar.gz 15060034 BLAKE2B 27e14a870bd8ae85e3c7679a69b7dcd6f1165430c4cdea57d3f7092a40a22085bafc3e3e397a7429b53773f7460bde0ad0af9afb6852c6d0c9cc681d25c34c03 SHA512 523c5d973e2ccd47f8ba33d1fb8264a8de58cb639fab22be0d0854f96009dce700d6f022d30aad5ab7b9292b33047cbbc1eefc3c6141328e337b9a245944c237 DIST systemd-stable-255.7.tar.gz 15068684 BLAKE2B 6fb5415d9e013bc8695ef837affce7063d214027529412a25ea73eb25473d1f07cff6ad3ea3ea18b7bbf9d73d2bb8e39838e1aeb2a14d016b3b47e4ba24d02d0 SHA512 1cd2a00f292751b923bd93c60bdcdd66d82792b45e32dce11d77e2b3b6fc5c8ba4c5db386652deffa8c24e75032af1a745700ba91f1726e249f0c447daf85c2a +DIST systemd-stable-255.8.tar.gz 15070471 BLAKE2B b437404af7fd73ef527f80d9d14d46a781444103d1756c27494ecf2664c9c5efe1169c85b91148a3bf190dc7c5e31cf8d42a13c84102d101ea7e4a0570e8d719 SHA512 7692be761a393924669a90f6f343998a85707a9daa3ce169ce67f62ae2a39338c2c3496066b2659c6500849104fab0529fca5704a3eb32375f2f44131216d1f1 EBUILD systemd-254.10.ebuild 15376 BLAKE2B 80e1843bf35af94585e9675df47fdf42ad3706d09c9949067e2e15247384578154775549d623a9be2c3788c3a27bd23de61b85097708176873afa32aaf27212f SHA512 6fb5993e53a593b14a6e19bfce38961096cd258f588fdd958c62087b56fd653f12406815cefd98c2239d21c567a9716ed9e22be0f08b2397c0e9301341906ce6 EBUILD systemd-254.12.ebuild 15384 BLAKE2B 2fd289f3f5c73c3e520a532965d488f15e4644e0a9e233e6f7a211ba1ed8d6cfa3eeb937fc8fd28850a2d8d6c0e9139816f87117046651ac1cc305453eb5938c SHA512 da1ead3fb668c74005111bedc03a77ab8a4047325d99c861baadfedd8dc901717730c8a95ef60c4f1381294a08147a90ffcc5046f8e1372685fc47d9a0d6755f EBUILD systemd-254.13.ebuild 15376 BLAKE2B 80e1843bf35af94585e9675df47fdf42ad3706d09c9949067e2e15247384578154775549d623a9be2c3788c3a27bd23de61b85097708176873afa32aaf27212f SHA512 6fb5993e53a593b14a6e19bfce38961096cd258f588fdd958c62087b56fd653f12406815cefd98c2239d21c567a9716ed9e22be0f08b2397c0e9301341906ce6 +EBUILD systemd-254.14.ebuild 15384 BLAKE2B 2fd289f3f5c73c3e520a532965d488f15e4644e0a9e233e6f7a211ba1ed8d6cfa3eeb937fc8fd28850a2d8d6c0e9139816f87117046651ac1cc305453eb5938c SHA512 da1ead3fb668c74005111bedc03a77ab8a4047325d99c861baadfedd8dc901717730c8a95ef60c4f1381294a08147a90ffcc5046f8e1372685fc47d9a0d6755f EBUILD systemd-254.8-r1.ebuild 15496 BLAKE2B 5d5c93316937fa101ff4ded77c87b8e4930aa6464d596a0a251bf02afda1691fcd2b4660f9460c77c3a7bc66acc3b8cf34cbfd869a7723dd211751d4b3238ba1 SHA512 5ffa7ae4c92aeb3dd92ad18980bd7ee2661c1ab7ee02da23a2eed198c87e4e9edbfdd1aad4df7215618c13e711769fe37b07031778624b00c02619ca61de4a1c EBUILD systemd-255.3-r1.ebuild 14938 BLAKE2B d6f0b4afb9cbea790b4df4b7365eb9b5b3ee5c5043c324fb6354786310ea4b497a2504cc9b42da90301e1382e2b3eff30acfd2d26edba5c934138dc212c00d19 SHA512 a2655313bc32b19cc5cf584b6cb2574aa54224248be6da140f1d423cbe46068a32f204c1e9e5342fd07fd096440e44f10863708d6fa3e48ee5ec2f7a833f46c3 EBUILD systemd-255.4.ebuild 14965 BLAKE2B a33e0820412a9ccde7fec48f3924faf178add50febc66edc2156772cbc355013c3814bb90b2daa402a5fecc7dd23a6402481269aade7d15eed8dcd49f220d8db SHA512 69ec1ba7982efdb33cea7aa1b678475473994afc658d4b7eab337334161eb03c5b838d42f2b258675fd2a45372c4435ae8ed363a2dfb3419c2fe21939013fc23 EBUILD systemd-255.6.ebuild 14923 BLAKE2B e54f5d74692108f87d090101484b24895678d4ca4fb2d1d4dff1f34ed5c6fec4813c5e6e155ee95554b2fa0ce085970eeace6709c643db8927147f55faac58e1 SHA512 b388d0155fd979e2deeae88728ac2d232320602cbbf541ab844e72ce6d70e90a98cae9eadbc1057b1ad4945cfb527cb7e12cbad1586750127cade6f0fb832e8a EBUILD systemd-255.7-r1.ebuild 15121 BLAKE2B 117325ccbd7a80ef86c68c0d977febd14d044401716ca1d61c26fcb0b5876e19ce63d8c8cabcc2c3871d2a42122ba90183ee07120c951e797d2131bbabf9c6c0 SHA512 7a3fc657190f269de8be77e285e9fa9e578830832fa380748db5bc20e4a4d505236998adf2b97f373ab76ecc64f0b99048ff1afc4f1c7413873876cb6ad2c561 +EBUILD systemd-255.8.ebuild 15129 BLAKE2B 273dcae3312e8aff56bff6a42a4afe76e99cd88a7b2c0e84b55ab758f66378e727fe11ac5a728bf92685272b68ac5c35d2351047f4ff09eee7e4ca164ff10845 SHA512 292ec08bb50ac3f511eee914b9eee22bf263b595f0b6083563e4a76820e1a7b48957618059692d434e8aee49be46521a9a0cc27187d7272242817c9ca666203a EBUILD systemd-256.1-r3.ebuild 15673 BLAKE2B 49690e82c1b16a039f132615a92729fef4ee13d234e21d2db0f6cb4d87a736e32837bd0769bf1a349bc92b3c3763c4e9ff379e1d089667dadaafc7a9fedef4b6 SHA512 e3d10ce7520b7599c81b7bcca41752af68c93dd6d47bcbd8c16320723489c132b6e477b6a42c9e8e6fd65df42c08177b62a700a55b05ee6aed35995ed6ed5c21 EBUILD systemd-9999.ebuild 15673 BLAKE2B 49690e82c1b16a039f132615a92729fef4ee13d234e21d2db0f6cb4d87a736e32837bd0769bf1a349bc92b3c3763c4e9ff379e1d089667dadaafc7a9fedef4b6 SHA512 e3d10ce7520b7599c81b7bcca41752af68c93dd6d47bcbd8c16320723489c132b6e477b6a42c9e8e6fd65df42c08177b62a700a55b05ee6aed35995ed6ed5c21 MISC metadata.xml 2609 BLAKE2B 8947f3b696fbba7b90e838a54fbb4fd933c71907c8011652fc2b7d68d4ce5f78a19f350a309e4c0f66ef0159376c9064ba9c15941ecf1748c359c4ae3b072102 SHA512 dfeea24b7a93f5d4af4ac47b87ba08092d069fb1a4749c0c1f36a669be6115eaea8f67e6183b6a4f155ef90d7714f74299109420d569c2b0545d80584ed0e97e diff --git a/sys-apps/systemd/systemd-254.14.ebuild b/sys-apps/systemd/systemd-254.14.ebuild new file mode 100644 index 000000000000..9bd01e1a5313 --- /dev/null +++ b/sys-apps/systemd/systemd-254.14.ebuild @@ -0,0 +1,536 @@ +# Copyright 2011-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..12} ) + +# Avoid QA warnings +TMPFILES_OPTIONAL=1 +UDEV_OPTIONAL=1 + +QA_PKGCONFIG_VERSION=$(ver_cut 1) + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/systemd/systemd.git" + inherit git-r3 +else + if [[ ${PV} == *.* ]]; then + MY_PN=systemd-stable + else + MY_PN=systemd + fi + MY_PV=${PV/_/-} + MY_P=${MY_PN}-${MY_PV} + S=${WORKDIR}/${MY_P} + SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +inherit bash-completion-r1 linux-info meson-multilib optfeature pam python-single-r1 +inherit secureboot systemd toolchain-funcs udev usr-ldscript + +DESCRIPTION="System and service manager for Linux" +HOMEPAGE="http://systemd.io/" + +LICENSE="GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0/2" +IUSE=" + acl apparmor audit boot cgroup-hybrid cryptsetup curl +dns-over-tls elfutils + fido2 +gcrypt gnutls homed http idn importd iptables +kernel-install +kmod + +lz4 lzma +openssl pam pcre pkcs11 policykit pwquality qrcode + +resolvconf +seccomp selinux split-usr +sysv-utils test tpm ukify vanilla xkb +zstd +" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + dns-over-tls? ( || ( gnutls openssl ) ) + fido2? ( cryptsetup openssl ) + homed? ( cryptsetup pam openssl ) + importd? ( curl lzma || ( gcrypt openssl ) ) + pwquality? ( homed ) + boot? ( kernel-install ) + ukify? ( boot ) +" +RESTRICT="!test? ( test )" + +MINKV="4.15" + +COMMON_DEPEND=" + >=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] + sys-libs/libcap:0=[${MULTILIB_USEDEP}] + virtual/libcrypt:=[${MULTILIB_USEDEP}] + acl? ( sys-apps/acl:0= ) + apparmor? ( sys-libs/libapparmor:0= ) + audit? ( >=sys-process/audit-2:0= ) + cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= ) + curl? ( net-misc/curl:0= ) + elfutils? ( >=dev-libs/elfutils-0.158:0= ) + fido2? ( dev-libs/libfido2:0= ) + gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) + gnutls? ( >=net-libs/gnutls-3.6.0:0= ) + http? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] ) + idn? ( net-dns/libidn2:= ) + importd? ( + app-arch/bzip2:0= + sys-libs/zlib:0= + ) + kmod? ( >=sys-apps/kmod-15:0= ) + lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) + iptables? ( net-firewall/iptables:0= ) + openssl? ( >=dev-libs/openssl-1.1.0:0= ) + pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] ) + pkcs11? ( app-crypt/p11-kit:0= ) + pcre? ( dev-libs/libpcre2 ) + pwquality? ( dev-libs/libpwquality:0= ) + qrcode? ( media-gfx/qrencode:0= ) + seccomp? ( >=sys-libs/libseccomp-2.3.3:0= ) + selinux? ( sys-libs/libselinux:0= ) + tpm? ( app-crypt/tpm2-tss:0= ) + xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) + zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] ) +" + +# Newer linux-headers needed by ia64, bug #480218 +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-${MINKV} +" + +PEFILE_DEPEND='dev-python/pefile[${PYTHON_USEDEP}]' + +# baselayout-2.2 has /run +RDEPEND="${COMMON_DEPEND} + >=acct-group/adm-0-r1 + >=acct-group/wheel-0-r1 + >=acct-group/kmem-0-r1 + >=acct-group/tty-0-r1 + >=acct-group/utmp-0-r1 + >=acct-group/audio-0-r1 + >=acct-group/cdrom-0-r1 + >=acct-group/dialout-0-r1 + >=acct-group/disk-0-r1 + >=acct-group/input-0-r1 + >=acct-group/kvm-0-r1 + >=acct-group/lp-0-r1 + >=acct-group/render-0-r1 + acct-group/sgx + >=acct-group/tape-0-r1 + acct-group/users + >=acct-group/video-0-r1 + >=acct-group/systemd-journal-0-r1 + >=acct-user/root-0-r1 + acct-user/nobody + >=acct-user/systemd-journal-remote-0-r1 + >=acct-user/systemd-coredump-0-r1 + >=acct-user/systemd-network-0-r1 + acct-user/systemd-oom + >=acct-user/systemd-resolve-0-r1 + >=acct-user/systemd-timesync-0-r1 + >=sys-apps/baselayout-2.2 + ukify? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep "${PEFILE_DEPEND}") + ) + selinux? ( + sec-policy/selinux-base-policy[systemd] + sec-policy/selinux-ntp + ) + sysv-utils? ( + !sys-apps/openrc[sysv-utils(-)] + !sys-apps/sysvinit + ) + !sysv-utils? ( sys-apps/sysvinit ) + resolvconf? ( !net-dns/openresolv ) + !sys-apps/hwids[udev] + !sys-auth/nss-myhostname + !sys-fs/eudev + !sys-fs/udev +" + +# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) +PDEPEND=">=sys-apps/dbus-1.9.8[systemd] + >=sys-fs/udev-init-scripts-34 + policykit? ( sys-auth/polkit ) + !vanilla? ( sys-apps/gentoo-systemd-integration )" + +BDEPEND=" + app-arch/xz-utils:0 + dev-util/gperf + >=dev-build/meson-0.46 + >=sys-apps/coreutils-8.16 + sys-devel/gettext + virtual/pkgconfig + test? ( + app-text/tree + dev-lang/perl + sys-apps/dbus + ) + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt:0 + ${PYTHON_DEPS} + $(python_gen_cond_dep " + dev-python/jinja[\${PYTHON_USEDEP}] + dev-python/lxml[\${PYTHON_USEDEP}] + boot? ( >=dev-python/pyelftools-0.30[\${PYTHON_USEDEP}] ) + ukify? ( test? ( ${PEFILE_DEPEND} ) ) + ") +" + +QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" +QA_EXECSTACK="usr/lib/systemd/boot/efi/*" + +pkg_pretend() { + if [[ ${MERGE_TYPE} != buildonly ]]; then + local CONFIG_CHECK="~BLK_DEV_BSG ~CGROUPS + ~CGROUP_BPF ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE + ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS + ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS + ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH + ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED + ~!SYSFS_DEPRECATED_V2" + + use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" + use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" + + if kernel_is -ge 5 10 20; then + CONFIG_CHECK+=" ~KCMP" + else + CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" + fi + + if kernel_is -ge 4 18; then + CONFIG_CHECK+=" ~AUTOFS_FS" + else + CONFIG_CHECK+=" ~AUTOFS4_FS" + fi + + 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 + if linux_chkconfig_present X86; then + CONFIG_CHECK+=" ~DMIID" + fi + fi + + if kernel_is -lt ${MINKV//./ }; then + ewarn "Kernel version at least ${MINKV} required" + fi + + check_extra_config + fi +} + +pkg_setup() { + use boot && secureboot_pkg_setup +} + +src_unpack() { + default + [[ ${PV} != 9999 ]] || git-r3_src_unpack +} + +src_prepare() { + local PATCHES=( + "${FILESDIR}/systemd-test-process-util.patch" + "${FILESDIR}/systemd-253-initrd-generators.patch" + "${FILESDIR}/254-PrivateDevices-userdbd.patch" + ) + + if ! use vanilla; then + PATCHES+=( + "${FILESDIR}/gentoo-generator-path-r2.patch" + "${FILESDIR}/gentoo-journald-audit-r1.patch" + ) + fi + + # Fails with split-usr. + sed -i -e '2i exit 77' test/test-rpm-macros.sh || die + + default +} + +src_configure() { + # Prevent conflicts with i686 cross toolchain, bug 559726 + tc-export AR CC NM OBJCOPY RANLIB + + python_setup + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( + --localstatedir="${EPREFIX}/var" + -Dsupport-url="https://gentoo.org/support/" + -Dpamlibdir="$(getpam_mod_dir)" + # avoid bash-completion dep + -Dbashcompletiondir="$(get_bashcompdir)" + $(meson_use split-usr) + $(meson_use split-usr split-bin) + -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" + -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" + # Disable compatibility with sysvinit + -Dsysvinit-path= + -Dsysvrcnd-path= + # Avoid infinite exec recursion, bug 642724 + -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit" + # no deps + -Dima=true + -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified) + # Optional components/dependencies + $(meson_native_use_bool acl) + $(meson_native_use_bool apparmor) + $(meson_native_use_bool audit) + $(meson_native_use_bool boot bootloader) + $(meson_native_use_bool cryptsetup libcryptsetup) + $(meson_native_use_bool curl libcurl) + $(meson_native_use_bool dns-over-tls dns-over-tls) + $(meson_native_use_bool elfutils) + $(meson_native_use_bool fido2 libfido2) + $(meson_use gcrypt) + $(meson_native_use_bool gnutls) + $(meson_native_use_bool homed) + $(meson_native_use_bool http microhttpd) + $(meson_native_use_bool idn) + $(meson_native_use_bool importd) + $(meson_native_use_bool importd bzip2) + $(meson_native_use_bool importd zlib) + $(meson_native_use_bool kernel-install) + $(meson_native_use_bool kmod) + $(meson_use lz4) + $(meson_use lzma xz) + $(meson_use test tests) + $(meson_use zstd) + $(meson_native_use_bool iptables libiptc) + $(meson_native_use_bool openssl) + $(meson_use pam) + $(meson_native_use_bool pkcs11 p11kit) + $(meson_native_use_bool pcre pcre2) + $(meson_native_use_bool policykit polkit) + $(meson_native_use_bool pwquality) + $(meson_native_use_bool qrcode qrencode) + $(meson_native_use_bool seccomp) + $(meson_native_use_bool selinux) + $(meson_native_use_bool tpm tpm2) + $(meson_native_use_bool test dbus) + $(meson_native_use_bool ukify) + $(meson_native_use_bool xkb xkbcommon) + -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" + # Breaks screen, tmux, etc. + -Ddefault-kill-user-processes=false + -Dcreate-log-dirs=false + + # multilib options + $(meson_native_true backlight) + $(meson_native_true binfmt) + $(meson_native_true coredump) + $(meson_native_true environment-d) + $(meson_native_true firstboot) + $(meson_native_true hibernate) + $(meson_native_true hostnamed) + $(meson_native_true ldconfig) + $(meson_native_true localed) + $(meson_native_true man) + $(meson_native_true networkd) + $(meson_native_true quotacheck) + $(meson_native_true randomseed) + $(meson_native_true rfkill) + $(meson_native_true sysusers) + $(meson_native_true timedated) + $(meson_native_true timesyncd) + $(meson_native_true tmpfiles) + $(meson_native_true vconsole) + ) + + meson_src_configure "${myconf[@]}" +} + +multilib_src_test() { + unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR + local -x COLUMNS=80 + meson_src_test --timeout-multiplier=10 +} + +multilib_src_install_all() { + local rootprefix=$(usex split-usr '' /usr) + local sbin=$(usex split-usr sbin bin) + + # meson doesn't know about docdir + mv "${ED}"/usr/share/doc/{systemd,${PF}} || die + + einstalldocs + dodoc "${FILESDIR}"/nsswitch.conf + + insinto /usr/lib/tmpfiles.d + doins "${FILESDIR}"/legacy.conf + + if ! use resolvconf; then + rm -f "${ED}${rootprefix}/${sbin}"/resolvconf || die + fi + + if ! use sysv-utils; then + rm "${ED}${rootprefix}/${sbin}"/{halt,init,poweroff,reboot,shutdown} || die + rm "${ED}"/usr/share/man/man1/init.1 || die + rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,shutdown}.8 || die + fi + + # https://bugs.gentoo.org/761763 + rm -r "${ED}"/usr/lib/sysusers.d || die + + # Preserve empty dirs in /etc & /var, bug #437008 + keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} + keepdir /etc/kernel/install.d + keepdir /etc/systemd/{network,system,user} + keepdir /etc/udev/rules.d + + keepdir /etc/udev/hwdb.d + + keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} + keepdir /usr/lib/{binfmt.d,modules-load.d} + keepdir /usr/lib/systemd/user-generators + keepdir /var/lib/systemd + keepdir /var/log/journal + + if use pam; then + newpamd "${FILESDIR}"/systemd-user.pam systemd-user + fi + + if use split-usr; then + # Avoid breaking boot/reboot + dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd + dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown + fi + + gen_usr_ldscript -a systemd udev + + if use kernel-install; then + # Dummy config, remove to make room for sys-kernel/installkernel + rm "${ED}/usr/lib/kernel/install.conf" || die + fi + + use ukify && python_fix_shebang "${ED}" + use boot && secureboot_auto_sign +} + +migrate_locale() { + local envd_locale_def="${EROOT}/etc/env.d/02locale" + local envd_locale=( "${EROOT}"/etc/env.d/??locale ) + local locale_conf="${EROOT}/etc/locale.conf" + + if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then + # If locale.conf does not exist... + if [[ -e ${envd_locale} ]]; then + # ...either copy env.d/??locale if there's one + ebegin "Moving ${envd_locale} to ${locale_conf}" + mv "${envd_locale}" "${locale_conf}" + eend ${?} || FAIL=1 + else + # ...or create a dummy default + ebegin "Creating ${locale_conf}" + cat > "${locale_conf}" <<-EOF + # This file has been created by the sys-apps/systemd ebuild. + # See locale.conf(5) and localectl(1). + + # LANG=${LANG} + EOF + eend ${?} || FAIL=1 + fi + fi + + if [[ ! -L ${envd_locale} ]]; then + # now, if env.d/??locale is not a symlink (to locale.conf)... + if [[ -e ${envd_locale} ]]; then + # ...warn the user that he has duplicate locale settings + ewarn + ewarn "To ensure consistent behavior, you should replace ${envd_locale}" + ewarn "with a symlink to ${locale_conf}. Please migrate your settings" + ewarn "and create the symlink with the following command:" + ewarn "ln -s -n -f ../locale.conf ${envd_locale}" + ewarn + else + # ...or just create the symlink if there's nothing here + ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" + ln -n -s ../locale.conf "${envd_locale_def}" + eend ${?} || FAIL=1 + fi + fi +} + +pkg_preinst() { + if [[ -e ${EROOT}/etc/sysctl.conf ]]; then + # Symlink /etc/sysctl.conf for easy migration. + dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf + fi + + if ! use split-usr; then + local dir + for dir in bin sbin lib usr/sbin; do + if [[ ! -L ${EROOT}/${dir} ]]; then + eerror "'${EROOT}/${dir}' is not a symbolic link." + FAIL=1 + fi + done + if [[ ${FAIL} ]]; then + eerror "Migration to system layout with merged directories must be performed before" + eerror "installing ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage." + die "System layout with split directories still used" + fi + fi + if ! use boot && has_version "sys-apps/systemd[gnuefi(-)]"; then + ewarn "The 'gnuefi' USE flag has been renamed to 'boot'." + ewarn "Make sure to enable the 'boot' USE flag if you use systemd-boot." + fi +} + +pkg_postinst() { + systemd_update_catalog + + # Keep this here in case the database format changes so it gets updated + # when required. + systemd-hwdb --root="${ROOT}" update + + udev_reload || FAIL=1 + + # Bug 465468, make sure locales are respected, and ensure consistency + # between OpenRC & systemd + migrate_locale + + if [[ -z ${REPLACING_VERSIONS} ]]; then + if type systemctl &>/dev/null; then + systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1 + fi + elog "To enable a useful set of services, run the following:" + elog " systemctl preset-all --preset-mode=enable-only" + fi + + if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then + rm "${EROOT}/var/lib/systemd/timesync" + fi + + if [[ ${FAIL} ]]; then + eerror "One of the postinst commands failed. Please check the postinst output" + eerror "for errors. You may need to clean up your system and/or try installing" + eerror "systemd again." + eerror + fi + + if use boot; then + optfeature "installing kernels in systemd-boot's native layout and update loader entries" \ + "sys-kernel/installkernel[systemd-boot]" + fi + if use ukify; then + optfeature "generating unified kernel image on each kernel installation" \ + "sys-kernel/installkernel[ukify]" + fi +} + +pkg_prerm() { + # If removing systemd completely, remove the catalog database. + if [[ ! ${REPLACED_BY_VERSION} ]]; then + rm -f -v "${EROOT}"/var/lib/systemd/catalog/database + fi +} diff --git a/sys-apps/systemd/systemd-255.8.ebuild b/sys-apps/systemd/systemd-255.8.ebuild new file mode 100644 index 000000000000..c4ed9c5dda69 --- /dev/null +++ b/sys-apps/systemd/systemd-255.8.ebuild @@ -0,0 +1,536 @@ +# Copyright 2011-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..12} ) + +# Avoid QA warnings +TMPFILES_OPTIONAL=1 +UDEV_OPTIONAL=1 + +QA_PKGCONFIG_VERSION=$(ver_cut 1) + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/systemd/systemd.git" + inherit git-r3 +else + if [[ ${PV} == *.* ]]; then + MY_PN=systemd-stable + else + MY_PN=systemd + fi + MY_PV=${PV/_/-} + MY_P=${MY_PN}-${MY_PV} + S=${WORKDIR}/${MY_P} + SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" + + if [[ ${PV} != *rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + fi +fi + +inherit bash-completion-r1 linux-info meson-multilib optfeature pam python-single-r1 +inherit secureboot systemd toolchain-funcs udev + +DESCRIPTION="System and service manager for Linux" +HOMEPAGE="http://systemd.io/" + +LICENSE="GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0/2" +IUSE=" + acl apparmor audit boot cgroup-hybrid cryptsetup curl +dns-over-tls elfutils + fido2 +gcrypt gnutls homed http idn importd iptables +kernel-install +kmod + +lz4 lzma +openssl pam pcre pkcs11 policykit pwquality qrcode + +resolvconf +seccomp selinux split-usr +sysv-utils test tpm ukify vanilla xkb +zstd +" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + dns-over-tls? ( || ( gnutls openssl ) ) + fido2? ( cryptsetup openssl ) + homed? ( cryptsetup pam openssl ) + importd? ( curl lzma || ( gcrypt openssl ) ) + pwquality? ( homed ) + boot? ( kernel-install ) + ukify? ( boot ) +" +RESTRICT="!test? ( test )" + +MINKV="4.15" + +COMMON_DEPEND=" + >=sys-apps/util-linux-2.32:0=[${MULTILIB_USEDEP}] + sys-libs/libcap:0=[${MULTILIB_USEDEP}] + virtual/libcrypt:=[${MULTILIB_USEDEP}] + acl? ( sys-apps/acl:0= ) + apparmor? ( >=sys-libs/libapparmor-2.13:0= ) + audit? ( >=sys-process/audit-2:0= ) + cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= ) + curl? ( >=net-misc/curl-7.32.0:0= ) + elfutils? ( >=dev-libs/elfutils-0.158:0= ) + fido2? ( dev-libs/libfido2:0= ) + gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) + gnutls? ( >=net-libs/gnutls-3.6.0:0= ) + http? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] ) + idn? ( net-dns/libidn2:= ) + importd? ( + app-arch/bzip2:0= + sys-libs/zlib:0= + ) + kmod? ( >=sys-apps/kmod-15:0= ) + lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) + iptables? ( net-firewall/iptables:0= ) + openssl? ( >=dev-libs/openssl-1.1.0:0= ) + pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] ) + pkcs11? ( >=app-crypt/p11-kit-0.23.3:0= ) + pcre? ( dev-libs/libpcre2 ) + pwquality? ( >=dev-libs/libpwquality-1.4.1:0= ) + qrcode? ( >=media-gfx/qrencode-3:0= ) + seccomp? ( >=sys-libs/libseccomp-2.3.3:0= ) + selinux? ( >=sys-libs/libselinux-2.1.9:0= ) + tpm? ( app-crypt/tpm2-tss:0= ) + xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) + zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] ) +" + +# Newer linux-headers needed by ia64, bug #480218 +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-${MINKV} +" + +PEFILE_DEPEND='dev-python/pefile[${PYTHON_USEDEP}]' + +# baselayout-2.2 has /run +RDEPEND="${COMMON_DEPEND} + >=acct-group/adm-0-r1 + >=acct-group/wheel-0-r1 + >=acct-group/kmem-0-r1 + >=acct-group/tty-0-r1 + >=acct-group/utmp-0-r1 + >=acct-group/audio-0-r1 + >=acct-group/cdrom-0-r1 + >=acct-group/dialout-0-r1 + >=acct-group/disk-0-r1 + >=acct-group/input-0-r1 + >=acct-group/kvm-0-r1 + >=acct-group/lp-0-r1 + >=acct-group/render-0-r1 + acct-group/sgx + >=acct-group/tape-0-r1 + acct-group/users + >=acct-group/video-0-r1 + >=acct-group/systemd-journal-0-r1 + >=acct-user/root-0-r1 + acct-user/nobody + >=acct-user/systemd-journal-remote-0-r1 + >=acct-user/systemd-coredump-0-r1 + >=acct-user/systemd-network-0-r1 + acct-user/systemd-oom + >=acct-user/systemd-resolve-0-r1 + >=acct-user/systemd-timesync-0-r1 + >=sys-apps/baselayout-2.2 + ukify? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep "${PEFILE_DEPEND}") + ) + selinux? ( + sec-policy/selinux-base-policy[systemd] + sec-policy/selinux-ntp + ) + sysv-utils? ( + !sys-apps/openrc[sysv-utils(-)] + !sys-apps/sysvinit + ) + !sysv-utils? ( sys-apps/sysvinit ) + resolvconf? ( !net-dns/openresolv ) + !sys-apps/hwids[udev] + !sys-auth/nss-myhostname + !sys-fs/eudev + !sys-fs/udev +" + +# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) +PDEPEND=">=sys-apps/dbus-1.9.8[systemd] + >=sys-fs/udev-init-scripts-34 + policykit? ( sys-auth/polkit ) + !vanilla? ( sys-apps/gentoo-systemd-integration )" + +BDEPEND=" + app-arch/xz-utils:0 + dev-util/gperf + >=dev-build/meson-0.46 + >=sys-apps/coreutils-8.16 + sys-devel/gettext + virtual/pkgconfig + test? ( + app-text/tree + dev-lang/perl + sys-apps/dbus + ) + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt:0 + ${PYTHON_DEPS} + $(python_gen_cond_dep " + dev-python/jinja[\${PYTHON_USEDEP}] + dev-python/lxml[\${PYTHON_USEDEP}] + boot? ( + >=dev-python/pyelftools-0.30[\${PYTHON_USEDEP}] + test? ( ${PEFILE_DEPEND} ) + ) + ") +" + +QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" +QA_EXECSTACK="usr/lib/systemd/boot/efi/*" + +pkg_pretend() { + if use split-usr; then + eerror "Please complete the migration to merged-usr." + eerror "https://wiki.gentoo.org/wiki/Merge-usr" + die "systemd no longer supports split-usr" + fi + if [[ ${MERGE_TYPE} != buildonly ]]; then + local CONFIG_CHECK="~BLK_DEV_BSG ~CGROUPS + ~CGROUP_BPF ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE + ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS + ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS + ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH + ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED + ~!SYSFS_DEPRECATED_V2" + + use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" + use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" + + if kernel_is -ge 5 10 20; then + CONFIG_CHECK+=" ~KCMP" + else + CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" + fi + + if kernel_is -ge 4 18; then + CONFIG_CHECK+=" ~AUTOFS_FS" + else + CONFIG_CHECK+=" ~AUTOFS4_FS" + fi + + 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 + if linux_chkconfig_present X86; then + CONFIG_CHECK+=" ~DMIID" + fi + fi + + if kernel_is -lt ${MINKV//./ }; then + ewarn "Kernel version at least ${MINKV} required" + fi + + check_extra_config + fi +} + +pkg_setup() { + use boot && secureboot_pkg_setup +} + +src_unpack() { + default + [[ ${PV} != 9999 ]] || git-r3_src_unpack +} + +src_prepare() { + local PATCHES=( + "${FILESDIR}/systemd-test-process-util.patch" + ) + + if ! use vanilla; then + PATCHES+=( + "${FILESDIR}/gentoo-generator-path-r2.patch" + "${FILESDIR}/gentoo-journald-audit-r1.patch" + ) + fi + + default +} + +src_configure() { + # Prevent conflicts with i686 cross toolchain, bug 559726 + tc-export AR CC NM OBJCOPY RANLIB + + python_setup + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( + --localstatedir="${EPREFIX}/var" + # default is developer, bug 918671 + -Dmode=release + -Dsupport-url="https://gentoo.org/support/" + -Dpamlibdir="$(getpam_mod_dir)" + # avoid bash-completion dep + -Dbashcompletiondir="$(get_bashcompdir)" + -Dsplit-bin=false + # Disable compatibility with sysvinit + -Dsysvinit-path= + -Dsysvrcnd-path= + # Avoid infinite exec recursion, bug 642724 + -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit" + # no deps + -Dima=true + -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified) + # Match /etc/shells, bug 919749 + -Ddebug-shell="${EPREFIX}/bin/sh" + -Ddefault-user-shell="${EPREFIX}/bin/bash" + # Optional components/dependencies + $(meson_native_use_bool acl) + $(meson_native_use_bool apparmor) + $(meson_native_use_bool audit) + $(meson_native_use_bool boot bootloader) + $(meson_native_use_bool cryptsetup libcryptsetup) + $(meson_native_use_bool curl libcurl) + $(meson_native_use_bool dns-over-tls dns-over-tls) + $(meson_native_use_bool elfutils) + $(meson_native_use_bool fido2 libfido2) + $(meson_use gcrypt) + $(meson_native_use_bool gnutls) + $(meson_native_use_bool homed) + $(meson_native_use_bool http microhttpd) + $(meson_native_use_bool idn) + $(meson_native_use_bool importd) + $(meson_native_use_bool importd bzip2) + $(meson_native_use_bool importd zlib) + $(meson_native_use_bool kernel-install) + $(meson_native_use_bool kmod) + $(meson_use lz4) + $(meson_use lzma xz) + $(meson_use test tests) + $(meson_use zstd) + $(meson_native_use_bool iptables libiptc) + $(meson_native_use_bool openssl) + $(meson_use pam) + $(meson_native_use_bool pkcs11 p11kit) + $(meson_native_use_bool pcre pcre2) + $(meson_native_use_bool policykit polkit) + $(meson_native_use_bool pwquality) + $(meson_native_use_bool qrcode qrencode) + $(meson_native_use_bool seccomp) + $(meson_native_use_bool selinux) + $(meson_native_use_bool tpm tpm2) + $(meson_native_use_bool test dbus) + $(meson_native_use_bool ukify) + $(meson_native_use_bool xkb xkbcommon) + -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" + # Breaks screen, tmux, etc. + -Ddefault-kill-user-processes=false + -Dcreate-log-dirs=false + + # multilib options + $(meson_native_true backlight) + $(meson_native_true binfmt) + $(meson_native_true coredump) + $(meson_native_true environment-d) + $(meson_native_true firstboot) + $(meson_native_true hibernate) + $(meson_native_true hostnamed) + $(meson_native_true ldconfig) + $(meson_native_true localed) + $(meson_native_true man) + $(meson_native_true networkd) + $(meson_native_true quotacheck) + $(meson_native_true randomseed) + $(meson_native_true rfkill) + $(meson_native_true sysusers) + $(meson_native_true timedated) + $(meson_native_true timesyncd) + $(meson_native_true tmpfiles) + $(meson_native_true vconsole) + $(meson_native_enabled vmspawn) + ) + + meson_src_configure "${myconf[@]}" +} + +multilib_src_test() { + ( + unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR + export COLUMNS=80 + addpredict /dev + addpredict /proc + addpredict /run + addpredict /sys/fs/cgroup + meson_src_test --timeout-multiplier=10 + ) || die +} + +multilib_src_install_all() { + # meson doesn't know about docdir + mv "${ED}"/usr/share/doc/{systemd,${PF}} || die + + einstalldocs + dodoc "${FILESDIR}"/nsswitch.conf + + insinto /usr/lib/tmpfiles.d + doins "${FILESDIR}"/legacy.conf + + if ! use resolvconf; then + rm -f "${ED}"/usr/bin/resolvconf || die + fi + + if ! use sysv-utils; then + rm "${ED}"/usr/bin/{halt,init,poweroff,reboot,shutdown} || die + rm "${ED}"/usr/share/man/man1/init.1 || die + rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,shutdown}.8 || die + fi + + # https://bugs.gentoo.org/761763 + rm -r "${ED}"/usr/lib/sysusers.d || die + + # Preserve empty dirs in /etc & /var, bug #437008 + keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} + keepdir /etc/kernel/install.d + keepdir /etc/systemd/{network,system,user} + keepdir /etc/udev/rules.d + + keepdir /etc/udev/hwdb.d + + keepdir /usr/lib/systemd/{system-sleep,system-shutdown} + keepdir /usr/lib/{binfmt.d,modules-load.d} + keepdir /usr/lib/systemd/user-generators + keepdir /var/lib/systemd + keepdir /var/log/journal + + if use pam; then + newpamd "${FILESDIR}"/systemd-user.pam systemd-user + fi + + if use kernel-install; then + # Dummy config, remove to make room for sys-kernel/installkernel + rm "${ED}/usr/lib/kernel/install.conf" || die + fi + + use ukify && python_fix_shebang "${ED}" + use boot && secureboot_auto_sign +} + +migrate_locale() { + local envd_locale_def="${EROOT}/etc/env.d/02locale" + local envd_locale=( "${EROOT}"/etc/env.d/??locale ) + local locale_conf="${EROOT}/etc/locale.conf" + + if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then + # If locale.conf does not exist... + if [[ -e ${envd_locale} ]]; then + # ...either copy env.d/??locale if there's one + ebegin "Moving ${envd_locale} to ${locale_conf}" + mv "${envd_locale}" "${locale_conf}" + eend ${?} || FAIL=1 + else + # ...or create a dummy default + ebegin "Creating ${locale_conf}" + cat > "${locale_conf}" <<-EOF + # This file has been created by the sys-apps/systemd ebuild. + # See locale.conf(5) and localectl(1). + + # LANG=${LANG} + EOF + eend ${?} || FAIL=1 + fi + fi + + if [[ ! -L ${envd_locale} ]]; then + # now, if env.d/??locale is not a symlink (to locale.conf)... + if [[ -e ${envd_locale} ]]; then + # ...warn the user that he has duplicate locale settings + ewarn + ewarn "To ensure consistent behavior, you should replace ${envd_locale}" + ewarn "with a symlink to ${locale_conf}. Please migrate your settings" + ewarn "and create the symlink with the following command:" + ewarn "ln -s -n -f ../locale.conf ${envd_locale}" + ewarn + else + # ...or just create the symlink if there's nothing here + ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" + ln -n -s ../locale.conf "${envd_locale_def}" + eend ${?} || FAIL=1 + fi + fi +} + +pkg_preinst() { + if [[ -e ${EROOT}/etc/sysctl.conf ]]; then + # Symlink /etc/sysctl.conf for easy migration. + dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf + fi + + if ! use boot && has_version "sys-apps/systemd[gnuefi(-)]"; then + ewarn "The 'gnuefi' USE flag has been renamed to 'boot'." + ewarn "Make sure to enable the 'boot' USE flag if you use systemd-boot." + fi +} + +pkg_postinst() { + systemd_update_catalog + + # Keep this here in case the database format changes so it gets updated + # when required. + systemd-hwdb --root="${ROOT}" update + + udev_reload || FAIL=1 + + # Bug 465468, make sure locales are respected, and ensure consistency + # between OpenRC & systemd + migrate_locale + + if [[ -z ${REPLACING_VERSIONS} ]]; then + if type systemctl &>/dev/null; then + systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1 + fi + elog "To enable a useful set of services, run the following:" + elog " systemctl preset-all --preset-mode=enable-only" + fi + + if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then + rm "${EROOT}/var/lib/systemd/timesync" + fi + + if [[ -z ${ROOT} && -d /run/systemd/system ]]; then + ebegin "Reexecuting system manager (systemd)" + systemctl daemon-reexec + eend $? || FAIL=1 + + # https://lists.freedesktop.org/archives/systemd-devel/2024-June/050466.html + ebegin "Signaling user managers to reexec" + systemctl kill --kill-whom='main' --signal='SIGRTMIN+25' 'user@*.service' + eend $? + fi + + if [[ ${FAIL} ]]; then + eerror "One of the postinst commands failed. Please check the postinst output" + eerror "for errors. You may need to clean up your system and/or try installing" + eerror "systemd again." + eerror + fi + + if use boot; then + optfeature "installing kernels in systemd-boot's native layout and update loader entries" \ + "sys-kernel/installkernel[systemd-boot]" + fi + if use ukify; then + optfeature "generating unified kernel image on each kernel installation" \ + "sys-kernel/installkernel[ukify]" + fi +} + +pkg_prerm() { + # If removing systemd completely, remove the catalog database. + if [[ ! ${REPLACED_BY_VERSION} ]]; then + rm -f -v "${EROOT}"/var/lib/systemd/catalog/database + fi +} -- cgit v1.2.3