mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 11:51:14 +02:00
sys-apps/systemd: Sync with Gentoo
It's from Gentoo commit eea6cb01592cb3ee5923dc063bbe207f989327e4. Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
parent
eafa488091
commit
4a982a9710
@ -1,4 +1,4 @@
|
||||
DIST systemd-258.3.tar.gz 17034328 BLAKE2B 668f5829d78412b256f49c3f46dffad5cf70fa335de3e5ca822bdc13e4f67874ac28005b616e7fdc0f3235f760c68809ae3ac97e1f53d3ca43fb7e0934ec0de9 SHA512 9f4261e1703efd1f38c90e4166e6d85fa9379c99ac7f3c66caa62955c3cbe8a43ab259c261ab20bce0dd84dd682258192ace66b4dee0390bf3740c32f4569fed
|
||||
DIST systemd-259.1.tar.gz 17274033 BLAKE2B 08d3b640e699ecaae9f2e2471db4547870786a5b5e2953671a0a9460b13a4d942c605942f95c144e68a04ffd6be1a72d8a084fe1f59c4d49c0ac3dc1eda55533 SHA512 7cbeca5dad6413a876809200583854ddc706b7a69deff958eb1ca1afb726cf4dec014006c10d1945c450b754811d4b95a80fe1778cb3136997f6d11b11c0560e
|
||||
DIST systemd-259.2.tar.gz 17284532 BLAKE2B a0826ef6f1cc8546957cbd558283e9bf634e434893de526d39b00f7d5ecdc982ccadf0f5397f74a8c9090887d14acbbe20dac27905376b72aa07b5246436c1ed SHA512 1cb677c98a56210948bfc9a6e296aa92dde030ceeca6b6e4fe3f4014d051f4d0f1d83584cfdceb921d7d578952b85112b2ba497385faefca4d6c871bf8de48cf
|
||||
DIST systemd-259.tar.gz 17250241 BLAKE2B 59ba6edea59338fc30d4cf72b197e8eda2ccd4fc7d53f016c0b9bd4422433839696fe553b58dcf1f31345ec92080a426a04a2878fd97cb17b3b1e3f92f08e135 SHA512 ef46b13661df43e3cfbeee1bc22f0b1eb902e8ebe39c19868c465efd08b35a199c2a2cd9d8021a6bc4d692fa0c6e0eab3f13eecd6ce24dde81d3945464a25b50
|
||||
DIST systemd-259.3.tar.gz 17285135 BLAKE2B 81a66ec1aadeef14ca8fd53b23a8ebeb9fa23aed4298419fb5cb612c7a8f1b4c33f391a643e4d313dbef0385c339726c8f327306785852c8427416009c944f8d SHA512 ea7314fcde3c0e541c9399f2d165f114bd7bf37cec294680964352da374435ddd3949432f939f35ecb49f0ce6a3b7aaaddf2b65cc8107abc65e2ec3806c99dac
|
||||
DIST systemd-259.4.tar.gz 17336661 BLAKE2B 5e90410698e21e8fc8f5f22e3e26858f51d2cdfc362870f09ecccf8ed882602cdcef2614843738b14601349b05cfd3a8358a1771fc1fcd8e75d831940a8683c8 SHA512 bf572f92b0b01ecaf08f36ea5e13a2c05a79e6c0c2d9ef191855d1b83ae791a2977841ca85541ace1d30945d5f879d703d390767f708294986b29aeda1449b1f
|
||||
DIST systemd-260.tar.gz 17577889 BLAKE2B 75db560c9d4d8f9ba24f46f70e38a9adc4f8be6ce08a04c900b1d3557739288faf85372b5b1943c59d9be13cdb8dc0fefe09aecb9310211ec479253c7e1aa12b SHA512 2b81a327319c6b06c04742aa8ee5f36ebc7b78aa6db2a82f2a7376fda8bf2079bfc418db290b0522e1d01a3449b3a4e847ebe22d260cc83aeb86a7a4de714d41
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
https://bugs.gentoo.org/968936
|
||||
https://github.com/systemd/systemd/issues/40380
|
||||
|
||||
From 8a5fb3627a1518d2d2ef70919c81448158d64ac0 Mon Sep 17 00:00:00 2001
|
||||
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||
Date: Mon, 19 Jan 2026 23:14:26 +0900
|
||||
Subject: [PATCH] vmspawn: use indexed loop
|
||||
|
||||
Previously, the index is obtained from the pointer offset. The
|
||||
pointer offset is expressed by ptrdiff_t and may be different from
|
||||
ssize_t.
|
||||
|
||||
Let's avoid to use FOREACH_ARRAY() but use an indexed loop.
|
||||
This also renames `mount` to `m` to avoid conflict with `mount()`.
|
||||
|
||||
Fixes #40380.
|
||||
---
|
||||
src/vmspawn/vmspawn.c | 15 ++++++++-------
|
||||
1 file changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c
|
||||
index 43817954a3d22..b12e260fa4d1f 100644
|
||||
--- a/src/vmspawn/vmspawn.c
|
||||
+++ b/src/vmspawn/vmspawn.c
|
||||
@@ -2408,7 +2408,8 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
|
||||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
- FOREACH_ARRAY(mount, arg_runtime_mounts.mounts, arg_runtime_mounts.n_mounts) {
|
||||
+ for (size_t j = 0; j < arg_runtime_mounts.n_mounts; j++) {
|
||||
+ RuntimeMount *m = arg_runtime_mounts.mounts + j;
|
||||
_cleanup_free_ char *listen_address = NULL;
|
||||
_cleanup_(fork_notify_terminate) PidRef child = PIDREF_NULL;
|
||||
|
||||
@@ -2417,9 +2418,9 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
|
||||
|
||||
r = start_virtiofsd(
|
||||
unit,
|
||||
- mount->source,
|
||||
- /* source_uid= */ mount->source_uid,
|
||||
- /* target_uid= */ mount->target_uid,
|
||||
+ m->source,
|
||||
+ /* source_uid= */ m->source_uid,
|
||||
+ /* target_uid= */ m->target_uid,
|
||||
/* uid_range= */ 1U,
|
||||
runtime_dir,
|
||||
sd_socket_activate,
|
||||
@@ -2444,7 +2445,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
|
||||
return log_oom();
|
||||
|
||||
_cleanup_free_ char *id = NULL;
|
||||
- if (asprintf(&id, "mnt%zi", mount - arg_runtime_mounts.mounts) < 0)
|
||||
+ if (asprintf(&id, "mnt%zu", j) < 0)
|
||||
return log_oom();
|
||||
|
||||
if (strv_extendf(&cmdline, "socket,id=%s,path=%s", id, escaped_listen_address) < 0)
|
||||
@@ -2456,12 +2457,12 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
|
||||
if (strv_extendf(&cmdline, "vhost-user-fs-pci,queue-size=1024,chardev=%1$s,tag=%1$s", id) < 0)
|
||||
return log_oom();
|
||||
|
||||
- _cleanup_free_ char *clean_target = xescape(mount->target, "\":");
|
||||
+ _cleanup_free_ char *clean_target = xescape(m->target, "\":");
|
||||
if (!clean_target)
|
||||
return log_oom();
|
||||
|
||||
if (strv_extendf(&arg_kernel_cmdline_extra, "systemd.mount-extra=\"%s:%s:virtiofs:%s\"",
|
||||
- id, clean_target, mount->read_only ? "ro" : "rw") < 0)
|
||||
+ id, clean_target, m->read_only ? "ro" : "rw") < 0)
|
||||
return log_oom();
|
||||
}
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
https://bugs.gentoo.org/971388
|
||||
https://github.com/systemd/systemd/pull/41225
|
||||
|
||||
From 54db03334813a16721fa96c59b884f1591c758b5 Mon Sep 17 00:00:00 2001
|
||||
From: Robin Ebert <ebertrobin2002@gmail.com>
|
||||
Date: Fri, 20 Mar 2026 13:32:04 +0100
|
||||
Subject: [PATCH] kernel-install: fix assert in context_copy
|
||||
|
||||
(cherry picked from commit 55e7dc5ce4999ba9f01499dccdeba0235a86aaa4)
|
||||
---
|
||||
src/kernel-install/kernel-install.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/kernel-install/kernel-install.c b/src/kernel-install/kernel-install.c
|
||||
index a38dcaab8b556..618fa746c9bed 100644
|
||||
--- a/src/kernel-install/kernel-install.c
|
||||
+++ b/src/kernel-install/kernel-install.c
|
||||
@@ -152,10 +152,10 @@ static int context_copy(const Context *source, Context *ret) {
|
||||
|
||||
assert(source);
|
||||
assert(ret);
|
||||
- assert(source->rfd >= 0 || source->rfd == AT_FDCWD);
|
||||
+ assert(source->rfd >= 0 || source->rfd == AT_FDCWD || source->rfd == XAT_FDROOT);
|
||||
|
||||
_cleanup_(context_done) Context copy = (Context) {
|
||||
- .rfd = AT_FDCWD,
|
||||
+ .rfd = source->rfd,
|
||||
.action = source->action,
|
||||
.machine_id = source->machine_id,
|
||||
.machine_id_is_random = source->machine_id_is_random,
|
||||
114
sdk_container/src/third_party/portage-stable/sys-apps/systemd/files/systemd-260-mips.patch
vendored
Normal file
114
sdk_container/src/third_party/portage-stable/sys-apps/systemd/files/systemd-260-mips.patch
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
https://bugs.gentoo.org/971376
|
||||
https://github.com/systemd/systemd/pull/41240
|
||||
|
||||
From 26fe43d2189cc7eab3b5c710673f04a23627caf0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
|
||||
Date: Fri, 20 Mar 2026 13:52:17 +0100
|
||||
Subject: [PATCH] mips: Fix conditional inclusion of <asm/sgidefs.h>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
systemd now has a system call wrapper that does a long series of #ifdef's to
|
||||
differentiate between architectures and ABIs. This wrapper has two problems.
|
||||
|
||||
1. On mips, it needs to differentiate between O32, N32, N64 ABI. It does that
|
||||
via a code block in src/include/override/sys/generate-syscall.py (and derived
|
||||
files):
|
||||
|
||||
76 # elif defined(_MIPS_SIM)
|
||||
77 # if _MIPS_SIM == _MIPS_SIM_ABI32
|
||||
78 # define systemd_NR_{syscall} {nr_mipso32}
|
||||
79 # elif _MIPS_SIM == _MIPS_SIM_NABI32
|
||||
80 # define systemd_NR_{syscall} {nr_mips64n32}
|
||||
81 # elif _MIPS_SIM == _MIPS_SIM_ABI64
|
||||
82 # define systemd_NR_{syscall} {nr_mips64}
|
||||
83 # else
|
||||
84 # error "Unknown MIPS ABI"
|
||||
85 # endif
|
||||
86 # elif defined(__hppa__)
|
||||
|
||||
Now the _MIPS_SIM* constants stem from a vendor-specific header file sgidefs.h,
|
||||
which is included with glibc, but not with musl. It is however always present
|
||||
in the Linux kernel headers as asm/sgidefs.h ...
|
||||
|
||||
2. To work around this, the syscall wrapper already has a block
|
||||
|
||||
47 #ifdef ARCH_MIPS
|
||||
48 #include <asm/sgidefs.h>
|
||||
49 #endif
|
||||
|
||||
Turns out, ARCH_MIPS is defined nowhere in Gentoo, neither on glibc nor on musl.
|
||||
As a result the code (by accident, probably sgidefs.h is included transitively
|
||||
somehow) works on glibc, but not on musl.
|
||||
|
||||
The simplest fix is to replace line 47 in the generator and the derived file
|
||||
with
|
||||
|
||||
47 #ifdef __mips__
|
||||
|
||||
Two other source code files require a similar fix since they rely on the
|
||||
constants.
|
||||
|
||||
Bug: https://github.com/systemd/systemd/issues/41239
|
||||
Bug: https://bugs.gentoo.org/971376
|
||||
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
|
||||
---
|
||||
src/include/override/sys/generate-syscall.py | 2 +-
|
||||
src/include/override/sys/syscall.h | 2 +-
|
||||
src/shared/base-filesystem.c | 2 +-
|
||||
src/shared/seccomp-util.c | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/include/override/sys/generate-syscall.py b/src/include/override/sys/generate-syscall.py
|
||||
index 6f449f9dc1330..1c90ad0e38402 100755
|
||||
--- a/src/include/override/sys/generate-syscall.py
|
||||
+++ b/src/include/override/sys/generate-syscall.py
|
||||
@@ -44,7 +44,7 @@ def parse_syscall_tables(filenames):
|
||||
|
||||
#include_next <sys/syscall.h> /* IWYU pragma: export */
|
||||
|
||||
-#ifdef ARCH_MIPS
|
||||
+#ifdef __mips__
|
||||
#include <asm/sgidefs.h>
|
||||
#endif
|
||||
|
||||
diff --git a/src/include/override/sys/syscall.h b/src/include/override/sys/syscall.h
|
||||
index da2f780bed39c..0233f254b421c 100644
|
||||
--- a/src/include/override/sys/syscall.h
|
||||
+++ b/src/include/override/sys/syscall.h
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include_next <sys/syscall.h> /* IWYU pragma: export */
|
||||
|
||||
-#ifdef ARCH_MIPS
|
||||
+#ifdef __mips__
|
||||
#include <asm/sgidefs.h>
|
||||
#endif
|
||||
|
||||
diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
|
||||
index bad3b46f3ad3a..9e8856ba48ce6 100644
|
||||
--- a/src/shared/base-filesystem.c
|
||||
+++ b/src/shared/base-filesystem.c
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
|
||||
-#ifdef ARCH_MIPS
|
||||
+#ifdef __mips__
|
||||
#include <asm/sgidefs.h>
|
||||
#endif
|
||||
|
||||
diff --git a/src/shared/seccomp-util.c b/src/shared/seccomp-util.c
|
||||
index d2f7612a53de5..9785fc45d78f3 100644
|
||||
--- a/src/shared/seccomp-util.c
|
||||
+++ b/src/shared/seccomp-util.c
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <sys/shm.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
-#ifdef ARCH_MIPS
|
||||
+#ifdef __mips__
|
||||
#include <asm/sgidefs.h>
|
||||
#endif
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
<flag name="pkcs11">Enable PKCS#11 support for cryptsetup and homed</flag>
|
||||
<flag name="pwquality">Use <pkg>dev-libs/libpwquality</pkg> for password checking in homed</flag>
|
||||
<flag name="qrcode">Enable qrcode output support in journal</flag>
|
||||
<flag name="remote">Enable remote journal access</flag>
|
||||
<flag name="resolvconf">Install resolvconf symlink for systemd-resolve</flag>
|
||||
<flag name="sysv-utils">Install sysvinit compatibility symlinks and manpages for init, telinit, halt, poweroff, reboot, runlevel, and shutdown</flag>
|
||||
<flag name="tpm">Enable TPM support</flag>
|
||||
|
||||
@ -36,7 +36,7 @@ IUSE="
|
||||
acl apparmor audit boot bpf cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
|
||||
fido2 +gcrypt gnutls homed http idn importd iptables +kernel-install +kmod
|
||||
+lz4 lzma +openssl pam passwdqc pcre pkcs11 policykit pwquality qrcode
|
||||
+resolvconf +seccomp selinux split-usr +sysv-utils test tpm ukify vanilla xkb +zstd
|
||||
+resolvconf +seccomp selinux split-usr sysv-utils test tpm ukify vanilla xkb +zstd
|
||||
"
|
||||
REQUIRED_USE="
|
||||
${PYTHON_REQUIRED_USE}
|
||||
|
||||
@ -20,7 +20,7 @@ else
|
||||
SRC_URI="https://github.com/systemd/${PN}/archive/refs/tags/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
|
||||
|
||||
if [[ ${PV} != *rc* ]] ; then
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
KEYWORDS="amd64 arm arm64 ppc ppc64 ~s390 x86"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -34,9 +34,9 @@ LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
|
||||
SLOT="0/2"
|
||||
IUSE="
|
||||
acl apparmor audit boot bpf cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
|
||||
fido2 +gcrypt gnutls homed http idn importd iptables +kernel-install +kmod
|
||||
fido2 +gcrypt gnutls homed http idn importd +kernel-install +kmod
|
||||
+lz4 lzma +openssl pam passwdqc pcre pkcs11 policykit pwquality qrcode
|
||||
+resolvconf +seccomp selinux split-usr +sysv-utils test tpm ukify vanilla xkb +zstd
|
||||
+resolvconf +seccomp selinux split-usr sysv-utils test tpm ukify vanilla xkb +zstd
|
||||
"
|
||||
REQUIRED_USE="
|
||||
${PYTHON_REQUIRED_USE}
|
||||
@ -79,7 +79,6 @@ COMMON_DEPEND="
|
||||
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}] )
|
||||
passwdqc? ( sys-auth/passwdqc:0= )
|
||||
@ -146,17 +145,19 @@ RDEPEND="${COMMON_DEPEND}
|
||||
)
|
||||
!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]
|
||||
PDEPEND="
|
||||
>=sys-apps/dbus-1.9.8[systemd]
|
||||
>=sys-fs/udev-init-scripts-34
|
||||
policykit? ( sys-auth/polkit )
|
||||
!vanilla? ( sys-apps/gentoo-systemd-integration )"
|
||||
!sysv-utils? ( sys-apps/systemd-initctl )
|
||||
!vanilla? ( sys-apps/gentoo-systemd-integration )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
app-arch/xz-utils:0
|
||||
@ -345,7 +346,6 @@ multilib_src_configure() {
|
||||
$(meson_feature lz4)
|
||||
$(meson_feature lzma xz)
|
||||
$(meson_feature zstd)
|
||||
$(meson_native_use_feature iptables libiptc)
|
||||
$(meson_native_use_feature openssl)
|
||||
$(meson_feature pam)
|
||||
$(meson_native_use_feature passwdqc)
|
||||
@ -20,7 +20,7 @@ else
|
||||
SRC_URI="https://github.com/systemd/${PN}/archive/refs/tags/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
|
||||
|
||||
if [[ ${PV} != *rc* ]] ; then
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -34,9 +34,9 @@ LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
|
||||
SLOT="0/2"
|
||||
IUSE="
|
||||
acl apparmor audit boot bpf cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
|
||||
fido2 +gcrypt gnutls homed http idn importd iptables +kernel-install +kmod
|
||||
fido2 +gcrypt gnutls homed http idn importd +kernel-install +kmod
|
||||
+lz4 lzma +openssl pam passwdqc pcre pkcs11 policykit pwquality qrcode
|
||||
+resolvconf +seccomp selinux split-usr +sysv-utils test tpm ukify vanilla xkb +zstd
|
||||
+resolvconf +seccomp selinux split-usr sysv-utils test tpm ukify vanilla xkb +zstd
|
||||
"
|
||||
REQUIRED_USE="
|
||||
${PYTHON_REQUIRED_USE}
|
||||
@ -79,7 +79,6 @@ COMMON_DEPEND="
|
||||
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}] )
|
||||
passwdqc? ( sys-auth/passwdqc:0= )
|
||||
@ -146,17 +145,19 @@ RDEPEND="${COMMON_DEPEND}
|
||||
)
|
||||
!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]
|
||||
PDEPEND="
|
||||
>=sys-apps/dbus-1.9.8[systemd]
|
||||
>=sys-fs/udev-init-scripts-34
|
||||
policykit? ( sys-auth/polkit )
|
||||
!vanilla? ( sys-apps/gentoo-systemd-integration )"
|
||||
!sysv-utils? ( sys-apps/systemd-initctl )
|
||||
!vanilla? ( sys-apps/gentoo-systemd-integration )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
app-arch/xz-utils:0
|
||||
@ -279,7 +280,7 @@ src_unpack() {
|
||||
|
||||
src_prepare() {
|
||||
local PATCHES=(
|
||||
"${FILESDIR}/systemd-259-test-echo.patch"
|
||||
"${FILESDIR}/systemd-260-mips.patch"
|
||||
)
|
||||
|
||||
if ! use vanilla; then
|
||||
@ -346,7 +347,6 @@ multilib_src_configure() {
|
||||
$(meson_feature lz4)
|
||||
$(meson_feature lzma xz)
|
||||
$(meson_feature zstd)
|
||||
$(meson_native_use_feature iptables libiptc)
|
||||
$(meson_native_use_feature openssl)
|
||||
$(meson_feature pam)
|
||||
$(meson_native_use_feature passwdqc)
|
||||
@ -24,8 +24,8 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
inherit bash-completion-r1 linux-info meson-multilib optfeature pam python-single-r1
|
||||
inherit secureboot systemd toolchain-funcs udev
|
||||
inherit branding linux-info meson-multilib optfeature pam python-single-r1
|
||||
inherit secureboot shell-completion systemd toolchain-funcs udev
|
||||
|
||||
DESCRIPTION="System and service manager for Linux"
|
||||
HOMEPAGE="https://systemd.io/"
|
||||
@ -33,13 +33,14 @@ HOMEPAGE="https://systemd.io/"
|
||||
LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
|
||||
SLOT="0/2"
|
||||
IUSE="
|
||||
acl apparmor audit boot bpf cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
|
||||
fido2 +gcrypt gnutls homed http idn importd iptables +kernel-install +kmod
|
||||
+lz4 lzma +openssl pam passwdqc pcre pkcs11 policykit pwquality qrcode
|
||||
+resolvconf +seccomp selinux split-usr +sysv-utils test tpm ukify vanilla xkb +zstd
|
||||
acl apparmor audit boot bpf cryptsetup curl +dns-over-tls elfutils
|
||||
fido2 +gcrypt gnutls homed idn importd +kernel-install +kmod +lz4 lzma
|
||||
+openssl pam passwdqc pcre pkcs11 policykit pwquality qrcode remote
|
||||
+resolvconf +seccomp selinux sysv-utils test tpm ukify vanilla xkb +zstd
|
||||
"
|
||||
REQUIRED_USE="
|
||||
${PYTHON_REQUIRED_USE}
|
||||
boot? ( kernel-install )
|
||||
dns-over-tls? ( openssl )
|
||||
fido2? ( cryptsetup openssl )
|
||||
homed? ( cryptsetup pam openssl )
|
||||
@ -47,51 +48,56 @@ REQUIRED_USE="
|
||||
?? ( passwdqc pwquality )
|
||||
passwdqc? ( homed )
|
||||
pwquality? ( homed )
|
||||
boot? ( kernel-install )
|
||||
remote? ( curl )
|
||||
ukify? ( boot )
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
MINKV="4.15"
|
||||
MINKV="5.10"
|
||||
|
||||
COMMON_DEPEND="
|
||||
>=sys-apps/util-linux-2.32:0=[${MULTILIB_USEDEP}]
|
||||
sys-libs/libcap:0=[${MULTILIB_USEDEP}]
|
||||
virtual/libcrypt:=[${MULTILIB_USEDEP}]
|
||||
acl? ( sys-apps/acl:0= )
|
||||
apparmor? ( >=sys-libs/libapparmor-2.13:0= )
|
||||
audit? ( >=sys-process/audit-2:0= )
|
||||
bpf? ( >=dev-libs/libbpf-1.4.0:0= )
|
||||
cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= )
|
||||
>=sys-apps/util-linux-2.37
|
||||
acl? ( sys-apps/acl )
|
||||
apparmor? ( >=sys-libs/libapparmor-2.13 )
|
||||
audit? ( >=sys-process/audit-2 )
|
||||
bpf? ( >=dev-libs/libbpf-1.4.0 )
|
||||
cryptsetup? ( >=sys-fs/cryptsetup-2.4.0:= )
|
||||
curl? ( >=net-misc/curl-7.32.0:0= )
|
||||
elfutils? ( >=dev-libs/elfutils-0.158:0= )
|
||||
fido2? (
|
||||
dev-libs/libfido2:0=
|
||||
elfutils? ( >=dev-libs/elfutils-0.177 )
|
||||
elibc_glibc? (
|
||||
>=sys-libs/glibc-2.34
|
||||
>=sys-libs/libxcrypt-4.4.0
|
||||
)
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
|
||||
elibc_musl? (
|
||||
>=sys-libs/musl-1.2.5-r8
|
||||
virtual/libcrypt
|
||||
)
|
||||
fido2? (
|
||||
dev-libs/libfido2
|
||||
)
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.4.5 )
|
||||
gnutls? ( >=net-libs/gnutls-3.6.0:0= )
|
||||
http? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] )
|
||||
idn? ( net-dns/libidn2:= )
|
||||
remote? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] )
|
||||
idn? ( net-dns/libidn2 )
|
||||
importd? (
|
||||
app-arch/bzip2:0=
|
||||
virtual/zlib:=
|
||||
)
|
||||
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= )
|
||||
lz4? ( >=app-arch/lz4-0_p131:0= )
|
||||
lzma? ( >=app-arch/xz-utils-5.0.5-r1:0= )
|
||||
openssl? ( >=dev-libs/openssl-3.0.0:0= )
|
||||
pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] )
|
||||
passwdqc? ( sys-auth/passwdqc:0= )
|
||||
pkcs11? ( >=app-crypt/p11-kit-0.23.3:0= )
|
||||
passwdqc? ( sys-auth/passwdqc )
|
||||
pkcs11? ( >=app-crypt/p11-kit-0.23.3 )
|
||||
pcre? ( dev-libs/libpcre2 )
|
||||
pwquality? ( >=dev-libs/libpwquality-1.4.1:0= )
|
||||
pwquality? ( >=dev-libs/libpwquality-1.4.1 )
|
||||
qrcode? ( >=media-gfx/qrencode-3:0= )
|
||||
seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
|
||||
selinux? ( >=sys-libs/libselinux-2.1.9: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}] )
|
||||
seccomp? ( >=sys-libs/libseccomp-2.4.0 )
|
||||
selinux? ( >=sys-libs/libselinux-2.1.9 )
|
||||
tpm? ( app-crypt/tpm2-tss )
|
||||
xkb? ( >=x11-libs/libxkbcommon-0.4.1 )
|
||||
zstd? ( >=app-arch/zstd-1.4.0:0= )
|
||||
"
|
||||
|
||||
# Newer linux-headers needed by ia64, bug #480218
|
||||
@ -131,7 +137,6 @@ RDEPEND="${COMMON_DEPEND}
|
||||
>=acct-user/systemd-resolve-0-r1
|
||||
>=acct-user/systemd-timesync-0-r1
|
||||
>=sys-apps/baselayout-2.2
|
||||
elibc_musl? ( >=sys-libs/musl-1.2.5-r8 )
|
||||
ukify? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_cond_dep "${PEFILE_DEPEND}")
|
||||
@ -146,17 +151,19 @@ RDEPEND="${COMMON_DEPEND}
|
||||
)
|
||||
!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]
|
||||
PDEPEND="
|
||||
>=sys-apps/dbus-1.9.8[systemd]
|
||||
>=sys-fs/udev-init-scripts-34
|
||||
policykit? ( sys-auth/polkit )
|
||||
!vanilla? ( sys-apps/gentoo-systemd-integration )"
|
||||
!sysv-utils? ( sys-apps/systemd-initctl )
|
||||
!vanilla? ( sys-apps/gentoo-systemd-integration )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
app-arch/xz-utils:0
|
||||
@ -172,6 +179,7 @@ BDEPEND="
|
||||
test? (
|
||||
app-text/tree
|
||||
dev-lang/perl
|
||||
>=dev-libs/glib-2.22.0:2
|
||||
sys-apps/dbus
|
||||
)
|
||||
app-text/docbook-xml-dtd:4.2
|
||||
@ -192,38 +200,7 @@ 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
|
||||
@ -279,7 +256,8 @@ src_unpack() {
|
||||
|
||||
src_prepare() {
|
||||
local PATCHES=(
|
||||
"${FILESDIR}/systemd-259-vmspawn-use-indexed-loop.patch"
|
||||
"${FILESDIR}/systemd-260-mips.patch"
|
||||
"${FILESDIR}/systemd-260-kernel-install.patch"
|
||||
)
|
||||
|
||||
if ! use vanilla; then
|
||||
@ -304,102 +282,125 @@ multilib_src_configure() {
|
||||
local myconf=(
|
||||
--localstatedir="${EPREFIX}/var"
|
||||
-Ddocdir="share/doc/${PF}"
|
||||
# default is developer, bug 918671
|
||||
-Dmode=release
|
||||
-Dsupport-url="https://gentoo.org/support/"
|
||||
-Dpamlibdir="$(getpam_mod_dir)"
|
||||
-Dmode=release # default is developer, bug 918671
|
||||
-Dlibc=$(usex elibc_musl musl glibc)
|
||||
# avoid bash-completion dep
|
||||
-Dsupport-url="${BRANDING_OS_SUPPORT_URL}"
|
||||
-Dpamlibdir="$(getpam_mod_dir)"
|
||||
-Dbashcompletiondir="$(get_bashcompdir)"
|
||||
-Dzshcompletiondir="$(get_zshcompdir)"
|
||||
-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"
|
||||
-Dima=true # no deps
|
||||
-Ddebug-shell="${EPREFIX}/bin/sh" # Match /etc/shells, bug 919749
|
||||
-Ddefault-user-shell="${EPREFIX}/bin/bash"
|
||||
# Optional components/dependencies
|
||||
$(meson_native_use_feature acl)
|
||||
$(meson_native_use_feature apparmor)
|
||||
$(meson_native_use_feature audit)
|
||||
$(meson_native_use_feature boot bootloader)
|
||||
$(meson_native_use_feature bpf bpf-framework)
|
||||
-Dbpf-compiler=gcc
|
||||
$(meson_native_use_feature cryptsetup libcryptsetup)
|
||||
$(meson_native_use_feature curl libcurl)
|
||||
$(meson_native_use_bool dns-over-tls dns-over-tls)
|
||||
$(meson_native_use_feature elfutils)
|
||||
$(meson_native_use_feature fido2 libfido2)
|
||||
$(meson_feature gcrypt)
|
||||
$(meson_native_use_feature gnutls)
|
||||
$(meson_native_use_feature homed)
|
||||
$(meson_native_use_feature http microhttpd)
|
||||
$(meson_native_use_bool idn)
|
||||
$(meson_native_use_feature importd)
|
||||
$(meson_native_use_feature importd bzip2)
|
||||
$(meson_native_use_feature importd zlib)
|
||||
$(meson_native_use_bool kernel-install)
|
||||
$(meson_native_use_feature kmod)
|
||||
$(meson_feature lz4)
|
||||
$(meson_feature lzma xz)
|
||||
$(meson_use test tests)
|
||||
$(meson_feature zstd)
|
||||
$(meson_native_use_feature iptables libiptc)
|
||||
$(meson_native_use_feature openssl)
|
||||
$(meson_feature pam)
|
||||
$(meson_native_use_feature passwdqc)
|
||||
$(meson_native_use_feature pkcs11 p11kit)
|
||||
$(meson_native_use_feature pcre pcre2)
|
||||
$(meson_native_use_feature policykit polkit)
|
||||
$(meson_native_use_feature pwquality)
|
||||
$(meson_native_use_feature qrcode qrencode)
|
||||
$(meson_native_use_feature seccomp)
|
||||
$(meson_native_use_feature selinux)
|
||||
$(meson_native_use_feature tpm tpm2)
|
||||
$(meson_native_use_feature test dbus)
|
||||
$(meson_native_use_feature ukify)
|
||||
$(meson_native_use_feature 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
|
||||
-Dlibcrypt=enabled
|
||||
-Dcompat-mutable-uid-boundaries=true
|
||||
|
||||
# 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_enabled 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)
|
||||
# options affecting multilib
|
||||
$(meson_use !elibc_musl nss-myhostname)
|
||||
$(meson_feature !elibc_musl nss-mymachines)
|
||||
$(meson_feature !elibc_musl nss-resolve)
|
||||
$(meson_use !elibc_musl nss-systemd)
|
||||
$(meson_feature pam)
|
||||
)
|
||||
|
||||
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
|
||||
# workaround for bug 969103
|
||||
if [[ ${CHOST} == riscv32* ]] ; then
|
||||
myconf+=( -Dtests=true )
|
||||
else
|
||||
myconf+=( $(meson_use test tests) )
|
||||
fi
|
||||
|
||||
if multilib_is_native_abi; then
|
||||
myconf+=(
|
||||
--auto-features=enabled
|
||||
-Dman=enabled
|
||||
-Dxenctrl=disabled
|
||||
|
||||
# Optional components/dependencies
|
||||
$(meson_feature acl)
|
||||
$(meson_feature apparmor)
|
||||
$(meson_feature audit)
|
||||
$(meson_feature boot bootloader)
|
||||
$(meson_feature bpf bpf-framework)
|
||||
$(meson_feature cryptsetup libcryptsetup)
|
||||
$(meson_feature cryptsetup libcryptsetup-plugins)
|
||||
$(meson_feature curl libcurl)
|
||||
$(meson_use dns-over-tls dns-over-tls)
|
||||
$(meson_feature elfutils)
|
||||
$(meson_feature fido2 libfido2)
|
||||
$(meson_feature gcrypt)
|
||||
$(meson_feature gnutls)
|
||||
$(meson_feature homed)
|
||||
$(meson_use idn)
|
||||
$(meson_feature importd)
|
||||
$(meson_feature importd bzip2)
|
||||
$(meson_feature importd sysupdate)
|
||||
$(meson_feature importd zlib)
|
||||
$(meson_use kernel-install)
|
||||
$(meson_feature kmod)
|
||||
$(meson_feature lz4)
|
||||
$(meson_feature lzma xz)
|
||||
$(meson_feature zstd)
|
||||
$(meson_feature openssl)
|
||||
$(meson_feature passwdqc)
|
||||
$(meson_feature pkcs11 p11kit)
|
||||
$(meson_feature pcre pcre2)
|
||||
$(meson_feature policykit polkit)
|
||||
$(meson_feature pwquality)
|
||||
$(meson_feature qrcode qrencode)
|
||||
$(meson_feature remote)
|
||||
$(meson_feature remote microhttpd)
|
||||
$(meson_feature seccomp)
|
||||
$(meson_feature selinux)
|
||||
$(meson_feature tpm tpm2)
|
||||
$(meson_feature test dbus)
|
||||
$(meson_feature test glib)
|
||||
$(meson_feature ukify)
|
||||
$(meson_feature xkb xkbcommon)
|
||||
)
|
||||
|
||||
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
|
||||
else
|
||||
myconf+=(
|
||||
--auto-features=disabled
|
||||
)
|
||||
fi
|
||||
|
||||
meson_src_configure "${myconf[@]}"
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
local args=()
|
||||
if ! multilib_is_native_abi; then
|
||||
args+=(
|
||||
devel libsystemd libudev
|
||||
$(usex elibc_musl '' nss)
|
||||
$(usev pam)
|
||||
)
|
||||
fi
|
||||
meson_src_compile "${args[@]}"
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
local args=( --timeout-multiplier=10 )
|
||||
if ! multilib_is_native_abi; then
|
||||
args+=(
|
||||
--suite libsystemd --suite libudev
|
||||
$(usex elibc_musl '' '--suite nss')
|
||||
$(usex pam '--suite pam' '')
|
||||
)
|
||||
fi
|
||||
(
|
||||
unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
|
||||
export COLUMNS=80
|
||||
@ -407,10 +408,21 @@ multilib_src_test() {
|
||||
addpredict /proc
|
||||
addpredict /run
|
||||
addpredict /sys/fs/cgroup
|
||||
meson_src_test --timeout-multiplier=10
|
||||
meson_src_test "${args[@]}"
|
||||
) || die
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
local args=()
|
||||
if ! multilib_is_native_abi; then
|
||||
local tags=devel,libsystemd,libudev
|
||||
use !elibc_musl && tags+=,nss
|
||||
use pam && tags+=,pam
|
||||
args+=( --tags "${tags}" )
|
||||
fi
|
||||
meson_src_install "${args[@]}"
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
dodoc "${FILESDIR}"/nsswitch.conf
|
||||
@ -531,6 +543,9 @@ pkg_postinst() {
|
||||
# between OpenRC & systemd
|
||||
migrate_locale
|
||||
|
||||
# Bug 971385
|
||||
systemd_reenable getty@.service
|
||||
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
if type systemctl &>/dev/null; then
|
||||
systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1
|
||||
@ -33,13 +33,14 @@ HOMEPAGE="https://systemd.io/"
|
||||
LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
|
||||
SLOT="0/2"
|
||||
IUSE="
|
||||
acl apparmor audit boot bpf cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
|
||||
fido2 +gcrypt gnutls homed http idn importd iptables +kernel-install +kmod
|
||||
+lz4 lzma +openssl pam passwdqc pcre pkcs11 policykit pwquality qrcode
|
||||
+resolvconf +seccomp selinux split-usr +sysv-utils test tpm ukify vanilla xkb +zstd
|
||||
acl apparmor audit boot bpf cryptsetup curl +dns-over-tls elfutils
|
||||
fido2 +gcrypt gnutls homed idn importd +kernel-install +kmod +lz4 lzma
|
||||
+openssl pam passwdqc pcre pkcs11 policykit pwquality qrcode remote
|
||||
+resolvconf +seccomp selinux sysv-utils test tpm ukify vanilla xkb +zstd
|
||||
"
|
||||
REQUIRED_USE="
|
||||
${PYTHON_REQUIRED_USE}
|
||||
boot? ( kernel-install )
|
||||
dns-over-tls? ( openssl )
|
||||
fido2? ( cryptsetup openssl )
|
||||
homed? ( cryptsetup pam openssl )
|
||||
@ -47,51 +48,56 @@ REQUIRED_USE="
|
||||
?? ( passwdqc pwquality )
|
||||
passwdqc? ( homed )
|
||||
pwquality? ( homed )
|
||||
boot? ( kernel-install )
|
||||
remote? ( curl )
|
||||
ukify? ( boot )
|
||||
"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
MINKV="4.15"
|
||||
MINKV="5.10"
|
||||
|
||||
COMMON_DEPEND="
|
||||
>=sys-apps/util-linux-2.32:0=[${MULTILIB_USEDEP}]
|
||||
sys-libs/libcap:0=[${MULTILIB_USEDEP}]
|
||||
virtual/libcrypt:=[${MULTILIB_USEDEP}]
|
||||
acl? ( sys-apps/acl:0= )
|
||||
apparmor? ( >=sys-libs/libapparmor-2.13:0= )
|
||||
audit? ( >=sys-process/audit-2:0= )
|
||||
bpf? ( >=dev-libs/libbpf-1.4.0:0= )
|
||||
cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= )
|
||||
>=sys-apps/util-linux-2.37
|
||||
acl? ( sys-apps/acl )
|
||||
apparmor? ( >=sys-libs/libapparmor-2.13 )
|
||||
audit? ( >=sys-process/audit-2 )
|
||||
bpf? ( >=dev-libs/libbpf-1.4.0 )
|
||||
cryptsetup? ( >=sys-fs/cryptsetup-2.4.0:= )
|
||||
curl? ( >=net-misc/curl-7.32.0:0= )
|
||||
elfutils? ( >=dev-libs/elfutils-0.158:0= )
|
||||
fido2? (
|
||||
dev-libs/libfido2:0=
|
||||
elfutils? ( >=dev-libs/elfutils-0.177 )
|
||||
elibc_glibc? (
|
||||
>=sys-libs/glibc-2.34
|
||||
>=sys-libs/libxcrypt-4.4.0
|
||||
)
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
|
||||
elibc_musl? (
|
||||
>=sys-libs/musl-1.2.5-r8
|
||||
virtual/libcrypt
|
||||
)
|
||||
fido2? (
|
||||
dev-libs/libfido2
|
||||
)
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.4.5 )
|
||||
gnutls? ( >=net-libs/gnutls-3.6.0:0= )
|
||||
http? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] )
|
||||
idn? ( net-dns/libidn2:= )
|
||||
remote? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] )
|
||||
idn? ( net-dns/libidn2 )
|
||||
importd? (
|
||||
app-arch/bzip2:0=
|
||||
virtual/zlib:=
|
||||
)
|
||||
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= )
|
||||
lz4? ( >=app-arch/lz4-0_p131:0= )
|
||||
lzma? ( >=app-arch/xz-utils-5.0.5-r1:0= )
|
||||
openssl? ( >=dev-libs/openssl-3.0.0:0= )
|
||||
pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] )
|
||||
passwdqc? ( sys-auth/passwdqc:0= )
|
||||
pkcs11? ( >=app-crypt/p11-kit-0.23.3:0= )
|
||||
passwdqc? ( sys-auth/passwdqc )
|
||||
pkcs11? ( >=app-crypt/p11-kit-0.23.3 )
|
||||
pcre? ( dev-libs/libpcre2 )
|
||||
pwquality? ( >=dev-libs/libpwquality-1.4.1:0= )
|
||||
pwquality? ( >=dev-libs/libpwquality-1.4.1 )
|
||||
qrcode? ( >=media-gfx/qrencode-3:0= )
|
||||
seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
|
||||
selinux? ( >=sys-libs/libselinux-2.1.9: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}] )
|
||||
seccomp? ( >=sys-libs/libseccomp-2.4.0 )
|
||||
selinux? ( >=sys-libs/libselinux-2.1.9 )
|
||||
tpm? ( app-crypt/tpm2-tss )
|
||||
xkb? ( >=x11-libs/libxkbcommon-0.4.1 )
|
||||
zstd? ( >=app-arch/zstd-1.4.0:0= )
|
||||
"
|
||||
|
||||
# Newer linux-headers needed by ia64, bug #480218
|
||||
@ -131,7 +137,6 @@ RDEPEND="${COMMON_DEPEND}
|
||||
>=acct-user/systemd-resolve-0-r1
|
||||
>=acct-user/systemd-timesync-0-r1
|
||||
>=sys-apps/baselayout-2.2
|
||||
elibc_musl? ( >=sys-libs/musl-1.2.5-r8 )
|
||||
ukify? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_cond_dep "${PEFILE_DEPEND}")
|
||||
@ -146,17 +151,19 @@ RDEPEND="${COMMON_DEPEND}
|
||||
)
|
||||
!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]
|
||||
PDEPEND="
|
||||
>=sys-apps/dbus-1.9.8[systemd]
|
||||
>=sys-fs/udev-init-scripts-34
|
||||
policykit? ( sys-auth/polkit )
|
||||
!vanilla? ( sys-apps/gentoo-systemd-integration )"
|
||||
!sysv-utils? ( sys-apps/systemd-initctl )
|
||||
!vanilla? ( sys-apps/gentoo-systemd-integration )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
app-arch/xz-utils:0
|
||||
@ -172,6 +179,7 @@ BDEPEND="
|
||||
test? (
|
||||
app-text/tree
|
||||
dev-lang/perl
|
||||
>=dev-libs/glib-2.22.0:2
|
||||
sys-apps/dbus
|
||||
)
|
||||
app-text/docbook-xml-dtd:4.2
|
||||
@ -192,38 +200,7 @@ 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
|
||||
@ -303,88 +280,30 @@ multilib_src_configure() {
|
||||
local myconf=(
|
||||
--localstatedir="${EPREFIX}/var"
|
||||
-Ddocdir="share/doc/${PF}"
|
||||
# default is developer, bug 918671
|
||||
-Dmode=release
|
||||
-Dmode=release # default is developer, bug 918671
|
||||
-Dlibc=$(usex elibc_musl musl glibc)
|
||||
-Dsupport-url="${BRANDING_OS_SUPPORT_URL}"
|
||||
-Dpamlibdir="$(getpam_mod_dir)"
|
||||
-Dlibc=$(usex elibc_musl musl glibc)
|
||||
# avoid bash-completion dep
|
||||
-Dbashcompletiondir="$(get_bashcompdir)"
|
||||
-Dzshcompletiondir="$(get_zshcompdir)"
|
||||
-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"
|
||||
-Dima=true # no deps
|
||||
-Ddebug-shell="${EPREFIX}/bin/sh" # Match /etc/shells, bug 919749
|
||||
-Ddefault-user-shell="${EPREFIX}/bin/bash"
|
||||
# Optional components/dependencies
|
||||
$(meson_native_use_feature acl)
|
||||
$(meson_native_use_feature apparmor)
|
||||
$(meson_native_use_feature audit)
|
||||
$(meson_native_use_feature boot bootloader)
|
||||
$(meson_native_use_feature bpf bpf-framework)
|
||||
-Dbpf-compiler=gcc
|
||||
$(meson_native_use_feature cryptsetup libcryptsetup)
|
||||
$(meson_native_use_feature curl libcurl)
|
||||
$(meson_native_use_bool dns-over-tls dns-over-tls)
|
||||
$(meson_native_use_feature elfutils)
|
||||
$(meson_native_use_feature fido2 libfido2)
|
||||
$(meson_feature gcrypt)
|
||||
$(meson_native_use_feature gnutls)
|
||||
$(meson_native_use_feature homed)
|
||||
$(meson_native_use_feature http microhttpd)
|
||||
$(meson_native_use_bool idn)
|
||||
$(meson_native_use_feature importd)
|
||||
$(meson_native_use_feature importd bzip2)
|
||||
$(meson_native_use_feature importd zlib)
|
||||
$(meson_native_use_bool kernel-install)
|
||||
$(meson_native_use_feature kmod)
|
||||
$(meson_feature lz4)
|
||||
$(meson_feature lzma xz)
|
||||
$(meson_feature zstd)
|
||||
$(meson_native_use_feature iptables libiptc)
|
||||
$(meson_native_use_feature openssl)
|
||||
$(meson_feature pam)
|
||||
$(meson_native_use_feature passwdqc)
|
||||
$(meson_native_use_feature pkcs11 p11kit)
|
||||
$(meson_native_use_feature pcre pcre2)
|
||||
$(meson_native_use_feature policykit polkit)
|
||||
$(meson_native_use_feature pwquality)
|
||||
$(meson_native_use_feature qrcode qrencode)
|
||||
$(meson_native_use_feature seccomp)
|
||||
$(meson_native_use_feature selinux)
|
||||
$(meson_native_use_feature tpm tpm2)
|
||||
$(meson_native_use_feature test dbus)
|
||||
$(meson_native_use_feature ukify)
|
||||
$(meson_native_use_feature 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
|
||||
-Dlibcrypt=enabled
|
||||
-Dcompat-mutable-uid-boundaries=true
|
||||
|
||||
# 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_enabled 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)
|
||||
# options affecting multilib
|
||||
$(meson_use !elibc_musl nss-myhostname)
|
||||
$(meson_feature !elibc_musl nss-mymachines)
|
||||
$(meson_feature !elibc_musl nss-resolve)
|
||||
$(meson_use !elibc_musl nss-systemd)
|
||||
$(meson_feature pam)
|
||||
)
|
||||
|
||||
# workaround for bug 969103
|
||||
@ -394,18 +313,92 @@ multilib_src_configure() {
|
||||
myconf+=( $(meson_use test tests) )
|
||||
fi
|
||||
|
||||
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
|
||||
if multilib_is_native_abi; then
|
||||
myconf+=(
|
||||
--auto-features=enabled
|
||||
-Dman=enabled
|
||||
-Dxenctrl=disabled
|
||||
|
||||
# Optional components/dependencies
|
||||
$(meson_feature acl)
|
||||
$(meson_feature apparmor)
|
||||
$(meson_feature audit)
|
||||
$(meson_feature boot bootloader)
|
||||
$(meson_feature bpf bpf-framework)
|
||||
$(meson_feature cryptsetup libcryptsetup)
|
||||
$(meson_feature cryptsetup libcryptsetup-plugins)
|
||||
$(meson_feature curl libcurl)
|
||||
$(meson_use dns-over-tls dns-over-tls)
|
||||
$(meson_feature elfutils)
|
||||
$(meson_feature fido2 libfido2)
|
||||
$(meson_feature gcrypt)
|
||||
$(meson_feature gnutls)
|
||||
$(meson_feature homed)
|
||||
$(meson_use idn)
|
||||
$(meson_feature importd)
|
||||
$(meson_feature importd bzip2)
|
||||
$(meson_feature importd sysupdate)
|
||||
$(meson_feature importd zlib)
|
||||
$(meson_use kernel-install)
|
||||
$(meson_feature kmod)
|
||||
$(meson_feature lz4)
|
||||
$(meson_feature lzma xz)
|
||||
$(meson_feature zstd)
|
||||
$(meson_feature openssl)
|
||||
$(meson_feature passwdqc)
|
||||
$(meson_feature pkcs11 p11kit)
|
||||
$(meson_feature pcre pcre2)
|
||||
$(meson_feature policykit polkit)
|
||||
$(meson_feature pwquality)
|
||||
$(meson_feature qrcode qrencode)
|
||||
$(meson_feature remote)
|
||||
$(meson_feature remote microhttpd)
|
||||
$(meson_feature seccomp)
|
||||
$(meson_feature selinux)
|
||||
$(meson_feature tpm tpm2)
|
||||
$(meson_feature test dbus)
|
||||
$(meson_feature test glib)
|
||||
$(meson_feature ukify)
|
||||
$(meson_feature xkb xkbcommon)
|
||||
)
|
||||
|
||||
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
|
||||
else
|
||||
myconf+=(
|
||||
--auto-features=disabled
|
||||
)
|
||||
fi
|
||||
|
||||
meson_src_configure "${myconf[@]}"
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
local args=()
|
||||
if ! multilib_is_native_abi; then
|
||||
args+=(
|
||||
devel libsystemd libudev
|
||||
$(usex elibc_musl '' nss)
|
||||
$(usev pam)
|
||||
)
|
||||
fi
|
||||
meson_src_compile "${args[@]}"
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
local args=( --timeout-multiplier=10 )
|
||||
if ! multilib_is_native_abi; then
|
||||
args+=(
|
||||
--suite libsystemd --suite libudev
|
||||
$(usex elibc_musl '' '--suite nss')
|
||||
$(usex pam '--suite pam' '')
|
||||
)
|
||||
fi
|
||||
(
|
||||
unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
|
||||
export COLUMNS=80
|
||||
@ -413,10 +406,21 @@ multilib_src_test() {
|
||||
addpredict /proc
|
||||
addpredict /run
|
||||
addpredict /sys/fs/cgroup
|
||||
meson_src_test --timeout-multiplier=10
|
||||
meson_src_test "${args[@]}"
|
||||
) || die
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
local args=()
|
||||
if ! multilib_is_native_abi; then
|
||||
local tags=devel,libsystemd,libudev
|
||||
use !elibc_musl && tags+=,nss
|
||||
use pam && tags+=,pam
|
||||
args+=( --tags "${tags}" )
|
||||
fi
|
||||
meson_src_install "${args[@]}"
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
dodoc "${FILESDIR}"/nsswitch.conf
|
||||
@ -537,6 +541,9 @@ pkg_postinst() {
|
||||
# between OpenRC & systemd
|
||||
migrate_locale
|
||||
|
||||
# Bug 971385
|
||||
systemd_reenable getty@.service
|
||||
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
if type systemctl &>/dev/null; then
|
||||
systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user