26 |
26 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
27 |
27 |
fi
|
28 |
28 |
|
29 |
|
inherit bash-completion-r1 linux-info meson-multilib pam python-any-r1
|
|
29 |
inherit bash-completion-r1 linux-info meson-multilib pam python-single-r1
|
30 |
30 |
inherit secureboot systemd toolchain-funcs udev usr-ldscript
|
31 |
31 |
|
32 |
32 |
DESCRIPTION="System and service manager for Linux"
|
... | ... | |
35 |
35 |
LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
|
36 |
36 |
SLOT="0/2"
|
37 |
37 |
IUSE="
|
38 |
|
acl apparmor audit cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
|
39 |
|
fido2 +gcrypt gnuefi gnutls homed http idn importd iptables +kmod
|
|
38 |
acl apparmor audit boot cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
|
|
39 |
fido2 +gcrypt gnutls homed http idn importd iptables +kmod
|
40 |
40 |
+lz4 lzma +openssl pam pcre pkcs11 policykit pwquality qrcode
|
41 |
41 |
+resolvconf +seccomp selinux split-usr +sysv-utils test tpm vanilla xkb +zstd
|
42 |
42 |
"
|
43 |
43 |
REQUIRED_USE="
|
|
44 |
${PYTHON_REQUIRED_USE}
|
44 |
45 |
dns-over-tls? ( || ( gnutls openssl ) )
|
45 |
46 |
fido2? ( cryptsetup openssl )
|
46 |
47 |
homed? ( cryptsetup pam openssl )
|
... | ... | |
90 |
91 |
# Newer linux-headers needed by ia64, bug #480218
|
91 |
92 |
DEPEND="${COMMON_DEPEND}
|
92 |
93 |
>=sys-kernel/linux-headers-${MINKV}
|
93 |
|
gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
|
94 |
94 |
"
|
95 |
95 |
|
|
96 |
PEFILE_DEPEND='dev-python/pefile[${PYTHON_USEDEP}]'
|
|
97 |
|
96 |
98 |
# baselayout-2.2 has /run
|
97 |
99 |
RDEPEND="${COMMON_DEPEND}
|
98 |
100 |
>=acct-group/adm-0-r1
|
... | ... | |
122 |
124 |
>=acct-user/systemd-resolve-0-r1
|
123 |
125 |
>=acct-user/systemd-timesync-0-r1
|
124 |
126 |
>=sys-apps/baselayout-2.2
|
|
127 |
boot? (
|
|
128 |
${PYTHON_DEPS}
|
|
129 |
$(python_gen_cond_dep "${PEFILE_DEPEND}")
|
|
130 |
)
|
125 |
131 |
selinux? (
|
126 |
132 |
sec-policy/selinux-base-policy[systemd]
|
127 |
133 |
sec-policy/selinux-ntp
|
... | ... | |
160 |
166 |
app-text/docbook-xml-dtd:4.5
|
161 |
167 |
app-text/docbook-xsl-stylesheets
|
162 |
168 |
dev-libs/libxslt:0
|
163 |
|
$(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
|
164 |
|
$(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
|
|
169 |
${PYTHON_DEPS}
|
|
170 |
$(python_gen_cond_dep "
|
|
171 |
dev-python/jinja[\${PYTHON_USEDEP}]
|
|
172 |
dev-python/lxml[\${PYTHON_USEDEP}]
|
|
173 |
boot? (
|
|
174 |
>=dev-python/pyelftools-0.30[\${PYTHON_USEDEP}]
|
|
175 |
test? ( ${PEFILE_DEPEND} )
|
|
176 |
)
|
|
177 |
")
|
165 |
178 |
"
|
166 |
179 |
|
167 |
|
python_check_deps() {
|
168 |
|
python_has_version "dev-python/jinja[${PYTHON_USEDEP}]" &&
|
169 |
|
python_has_version "dev-python/lxml[${PYTHON_USEDEP}]"
|
170 |
|
}
|
171 |
|
|
172 |
180 |
QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
|
173 |
181 |
QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
|
174 |
182 |
|
... | ... | |
222 |
230 |
}
|
223 |
231 |
|
224 |
232 |
pkg_setup() {
|
225 |
|
use gnuefi && secureboot_pkg_setup
|
|
233 |
use boot && secureboot_pkg_setup
|
226 |
234 |
}
|
227 |
235 |
|
228 |
236 |
src_unpack() {
|
... | ... | |
280 |
288 |
$(meson_native_use_bool acl)
|
281 |
289 |
$(meson_native_use_bool apparmor)
|
282 |
290 |
$(meson_native_use_bool audit)
|
|
291 |
$(meson_native_use_bool boot bootloader)
|
283 |
292 |
$(meson_native_use_bool cryptsetup libcryptsetup)
|
284 |
293 |
$(meson_native_use_bool curl libcurl)
|
285 |
294 |
$(meson_native_use_bool dns-over-tls dns-over-tls)
|
286 |
295 |
$(meson_native_use_bool elfutils)
|
287 |
296 |
$(meson_native_use_bool fido2 libfido2)
|
288 |
297 |
$(meson_use gcrypt)
|
289 |
|
$(meson_native_use_bool gnuefi gnu-efi)
|
290 |
298 |
$(meson_native_use_bool gnutls)
|
291 |
|
-Defi-includedir="${ESYSROOT}/usr/include/efi"
|
292 |
|
-Defi-libdir="${ESYSROOT}/usr/$(get_libdir)"
|
293 |
299 |
$(meson_native_use_bool homed)
|
294 |
300 |
$(meson_native_use_bool http microhttpd)
|
295 |
301 |
$(meson_native_use_bool idn)
|
... | ... | |
373 |
379 |
rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,shutdown}.8 || die
|
374 |
380 |
fi
|
375 |
381 |
|
376 |
|
if ! use resolvconf && ! use sysv-utils && use split-usr; then
|
377 |
|
rmdir "${ED}${rootprefix}"/sbin || die
|
378 |
|
fi
|
379 |
|
|
380 |
382 |
# https://bugs.gentoo.org/761763
|
381 |
383 |
rm -r "${ED}"/usr/lib/sysusers.d || die
|
382 |
384 |
|
... | ... | |
394 |
396 |
keepdir /var/lib/systemd
|
395 |
397 |
keepdir /var/log/journal
|
396 |
398 |
|
397 |
|
# Symlink /etc/sysctl.conf for easy migration.
|
398 |
|
dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf
|
399 |
|
|
400 |
399 |
if use pam; then
|
401 |
400 |
newpamd "${FILESDIR}"/systemd-user.pam systemd-user
|
402 |
401 |
fi
|
... | ... | |
409 |
408 |
|
410 |
409 |
gen_usr_ldscript -a systemd udev
|
411 |
410 |
|
412 |
|
use gnuefi && secureboot_auto_sign
|
|
411 |
if use boot; then
|
|
412 |
python_fix_shebang "${ED}"
|
|
413 |
secureboot_auto_sign
|
|
414 |
fi
|
413 |
415 |
}
|
414 |
416 |
|
415 |
417 |
migrate_locale() {
|
... | ... | |
457 |
459 |
}
|
458 |
460 |
|
459 |
461 |
pkg_preinst() {
|
|
462 |
if [[ -e ${EROOT}/etc/sysctl.conf ]]; then
|
|
463 |
# Symlink /etc/sysctl.conf for easy migration.
|
|
464 |
dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf
|
|
465 |
fi
|
|
466 |
|
460 |
467 |
if ! use split-usr; then
|
461 |
468 |
local dir
|
462 |
469 |
for dir in bin sbin lib usr/sbin; do
|
... | ... | |
471 |
478 |
die "System layout with split directories still used"
|
472 |
479 |
fi
|
473 |
480 |
fi
|
|
481 |
if ! use boot && has_version "sys-apps/systemd[gnuefi(-)]"; then
|
|
482 |
ewarn "The 'gnuefi' USE flag has been renamed to 'boot'."
|
|
483 |
ewarn "Make sure to enable the 'boot' USE flag if you use systemd-boot."
|
|
484 |
fi
|
474 |
485 |
}
|
475 |
486 |
|
476 |
487 |
pkg_postinst() {
|