From 5a2cecfc8661e1d3a762adf05cf8eb142cd41710 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 22 Dec 2024 06:30:44 +0000 Subject: gentoo auto-resync : 22:12:2024 - 06:30:44 --- sys-apps/Manifest.gz | Bin 51555 -> 51557 bytes sys-apps/bubblewrap/Manifest | 2 +- sys-apps/bubblewrap/bubblewrap-0.11.0.ebuild | 2 +- sys-apps/osinfo-db/Manifest | 2 +- sys-apps/osinfo-db/osinfo-db-20240701.ebuild | 2 +- sys-apps/sandbox/Manifest | 2 + sys-apps/sandbox/sandbox-2.41.ebuild | 64 +++ sys-apps/systemd/Manifest | 2 + sys-apps/systemd/systemd-257.1.ebuild | 571 +++++++++++++++++++++++++++ 9 files changed, 643 insertions(+), 4 deletions(-) create mode 100644 sys-apps/sandbox/sandbox-2.41.ebuild create mode 100644 sys-apps/systemd/systemd-257.1.ebuild (limited to 'sys-apps') diff --git a/sys-apps/Manifest.gz b/sys-apps/Manifest.gz index 04955ea55bed..48a40b69eb49 100644 Binary files a/sys-apps/Manifest.gz and b/sys-apps/Manifest.gz differ diff --git a/sys-apps/bubblewrap/Manifest b/sys-apps/bubblewrap/Manifest index f5f0ed8eb294..81c7165a2fa1 100644 --- a/sys-apps/bubblewrap/Manifest +++ b/sys-apps/bubblewrap/Manifest @@ -3,7 +3,7 @@ DIST bubblewrap-0.11.0.tar.xz 115228 BLAKE2B 753ae172ccceb9de08422f03702922966cb DIST bubblewrap-0.8.0.tar.xz 149088 BLAKE2B 5853cf42a7ab653540ec5134866c6f2459aa101e9eea724a4f283405cbcae2beb3551b7c1a7aa93d82016d4eb0d12f9c97c47df53a6d9b589db40483696253de SHA512 1cbc33f3c834ff83f4c1808d3ec2555921277d495f903ad152cbd5065a6e100c5420b4b5c62386bb2d303eb1734e074b09625013e55e3bd8631cfb3582d70e1c DIST bubblewrap-0.9.0.tar.xz 118984 BLAKE2B 52a4e87e502da44a25031b6d6044da7712dccb2c58a2debad9a8562fd1e48805d783bec571adc0df8880a63595825a4204ceaaa4f3df2672252c631f7fe5b0c7 SHA512 3a3af355e4fdb19a91c40020d68fd83f7c74ebef92d989c932933293758bc0175fa41220c47fe829b84ba29457a12f0e225c19afe674ecbf983b0826dbc1c878 EBUILD bubblewrap-0.10.0.ebuild 1158 BLAKE2B d907365fcd1fab20c70c4bfdd92786f8ffbfb847cd9a2f99da6c21ef2ccef8ee9131809e7a18cad46ec1ea57ff2ba2e85fcfd896a151cd0900023f423845246e SHA512 01dcc6f851c474086dd9b3a3135bb7e67cb0e43342bf45d72ca0ccc6fab739a569b005ec62c18b75158b9bbc214f09f476c0dfd533c4cd654990968ac37d9cb8 -EBUILD bubblewrap-0.11.0.ebuild 1225 BLAKE2B e67532d77ddca9eb0a1a6cf7a33580fbff67c10b4b5bbf0ca382aa5ef7bc0f376d2e5af915a909f94896bd40d8cd27fa47815e290584c9059e8eb0d25c4ff16b SHA512 42794b24799a84fec24c0592331a8abb4b2b062283aafc53e64ea6cc8de4542ba76b3c22d362b5c0897f608aba76dd71398423e2476584425f8a00ad0f01681e +EBUILD bubblewrap-0.11.0.ebuild 1222 BLAKE2B 3055c794b1e32dfaa04f022c0b67312d319c4e92c375030872ebe90fec7d15ee42ae90af6073ccd1db9237ee104936538f4731debad2bec677cddd1756db947c SHA512 38190764cfcc474ac0df4acbf13f17f9236584691334383f81d33fee82b1a603f1eaa93473d197b02d5bdc61577e729855e8b89634cf53748af02a657abdd07a EBUILD bubblewrap-0.8.0.ebuild 1158 BLAKE2B f2c3dff4784e903111870d3e813366630aafb7f917bde0d2f2ae0a662016eb2ed8939376432992052de7b3d26de462ebffbaa607d6ee1da828bed59a8dd55552 SHA512 26230393ca0bc79ff576cac7194a6f407157bf50ecefb6d2003646dcba21c4c13b82c6ea21681af3ae204a614fa19e0b28199491955dd0a213fa3c3f103709dc EBUILD bubblewrap-0.9.0.ebuild 1164 BLAKE2B 4fb26371633169e369ca97d110b396194071f098e07fb81473b1a584af608cda03fb2dfa751e3a4b854d0e98619cf050e96a50b4ccf441ee1546d5eaa2707117 SHA512 a7fc16d2ff33b14dd634782dd558c49cb62d624c4514e3b410e4f79f4da4e6a83ac76387d44dd255db2c63e83fe0e8f794ee5fccd85d9139e045b9698a6bd50c MISC metadata.xml 340 BLAKE2B f082c9eef68d5f1bc96a25712769cf2625595ddf23de0c6c5c51b57e03d75cb795fce47bf6df009309158e275db9d709278ac3d010d8b09009d591486e817118 SHA512 76d774e9c5df0184246aecbb1c2697cf7e2a5c580194c2a826498169b3972925f4bb25bae10bd438a8f404e46f74af59c91eb39b8ec2a5ff71b5ad01ffa46e90 diff --git a/sys-apps/bubblewrap/bubblewrap-0.11.0.ebuild b/sys-apps/bubblewrap/bubblewrap-0.11.0.ebuild index 8440b69bcb7b..1eca8ede61be 100644 --- a/sys-apps/bubblewrap/bubblewrap-0.11.0.ebuild +++ b/sys-apps/bubblewrap/bubblewrap-0.11.0.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://github.com/containers/${PN}/releases/download/v${PV}/${P}.tar.x LICENSE="LGPL-2+" SLOT="0" -KEYWORDS="amd64 ~arm arm64 ~loong ~ppc ~ppc64 ~riscv x86" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv x86" IUSE="selinux suid" RDEPEND=" diff --git a/sys-apps/osinfo-db/Manifest b/sys-apps/osinfo-db/Manifest index c1d79c9ef2a3..9cb198db60dd 100644 --- a/sys-apps/osinfo-db/Manifest +++ b/sys-apps/osinfo-db/Manifest @@ -1,5 +1,5 @@ DIST osinfo-db-20240523.tar.xz 151604 BLAKE2B 252a0acd6996681dd338abd70d831f1b99fef5b45fac4da167be11846fbb2dc3d8996881017c56506ca1fbe5320c54ad5eca39dc21558652a51e4d41009346c2 SHA512 6ad1927e86ece97d3acb8a0c46d7cb0d7a3ecd1ad7af17900eb8bc6927cd42e662c7473e2a0f2b6e4f8a5179b139dcbd969a234d42bf76c8f9b37c8adf50cf00 DIST osinfo-db-20240701.tar.xz 152572 BLAKE2B dbd1c6352e449751a7b6929bacc3db50cf0d76f8daf454a602f4fa64fcaf3a0b4b3b16ba3cc56acc12a6b5bf15242c4ed031748dbc43ee1a8af62d6d08b56353 SHA512 6d96c7a8e9f457344523a88316cbbfca7886f14676edcdbea5d124883fffd7f6afb242f28beb33f3702f416c64d74bd0f8fac6432b025e1479e392433c269b6f EBUILD osinfo-db-20240523.ebuild 692 BLAKE2B aa8437760279ca88ee64698670d6a528151d94495e4ce0affc2df3411f18b410b235fca731e1da7c935bede76c70e2387288db6c2e52416f4869809202acc696 SHA512 ce927acdd7829ecb1fef7bab5c152335574af81208e9aae4477b32cf9c15a9121ece11749a503a320451462ee64fa61957f296f173093422f769500a0aa15d06 -EBUILD osinfo-db-20240701.ebuild 693 BLAKE2B ed6a9f7730f014ab0b14f6bfe85220b983f9451de9e5cdcd25c84bd942107a0ad3cb9a04e4acb9dd14a2b5c4934ce0ebd01e77ebd01ff64444be016fa9f0112e SHA512 0ff7b08e541e387a13cbf03a53f1e0fbd9481895bf7333e13b03e539d55c1dc6c60486f137870ca9f7fe48af079b97e8bed589b8ba125a0619fba0fb9122a42c +EBUILD osinfo-db-20240701.ebuild 692 BLAKE2B aa8437760279ca88ee64698670d6a528151d94495e4ce0affc2df3411f18b410b235fca731e1da7c935bede76c70e2387288db6c2e52416f4869809202acc696 SHA512 ce927acdd7829ecb1fef7bab5c152335574af81208e9aae4477b32cf9c15a9121ece11749a503a320451462ee64fa61957f296f173093422f769500a0aa15d06 MISC metadata.xml 373 BLAKE2B 76c02900ad2c6c313bcc5f3806b1e9911ec01f23c057847bbbdb70ff7de957541d131fe6f57ab74473d20389c1562b1938fd2248ab70747fae68fa664fce2a28 SHA512 6759db491e7ce75a4a0b9805b8ff7e2bd1800fc626560e47af4e14de6ca4632e7dfc9fe7fe7ae1da8ca5b56b94854a92c5057bda98601e134012e63ff9c756a5 diff --git a/sys-apps/osinfo-db/osinfo-db-20240701.ebuild b/sys-apps/osinfo-db/osinfo-db-20240701.ebuild index 7c3d49d4da9b..8c494fff7f97 100644 --- a/sys-apps/osinfo-db/osinfo-db-20240701.ebuild +++ b/sys-apps/osinfo-db/osinfo-db-20240701.ebuild @@ -11,7 +11,7 @@ S="${WORKDIR}" LICENSE="GPL-2+" SLOT="0" -KEYWORDS="~alpha amd64 ~arm arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86" +KEYWORDS="~alpha amd64 ~arm arm64 ~loong ~ppc ppc64 ~riscv ~sparc x86" BDEPEND="sys-apps/osinfo-db-tools" diff --git a/sys-apps/sandbox/Manifest b/sys-apps/sandbox/Manifest index 62d908f8ab32..9b39a0d8c4fc 100644 --- a/sys-apps/sandbox/Manifest +++ b/sys-apps/sandbox/Manifest @@ -1,6 +1,8 @@ AUX 09sandbox 37 BLAKE2B 181213e2cc0bcfa328310cced40bfaba4530d8d2f80e892cb5649d5277c5d59d345ce96ca802a5529a22892c929bafac04c616458fa147a3bee5c89d31b0baf1 SHA512 4e8a9c58debde6480224a45559c5f2db4765213d151e47937f9142f110cac3681bf6402acaf21249a37bb17398e7bc00ae7feee68ecdb5b9363c432eac1b052a DIST sandbox-2.39.tar.xz 462796 BLAKE2B 330c6f896eba6ff2a38eb8a5d1ff9b242d0e42ab03734254b1851f36cc851c32e7ed3d32afe07374b6e264cb0a922d25b010af5269f60fc5142b9036008f0945 SHA512 5eed5d828eb904b15d52736ea8835128e805f0274f2152d033ae6d93f1df3bc1f50ed23d7544c37ee06b14cb2c301110730e1de3097d6f7032069ef8dbbbd28c DIST sandbox-2.40.tar.xz 465824 BLAKE2B 1e7e8b1c69807d493d5ca242d746b07aa669e18f9aab60cbfd7fe66500ac6822f8b9236077c370ec7e580c8c056f2ccc7825017cd015fca4497e967dcb93cc82 SHA512 e734f380943cc573847f48789a6ad724a3a3fe1017cb7e4bffcd75d2f758d85e937511bbc2eccd0224301b56bc0dd38c92fbaf2d268132be4985f5a768593bdc +DIST sandbox-2.41.tar.xz 468180 BLAKE2B cb00ec8605b9b51ce559a9e9baa68d757e17900abbe9fff890ddbabcc001e47d72a0e7a693104a6594d3d86bc9afebc6945ed3ec101fd67bfe8a855de3ef010f SHA512 ac787ecc61a625717a66fef663f34ddc855c144226f80e1593033f06ccd9dbd526ffbd032a7b142404a0a5a5aea4b813c9258e9c2202c2e9b0574aa35aae3ef8 EBUILD sandbox-2.39.ebuild 1731 BLAKE2B 0597372e7ed3b698e8a45243170e68b175f025f90f2196bc2b789b058939f8c717d8cac43dbbcbf3789012ed95ad897091ee9cec86dde02541592868ed1c7333 SHA512 f60a5bd80147d724937f87c94e468153c552749c16a10265c2ca55e6ab848bb742e7fe2bcb1c2b9095b63ca820f9c409dc62217cd8481234064e20509e584e92 EBUILD sandbox-2.40.ebuild 1739 BLAKE2B 090794105c6616689b819cbe1c715714402c81777bda0dc5a7c55ac7669080d775b1e3d09f6abceaa92e403f0ffc56d92eba5165ff3199b47a3b521d822be7d7 SHA512 36b0309d807cc86cce508b2ffea5b504338d35b730eb980d5205a4b420d6e9bc05835cc70259d8b76c532f1e3aea241a47457376a1934745bef7bd159dd6f608 +EBUILD sandbox-2.41.ebuild 1739 BLAKE2B 090794105c6616689b819cbe1c715714402c81777bda0dc5a7c55ac7669080d775b1e3d09f6abceaa92e403f0ffc56d92eba5165ff3199b47a3b521d822be7d7 SHA512 36b0309d807cc86cce508b2ffea5b504338d35b730eb980d5205a4b420d6e9bc05835cc70259d8b76c532f1e3aea241a47457376a1934745bef7bd159dd6f608 MISC metadata.xml 512 BLAKE2B 2befd96e6697e45e04b9e5c6594d30987f035b52fe2d642e10b67b3a2f9657b63f66f48439cd6df71f07ad6fe112220f195d453595c4bf1ef47561cfb8c0428d SHA512 1869fc1c558817f7c7ace988184b74647a82c94e51f0bdb610011bd6736034188abb778e3c5b852ff39daad5a7ef131b09468353b0764a4957dfe72da4767601 diff --git a/sys-apps/sandbox/sandbox-2.41.ebuild b/sys-apps/sandbox/sandbox-2.41.ebuild new file mode 100644 index 000000000000..7279694e8993 --- /dev/null +++ b/sys-apps/sandbox/sandbox-2.41.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +inherit flag-o-matic multilib-minimal multiprocessing + +DESCRIPTION="sandbox'd LD_PRELOAD hack" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Sandbox" +SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+nnp" + +# pax-utils lower bound for bug #265376 +DEPEND=">=app-misc/pax-utils-0.1.19" +# Avoid folks installing with older file, bug #889046. We still need the +# >= dep in Portage but this is a safety net if people do partial upgrades. +RDEPEND="!=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/*" + +check_cgroup_layout() { + # https://bugs.gentoo.org/935261 + [[ ${MERGE_TYPE} != buildonly ]] || return + [[ -z ${ROOT} ]] || return + [[ -e /sys/fs/cgroup/unified ]] || return + grep -q 'SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE=1' /proc/cmdline && return + + eerror "This system appears to be booted with the 'hybrid' cgroup layout." + eerror "This layout obsolete and is disabled in systemd." + + if grep -qF 'systemd.unified_cgroup_hierarchy'; then + eerror "Remove the systemd.unified_cgroup_hierarchy option" + eerror "from the kernel command line and reboot." + die "hybrid cgroup layout detected" + fi +} + +pkg_pretend() { + if use split-usr; then + eerror "Please complete the migration to merged-usr." + eerror "https://wiki.gentoo.org/wiki/Merge-usr" + die "systemd no longer supports split-usr" + fi + + check_cgroup_layout + + if use cgroup-hybrid; then + eerror "Disable the 'cgroup-hybrid' USE flag." + eerror "Rebuild any initramfs images after rebuilding systemd." + die "cgroup-hybrid is no longer supported" + fi + + if [[ ${MERGE_TYPE} != buildonly ]]; then + local CONFIG_CHECK="~BLK_DEV_BSG ~CGROUPS + ~CGROUP_BPF ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE + ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS + ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS + ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH + ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED + ~!SYSFS_DEPRECATED_V2" + + use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" + use bpf && CONFIG_CHECK+=" ~BPF ~BPF_SYSCALL ~BPF_LSM ~DEBUG_INFO_BTF" + 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=( + ) + + if ! use vanilla; then + PATCHES+=( + "${FILESDIR}/gentoo-journald-audit-r1.patch" + ) + fi + + default +} + +src_configure() { + # Prevent conflicts with i686 cross toolchain, bug 559726 + tc-export AR CC NM OBJCOPY RANLIB + + python_setup + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( + --localstatedir="${EPREFIX}/var" + # default is developer, bug 918671 + -Dmode=release + -Dsupport-url="https://gentoo.org/support/" + -Dpamlibdir="$(getpam_mod_dir)" + # avoid bash-completion dep + -Dbashcompletiondir="$(get_bashcompdir)" + -Dsplit-bin=false + # Disable compatibility with sysvinit + -Dsysvinit-path= + -Dsysvrcnd-path= + # no deps + -Dima=true + # Match /etc/shells, bug 919749 + -Ddebug-shell="${EPREFIX}/bin/sh" + -Ddefault-user-shell="${EPREFIX}/bin/bash" + # Optional components/dependencies + $(meson_native_use_bool acl) + $(meson_native_use_bool apparmor) + $(meson_native_use_bool audit) + $(meson_native_use_bool boot bootloader) + $(meson_native_use_bool bpf bpf-framework) + -Dbpf-compiler=gcc + $(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) + ) + + case $(tc-arch) in + amd64|arm|arm64|loong|ppc|ppc64|riscv|s390|x86) + # src/vmspawn/vmspawn-util.h: QEMU_MACHINE_TYPE + myconf+=( $(meson_native_enabled vmspawn) ) ;; + *) + myconf+=( -Dvmspawn=disabled ) ;; + esac + + meson_src_configure "${myconf[@]}" +} + +multilib_src_test() { + ( + unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR + export COLUMNS=80 + addpredict /dev + addpredict /proc + addpredict /run + addpredict /sys/fs/cgroup + meson_src_test --timeout-multiplier=10 + ) || die +} + +multilib_src_install_all() { + # meson doesn't know about docdir + mv "${ED}"/usr/share/doc/{systemd,${PF}} || die + + einstalldocs + dodoc "${FILESDIR}"/nsswitch.conf + + insinto /usr/lib/tmpfiles.d + doins "${FILESDIR}"/legacy.conf + + if ! use resolvconf; then + rm -f "${ED}"/usr/bin/resolvconf || die + fi + + if ! use sysv-utils; then + rm "${ED}"/usr/bin/{halt,init,poweroff,reboot,shutdown} || die + rm "${ED}"/usr/share/man/man1/init.1 || die + rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,shutdown}.8 || die + fi + + # https://bugs.gentoo.org/761763 + rm -r "${ED}"/usr/lib/sysusers.d || die + + # Preserve empty dirs in /etc & /var, bug #437008 + keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} + keepdir /etc/kernel/install.d + keepdir /etc/systemd/{network,system,user} + keepdir /etc/udev/rules.d + + keepdir /etc/udev/hwdb.d + + keepdir /usr/lib/systemd/{system-sleep,system-shutdown} + keepdir /usr/lib/{binfmt.d,modules-load.d} + keepdir /usr/lib/systemd/user-generators + keepdir /var/lib/systemd + keepdir /var/log/journal + + if use pam; then + if use selinux; then + newpamd "${FILESDIR}"/systemd-user-selinux.pam systemd-user + else + newpamd "${FILESDIR}"/systemd-user.pam systemd-user + fi + fi + + if use kernel-install; then + # Dummy config, remove to make room for sys-kernel/installkernel + rm "${ED}/usr/lib/kernel/install.conf" || die + fi + + use ukify && python_fix_shebang "${ED}" + use boot && secureboot_auto_sign +} + +migrate_locale() { + local envd_locale_def="${EROOT}/etc/env.d/02locale" + local envd_locale=( "${EROOT}"/etc/env.d/??locale ) + local locale_conf="${EROOT}/etc/locale.conf" + + if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then + # If locale.conf does not exist... + if [[ -e ${envd_locale} ]]; then + # ...either copy env.d/??locale if there's one + ebegin "Moving ${envd_locale} to ${locale_conf}" + mv "${envd_locale}" "${locale_conf}" + eend ${?} || FAIL=1 + else + # ...or create a dummy default + ebegin "Creating ${locale_conf}" + cat > "${locale_conf}" <<-EOF + # This file has been created by the sys-apps/systemd ebuild. + # See locale.conf(5) and localectl(1). + + # LANG=${LANG} + EOF + eend ${?} || FAIL=1 + fi + fi + + if [[ ! -L ${envd_locale} ]]; then + # now, if env.d/??locale is not a symlink (to locale.conf)... + if [[ -e ${envd_locale} ]]; then + # ...warn the user that he has duplicate locale settings + ewarn + ewarn "To ensure consistent behavior, you should replace ${envd_locale}" + ewarn "with a symlink to ${locale_conf}. Please migrate your settings" + ewarn "and create the symlink with the following command:" + ewarn "ln -s -n -f ../locale.conf ${envd_locale}" + ewarn + else + # ...or just create the symlink if there's nothing here + ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" + ln -n -s ../locale.conf "${envd_locale_def}" + eend ${?} || FAIL=1 + fi + fi +} + +pkg_preinst() { + if [[ -e ${EROOT}/etc/sysctl.conf ]]; then + # Symlink /etc/sysctl.conf for easy migration. + dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf + fi + + if ! use boot && has_version "sys-apps/systemd[gnuefi(-)]"; then + ewarn "The 'gnuefi' USE flag has been renamed to 'boot'." + ewarn "Make sure to enable the 'boot' USE flag if you use systemd-boot." + fi +} + +pkg_postinst() { + systemd_update_catalog + + # Keep this here in case the database format changes so it gets updated + # when required. + systemd-hwdb --root="${ROOT}" update + + udev_reload || FAIL=1 + + # Bug 465468, make sure locales are respected, and ensure consistency + # between OpenRC & systemd + migrate_locale + + if [[ -z ${REPLACING_VERSIONS} ]]; then + if type systemctl &>/dev/null; then + systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1 + fi + elog "To enable a useful set of services, run the following:" + elog " systemctl preset-all --preset-mode=enable-only" + fi + + if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then + rm "${EROOT}/var/lib/systemd/timesync" + fi + + if [[ -z ${ROOT} && -d /run/systemd/system ]]; then + ebegin "Reexecuting system manager (systemd)" + systemctl daemon-reexec + eend $? || FAIL=1 + + # https://lists.freedesktop.org/archives/systemd-devel/2024-June/050466.html + ebegin "Signaling user managers to reexec" + systemctl kill --kill-whom='main' --signal='SIGRTMIN+25' 'user@*.service' + eend $? + fi + + if [[ ${FAIL} ]]; then + eerror "One of the postinst commands failed. Please check the postinst output" + eerror "for errors. You may need to clean up your system and/or try installing" + eerror "systemd again." + eerror + fi + + if use boot; then + optfeature "installing kernels in systemd-boot's native layout and update loader entries" \ + "sys-kernel/installkernel[systemd-boot]" + fi + if use ukify; then + optfeature "generating unified kernel image on each kernel installation" \ + "sys-kernel/installkernel[ukify]" + fi +} + +pkg_prerm() { + # If removing systemd completely, remove the catalog database. + if [[ ! ${REPLACED_BY_VERSION} ]]; then + rm -f -v "${EROOT}"/var/lib/systemd/catalog/database + fi +} -- cgit v1.2.3