From 3023707d355581e5dc6945aa9c8f4d59e508a8b5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 5 May 2023 11:30:40 +0100 Subject: gentoo auto-resync : 05:05:2023 - 11:30:40 --- sys-apps/Manifest.gz | Bin 49332 -> 49340 bytes sys-apps/systemd-utils/Manifest | 11 +- .../systemd-utils/systemd-utils-251.10-r1.ebuild | 549 --------------------- sys-apps/systemd-utils/systemd-utils-252.10.ebuild | 525 ++++++++++++++++++++ sys-apps/systemd-utils/systemd-utils-252.6.ebuild | 525 -------------------- sys-apps/systemd-utils/systemd-utils-252.7.ebuild | 525 -------------------- sys-apps/systemd-utils/systemd-utils-252.8.ebuild | 525 -------------------- sys-apps/systemd/Manifest | 8 +- .../systemd/files/252-no-stack-protector-bpf.patch | 26 - sys-apps/systemd/files/gentoo-journald-audit.patch | 40 -- sys-apps/systemd/systemd-252.7.ebuild | 509 ------------------- sys-apps/systemd/systemd-253.4.ebuild | 512 +++++++++++++++++++ sys-apps/systemd/systemd-9999.ebuild | 4 +- 13 files changed, 1044 insertions(+), 2715 deletions(-) delete mode 100644 sys-apps/systemd-utils/systemd-utils-251.10-r1.ebuild create mode 100644 sys-apps/systemd-utils/systemd-utils-252.10.ebuild delete mode 100644 sys-apps/systemd-utils/systemd-utils-252.6.ebuild delete mode 100644 sys-apps/systemd-utils/systemd-utils-252.7.ebuild delete mode 100644 sys-apps/systemd-utils/systemd-utils-252.8.ebuild delete mode 100644 sys-apps/systemd/files/252-no-stack-protector-bpf.patch delete mode 100644 sys-apps/systemd/files/gentoo-journald-audit.patch delete mode 100644 sys-apps/systemd/systemd-252.7.ebuild create mode 100644 sys-apps/systemd/systemd-253.4.ebuild (limited to 'sys-apps') diff --git a/sys-apps/Manifest.gz b/sys-apps/Manifest.gz index c85ceb39fd76..95f45ff2842b 100644 Binary files a/sys-apps/Manifest.gz and b/sys-apps/Manifest.gz differ diff --git a/sys-apps/systemd-utils/Manifest b/sys-apps/systemd-utils/Manifest index 2279fc2afddd..e57195d1a759 100644 --- a/sys-apps/systemd-utils/Manifest +++ b/sys-apps/systemd-utils/Manifest @@ -5,16 +5,9 @@ AUX legacy.conf 80 BLAKE2B 23eca4dd1743a5cf77767894d23d419c1663147c5aee6be971da6 AUX systemd-tmpfiles-clean 58 BLAKE2B 6a33f92a136218f3a27ea31e5cdd519706b15a3bba368f6f900d1d540f50493905a2cdab35ee3d216c9cb45e821251bfacc4965ad5a2ca7b1e1ae5627f4a3680 SHA512 3084eb1623b56cb09e4c9bd3e314a3e1d6d88f002149bea75b1c506a30b6345c51c7a90a1330baa5eec86ae6b90116f9970d8ff5add91929167df84bef6e82fe AUX systemd-tmpfiles-setup 329 BLAKE2B 7b4d801ec7c29a3d6073c47af8fa1c9fa670b3762c5358d0008ecf372e675e3f65cba3ea453d374c5e23453cfe32252421b69dff23aaeea636c611b960eb7b11 SHA512 cd7f7c69d1b1861cb4eac90d44579361e365ee77906376b6124ff79ba1c0d414b8891ffca19e715585d7400bddc5e9ad973f191125039a4a2c37acb95a111c37 AUX systemd-tmpfiles-setup-dev 342 BLAKE2B 95956e57d4f2aa10a09f23c08045ceed6fac3c569ee604a83707310f074740a41832d2e3fa3b528a3816202132e18be50ce40dbcded9430031ed9a2a172d3187 SHA512 3c5e29fc5bc2829984458149de1186075eec48775983376a8b47da162cbf4892754f19a3b277170f8b759a862bb5d910789da1db2bbf8447d6dacccb411be222 -DIST systemd-musl-patches-251.2.tar.gz 28512 BLAKE2B 4ac6a5220dab8409962a3954af2fb2484af718d0f282129957236ce241fbe8538a90d507a96c7c3d86f4f408ab784a6888b37486405d3276e7734a1bd5aa9680 SHA512 6e56b62234ac54929faea5a7cad699d0b932f869b48e3ba4e1f349a88653b7c787efec24a09b00290c3dc566614e3c1dc2f3c04f04e943f513108a91eca1be82 DIST systemd-musl-patches-252.4.tar.gz 25053 BLAKE2B 1d75f85ea0c48c788e9199e2d919bac90edce16a9788a349332cf308c32fb9510ac2883f8e09f21e7f37fbac2e557dc39cdf44dcd7a986587c40dedd2d1b5df5 SHA512 1dc8e220eae1869eb4bb50f9c701392542b053099cf9b6bde13f12a2d26fa29984819a8b4ce1b6c57e38a71f86324469a87cf9e22abe0f6d67ac3e84c6b9a3ba -DIST systemd-stable-251.10.tar.gz 11461671 BLAKE2B a351b6dd9fc307e4bdcf0323b16e7f58c714392cfa466180a81196309c289b54767bfe5d03037eb1bd6b273d7eb8f6f42b927aabaa1310be04266675d1a3dd06 SHA512 49e33dbbc1b2ebe123b2f722070c87524b3126d1e605fb3e24a3f9f328ab67de506dc4588a92caf157428c21b9c73c3884726c4a5b1f67bb997d4a68bb871e5b -DIST systemd-stable-252.6.tar.gz 11823064 BLAKE2B 0c260685c929b5271efba13d6ba84bc99211ead7d080b5e9b0d68428fe46a8a8a556b140787dd21f7b19e1454a78f15bf407038b3dc02a4d3db2336f3d881255 SHA512 948cb3f7c6a4bbc2bcc3ebe4f36afac304c9d694dadac7e363bbdb79f111eb5d69fd501433ba6719d79d833206a019cb40a37b16a92c8d22acbdd9736cdbdd37 -DIST systemd-stable-252.7.tar.gz 11825226 BLAKE2B 81ef2f6cbe7902014a92702c0eae740d18fc24355c186f51a0467668bb225d358a422fd02eec4c38063a3f65a9f1b1ebf88036c4e5cd0bfc50857d2818a42178 SHA512 691caea30d759afd3a1ad11495f7531c04238b080281617dceb1671ea3e27c7a6a4859961a81d29ecefb94b7a764e40283f39294e34beb63e0862777f5a8d34f -DIST systemd-stable-252.8.tar.gz 11829615 BLAKE2B 483c49ee0f96305d0c5bc9fef0bb8d093de4a1d2b1e418ace23d855ca0c07cb713d897e4917dba012abef5440a08d82be8449603ee695e3f9fd703925e125490 SHA512 d5112c50b60268513cfd04dc5bc12b696cd2336b1f73cfb13d3a555c3f49a899692b0b5fcca9128b2118670469b86f51a96b99ee9da1e5abab3918285b36ac5b +DIST systemd-stable-252.10.tar.gz 11841052 BLAKE2B 33ebca90ff17ef5983677c08c93a80350908aa4f4f1860d8e69c234ead926f0e21a4c4692c171f061e05e41c94d8fe2ba3a3be75fb7b582b86e851194a1f0203 SHA512 5309d8df51b5cda694e03e2ded574d4e3606916fab5d190b21fcd0284d8d8f56cab8b3423d7d0b90e44cd9775cc62bc26198f3d2a43f8aa545959b5c27b0dd9d DIST systemd-stable-252.9.tar.gz 11829389 BLAKE2B a45a72bfe113f8cb7424d731692f548c389f59d34b649e874db2f85868943b0a9c33ef62185c83c41a9c220caddd65c44ff328026eff19c3c7efda5efbd73574 SHA512 fa34b9c2f692af8f70dffc5044fe502ff5e21625af5b27cad7fc5e833570b180f53c5d03a0add785e83a5b4e7564117fe4728931df4ef599888c73e92c7f2103 -EBUILD systemd-utils-251.10-r1.ebuild 12736 BLAKE2B feea02da15486a055ea054da1b47688e892e2816098376b4dce8f0e01c37e21c232ec3976e7a2865ebc30a325adda7bfae4fad270814042411f0eef9e98aba22 SHA512 5f0f384d87d297619432563be3057179812d668f65c05f5e1424b028198597adb1026e8619f9943ed8b998e00a0ba0200947e826d1f6249a3b361e8bdc412f6b -EBUILD systemd-utils-252.6.ebuild 11814 BLAKE2B 3435d2fb36430fb2beb867bf12bd41e89c068093b25b60419e55f822a3e82288d4d6c8debcf40d6d1e6220c6379691dff465705a6043ebb8f3a8a0a5aa5c6516 SHA512 f90b4c02fecd64711d123ffeff8021a8af0c6a220ca40eba6ef85ad3b3a408e78f5125c51d59c3fdc411d4cd4abea9aa80b16842201cf71fbf4bd7d6d9d7a9a5 -EBUILD systemd-utils-252.7.ebuild 11806 BLAKE2B 47a6f40881f6ed002bfa21c652dc0ddf6813bc74f842e33428241fdb26fb4f8948188f53589258146fcb0a865719e7aafe138a8854e70ea5f46aa87c7b9f0851 SHA512 3c5483674b0a468f0d0f1e4346ffc5f8f6d9c306a0a79d8908d440e837eff96cd8d032f98a521c016db48c9a5bb8bfea45306f83ae82587b92e556a8637282e4 -EBUILD systemd-utils-252.8.ebuild 11814 BLAKE2B 3435d2fb36430fb2beb867bf12bd41e89c068093b25b60419e55f822a3e82288d4d6c8debcf40d6d1e6220c6379691dff465705a6043ebb8f3a8a0a5aa5c6516 SHA512 f90b4c02fecd64711d123ffeff8021a8af0c6a220ca40eba6ef85ad3b3a408e78f5125c51d59c3fdc411d4cd4abea9aa80b16842201cf71fbf4bd7d6d9d7a9a5 +EBUILD systemd-utils-252.10.ebuild 11815 BLAKE2B d25fdb6b3ea15768a7894807906e8b9bdf97e11d45d07886eb8361d214de82494986efb9757fd7ffdbffeeb99495404340013c86d2a24e928c6b744e10b050f1 SHA512 bf6ad12b10422b678d3b2110e4e27249dedb1a997d5c283bb9f48c32d593f96343ae0031721053d911a77ebcd12a3e509574eeecb8ab11c7dda5037bf52dd2ed EBUILD systemd-utils-252.9.ebuild 11806 BLAKE2B 47a6f40881f6ed002bfa21c652dc0ddf6813bc74f842e33428241fdb26fb4f8948188f53589258146fcb0a865719e7aafe138a8854e70ea5f46aa87c7b9f0851 SHA512 3c5483674b0a468f0d0f1e4346ffc5f8f6d9c306a0a79d8908d440e837eff96cd8d032f98a521c016db48c9a5bb8bfea45306f83ae82587b92e556a8637282e4 MISC metadata.xml 713 BLAKE2B 1dcb5d9949600c9a8c8ac0c005ffa03b2ca91293a932fa96092a24c094e9fb29f2cf063af041432c12daec4aa4e60d11ea77ed0a423e188095f995c68e75b91a SHA512 46d167a6d898abfc56130e373d232c18fb3ef8865755379fa7678c049515458e7354b7a8cab3bf3faa7326932cccceb0b0745b4695ab9bea492bc2344abf9da4 diff --git a/sys-apps/systemd-utils/systemd-utils-251.10-r1.ebuild b/sys-apps/systemd-utils/systemd-utils-251.10-r1.ebuild deleted file mode 100644 index 711bb3bae0b1..000000000000 --- a/sys-apps/systemd-utils/systemd-utils-251.10-r1.ebuild +++ /dev/null @@ -1,549 +0,0 @@ -# Copyright 2022-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -PYTHON_COMPAT=( python3_{9..11} ) - -if [[ ${PV} != 25[12].* ]] ; then - # The F_S=3 issues should be fixed in 253. - # - https://github.com/systemd/systemd/issues/22801 - # - https://github.com/systemd/systemd/pull/25967 - # - https://github.com/systemd/systemd/commit/7929e180aa47a2692ad4f053afac2857d7198758 - # - https://github.com/systemd/systemd/commit/4f79f545b3c46c358666c9f5f2b384fe50aac4b4 - die "Please remove the FORTIFY_SOURCE hacks in src_configure." -fi - -QA_PKGCONFIG_VERSION=$(ver_cut 1) - -inherit bash-completion-r1 flag-o-matic linux-info meson-multilib python-any-r1 -inherit 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-251.2" -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 )" -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 - boot? ( >=sys-boot/gnu-efi-3.0.2 ) -" -RDEPEND="${COMMON_DEPEND} - boot? ( != -O2, so we need - # to unset F_S first, then explicitly set 2, to negate any default - # and anything set by the user if they're choosing 3 (or if they've - # modified GCC to set 3). - # - if is-flagq '-O[23]' || is-flagq '-Ofast' ; then - # We can't unconditionally do this b/c we fortify needs - # some level of optimisation. - filter-flags -D_FORTIFY_SOURCE=3 - append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 - fi - - multilib-minimal_src_configure -} - -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 efi) - $(meson_native_use_bool boot gnu-efi) - $(meson_native_use_bool boot 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) - - -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" - - # Link staticly with libsystemd-shared - -Dlink-boot-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 - src/boot/efi/linux$(efi_arch).{efi,elf}.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 - ) - if use test; then - targets+=( test-tmpfiles ) - 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 - hwdb.d/60-autosuspend-chromiumos.hwdb - rules.d/50-udev-default.rules - rules.d/64-btrfs.rules - ) - if use test; then - targets+=( - # Used by udev-test.pl - systemd-detect-virt - test/sys - test-udev - - test-fido-id-desc - test-udev-builtin - test-udev-event - test-udev-netlink - test-udev-node - test-udev-util - ) - 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-tmpfiles - ) - fi - if use udev; then - tests+=( - rule-syntax-check - test-fido-id-desc - test-udev-builtin - test-udev-event - test-udev-netlink - test-udev-node - test-udev-util - ) - if [[ -w /dev ]]; then - tests+=( udev-test ) - else - ewarn "Skipping udev-test (needs write access to /dev)" - fi - 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} - 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} - 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} - - 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 - 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 - 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 -} - -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-252.10.ebuild b/sys-apps/systemd-utils/systemd-utils-252.10.ebuild new file mode 100644 index 000000000000..8660e0fc4c57 --- /dev/null +++ b/sys-apps/systemd-utils/systemd-utils-252.10.ebuild @@ -0,0 +1,525 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..11} ) + +QA_PKGCONFIG_VERSION=$(ver_cut 1) + +inherit bash-completion-r1 flag-o-matic linux-info meson-multilib python-any-r1 +inherit 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-252.4" +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 )" +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 + boot? ( >=sys-boot/gnu-efi-3.0.2 ) +" +RDEPEND="${COMMON_DEPEND} + boot? ( ! -Date: Fri, 13 Jan 2023 05:17:56 +0000 -Subject: [PATCH] bpf: disable -fstack-protector in meson - -In Gentoo, we recently started making Clang behave the same way as -our GCC, with -fstack-protector and some friends enabled by default. - -SSP doesn't make sense for BPF, so disable it explicitly. - -See also e.g. https://www.spinics.net/lists/netdev/msg556400.html. - -Bug: https://bugs.gentoo.org/890004 ---- a/src/core/bpf/meson.build -+++ b/src/core/bpf/meson.build -@@ -7,6 +7,7 @@ endif - bpf_clang_flags = [ - '-std=gnu11', - '-Wno-compare-distinct-pointer-types', -+ '-fno-stack-protector', - '-O2', - '-target', - 'bpf', - diff --git a/sys-apps/systemd/files/gentoo-journald-audit.patch b/sys-apps/systemd/files/gentoo-journald-audit.patch deleted file mode 100644 index 088bceb7696e..000000000000 --- a/sys-apps/systemd/files/gentoo-journald-audit.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 593db1c78011ddce551051ce17eda6feac079b3d Mon Sep 17 00:00:00 2001 -From: Mike Gilbert -Date: Fri, 21 Aug 2020 13:16:17 -0400 -Subject: [PATCH] journald: do not change the kernel audit setting by default - -Bug: https://bugs.gentoo.org/736910 ---- - man/journald.conf.xml | 2 +- - src/journal/journald-server.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/man/journald.conf.xml b/man/journald.conf.xml -index bfd359a903..7e93d4050e 100644 ---- a/man/journald.conf.xml -+++ b/man/journald.conf.xml -@@ -411,7 +411,7 @@ - systemd-journald collects generated audit records, it just controls whether it - tells the kernel to generate them. This means if another tool turns on auditing even if - systemd-journald left it off, it will still collect the generated -- messages. Defaults to on. -+ messages. - - - -diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c -index 5865bf9809..163be685a8 100644 ---- a/src/journal/journald-server.c -+++ b/src/journal/journald-server.c -@@ -2208,7 +2208,7 @@ int server_init(Server *s, const char *namespace) { - .compress.threshold_bytes = (uint64_t) -1, - .seal = true, - -- .set_audit = true, -+ .set_audit = -1, - - .watchdog_usec = USEC_INFINITY, - --- -2.28.0 - diff --git a/sys-apps/systemd/systemd-252.7.ebuild b/sys-apps/systemd/systemd-252.7.ebuild deleted file mode 100644 index b35c799db45f..000000000000 --- a/sys-apps/systemd/systemd-252.7.ebuild +++ /dev/null @@ -1,509 +0,0 @@ -# Copyright 2011-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{9..11} ) - -# 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 -inherit python-any-r1 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 cgroup-hybrid cryptsetup curl +dns-over-tls elfutils - fido2 +gcrypt gnuefi 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=" - 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} - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) -" - -# 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 - 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_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') -" - -python_check_deps() { - python_has_version "dev-python/jinja[${PYTHON_USEDEP}]" && - python_has_version "dev-python/lxml[${PYTHON_USEDEP}]" -} - -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() { - : -} - -src_unpack() { - default - [[ ${PV} != 9999 ]] || git-r3_src_unpack -} - -src_prepare() { - local PATCHES=( - "${FILESDIR}/252-no-stack-protector-bpf.patch" - ) - - if ! use vanilla; then - PATCHES+=( - "${FILESDIR}/gentoo-generator-path-r2.patch" - "${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch" - "${FILESDIR}/gentoo-journald-audit.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)" - # 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 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 gnuefi gnu-efi) - $(meson_native_use_bool gnutls) - -Defi-includedir="${ESYSROOT}/usr/include/efi" - -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" - $(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 - 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 - - if ! use resolvconf; then - rm -f "${ED}${rootprefix}/${sbin}"/resolvconf || die - fi - - rm "${ED}"/etc/init.d/README || die - rm "${ED}${rootprefix}"/lib/systemd/system-generators/systemd-sysv-generator || die - - if ! use sysv-utils; then - rm "${ED}${rootprefix}/${sbin}"/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die - rm "${ED}"/usr/share/man/man1/init.1 || die - rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die - fi - - if ! use resolvconf && ! use sysv-utils && use split-usr; then - rmdir "${ED}${rootprefix}"/sbin || 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 - - # Symlink /etc/sysctl.conf for easy migration. - dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf - - 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 -} - -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 ! 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 -} - -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-253.4.ebuild b/sys-apps/systemd/systemd-253.4.ebuild new file mode 100644 index 000000000000..72824b08e850 --- /dev/null +++ b/sys-apps/systemd/systemd-253.4.ebuild @@ -0,0 +1,512 @@ +# Copyright 2011-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..11} ) + +# 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 +inherit python-any-r1 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 cgroup-hybrid cryptsetup curl +dns-over-tls elfutils + fido2 +gcrypt gnuefi 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=" + 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} + gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) +" + +# 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 + 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_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') + $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') +" + +python_check_deps() { + python_has_version "dev-python/jinja[${PYTHON_USEDEP}]" && + python_has_version "dev-python/lxml[${PYTHON_USEDEP}]" +} + +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() { + : +} + +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 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 gnuefi gnu-efi) + $(meson_native_use_bool gnutls) + -Defi-includedir="${ESYSROOT}/usr/include/efi" + -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" + $(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 + + if ! use resolvconf && ! use sysv-utils && use split-usr; then + rmdir "${ED}${rootprefix}"/sbin || 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 + + # Symlink /etc/sysctl.conf for easy migration. + dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf + + 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 +} + +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 ! 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 +} + +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 262f3350c7a1..8c40a935e8a7 100644 --- a/sys-apps/systemd/systemd-9999.ebuild +++ b/sys-apps/systemd/systemd-9999.ebuild @@ -1,8 +1,8 @@ # Copyright 2011-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 -PYTHON_COMPAT=( python3_{9..11} ) +EAPI=8 +PYTHON_COMPAT=( python3_{10..11} ) # Avoid QA warnings TMPFILES_OPTIONAL=1 -- cgit v1.2.3