Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd/files/, sys-apps/systemd/
Date: Tue, 30 Oct 2018 14:34:49
Message-Id: 1540910009.e815d3e67234fd9672992bfb3bcfea2588164d4c.floppym@gentoo
1 commit: e815d3e67234fd9672992bfb3bcfea2588164d4c
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 30 14:32:29 2018 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 30 14:33:29 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e815d3e6
7
8 sys-apps/systemd: remove old
9
10 Bug: https://bugs.gentoo.org/669664
11 Package-Manager: Portage-2.3.51_p2, Repoman-2.3.11_p27
12 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
13
14 sys-apps/systemd/Manifest | 5 -
15 sys-apps/systemd/files/238-initctl.patch | 46 ---
16 sys-apps/systemd/files/238-libmount-include.patch | 72 ----
17 sys-apps/systemd/files/238-nspawn-wait.patch | 83 ----
18 sys-apps/systemd/files/238-sparc-raw-clone.patch | 42 --
19 .../systemd/files/238-timesync-connection.patch | 49 ---
20 sys-apps/systemd/systemd-236-r5.ebuild | 437 --------------------
21 sys-apps/systemd/systemd-238-r7.ebuild | 440 --------------------
22 sys-apps/systemd/systemd-239-r1.ebuild | 448 ---------------------
23 sys-apps/systemd/systemd-239.ebuild | 446 --------------------
24 10 files changed, 2068 deletions(-)
25
26 diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest
27 index 151c9029776..fa8f964949e 100644
28 --- a/sys-apps/systemd/Manifest
29 +++ b/sys-apps/systemd/Manifest
30 @@ -1,7 +1,2 @@
31 -DIST systemd-236-patches-2.tar.gz 54737 BLAKE2B bce5f9e234c975a2b6e474ca2a0c2c82e704f02cf19885134dddc5edbd0b7bfb3773d737f88f78ba2ab81093dfceeb44d76ecda99cf2b916072dcdfa84720c19 SHA512 b74ab6944135c938b2d0d2a1dd40ac4cc4ff26d072603d6bfbe4529d808b2e481eb910155895bce14607842ad6d30751aded51654a53f76278becbb5e317b875
32 -DIST systemd-236.tar.gz 6759035 BLAKE2B 0fc26bd67fb6cc3b0565c763fc26e38186c4b05c3d38652b73a2189dfbfb46382dba239f7f6f889eec57ad1d8f69d4098745c8f4ca16a707aa23b7771f2328f3 SHA512 1a9672960e03e05c09e41fb8cfe9b0f25e867fd43f37f8371515ddddfdbd4270afd746a6da733f6d1d3b2cc43db1ecc7a9f2245f2dac2ec233db74e9e70e4f6d
33 -DIST systemd-238-patches-1.tar.gz 47512 BLAKE2B 9edf8835ec7bba43bd00b1481b23bc5a4148030724633a8bfe1e82ec48b79699d4822b0bc5ea3a979b404e706efa9c0eae8e0460d76658ba2e901c4853da0c04 SHA512 809d8a3a9a023217b509b738e0d341d060f1343df6159e5acfcededfb452986de140ddf4b879a5157fba1a5646d00db8b6537aba8358c48f75fd6527f881a14c
34 -DIST systemd-238.tar.gz 6954022 BLAKE2B 9b5cc36a7234c0d037a2656ee1e5ed54186a394b8be41771ebc29c903d3efcecf7f13f004a6d1695c022923bd0d540a243e897852f07e810f73fd3163f688dde SHA512 c0f272b022308d3bd94679184e102a8dc85de55310bda205a458ea33c77c7733e5c8c8e5b15f786ba3e0ce59e7c6a9bf0d5a0950517c6b91e0f345950129b9c8
35 -DIST systemd-239-patches-0.tar.gz 14007 BLAKE2B a1653ac6cb46347fa1e1a4a81a7003af0e565ac2ba43e1aaed9df87d7e4bd13cdcf26ffc9527f46defa226d7d11b03fbc6b018f0734a6654a0f4bf88bf4ef6e7 SHA512 a640a446db153523a2ca97b811e20bc42c8273d2c494ebd8a6c5cd33718c714e37544533749cad57e887c17635cbfca01b86b52e9f5a12878ef70f2e95fc7485
36 DIST systemd-239-patches-1.tar.gz 20639 BLAKE2B 9b03367becdef20d16056cdbbeaaefd9f10bf6c56528ad1a738684ab08d99a464411c23aea32d47307b0399f092107069d09ad42fb07217f8eca520cc4010b84 SHA512 757c7fc8f60ccf99d2803128a8c4d8b924093b150384569c5ffb3bc39f06728e99b18e2f77ff0f1c16bbd45bc75cbb0f385dac0135443d70c7dcd9cc1e84a490
37 DIST systemd-239.tar.gz 7157293 BLAKE2B 975f6215c8bb6662d6e161f637e1fece22930c0190b3c31a8fc4cb1a10600546a252704ac95590d9d14e495fcd06082a590e6d755e36603a41b3a396d579d8b0 SHA512 fd44590dfd148504c5ed1e67521efce50d84b627b7fc77015fa95dfa76d7a42297c56cc89eff40181809732024b16d48f2a87038cf435e0c63bc2b95ecd86b0f
38
39 diff --git a/sys-apps/systemd/files/238-initctl.patch b/sys-apps/systemd/files/238-initctl.patch
40 deleted file mode 100644
41 index 39991697743..00000000000
42 --- a/sys-apps/systemd/files/238-initctl.patch
43 +++ /dev/null
44 @@ -1,46 +0,0 @@
45 -From 4d8c7c1b3a5feebca948a3b8663f5be887b57731 Mon Sep 17 00:00:00 2001
46 -From: Mike Gilbert <floppym@g.o>
47 -Date: Fri, 30 Mar 2018 11:00:17 -0400
48 -Subject: [PATCH] units: initctl: move the fifo to /run/initctl to match
49 - sysvinit
50 -
51 -The fifo location was moved in sysvinit-2.89.
52 -
53 -http://git.savannah.nongnu.org/cgit/sysvinit.git/commit/?id=80dbcf3de3c1b83aeaa713a8fe5b8d35d8649af2
54 ----
55 - units/systemd-initctl.service.in | 2 +-
56 - units/systemd-initctl.socket | 4 ++--
57 - 2 files changed, 3 insertions(+), 3 deletions(-)
58 -
59 -diff --git a/units/systemd-initctl.service.in b/units/systemd-initctl.service.in
60 -index 6cfed3da11f..2b4b957dce3 100644
61 ---- a/units/systemd-initctl.service.in
62 -+++ b/units/systemd-initctl.service.in
63 -@@ -8,7 +8,7 @@
64 - # (at your option) any later version.
65 -
66 - [Unit]
67 --Description=/dev/initctl Compatibility Daemon
68 -+Description=initctl Compatibility Daemon
69 - Documentation=man:systemd-initctl.service(8)
70 - DefaultDependencies=no
71 -
72 -diff --git a/units/systemd-initctl.socket b/units/systemd-initctl.socket
73 -index 61f877ba7d2..9d975799081 100644
74 ---- a/units/systemd-initctl.socket
75 -+++ b/units/systemd-initctl.socket
76 -@@ -8,12 +8,12 @@
77 - # (at your option) any later version.
78 -
79 - [Unit]
80 --Description=/dev/initctl Compatibility Named Pipe
81 -+Description=initctl Compatibility Named Pipe
82 - Documentation=man:systemd-initctl.service(8)
83 - DefaultDependencies=no
84 - Before=sockets.target
85 -
86 - [Socket]
87 --ListenFIFO=/run/systemd/initctl/fifo
88 -+ListenFIFO=/run/initctl
89 - Symlinks=/dev/initctl
90 - SocketMode=0600
91
92 diff --git a/sys-apps/systemd/files/238-libmount-include.patch b/sys-apps/systemd/files/238-libmount-include.patch
93 deleted file mode 100644
94 index 6a02dff65e4..00000000000
95 --- a/sys-apps/systemd/files/238-libmount-include.patch
96 +++ /dev/null
97 @@ -1,72 +0,0 @@
98 -From 227b8a762fea1458547be2cdf0e6e4aac0079730 Mon Sep 17 00:00:00 2001
99 -From: Michael Olbrich <m.olbrich@×××××××××××.de>
100 -Date: Mon, 26 Mar 2018 17:34:53 +0200
101 -Subject: [PATCH] core: don't include libmount.h in a header file (#8580)
102 -
103 -linux/fs.h sys/mount.h, libmount.h and missing.h all include MS_*
104 -definitions.
105 -
106 -To avoid problems, only one of linux/fs.h, sys/mount.h and libmount.h
107 -should be included. And missing.h must be included last.
108 -
109 -Without this, building systemd may fail with:
110 -
111 -In file included from [...]/libmount/libmount.h:31:0,
112 - from ../systemd-238/src/core/manager.h:23,
113 - from ../systemd-238/src/core/emergency-action.h:37,
114 - from ../systemd-238/src/core/unit.h:34,
115 - from ../systemd-238/src/core/dbus-timer.h:25,
116 - from ../systemd-238/src/core/timer.c:26:
117 -[...]/sys/mount.h:57:2: error: expected identifier before numeric constant
118 ----
119 - src/core/dbus-execute.c | 1 +
120 - src/core/manager.h | 3 ++-
121 - src/core/mount.c | 2 ++
122 - 3 files changed, 5 insertions(+), 1 deletion(-)
123 -
124 -diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
125 -index 7344623ebf6..c342093bca4 100644
126 ---- a/src/core/dbus-execute.c
127 -+++ b/src/core/dbus-execute.c
128 -@@ -18,6 +18,7 @@
129 - along with systemd; If not, see <http://www.gnu.org/licenses/>.
130 - ***/
131 -
132 -+#include <sys/mount.h>
133 - #include <sys/prctl.h>
134 - #include <stdio_ext.h>
135 -
136 -diff --git a/src/core/manager.h b/src/core/manager.h
137 -index 28c5da225b1..e09e0cdf5e9 100644
138 ---- a/src/core/manager.h
139 -+++ b/src/core/manager.h
140 -@@ -20,7 +20,6 @@
141 - along with systemd; If not, see <http://www.gnu.org/licenses/>.
142 - ***/
143 -
144 --#include <libmount.h>
145 - #include <stdbool.h>
146 - #include <stdio.h>
147 -
148 -@@ -34,6 +33,8 @@
149 - #include "list.h"
150 - #include "ratelimit.h"
151 -
152 -+struct libmnt_monitor;
153 -+
154 - /* Enforce upper limit how many names we allow */
155 - #define MANAGER_MAX_NAMES 131072 /* 128K */
156 -
157 -diff --git a/src/core/mount.c b/src/core/mount.c
158 -index 0e755da5c02..0154ebda5d6 100644
159 ---- a/src/core/mount.c
160 -+++ b/src/core/mount.c
161 -@@ -23,6 +23,8 @@
162 - #include <stdio.h>
163 - #include <sys/epoll.h>
164 -
165 -+#include <libmount.h>
166 -+
167 - #include "sd-messages.h"
168 -
169 - #include "alloc-util.h"
170
171 diff --git a/sys-apps/systemd/files/238-nspawn-wait.patch b/sys-apps/systemd/files/238-nspawn-wait.patch
172 deleted file mode 100644
173 index a740e893345..00000000000
174 --- a/sys-apps/systemd/files/238-nspawn-wait.patch
175 +++ /dev/null
176 @@ -1,83 +0,0 @@
177 -From 7511655807e90aa33ea7b71991401a79ec36bb41 Mon Sep 17 00:00:00 2001
178 -From: Philip Sequeira <phsequei@×××××.com>
179 -Date: Thu, 5 Apr 2018 14:04:27 +0000
180 -Subject: [PATCH] nspawn: wait for network namespace creation before interface
181 - setup (#8633)
182 -
183 -Otherwise, network interfaces can be "moved" into the container's
184 -namespace while it's still the same as the host namespace, in which case
185 -e.g. host0 for a veth ends up on the host side instead of inside the
186 -container.
187 -
188 -Regression introduced in 0441378080489e4ab6704cd0a2d78cb1ceaca899.
189 -
190 -Fixes #8599.
191 ----
192 - src/nspawn/nspawn.c | 19 +++++++++++++++----
193 - 1 file changed, 15 insertions(+), 4 deletions(-)
194 -
195 -diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
196 -index 810f1247ea2..a5bc50c1f4c 100644
197 ---- a/src/nspawn/nspawn.c
198 -+++ b/src/nspawn/nspawn.c
199 -@@ -2329,6 +2329,9 @@ static int inner_child(
200 - r = unshare(CLONE_NEWNET);
201 - if (r < 0)
202 - return log_error_errno(errno, "Failed to unshare network namespace: %m");
203 -+
204 -+ /* Tell the parent that it can setup network interfaces. */
205 -+ (void) barrier_place(barrier); /* #3 */
206 - }
207 -
208 - r = mount_sysfs(NULL, arg_mount_settings);
209 -@@ -2337,7 +2340,7 @@ static int inner_child(
210 -
211 - /* Wait until we are cgroup-ified, so that we
212 - * can mount the right cgroup path writable */
213 -- if (!barrier_place_and_sync(barrier)) { /* #3 */
214 -+ if (!barrier_place_and_sync(barrier)) { /* #4 */
215 - log_error("Parent died too early");
216 - return -ESRCH;
217 - }
218 -@@ -2448,7 +2451,7 @@ static int inner_child(
219 - /* Let the parent know that we are ready and
220 - * wait until the parent is ready with the
221 - * setup, too... */
222 -- if (!barrier_place_and_sync(barrier)) { /* #4 */
223 -+ if (!barrier_place_and_sync(barrier)) { /* #5 */
224 - log_error("Parent died too early");
225 - return -ESRCH;
226 - }
227 -@@ -3533,6 +3536,14 @@ static int run(int master,
228 -
229 - if (arg_private_network) {
230 -
231 -+ if (!arg_network_namespace_path) {
232 -+ /* Wait until the child has unshared its network namespace. */
233 -+ if (!barrier_place_and_sync(&barrier)) { /* #3 */
234 -+ log_error("Child died too early");
235 -+ return -ESRCH;
236 -+ }
237 -+ }
238 -+
239 - r = move_network_interfaces(*pid, arg_network_interfaces);
240 - if (r < 0)
241 - return r;
242 -@@ -3656,7 +3667,7 @@ static int run(int master,
243 - * its setup (including cgroup-ification), and that
244 - * the child can now hand over control to the code to
245 - * run inside the container. */
246 -- (void) barrier_place(&barrier); /* #3 */
247 -+ (void) barrier_place(&barrier); /* #4 */
248 -
249 - /* Block SIGCHLD here, before notifying child.
250 - * process_pty() will handle it with the other signals. */
251 -@@ -3684,7 +3695,7 @@ static int run(int master,
252 - return r;
253 -
254 - /* Let the child know that we are ready and wait that the child is completely ready now. */
255 -- if (!barrier_place_and_sync(&barrier)) { /* #4 */
256 -+ if (!barrier_place_and_sync(&barrier)) { /* #5 */
257 - log_error("Child died too early.");
258 - return -ESRCH;
259 - }
260
261 diff --git a/sys-apps/systemd/files/238-sparc-raw-clone.patch b/sys-apps/systemd/files/238-sparc-raw-clone.patch
262 deleted file mode 100644
263 index 736a498e918..00000000000
264 --- a/sys-apps/systemd/files/238-sparc-raw-clone.patch
265 +++ /dev/null
266 @@ -1,42 +0,0 @@
267 -From e4aa2c34d526c108dd8fa37448b19bdb38de52c9 Mon Sep 17 00:00:00 2001
268 -From: Mike Gilbert <floppym@g.o>
269 -Date: Thu, 24 May 2018 10:48:55 -0400
270 -Subject: [PATCH] basic: fix raw_clone() on 32-bit sparc
271 -
272 -The clone syscall uses the same semantics as on 64-bit. The trap number
273 -for syscall entry is different.
274 -
275 -Bug: https://bugs.gentoo.org/656368
276 ----
277 - src/basic/raw-clone.h | 8 ++++++--
278 - 1 file changed, 6 insertions(+), 2 deletions(-)
279 -
280 -diff --git a/src/basic/raw-clone.h b/src/basic/raw-clone.h
281 -index d8a68663180..d35540903ab 100644
282 ---- a/src/basic/raw-clone.h
283 -+++ b/src/basic/raw-clone.h
284 -@@ -39,10 +39,10 @@ static inline pid_t raw_clone(unsigned long flags) {
285 - /* On s390/s390x and cris the order of the first and second arguments
286 - * of the raw clone() system call is reversed. */
287 - ret = (pid_t) syscall(__NR_clone, NULL, flags);
288 --#elif defined(__sparc__) && defined(__arch64__)
289 -+#elif defined(__sparc__)
290 - {
291 - /**
292 -- * sparc64 always returns the other process id in %o0, and
293 -+ * sparc always returns the other process id in %o0, and
294 - * a boolean flag whether this is the child or the parent in
295 - * %o1. Inline assembly is needed to get the flag returned
296 - * in %o1.
297 -@@ -52,7 +52,11 @@ static inline pid_t raw_clone(unsigned long flags) {
298 - asm volatile("mov %2, %%g1\n\t"
299 - "mov %3, %%o0\n\t"
300 - "mov 0 , %%o1\n\t"
301 -+#if defined(__arch64__)
302 - "t 0x6d\n\t"
303 -+#else
304 -+ "t 0x10\n\t"
305 -+#endif
306 - "mov %%o1, %0\n\t"
307 - "mov %%o0, %1" :
308 - "=r"(in_child), "=r"(child_pid) :
309
310 diff --git a/sys-apps/systemd/files/238-timesync-connection.patch b/sys-apps/systemd/files/238-timesync-connection.patch
311 deleted file mode 100644
312 index a48a88e9e68..00000000000
313 --- a/sys-apps/systemd/files/238-timesync-connection.patch
314 +++ /dev/null
315 @@ -1,49 +0,0 @@
316 -From 6d254dba01491b994115ecef8c4017fbe5451606 Mon Sep 17 00:00:00 2001
317 -From: Yu Watanabe <watanabe.yu+github@×××××.com>
318 -Date: Mon, 16 Apr 2018 12:24:36 +0900
319 -Subject: [PATCH] timesync: establish connection when network become online and
320 - the manager is not connected yet
321 -
322 -This also introduces `manager_is_connected()` helper function, which
323 -returns true when the manager is sending a request, resolving a server
324 -name, or in a poll interval.
325 -
326 -Follow-up for 3e85ec072180b6fbec82d715186985536859a29d.
327 -Fixes #8719.
328 ----
329 - src/timesync/timesyncd-manager.c | 10 ++++++++--
330 - 1 file changed, 8 insertions(+), 2 deletions(-)
331 -
332 -diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
333 -index cfdc43b0ff2..0c5d3e2d6f7 100644
334 ---- a/src/timesync/timesyncd-manager.c
335 -+++ b/src/timesync/timesyncd-manager.c
336 -@@ -1036,6 +1036,12 @@ static int manager_network_read_link_servers(Manager *m) {
337 - return r;
338 - }
339 -
340 -+static bool manager_is_connected(Manager *m) {
341 -+ /* Return true when the manager is sending a request, resolving a server name, or
342 -+ * in a poll interval. */
343 -+ return m->server_socket >= 0 || m->resolve_query || m->event_timer;
344 -+}
345 -+
346 - static int manager_network_event_handler(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
347 - Manager *m = userdata;
348 - bool changed, connected, online;
349 -@@ -1051,13 +1057,13 @@ static int manager_network_event_handler(sd_event_source *s, int fd, uint32_t re
350 - online = network_is_online();
351 -
352 - /* check if the client is currently connected */
353 -- connected = m->server_socket >= 0 || m->resolve_query || m->exhausted_servers;
354 -+ connected = manager_is_connected(m);
355 -
356 - if (connected && !online) {
357 - log_info("No network connectivity, watching for changes.");
358 - manager_disconnect(m);
359 -
360 -- } else if (!connected && online && changed) {
361 -+ } else if ((!connected || changed) && online) {
362 - log_info("Network configuration changed, trying to establish connection.");
363 -
364 - if (m->current_server_address)
365
366 diff --git a/sys-apps/systemd/systemd-236-r5.ebuild b/sys-apps/systemd/systemd-236-r5.ebuild
367 deleted file mode 100644
368 index 9c9f8dd71f8..00000000000
369 --- a/sys-apps/systemd/systemd-236-r5.ebuild
370 +++ /dev/null
371 @@ -1,437 +0,0 @@
372 -# Copyright 1999-2018 Gentoo Foundation
373 -# Distributed under the terms of the GNU General Public License v2
374 -
375 -EAPI=6
376 -
377 -if [[ ${PV} == 9999 ]]; then
378 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
379 - inherit git-r3
380 -else
381 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz
382 - https://dev.gentoo.org/~floppym/dist/${P}-patches-2.tar.gz"
383 - KEYWORDS="alpha amd64 arm arm64 ia64 ppc ppc64 x86"
384 -fi
385 -
386 -PYTHON_COMPAT=( python{3_4,3_5,3_6} )
387 -
388 -inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
389 -
390 -DESCRIPTION="System and service manager for Linux"
391 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
392 -
393 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
394 -SLOT="0/2"
395 -IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam policykit qrcode +seccomp selinux +split-usr ssl +sysv-utils test vanilla xkb"
396 -
397 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
398 -RESTRICT="!test? ( test )"
399 -
400 -MINKV="3.11"
401 -
402 -COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
403 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
404 - !<sys-libs/glibc-2.16
405 - acl? ( sys-apps/acl:0= )
406 - apparmor? ( sys-libs/libapparmor:0= )
407 - audit? ( >=sys-process/audit-2:0= )
408 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
409 - curl? ( net-misc/curl:0= )
410 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
411 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
412 - http? (
413 - >=net-libs/libmicrohttpd-0.9.33:0=
414 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
415 - )
416 - idn? (
417 - libidn2? ( net-dns/libidn2 )
418 - !libidn2? ( net-dns/libidn )
419 - )
420 - importd? (
421 - app-arch/bzip2:0=
422 - sys-libs/zlib:0=
423 - )
424 - kmod? ( >=sys-apps/kmod-15:0= )
425 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
426 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
427 - nat? ( net-firewall/iptables:0= )
428 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
429 - qrcode? ( media-gfx/qrencode:0= )
430 - seccomp? ( >=sys-libs/libseccomp-2.3.1:0= )
431 - selinux? ( sys-libs/libselinux:0= )
432 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
433 -
434 -# baselayout-2.2 has /run
435 -RDEPEND="${COMMON_DEPEND}
436 - >=sys-apps/baselayout-2.2
437 - selinux? ( sec-policy/selinux-base-policy[systemd] )
438 - sysv-utils? ( !sys-apps/sysvinit )
439 - !sysv-utils? ( sys-apps/sysvinit )
440 - !build? ( || (
441 - sys-apps/util-linux[kill(-)]
442 - sys-process/procps[kill(+)]
443 - sys-apps/coreutils[kill(-)]
444 - ) )
445 - !sys-auth/nss-myhostname
446 - !<sys-kernel/dracut-044
447 - !sys-fs/eudev
448 - !sys-fs/udev"
449 -
450 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
451 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
452 - >=sys-apps/hwids-20150417[udev]
453 - >=sys-fs/udev-init-scripts-25
454 - policykit? ( sys-auth/polkit )
455 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
456 -
457 -# Newer linux-headers needed by ia64, bug #480218
458 -DEPEND="${COMMON_DEPEND}
459 - app-arch/xz-utils:0
460 - dev-util/gperf
461 - >=dev-util/intltool-0.50
462 - >=sys-apps/coreutils-8.16
463 - >=sys-kernel/linux-headers-${MINKV}
464 - virtual/pkgconfig
465 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
466 - test? ( sys-apps/dbus )
467 - app-text/docbook-xml-dtd:4.2
468 - app-text/docbook-xml-dtd:4.5
469 - app-text/docbook-xsl-stylesheets
470 - dev-libs/libxslt:0
471 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
472 -"
473 -
474 -pkg_pretend() {
475 - if [[ ${MERGE_TYPE} != buildonly ]]; then
476 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
477 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
478 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
479 - ~TIMERFD ~TMPFS_XATTR ~UNIX
480 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
481 - ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
482 - ~!SYSFS_DEPRECATED_V2"
483 -
484 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
485 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
486 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
487 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
488 - kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
489 -
490 - if linux_config_exists; then
491 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
492 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
493 - ewarn "It's recommended to set an empty value to the following kernel config option:"
494 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
495 - fi
496 - if linux_chkconfig_present X86; then
497 - CONFIG_CHECK+=" ~DMIID"
498 - fi
499 - fi
500 -
501 - if kernel_is -lt ${MINKV//./ }; then
502 - ewarn "Kernel version at least ${MINKV} required"
503 - fi
504 -
505 - check_extra_config
506 - fi
507 -}
508 -
509 -pkg_setup() {
510 - :
511 -}
512 -
513 -src_unpack() {
514 - default
515 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
516 -}
517 -
518 -src_prepare() {
519 - local PATCHES=(
520 - "${FILESDIR}/238-libmount-include.patch"
521 - )
522 -
523 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
524 -
525 - if ! use vanilla; then
526 - PATCHES+=(
527 - "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
528 - "${FILESDIR}/gentoo-systemd-user-pam.patch"
529 - "${FILESDIR}/gentoo-uucp-group-r1.patch"
530 - "${FILESDIR}/gentoo-generator-path.patch"
531 - )
532 - fi
533 -
534 - default
535 -}
536 -
537 -src_configure() {
538 - # Prevent conflicts with i686 cross toolchain, bug 559726
539 - tc-export AR CC NM OBJCOPY RANLIB
540 -
541 - python_setup
542 -
543 - multilib-minimal_src_configure
544 -}
545 -
546 -meson_use() {
547 - usex "$1" true false
548 -}
549 -
550 -meson_multilib() {
551 - if multilib_is_native_abi; then
552 - echo true
553 - else
554 - echo false
555 - fi
556 -}
557 -
558 -meson_multilib_native_use() {
559 - if multilib_is_native_abi && use "$1"; then
560 - echo true
561 - else
562 - echo false
563 - fi
564 -}
565 -
566 -multilib_src_configure() {
567 - local myconf=(
568 - --localstatedir="${EPREFIX}/var"
569 - -Dpamlibdir="$(getpam_mod_dir)"
570 - # avoid bash-completion dep
571 - -Dbashcompletiondir="$(get_bashcompdir)"
572 - # make sure we get /bin:/sbin in PATH
573 - -Dsplit-usr=$(usex split-usr true false)
574 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
575 - -Dsysvinit-path=
576 - -Dsysvrcnd-path=
577 - # Avoid infinite exec recursion, bug 642724
578 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
579 - # no deps
580 - -Defi=$(meson_multilib)
581 - -Dima=true
582 - # Optional components/dependencies
583 - -Dacl=$(meson_multilib_native_use acl)
584 - -Dapparmor=$(meson_multilib_native_use apparmor)
585 - -Daudit=$(meson_multilib_native_use audit)
586 - -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
587 - -Dlibcurl=$(meson_multilib_native_use curl)
588 - -Delfutils=$(meson_multilib_native_use elfutils)
589 - -Dgcrypt=$(meson_use gcrypt)
590 - -Dgnu-efi=$(meson_multilib_native_use gnuefi)
591 - -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
592 - -Dmicrohttpd=$(meson_multilib_native_use http)
593 - $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
594 - -Dimportd=$(meson_multilib_native_use importd)
595 - -Dbzip2=$(meson_multilib_native_use importd)
596 - -Dzlib=$(meson_multilib_native_use importd)
597 - -Dkmod=$(meson_multilib_native_use kmod)
598 - -Dlz4=$(meson_use lz4)
599 - -Dxz=$(meson_use lzma)
600 - -Dlibiptc=$(meson_multilib_native_use nat)
601 - -Dpam=$(meson_use pam)
602 - -Dpolkit=$(meson_multilib_native_use policykit)
603 - -Dqrencode=$(meson_multilib_native_use qrcode)
604 - -Dseccomp=$(meson_multilib_native_use seccomp)
605 - -Dselinux=$(meson_multilib_native_use selinux)
606 - #-Dtests=$(meson_multilib_native_use test)
607 - -Ddbus=$(meson_multilib_native_use test)
608 - -Dxkbcommon=$(meson_multilib_native_use xkb)
609 - # hardcode a few paths to spare some deps
610 - -Dkill-path=/bin/kill
611 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
612 - # Breaks screen, tmux, etc.
613 - -Ddefault-kill-user-processes=false
614 -
615 - # multilib options
616 - -Dbacklight=$(meson_multilib)
617 - -Dbinfmt=$(meson_multilib)
618 - -Dcoredump=$(meson_multilib)
619 - -Denvironment-d=$(meson_multilib)
620 - -Dfirstboot=$(meson_multilib)
621 - -Dhibernate=$(meson_multilib)
622 - -Dhostnamed=$(meson_multilib)
623 - -Dhwdb=$(meson_multilib)
624 - -Dldconfig=$(meson_multilib)
625 - -Dlocaled=$(meson_multilib)
626 - -Dman=$(meson_multilib)
627 - -Dnetworkd=$(meson_multilib)
628 - -Dquotacheck=$(meson_multilib)
629 - -Drandomseed=$(meson_multilib)
630 - -Drfkill=$(meson_multilib)
631 - -Dsysusers=$(meson_multilib)
632 - -Dtimedated=$(meson_multilib)
633 - -Dtimesyncd=$(meson_multilib)
634 - -Dtmpfiles=$(meson_multilib)
635 - -Dvconsole=$(meson_multilib)
636 - )
637 -
638 - if multilib_is_native_abi && use idn; then
639 - myconf+=(
640 - -Dlibidn2=$(usex libidn2 true false)
641 - -Dlibidn=$(usex libidn2 false true)
642 - )
643 - else
644 - myconf+=(
645 - -Dlibidn2=false
646 - -Dlibidn=false
647 - )
648 - fi
649 -
650 - meson_src_configure "${myconf[@]}"
651 -}
652 -
653 -multilib_src_compile() {
654 - eninja
655 -}
656 -
657 -multilib_src_test() {
658 - eninja test
659 -}
660 -
661 -multilib_src_install() {
662 - DESTDIR="${D}" eninja install
663 -}
664 -
665 -multilib_src_install_all() {
666 - # meson doesn't know about docdir
667 - mv "${ED%/}"/usr/share/doc/{systemd,${PF}} || die
668 -
669 - einstalldocs
670 - dodoc "${FILESDIR}"/nsswitch.conf
671 -
672 - if use sysv-utils; then
673 - local app
674 - for app in halt poweroff reboot runlevel shutdown telinit; do
675 - dosym ../bin/systemctl /sbin/${app}
676 - done
677 - dosym ../lib/systemd/systemd /sbin/init
678 - else
679 - # we just keep sysvinit tools, so no need for the mans
680 - rm "${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
681 - || die
682 - rm "${ED%/}"/usr/share/man/man1/init.1 || die
683 - fi
684 -
685 - # Preserve empty dirs in /etc & /var, bug #437008
686 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
687 - keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
688 - keepdir /etc/udev/{hwdb.d,rules.d}
689 - keepdir /var/log/journal/remote
690 -
691 - # Symlink /etc/sysctl.conf for easy migration.
692 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
693 -
694 - # If we install these symlinks, there is no way for the sysadmin to remove them
695 - # permanently.
696 - rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
697 - rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
698 - rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
699 - rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
700 - rm -fr "${ED%/}"/etc/systemd/system/network-online.target.wants || die
701 - rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die
702 - rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
703 -
704 - local udevdir=/lib/udev
705 - use split-usr || udevdir=/usr/lib/udev
706 -
707 - rm -r "${ED%/}${udevdir}/hwdb.d" || die
708 -
709 - if use split-usr; then
710 - # Avoid breaking boot/reboot
711 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
712 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
713 - fi
714 -}
715 -
716 -migrate_locale() {
717 - local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
718 - local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
719 - local locale_conf="${EROOT%/}/etc/locale.conf"
720 -
721 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
722 - # If locale.conf does not exist...
723 - if [[ -e ${envd_locale} ]]; then
724 - # ...either copy env.d/??locale if there's one
725 - ebegin "Moving ${envd_locale} to ${locale_conf}"
726 - mv "${envd_locale}" "${locale_conf}"
727 - eend ${?} || FAIL=1
728 - else
729 - # ...or create a dummy default
730 - ebegin "Creating ${locale_conf}"
731 - cat > "${locale_conf}" <<-EOF
732 - # This file has been created by the sys-apps/systemd ebuild.
733 - # See locale.conf(5) and localectl(1).
734 -
735 - # LANG=${LANG}
736 - EOF
737 - eend ${?} || FAIL=1
738 - fi
739 - fi
740 -
741 - if [[ ! -L ${envd_locale} ]]; then
742 - # now, if env.d/??locale is not a symlink (to locale.conf)...
743 - if [[ -e ${envd_locale} ]]; then
744 - # ...warn the user that he has duplicate locale settings
745 - ewarn
746 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
747 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
748 - ewarn "and create the symlink with the following command:"
749 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
750 - ewarn
751 - else
752 - # ...or just create the symlink if there's nothing here
753 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
754 - ln -n -s ../locale.conf "${envd_locale_def}"
755 - eend ${?} || FAIL=1
756 - fi
757 - fi
758 -}
759 -
760 -pkg_postinst() {
761 - newusergroup() {
762 - enewgroup "$1"
763 - enewuser "$1" -1 -1 -1 "$1"
764 - }
765 -
766 - enewgroup input
767 - enewgroup kvm 78
768 - enewgroup render
769 - enewgroup systemd-journal
770 - newusergroup systemd-bus-proxy
771 - newusergroup systemd-coredump
772 - newusergroup systemd-journal-gateway
773 - newusergroup systemd-journal-remote
774 - newusergroup systemd-journal-upload
775 - newusergroup systemd-network
776 - newusergroup systemd-resolve
777 - newusergroup systemd-timesync
778 -
779 - systemd_update_catalog
780 -
781 - # Keep this here in case the database format changes so it gets updated
782 - # when required. Despite that this file is owned by sys-apps/hwids.
783 - if has_version "sys-apps/hwids[udev]"; then
784 - udevadm hwdb --update --root="${EROOT%/}"
785 - fi
786 -
787 - udev_reload || FAIL=1
788 -
789 - # Bug 465468, make sure locales are respect, and ensure consistency
790 - # between OpenRC & systemd
791 - migrate_locale
792 -
793 - systemd_reenable systemd-networkd.service systemd-resolved.service
794 -
795 - if [[ ${FAIL} ]]; then
796 - eerror "One of the postinst commands failed. Please check the postinst output"
797 - eerror "for errors. You may need to clean up your system and/or try installing"
798 - eerror "systemd again."
799 - eerror
800 - fi
801 -}
802 -
803 -pkg_prerm() {
804 - # If removing systemd completely, remove the catalog database.
805 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
806 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
807 - fi
808 -}
809
810 diff --git a/sys-apps/systemd/systemd-238-r7.ebuild b/sys-apps/systemd/systemd-238-r7.ebuild
811 deleted file mode 100644
812 index e18151acc1b..00000000000
813 --- a/sys-apps/systemd/systemd-238-r7.ebuild
814 +++ /dev/null
815 @@ -1,440 +0,0 @@
816 -# Copyright 1999-2018 Gentoo Foundation
817 -# Distributed under the terms of the GNU General Public License v2
818 -
819 -EAPI=6
820 -
821 -if [[ ${PV} == 9999 ]]; then
822 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
823 - inherit git-r3
824 -else
825 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}/${P}.tar.gz
826 - https://dev.gentoo.org/~floppym/dist/${P}-patches-1.tar.gz"
827 - KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 ~sparc x86"
828 -fi
829 -
830 -PYTHON_COMPAT=( python{3_4,3_5,3_6} )
831 -
832 -inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
833 -
834 -DESCRIPTION="System and service manager for Linux"
835 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
836 -
837 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
838 -SLOT="0/2"
839 -IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +seccomp selinux +split-usr ssl +sysv-utils test vanilla xkb"
840 -
841 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
842 -RESTRICT="!test? ( test )"
843 -
844 -MINKV="3.11"
845 -
846 -COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
847 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
848 - !<sys-libs/glibc-2.16
849 - acl? ( sys-apps/acl:0= )
850 - apparmor? ( sys-libs/libapparmor:0= )
851 - audit? ( >=sys-process/audit-2:0= )
852 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
853 - curl? ( net-misc/curl:0= )
854 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
855 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
856 - http? (
857 - >=net-libs/libmicrohttpd-0.9.33:0=
858 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
859 - )
860 - idn? (
861 - libidn2? ( net-dns/libidn2:= )
862 - !libidn2? ( net-dns/libidn:= )
863 - )
864 - importd? (
865 - app-arch/bzip2:0=
866 - sys-libs/zlib:0=
867 - )
868 - kmod? ( >=sys-apps/kmod-15:0= )
869 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
870 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
871 - nat? ( net-firewall/iptables:0= )
872 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
873 - pcre? ( dev-libs/libpcre2 )
874 - qrcode? ( media-gfx/qrencode:0= )
875 - seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
876 - selinux? ( sys-libs/libselinux:0= )
877 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
878 -
879 -# baselayout-2.2 has /run
880 -RDEPEND="${COMMON_DEPEND}
881 - >=sys-apps/baselayout-2.2
882 - selinux? ( sec-policy/selinux-base-policy[systemd] )
883 - sysv-utils? ( !sys-apps/sysvinit )
884 - !sysv-utils? ( sys-apps/sysvinit )
885 - !build? ( || (
886 - sys-apps/util-linux[kill(-)]
887 - sys-process/procps[kill(+)]
888 - sys-apps/coreutils[kill(-)]
889 - ) )
890 - !sys-auth/nss-myhostname
891 - !<sys-kernel/dracut-044
892 - !sys-fs/eudev
893 - !sys-fs/udev"
894 -
895 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
896 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
897 - >=sys-apps/hwids-20150417[udev]
898 - >=sys-fs/udev-init-scripts-25
899 - policykit? ( sys-auth/polkit )
900 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
901 -
902 -# Newer linux-headers needed by ia64, bug #480218
903 -DEPEND="${COMMON_DEPEND}
904 - app-arch/xz-utils:0
905 - dev-util/gperf
906 - >=dev-util/intltool-0.50
907 - >=sys-apps/coreutils-8.16
908 - >=sys-kernel/linux-headers-${MINKV}
909 - virtual/pkgconfig
910 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
911 - test? ( sys-apps/dbus )
912 - app-text/docbook-xml-dtd:4.2
913 - app-text/docbook-xml-dtd:4.5
914 - app-text/docbook-xsl-stylesheets
915 - dev-libs/libxslt:0
916 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
917 -"
918 -
919 -pkg_pretend() {
920 - if [[ ${MERGE_TYPE} != buildonly ]]; then
921 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
922 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
923 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
924 - ~TIMERFD ~TMPFS_XATTR ~UNIX
925 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
926 - ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
927 - ~!SYSFS_DEPRECATED_V2"
928 -
929 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
930 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
931 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
932 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
933 - kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
934 -
935 - if linux_config_exists; then
936 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
937 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
938 - ewarn "It's recommended to set an empty value to the following kernel config option:"
939 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
940 - fi
941 - if linux_chkconfig_present X86; then
942 - CONFIG_CHECK+=" ~DMIID"
943 - fi
944 - fi
945 -
946 - if kernel_is -lt ${MINKV//./ }; then
947 - ewarn "Kernel version at least ${MINKV} required"
948 - fi
949 -
950 - check_extra_config
951 - fi
952 -}
953 -
954 -pkg_setup() {
955 - :
956 -}
957 -
958 -src_unpack() {
959 - default
960 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
961 -}
962 -
963 -src_prepare() {
964 - local PATCHES=()
965 -
966 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
967 -
968 - PATCHES+=(
969 - "${FILESDIR}/238-initctl.patch"
970 - "${FILESDIR}/238-nspawn-wait.patch"
971 - "${FILESDIR}/238-timesync-connection.patch"
972 - "${FILESDIR}/238-sparc-raw-clone.patch"
973 - )
974 -
975 - if ! use vanilla; then
976 - PATCHES+=(
977 - "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
978 - "${FILESDIR}/gentoo-systemd-user-pam.patch"
979 - "${FILESDIR}/gentoo-uucp-group-r1.patch"
980 - "${FILESDIR}/gentoo-generator-path.patch"
981 - )
982 - fi
983 -
984 - default
985 -}
986 -
987 -src_configure() {
988 - # Prevent conflicts with i686 cross toolchain, bug 559726
989 - tc-export AR CC NM OBJCOPY RANLIB
990 -
991 - python_setup
992 -
993 - multilib-minimal_src_configure
994 -}
995 -
996 -meson_use() {
997 - usex "$1" true false
998 -}
999 -
1000 -meson_multilib() {
1001 - if multilib_is_native_abi; then
1002 - echo true
1003 - else
1004 - echo false
1005 - fi
1006 -}
1007 -
1008 -meson_multilib_native_use() {
1009 - if multilib_is_native_abi && use "$1"; then
1010 - echo true
1011 - else
1012 - echo false
1013 - fi
1014 -}
1015 -
1016 -multilib_src_configure() {
1017 - local myconf=(
1018 - --localstatedir="${EPREFIX}/var"
1019 - -Dpamlibdir="$(getpam_mod_dir)"
1020 - # avoid bash-completion dep
1021 - -Dbashcompletiondir="$(get_bashcompdir)"
1022 - # make sure we get /bin:/sbin in PATH
1023 - -Dsplit-usr=$(usex split-usr true false)
1024 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
1025 - -Dsysvinit-path=
1026 - -Dsysvrcnd-path=
1027 - # Avoid infinite exec recursion, bug 642724
1028 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
1029 - # no deps
1030 - -Defi=$(meson_multilib)
1031 - -Dima=true
1032 - # Optional components/dependencies
1033 - -Dacl=$(meson_multilib_native_use acl)
1034 - -Dapparmor=$(meson_multilib_native_use apparmor)
1035 - -Daudit=$(meson_multilib_native_use audit)
1036 - -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
1037 - -Dlibcurl=$(meson_multilib_native_use curl)
1038 - -Delfutils=$(meson_multilib_native_use elfutils)
1039 - -Dgcrypt=$(meson_use gcrypt)
1040 - -Dgnu-efi=$(meson_multilib_native_use gnuefi)
1041 - -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
1042 - -Dmicrohttpd=$(meson_multilib_native_use http)
1043 - $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
1044 - -Dimportd=$(meson_multilib_native_use importd)
1045 - -Dbzip2=$(meson_multilib_native_use importd)
1046 - -Dzlib=$(meson_multilib_native_use importd)
1047 - -Dkmod=$(meson_multilib_native_use kmod)
1048 - -Dlz4=$(meson_use lz4)
1049 - -Dxz=$(meson_use lzma)
1050 - -Dlibiptc=$(meson_multilib_native_use nat)
1051 - -Dpam=$(meson_use pam)
1052 - -Dpcre2=$(meson_multilib_native_use pcre)
1053 - -Dpolkit=$(meson_multilib_native_use policykit)
1054 - -Dqrencode=$(meson_multilib_native_use qrcode)
1055 - -Dseccomp=$(meson_multilib_native_use seccomp)
1056 - -Dselinux=$(meson_multilib_native_use selinux)
1057 - #-Dtests=$(meson_multilib_native_use test)
1058 - -Ddbus=$(meson_multilib_native_use test)
1059 - -Dxkbcommon=$(meson_multilib_native_use xkb)
1060 - # hardcode a few paths to spare some deps
1061 - -Dkill-path=/bin/kill
1062 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
1063 - # Breaks screen, tmux, etc.
1064 - -Ddefault-kill-user-processes=false
1065 -
1066 - # multilib options
1067 - -Dbacklight=$(meson_multilib)
1068 - -Dbinfmt=$(meson_multilib)
1069 - -Dcoredump=$(meson_multilib)
1070 - -Denvironment-d=$(meson_multilib)
1071 - -Dfirstboot=$(meson_multilib)
1072 - -Dhibernate=$(meson_multilib)
1073 - -Dhostnamed=$(meson_multilib)
1074 - -Dhwdb=$(meson_multilib)
1075 - -Dldconfig=$(meson_multilib)
1076 - -Dlocaled=$(meson_multilib)
1077 - -Dman=$(meson_multilib)
1078 - -Dnetworkd=$(meson_multilib)
1079 - -Dquotacheck=$(meson_multilib)
1080 - -Drandomseed=$(meson_multilib)
1081 - -Drfkill=$(meson_multilib)
1082 - -Dsysusers=$(meson_multilib)
1083 - -Dtimedated=$(meson_multilib)
1084 - -Dtimesyncd=$(meson_multilib)
1085 - -Dtmpfiles=$(meson_multilib)
1086 - -Dvconsole=$(meson_multilib)
1087 - )
1088 -
1089 - if multilib_is_native_abi && use idn; then
1090 - myconf+=(
1091 - -Dlibidn2=$(usex libidn2 true false)
1092 - -Dlibidn=$(usex libidn2 false true)
1093 - )
1094 - else
1095 - myconf+=(
1096 - -Dlibidn2=false
1097 - -Dlibidn=false
1098 - )
1099 - fi
1100 -
1101 - meson_src_configure "${myconf[@]}"
1102 -}
1103 -
1104 -multilib_src_compile() {
1105 - eninja
1106 -}
1107 -
1108 -multilib_src_test() {
1109 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
1110 - eninja test
1111 -}
1112 -
1113 -multilib_src_install() {
1114 - DESTDIR="${D}" eninja install
1115 -}
1116 -
1117 -multilib_src_install_all() {
1118 - # meson doesn't know about docdir
1119 - mv "${ED%/}"/usr/share/doc/{systemd,${PF}} || die
1120 -
1121 - einstalldocs
1122 - dodoc "${FILESDIR}"/nsswitch.conf
1123 -
1124 - if ! use sysv-utils; then
1125 - local rootprefix=$(usex split-usr '' /usr)
1126 - rm "${ED%/}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
1127 - rmdir "${ED%/}${rootprefix}"/sbin || die
1128 - rm "${ED%/}"/usr/share/man/man1/init.1 || die
1129 - rm "${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
1130 - fi
1131 -
1132 - # Preserve empty dirs in /etc & /var, bug #437008
1133 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
1134 - keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
1135 - keepdir /etc/udev/{hwdb.d,rules.d}
1136 - keepdir /var/log/journal/remote
1137 -
1138 - # Symlink /etc/sysctl.conf for easy migration.
1139 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
1140 -
1141 - # If we install these symlinks, there is no way for the sysadmin to remove them
1142 - # permanently.
1143 - rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
1144 - rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
1145 - rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
1146 - rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
1147 - rm -fr "${ED%/}"/etc/systemd/system/network-online.target.wants || die
1148 - rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die
1149 - rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
1150 -
1151 - local udevdir=/lib/udev
1152 - use split-usr || udevdir=/usr/lib/udev
1153 -
1154 - rm -r "${ED%/}${udevdir}/hwdb.d" || die
1155 -
1156 - if use split-usr; then
1157 - # Avoid breaking boot/reboot
1158 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
1159 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
1160 - fi
1161 -}
1162 -
1163 -migrate_locale() {
1164 - local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
1165 - local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
1166 - local locale_conf="${EROOT%/}/etc/locale.conf"
1167 -
1168 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
1169 - # If locale.conf does not exist...
1170 - if [[ -e ${envd_locale} ]]; then
1171 - # ...either copy env.d/??locale if there's one
1172 - ebegin "Moving ${envd_locale} to ${locale_conf}"
1173 - mv "${envd_locale}" "${locale_conf}"
1174 - eend ${?} || FAIL=1
1175 - else
1176 - # ...or create a dummy default
1177 - ebegin "Creating ${locale_conf}"
1178 - cat > "${locale_conf}" <<-EOF
1179 - # This file has been created by the sys-apps/systemd ebuild.
1180 - # See locale.conf(5) and localectl(1).
1181 -
1182 - # LANG=${LANG}
1183 - EOF
1184 - eend ${?} || FAIL=1
1185 - fi
1186 - fi
1187 -
1188 - if [[ ! -L ${envd_locale} ]]; then
1189 - # now, if env.d/??locale is not a symlink (to locale.conf)...
1190 - if [[ -e ${envd_locale} ]]; then
1191 - # ...warn the user that he has duplicate locale settings
1192 - ewarn
1193 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
1194 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
1195 - ewarn "and create the symlink with the following command:"
1196 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
1197 - ewarn
1198 - else
1199 - # ...or just create the symlink if there's nothing here
1200 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
1201 - ln -n -s ../locale.conf "${envd_locale_def}"
1202 - eend ${?} || FAIL=1
1203 - fi
1204 - fi
1205 -}
1206 -
1207 -pkg_postinst() {
1208 - newusergroup() {
1209 - enewgroup "$1"
1210 - enewuser "$1" -1 -1 -1 "$1"
1211 - }
1212 -
1213 - enewgroup input
1214 - enewgroup kvm 78
1215 - enewgroup render
1216 - enewgroup systemd-journal
1217 - newusergroup systemd-bus-proxy
1218 - newusergroup systemd-coredump
1219 - newusergroup systemd-journal-gateway
1220 - newusergroup systemd-journal-remote
1221 - newusergroup systemd-journal-upload
1222 - newusergroup systemd-network
1223 - newusergroup systemd-resolve
1224 - newusergroup systemd-timesync
1225 -
1226 - systemd_update_catalog
1227 -
1228 - # Keep this here in case the database format changes so it gets updated
1229 - # when required. Despite that this file is owned by sys-apps/hwids.
1230 - if has_version "sys-apps/hwids[udev]"; then
1231 - udevadm hwdb --update --root="${EROOT%/}"
1232 - fi
1233 -
1234 - udev_reload || FAIL=1
1235 -
1236 - # Bug 465468, make sure locales are respect, and ensure consistency
1237 - # between OpenRC & systemd
1238 - migrate_locale
1239 -
1240 - systemd_reenable systemd-networkd.service systemd-resolved.service
1241 -
1242 - if [[ ${FAIL} ]]; then
1243 - eerror "One of the postinst commands failed. Please check the postinst output"
1244 - eerror "for errors. You may need to clean up your system and/or try installing"
1245 - eerror "systemd again."
1246 - eerror
1247 - fi
1248 -}
1249 -
1250 -pkg_prerm() {
1251 - # If removing systemd completely, remove the catalog database.
1252 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
1253 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
1254 - fi
1255 -}
1256
1257 diff --git a/sys-apps/systemd/systemd-239-r1.ebuild b/sys-apps/systemd/systemd-239-r1.ebuild
1258 deleted file mode 100644
1259 index 69bfa21435e..00000000000
1260 --- a/sys-apps/systemd/systemd-239-r1.ebuild
1261 +++ /dev/null
1262 @@ -1,448 +0,0 @@
1263 -# Copyright 1999-2018 Gentoo Authors
1264 -# Distributed under the terms of the GNU General Public License v2
1265 -
1266 -EAPI=6
1267 -
1268 -if [[ ${PV} == 9999 ]]; then
1269 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
1270 - inherit git-r3
1271 -else
1272 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}/${P}.tar.gz
1273 - https://dev.gentoo.org/~floppym/dist/${P}-patches-0.tar.gz"
1274 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
1275 -fi
1276 -
1277 -PYTHON_COMPAT=( python{3_4,3_5,3_6} )
1278 -
1279 -inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
1280 -
1281 -DESCRIPTION="System and service manager for Linux"
1282 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
1283 -
1284 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
1285 -SLOT="0/2"
1286 -IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux +split-usr ssl +sysv-utils test vanilla xkb"
1287 -
1288 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
1289 -RESTRICT="!test? ( test )"
1290 -
1291 -MINKV="3.11"
1292 -
1293 -COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
1294 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
1295 - !<sys-libs/glibc-2.16
1296 - acl? ( sys-apps/acl:0= )
1297 - apparmor? ( sys-libs/libapparmor:0= )
1298 - audit? ( >=sys-process/audit-2:0= )
1299 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
1300 - curl? ( net-misc/curl:0= )
1301 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
1302 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
1303 - http? (
1304 - >=net-libs/libmicrohttpd-0.9.33:0=
1305 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
1306 - )
1307 - idn? (
1308 - libidn2? ( net-dns/libidn2:= )
1309 - !libidn2? ( net-dns/libidn:= )
1310 - )
1311 - importd? (
1312 - app-arch/bzip2:0=
1313 - sys-libs/zlib:0=
1314 - )
1315 - kmod? ( >=sys-apps/kmod-15:0= )
1316 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
1317 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
1318 - nat? ( net-firewall/iptables:0= )
1319 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
1320 - pcre? ( dev-libs/libpcre2 )
1321 - qrcode? ( media-gfx/qrencode:0= )
1322 - seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
1323 - selinux? ( sys-libs/libselinux:0= )
1324 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
1325 -
1326 -# baselayout-2.2 has /run
1327 -RDEPEND="${COMMON_DEPEND}
1328 - >=sys-apps/baselayout-2.2
1329 - selinux? ( sec-policy/selinux-base-policy[systemd] )
1330 - sysv-utils? ( !sys-apps/sysvinit )
1331 - !sysv-utils? ( sys-apps/sysvinit )
1332 - resolvconf? ( !net-dns/openresolv )
1333 - !build? ( || (
1334 - sys-apps/util-linux[kill(-)]
1335 - sys-process/procps[kill(+)]
1336 - sys-apps/coreutils[kill(-)]
1337 - ) )
1338 - !sys-auth/nss-myhostname
1339 - !<sys-kernel/dracut-044
1340 - !sys-fs/eudev
1341 - !sys-fs/udev"
1342 -
1343 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
1344 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
1345 - >=sys-apps/hwids-20150417[udev]
1346 - >=sys-fs/udev-init-scripts-25
1347 - policykit? ( sys-auth/polkit )
1348 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
1349 -
1350 -# Newer linux-headers needed by ia64, bug #480218
1351 -DEPEND="${COMMON_DEPEND}
1352 - app-arch/xz-utils:0
1353 - dev-util/gperf
1354 - >=dev-util/intltool-0.50
1355 - >=sys-apps/coreutils-8.16
1356 - >=sys-kernel/linux-headers-${MINKV}
1357 - virtual/pkgconfig
1358 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
1359 - test? ( sys-apps/dbus )
1360 - app-text/docbook-xml-dtd:4.2
1361 - app-text/docbook-xml-dtd:4.5
1362 - app-text/docbook-xsl-stylesheets
1363 - dev-libs/libxslt:0
1364 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
1365 -"
1366 -
1367 -pkg_pretend() {
1368 - if [[ ${MERGE_TYPE} != buildonly ]]; then
1369 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
1370 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
1371 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
1372 - ~TIMERFD ~TMPFS_XATTR ~UNIX
1373 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
1374 - ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
1375 - ~!SYSFS_DEPRECATED_V2"
1376 -
1377 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
1378 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
1379 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
1380 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
1381 - kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
1382 -
1383 - if linux_config_exists; then
1384 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
1385 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
1386 - ewarn "It's recommended to set an empty value to the following kernel config option:"
1387 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
1388 - fi
1389 - if linux_chkconfig_present X86; then
1390 - CONFIG_CHECK+=" ~DMIID"
1391 - fi
1392 - fi
1393 -
1394 - if kernel_is -lt ${MINKV//./ }; then
1395 - ewarn "Kernel version at least ${MINKV} required"
1396 - fi
1397 -
1398 - check_extra_config
1399 - fi
1400 -}
1401 -
1402 -pkg_setup() {
1403 - :
1404 -}
1405 -
1406 -src_unpack() {
1407 - default
1408 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
1409 -}
1410 -
1411 -src_prepare() {
1412 - # Do NOT add patches here
1413 - local PATCHES=()
1414 -
1415 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
1416 -
1417 - # Add local patches here
1418 - PATCHES+=(
1419 - "${FILESDIR}"/239-debug-extra.patch
1420 - )
1421 -
1422 - if ! use vanilla; then
1423 - PATCHES+=(
1424 - "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
1425 - "${FILESDIR}/gentoo-systemd-user-pam.patch"
1426 - "${FILESDIR}/gentoo-uucp-group-r1.patch"
1427 - "${FILESDIR}/gentoo-generator-path.patch"
1428 - )
1429 - fi
1430 -
1431 - default
1432 -}
1433 -
1434 -src_configure() {
1435 - # Prevent conflicts with i686 cross toolchain, bug 559726
1436 - tc-export AR CC NM OBJCOPY RANLIB
1437 -
1438 - python_setup
1439 -
1440 - multilib-minimal_src_configure
1441 -}
1442 -
1443 -meson_use() {
1444 - usex "$1" true false
1445 -}
1446 -
1447 -meson_multilib() {
1448 - if multilib_is_native_abi; then
1449 - echo true
1450 - else
1451 - echo false
1452 - fi
1453 -}
1454 -
1455 -meson_multilib_native_use() {
1456 - if multilib_is_native_abi && use "$1"; then
1457 - echo true
1458 - else
1459 - echo false
1460 - fi
1461 -}
1462 -
1463 -multilib_src_configure() {
1464 - local myconf=(
1465 - --localstatedir="${EPREFIX}/var"
1466 - -Dpamlibdir="$(getpam_mod_dir)"
1467 - # avoid bash-completion dep
1468 - -Dbashcompletiondir="$(get_bashcompdir)"
1469 - # make sure we get /bin:/sbin in PATH
1470 - -Dsplit-usr=$(usex split-usr true false)
1471 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
1472 - -Dsysvinit-path=
1473 - -Dsysvrcnd-path=
1474 - # Avoid infinite exec recursion, bug 642724
1475 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
1476 - # no deps
1477 - -Defi=$(meson_multilib)
1478 - -Dima=true
1479 - # Optional components/dependencies
1480 - -Dacl=$(meson_multilib_native_use acl)
1481 - -Dapparmor=$(meson_multilib_native_use apparmor)
1482 - -Daudit=$(meson_multilib_native_use audit)
1483 - -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
1484 - -Dlibcurl=$(meson_multilib_native_use curl)
1485 - -Delfutils=$(meson_multilib_native_use elfutils)
1486 - -Dgcrypt=$(meson_use gcrypt)
1487 - -Dgnu-efi=$(meson_multilib_native_use gnuefi)
1488 - -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
1489 - -Dmicrohttpd=$(meson_multilib_native_use http)
1490 - $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
1491 - -Dimportd=$(meson_multilib_native_use importd)
1492 - -Dbzip2=$(meson_multilib_native_use importd)
1493 - -Dzlib=$(meson_multilib_native_use importd)
1494 - -Dkmod=$(meson_multilib_native_use kmod)
1495 - -Dlz4=$(meson_use lz4)
1496 - -Dxz=$(meson_use lzma)
1497 - -Dlibiptc=$(meson_multilib_native_use nat)
1498 - -Dpam=$(meson_use pam)
1499 - -Dpcre2=$(meson_multilib_native_use pcre)
1500 - -Dpolkit=$(meson_multilib_native_use policykit)
1501 - -Dqrencode=$(meson_multilib_native_use qrcode)
1502 - -Dseccomp=$(meson_multilib_native_use seccomp)
1503 - -Dselinux=$(meson_multilib_native_use selinux)
1504 - #-Dtests=$(meson_multilib_native_use test)
1505 - -Ddbus=$(meson_multilib_native_use test)
1506 - -Dxkbcommon=$(meson_multilib_native_use xkb)
1507 - # hardcode a few paths to spare some deps
1508 - -Dkill-path=/bin/kill
1509 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
1510 - # Breaks screen, tmux, etc.
1511 - -Ddefault-kill-user-processes=false
1512 -
1513 - # multilib options
1514 - -Dbacklight=$(meson_multilib)
1515 - -Dbinfmt=$(meson_multilib)
1516 - -Dcoredump=$(meson_multilib)
1517 - -Denvironment-d=$(meson_multilib)
1518 - -Dfirstboot=$(meson_multilib)
1519 - -Dhibernate=$(meson_multilib)
1520 - -Dhostnamed=$(meson_multilib)
1521 - -Dhwdb=$(meson_multilib)
1522 - -Dldconfig=$(meson_multilib)
1523 - -Dlocaled=$(meson_multilib)
1524 - -Dman=$(meson_multilib)
1525 - -Dnetworkd=$(meson_multilib)
1526 - -Dquotacheck=$(meson_multilib)
1527 - -Drandomseed=$(meson_multilib)
1528 - -Drfkill=$(meson_multilib)
1529 - -Dsysusers=$(meson_multilib)
1530 - -Dtimedated=$(meson_multilib)
1531 - -Dtimesyncd=$(meson_multilib)
1532 - -Dtmpfiles=$(meson_multilib)
1533 - -Dvconsole=$(meson_multilib)
1534 - )
1535 -
1536 - if multilib_is_native_abi && use idn; then
1537 - myconf+=(
1538 - -Dlibidn2=$(usex libidn2 true false)
1539 - -Dlibidn=$(usex libidn2 false true)
1540 - )
1541 - else
1542 - myconf+=(
1543 - -Dlibidn2=false
1544 - -Dlibidn=false
1545 - )
1546 - fi
1547 -
1548 - meson_src_configure "${myconf[@]}"
1549 -}
1550 -
1551 -multilib_src_compile() {
1552 - eninja
1553 -}
1554 -
1555 -multilib_src_test() {
1556 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
1557 - eninja test
1558 -}
1559 -
1560 -multilib_src_install() {
1561 - DESTDIR="${D}" eninja install
1562 -}
1563 -
1564 -multilib_src_install_all() {
1565 - local rootprefix=$(usex split-usr '' /usr)
1566 -
1567 - # meson doesn't know about docdir
1568 - mv "${ED%/}"/usr/share/doc/{systemd,${PF}} || die
1569 -
1570 - einstalldocs
1571 - dodoc "${FILESDIR}"/nsswitch.conf
1572 -
1573 - if ! use resolvconf; then
1574 - rm -f "${ED%/}${rootprefix}"/sbin/resolvconf || die
1575 - fi
1576 -
1577 - if ! use sysv-utils; then
1578 - rm "${ED%/}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
1579 - rm "${ED%/}"/usr/share/man/man1/init.1 || die
1580 - rm "${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
1581 - fi
1582 -
1583 - if ! use resolvconf && ! use sysv-utils; then
1584 - rmdir "${ED%/}${rootprefix}"/sbin || die
1585 - fi
1586 -
1587 - # Preserve empty dirs in /etc & /var, bug #437008
1588 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
1589 - keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
1590 - keepdir /etc/udev/{hwdb.d,rules.d}
1591 - keepdir /var/log/journal/remote
1592 -
1593 - # Symlink /etc/sysctl.conf for easy migration.
1594 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
1595 -
1596 - # If we install these symlinks, there is no way for the sysadmin to remove them
1597 - # permanently.
1598 - rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
1599 - rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
1600 - rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
1601 - rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
1602 - rm -fr "${ED%/}"/etc/systemd/system/network-online.target.wants || die
1603 - rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die
1604 - rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
1605 -
1606 - local udevdir=/lib/udev
1607 - use split-usr || udevdir=/usr/lib/udev
1608 -
1609 - rm -r "${ED%/}${udevdir}/hwdb.d" || die
1610 -
1611 - if use split-usr; then
1612 - # Avoid breaking boot/reboot
1613 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
1614 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
1615 - fi
1616 -}
1617 -
1618 -migrate_locale() {
1619 - local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
1620 - local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
1621 - local locale_conf="${EROOT%/}/etc/locale.conf"
1622 -
1623 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
1624 - # If locale.conf does not exist...
1625 - if [[ -e ${envd_locale} ]]; then
1626 - # ...either copy env.d/??locale if there's one
1627 - ebegin "Moving ${envd_locale} to ${locale_conf}"
1628 - mv "${envd_locale}" "${locale_conf}"
1629 - eend ${?} || FAIL=1
1630 - else
1631 - # ...or create a dummy default
1632 - ebegin "Creating ${locale_conf}"
1633 - cat > "${locale_conf}" <<-EOF
1634 - # This file has been created by the sys-apps/systemd ebuild.
1635 - # See locale.conf(5) and localectl(1).
1636 -
1637 - # LANG=${LANG}
1638 - EOF
1639 - eend ${?} || FAIL=1
1640 - fi
1641 - fi
1642 -
1643 - if [[ ! -L ${envd_locale} ]]; then
1644 - # now, if env.d/??locale is not a symlink (to locale.conf)...
1645 - if [[ -e ${envd_locale} ]]; then
1646 - # ...warn the user that he has duplicate locale settings
1647 - ewarn
1648 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
1649 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
1650 - ewarn "and create the symlink with the following command:"
1651 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
1652 - ewarn
1653 - else
1654 - # ...or just create the symlink if there's nothing here
1655 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
1656 - ln -n -s ../locale.conf "${envd_locale_def}"
1657 - eend ${?} || FAIL=1
1658 - fi
1659 - fi
1660 -}
1661 -
1662 -pkg_postinst() {
1663 - newusergroup() {
1664 - enewgroup "$1"
1665 - enewuser "$1" -1 -1 -1 "$1"
1666 - }
1667 -
1668 - enewgroup input
1669 - enewgroup kvm 78
1670 - enewgroup render
1671 - enewgroup systemd-journal
1672 - newusergroup systemd-bus-proxy
1673 - newusergroup systemd-coredump
1674 - newusergroup systemd-journal-gateway
1675 - newusergroup systemd-journal-remote
1676 - newusergroup systemd-journal-upload
1677 - newusergroup systemd-network
1678 - newusergroup systemd-resolve
1679 - newusergroup systemd-timesync
1680 -
1681 - systemd_update_catalog
1682 -
1683 - # Keep this here in case the database format changes so it gets updated
1684 - # when required. Despite that this file is owned by sys-apps/hwids.
1685 - if has_version "sys-apps/hwids[udev]"; then
1686 - udevadm hwdb --update --root="${EROOT%/}"
1687 - fi
1688 -
1689 - udev_reload || FAIL=1
1690 -
1691 - # Bug 465468, make sure locales are respect, and ensure consistency
1692 - # between OpenRC & systemd
1693 - migrate_locale
1694 -
1695 - systemd_reenable systemd-networkd.service systemd-resolved.service
1696 -
1697 - if [[ ${FAIL} ]]; then
1698 - eerror "One of the postinst commands failed. Please check the postinst output"
1699 - eerror "for errors. You may need to clean up your system and/or try installing"
1700 - eerror "systemd again."
1701 - eerror
1702 - fi
1703 -}
1704 -
1705 -pkg_prerm() {
1706 - # If removing systemd completely, remove the catalog database.
1707 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
1708 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
1709 - fi
1710 -}
1711
1712 diff --git a/sys-apps/systemd/systemd-239.ebuild b/sys-apps/systemd/systemd-239.ebuild
1713 deleted file mode 100644
1714 index 08a0c54c349..00000000000
1715 --- a/sys-apps/systemd/systemd-239.ebuild
1716 +++ /dev/null
1717 @@ -1,446 +0,0 @@
1718 -# Copyright 1999-2018 Gentoo Foundation
1719 -# Distributed under the terms of the GNU General Public License v2
1720 -
1721 -EAPI=6
1722 -
1723 -if [[ ${PV} == 9999 ]]; then
1724 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
1725 - inherit git-r3
1726 -else
1727 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}/${P}.tar.gz"
1728 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
1729 -fi
1730 -
1731 -PYTHON_COMPAT=( python{3_4,3_5,3_6} )
1732 -
1733 -inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
1734 -
1735 -DESCRIPTION="System and service manager for Linux"
1736 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
1737 -
1738 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
1739 -SLOT="0/2"
1740 -IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux +split-usr ssl +sysv-utils test vanilla xkb"
1741 -
1742 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
1743 -RESTRICT="!test? ( test )"
1744 -
1745 -MINKV="3.11"
1746 -
1747 -COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
1748 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
1749 - !<sys-libs/glibc-2.16
1750 - acl? ( sys-apps/acl:0= )
1751 - apparmor? ( sys-libs/libapparmor:0= )
1752 - audit? ( >=sys-process/audit-2:0= )
1753 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
1754 - curl? ( net-misc/curl:0= )
1755 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
1756 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
1757 - http? (
1758 - >=net-libs/libmicrohttpd-0.9.33:0=
1759 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
1760 - )
1761 - idn? (
1762 - libidn2? ( net-dns/libidn2:= )
1763 - !libidn2? ( net-dns/libidn:= )
1764 - )
1765 - importd? (
1766 - app-arch/bzip2:0=
1767 - sys-libs/zlib:0=
1768 - )
1769 - kmod? ( >=sys-apps/kmod-15:0= )
1770 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
1771 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
1772 - nat? ( net-firewall/iptables:0= )
1773 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
1774 - pcre? ( dev-libs/libpcre2 )
1775 - qrcode? ( media-gfx/qrencode:0= )
1776 - seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
1777 - selinux? ( sys-libs/libselinux:0= )
1778 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
1779 -
1780 -# baselayout-2.2 has /run
1781 -RDEPEND="${COMMON_DEPEND}
1782 - >=sys-apps/baselayout-2.2
1783 - selinux? ( sec-policy/selinux-base-policy[systemd] )
1784 - sysv-utils? ( !sys-apps/sysvinit )
1785 - !sysv-utils? ( sys-apps/sysvinit )
1786 - resolvconf? ( !net-dns/openresolv )
1787 - !build? ( || (
1788 - sys-apps/util-linux[kill(-)]
1789 - sys-process/procps[kill(+)]
1790 - sys-apps/coreutils[kill(-)]
1791 - ) )
1792 - !sys-auth/nss-myhostname
1793 - !<sys-kernel/dracut-044
1794 - !sys-fs/eudev
1795 - !sys-fs/udev"
1796 -
1797 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
1798 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
1799 - >=sys-apps/hwids-20150417[udev]
1800 - >=sys-fs/udev-init-scripts-25
1801 - policykit? ( sys-auth/polkit )
1802 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
1803 -
1804 -# Newer linux-headers needed by ia64, bug #480218
1805 -DEPEND="${COMMON_DEPEND}
1806 - app-arch/xz-utils:0
1807 - dev-util/gperf
1808 - >=dev-util/intltool-0.50
1809 - >=sys-apps/coreutils-8.16
1810 - >=sys-kernel/linux-headers-${MINKV}
1811 - virtual/pkgconfig
1812 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
1813 - test? ( sys-apps/dbus )
1814 - app-text/docbook-xml-dtd:4.2
1815 - app-text/docbook-xml-dtd:4.5
1816 - app-text/docbook-xsl-stylesheets
1817 - dev-libs/libxslt:0
1818 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
1819 -"
1820 -
1821 -pkg_pretend() {
1822 - if [[ ${MERGE_TYPE} != buildonly ]]; then
1823 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
1824 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
1825 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
1826 - ~TIMERFD ~TMPFS_XATTR ~UNIX
1827 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
1828 - ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
1829 - ~!SYSFS_DEPRECATED_V2"
1830 -
1831 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
1832 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
1833 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
1834 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
1835 - kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
1836 -
1837 - if linux_config_exists; then
1838 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
1839 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
1840 - ewarn "It's recommended to set an empty value to the following kernel config option:"
1841 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
1842 - fi
1843 - if linux_chkconfig_present X86; then
1844 - CONFIG_CHECK+=" ~DMIID"
1845 - fi
1846 - fi
1847 -
1848 - if kernel_is -lt ${MINKV//./ }; then
1849 - ewarn "Kernel version at least ${MINKV} required"
1850 - fi
1851 -
1852 - check_extra_config
1853 - fi
1854 -}
1855 -
1856 -pkg_setup() {
1857 - :
1858 -}
1859 -
1860 -src_unpack() {
1861 - default
1862 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
1863 -}
1864 -
1865 -src_prepare() {
1866 - # Do NOT add patches here
1867 - local PATCHES=()
1868 -
1869 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
1870 -
1871 - # Add local patches here
1872 - PATCHES+=(
1873 - )
1874 -
1875 - if ! use vanilla; then
1876 - PATCHES+=(
1877 - "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
1878 - "${FILESDIR}/gentoo-systemd-user-pam.patch"
1879 - "${FILESDIR}/gentoo-uucp-group-r1.patch"
1880 - "${FILESDIR}/gentoo-generator-path.patch"
1881 - )
1882 - fi
1883 -
1884 - default
1885 -}
1886 -
1887 -src_configure() {
1888 - # Prevent conflicts with i686 cross toolchain, bug 559726
1889 - tc-export AR CC NM OBJCOPY RANLIB
1890 -
1891 - python_setup
1892 -
1893 - multilib-minimal_src_configure
1894 -}
1895 -
1896 -meson_use() {
1897 - usex "$1" true false
1898 -}
1899 -
1900 -meson_multilib() {
1901 - if multilib_is_native_abi; then
1902 - echo true
1903 - else
1904 - echo false
1905 - fi
1906 -}
1907 -
1908 -meson_multilib_native_use() {
1909 - if multilib_is_native_abi && use "$1"; then
1910 - echo true
1911 - else
1912 - echo false
1913 - fi
1914 -}
1915 -
1916 -multilib_src_configure() {
1917 - local myconf=(
1918 - --localstatedir="${EPREFIX}/var"
1919 - -Dpamlibdir="$(getpam_mod_dir)"
1920 - # avoid bash-completion dep
1921 - -Dbashcompletiondir="$(get_bashcompdir)"
1922 - # make sure we get /bin:/sbin in PATH
1923 - -Dsplit-usr=$(usex split-usr true false)
1924 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
1925 - -Dsysvinit-path=
1926 - -Dsysvrcnd-path=
1927 - # Avoid infinite exec recursion, bug 642724
1928 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
1929 - # no deps
1930 - -Defi=$(meson_multilib)
1931 - -Dima=true
1932 - # Optional components/dependencies
1933 - -Dacl=$(meson_multilib_native_use acl)
1934 - -Dapparmor=$(meson_multilib_native_use apparmor)
1935 - -Daudit=$(meson_multilib_native_use audit)
1936 - -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
1937 - -Dlibcurl=$(meson_multilib_native_use curl)
1938 - -Delfutils=$(meson_multilib_native_use elfutils)
1939 - -Dgcrypt=$(meson_use gcrypt)
1940 - -Dgnu-efi=$(meson_multilib_native_use gnuefi)
1941 - -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
1942 - -Dmicrohttpd=$(meson_multilib_native_use http)
1943 - $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
1944 - -Dimportd=$(meson_multilib_native_use importd)
1945 - -Dbzip2=$(meson_multilib_native_use importd)
1946 - -Dzlib=$(meson_multilib_native_use importd)
1947 - -Dkmod=$(meson_multilib_native_use kmod)
1948 - -Dlz4=$(meson_use lz4)
1949 - -Dxz=$(meson_use lzma)
1950 - -Dlibiptc=$(meson_multilib_native_use nat)
1951 - -Dpam=$(meson_use pam)
1952 - -Dpcre2=$(meson_multilib_native_use pcre)
1953 - -Dpolkit=$(meson_multilib_native_use policykit)
1954 - -Dqrencode=$(meson_multilib_native_use qrcode)
1955 - -Dseccomp=$(meson_multilib_native_use seccomp)
1956 - -Dselinux=$(meson_multilib_native_use selinux)
1957 - #-Dtests=$(meson_multilib_native_use test)
1958 - -Ddbus=$(meson_multilib_native_use test)
1959 - -Dxkbcommon=$(meson_multilib_native_use xkb)
1960 - # hardcode a few paths to spare some deps
1961 - -Dkill-path=/bin/kill
1962 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
1963 - # Breaks screen, tmux, etc.
1964 - -Ddefault-kill-user-processes=false
1965 -
1966 - # multilib options
1967 - -Dbacklight=$(meson_multilib)
1968 - -Dbinfmt=$(meson_multilib)
1969 - -Dcoredump=$(meson_multilib)
1970 - -Denvironment-d=$(meson_multilib)
1971 - -Dfirstboot=$(meson_multilib)
1972 - -Dhibernate=$(meson_multilib)
1973 - -Dhostnamed=$(meson_multilib)
1974 - -Dhwdb=$(meson_multilib)
1975 - -Dldconfig=$(meson_multilib)
1976 - -Dlocaled=$(meson_multilib)
1977 - -Dman=$(meson_multilib)
1978 - -Dnetworkd=$(meson_multilib)
1979 - -Dquotacheck=$(meson_multilib)
1980 - -Drandomseed=$(meson_multilib)
1981 - -Drfkill=$(meson_multilib)
1982 - -Dsysusers=$(meson_multilib)
1983 - -Dtimedated=$(meson_multilib)
1984 - -Dtimesyncd=$(meson_multilib)
1985 - -Dtmpfiles=$(meson_multilib)
1986 - -Dvconsole=$(meson_multilib)
1987 - )
1988 -
1989 - if multilib_is_native_abi && use idn; then
1990 - myconf+=(
1991 - -Dlibidn2=$(usex libidn2 true false)
1992 - -Dlibidn=$(usex libidn2 false true)
1993 - )
1994 - else
1995 - myconf+=(
1996 - -Dlibidn2=false
1997 - -Dlibidn=false
1998 - )
1999 - fi
2000 -
2001 - meson_src_configure "${myconf[@]}"
2002 -}
2003 -
2004 -multilib_src_compile() {
2005 - eninja
2006 -}
2007 -
2008 -multilib_src_test() {
2009 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
2010 - eninja test
2011 -}
2012 -
2013 -multilib_src_install() {
2014 - DESTDIR="${D}" eninja install
2015 -}
2016 -
2017 -multilib_src_install_all() {
2018 - local rootprefix=$(usex split-usr '' /usr)
2019 -
2020 - # meson doesn't know about docdir
2021 - mv "${ED%/}"/usr/share/doc/{systemd,${PF}} || die
2022 -
2023 - einstalldocs
2024 - dodoc "${FILESDIR}"/nsswitch.conf
2025 -
2026 - if ! use resolvconf; then
2027 - rm -f "${ED%/}${rootprefix}"/sbin/resolvconf || die
2028 - fi
2029 -
2030 - if ! use sysv-utils; then
2031 - rm "${ED%/}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
2032 - rm "${ED%/}"/usr/share/man/man1/init.1 || die
2033 - rm "${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
2034 - fi
2035 -
2036 - if ! use resolvconf && ! use sysv-utils; then
2037 - rmdir "${ED%/}${rootprefix}"/sbin || die
2038 - fi
2039 -
2040 - # Preserve empty dirs in /etc & /var, bug #437008
2041 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
2042 - keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
2043 - keepdir /etc/udev/{hwdb.d,rules.d}
2044 - keepdir /var/log/journal/remote
2045 -
2046 - # Symlink /etc/sysctl.conf for easy migration.
2047 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
2048 -
2049 - # If we install these symlinks, there is no way for the sysadmin to remove them
2050 - # permanently.
2051 - rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
2052 - rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
2053 - rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
2054 - rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
2055 - rm -fr "${ED%/}"/etc/systemd/system/network-online.target.wants || die
2056 - rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die
2057 - rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
2058 -
2059 - local udevdir=/lib/udev
2060 - use split-usr || udevdir=/usr/lib/udev
2061 -
2062 - rm -r "${ED%/}${udevdir}/hwdb.d" || die
2063 -
2064 - if use split-usr; then
2065 - # Avoid breaking boot/reboot
2066 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
2067 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
2068 - fi
2069 -}
2070 -
2071 -migrate_locale() {
2072 - local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
2073 - local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
2074 - local locale_conf="${EROOT%/}/etc/locale.conf"
2075 -
2076 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
2077 - # If locale.conf does not exist...
2078 - if [[ -e ${envd_locale} ]]; then
2079 - # ...either copy env.d/??locale if there's one
2080 - ebegin "Moving ${envd_locale} to ${locale_conf}"
2081 - mv "${envd_locale}" "${locale_conf}"
2082 - eend ${?} || FAIL=1
2083 - else
2084 - # ...or create a dummy default
2085 - ebegin "Creating ${locale_conf}"
2086 - cat > "${locale_conf}" <<-EOF
2087 - # This file has been created by the sys-apps/systemd ebuild.
2088 - # See locale.conf(5) and localectl(1).
2089 -
2090 - # LANG=${LANG}
2091 - EOF
2092 - eend ${?} || FAIL=1
2093 - fi
2094 - fi
2095 -
2096 - if [[ ! -L ${envd_locale} ]]; then
2097 - # now, if env.d/??locale is not a symlink (to locale.conf)...
2098 - if [[ -e ${envd_locale} ]]; then
2099 - # ...warn the user that he has duplicate locale settings
2100 - ewarn
2101 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
2102 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
2103 - ewarn "and create the symlink with the following command:"
2104 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
2105 - ewarn
2106 - else
2107 - # ...or just create the symlink if there's nothing here
2108 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
2109 - ln -n -s ../locale.conf "${envd_locale_def}"
2110 - eend ${?} || FAIL=1
2111 - fi
2112 - fi
2113 -}
2114 -
2115 -pkg_postinst() {
2116 - newusergroup() {
2117 - enewgroup "$1"
2118 - enewuser "$1" -1 -1 -1 "$1"
2119 - }
2120 -
2121 - enewgroup input
2122 - enewgroup kvm 78
2123 - enewgroup render
2124 - enewgroup systemd-journal
2125 - newusergroup systemd-bus-proxy
2126 - newusergroup systemd-coredump
2127 - newusergroup systemd-journal-gateway
2128 - newusergroup systemd-journal-remote
2129 - newusergroup systemd-journal-upload
2130 - newusergroup systemd-network
2131 - newusergroup systemd-resolve
2132 - newusergroup systemd-timesync
2133 -
2134 - systemd_update_catalog
2135 -
2136 - # Keep this here in case the database format changes so it gets updated
2137 - # when required. Despite that this file is owned by sys-apps/hwids.
2138 - if has_version "sys-apps/hwids[udev]"; then
2139 - udevadm hwdb --update --root="${EROOT%/}"
2140 - fi
2141 -
2142 - udev_reload || FAIL=1
2143 -
2144 - # Bug 465468, make sure locales are respect, and ensure consistency
2145 - # between OpenRC & systemd
2146 - migrate_locale
2147 -
2148 - systemd_reenable systemd-networkd.service systemd-resolved.service
2149 -
2150 - if [[ ${FAIL} ]]; then
2151 - eerror "One of the postinst commands failed. Please check the postinst output"
2152 - eerror "for errors. You may need to clean up your system and/or try installing"
2153 - eerror "systemd again."
2154 - eerror
2155 - fi
2156 -}
2157 -
2158 -pkg_prerm() {
2159 - # If removing systemd completely, remove the catalog database.
2160 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
2161 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
2162 - fi
2163 -}