summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2018-04-01 12:31:04 -0400
committerMike Gilbert <floppym@gentoo.org>2018-04-01 12:31:27 -0400
commit2266f8440e17591fc6a4905a706c74432051854f (patch)
tree17244902d063e7f6903177aa45d61e657374bfd6
parentsys-apps/systemd: add initctl patch (diff)
downloadgentoo-2266f844.tar.gz
gentoo-2266f844.tar.bz2
gentoo-2266f844.zip
sys-apps/systemd: remove old
Package-Manager: Portage-2.3.24, Repoman-2.3.6_p81
-rw-r--r--sys-apps/systemd/Manifest5
-rw-r--r--sys-apps/systemd/files/237-0001-networkctl-display-type.patch266
-rw-r--r--sys-apps/systemd/metadata.xml1
-rw-r--r--sys-apps/systemd/systemd-233-r6.ebuild458
-rw-r--r--sys-apps/systemd/systemd-237-r2.ebuild440
-rw-r--r--sys-apps/systemd/systemd-237-r3.ebuild442
-rw-r--r--sys-apps/systemd/systemd-238-r1.ebuild437
7 files changed, 0 insertions, 2049 deletions
diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest
index f5ba7882937c..42cccb76c599 100644
--- a/sys-apps/systemd/Manifest
+++ b/sys-apps/systemd/Manifest
@@ -1,9 +1,4 @@
-DIST systemd-233-man.tar.gz 31386 BLAKE2B e4947e658db3efeec6b5a6adf340d2cc8e8aff2a14db4932720f90c3dc898b1e78595db983948373a2e28191fb3b0aad234f80feb91ee8ae4b607a44038a9cae SHA512 cc5215d3590ffc3c9203a64c14d6adeb0148c421c1396b8c1e43dcb58763b687ce99bdee327dd8a00abab7198171e73b22109a3f2032e4cec6adf2dcc85acf40
-DIST systemd-233-patches.tar.gz 12553 BLAKE2B 5d19f2dc82cc6cbd9b2e9393f932dfa3c88a981358b282fe56d43cd432d0ee0c0245e9c13d5460b94d83908b84a382dad3348b999f2356ab3ef2ae2c542a867d SHA512 3081f4cf64542ba64a28fe2eff11d8040af42255eb99b5210db9d583fc4b4360a4a4bb8769a1e43d38474d69ead681974cb98d4605968b38f98fd3d9b40bf211
-DIST systemd-233.tar.gz 4660737 BLAKE2B 38cdd74543447b3c02391b328428fed169fe2cf2df6e9341dcaf2f7d3d977612ec102301e144c1cada90d61e9e9bda3b2faaef708c8ff4bd0b52b143760a83b2 SHA512 5ad5329ea116d973cf67096f7e7ad28e9ea0905696e9451291f1d25e5064f4a9bfcfae87e912996c6a38397e9f4a148d4ccecfa9b70f7ecdf04deadb61784c8e
DIST systemd-236-patches-2.tar.gz 54737 BLAKE2B bce5f9e234c975a2b6e474ca2a0c2c82e704f02cf19885134dddc5edbd0b7bfb3773d737f88f78ba2ab81093dfceeb44d76ecda99cf2b916072dcdfa84720c19 SHA512 b74ab6944135c938b2d0d2a1dd40ac4cc4ff26d072603d6bfbe4529d808b2e481eb910155895bce14607842ad6d30751aded51654a53f76278becbb5e317b875
DIST systemd-236.tar.gz 6759035 BLAKE2B 0fc26bd67fb6cc3b0565c763fc26e38186c4b05c3d38652b73a2189dfbfb46382dba239f7f6f889eec57ad1d8f69d4098745c8f4ca16a707aa23b7771f2328f3 SHA512 1a9672960e03e05c09e41fb8cfe9b0f25e867fd43f37f8371515ddddfdbd4270afd746a6da733f6d1d3b2cc43db1ecc7a9f2245f2dac2ec233db74e9e70e4f6d
-DIST systemd-237-patches-0.tar.gz 74617 BLAKE2B 52750bb08731e9e694a00fedc1e42beb7c6ad7736d3b6567f2ab094d4356506d10ec11e1c4c62623078d647c3314c71c9f141eb7c8628b610fd8a5e818b90ec6 SHA512 a6db99b330585e57c722bb0e692b0d988d5fbfef60c6cc87efbb7b903e55642c2f03bf6cdc80f15da22d0c41b5051387dac23a2f04238331f235154b17f32d1b
-DIST systemd-237.tar.gz 6871350 BLAKE2B 4734a110a297fbbd6679bced6302fcdca55ab5d4207905e8dee9f5545f1de841d5adeaa4fd89961b9e63709d04b5c862b8bc81481311cf8e72ee327e459c9d91 SHA512 15ef4b92815a6dd9a6c51672dbc00fd7cd0f08068ef0cbeaca574f68d330b28bc67ba1946f24f75ef3d9e7b63843a73eea700db54688061dbf5c9f8470394c3b
DIST systemd-238-patches-0.tar.gz 30019 BLAKE2B 0f393865cd6bcd815c1a6e932c0e5a25e125768d2bdef072d5fa7830b9ea012d0986380a1cdea8e369e1fffe89ea7657e4d55de2bae0d785ae374796a4e7c64b SHA512 f7e6fb7bf3b5cde2717a9e5dcd779a4595d6185d1ecdad8405a075edbb55b32c2573558f6af119ff50ea0df8eacef12ae7ee710fadd269f83db0985d76eb22dc
DIST systemd-238.tar.gz 6954022 BLAKE2B 9b5cc36a7234c0d037a2656ee1e5ed54186a394b8be41771ebc29c903d3efcecf7f13f004a6d1695c022923bd0d540a243e897852f07e810f73fd3163f688dde SHA512 c0f272b022308d3bd94679184e102a8dc85de55310bda205a458ea33c77c7733e5c8c8e5b15f786ba3e0ce59e7c6a9bf0d5a0950517c6b91e0f345950129b9c8
diff --git a/sys-apps/systemd/files/237-0001-networkctl-display-type.patch b/sys-apps/systemd/files/237-0001-networkctl-display-type.patch
deleted file mode 100644
index e29cf2206aa2..000000000000
--- a/sys-apps/systemd/files/237-0001-networkctl-display-type.patch
+++ /dev/null
@@ -1,266 +0,0 @@
-From a18461bc7d446f8e130e9276de4397d00059267f Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Mon, 29 Jan 2018 20:58:24 +0100
-Subject: [PATCH 1/4] networkd: display wireguard devtype
-
-It's not useful to simply show "none", when we have more interesting
-information to display.
-
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
----
- src/network/networkctl.c | 22 +++++++++++++++-------
- 1 file changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/src/network/networkctl.c b/src/network/networkctl.c
-index 59ce098cd1..6ce00dff6d 100644
---- a/src/network/networkctl.c
-+++ b/src/network/networkctl.c
-@@ -62,18 +62,26 @@ static int link_get_type_string(unsigned short iftype, sd_device *d, char **ret)
-
- assert(ret);
-
-- if (iftype == ARPHRD_ETHER && d) {
-+ if (d) {
- const char *devtype = NULL, *id = NULL;
-+
-+ (void) sd_device_get_devtype(d, &devtype);
-+
- /* WLANs have iftype ARPHRD_ETHER, but we want
- * to show a more useful type string for
- * them */
-+ if (iftype == ARPHRD_ETHER) {
-+ if (streq_ptr(devtype, "wlan"))
-+ id = "wlan";
-+ else if (streq_ptr(devtype, "wwan"))
-+ id = "wwan";
-+ }
-
-- (void) sd_device_get_devtype(d, &devtype);
--
-- if (streq_ptr(devtype, "wlan"))
-- id = "wlan";
-- else if (streq_ptr(devtype, "wwan"))
-- id = "wwan";
-+ /* Likewise, WireGuard has iftype ARPHRD_NONE,
-+ * since it's layer 3, but we of course want
-+ * something more useful than that. */
-+ if (iftype == ARPHRD_NONE && streq_ptr(devtype, "wireguard"))
-+ id = "wireguard";
-
- if (id) {
- p = strdup(id);
-
-From f119082e7a1ccfbf50c30a99819b6e303cdf09a1 Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Mon, 29 Jan 2018 21:01:46 +0100
-Subject: [PATCH 2/4] networkd: simplify and display all devtypes
-
-Every place the kernel actually calls SET_NETDEV_DEVTYPE, it's adding a
-piece of information that looks useful and relevant for us to use. So
-let's use it when it's there.
-
-The previous matching based on the corresponding ARPHRD didn't really
-make much sense. The more sensible logic for getting a textual
-representation of the link type is to see if the kernel supplies a
-devtype. If it does, great. If not, then we can fall back on the ARPHRD,
-as before.
-
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
----
- src/network/networkctl.c | 23 +++--------------------
- 1 file changed, 3 insertions(+), 20 deletions(-)
-
-diff --git a/src/network/networkctl.c b/src/network/networkctl.c
-index 6ce00dff6d..8a08304240 100644
---- a/src/network/networkctl.c
-+++ b/src/network/networkctl.c
-@@ -63,28 +63,11 @@ static int link_get_type_string(unsigned short iftype, sd_device *d, char **ret)
- assert(ret);
-
- if (d) {
-- const char *devtype = NULL, *id = NULL;
-+ const char *devtype = NULL;
-
- (void) sd_device_get_devtype(d, &devtype);
--
-- /* WLANs have iftype ARPHRD_ETHER, but we want
-- * to show a more useful type string for
-- * them */
-- if (iftype == ARPHRD_ETHER) {
-- if (streq_ptr(devtype, "wlan"))
-- id = "wlan";
-- else if (streq_ptr(devtype, "wwan"))
-- id = "wwan";
-- }
--
-- /* Likewise, WireGuard has iftype ARPHRD_NONE,
-- * since it's layer 3, but we of course want
-- * something more useful than that. */
-- if (iftype == ARPHRD_NONE && streq_ptr(devtype, "wireguard"))
-- id = "wireguard";
--
-- if (id) {
-- p = strdup(id);
-+ if (!isempty(devtype)) {
-+ p = strdup(devtype);
- if (!p)
- return -ENOMEM;
-
-
-From fdce7817b9a27a370c01b7dd9da6a84fcae1038e Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Mon, 29 Jan 2018 21:05:36 +0100
-Subject: [PATCH 3/4] networkd: clean up link_get_type_string
-
-The return value is always ignored, so get rid of it.
-
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
----
- src/network/networkctl.c | 16 +++++++---------
- 1 file changed, 7 insertions(+), 9 deletions(-)
-
-diff --git a/src/network/networkctl.c b/src/network/networkctl.c
-index 8a08304240..7b33e0db17 100644
---- a/src/network/networkctl.c
-+++ b/src/network/networkctl.c
-@@ -56,7 +56,7 @@ static bool arg_no_pager = false;
- static bool arg_legend = true;
- static bool arg_all = false;
-
--static int link_get_type_string(unsigned short iftype, sd_device *d, char **ret) {
-+static void link_get_type_string(unsigned short iftype, sd_device *d, char **ret) {
- const char *t;
- char *p;
-
-@@ -69,27 +69,25 @@ static int link_get_type_string(unsigned short iftype, sd_device *d, char **ret)
- if (!isempty(devtype)) {
- p = strdup(devtype);
- if (!p)
-- return -ENOMEM;
-+ return;
-
- *ret = p;
-- return 1;
-+ return;
- }
- }
-
- t = arphrd_to_name(iftype);
- if (!t) {
- *ret = NULL;
-- return 0;
-+ return;
- }
-
- p = strdup(t);
- if (!p)
-- return -ENOMEM;
-+ return;
-
- ascii_strlower(p);
- *ret = p;
--
-- return 0;
- }
-
- static void operational_state_to_color(const char *state, const char **on, const char **off) {
-@@ -314,7 +312,7 @@ static int list_links(int argc, char *argv[], void *userdata) {
- xsprintf(devid, "n%i", links[i].ifindex);
- (void) sd_device_new_from_device_id(&d, devid);
-
-- (void) link_get_type_string(links[i].iftype, d, &t);
-+ link_get_type_string(links[i].iftype, d, &t);
-
- printf("%3i %-16s %-18s %s%-11s%s %s%-10s%s\n",
- links[i].ifindex, links[i].name, strna(t),
-@@ -807,7 +805,7 @@ static int link_status_one(
- (void) sd_device_get_property_value(d, "ID_MODEL", &model);
- }
-
-- (void) link_get_type_string(info->iftype, d, &t);
-+ link_get_type_string(info->iftype, d, &t);
-
- (void) sd_network_link_get_network_file(info->ifindex, &network);
-
-
-From b55822c349d3e0559c1efc7475fd0f74cf086453 Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Mon, 29 Jan 2018 21:08:39 +0100
-Subject: [PATCH 4/4] networkd: clean up link_get_type_string returns
-
-It's cleaner and more consistent to actually return what we were
-planning on returning.
-
-Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
----
- src/network/networkctl.c | 28 +++++++++-------------------
- 1 file changed, 9 insertions(+), 19 deletions(-)
-
-diff --git a/src/network/networkctl.c b/src/network/networkctl.c
-index 7b33e0db17..14d8ecb03f 100644
---- a/src/network/networkctl.c
-+++ b/src/network/networkctl.c
-@@ -56,38 +56,28 @@ static bool arg_no_pager = false;
- static bool arg_legend = true;
- static bool arg_all = false;
-
--static void link_get_type_string(unsigned short iftype, sd_device *d, char **ret) {
-+static char *link_get_type_string(unsigned short iftype, sd_device *d) {
- const char *t;
- char *p;
-
-- assert(ret);
--
- if (d) {
- const char *devtype = NULL;
-
- (void) sd_device_get_devtype(d, &devtype);
-- if (!isempty(devtype)) {
-- p = strdup(devtype);
-- if (!p)
-- return;
--
-- *ret = p;
-- return;
-- }
-+ if (!isempty(devtype))
-+ return strdup(devtype);
- }
-
- t = arphrd_to_name(iftype);
-- if (!t) {
-- *ret = NULL;
-- return;
-- }
-+ if (!t)
-+ return NULL;
-
- p = strdup(t);
- if (!p)
-- return;
-+ return NULL;
-
- ascii_strlower(p);
-- *ret = p;
-+ return p;
- }
-
- static void operational_state_to_color(const char *state, const char **on, const char **off) {
-@@ -312,7 +302,7 @@ static int list_links(int argc, char *argv[], void *userdata) {
- xsprintf(devid, "n%i", links[i].ifindex);
- (void) sd_device_new_from_device_id(&d, devid);
-
-- link_get_type_string(links[i].iftype, d, &t);
-+ t = link_get_type_string(links[i].iftype, d);
-
- printf("%3i %-16s %-18s %s%-11s%s %s%-10s%s\n",
- links[i].ifindex, links[i].name, strna(t),
-@@ -805,7 +795,7 @@ static int link_status_one(
- (void) sd_device_get_property_value(d, "ID_MODEL", &model);
- }
-
-- link_get_type_string(info->iftype, d, &t);
-+ t = link_get_type_string(info->iftype, d);
-
- (void) sd_network_link_get_network_file(info->ifindex, &network);
-
diff --git a/sys-apps/systemd/metadata.xml b/sys-apps/systemd/metadata.xml
index c0dbc0de0126..d2004bef1076 100644
--- a/sys-apps/systemd/metadata.xml
+++ b/sys-apps/systemd/metadata.xml
@@ -13,7 +13,6 @@
<flag name="audit">Enable support for <pkg>sys-process/audit</pkg></flag>
<flag name="curl">Enable support for uploading journals</flag>
<flag name="cryptsetup">Enable cryptsetup tools (includes unit generator for crypttab)</flag>
- <flag name="doc">Generate systemd.index.7 and systemd.directives.7</flag>
<flag name="gnuefi">Enable EFI boot manager and stub loader (built using <pkg>sys-boot/gnu-efi</pkg>)</flag>
<flag name="elfutils">Enable coredump stacktraces in the journal</flag>
<flag name="gcrypt">Enable sealing of journal files using gcrypt</flag>
diff --git a/sys-apps/systemd/systemd-233-r6.ebuild b/sys-apps/systemd/systemd-233-r6.ebuild
deleted file mode 100644
index 307333c182d6..000000000000
--- a/sys-apps/systemd/systemd-233-r6.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://github.com/systemd/systemd.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz
- https://dev.gentoo.org/~floppym/dist/${P}-patches.tar.gz
- !doc? ( https://dev.gentoo.org/~floppym/dist/${P}-man.tar.gz )"
- KEYWORDS="alpha amd64 arm ~arm64 ia64 ppc ppc64 ~sparc x86"
-fi
-
-PYTHON_COMPAT=( python{3_4,3_5,3_6} )
-
-inherit autotools bash-completion-r1 linux-info multilib-minimal pam python-any-r1 systemd toolchain-funcs udev user
-
-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 cryptsetup curl doc elfutils +gcrypt gnuefi http
- idn importd +kmod +lz4 lzma nat pam policykit
- qrcode +seccomp selinux ssl sysv-utils test vanilla xkb"
-
-REQUIRED_USE="importd? ( curl gcrypt lzma )"
-
-MINKV="3.11"
-
-COMMON_DEPEND=">=sys-apps/util-linux-2.27.1: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-1.6:0= )
- curl? ( net-misc/curl: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=
- ssl? ( >=net-libs/gnutls-3.1.4:0= )
- )
- idn? ( net-dns/libidn:0= )
- 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? ( virtual/pam:=[${MULTILIB_USEDEP}] )
- qrcode? ( media-gfx/qrencode:0= )
- seccomp? ( >=sys-libs/libseccomp-2.3.1:0= )
- selinux? ( sys-libs/libselinux:0= )
- xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
- abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-
-# baselayout-2.2 has /run
-RDEPEND="${COMMON_DEPEND}
- >=sys-apps/baselayout-2.2
- selinux? ( sec-policy/selinux-base-policy[systemd] )
- sysv-utils? ( !sys-apps/sysvinit )
- !sysv-utils? ( sys-apps/sysvinit )
- !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 )"
-
-# Newer linux-headers needed by ia64, bug #480218
-DEPEND="${COMMON_DEPEND}
- app-arch/xz-utils:0
- dev-util/gperf
- >=dev-util/intltool-0.50
- >=sys-apps/coreutils-8.16
- >=sys-kernel/linux-headers-${MINKV}
- virtual/pkgconfig
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
- 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
- doc? ( $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') )
-"
-
-python_check_deps() {
- has_version --host-root "dev-python/lxml[${PYTHON_USEDEP}]"
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != buildonly ]]; then
- 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"
-
- 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() {
- # Bug 463376
- sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
-
- local PATCHES=(
- "${FILESDIR}/CVE-2017-15908.patch"
- )
-
- if ! use vanilla; then
- PATCHES+=(
- "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
- "${FILESDIR}/gentoo-noclean-tmp.patch"
- "${FILESDIR}/gentoo-systemd-user-pam.patch"
- )
- fi
-
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
-
- default
-
- eautoreconf
-}
-
-src_configure() {
- # Keep using the one where the rules were installed.
- MY_UDEVDIR=$(get_udevdir)
- # Fix systems broken by bug #509454.
- [[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
-
- # Prevent conflicts with i686 cross toolchain, bug 559726
- tc-export AR CC NM OBJCOPY RANLIB
-
- use doc && python_setup
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- # disable -flto since it is an optimization flag
- # and makes distcc less effective
- cc_cv_CFLAGS__flto=no
- # disable -fuse-ld=gold since Gentoo supports explicit linker
- # choice and forcing gold is undesired, #539998
- # ld.gold may collide with user's LDFLAGS, #545168
- # ld.gold breaks sparc, #573874
- cc_cv_LDFLAGS__Wl__fuse_ld_gold=no
-
- # Workaround for gcc-4.7, bug 554454.
- cc_cv_CFLAGS__Werror_shadow=no
-
- # Workaround for bug 516346
- --enable-dependency-tracking
-
- --disable-maintainer-mode
- --localstatedir=/var
- --with-pamlibdir=$(getpam_mod_dir)
- # avoid bash-completion dep
- --with-bashcompletiondir="$(get_bashcompdir)"
- # make sure we get /bin:/sbin in $PATH
- --enable-split-usr
- # For testing.
- --with-rootprefix="${ROOTPREFIX-/usr}"
- --with-rootlibdir="${ROOTPREFIX-/usr}/$(get_libdir)"
- # disable sysv compatibility
- --with-sysvinit-path=
- --with-sysvrcnd-path=
- # no deps
- --enable-efi
- --enable-ima
-
- # Optional components/dependencies
- $(multilib_native_use_enable acl)
- $(multilib_native_use_enable apparmor)
- $(multilib_native_use_enable audit)
- $(multilib_native_use_enable cryptsetup libcryptsetup)
- $(multilib_native_use_enable curl libcurl)
- $(multilib_native_use_enable elfutils)
- $(use_enable gcrypt)
- $(multilib_native_use_enable gnuefi)
- --with-efi-libdir="/usr/$(get_libdir)"
- $(multilib_native_use_enable http microhttpd)
- $(usex http $(multilib_native_use_enable ssl gnutls) --disable-gnutls)
- $(multilib_native_use_enable idn libidn)
- $(multilib_native_use_enable importd)
- $(multilib_native_use_enable importd bzip2)
- $(multilib_native_use_enable importd zlib)
- $(multilib_native_use_enable kmod)
- $(use_enable lz4)
- $(use_enable lzma xz)
- $(multilib_native_use_enable nat libiptc)
- $(use_enable pam)
- $(multilib_native_use_enable policykit polkit)
- $(multilib_native_use_enable qrcode qrencode)
- $(multilib_native_use_enable seccomp)
- $(multilib_native_use_enable selinux)
- $(multilib_native_use_enable test tests)
- $(multilib_native_use_enable test dbus)
- $(multilib_native_use_enable xkb xkbcommon)
- $(multilib_native_use_with doc python)
-
- # hardcode a few paths to spare some deps
- KILL=/bin/kill
- QUOTAON=/usr/sbin/quotaon
- QUOTACHECK=/usr/sbin/quotacheck
-
- # TODO: we may need to restrict this to gcc
- EFI_CC="$(tc-getCC)"
-
- # dbus paths
- --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d"
- --with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
- --with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
-
- --with-ntp-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.
- --without-kill-user-processes
- )
-
- # Work around bug 463846.
- tc-export CC
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- local mymakeopts=(
- udevlibexecdir="${MY_UDEVDIR}"
- )
-
- if multilib_is_native_abi; then
- emake "${mymakeopts[@]}"
- else
- emake built-sources
- local targets=(
- '$(rootlib_LTLIBRARIES)'
- '$(lib_LTLIBRARIES)'
- '$(pamlib_LTLIBRARIES)'
- '$(pkgconfiglib_DATA)'
- )
- echo "gentoo: ${targets[*]}" | emake "${mymakeopts[@]}" -f Makefile -f - gentoo
- fi
-}
-
-multilib_src_test() {
- multilib_is_native_abi || return 0
- default
-}
-
-multilib_src_install() {
- local mymakeopts=(
- # automake fails with parallel libtool relinking
- # https://bugs.gentoo.org/show_bug.cgi?id=491398
- -j1
-
- udevlibexecdir="${MY_UDEVDIR}"
- dist_udevhwdb_DATA=
- DESTDIR="${D}"
- )
-
- if multilib_is_native_abi; then
- emake "${mymakeopts[@]}" install
- else
- mymakeopts+=(
- install-rootlibLTLIBRARIES
- install-libLTLIBRARIES
- install-pamlibLTLIBRARIES
- install-pkgconfiglibDATA
- install-includeHEADERS
- install-pkgincludeHEADERS
- )
-
- emake "${mymakeopts[@]}"
- fi
-}
-
-multilib_src_install_all() {
- prune_libtool_files --modules
- einstalldocs
- dodoc "${FILESDIR}"/nsswitch.conf
-
- if [[ ${PV} != 9999 ]]; then
- use doc || doman "${WORKDIR}"/man/systemd.{directives,index}.7
- fi
-
- if use sysv-utils; then
- for app in halt poweroff reboot runlevel shutdown telinit; do
- dosym "..${ROOTPREFIX-/usr}/bin/systemctl" /sbin/${app}
- done
- dosym "..${ROOTPREFIX-/usr}/lib/systemd/systemd" /sbin/init
- else
- # we just keep sysvinit tools, so no need for the mans
- rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
- || die
- rm "${D}"/usr/share/man/man1/init.1 || die
- fi
-
- # Preserve empty dirs in /etc & /var, bug #437008
- keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \
- /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \
- /var/log/journal/remote
-
- # Symlink /etc/sysctl.conf for easy migration.
- dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
-
- # If we install these symlinks, there is no way for the sysadmin to remove them
- # permanently.
- rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
- rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
- rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
- rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
- rm -fr "${ED%/}"/etc/systemd/system/network-online.target.wants || die
- rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die
- rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
-}
-
-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
-}
-
-pkg_postinst() {
- newusergroup() {
- enewgroup "$1"
- enewuser "$1" -1 -1 -1 "$1"
- }
-
- enewgroup input
- enewgroup systemd-journal
- newusergroup systemd-bus-proxy
- newusergroup systemd-coredump
- newusergroup systemd-journal-gateway
- newusergroup systemd-journal-remote
- newusergroup systemd-journal-upload
- newusergroup systemd-network
- newusergroup systemd-resolve
- newusergroup systemd-timesync
-
- 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="${ROOT%/}"
- 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 [[ ${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-237-r2.ebuild b/sys-apps/systemd/systemd-237-r2.ebuild
deleted file mode 100644
index 06b717f4da45..000000000000
--- a/sys-apps/systemd/systemd-237-r2.ebuild
+++ /dev/null
@@ -1,440 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://github.com/systemd/systemd.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}/${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
-fi
-
-PYTHON_COMPAT=( python{3_4,3_5,3_6} )
-
-inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
-
-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 cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +seccomp selinux ssl +sysv-utils test usrmerge 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-1.6:0= )
- curl? ( net-misc/curl: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=
- ssl? ( >=net-libs/gnutls-3.1.4:0= )
- )
- idn? (
- libidn2? ( net-dns/libidn2 )
- !libidn2? ( net-dns/libidn )
- )
- 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? ( virtual/pam:=[${MULTILIB_USEDEP}] )
- pcre? ( dev-libs/libpcre2 )
- qrcode? ( media-gfx/qrencode:0= )
- seccomp? ( >=sys-libs/libseccomp-2.3.1:0= )
- selinux? ( sys-libs/libselinux:0= )
- xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
- abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-
-# baselayout-2.2 has /run
-RDEPEND="${COMMON_DEPEND}
- >=sys-apps/baselayout-2.2
- selinux? ( sec-policy/selinux-base-policy[systemd] )
- sysv-utils? ( !sys-apps/sysvinit )
- !sysv-utils? ( sys-apps/sysvinit )
- !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 )"
-
-# Newer linux-headers needed by ia64, bug #480218
-DEPEND="${COMMON_DEPEND}
- app-arch/xz-utils:0
- dev-util/gperf
- >=dev-util/intltool-0.50
- >=sys-apps/coreutils-8.16
- >=sys-kernel/linux-headers-${MINKV}
- virtual/pkgconfig
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
- 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}]')
-"
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != buildonly ]]; then
- 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() {
- local PATCHES=(
- "${FILESDIR}/237-0001-networkctl-display-type.patch"
- )
-
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
-
- if ! use vanilla; then
- PATCHES+=(
- "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
- "${FILESDIR}/gentoo-systemd-user-pam.patch"
- "${FILESDIR}/gentoo-uucp-group-r1.patch"
- "${FILESDIR}/gentoo-generator-path.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"
- -Dpamlibdir="$(getpam_mod_dir)"
- # avoid bash-completion dep
- -Dbashcompletiondir="$(get_bashcompdir)"
- # make sure we get /bin:/sbin in PATH
- -Dsplit-usr=$(usex usrmerge false true)
- -Drootprefix="$(usex usrmerge "${EPREFIX}/usr" "${EPREFIX:-/}")"
- -Dsysvinit-path=
- -Dsysvrcnd-path=
- # Avoid infinite exec recursion, bug 642724
- -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
- # no deps
- -Defi=$(meson_multilib)
- -Dima=true
- # 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)
- -Delfutils=$(meson_multilib_native_use elfutils)
- -Dgcrypt=$(meson_use gcrypt)
- -Dgnu-efi=$(meson_multilib_native_use gnuefi)
- -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
- -Dmicrohttpd=$(meson_multilib_native_use http)
- $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
- -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)
- #-Dtests=$(meson_multilib_native_use test)
- -Ddbus=$(meson_multilib_native_use test)
- -Dxkbcommon=$(meson_multilib_native_use xkb)
- # hardcode a few paths to spare some deps
- -Dkill-path=/bin/kill
- -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
-
- # 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)
- )
-
- if multilib_is_native_abi && use idn; then
- myconf+=(
- -Dlibidn2=$(usex libidn2 true false)
- -Dlibidn=$(usex libidn2 false true)
- )
- else
- myconf+=(
- -Dlibidn2=false
- -Dlibidn=false
- )
- fi
-
- meson_src_configure "${myconf[@]}"
-}
-
-multilib_src_compile() {
- eninja
-}
-
-multilib_src_test() {
- eninja test
-}
-
-multilib_src_install() {
- DESTDIR="${D}" eninja install
-}
-
-multilib_src_install_all() {
- # meson doesn't know about docdir
- mv "${ED%/}"/usr/share/doc/{systemd,${PF}} || die
-
- einstalldocs
- dodoc "${FILESDIR}"/nsswitch.conf
-
- if use sysv-utils; then
- local app
- for app in halt poweroff reboot runlevel shutdown telinit; do
- dosym ../bin/systemctl /sbin/${app}
- done
- dosym ../lib/systemd/systemd /sbin/init
- else
- # we just keep sysvinit tools, so no need for the mans
- rm "${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
- || die
- rm "${ED%/}"/usr/share/man/man1/init.1 || die
- fi
-
- # Preserve empty dirs in /etc & /var, bug #437008
- keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
- keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
- keepdir /etc/udev/{hwdb.d,rules.d}
- keepdir /var/log/journal/remote
-
- # Symlink /etc/sysctl.conf for easy migration.
- dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
-
- # If we install these symlinks, there is no way for the sysadmin to remove them
- # permanently.
- rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
- rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
- rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
- rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
- rm -fr "${ED%/}"/etc/systemd/system/network-online.target.wants || die
- rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die
- rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
-
- local udevdir=/lib/udev
- use usrmerge && udevdir=/usr/lib/udev
-
- rm -r "${ED%/}${udevdir}/hwdb.d" || die
-
- if ! use usrmerge; then
- # Avoid breaking boot/reboot
- dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
- dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
- fi
-}
-
-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
-}
-
-pkg_postinst() {
- newusergroup() {
- enewgroup "$1"
- enewuser "$1" -1 -1 -1 "$1"
- }
-
- enewgroup input
- enewgroup kvm 78
- enewgroup render
- enewgroup systemd-journal
- newusergroup systemd-bus-proxy
- newusergroup systemd-coredump
- newusergroup systemd-journal-gateway
- newusergroup systemd-journal-remote
- newusergroup systemd-journal-upload
- newusergroup systemd-network
- newusergroup systemd-resolve
- newusergroup systemd-timesync
-
- 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 [[ ${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-237-r3.ebuild b/sys-apps/systemd/systemd-237-r3.ebuild
deleted file mode 100644
index d0254ee71dbe..000000000000
--- a/sys-apps/systemd/systemd-237-r3.ebuild
+++ /dev/null
@@ -1,442 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://github.com/systemd/systemd.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}/${P}.tar.gz
- https://dev.gentoo.org/~floppym/dist/${P}-patches-0.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
-fi
-
-PYTHON_COMPAT=( python{3_4,3_5,3_6} )
-
-inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
-
-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 cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +seccomp selinux ssl +sysv-utils test usrmerge 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-1.6:0= )
- curl? ( net-misc/curl: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=
- ssl? ( >=net-libs/gnutls-3.1.4:0= )
- )
- idn? (
- libidn2? ( net-dns/libidn2 )
- !libidn2? ( net-dns/libidn )
- )
- 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? ( virtual/pam:=[${MULTILIB_USEDEP}] )
- pcre? ( dev-libs/libpcre2 )
- qrcode? ( media-gfx/qrencode:0= )
- seccomp? ( >=sys-libs/libseccomp-2.3.1:0= )
- selinux? ( sys-libs/libselinux:0= )
- xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
- abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-
-# baselayout-2.2 has /run
-RDEPEND="${COMMON_DEPEND}
- >=sys-apps/baselayout-2.2
- selinux? ( sec-policy/selinux-base-policy[systemd] )
- sysv-utils? ( !sys-apps/sysvinit )
- !sysv-utils? ( sys-apps/sysvinit )
- !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 )"
-
-# Newer linux-headers needed by ia64, bug #480218
-DEPEND="${COMMON_DEPEND}
- app-arch/xz-utils:0
- dev-util/gperf
- >=dev-util/intltool-0.50
- >=sys-apps/coreutils-8.16
- >=sys-kernel/linux-headers-${MINKV}
- virtual/pkgconfig
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
- 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}]')
-"
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != buildonly ]]; then
- 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() {
- local PATCHES=(
- "${FILESDIR}/237-0001-networkctl-display-type.patch"
- "${FILESDIR}/238-libmount-include.patch"
- )
-
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
-
- if ! use vanilla; then
- PATCHES+=(
- "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
- "${FILESDIR}/gentoo-systemd-user-pam.patch"
- "${FILESDIR}/gentoo-uucp-group-r1.patch"
- "${FILESDIR}/gentoo-generator-path.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"
- -Dpamlibdir="$(getpam_mod_dir)"
- # avoid bash-completion dep
- -Dbashcompletiondir="$(get_bashcompdir)"
- # make sure we get /bin:/sbin in PATH
- -Dsplit-usr=$(usex usrmerge false true)
- -Drootprefix="$(usex usrmerge "${EPREFIX}/usr" "${EPREFIX:-/}")"
- -Dsysvinit-path=
- -Dsysvrcnd-path=
- # Avoid infinite exec recursion, bug 642724
- -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
- # no deps
- -Defi=$(meson_multilib)
- -Dima=true
- # 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)
- -Delfutils=$(meson_multilib_native_use elfutils)
- -Dgcrypt=$(meson_use gcrypt)
- -Dgnu-efi=$(meson_multilib_native_use gnuefi)
- -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
- -Dmicrohttpd=$(meson_multilib_native_use http)
- $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
- -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)
- #-Dtests=$(meson_multilib_native_use test)
- -Ddbus=$(meson_multilib_native_use test)
- -Dxkbcommon=$(meson_multilib_native_use xkb)
- # hardcode a few paths to spare some deps
- -Dkill-path=/bin/kill
- -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
-
- # 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)
- )
-
- if multilib_is_native_abi && use idn; then
- myconf+=(
- -Dlibidn2=$(usex libidn2 true false)
- -Dlibidn=$(usex libidn2 false true)
- )
- else
- myconf+=(
- -Dlibidn2=false
- -Dlibidn=false
- )
- fi
-
- meson_src_configure "${myconf[@]}"
-}
-
-multilib_src_compile() {
- eninja
-}
-
-multilib_src_test() {
- eninja test
-}
-
-multilib_src_install() {
- DESTDIR="${D}" eninja install
-}
-
-multilib_src_install_all() {
- # meson doesn't know about docdir
- mv "${ED%/}"/usr/share/doc/{systemd,${PF}} || die
-
- einstalldocs
- dodoc "${FILESDIR}"/nsswitch.conf
-
- if use sysv-utils; then
- local app
- for app in halt poweroff reboot runlevel shutdown telinit; do
- dosym ../bin/systemctl /sbin/${app}
- done
- dosym ../lib/systemd/systemd /sbin/init
- else
- # we just keep sysvinit tools, so no need for the mans
- rm "${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
- || die
- rm "${ED%/}"/usr/share/man/man1/init.1 || die
- fi
-
- # Preserve empty dirs in /etc & /var, bug #437008
- keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
- keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
- keepdir /etc/udev/{hwdb.d,rules.d}
- keepdir /var/log/journal/remote
-
- # Symlink /etc/sysctl.conf for easy migration.
- dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
-
- # If we install these symlinks, there is no way for the sysadmin to remove them
- # permanently.
- rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
- rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
- rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
- rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
- rm -fr "${ED%/}"/etc/systemd/system/network-online.target.wants || die
- rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die
- rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
-
- local udevdir=/lib/udev
- use usrmerge && udevdir=/usr/lib/udev
-
- rm -r "${ED%/}${udevdir}/hwdb.d" || die
-
- if ! use usrmerge; then
- # Avoid breaking boot/reboot
- dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
- dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
- fi
-}
-
-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
-}
-
-pkg_postinst() {
- newusergroup() {
- enewgroup "$1"
- enewuser "$1" -1 -1 -1 "$1"
- }
-
- enewgroup input
- enewgroup kvm 78
- enewgroup render
- enewgroup systemd-journal
- newusergroup systemd-bus-proxy
- newusergroup systemd-coredump
- newusergroup systemd-journal-gateway
- newusergroup systemd-journal-remote
- newusergroup systemd-journal-upload
- newusergroup systemd-network
- newusergroup systemd-resolve
- newusergroup systemd-timesync
-
- 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 [[ ${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-238-r1.ebuild b/sys-apps/systemd/systemd-238-r1.ebuild
deleted file mode 100644
index 2903bb82e515..000000000000
--- a/sys-apps/systemd/systemd-238-r1.ebuild
+++ /dev/null
@@ -1,437 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://github.com/systemd/systemd.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}/${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~x86"
-fi
-
-PYTHON_COMPAT=( python{3_4,3_5,3_6} )
-
-inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
-
-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 cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +seccomp selinux ssl +sysv-utils test usrmerge 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-1.6:0= )
- curl? ( net-misc/curl: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=
- ssl? ( >=net-libs/gnutls-3.1.4:0= )
- )
- idn? (
- libidn2? ( net-dns/libidn2 )
- !libidn2? ( net-dns/libidn )
- )
- 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? ( virtual/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= )
- abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-
-# baselayout-2.2 has /run
-RDEPEND="${COMMON_DEPEND}
- >=sys-apps/baselayout-2.2
- selinux? ( sec-policy/selinux-base-policy[systemd] )
- sysv-utils? ( !sys-apps/sysvinit )
- !sysv-utils? ( sys-apps/sysvinit )
- !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 )"
-
-# Newer linux-headers needed by ia64, bug #480218
-DEPEND="${COMMON_DEPEND}
- app-arch/xz-utils:0
- dev-util/gperf
- >=dev-util/intltool-0.50
- >=sys-apps/coreutils-8.16
- >=sys-kernel/linux-headers-${MINKV}
- virtual/pkgconfig
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
- 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}]')
-"
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != buildonly ]]; then
- 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() {
- local PATCHES=(
- "${FILESDIR}/238-0001-sd-bus-do-not-try-to-close-already-closed-fd-8392.patch"
- "${FILESDIR}/238-0002-core-do-not-free-heap-allocated-strings-8391.patch"
- "${FILESDIR}/238-libmount-include.patch"
- )
-
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
-
- if ! use vanilla; then
- PATCHES+=(
- "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
- "${FILESDIR}/gentoo-systemd-user-pam.patch"
- "${FILESDIR}/gentoo-uucp-group-r1.patch"
- "${FILESDIR}/gentoo-generator-path.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"
- -Dpamlibdir="$(getpam_mod_dir)"
- # avoid bash-completion dep
- -Dbashcompletiondir="$(get_bashcompdir)"
- # make sure we get /bin:/sbin in PATH
- -Dsplit-usr=$(usex usrmerge false true)
- -Drootprefix="$(usex usrmerge "${EPREFIX}/usr" "${EPREFIX:-/}")"
- -Dsysvinit-path=
- -Dsysvrcnd-path=
- # Avoid infinite exec recursion, bug 642724
- -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
- # no deps
- -Defi=$(meson_multilib)
- -Dima=true
- # 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)
- -Delfutils=$(meson_multilib_native_use elfutils)
- -Dgcrypt=$(meson_use gcrypt)
- -Dgnu-efi=$(meson_multilib_native_use gnuefi)
- -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
- -Dmicrohttpd=$(meson_multilib_native_use http)
- $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
- -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)
- #-Dtests=$(meson_multilib_native_use test)
- -Ddbus=$(meson_multilib_native_use test)
- -Dxkbcommon=$(meson_multilib_native_use xkb)
- # hardcode a few paths to spare some deps
- -Dkill-path=/bin/kill
- -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
-
- # 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)
- )
-
- if multilib_is_native_abi && use idn; then
- myconf+=(
- -Dlibidn2=$(usex libidn2 true false)
- -Dlibidn=$(usex libidn2 false true)
- )
- else
- myconf+=(
- -Dlibidn2=false
- -Dlibidn=false
- )
- fi
-
- meson_src_configure "${myconf[@]}"
-}
-
-multilib_src_compile() {
- eninja
-}
-
-multilib_src_test() {
- eninja test
-}
-
-multilib_src_install() {
- DESTDIR="${D}" eninja install
-}
-
-multilib_src_install_all() {
- # meson doesn't know about docdir
- mv "${ED%/}"/usr/share/doc/{systemd,${PF}} || die
-
- einstalldocs
- dodoc "${FILESDIR}"/nsswitch.conf
-
- if ! use sysv-utils; then
- local rootprefix=$(usex usrmerge /usr '')
- rm "${ED%/}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
- rmdir "${ED%/}${rootprefix}"/sbin || 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
-
- # Preserve empty dirs in /etc & /var, bug #437008
- keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
- keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
- keepdir /etc/udev/{hwdb.d,rules.d}
- keepdir /var/log/journal/remote
-
- # Symlink /etc/sysctl.conf for easy migration.
- dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
-
- # If we install these symlinks, there is no way for the sysadmin to remove them
- # permanently.
- rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
- rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
- rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
- rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
- rm -fr "${ED%/}"/etc/systemd/system/network-online.target.wants || die
- rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die
- rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
-
- local udevdir=/lib/udev
- use usrmerge && udevdir=/usr/lib/udev
-
- rm -r "${ED%/}${udevdir}/hwdb.d" || die
-
- if ! use usrmerge; then
- # Avoid breaking boot/reboot
- dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
- dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
- fi
-}
-
-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
-}
-
-pkg_postinst() {
- newusergroup() {
- enewgroup "$1"
- enewuser "$1" -1 -1 -1 "$1"
- }
-
- enewgroup input
- enewgroup kvm 78
- enewgroup render
- enewgroup systemd-journal
- newusergroup systemd-bus-proxy
- newusergroup systemd-coredump
- newusergroup systemd-journal-gateway
- newusergroup systemd-journal-remote
- newusergroup systemd-journal-upload
- newusergroup systemd-network
- newusergroup systemd-resolve
- newusergroup systemd-timesync
-
- 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 [[ ${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
-}