From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 954CB15802E for ; Mon, 1 Jul 2024 19:18:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DC452E2AE1; Mon, 1 Jul 2024 19:18:44 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B401AE2AE1 for ; Mon, 1 Jul 2024 19:18:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BB85A343025 for ; Mon, 1 Jul 2024 19:18:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4AD9F15F7 for ; Mon, 1 Jul 2024 19:18:42 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1719861271.2e0a4dbc6b7753f19a8a6243603bd2792082359e.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/systemd/systemd-256.1-r1.ebuild sys-apps/systemd/systemd-256.1-r2.ebuild sys-apps/systemd/systemd-9999.ebuild X-VCS-Directories: sys-apps/systemd/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 2e0a4dbc6b7753f19a8a6243603bd2792082359e X-VCS-Branch: master Date: Mon, 1 Jul 2024 19:18:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2c7546cc-99cb-48e5-b483-eb24cfca0593 X-Archives-Hash: 2794893f628db0e2a89bdf778c85ed7e commit: 2e0a4dbc6b7753f19a8a6243603bd2792082359e Author: Mike Gilbert gentoo org> AuthorDate: Mon Jul 1 15:12:43 2024 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Mon Jul 1 19:14:31 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e0a4dbc sys-apps/systemd: add pkg_pretend check for cgroup-hybrid Bug: https://bugs.gentoo.org/935261 Signed-off-by: Mike Gilbert gentoo.org> ...emd-256.1-r1.ebuild => systemd-256.1-r2.ebuild} | 28 +++++++++++++++++++++- sys-apps/systemd/systemd-9999.ebuild | 28 +++++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/sys-apps/systemd/systemd-256.1-r1.ebuild b/sys-apps/systemd/systemd-256.1-r2.ebuild similarity index 94% rename from sys-apps/systemd/systemd-256.1-r1.ebuild rename to sys-apps/systemd/systemd-256.1-r2.ebuild index d2c7ad24ef7b..178565ec7d40 100644 --- a/sys-apps/systemd/systemd-256.1-r1.ebuild +++ b/sys-apps/systemd/systemd-256.1-r2.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.legacy_systemd_cgroup_controller' /proc/cmdline; then + eerror "Remove the systemd.legacy_systemd_cgroup_controller 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 diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild index d2c7ad24ef7b..178565ec7d40 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.legacy_systemd_cgroup_controller' /proc/cmdline; then + eerror "Remove the systemd.legacy_systemd_cgroup_controller 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