From 91b873ea3e20149dbb554dc214611efa4627962a Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 9 Nov 2023 10:28:50 +0000 Subject: gentoo auto-resync : 09:11:2023 - 10:28:50 --- sys-apps/Manifest.gz | Bin 49500 -> 49501 bytes sys-apps/debianutils/Manifest | 6 +- sys-apps/debianutils/debianutils-5.14.ebuild | 2 +- sys-apps/debianutils/debianutils-5.7.ebuild | 2 +- sys-apps/debianutils/debianutils-5.8.ebuild | 2 +- sys-apps/systemd-utils/Manifest | 4 +- sys-apps/systemd-utils/metadata.xml | 2 + .../systemd-utils/systemd-utils-254.5-r1.ebuild | 551 -------------------- .../systemd-utils/systemd-utils-254.5-r2.ebuild | 575 +++++++++++++++++++++ sys-apps/systemd/Manifest | 6 +- sys-apps/systemd/metadata.xml | 2 + sys-apps/systemd/systemd-254.5-r1.ebuild | 525 +++++++++++++++++++ sys-apps/systemd/systemd-254.5.ebuild | 525 ------------------- sys-apps/systemd/systemd-9999.ebuild | 22 +- 14 files changed, 1126 insertions(+), 1098 deletions(-) delete mode 100644 sys-apps/systemd-utils/systemd-utils-254.5-r1.ebuild create mode 100644 sys-apps/systemd-utils/systemd-utils-254.5-r2.ebuild create mode 100644 sys-apps/systemd/systemd-254.5-r1.ebuild delete mode 100644 sys-apps/systemd/systemd-254.5.ebuild (limited to 'sys-apps') diff --git a/sys-apps/Manifest.gz b/sys-apps/Manifest.gz index 1e1cfabfa305..963f733c5738 100644 Binary files a/sys-apps/Manifest.gz and b/sys-apps/Manifest.gz differ diff --git a/sys-apps/debianutils/Manifest b/sys-apps/debianutils/Manifest index e58e6612810a..b8afb0da193d 100644 --- a/sys-apps/debianutils/Manifest +++ b/sys-apps/debianutils/Manifest @@ -2,7 +2,7 @@ AUX debianutils-3.4.2-no-bs-namespace.patch 1168 BLAKE2B 1951a40e7f3c2a872a7dbe3 DIST debianutils_5.14.tar.xz 79676 BLAKE2B b8e6c5a38cf5fe8e3d8151b1c19cfda4d5866f805453eeb8376a94e1982653cb532ffefdb560f188574ba01e97249b49b69d41f1dda9aa76de4511034736965a SHA512 4a152fec6c363c0ca26339bf8bf3f39ec3c10227bbfe5d2f5974c24a6207fdb6c34644ecfdf0c773d4c778b1a95f91a15697b12b5c0cd9a6d0d8f369373b956f DIST debianutils_5.7.orig.tar.gz 257231 BLAKE2B 61d2e7abcd359c5dc87b7f91e510e91e1926183c15a572c7d87cf4a590dded2e2ee8c9b4e06f7f478353139870c808927575de233200ad69e084a6f971c4bd24 SHA512 79acd8885abca93842d696167171a359011c49a40f38deeb25bc94d62905f95afa3a7b2540d3bd4b0ffd363c5c48a439a1a68139a29d6c033980b019cea75d92 DIST debianutils_5.8.orig.tar.gz 260865 BLAKE2B 8a2bb3dc06d6e7a41ca53759610c432eaf3797135b13d717d1e8969926388a6955ba020db64a039d1b8dc06a8ee47d5bc960c6f54fe6b9c17e2b361f5636ece3 SHA512 7fddff17804ab334ac1ab3fa4b76a3fed8d83dc2dbf8d9ab1e486b5f226ac8363e98336cfa651c7630eef5fffa4551dbf7a5da1ba60f033b279f9aca624d58a2 -EBUILD debianutils-5.14.ebuild 1045 BLAKE2B cff1c6378831c0a0a3e58843ee0d106adbb9ca29cb1203ebfbe8fd6850a5912195c16bfbe9aad119ef7251c48099fe82885d245766e26422ab20efc0f2e022d3 SHA512 5db059b7bac0268a321acdf6e7bf23ace425ea2c979b8f94d04acfec36b14fd687281eb96aee24d327df69c7724d74112c6a471cc7707fbcd2aa5c9cfd910f68 -EBUILD debianutils-5.7.ebuild 1044 BLAKE2B d8175b35f5ee63c395a7d7b87306bfd25be41c19d80890c218b8d6c61ecdc3cbea1fe5a90f17f23ce43269ec56f1252ae4c151319650fa931b6aaccf94c08a26 SHA512 8fdd414115cacc0c61ae0ce411ecaa724a0173c6d9f15c2664c900e62312bb7bcceb2175deea019d1ea374c56c66b89a43e4c2c316d88e9222495438e8d81593 -EBUILD debianutils-5.8.ebuild 1044 BLAKE2B c06d03032f3a3c942651c815df94d47dd8a4e362c15321f56f5f5393a7c2dd85f87783d77fb6dc1211e04cf9eaec34fe166965a74aefa7b8cad1643b72b5603e SHA512 2a05179432bac0a180e4a7a0ecb1070c77d6376b32c0584c8d3251bfa0adc6da7d4ebc0d744c8cb39c0bcc0fdcdffd7ffd5fbd33647bf87867dbd91dae833e4b +EBUILD debianutils-5.14.ebuild 1040 BLAKE2B 31af95bca897d477781362895b6cf95c11cd7e40ddd5536ffeb158cd0e33cc3f09ddbe855e60ba35ddebc5037543f7b344dc8997d7f97ba3960d193cad35ef99 SHA512 dff83c29f454184345c65da92cfcd8a6be0b3f1d91662b3024a5d429479fbb317606c8eeec4fada08fddf20e9304530bd81491a8fcaa335db363503a0c9c936c +EBUILD debianutils-5.7.ebuild 1039 BLAKE2B 04c53fe5e25a5cd42d83814f80276856a1c4cf4de440d0cb65b938b88d8780baa63263c96ea06aff33bacbeecdc78aa04c119ef3f0f28eadc7d5fde65623ea1d SHA512 63e083f40384ee0d7c628a8873b6ec8005b79989179b01e5c571c5dde978f00d16b0aaebe614c8b350dcb0f4deb5f542fefb2df3802f694f72bebeab1152640f +EBUILD debianutils-5.8.ebuild 1039 BLAKE2B 829181bfaf9889fa257bd5b98a56b10841a0ca374b6dd106b361deef1092d648518603737f54ea952a3baab72783b8354b22f80fd0394a84c4c63be0f4914834 SHA512 d3338695d51db6a02c130105f68a0878964cc0310feb30cc5b08f771d2a964e3a92bb991017bf565466235aa60626079e0139839c303f7e759d77f90c71fa637 MISC metadata.xml 446 BLAKE2B a681b76916f27a5d016fa34c6c6ce4abe887c1f46232cb6cd759ba699eca0cba865ff7b0d33900b1f9e858e016532815b18bf86cc211b97f57a1c0a56580d125 SHA512 c080d8ae5511a0870aa778f744518a2482e7d61ff9e653a808b3959571b8bb47dc90b1b1f2feaccc323df0521f4ae91efb43fa31bd6c8a72075c8b2e9dfeb829 diff --git a/sys-apps/debianutils/debianutils-5.14.ebuild b/sys-apps/debianutils/debianutils-5.14.ebuild index f56e99e6a6b0..c71e9cb0196b 100644 --- a/sys-apps/debianutils/debianutils-5.14.ebuild +++ b/sys-apps/debianutils/debianutils-5.14.ebuild @@ -18,7 +18,7 @@ PDEPEND=" installkernel? ( || ( sys-kernel/installkernel-gentoo - sys-kernel/installkernel-systemd-boot + sys-kernel/installkernel-systemd ) ) " diff --git a/sys-apps/debianutils/debianutils-5.7.ebuild b/sys-apps/debianutils/debianutils-5.7.ebuild index 358f820b7322..0cc841149e59 100644 --- a/sys-apps/debianutils/debianutils-5.7.ebuild +++ b/sys-apps/debianutils/debianutils-5.7.ebuild @@ -18,7 +18,7 @@ PDEPEND=" installkernel? ( || ( sys-kernel/installkernel-gentoo - sys-kernel/installkernel-systemd-boot + sys-kernel/installkernel-systemd ) )" diff --git a/sys-apps/debianutils/debianutils-5.8.ebuild b/sys-apps/debianutils/debianutils-5.8.ebuild index 3bd7fca2ed79..1909cc22de71 100644 --- a/sys-apps/debianutils/debianutils-5.8.ebuild +++ b/sys-apps/debianutils/debianutils-5.8.ebuild @@ -18,7 +18,7 @@ PDEPEND=" installkernel? ( || ( sys-kernel/installkernel-gentoo - sys-kernel/installkernel-systemd-boot + sys-kernel/installkernel-systemd ) )" diff --git a/sys-apps/systemd-utils/Manifest b/sys-apps/systemd-utils/Manifest index 53bf250f1b12..b0b487cad2ec 100644 --- a/sys-apps/systemd-utils/Manifest +++ b/sys-apps/systemd-utils/Manifest @@ -11,5 +11,5 @@ DIST systemd-stable-253.12.tar.gz 12117485 BLAKE2B 8ed9e5a081c59a304698c8194fd15 DIST systemd-stable-254.5.tar.gz 14334696 BLAKE2B 2f63d79ae93add69ac0b56dda9f67019340f84692de4da200557b9f5f1f16bebbad42a9a7e2d6ef7420aa37746d2ede0481fd8e39f03a31576c7e4e48e259ce3 SHA512 cac713670216add9e5473e2c86f04da441015e7cc0ac1500b9e1489a435f9b80c4c6ee24e9b22e4c4213a495bc1a0a908925df2045e344a2170d5aea6aafa16c EBUILD systemd-utils-253.11-r1.ebuild 12608 BLAKE2B aa3fc7468ada1b120d868cdbc94eeb22a5a4ec7ddbcca37d364cd996094021c82e8c98a2ff1e42f04cf57314ceb9a48b1edf7df3976de926fbfe208f422dd459 SHA512 51739b8478efb3bbf326b8681bb51adc2e150316fcae68984d68cbc05389e09c45da06cc77bb96ff2d43ad6c1951b91e05d41377e02684aa873d7c603e183d4d EBUILD systemd-utils-253.12-r1.ebuild 12616 BLAKE2B ba823f24fc2b19f5aa9ca1ff9df8521efe9847d5440cd3dfa35c912f5b8d32418cc13220e8e50422350f0dd1812f38a6c06c44d9e518aad3ebca9d17d4564029 SHA512 abb188db7c96f7a2afb022fb548106870f876fbeeac5cb415b2ef26fd34254ddad0568d6f74c1165dbb2549c5d144d7bfabef7aedf6ce120c1c1b339ccda4e16 -EBUILD systemd-utils-254.5-r1.ebuild 12535 BLAKE2B 1b0bc042a678b70c5e62001e84f6227696cba0123229a68b992f5fba0807345bb1ef6aac66e944ca797dadfb69fc95c872b3a28453a5ae0947f327a68f0cb234 SHA512 f622e19c0fe73c2775bd0eaa32c10eba0ee70c05bff1f9172640ac768a1680c701d3fa8f1b603aab1bf6ac09292a7710291c7b3abd21ab12e31b34fc3a377506 -MISC metadata.xml 713 BLAKE2B 1dcb5d9949600c9a8c8ac0c005ffa03b2ca91293a932fa96092a24c094e9fb29f2cf063af041432c12daec4aa4e60d11ea77ed0a423e188095f995c68e75b91a SHA512 46d167a6d898abfc56130e373d232c18fb3ef8865755379fa7678c049515458e7354b7a8cab3bf3faa7326932cccceb0b0745b4695ab9bea492bc2344abf9da4 +EBUILD systemd-utils-254.5-r2.ebuild 13076 BLAKE2B b3da8f4d0f6ce116618e6f7885b41bc0ef5724b1ec3d58b7fd080494a29bb101dddab4e0fc278a50ba340c1988055fe6a5ee352bc1aad33012226a1ee4d15dad SHA512 90b6f053e921aa6d80b19d484a5f5ac8f74325f1d4e2e08e379a1fb53456e7250b60e9969b6b3ca7e5ce26ac6215d419742e81f36decc6ebbb3d47b2f1f35e27 +MISC metadata.xml 821 BLAKE2B 6bef03e6675a5b12c8df50bdea38186cdd89d28451a8fbc2d1af1946c4c0978ae9e7a0153506a1c26c2e24b2f8569c168fc30c79e48f2b804666f2feaa728b13 SHA512 eb7e2dee51117fcd21417c37ab0283f2f10aff20d0fbe6762ee2bca2c7888e5a5835fe5195a1dcbf298d80105e3aa84f36f897088804b5f0a1ed38ad673f2603 diff --git a/sys-apps/systemd-utils/metadata.xml b/sys-apps/systemd-utils/metadata.xml index a5585a7ca034..e2af023a5096 100644 --- a/sys-apps/systemd-utils/metadata.xml +++ b/sys-apps/systemd-utils/metadata.xml @@ -6,10 +6,12 @@ Enable systemd-boot (UEFI boot manager) + Enable kernel-install Enable kernel module loading via sys-apps/kmod Enable systemd-sysusers Enable systemd-tmpfiles Enable systemd-udev (userspace device manager) + Enable systemd-ukify systemd/systemd diff --git a/sys-apps/systemd-utils/systemd-utils-254.5-r1.ebuild b/sys-apps/systemd-utils/systemd-utils-254.5-r1.ebuild deleted file mode 100644 index 12e727d7e3fa..000000000000 --- a/sys-apps/systemd-utils/systemd-utils-254.5-r1.ebuild +++ /dev/null @@ -1,551 +0,0 @@ -# Copyright 2022-2023 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 python-single-r1 -inherit 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 selinux split-usr sysusers +tmpfiles test +udev" -REQUIRED_USE=" - || ( boot tmpfiles sysusers udev ) - ${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}/${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 selinux) - $(meson_native_use_bool sysusers) - $(meson_use test tests) - $(meson_native_use_bool tmpfiles) - $(meson_use udev hwdb) - - # 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 - kernel-install - man/bootctl.1 - man/kernel-install.8 - 90-loaderentry.install - src/boot/efi/linux$(efi_arch).efi.stub - src/boot/efi/systemd-boot$(efi_arch).efi - ) - 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 - 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 kernel-install - doman man/{bootctl.1,kernel-install.8} - # 90-loaderentry.install is generated from 90-loaderentry.install.in - exeinto usr/lib/kernel/install.d - doexe src/kernel-install/*.install - insinto usr/lib/systemd/boot/efi - doins src/boot/efi/{linux$(efi_arch).{efi,elf}.stub,systemd-boot$(efi_arch).efi} - 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 - 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 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 -} diff --git a/sys-apps/systemd-utils/systemd-utils-254.5-r2.ebuild b/sys-apps/systemd-utils/systemd-utils-254.5-r2.ebuild new file mode 100644 index 000000000000..d31c70d4444c --- /dev/null +++ b/sys-apps/systemd-utils/systemd-utils-254.5-r2.ebuild @@ -0,0 +1,575 @@ +# Copyright 2022-2023 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 python-single-r1 +inherit 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 +} diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest index 5421214d4d55..aaf7c910ca65 100644 --- a/sys-apps/systemd/Manifest +++ b/sys-apps/systemd/Manifest @@ -17,6 +17,6 @@ EBUILD systemd-253.3-r1.ebuild 14579 BLAKE2B ec9e31176bad8f142e224369a868b275fac EBUILD systemd-253.6.ebuild 14661 BLAKE2B 4d08e0b78f8748ae78b9eaded181c740bc5c5f78f83fe7dc61cc9738658bedd6811e0d214c32e719e96898ad70008d15e527e12b7df17b122f3d9ce45505e94a SHA512 1d5ee451cf3a0494399c2f30c9cf5e93be11bcfce4c5a834521b4a2de1da7c80ba60b1195d142fb92ffbaf1a69e524849c15bb729ba2dbcab9f2956c08a559de EBUILD systemd-254.3.ebuild 14824 BLAKE2B 30302795c1190012a9ea1540fc4f6b04d35d27afdac5aa170a2ea0082183f51448631b653a4cfbb98befaa6f0df1d07c0c59d4e467ba74d5bba01b53cdc7fd18 SHA512 b1d9acd433a6b5606361c59ff5afb51179ca98213629bbe7b26d55f8f4b7fd80a7beee57e5e9588360a0e62d79a6a2de9fad75d72499b5ae19968a831a422608 EBUILD systemd-254.4.ebuild 14824 BLAKE2B 30302795c1190012a9ea1540fc4f6b04d35d27afdac5aa170a2ea0082183f51448631b653a4cfbb98befaa6f0df1d07c0c59d4e467ba74d5bba01b53cdc7fd18 SHA512 b1d9acd433a6b5606361c59ff5afb51179ca98213629bbe7b26d55f8f4b7fd80a7beee57e5e9588360a0e62d79a6a2de9fad75d72499b5ae19968a831a422608 -EBUILD systemd-254.5.ebuild 14819 BLAKE2B aa8d2c3ea7510b1579ae2386040c000a3be561913b33e4a036434701005efb3c1c3ae8ab6b5d44a8733bdcab0bc03008916ac0e431bfb9591598da957f06e6ee SHA512 1bb7226d88840b743d2813ef9abd462935586b37d594f5f7ad10f00efe1cf0fb2f1a5474458cb8667051c0644ac81ec22b2aa3fd0a1593e7e04bc757f2f8f9cc -EBUILD systemd-9999.ebuild 13878 BLAKE2B daccb868d6a012322019329cd171c31a773e12cfb8838b2ad2e5107bba6caedd308c33559d310439b5e369be433c71682944f75e008df8e6c7ca1a2d3dba4c17 SHA512 095f8e6a23aaf20939a1eec930c5f4bdf122a1b3fe2320d9e4471294acc426f765e867d4e77839087f7066c0a33e4e905d94e7e03c551431e5bb955b38feeb0c -MISC metadata.xml 2612 BLAKE2B 60495769a304d0623f73de8eb305770eb93706fdcbea158a2de2beb72e5d04495fc5ef45b4e55d3003a9a70bc3f60a7a5d6880aaac9512647132be69f96112ad SHA512 397f63a498b46647edfb665f92680197607de5edef42c3c17ab96abf94f117d82eda4863bf138329e25880609e8c631e9d154277e8a548eafbe87e8b83e47ccc +EBUILD systemd-254.5-r1.ebuild 14964 BLAKE2B 5bde714048b0ba5ad7bd18c718a657f448f0fec150bf1ba40882500414b37dd4bbb6a88fc61aa3aebb1eb6d47b71b0b78bad2868959ce8df74d2b9531f99d28a SHA512 853e414190f6f1f4bc6c27eac86738a09788434f74095ca1781f007aa83c891feef99b359ccc4f12130bcec508e1424fd4283f2642a7d613b09758692e4c1814 +EBUILD systemd-9999.ebuild 14023 BLAKE2B 534827f44ee655a3a8a2eb4af2aa02012815d51f18fe3a32b5af90bbc9472b02b9b4d6a7bbb780ccf0541874677298b5df485b439dec5d7e2af12ee030ca0501 SHA512 2f08adb171c7cc86372b90956b0e45aff921e3502ccf819397cd12ae219b66cbd198ee428b2255edd8dd6aa880d18f3bc2ec4bdaa50993707ebe9af8266da37c +MISC metadata.xml 2720 BLAKE2B 44456625ba29d7e5929d9f778bf5559a52a480eb10630b870029280532ea8ee204572161d55337d1b4dcfd7c4e20636f7f84a55326612b469b010a344eca0f14 SHA512 748db9ab9d477583377c55fad5ad5417f94b598f3c1479aac3735465a85a1004c9395d929450b3078f9d08f76963a4d5583333da0e81e2f8dbd8d5cb74882275 diff --git a/sys-apps/systemd/metadata.xml b/sys-apps/systemd/metadata.xml index 9576ddd514ee..abd1315edcc4 100644 --- a/sys-apps/systemd/metadata.xml +++ b/sys-apps/systemd/metadata.xml @@ -23,6 +23,7 @@ Enable embedded HTTP server in journald Enable import daemon Use libiptc from net-firewall/iptables for NAT support in systemd-networkd; this is used only if the running kernel does not support nftables + Enable kernel-install Enable kernel module loading via sys-apps/kmod Enable lz4 compression for the journal Enable use of dev-libs/openssl for various features @@ -32,6 +33,7 @@ Install resolvconf symlink for systemd-resolve Install sysvinit compatibility symlinks and manpages for init, telinit, halt, poweroff, reboot, runlevel, and shutdown Enable TPM support + Enable systemd-ukify Disable Gentoo-specific behavior and compatibility quirks Depend on x11-libs/libxkbcommon to allow logind to control the X11 keymap diff --git a/sys-apps/systemd/systemd-254.5-r1.ebuild b/sys-apps/systemd/systemd-254.5-r1.ebuild new file mode 100644 index 000000000000..663677dee912 --- /dev/null +++ b/sys-apps/systemd/systemd-254.5-r1.ebuild @@ -0,0 +1,525 @@ +# Copyright 2011-2023 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 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-util/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 + if use test && has pid-sandbox ${FEATURES}; then + ewarn "Tests are known to fail with PID sandboxing enabled." + ewarn "See https://bugs.gentoo.org/674458." + fi + + 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-253-initrd-generators.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 +} + +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 + + 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 +} + +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-254.5.ebuild b/sys-apps/systemd/systemd-254.5.ebuild deleted file mode 100644 index 3fbd0bbf96e1..000000000000 --- a/sys-apps/systemd/systemd-254.5.ebuild +++ /dev/null @@ -1,525 +0,0 @@ -# Copyright 2011-2023 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 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 +kmod - +lz4 lzma +openssl pam pcre pkcs11 policykit pwquality qrcode - +resolvconf +seccomp selinux split-usr +sysv-utils test tpm 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 ) -" -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 - boot? ( - ${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-util/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 [[ ${MERGE_TYPE} != buildonly ]]; then - if use test && has pid-sandbox ${FEATURES}; then - ewarn "Tests are known to fail with PID sandboxing enabled." - ewarn "See https://bugs.gentoo.org/674458." - fi - - 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-253-initrd-generators.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 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 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 -} - -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 boot; then - python_fix_shebang "${ED}" - secureboot_auto_sign - fi -} - -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 -} - -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-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild index 7c6c59f40926..f4cfdbfefc00 100644 --- a/sys-apps/systemd/systemd-9999.ebuild +++ b/sys-apps/systemd/systemd-9999.ebuild @@ -36,9 +36,9 @@ 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 +kmod + 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 vanilla xkb +zstd + +resolvconf +seccomp selinux split-usr +sysv-utils test tpm ukify vanilla xkb +zstd " REQUIRED_USE=" ${PYTHON_REQUIRED_USE} @@ -47,6 +47,8 @@ REQUIRED_USE=" homed? ( cryptsetup pam openssl ) importd? ( curl lzma || ( gcrypt openssl ) ) pwquality? ( homed ) + boot? ( kernel-install ) + ukify? ( boot ) " RESTRICT="!test? ( test )" @@ -124,7 +126,7 @@ RDEPEND="${COMMON_DEPEND} >=acct-user/systemd-resolve-0-r1 >=acct-user/systemd-timesync-0-r1 >=sys-apps/baselayout-2.2 - boot? ( + ukify? ( ${PYTHON_DEPS} $(python_gen_cond_dep "${PEFILE_DEPEND}") ) @@ -170,10 +172,8 @@ BDEPEND=" $(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} ) - ) + boot? ( >=dev-python/pyelftools-0.30[\${PYTHON_USEDEP}] ) + ukify? ( test? ( ${PEFILE_DEPEND} ) ) ") " @@ -300,6 +300,7 @@ multilib_src_configure() { $(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) @@ -317,6 +318,7 @@ multilib_src_configure() { $(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. @@ -395,10 +397,8 @@ multilib_src_install_all() { newpamd "${FILESDIR}"/systemd-user.pam systemd-user fi - if use boot; then - python_fix_shebang "${ED}" - secureboot_auto_sign - fi + use ukify && python_fix_shebang "${ED}" + use boot && secureboot_auto_sign } migrate_locale() { -- cgit v1.2.3