summaryrefslogtreecommitdiff
path: root/sys-apps/systemd/systemd-9999.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/systemd/systemd-9999.ebuild')
-rw-r--r--sys-apps/systemd/systemd-9999.ebuild28
1 files changed, 27 insertions, 1 deletions
diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild
index d2c7ad24ef7b..78f1f78f01df 100644
--- a/sys-apps/systemd/systemd-9999.ebuild
+++ b/sys-apps/systemd/systemd-9999.ebuild
@@ -33,7 +33,7 @@ HOMEPAGE="https://systemd.io/"
LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
SLOT="0/2"
IUSE="
- acl apparmor audit boot cryptsetup curl +dns-over-tls elfutils
+ 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
@@ -180,12 +180,38 @@ BDEPEND="
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