2
2
# Distributed under the terms of the GNU General Public License v2
3
3
4
4
EAPI=8
5
- PYTHON_COMPAT=( python3_{10..12 } )
5
+ PYTHON_COMPAT=( python3_{10..13 } )
6
6
7
7
# Avoid QA warnings
8
8
TMPFILES_OPTIONAL=1
@@ -14,15 +14,10 @@ if [[ ${PV} == 9999 ]]; then
14
14
EGIT_REPO_URI=" https://github.com/systemd/systemd.git"
15
15
inherit git-r3
16
16
else
17
- if [[ ${PV} == * .* ]]; then
18
- MY_PN=systemd-stable
19
- else
20
- MY_PN=systemd
21
- fi
22
17
MY_PV=${PV/ _/ -}
23
- MY_P=${MY_PN } -${MY_PV}
18
+ MY_P=${PN } -${MY_PV}
24
19
S=${WORKDIR} /${MY_P}
25
- SRC_URI=" https://github.com/systemd/${MY_PN } /archive/v${MY_PV} / ${MY_P} .tar.gz"
20
+ SRC_URI=" https://github.com/systemd/${PN } /archive/refs/tags/ v${MY_PV} .tar.gz -> ${MY_P} .tar.gz"
26
21
27
22
if [[ ${PV} != * rc* ]] ; then
28
23
# Flatcar: mark as stable
@@ -34,12 +29,12 @@ inherit bash-completion-r1 linux-info meson-multilib optfeature pam python-singl
34
29
inherit secureboot systemd tmpfiles toolchain-funcs udev
35
30
36
31
DESCRIPTION=" System and service manager for Linux"
37
- HOMEPAGE=" http ://systemd.io/"
32
+ HOMEPAGE=" https ://systemd.io/"
38
33
39
34
LICENSE=" GPL-2 LGPL-2.1 MIT public-domain"
40
35
SLOT=" 0/2"
41
36
IUSE="
42
- acl apparmor audit boot cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
37
+ acl apparmor audit boot bpf cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
43
38
fido2 +gcrypt gnutls homed http idn importd iptables +kernel-install +kmod
44
39
+lz4 lzma +openssl pam pcre pkcs11 policykit pwquality qrcode
45
40
+resolvconf +seccomp selinux split-usr +sysv-utils test tpm ukify vanilla xkb +zstd
@@ -65,6 +60,7 @@ COMMON_DEPEND="
65
60
acl? ( sys-apps/acl:0= )
66
61
apparmor? ( >=sys-libs/libapparmor-2.13:0= )
67
62
audit? ( >=sys-process/audit-2:0= )
63
+ bpf? ( >=dev-libs/libbpf-1.4.0:0= )
68
64
cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= )
69
65
curl? ( >=net-misc/curl-7.32.0:0= )
70
66
elfutils? ( >=dev-libs/elfutils-0.158:0= )
@@ -148,11 +144,11 @@ RDEPEND="${COMMON_DEPEND}
148
144
)
149
145
sysv-utils? (
150
146
!sys-apps/openrc[sysv-utils(-)]
147
+ !sys-apps/openrc-navi[sysv-utils(-)]
151
148
!sys-apps/sysvinit
152
149
)
153
150
!sysv-utils? ( sys-apps/sysvinit )
154
151
resolvconf? ( !net-dns/openresolv )
155
- !sys-apps/hwids[udev]
156
152
!sys-auth/nss-myhostname
157
153
!sys-fs/eudev
158
154
!sys-fs/udev
@@ -171,6 +167,10 @@ BDEPEND="
171
167
>=sys-apps/coreutils-8.16
172
168
sys-devel/gettext
173
169
virtual/pkgconfig
170
+ bpf? (
171
+ dev-util/bpftool
172
+ sys-devel/bpf-toolchain
173
+ )
174
174
test? (
175
175
app-text/tree
176
176
dev-lang/perl
@@ -211,6 +211,7 @@ pkg_pretend() {
211
211
~!SYSFS_DEPRECATED_V2"
212
212
213
213
use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
214
+ use bpf && CONFIG_CHECK+=" ~BPF ~BPF_SYSCALL ~BPF_LSM ~DEBUG_INFO_BTF"
214
215
use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
215
216
216
217
if kernel_is -ge 5 10 20; then
@@ -256,21 +257,19 @@ src_unpack() {
256
257
src_prepare () {
257
258
local PATCHES=(
258
259
" ${FILESDIR} /systemd-test-process-util.patch"
260
+ " ${FILESDIR} /256-bpf-gcc.patch"
259
261
# Flatcar: Adding our own patches here.
260
262
" ${FILESDIR} /0001-wait-online-set-any-by-default.patch"
261
- " ${FILESDIR} /0002-networkd-default-to-kernel-IPForwarding-setting.patch"
262
263
" ${FILESDIR} /0003-needs-update-don-t-require-strictly-newer-usr.patch"
263
264
" ${FILESDIR} /0004-core-use-max-for-DefaultTasksMax.patch"
264
265
" ${FILESDIR} /0005-systemd-Disable-SELinux-permissions-checks.patch"
265
266
" ${FILESDIR} /0006-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch"
266
267
" ${FILESDIR} /0007-units-Keep-using-old-journal-file-format.patch"
267
- # Flatcar: This can be dropped when updating to 256.
268
- " ${FILESDIR} /0008-sysext-Mutable-overlays.patch"
268
+ " ${FILESDIR} /0009-initrd-parse-etc.service.patch"
269
269
)
270
270
271
271
if ! use vanilla; then
272
272
PATCHES+=(
273
- " ${FILESDIR} /gentoo-generator-path-r2.patch"
274
273
" ${FILESDIR} /gentoo-journald-audit-r1.patch"
275
274
)
276
275
fi
@@ -335,11 +334,8 @@ multilib_src_configure() {
335
334
# Disable compatibility with sysvinit
336
335
-Dsysvinit-path=
337
336
-Dsysvrcnd-path=
338
- # Avoid infinite exec recursion, bug 642724
339
- -Dtelinit-path=" ${EPREFIX} /lib/sysvinit/telinit"
340
337
# no deps
341
338
-Dima=true
342
- -Ddefault-hierarchy=$( usex cgroup-hybrid hybrid unified)
343
339
# Match /etc/shells, bug 919749
344
340
-Ddebug-shell=" ${EPREFIX} /bin/sh"
345
341
-Ddefault-user-shell=" ${EPREFIX} /bin/bash"
@@ -348,6 +344,8 @@ multilib_src_configure() {
348
344
$( meson_native_use_bool apparmor)
349
345
$( meson_native_use_bool audit)
350
346
$( meson_native_use_bool boot bootloader)
347
+ $( meson_native_use_bool bpf bpf-framework)
348
+ -Dbpf-compiler=gcc
351
349
$( meson_native_use_bool cryptsetup libcryptsetup)
352
350
$( meson_native_use_bool curl libcurl)
353
351
$( meson_native_use_bool dns-over-tls dns-over-tls)
@@ -447,6 +445,14 @@ multilib_src_configure() {
447
445
-Ddefault-mdns=no
448
446
)
449
447
448
+ case $( tc-arch) in
449
+ amd64|arm|arm64|ppc|ppc64|s390|x86)
450
+ # src/vmspawn/vmspawn-util.h: QEMU_MACHINE_TYPE
451
+ myconf+=( $( meson_native_enabled vmspawn) ) ;;
452
+ * )
453
+ myconf+=( -Dvmspawn=disabled ) ;;
454
+ esac
455
+
450
456
meson_src_configure " ${myconf[@]} "
451
457
}
452
458
@@ -504,7 +510,11 @@ multilib_src_install_all() {
504
510
# keepdir /var/log/journal
505
511
506
512
# if use pam; then
507
- # newpamd "${FILESDIR}"/systemd-user.pam systemd-user
513
+ # if use selinux; then
514
+ # newpamd "${FILESDIR}"/systemd-user-selinux.pam systemd-user
515
+ # else
516
+ # newpamd "${FILESDIR}"/systemd-user.pam systemd-user
517
+ # fi
508
518
# fi
509
519
510
520
if use kernel-install; then
0 commit comments