summaryrefslogtreecommitdiff
path: root/sys-apps/systemd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-02-10 21:05:55 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-02-10 21:05:55 +0000
commit71deace00d1a2b091313fe137ab7092418c6f87c (patch)
tree9f1f0dee23e13658e52f49437befe78427148c51 /sys-apps/systemd
parent29aabba0ea759c6a2864ff5631735b67ee38e5e0 (diff)
gentoo resync : 10.02.2020
Diffstat (limited to 'sys-apps/systemd')
-rw-r--r--sys-apps/systemd/Manifest12
-rw-r--r--sys-apps/systemd/files/245-rc1-network-debug.patch45
-rw-r--r--sys-apps/systemd/files/245-rc1-sysctl-segfault.patch23
-rw-r--r--sys-apps/systemd/systemd-243-r2.ebuild4
-rw-r--r--sys-apps/systemd/systemd-244.2.ebuild508
-rw-r--r--sys-apps/systemd/systemd-244.ebuild4
-rw-r--r--sys-apps/systemd/systemd-245_rc1-r1.ebuild505
-rw-r--r--sys-apps/systemd/systemd-9999.ebuild15
8 files changed, 1110 insertions, 6 deletions
diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest
index 78758830c598..8345d1728498 100644
--- a/sys-apps/systemd/Manifest
+++ b/sys-apps/systemd/Manifest
@@ -1,12 +1,18 @@
AUX 243-seccomp.patch 6293 BLAKE2B be1a78783e34d6cf8ba33f6ae6fb0e8747d414de692cf28bd9cce01ca47baf188b078171dd66c236ecf2a4a821f1dec0b7021e1298a29a3b21aacf3a9d667189 SHA512 da2cd2e11a06e0520af0ad3c6debe54c5ab046f7ee35a922c99a32924464a6b760b4620d8e511064f84d8adbf5e65db473877476a1cc36941a0420491b89cb25
AUX 244-efi-gcc-10.patch 3032 BLAKE2B f9fd018c567384171b154809bb95b35c18fc9c3ad7d5c114f5854bb90db2bdafca9d96c3437a9d20a7ea875a3e5646750f29294025fcb657a40dcd7d4ed95282 SHA512 f9bbc9c3be417ff14775de06d3c4088913eff4c6f62e58278420345cbc7b115b706c169faaae9dc17448f895d9cf9b417ee8c04398ec4c206df89f5f3bcfb4a1
+AUX 245-rc1-network-debug.patch 1915 BLAKE2B b4e2fc470e584520c0423b06d00e663fb82e364594626e89632e9db4dd503b55c419f844c5063ca7f8641919ff47d3057f6962e269686829041ea262e75504ae SHA512 d55dac6e5b11d066eff46b0387b64d1cf59b9c4134171b17933447064f0ea0ca774681134be20e0af40f3de03f971778cf358d38bca78107e7129d3d86e7065e
+AUX 245-rc1-sysctl-segfault.patch 942 BLAKE2B 00fc826da41bfe0bb42e86bb839dc441d0762993ddabc227097865061a706a0598e1bd1ef4451b8ba11f702ba66ab1b9281e2141fcffed054c787206bb78966a SHA512 d92f4ac03d1ddb84a9ff2bb90efc92a7d0394165fa0dd7d3fa0739e1480b847e11ec522a3d6dc907998455df19c1b300c046a404f7c4226e77aa10f51fff37a5
AUX gentoo-Dont-enable-audit-by-default.patch 1027 BLAKE2B 9193a409db4e5c1dec6f6b66ee6e0a4cc1ada49d41ab758c788cf12534fffb67bd7370b8558a6af56572d7f2b73cf47db255fef105e56362c15f0a426f80b256 SHA512 44e512d8bbadbc5714192896a3ba262e460af034846e4e9b9832b4143fff772e2734e655316fd88d1ef386509bd234c195dce2087348f220836b3bf4f26790e0
AUX gentoo-generator-path-r1.patch 1037 BLAKE2B 5eb80521a6726c9b4693f9b0f56d3e68fca1a49f5f5eb5a1576329d30c93d2fe7c121920099d74962eacf7ed1d3747250f103a57e4be246320a99871521a3b6a SHA512 1b0d1c2f96cb4aa95adfa5940efaeb2bd940110720399358317906d21d08b0caf625474980e101bba001afd626f8ad64367b09b40bec0b2d46b977021c4adfc5
AUX gentoo-systemd-user-pam.patch 443 BLAKE2B fad5c24f35666313efbf1e33640320058022fe17acff869a80104ed87ce0ad7ebaa1498915f8e933985e9c2d66d77172eb21ab480fc4fa857e0e5b985735831a SHA512 0a47368b1b38995a4193492e3add5c716c063366a9bc53dec03b7cb59b524da644033e095344da6e15e01dc84d8f5b335e7510442eeaba26e06918403fed0e5c
AUX nsswitch.conf 734 BLAKE2B 5f5a7821a84f6c8aa31fe9a68c29a1a0f24be578d427a623f14a9ef795e7da481f226efe5511d92932b5edf5638fa719808a0c3a0b8fd340799dd6bcb703a0a1 SHA512 dcbd51dacaaebdff32edb3840cc7b9b47b6521009b8786690e3673a2e78bc60bfd8e591b1048c5d452117c6659b9917ae2864462f5057cc39b704b0130522e60
DIST systemd-243.tar.gz 8242522 BLAKE2B 89e3ebbea5a99061329f7c78220a66c1e075d5ba90dfdf5ee8d0d9b762ef4600dc82d8ca2054632e5e343b6272cd8046c92f7f99dcfa8287c5ef2b42fb96d4cb SHA512 56b52a297aa5ac04d9667eb3afb1598725b197de73ff72baa1aabbc2844e36fba7b7fccdf6d214ae8b5b926616b2b7e15772763aaa80ec938d74333ff9c8673e
DIST systemd-244.tar.gz 8445963 BLAKE2B 19751fb9c058a079694ee1b991259fd3f1fa30ae98ca38bbe8caadfc5628db7848c7f742a1b11781fbd67f911adda917d7a4da1dddb63064907f86f47e5a3256 SHA512 08f260fb15b5eb273faafda826dd9154e9a02841b4c5911cc1c7e1445072ad51389f8cced7b9acf112737c20fd56b2fbf48b3f914733c934c774d38a23b616fb
-EBUILD systemd-243-r2.ebuild 14522 BLAKE2B 9b59d5ad65b13ac99d127ea4c09b3fad87786860c500cac17c4f1d65e86f543c0869a834ffb42e77794a85ed03c2e25a26109773442190f4ab15d09f7d79702f SHA512 5b1cdd515a574121c4d0b3d049100ffba6bb81481c95ba7c8da2de7b007b9110336d65bdf74dde15c29639b76f6e1c9ecaaae28ebf1058f09bf240141e5b10dc
-EBUILD systemd-244.ebuild 14502 BLAKE2B e1605c98deb12f8c3cacc988db985fa3e8a52bccfcb464dd8ba167cf5b8683ca2d51279d6b298185e804ff3d6de3746e252abfd46bd52b3f58b463dec7869a7c SHA512 a06eefa3b8d9043f0aa55a0a8900e8d770c14d0263086cc6718f0418ea7b877d675f3e420e415e208c98f1cd703213303834401df9153742090f39a8a33220db
-EBUILD systemd-9999.ebuild 14472 BLAKE2B ec0e0f0380559eebbd968dee61dd94138f8589d1c9a278b9ea94fd2962272593aec799dffdba46313106b5fd149c9b1192aa3c6754874e1b6720dee3146a80eb SHA512 c6a9220228551b483327789d36a4bd3194f9054dfd3b85d345140d715415a5d1d83dc1850e7b54705000ba7ae7f4ba9c4c24aaf8e7c631a90a2335b754f98fb0
+DIST systemd-245-rc1.tar.gz 8961356 BLAKE2B ed04166ead57c2f1cc1a1ca2f0041cae134b503d3448ea9fdd799e12d81f45721ee304d4aabd96d3eab8ea1321b283820e8d2a850b41733e40f07fd419f67b95 SHA512 2ef9a295f3897c6642a2fac2e3c73467ece9bc6fc196cc4f3707b9c23af2581eb9f74def78909d57513b67604bf1cf6dc5dbb31c6d435f7997677d09a73d006b
+DIST systemd-stable-244.2.tar.gz 8484718 BLAKE2B 7ba41c443aa3e34379c24eb1590bd1090037a03178dd76cf8324ee50a1d7e82d2da27abdf9ea7c6b9b0b5467d15625dd432739878e8b482636a9f4bae802f2a5 SHA512 fad6c9da7bf7b6f572ea411e70bea7a44e9be0b373cb86cbe5a77a08cd1b5e4f4f3ae6bfa001194e14a9849313a9151e3fdeee62c93f18f15439a657a05783e2
+EBUILD systemd-243-r2.ebuild 14599 BLAKE2B b292513681d3a9f0ff8f47532eee29266f9cae7c498668e871b0fc2a14fe6c36d6b56d2851266ee27fbe634c914a8dd1d97533ac700b83503d98bf72133b3a74 SHA512 833614b3ea2f84fe515d0fb9695818b3f61d5be8139736b7a9dfa7c212e5901fbfb2528c4711aede74572254fc269e24901c5dd644ef6be482d9b653efbe0b9c
+EBUILD systemd-244.2.ebuild 14630 BLAKE2B fb983fee2c66343b740d7f4cd31cc28f00437312f1f33375abc65c3dc3491aab2f6941d09ce398b8151f61369cd372322150aabf094536c4afa64521d3fe070b SHA512 0f100e8266386c466feb02a255e300c27f224cfae62a79afbe3a7179e6bc051b9ac0dc4599aaed50d71a21f468320b03b90c01a3319b199793d0df08cdc91fb6
+EBUILD systemd-244.ebuild 14579 BLAKE2B 4f8355320376c19d670f7a587442f1806a01f2f03d4fc8cafd33c1b83160886710d20df1edf86d00c919691e1d02bd9e57e992b7488e440e84cfde43e84821dd SHA512 634238afd9de2ce6896fd23a44943a359283b338ba08b42496f7163fad0f23de94b19bed502b78ed44d7b3652b69e66281dc08174db42d3071e801561c900a92
+EBUILD systemd-245_rc1-r1.ebuild 14639 BLAKE2B 63ec56aed53d47bde7ea948e20d9af295a5c136bdd9e7abf987c3782103a122440e9eb1ceedc1d58563336450da087e6a4029fc0776ef1ad290d31fd27cb758e SHA512 7f1fda14a18723b5411d5e5b4a44a6952b0fd25f2bbce3892d6378d04b6fc17af5dfb2ff109fffd58dde2305bd894d5a17080c9a5bb8c715ebf3e06e8851c374
+EBUILD systemd-9999.ebuild 14631 BLAKE2B 774d430a7943c43fa83f10d32ebe4124f0f3998f65f059fdd0fdd4cbfacc2f3846e6e78d18b5ede4b0d63496f92b2b2b52fd6239ebaaa158522ad0a1900d74a7 SHA512 0f270c3831370f68f6516ff76db1bc1bb91124203d5555e2f02772d0ffc306c072619a4aa4a7f54bd4dc000ffac19d395b181d40438959199cc4bb7e1a8bfedf
MISC metadata.xml 2019 BLAKE2B 84de0a0abc3f16fab60db2343d8e1f0dee8a3f03ac97bffd01167820815f4d41d87c118b81041046c8cafa6316fb7e5bfe9d6a5de550bf617ace56ccf69efb0d SHA512 086189b961c0f3be70beb1d86fd36508d0821407243e74cf896360f76ce04be544aac211d60685256080fa75e1ac0ae33211501cc11ee98913f3b8d322ac9f03
diff --git a/sys-apps/systemd/files/245-rc1-network-debug.patch b/sys-apps/systemd/files/245-rc1-network-debug.patch
new file mode 100644
index 000000000000..e65035f21857
--- /dev/null
+++ b/sys-apps/systemd/files/245-rc1-network-debug.patch
@@ -0,0 +1,45 @@
+From 01ec0028d97fa97d2e433659e24a1517b0e2382e Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Wed, 5 Feb 2020 11:04:50 -0500
+Subject: [PATCH] network: remove unnecessary link->ifname from debug log
+ statements
+
+Since 98b0299479a68ffd414888368907fc776a46b82a, we log the interface
+name automatically via log_link_debug().
+
+Fixes: https://github.com/systemd/systemd/issues/14782
+---
+ src/network/networkd-dhcp-server.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c
+index a6dbe2e596c..bee75a6930e 100644
+--- a/src/network/networkd-dhcp-server.c
++++ b/src/network/networkd-dhcp-server.c
+@@ -45,7 +45,7 @@ static int link_push_uplink_dns_to_dhcp_server(Link *link, sd_dhcp_server *s) {
+ size_t n_addresses = 0, n_allocated = 0;
+ unsigned i;
+
+- log_link_debug(link, "Copying DNS server information from %s", link->ifname);
++ log_link_debug(link, "Copying DNS server information from link");
+
+ if (!link->network)
+ return 0;
+@@ -99,7 +99,7 @@ static int link_push_uplink_ntp_to_dhcp_server(Link *link, sd_dhcp_server *s) {
+ if (!link->network)
+ return 0;
+
+- log_link_debug(link, "Copying NTP server information from %s", link->ifname);
++ log_link_debug(link, "Copying NTP server information from link");
+
+ STRV_FOREACH(a, link->network->ntp) {
+ union in_addr_union ia;
+@@ -148,7 +148,7 @@ static int link_push_uplink_sip_to_dhcp_server(Link *link, sd_dhcp_server *s) {
+ if (!link->network)
+ return 0;
+
+- log_link_debug(link, "Copying SIP server information from %s", link->ifname);
++ log_link_debug(link, "Copying SIP server information from link");
+
+ STRV_FOREACH(a, link->network->sip) {
+ union in_addr_union ia;
diff --git a/sys-apps/systemd/files/245-rc1-sysctl-segfault.patch b/sys-apps/systemd/files/245-rc1-sysctl-segfault.patch
new file mode 100644
index 000000000000..7618b2deba5e
--- /dev/null
+++ b/sys-apps/systemd/files/245-rc1-sysctl-segfault.patch
@@ -0,0 +1,23 @@
+From db99904bc8482efe556bb010a8b203a3e60ee37f Mon Sep 17 00:00:00 2001
+From: Yu Watanabe <watanabe.yu+github@gmail.com>
+Date: Thu, 6 Feb 2020 19:13:11 +0900
+Subject: [PATCH] sysctl: fix segfault
+
+Fixes #14801.
+---
+ src/sysctl/sysctl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
+index bbcf0c43235..0cdb740d218 100644
+--- a/src/sysctl/sysctl.c
++++ b/src/sysctl/sysctl.c
+@@ -257,7 +257,7 @@ static int parse_file(OrderedHashmap **sysctl_options, const char *path, bool ig
+
+ existing = ordered_hashmap_get(*sysctl_options, p);
+ if (existing) {
+- if (streq(value, existing->value)) {
++ if (streq_ptr(value, existing->value)) {
+ existing->ignore_failure = existing->ignore_failure || ignore_failure;
+ continue;
+ }
diff --git a/sys-apps/systemd/systemd-243-r2.ebuild b/sys-apps/systemd/systemd-243-r2.ebuild
index c1ea4fb27ab1..738ac85b5c0c 100644
--- a/sys-apps/systemd/systemd-243-r2.ebuild
+++ b/sys-apps/systemd/systemd-243-r2.ebuild
@@ -128,6 +128,10 @@ BDEPEND="
$(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
"
+python_check_deps() {
+ has_version -b "dev-python/lxml[${PYTHON_USEDEP}]"
+}
+
pkg_pretend() {
if [[ ${MERGE_TYPE} != buildonly ]]; then
if use test && has pid-sandbox ${FEATURES}; then
diff --git a/sys-apps/systemd/systemd-244.2.ebuild b/sys-apps/systemd/systemd-244.2.ebuild
new file mode 100644
index 000000000000..6080f4368dec
--- /dev/null
+++ b/sys-apps/systemd/systemd-244.2.ebuild
@@ -0,0 +1,508 @@
+# Copyright 2011-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/systemd/systemd.git"
+ inherit git-r3
+else
+ if [[ ${PV} == *.* ]]; then
+ MY_PN=systemd-stable
+ else
+ MY_PN=systemd
+ fi
+ MY_PV=${PV/_/-}
+ MY_P=${MY_PN}-${MY_PV}
+ S=${WORKDIR}/${MY_P}
+ SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz"
+ KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev usr-ldscript
+
+DESCRIPTION="System and service manager for Linux"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
+
+LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0/2"
+IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils +gcrypt gnuefi http idn importd +kmod +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux split-usr static-libs +sysv-utils test vanilla xkb"
+
+REQUIRED_USE="importd? ( curl gcrypt lzma )"
+RESTRICT="!test? ( test )"
+
+MINKV="3.11"
+
+COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
+ sys-libs/libcap:0=[${MULTILIB_USEDEP}]
+ !<sys-libs/glibc-2.16
+ acl? ( sys-apps/acl:0= )
+ apparmor? ( sys-libs/libapparmor:0= )
+ audit? ( >=sys-process/audit-2:0= )
+ cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= )
+ curl? ( net-misc/curl:0= )
+ dns-over-tls? ( >=net-libs/gnutls-3.5.3:0= )
+ elfutils? ( >=dev-libs/elfutils-0.158:0= )
+ gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
+ http? (
+ >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)]
+ >=net-libs/gnutls-3.1.4:0=
+ )
+ idn? ( net-dns/libidn2:= )
+ importd? (
+ app-arch/bzip2:0=
+ sys-libs/zlib:0=
+ )
+ 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}] )
+ nat? ( net-firewall/iptables:0= )
+ pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] )
+ pcre? ( dev-libs/libpcre2 )
+ qrcode? ( media-gfx/qrencode:0= )
+ seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
+ selinux? ( sys-libs/libselinux:0= )
+ xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
+
+# Newer linux-headers needed by ia64, bug #480218
+DEPEND="${COMMON_DEPEND}
+ >=sys-kernel/linux-headers-${MINKV}
+ gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
+"
+
+# baselayout-2.2 has /run
+RDEPEND="${COMMON_DEPEND}
+ acct-group/adm
+ acct-group/wheel
+ acct-group/kmem
+ acct-group/tty
+ acct-group/utmp
+ acct-group/audio
+ acct-group/cdrom
+ acct-group/dialout
+ acct-group/disk
+ acct-group/input
+ acct-group/kvm
+ acct-group/render
+ acct-group/tape
+ acct-group/video
+ acct-group/systemd-journal
+ acct-user/systemd-journal-remote
+ acct-user/systemd-coredump
+ acct-user/systemd-network
+ acct-user/systemd-resolve
+ acct-user/systemd-timesync
+ >=sys-apps/baselayout-2.2
+ selinux? ( sec-policy/selinux-base-policy[systemd] )
+ sysv-utils? ( !sys-apps/sysvinit )
+ !sysv-utils? ( sys-apps/sysvinit )
+ resolvconf? ( !net-dns/openresolv )
+ !build? ( || (
+ sys-apps/util-linux[kill(-)]
+ sys-process/procps[kill(+)]
+ sys-apps/coreutils[kill(-)]
+ ) )
+ !sys-auth/nss-myhostname
+ !<sys-kernel/dracut-044
+ !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]
+ >=sys-apps/hwids-20150417[udev]
+ >=sys-fs/udev-init-scripts-25
+ policykit? ( sys-auth/polkit )
+ !vanilla? ( sys-apps/gentoo-systemd-integration )"
+
+BDEPEND="
+ app-arch/xz-utils:0
+ dev-util/gperf
+ >=dev-util/meson-0.46
+ >=dev-util/intltool-0.50
+ >=sys-apps/coreutils-8.16
+ sys-devel/m4
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+ test? ( sys-apps/dbus )
+ app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt:0
+ $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
+"
+
+python_check_deps() {
+ has_version -b "dev-python/lxml[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != buildonly ]]; then
+ if use test && has pid-sandbox ${FEATURES}; then
+ ewarn "Tests are known to fail with PID sandboxing enabled."
+ ewarn "See https://bugs.gentoo.org/674458."
+ fi
+
+ local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
+ ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
+ ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
+ ~TIMERFD ~TMPFS_XATTR ~UNIX
+ ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
+ ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
+ ~!SYSFS_DEPRECATED_V2"
+
+ use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
+ use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
+ kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
+ kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
+ kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
+
+ if linux_config_exists; then
+ local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+ if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
+ ewarn "It's recommended to set an empty value to the following kernel config option:"
+ ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+ fi
+ if linux_chkconfig_present X86; then
+ CONFIG_CHECK+=" ~DMIID"
+ fi
+ fi
+
+ if kernel_is -lt ${MINKV//./ }; then
+ ewarn "Kernel version at least ${MINKV} required"
+ fi
+
+ check_extra_config
+ fi
+}
+
+pkg_setup() {
+ :
+}
+
+src_unpack() {
+ default
+ [[ ${PV} != 9999 ]] || git-r3_src_unpack
+}
+
+src_prepare() {
+ # Do NOT add patches here
+ local PATCHES=()
+
+ [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
+
+ # Add local patches here
+ PATCHES+=(
+ )
+
+ if ! use vanilla; then
+ PATCHES+=(
+ "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
+ "${FILESDIR}/gentoo-systemd-user-pam.patch"
+ "${FILESDIR}/gentoo-generator-path-r1.patch"
+ )
+ fi
+
+ default
+}
+
+src_configure() {
+ # Prevent conflicts with i686 cross toolchain, bug 559726
+ tc-export AR CC NM OBJCOPY RANLIB
+
+ python_setup
+
+ multilib-minimal_src_configure
+}
+
+meson_use() {
+ usex "$1" true false
+}
+
+meson_multilib() {
+ if multilib_is_native_abi; then
+ echo true
+ else
+ echo false
+ fi
+}
+
+meson_multilib_native_use() {
+ if multilib_is_native_abi && use "$1"; then
+ echo true
+ else
+ echo false
+ fi
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --localstatedir="${EPREFIX}/var"
+ -Dsupport-url="https://gentoo.org/support/"
+ -Dpamlibdir="$(getpam_mod_dir)"
+ # avoid bash-completion dep
+ -Dbashcompletiondir="$(get_bashcompdir)"
+ # make sure we get /bin:/sbin in PATH
+ -Dsplit-usr=$(usex split-usr true false)
+ -Dsplit-bin=true
+ -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
+ -Drootlibdir="${EPREFIX}/usr/$(get_libdir)"
+ -Dsysvinit-path=
+ -Dsysvrcnd-path=
+ # Avoid infinite exec recursion, bug 642724
+ -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
+ # no deps
+ -Dima=true
+ -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified)
+ # Optional components/dependencies
+ -Dacl=$(meson_multilib_native_use acl)
+ -Dapparmor=$(meson_multilib_native_use apparmor)
+ -Daudit=$(meson_multilib_native_use audit)
+ -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
+ -Dlibcurl=$(meson_multilib_native_use curl)
+ -Ddns-over-tls=$(meson_multilib_native_use dns-over-tls)
+ -Delfutils=$(meson_multilib_native_use elfutils)
+ -Dgcrypt=$(meson_use gcrypt)
+ -Dgnu-efi=$(meson_multilib_native_use gnuefi)
+ -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)"
+ -Dmicrohttpd=$(meson_multilib_native_use http)
+ -Didn=$(meson_multilib_native_use idn)
+ -Dimportd=$(meson_multilib_native_use importd)
+ -Dbzip2=$(meson_multilib_native_use importd)
+ -Dzlib=$(meson_multilib_native_use importd)
+ -Dkmod=$(meson_multilib_native_use kmod)
+ -Dlz4=$(meson_use lz4)
+ -Dxz=$(meson_use lzma)
+ -Dlibiptc=$(meson_multilib_native_use nat)
+ -Dpam=$(meson_use pam)
+ -Dpcre2=$(meson_multilib_native_use pcre)
+ -Dpolkit=$(meson_multilib_native_use policykit)
+ -Dqrencode=$(meson_multilib_native_use qrcode)
+ -Dseccomp=$(meson_multilib_native_use seccomp)
+ -Dselinux=$(meson_multilib_native_use selinux)
+ -Ddbus=$(meson_multilib_native_use test)
+ -Dxkbcommon=$(meson_multilib_native_use xkb)
+ -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
+
+ # multilib options
+ -Dbacklight=$(meson_multilib)
+ -Dbinfmt=$(meson_multilib)
+ -Dcoredump=$(meson_multilib)
+ -Denvironment-d=$(meson_multilib)
+ -Dfirstboot=$(meson_multilib)
+ -Dhibernate=$(meson_multilib)
+ -Dhostnamed=$(meson_multilib)
+ -Dhwdb=$(meson_multilib)
+ -Dldconfig=$(meson_multilib)
+ -Dlocaled=$(meson_multilib)
+ -Dman=$(meson_multilib)
+ -Dnetworkd=$(meson_multilib)
+ -Dquotacheck=$(meson_multilib)
+ -Drandomseed=$(meson_multilib)
+ -Drfkill=$(meson_multilib)
+ -Dsysusers=$(meson_multilib)
+ -Dtimedated=$(meson_multilib)
+ -Dtimesyncd=$(meson_multilib)
+ -Dtmpfiles=$(meson_multilib)
+ -Dvconsole=$(meson_multilib)
+
+ # static-libs
+ -Dstatic-libsystemd=$(usex static-libs true false)
+ -Dstatic-libudev=$(usex static-libs true false)
+ )
+
+ meson_src_configure "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ eninja
+}
+
+multilib_src_test() {
+ unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
+ meson_src_test
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" eninja install
+}
+
+multilib_src_install_all() {
+ local rootprefix=$(usex split-usr '' /usr)
+
+ # meson doesn't know about docdir
+ mv "${ED}"/usr/share/doc/{systemd,${PF}} || die
+
+ einstalldocs
+ dodoc "${FILESDIR}"/nsswitch.conf
+
+ if ! use resolvconf; then
+ rm -f "${ED}${rootprefix}"/sbin/resolvconf || die
+ fi
+
+ if ! use sysv-utils; then
+ rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
+ rm "${ED}"/usr/share/man/man1/init.1 || die
+ rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
+ fi
+
+ if ! use resolvconf && ! use sysv-utils; then
+ rmdir "${ED}${rootprefix}"/sbin || die
+ fi
+
+ # Preserve empty dirs in /etc & /var, bug #437008
+ keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
+ keepdir /etc/kernel/install.d
+ keepdir /etc/systemd/{network,system,user}
+ keepdir /etc/udev/{hwdb.d,rules.d}
+ keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown}
+ keepdir /usr/lib/{binfmt.d,modules-load.d}
+ keepdir /usr/lib/systemd/user-generators
+ keepdir /var/lib/systemd
+ keepdir /var/log/journal
+
+ # Symlink /etc/sysctl.conf for easy migration.
+ dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
+
+ rm -r "${ED}${rootprefix}"/lib/udev/hwdb.d || die
+
+ if use split-usr; then
+ # Avoid breaking boot/reboot
+ dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
+ dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
+ fi
+
+ gen_usr_ldscript -a systemd udev
+}
+
+migrate_locale() {
+ local envd_locale_def="${EROOT}/etc/env.d/02locale"
+ local envd_locale=( "${EROOT}"/etc/env.d/??locale )
+ local locale_conf="${EROOT}/etc/locale.conf"
+
+ if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
+ # If locale.conf does not exist...
+ if [[ -e ${envd_locale} ]]; then
+ # ...either copy env.d/??locale if there's one
+ ebegin "Moving ${envd_locale} to ${locale_conf}"
+ mv "${envd_locale}" "${locale_conf}"
+ eend ${?} || FAIL=1
+ else
+ # ...or create a dummy default
+ ebegin "Creating ${locale_conf}"
+ cat > "${locale_conf}" <<-EOF
+ # This file has been created by the sys-apps/systemd ebuild.
+ # See locale.conf(5) and localectl(1).
+
+ # LANG=${LANG}
+ EOF
+ eend ${?} || FAIL=1
+ fi
+ fi
+
+ if [[ ! -L ${envd_locale} ]]; then
+ # now, if env.d/??locale is not a symlink (to locale.conf)...
+ if [[ -e ${envd_locale} ]]; then
+ # ...warn the user that he has duplicate locale settings
+ ewarn
+ ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
+ ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
+ ewarn "and create the symlink with the following command:"
+ ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
+ ewarn
+ else
+ # ...or just create the symlink if there's nothing here
+ ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
+ ln -n -s ../locale.conf "${envd_locale_def}"
+ eend ${?} || FAIL=1
+ fi
+ fi
+}
+
+save_enabled_units() {
+ ENABLED_UNITS=()
+ type systemctl &>/dev/null || return
+ for x; do
+ if systemctl --quiet --root="${ROOT:-/}" is-enabled "${x}"; then
+ ENABLED_UNITS+=( "${x}" )
+ fi
+ done
+}
+
+pkg_preinst() {
+ save_enabled_units {machines,remote-{cryptsetup,fs}}.target getty@tty1.service
+
+ if ! use split-usr; then
+ local dir
+ for dir in bin sbin lib; do
+ if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then
+ eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged."
+ eerror "One of them should be a symbolic link to the other one."
+ FAIL=1
+ fi
+ done
+ if [[ ${FAIL} ]]; then
+ eerror "Migration to system layout with merged directories must be performed before"
+ eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage."
+ die "System layout with split directories still used"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ systemd_update_catalog
+
+ # Keep this here in case the database format changes so it gets updated
+ # when required. Despite that this file is owned by sys-apps/hwids.
+ if has_version "sys-apps/hwids[udev]"; then
+ udevadm hwdb --update --root="${EROOT}"
+ fi
+
+ udev_reload || FAIL=1
+
+ # Bug 465468, make sure locales are respect, and ensure consistency
+ # between OpenRC & systemd
+ migrate_locale
+
+ systemd_reenable systemd-networkd.service systemd-resolved.service
+
+ if [[ ${ENABLED_UNITS[@]} ]]; then
+ systemctl --root="${ROOT:-/}" enable "${ENABLED_UNITS[@]}"
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if type systemctl &>/dev/null; then
+ systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1
+ fi
+ elog "To enable a useful set of services, run the following:"
+ elog " systemctl preset-all --preset-mode=enable-only"
+ fi
+
+ if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then
+ rm "${EROOT}/var/lib/systemd/timesync"
+ fi
+
+ if [[ -z ${ROOT} && -d /run/systemd/system ]]; then
+ ebegin "Reexecuting system manager"
+ systemctl daemon-reexec
+ eend $?
+ fi
+
+ if [[ ${FAIL} ]]; then
+ eerror "One of the postinst commands failed. Please check the postinst output"
+ eerror "for errors. You may need to clean up your system and/or try installing"
+ eerror "systemd again."
+ eerror
+ fi
+}
+
+pkg_prerm() {
+ # If removing systemd completely, remove the catalog database.
+ if [[ ! ${REPLACED_BY_VERSION} ]]; then
+ rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
+ fi
+}
diff --git a/sys-apps/systemd/systemd-244.ebuild b/sys-apps/systemd/systemd-244.ebuild
index 847a85b35192..17788d8dde38 100644
--- a/sys-apps/systemd/systemd-244.ebuild
+++ b/sys-apps/systemd/systemd-244.ebuild
@@ -128,6 +128,10 @@ BDEPEND="
$(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
"
+python_check_deps() {
+ has_version -b "dev-python/lxml[${PYTHON_USEDEP}]"
+}
+
pkg_pretend() {
if [[ ${MERGE_TYPE} != buildonly ]]; then
if use test && has pid-sandbox ${FEATURES}; then
diff --git a/sys-apps/systemd/systemd-245_rc1-r1.ebuild b/sys-apps/systemd/systemd-245_rc1-r1.ebuild
new file mode 100644
index 000000000000..81388352a216
--- /dev/null
+++ b/sys-apps/systemd/systemd-245_rc1-r1.ebuild
@@ -0,0 +1,505 @@
+# Copyright 2011-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/systemd/systemd.git"
+ inherit git-r3
+else
+ MY_PV=${PV/_/-}
+ MY_P=${PN}-${MY_PV}
+ S=${WORKDIR}/${MY_P}
+ SRC_URI="https://github.com/systemd/systemd/archive/v${MY_PV}/${MY_P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev usr-ldscript
+
+DESCRIPTION="System and service manager for Linux"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
+
+LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
+SLOT="0/2"
+IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils +gcrypt gnuefi http idn importd +kmod +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux split-usr static-libs +sysv-utils test vanilla xkb"
+
+REQUIRED_USE="importd? ( curl gcrypt lzma )"
+RESTRICT="!test? ( test )"
+
+MINKV="3.11"
+
+COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
+ sys-libs/libcap:0=[${MULTILIB_USEDEP}]
+ !<sys-libs/glibc-2.16
+ acl? ( sys-apps/acl:0= )
+ apparmor? ( sys-libs/libapparmor:0= )
+ audit? ( >=sys-process/audit-2:0= )
+ cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= )
+ curl? ( net-misc/curl:0= )
+ dns-over-tls? ( >=net-libs/gnutls-3.5.3:0= )
+ elfutils? ( >=dev-libs/elfutils-0.158:0= )
+ gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
+ http? (
+ >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)]
+ >=net-libs/gnutls-3.1.4:0=
+ )
+ idn? ( net-dns/libidn2:= )
+ importd? (
+ app-arch/bzip2:0=
+ sys-libs/zlib:0=
+ )
+ 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}] )
+ nat? ( net-firewall/iptables:0= )
+ pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] )
+ pcre? ( dev-libs/libpcre2 )
+ qrcode? ( media-gfx/qrencode:0= )
+ seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
+ selinux? ( sys-libs/libselinux:0= )
+ xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
+
+# Newer linux-headers needed by ia64, bug #480218
+DEPEND="${COMMON_DEPEND}
+ >=sys-kernel/linux-headers-${MINKV}
+ gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
+"
+
+# baselayout-2.2 has /run
+RDEPEND="${COMMON_DEPEND}
+ acct-group/adm
+ acct-group/wheel
+ acct-group/kmem
+ acct-group/tty
+ acct-group/utmp
+ acct-group/audio
+ acct-group/cdrom
+ acct-group/dialout
+ acct-group/disk
+ acct-group/input
+ acct-group/kvm
+ acct-group/render
+ acct-group/tape
+ acct-group/video
+ acct-group/systemd-journal
+ acct-user/systemd-journal-remote
+ acct-user/systemd-coredump
+ acct-user/systemd-network
+ acct-user/systemd-resolve
+ acct-user/systemd-timesync
+ >=sys-apps/baselayout-2.2
+ selinux? ( sec-policy/selinux-base-policy[systemd] )
+ sysv-utils? ( !sys-apps/sysvinit )
+ !sysv-utils? ( sys-apps/sysvinit )
+ resolvconf? ( !net-dns/openresolv )
+ !build? ( || (
+ sys-apps/util-linux[kill(-)]
+ sys-process/procps[kill(+)]
+ sys-apps/coreutils[kill(-)]
+ ) )
+ !sys-auth/nss-myhostname
+ !<sys-kernel/dracut-044
+ !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]
+ >=sys-apps/hwids-20150417[udev]
+ >=sys-fs/udev-init-scripts-25
+ policykit? ( sys-auth/polkit )
+ !vanilla? ( sys-apps/gentoo-systemd-integration )"
+
+BDEPEND="
+ app-arch/xz-utils:0
+ dev-util/gperf
+ >=dev-util/meson-0.46
+ >=dev-util/intltool-0.50
+ >=sys-apps/coreutils-8.16
+ sys-devel/m4
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+ test? ( sys-apps/dbus )
+ app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt:0
+ $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
+"
+
+python_check_deps() {
+ has_version -b "dev-python/lxml[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != buildonly ]]; then
+ if use test && has pid-sandbox ${FEATURES}; then
+ ewarn "Tests are known to fail with PID sandboxing enabled."
+ ewarn "See https://bugs.gentoo.org/674458."
+ fi
+
+ local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
+ ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
+ ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
+ ~TIMERFD ~TMPFS_XATTR ~UNIX
+ ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
+ ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
+ ~!SYSFS_DEPRECATED_V2"
+
+ use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
+ use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
+ kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
+ kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
+ kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
+
+ if linux_config_exists; then
+ local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
+ if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
+ ewarn "It's recommended to set an empty value to the following kernel config option:"
+ ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
+ fi
+ if linux_chkconfig_present X86; then
+ CONFIG_CHECK+=" ~DMIID"
+ fi
+ fi
+
+ if kernel_is -lt ${MINKV//./ }; then
+ ewarn "Kernel version at least ${MINKV} required"
+ fi
+
+ check_extra_config
+ fi
+}
+
+pkg_setup() {
+ :
+}
+
+src_unpack() {
+ default
+ [[ ${PV} != 9999 ]] || git-r3_src_unpack
+}
+
+src_prepare() {
+ # Do NOT add patches here
+ local PATCHES=()
+
+ [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
+
+ # Add local patches here
+ PATCHES+=(
+ "${FILESDIR}"/245-rc1-network-debug.patch
+ "${FILESDIR}"/245-rc1-sysctl-segfault.patch
+ )
+
+ if ! use vanilla; then
+ PATCHES+=(
+ "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
+ "${FILESDIR}/gentoo-systemd-user-pam.patch"
+ "${FILESDIR}/gentoo-generator-path-r1.patch"
+ )
+ fi
+
+ default
+}
+
+src_configure() {
+ # Prevent conflicts with i686 cross toolchain, bug 559726
+ tc-export AR CC NM OBJCOPY RANLIB
+
+ python_setup
+
+ multilib-minimal_src_configure
+}
+
+meson_use() {
+ usex "$1" true false
+}
+
+meson_multilib() {
+ if multilib_is_native_abi; then
+ echo true
+ else
+ echo false
+ fi
+}
+
+meson_multilib_native_use() {
+ if multilib_is_native_abi && use "$1"; then
+ echo true
+ else
+ echo false
+ fi
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --localstatedir="${EPREFIX}/var"
+ -Dsupport-url="https://gentoo.org/support/"
+ -Dpamlibdir="$(getpam_mod_dir)"
+ # avoid bash-completion dep
+ -Dbashcompletiondir="$(get_bashcompdir)"
+ # make sure we get /bin:/sbin in PATH
+ -Dsplit-usr=$(usex split-usr true false)
+ -Dsplit-bin=true
+ -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
+ -Drootlibdir="${EPREFIX}/usr/$(get_libdir)"
+ -Dsysvinit-path=
+ -Dsysvrcnd-path=
+ # Avoid infinite exec recursion, bug 642724
+ -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
+ # no deps
+ -Dima=true
+ -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified)
+ # Optional components/dependencies
+ -Dacl=$(meson_multilib_native_use acl)
+ -Dapparmor=$(meson_multilib_native_use apparmor)
+ -Daudit=$(meson_multilib_native_use audit)
+ -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
+ -Dlibcurl=$(meson_multilib_native_use curl)
+ -Ddns-over-tls=$(meson_multilib_native_use dns-over-tls)
+ -Delfutils=$(meson_multilib_native_use elfutils)
+ -Dgcrypt=$(meson_use gcrypt)
+ -Dgnu-efi=$(meson_multilib_native_use gnuefi)
+ -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)"
+ -Dmicrohttpd=$(meson_multilib_native_use http)
+ -Didn=$(meson_multilib_native_use idn)
+ -Dimportd=$(meson_multilib_native_use importd)
+ -Dbzip2=$(meson_multilib_native_use importd)
+ -Dzlib=$(meson_multilib_native_use importd)
+ -Dkmod=$(meson_multilib_native_use kmod)
+ -Dlz4=$(meson_use lz4)
+ -Dxz=$(meson_use lzma)
+ -Dlibiptc=$(meson_multilib_native_use nat)
+ -Dpam=$(meson_use pam)
+ -Dpcre2=$(meson_multilib_native_use pcre)
+ -Dpolkit=$(meson_multilib_native_use policykit)
+ -Dqrencode=$(meson_multilib_native_use qrcode)
+ -Dseccomp=$(meson_multilib_native_use seccomp)
+ -Dselinux=$(meson_multilib_native_use selinux)
+ -Ddbus=$(meson_multilib_native_use test)
+ -Dxkbcommon=$(meson_multilib_native_use xkb)
+ -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
+
+ # multilib options
+ -Dbacklight=$(meson_multilib)
+ -Dbinfmt=$(meson_multilib)
+ -Dcoredump=$(meson_multilib)
+ -Denvironment-d=$(meson_multilib)
+ -Dfirstboot=$(meson_multilib)
+ -Dhibernate=$(meson_multilib)
+ -Dhostnamed=$(meson_multilib)
+ -Dhwdb=$(meson_multilib)
+ -Dldconfig=$(meson_multilib)
+ -Dlocaled=$(meson_multilib)
+ -Dman=$(meson_multilib)
+ -Dnetworkd=$(meson_multilib)
+ -Dquotacheck=$(meson_multilib)
+ -Drandomseed=$(meson_multilib)
+ -Drfkill=$(meson_multilib)
+ -Dsysusers=$(meson_multilib)
+ -Dtimedated=$(meson_multilib)
+ -Dtimesyncd=$(meson_multilib)
+ -Dtmpfiles=$(meson_multilib)
+ -Dvconsole=$(meson_multilib)
+
+ # static-libs
+ -Dstatic-libsystemd=$(usex static-libs true false)
+ -Dstatic-libudev=$(usex static-libs true false)
+ )
+
+ meson_src_configure "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ eninja
+}
+
+multilib_src_test() {
+ unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
+ meson_src_test
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" eninja install
+}
+
+multilib_src_install_all() {
+ local rootprefix=$(usex split-usr '' /usr)
+
+ # meson doesn't know about docdir
+ mv "${ED}"/usr/share/doc/{systemd,${PF}} || die
+
+ einstalldocs
+ dodoc "${FILESDIR}"/nsswitch.conf
+
+ if ! use resolvconf; then
+ rm -f "${ED}${rootprefix}"/sbin/resolvconf || die
+ fi
+
+ if ! use sysv-utils; then
+ rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
+ rm "${ED}"/usr/share/man/man1/init.1 || die
+ rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
+ fi
+
+ if ! use resolvconf && ! use sysv-utils; then
+ rmdir "${ED}${rootprefix}"/sbin || die
+ fi
+
+ # Preserve empty dirs in /etc & /var, bug #437008
+ keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
+ keepdir /etc/kernel/install.d
+ keepdir /etc/systemd/{network,system,user}
+ keepdir /etc/udev/{hwdb.d,rules.d}
+ keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown}
+ keepdir /usr/lib/{binfmt.d,modules-load.d}
+ keepdir /usr/lib/systemd/user-generators
+ keepdir /var/lib/systemd
+ keepdir /var/log/journal
+
+ # Symlink /etc/sysctl.conf for easy migration.
+ dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
+
+ rm -r "${ED}${rootprefix}"/lib/udev/hwdb.d || die
+
+ if use split-usr; then
+ # Avoid breaking boot/reboot
+ dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
+ dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
+ fi
+
+ gen_usr_ldscript -a systemd udev
+}
+
+migrate_locale() {
+ local envd_locale_def="${EROOT}/etc/env.d/02locale"
+ local envd_locale=( "${EROOT}"/etc/env.d/??locale )
+ local locale_conf="${EROOT}/etc/locale.conf"
+
+ if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
+ # If locale.conf does not exist...
+ if [[ -e ${envd_locale} ]]; then
+ # ...either copy env.d/??locale if there's one
+ ebegin "Moving ${envd_locale} to ${locale_conf}"
+ mv "${envd_locale}" "${locale_conf}"
+ eend ${?} || FAIL=1
+ else
+ # ...or create a dummy default
+ ebegin "Creating ${locale_conf}"
+ cat > "${locale_conf}" <<-EOF
+ # This file has been created by the sys-apps/systemd ebuild.
+ # See locale.conf(5) and localectl(1).
+
+ # LANG=${LANG}
+ EOF
+ eend ${?} || FAIL=1
+ fi
+ fi
+
+ if [[ ! -L ${envd_locale} ]]; then
+ # now, if env.d/??locale is not a symlink (to locale.conf)...
+ if [[ -e ${envd_locale} ]]; then
+ # ...warn the user that he has duplicate locale settings
+ ewarn
+ ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
+ ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
+ ewarn "and create the symlink with the following command:"
+ ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
+ ewarn
+ else
+ # ...or just create the symlink if there's nothing here
+ ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
+ ln -n -s ../locale.conf "${envd_locale_def}"
+ eend ${?} || FAIL=1
+ fi
+ fi
+}
+
+save_enabled_units() {
+ ENABLED_UNITS=()
+ type systemctl &>/dev/null || return
+ for x; do
+ if systemctl --quiet --root="${ROOT:-/}" is-enabled "${x}"; then
+ ENABLED_UNITS+=( "${x}" )
+ fi
+ done
+}
+
+pkg_preinst() {
+ save_enabled_units {machines,remote-{cryptsetup,fs}}.target getty@tty1.service
+
+ if ! use split-usr; then
+ local dir
+ for dir in bin sbin lib; do
+ if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then
+ eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged."
+ eerror "One of them should be a symbolic link to the other one."
+ FAIL=1
+ fi
+ done
+ if [[ ${FAIL} ]]; then
+ eerror "Migration to system layout with merged directories must be performed before"
+ eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage."
+ die "System layout with split directories still used"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ systemd_update_catalog
+
+ # Keep this here in case the database format changes so it gets updated
+ # when required. Despite that this file is owned by sys-apps/hwids.
+ if has_version "sys-apps/hwids[udev]"; then
+ udevadm hwdb --update --root="${EROOT}"
+ fi
+
+ udev_reload || FAIL=1
+
+ # Bug 465468, make sure locales are respect, and ensure consistency
+ # between OpenRC & systemd
+ migrate_locale
+
+ systemd_reenable systemd-networkd.service systemd-resolved.service
+
+ if [[ ${ENABLED_UNITS[@]} ]]; then
+ systemctl --root="${ROOT:-/}" enable "${ENABLED_UNITS[@]}"
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if type systemctl &>/dev/null; then
+ systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1
+ fi
+ elog "To enable a useful set of services, run the following:"
+ elog " systemctl preset-all --preset-mode=enable-only"
+ fi
+
+ if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then
+ rm "${EROOT}/var/lib/systemd/timesync"
+ fi
+
+ if [[ -z ${ROOT} && -d /run/systemd/system ]]; then
+ ebegin "Reexecuting system manager"
+ systemctl daemon-reexec
+ eend $?
+ fi
+
+ if [[ ${FAIL} ]]; then
+ eerror "One of the postinst commands failed. Please check the postinst output"
+ eerror "for errors. You may need to clean up your system and/or try installing"
+ eerror "systemd again."
+ eerror
+ fi
+}
+
+pkg_prerm() {
+ # If removing systemd completely, remove the catalog database.
+ if [[ ! ${REPLACED_BY_VERSION} ]]; then
+ rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
+ fi
+}
diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild
index daed59e210c0..2a74ef0ef0b3 100644
--- a/sys-apps/systemd/systemd-9999.ebuild
+++ b/sys-apps/systemd/systemd-9999.ebuild
@@ -7,14 +7,19 @@ if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://github.com/systemd/systemd.git"
inherit git-r3
else
+ if [[ ${PV} == *.* ]]; then
+ MY_PN=systemd-stable
+ else
+ MY_PN=systemd
+ fi
MY_PV=${PV/_/-}
- MY_P=${PN}-${MY_PV}
+ MY_P=${MY_PN}-${MY_PV}
S=${WORKDIR}/${MY_P}
- SRC_URI="https://github.com/systemd/systemd/archive/v${MY_PV}/${MY_P}.tar.gz"
+ SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
fi
-PYTHON_COMPAT=( python{3_6,3_7} )
+PYTHON_COMPAT=( python3_{6,7,8} )
inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev usr-ldscript
@@ -128,6 +133,10 @@ BDEPEND="
$(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
"
+python_check_deps() {
+ has_version -b "dev-python/lxml[${PYTHON_USEDEP}]"
+}
+
pkg_pretend() {
if [[ ${MERGE_TYPE} != buildonly ]]; then
if use test && has pid-sandbox ${FEATURES}; then