| 20 |
20 |
SRC_URI="https://github.com/systemd/${PN}/archive/refs/tags/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
|
| 21 |
21 |
|
| 22 |
22 |
if [[ ${PV} != *rc* ]] ; then
|
| 23 |
|
KEYWORDS="amd64 arm arm64 ppc ppc64 ~s390 x86"
|
|
23 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
| 24 |
24 |
fi
|
| 25 |
25 |
fi
|
| 26 |
26 |
|
| ... | ... | |
| 33 |
33 |
LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
|
| 34 |
34 |
SLOT="0/2"
|
| 35 |
35 |
IUSE="
|
| 36 |
|
acl apparmor audit boot bpf cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
|
| 37 |
|
fido2 +gcrypt gnutls homed http idn importd +kernel-install +kmod
|
| 38 |
|
+lz4 lzma +openssl pam passwdqc pcre pkcs11 policykit pwquality qrcode
|
| 39 |
|
+resolvconf +seccomp selinux split-usr sysv-utils test tpm ukify vanilla xkb +zstd
|
|
36 |
acl apparmor audit boot bpf cryptsetup curl +dns-over-tls elfutils
|
|
37 |
fido2 +gcrypt gnutls homed idn importd +kernel-install +kmod +lz4 lzma
|
|
38 |
+openssl pam passwdqc pcre pkcs11 policykit pwquality qrcode remote
|
|
39 |
+resolvconf +seccomp selinux sysv-utils test tpm ukify vanilla xkb +zstd
|
| 40 |
40 |
"
|
| 41 |
41 |
REQUIRED_USE="
|
| 42 |
42 |
${PYTHON_REQUIRED_USE}
|
|
43 |
boot? ( kernel-install )
|
| 43 |
44 |
dns-over-tls? ( openssl )
|
| 44 |
45 |
fido2? ( cryptsetup openssl )
|
| 45 |
46 |
homed? ( cryptsetup pam openssl )
|
| ... | ... | |
| 47 |
48 |
?? ( passwdqc pwquality )
|
| 48 |
49 |
passwdqc? ( homed )
|
| 49 |
50 |
pwquality? ( homed )
|
| 50 |
|
boot? ( kernel-install )
|
|
51 |
remote? ( curl )
|
| 51 |
52 |
ukify? ( boot )
|
| 52 |
53 |
"
|
| 53 |
54 |
RESTRICT="!test? ( test )"
|
| 54 |
55 |
|
| 55 |
|
MINKV="4.15"
|
|
56 |
MINKV="5.10"
|
| 56 |
57 |
|
| 57 |
58 |
COMMON_DEPEND="
|
| 58 |
|
>=sys-apps/util-linux-2.32:0=[${MULTILIB_USEDEP}]
|
| 59 |
|
sys-libs/libcap:0=[${MULTILIB_USEDEP}]
|
| 60 |
|
virtual/libcrypt:=[${MULTILIB_USEDEP}]
|
| 61 |
|
acl? ( sys-apps/acl:0= )
|
| 62 |
|
apparmor? ( >=sys-libs/libapparmor-2.13:0= )
|
| 63 |
|
audit? ( >=sys-process/audit-2:0= )
|
| 64 |
|
bpf? ( >=dev-libs/libbpf-1.4.0:0= )
|
| 65 |
|
cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= )
|
|
59 |
>=sys-apps/util-linux-2.37
|
|
60 |
acl? ( sys-apps/acl )
|
|
61 |
apparmor? ( >=sys-libs/libapparmor-2.13 )
|
|
62 |
audit? ( >=sys-process/audit-2 )
|
|
63 |
bpf? ( >=dev-libs/libbpf-1.4.0 )
|
|
64 |
cryptsetup? ( >=sys-fs/cryptsetup-2.4.0:= )
|
| 66 |
65 |
curl? ( >=net-misc/curl-7.32.0:0= )
|
| 67 |
|
elfutils? ( >=dev-libs/elfutils-0.158:0= )
|
|
66 |
elfutils? ( >=dev-libs/elfutils-0.177 )
|
|
67 |
elibc_glibc? (
|
|
68 |
>=sys-libs/glibc-2.34
|
|
69 |
>=sys-libs/libxcrypt-4.4.0
|
|
70 |
)
|
|
71 |
elibc_musl? (
|
|
72 |
>=sys-libs/musl-1.2.5-r8
|
|
73 |
virtual/libcrypt
|
|
74 |
)
|
| 68 |
75 |
fido2? (
|
| 69 |
|
dev-libs/libfido2:0=
|
|
76 |
dev-libs/libfido2
|
| 70 |
77 |
)
|
| 71 |
|
gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
|
|
78 |
gcrypt? ( >=dev-libs/libgcrypt-1.4.5 )
|
| 72 |
79 |
gnutls? ( >=net-libs/gnutls-3.6.0:0= )
|
| 73 |
|
http? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] )
|
| 74 |
|
idn? ( net-dns/libidn2:= )
|
|
80 |
remote? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] )
|
|
81 |
idn? ( net-dns/libidn2 )
|
| 75 |
82 |
importd? (
|
| 76 |
83 |
app-arch/bzip2:0=
|
| 77 |
84 |
virtual/zlib:=
|
| 78 |
85 |
)
|
| 79 |
86 |
kmod? ( >=sys-apps/kmod-15:0= )
|
| 80 |
|
lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
|
| 81 |
|
lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
|
| 82 |
|
openssl? ( >=dev-libs/openssl-1.1.0:0= )
|
|
87 |
lz4? ( >=app-arch/lz4-0_p131:0= )
|
|
88 |
lzma? ( >=app-arch/xz-utils-5.0.5-r1:0= )
|
|
89 |
openssl? ( >=dev-libs/openssl-3.0.0:0= )
|
| 83 |
90 |
pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] )
|
| 84 |
|
passwdqc? ( sys-auth/passwdqc:0= )
|
| 85 |
|
pkcs11? ( >=app-crypt/p11-kit-0.23.3:0= )
|
|
91 |
passwdqc? ( sys-auth/passwdqc )
|
|
92 |
pkcs11? ( >=app-crypt/p11-kit-0.23.3 )
|
| 86 |
93 |
pcre? ( dev-libs/libpcre2 )
|
| 87 |
|
pwquality? ( >=dev-libs/libpwquality-1.4.1:0= )
|
|
94 |
pwquality? ( >=dev-libs/libpwquality-1.4.1 )
|
| 88 |
95 |
qrcode? ( >=media-gfx/qrencode-3:0= )
|
| 89 |
|
seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
|
| 90 |
|
selinux? ( >=sys-libs/libselinux-2.1.9:0= )
|
| 91 |
|
tpm? ( app-crypt/tpm2-tss:0= )
|
| 92 |
|
xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
|
| 93 |
|
zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] )
|
|
96 |
seccomp? ( >=sys-libs/libseccomp-2.4.0 )
|
|
97 |
selinux? ( >=sys-libs/libselinux-2.1.9 )
|
|
98 |
tpm? ( app-crypt/tpm2-tss )
|
|
99 |
xkb? ( >=x11-libs/libxkbcommon-0.4.1 )
|
|
100 |
zstd? ( >=app-arch/zstd-1.4.0:0= )
|
| 94 |
101 |
"
|
| 95 |
102 |
|
| 96 |
103 |
# Newer linux-headers needed by ia64, bug #480218
|
| ... | ... | |
| 130 |
137 |
>=acct-user/systemd-resolve-0-r1
|
| 131 |
138 |
>=acct-user/systemd-timesync-0-r1
|
| 132 |
139 |
>=sys-apps/baselayout-2.2
|
| 133 |
|
elibc_musl? ( >=sys-libs/musl-1.2.5-r8 )
|
| 134 |
140 |
ukify? (
|
| 135 |
141 |
${PYTHON_DEPS}
|
| 136 |
142 |
$(python_gen_cond_dep "${PEFILE_DEPEND}")
|
| ... | ... | |
| 173 |
179 |
test? (
|
| 174 |
180 |
app-text/tree
|
| 175 |
181 |
dev-lang/perl
|
|
182 |
>=dev-libs/glib-2.22.0:2
|
| 176 |
183 |
sys-apps/dbus
|
| 177 |
184 |
)
|
| 178 |
185 |
app-text/docbook-xml-dtd:4.2
|
| ... | ... | |
| 193 |
200 |
QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
|
| 194 |
201 |
QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
|
| 195 |
202 |
|
| 196 |
|
check_cgroup_layout() {
|
| 197 |
|
# https://bugs.gentoo.org/935261
|
| 198 |
|
[[ ${MERGE_TYPE} != buildonly ]] || return
|
| 199 |
|
[[ -z ${ROOT} ]] || return
|
| 200 |
|
[[ -e /sys/fs/cgroup/unified ]] || return
|
| 201 |
|
grep -q 'SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE=1' /proc/cmdline && return
|
| 202 |
|
|
| 203 |
|
eerror "This system appears to be booted with the 'hybrid' cgroup layout."
|
| 204 |
|
eerror "This layout obsolete and is disabled in systemd."
|
| 205 |
|
|
| 206 |
|
if grep -qF 'systemd.unified_cgroup_hierarchy'; then
|
| 207 |
|
eerror "Remove the systemd.unified_cgroup_hierarchy option"
|
| 208 |
|
eerror "from the kernel command line and reboot."
|
| 209 |
|
die "hybrid cgroup layout detected"
|
| 210 |
|
fi
|
| 211 |
|
}
|
| 212 |
|
|
| 213 |
203 |
pkg_pretend() {
|
| 214 |
|
if use split-usr; then
|
| 215 |
|
eerror "Please complete the migration to merged-usr."
|
| 216 |
|
eerror "https://wiki.gentoo.org/wiki/Merge-usr"
|
| 217 |
|
die "systemd no longer supports split-usr"
|
| 218 |
|
fi
|
| 219 |
|
|
| 220 |
|
check_cgroup_layout
|
| 221 |
|
|
| 222 |
|
if use cgroup-hybrid; then
|
| 223 |
|
eerror "Disable the 'cgroup-hybrid' USE flag."
|
| 224 |
|
eerror "Rebuild any initramfs images after rebuilding systemd."
|
| 225 |
|
die "cgroup-hybrid is no longer supported"
|
| 226 |
|
fi
|
| 227 |
|
|
| 228 |
204 |
if [[ ${MERGE_TYPE} != buildonly ]]; then
|
| 229 |
205 |
local CONFIG_CHECK="~BLK_DEV_BSG ~CGROUPS
|
| 230 |
206 |
~CGROUP_BPF ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
|
| ... | ... | |
| 304 |
280 |
local myconf=(
|
| 305 |
281 |
--localstatedir="${EPREFIX}/var"
|
| 306 |
282 |
-Ddocdir="share/doc/${PF}"
|
| 307 |
|
# default is developer, bug 918671
|
| 308 |
|
-Dmode=release
|
|
283 |
-Dmode=release # default is developer, bug 918671
|
|
284 |
-Dlibc=$(usex elibc_musl musl glibc)
|
| 309 |
285 |
-Dsupport-url="${BRANDING_OS_SUPPORT_URL}"
|
| 310 |
286 |
-Dpamlibdir="$(getpam_mod_dir)"
|
| 311 |
|
-Dlibc=$(usex elibc_musl musl glibc)
|
| 312 |
|
# avoid bash-completion dep
|
| 313 |
287 |
-Dbashcompletiondir="$(get_bashcompdir)"
|
| 314 |
288 |
-Dzshcompletiondir="$(get_zshcompdir)"
|
| 315 |
289 |
-Dsplit-bin=false
|
| 316 |
|
# Disable compatibility with sysvinit
|
| 317 |
|
-Dsysvinit-path=
|
| 318 |
|
-Dsysvrcnd-path=
|
| 319 |
|
# no deps
|
| 320 |
|
-Dima=true
|
| 321 |
|
# Match /etc/shells, bug 919749
|
| 322 |
|
-Ddebug-shell="${EPREFIX}/bin/sh"
|
|
290 |
-Dima=true # no deps
|
|
291 |
-Ddebug-shell="${EPREFIX}/bin/sh" # Match /etc/shells, bug 919749
|
| 323 |
292 |
-Ddefault-user-shell="${EPREFIX}/bin/bash"
|
| 324 |
|
# Optional components/dependencies
|
| 325 |
|
$(meson_native_use_feature acl)
|
| 326 |
|
$(meson_native_use_feature apparmor)
|
| 327 |
|
$(meson_native_use_feature audit)
|
| 328 |
|
$(meson_native_use_feature boot bootloader)
|
| 329 |
|
$(meson_native_use_feature bpf bpf-framework)
|
| 330 |
293 |
-Dbpf-compiler=gcc
|
| 331 |
|
$(meson_native_use_feature cryptsetup libcryptsetup)
|
| 332 |
|
$(meson_native_use_feature curl libcurl)
|
| 333 |
|
$(meson_native_use_bool dns-over-tls dns-over-tls)
|
| 334 |
|
$(meson_native_use_feature elfutils)
|
| 335 |
|
$(meson_native_use_feature fido2 libfido2)
|
| 336 |
|
$(meson_feature gcrypt)
|
| 337 |
|
$(meson_native_use_feature gnutls)
|
| 338 |
|
$(meson_native_use_feature homed)
|
| 339 |
|
$(meson_native_use_feature http microhttpd)
|
| 340 |
|
$(meson_native_use_bool idn)
|
| 341 |
|
$(meson_native_use_feature importd)
|
| 342 |
|
$(meson_native_use_feature importd bzip2)
|
| 343 |
|
$(meson_native_use_feature importd zlib)
|
| 344 |
|
$(meson_native_use_bool kernel-install)
|
| 345 |
|
$(meson_native_use_feature kmod)
|
| 346 |
|
$(meson_feature lz4)
|
| 347 |
|
$(meson_feature lzma xz)
|
| 348 |
|
$(meson_feature zstd)
|
| 349 |
|
$(meson_native_use_feature openssl)
|
| 350 |
|
$(meson_feature pam)
|
| 351 |
|
$(meson_native_use_feature passwdqc)
|
| 352 |
|
$(meson_native_use_feature pkcs11 p11kit)
|
| 353 |
|
$(meson_native_use_feature pcre pcre2)
|
| 354 |
|
$(meson_native_use_feature policykit polkit)
|
| 355 |
|
$(meson_native_use_feature pwquality)
|
| 356 |
|
$(meson_native_use_feature qrcode qrencode)
|
| 357 |
|
$(meson_native_use_feature seccomp)
|
| 358 |
|
$(meson_native_use_feature selinux)
|
| 359 |
|
$(meson_native_use_feature tpm tpm2)
|
| 360 |
|
$(meson_native_use_feature test dbus)
|
| 361 |
|
$(meson_native_use_feature ukify)
|
| 362 |
|
$(meson_native_use_feature xkb xkbcommon)
|
| 363 |
294 |
-Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
|
| 364 |
295 |
# Breaks screen, tmux, etc.
|
| 365 |
296 |
-Ddefault-kill-user-processes=false
|
| 366 |
297 |
-Dcreate-log-dirs=false
|
|
298 |
-Dlibcrypt=enabled
|
|
299 |
-Dcompat-mutable-uid-boundaries=true
|
| 367 |
300 |
|
| 368 |
|
# multilib options
|
| 369 |
|
$(meson_native_true backlight)
|
| 370 |
|
$(meson_native_true binfmt)
|
| 371 |
|
$(meson_native_true coredump)
|
| 372 |
|
$(meson_native_true environment-d)
|
| 373 |
|
$(meson_native_true firstboot)
|
| 374 |
|
$(meson_native_true hibernate)
|
| 375 |
|
$(meson_native_true hostnamed)
|
| 376 |
|
$(meson_native_true ldconfig)
|
| 377 |
|
$(meson_native_true localed)
|
| 378 |
|
$(meson_native_enabled man)
|
| 379 |
|
$(meson_native_true networkd)
|
| 380 |
|
$(meson_native_true quotacheck)
|
| 381 |
|
$(meson_native_true randomseed)
|
| 382 |
|
$(meson_native_true rfkill)
|
| 383 |
|
$(meson_native_true sysusers)
|
| 384 |
|
$(meson_native_true timedated)
|
| 385 |
|
$(meson_native_true timesyncd)
|
| 386 |
|
$(meson_native_true tmpfiles)
|
| 387 |
|
$(meson_native_true vconsole)
|
|
301 |
# options affecting multilib
|
|
302 |
$(meson_use !elibc_musl nss-myhostname)
|
|
303 |
$(meson_feature !elibc_musl nss-mymachines)
|
|
304 |
$(meson_feature !elibc_musl nss-resolve)
|
|
305 |
$(meson_use !elibc_musl nss-systemd)
|
|
306 |
$(meson_feature pam)
|
| 388 |
307 |
)
|
| 389 |
308 |
|
| 390 |
309 |
# workaround for bug 969103
|
| ... | ... | |
| 394 |
313 |
myconf+=( $(meson_use test tests) )
|
| 395 |
314 |
fi
|
| 396 |
315 |
|
| 397 |
|
case $(tc-arch) in
|
| 398 |
|
amd64|arm|arm64|loong|ppc|ppc64|riscv|s390|x86)
|
| 399 |
|
# src/vmspawn/vmspawn-util.h: QEMU_MACHINE_TYPE
|
| 400 |
|
myconf+=( $(meson_native_enabled vmspawn) ) ;;
|
| 401 |
|
*)
|
| 402 |
|
myconf+=( -Dvmspawn=disabled ) ;;
|
| 403 |
|
esac
|
|
316 |
if multilib_is_native_abi; then
|
|
317 |
myconf+=(
|
|
318 |
--auto-features=enabled
|
|
319 |
-Dman=enabled
|
|
320 |
-Dxenctrl=disabled
|
|
321 |
|
|
322 |
# Optional components/dependencies
|
|
323 |
$(meson_feature acl)
|
|
324 |
$(meson_feature apparmor)
|
|
325 |
$(meson_feature audit)
|
|
326 |
$(meson_feature boot bootloader)
|
|
327 |
$(meson_feature bpf bpf-framework)
|
|
328 |
$(meson_feature cryptsetup libcryptsetup)
|
|
329 |
$(meson_feature cryptsetup libcryptsetup-plugins)
|
|
330 |
$(meson_feature curl libcurl)
|
|
331 |
$(meson_use dns-over-tls dns-over-tls)
|
|
332 |
$(meson_feature elfutils)
|
|
333 |
$(meson_feature fido2 libfido2)
|
|
334 |
$(meson_feature gcrypt)
|
|
335 |
$(meson_feature gnutls)
|
|
336 |
$(meson_feature homed)
|
|
337 |
$(meson_use idn)
|
|
338 |
$(meson_feature importd)
|
|
339 |
$(meson_feature importd bzip2)
|
|
340 |
$(meson_feature importd sysupdate)
|
|
341 |
$(meson_feature importd zlib)
|
|
342 |
$(meson_use kernel-install)
|
|
343 |
$(meson_feature kmod)
|
|
344 |
$(meson_feature lz4)
|
|
345 |
$(meson_feature lzma xz)
|
|
346 |
$(meson_feature zstd)
|
|
347 |
$(meson_feature openssl)
|
|
348 |
$(meson_feature passwdqc)
|
|
349 |
$(meson_feature pkcs11 p11kit)
|
|
350 |
$(meson_feature pcre pcre2)
|
|
351 |
$(meson_feature policykit polkit)
|
|
352 |
$(meson_feature pwquality)
|
|
353 |
$(meson_feature qrcode qrencode)
|
|
354 |
$(meson_feature remote)
|
|
355 |
$(meson_feature remote microhttpd)
|
|
356 |
$(meson_feature seccomp)
|
|
357 |
$(meson_feature selinux)
|
|
358 |
$(meson_feature tpm tpm2)
|
|
359 |
$(meson_feature test dbus)
|
|
360 |
$(meson_feature test glib)
|
|
361 |
$(meson_feature ukify)
|
|
362 |
$(meson_feature xkb xkbcommon)
|
|
363 |
)
|
|
364 |
|
|
365 |
case $(tc-arch) in
|
|
366 |
amd64|arm|arm64|loong|ppc|ppc64|riscv|s390|x86)
|
|
367 |
# src/vmspawn/vmspawn-util.h: QEMU_MACHINE_TYPE
|
|
368 |
myconf+=( $(meson_native_enabled vmspawn) ) ;;
|
|
369 |
*)
|
|
370 |
myconf+=( -Dvmspawn=disabled ) ;;
|
|
371 |
esac
|
|
372 |
else
|
|
373 |
myconf+=(
|
|
374 |
--auto-features=disabled
|
|
375 |
)
|
|
376 |
fi
|
| 404 |
377 |
|
| 405 |
378 |
meson_src_configure "${myconf[@]}"
|
| 406 |
379 |
}
|
| 407 |
380 |
|
|
381 |
multilib_src_compile() {
|
|
382 |
local args=()
|
|
383 |
if ! multilib_is_native_abi; then
|
|
384 |
args+=(
|
|
385 |
devel libsystemd libudev
|
|
386 |
$(usex elibc_musl '' nss)
|
|
387 |
$(usev pam)
|
|
388 |
)
|
|
389 |
fi
|
|
390 |
meson_src_compile "${args[@]}"
|
|
391 |
}
|
|
392 |
|
| 408 |
393 |
multilib_src_test() {
|
|
394 |
local args=( --timeout-multiplier=10 )
|
|
395 |
if ! multilib_is_native_abi; then
|
|
396 |
args+=(
|
|
397 |
--suite libsystemd --suite libudev
|
|
398 |
$(usex elibc_musl '' '--suite nss')
|
|
399 |
$(usex pam '--suite pam' '')
|
|
400 |
)
|
|
401 |
fi
|
| 409 |
402 |
(
|
| 410 |
403 |
unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
|
| 411 |
404 |
export COLUMNS=80
|
| ... | ... | |
| 413 |
406 |
addpredict /proc
|
| 414 |
407 |
addpredict /run
|
| 415 |
408 |
addpredict /sys/fs/cgroup
|
| 416 |
|
meson_src_test --timeout-multiplier=10
|
|
409 |
meson_src_test "${args[@]}"
|
| 417 |
410 |
) || die
|
| 418 |
411 |
}
|
| 419 |
412 |
|
|
413 |
multilib_src_install() {
|
|
414 |
local args=()
|
|
415 |
if ! multilib_is_native_abi; then
|
|
416 |
local tags=devel,libsystemd,libudev
|
|
417 |
use !elibc_musl && tags+=,nss
|
|
418 |
use pam && tags+=,pam
|
|
419 |
args+=( --tags "${tags}" )
|
|
420 |
fi
|
|
421 |
meson_src_install "${args[@]}"
|
|
422 |
}
|
|
423 |
|
| 420 |
424 |
multilib_src_install_all() {
|
| 421 |
425 |
einstalldocs
|
| 422 |
426 |
dodoc "${FILESDIR}"/nsswitch.conf
|