1 |
commit: d343b62dbdd1f39ef6ae47af8f6d53220752cb74 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 13 16:28:34 2022 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 13 16:28:34 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d343b62d |
7 |
|
8 |
sys-apps/systemd: drop 249.6-r1, 249.7, 249.7-r1 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/830967 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
sys-apps/systemd/Manifest | 3 - |
14 |
sys-apps/systemd/files/250-fix-openssl.patch | 102 ------ |
15 |
sys-apps/systemd/systemd-249.6-r1.ebuild | 505 -------------------------- |
16 |
sys-apps/systemd/systemd-249.7-r1.ebuild | 507 --------------------------- |
17 |
sys-apps/systemd/systemd-249.7.ebuild | 505 -------------------------- |
18 |
5 files changed, 1622 deletions(-) |
19 |
|
20 |
diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest |
21 |
index 32362230c5be..8d3466ae249a 100644 |
22 |
--- a/sys-apps/systemd/Manifest |
23 |
+++ b/sys-apps/systemd/Manifest |
24 |
@@ -1,5 +1,2 @@ |
25 |
-DIST systemd-249.7-CVE-2021-3997.tar.gz 8431 BLAKE2B 167ae8bfb3b653fa4a7a62eee164f2a7edf2f0fb312db8ed955634030c95dfdbd747821b4652620cd34a7af38fe0b77e48ed61096b5d076c3eb2f56371e191c8 SHA512 b17a60a0862743faee0153218792a77b5d06a44876e0c53c264e98d62786442c165f47136d7bc2857edcedc24e667c220a2e7d065e77f9a957804131acb26598 |
26 |
-DIST systemd-stable-249.6.tar.gz 10599611 BLAKE2B 9c0cbaa4319f2ce9a78dbe820d1b6df5191e6c632e2eac9f71f9ff9817564d9b3fc177d2aec0c0daea8ac33bbdc2066ad68a8967cf8857f4af3668b9a3e7d3bf SHA512 7a7791dfe4923c00987b924adcb1cd08c4d17af2b17b4c6c6c701856c6810cfda61f06821c39787339fc05293853c0ea61b9973fcf4495c7bf4f8054ecfae66f |
27 |
-DIST systemd-stable-249.7.tar.gz 10608252 BLAKE2B a5597c4973b24c962779622cae47dbf8351af49f8cd898d9c16a967c6f3600c6feb293e9b03eab0423b860eef5b04b287185fb9827cb323429d0ab9fc6d809b2 SHA512 4daf8570621fdcda5c94d982908c64eddfeef989005f4fd79a10f199dbc6f366354177bb59dff34bcb14764fb4423a870ffabac1163849ec53592e29760105fc |
28 |
DIST systemd-stable-249.9.tar.gz 10613893 BLAKE2B fc7a14fa3b0cc3d05fa9f20fde2efedd3ef0f011d9dce53b0a418994b4257cf753b228cf98f749fb2028d81db55ef30a6e3d9b138d86239cad4fc730d845f9e2 SHA512 ce57bc6c522082e55649fc1886c4dc818c89607e175df2c92feffe288dbd38757f36b30abeebe153f5be6b664a49d729405040a952473cb2133a2e39cf9cc164 |
29 |
DIST systemd-stable-250.2.tar.gz 11121031 BLAKE2B ddbb33648dbf0442e4258bf23ace04eac6d5ab6a2434537395b900b7bd4113a86199d6d559f8d76dcbede88484240a6593439acdcc7b1801857d13840c389c6c SHA512 2f734c1d1ea98ee3f1beb00689a0d56603cd981aa938bee1655445ddd4af3b2bb6472249fa158741edcb2259ee302b625e124c38b7d2ec00c53760d6b362d5bb |
30 |
|
31 |
diff --git a/sys-apps/systemd/files/250-fix-openssl.patch b/sys-apps/systemd/files/250-fix-openssl.patch |
32 |
deleted file mode 100644 |
33 |
index 520ba0b66427..000000000000 |
34 |
--- a/sys-apps/systemd/files/250-fix-openssl.patch |
35 |
+++ /dev/null |
36 |
@@ -1,102 +0,0 @@ |
37 |
-From 9bcf483b117b23ae25bf4a5d39ddc3eade8659a6 Mon Sep 17 00:00:00 2001 |
38 |
-From: Yu Watanabe <watanabe.yu+github@×××××.com> |
39 |
-Date: Fri, 24 Dec 2021 10:06:13 +0900 |
40 |
-Subject: [PATCH] meson: fix build with -Dcryptolib=openssl |
41 |
- -Ddns-over-tls=false |
42 |
- |
43 |
-Previously, when -Ddns-over-tls=false, libopenssl was missing in the |
44 |
-dependency of resolved. |
45 |
-Also, this drops libgpg_error when it is not necessary. |
46 |
- |
47 |
-Replaces #21878. |
48 |
---- |
49 |
- meson.build | 3 +-- |
50 |
- src/resolve/meson.build | 9 +-------- |
51 |
- 2 files changed, 2 insertions(+), 10 deletions(-) |
52 |
- |
53 |
-diff --git a/meson.build b/meson.build |
54 |
-index c0cbadecb123..0b7c1918ad4c 100644 |
55 |
---- a/meson.build |
56 |
-+++ b/meson.build |
57 |
-@@ -1474,7 +1474,7 @@ conf.set10('PREFER_OPENSSL', |
58 |
- opt == 'openssl' or (opt == 'auto' and conf.get('HAVE_OPENSSL') == 1 and conf.get('HAVE_GCRYPT') == 0)) |
59 |
- conf.set10('HAVE_OPENSSL_OR_GCRYPT', |
60 |
- conf.get('HAVE_OPENSSL') == 1 or conf.get('HAVE_GCRYPT') == 1) |
61 |
--lib_openssl_or_gcrypt = conf.get('PREFER_OPENSSL') == 1 ? libopenssl : libgcrypt |
62 |
-+lib_openssl_or_gcrypt = conf.get('PREFER_OPENSSL') == 1 ? [libopenssl] : [libgcrypt, libgpg_error] |
63 |
- |
64 |
- dns_over_tls = get_option('dns-over-tls') |
65 |
- if dns_over_tls != 'false' |
66 |
-@@ -2200,7 +2200,6 @@ if conf.get('ENABLE_RESOLVE') == 1 |
67 |
- libsystemd_resolve_core], |
68 |
- dependencies : [threads, |
69 |
- lib_openssl_or_gcrypt, |
70 |
-- libgpg_error, |
71 |
- libm, |
72 |
- libidn], |
73 |
- install_rpath : rootlibexecdir, |
74 |
-diff --git a/src/resolve/meson.build b/src/resolve/meson.build |
75 |
-index 0580fbeec625..2cdf24b1cbef 100644 |
76 |
---- a/src/resolve/meson.build |
77 |
-+++ b/src/resolve/meson.build |
78 |
-@@ -135,7 +135,7 @@ systemd_resolved_sources += custom_target( |
79 |
- output : 'resolved-dnssd-gperf.c', |
80 |
- command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) |
81 |
- |
82 |
--systemd_resolved_dependencies = [threads, libgpg_error, libm] |
83 |
-+systemd_resolved_dependencies = [threads, libm] + [lib_openssl_or_gcrypt] |
84 |
- if conf.get('ENABLE_DNS_OVER_TLS') == 1 |
85 |
- if conf.get('DNS_OVER_TLS_USE_GNUTLS') == 1 |
86 |
- systemd_resolved_sources += files( |
87 |
-@@ -178,14 +178,12 @@ tests += [ |
88 |
- [libsystemd_resolve_core, |
89 |
- libshared], |
90 |
- [lib_openssl_or_gcrypt, |
91 |
-- libgpg_error, |
92 |
- libm]], |
93 |
- |
94 |
- [['src/resolve/test-dns-packet.c'], |
95 |
- [libsystemd_resolve_core, |
96 |
- libshared], |
97 |
- [lib_openssl_or_gcrypt, |
98 |
-- libgpg_error, |
99 |
- libm]], |
100 |
- |
101 |
- [['src/resolve/test-resolved-etc-hosts.c', |
102 |
-@@ -194,21 +192,18 @@ tests += [ |
103 |
- [libsystemd_resolve_core, |
104 |
- libshared], |
105 |
- [lib_openssl_or_gcrypt, |
106 |
-- libgpg_error, |
107 |
- libm]], |
108 |
- |
109 |
- [['src/resolve/test-resolved-packet.c'], |
110 |
- [libsystemd_resolve_core, |
111 |
- libshared], |
112 |
- [lib_openssl_or_gcrypt, |
113 |
-- libgpg_error, |
114 |
- libm]], |
115 |
- |
116 |
- [['src/resolve/test-dnssec.c'], |
117 |
- [libsystemd_resolve_core, |
118 |
- libshared], |
119 |
- [lib_openssl_or_gcrypt, |
120 |
-- libgpg_error, |
121 |
- libm], |
122 |
- [], 'HAVE_OPENSSL_OR_GCRYPT'], |
123 |
- |
124 |
-@@ -216,7 +211,6 @@ tests += [ |
125 |
- [libsystemd_resolve_core, |
126 |
- libshared], |
127 |
- [lib_openssl_or_gcrypt, |
128 |
-- libgpg_error, |
129 |
- libm], |
130 |
- [], '', 'manual'], |
131 |
- ] |
132 |
-@@ -226,6 +220,5 @@ fuzzers += [ |
133 |
- [libsystemd_resolve_core, |
134 |
- libshared], |
135 |
- [lib_openssl_or_gcrypt, |
136 |
-- libgpg_error, |
137 |
- libm]], |
138 |
- ] |
139 |
|
140 |
diff --git a/sys-apps/systemd/systemd-249.6-r1.ebuild b/sys-apps/systemd/systemd-249.6-r1.ebuild |
141 |
deleted file mode 100644 |
142 |
index 0e72de6fff3e..000000000000 |
143 |
--- a/sys-apps/systemd/systemd-249.6-r1.ebuild |
144 |
+++ /dev/null |
145 |
@@ -1,505 +0,0 @@ |
146 |
-# Copyright 2011-2021 Gentoo Authors |
147 |
-# Distributed under the terms of the GNU General Public License v2 |
148 |
- |
149 |
-EAPI=7 |
150 |
-PYTHON_COMPAT=( python3_{8..10} ) |
151 |
- |
152 |
-# Avoid QA warnings |
153 |
-TMPFILES_OPTIONAL=1 |
154 |
- |
155 |
-if [[ ${PV} == 9999 ]]; then |
156 |
- EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
157 |
- inherit git-r3 |
158 |
-else |
159 |
- if [[ ${PV} == *.* ]]; then |
160 |
- MY_PN=systemd-stable |
161 |
- else |
162 |
- MY_PN=systemd |
163 |
- fi |
164 |
- MY_PV=${PV/_/-} |
165 |
- MY_P=${MY_PN}-${MY_PV} |
166 |
- S=${WORKDIR}/${MY_P} |
167 |
- SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" |
168 |
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86" |
169 |
-fi |
170 |
- |
171 |
-inherit bash-completion-r1 linux-info meson-multilib pam python-any-r1 systemd toolchain-funcs udev usr-ldscript |
172 |
- |
173 |
-DESCRIPTION="System and service manager for Linux" |
174 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
175 |
- |
176 |
-LICENSE="GPL-2 LGPL-2.1 MIT public-domain" |
177 |
-SLOT="0/2" |
178 |
-IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils fido2 +gcrypt gnuefi homed http idn importd +kmod +lz4 lzma nat pam pcre pkcs11 policykit pwquality qrcode repart +resolvconf +seccomp selinux split-usr +sysv-utils test tpm vanilla xkb +zstd" |
179 |
- |
180 |
-REQUIRED_USE=" |
181 |
- homed? ( cryptsetup pam ) |
182 |
- importd? ( curl gcrypt lzma ) |
183 |
- pwquality? ( homed ) |
184 |
-" |
185 |
-RESTRICT="!test? ( test )" |
186 |
- |
187 |
-MINKV="3.11" |
188 |
- |
189 |
-OPENSSL_DEP=">=dev-libs/openssl-1.1.0:0=" |
190 |
- |
191 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] |
192 |
- sys-libs/libcap:0=[${MULTILIB_USEDEP}] |
193 |
- virtual/libcrypt:=[${MULTILIB_USEDEP}] |
194 |
- acl? ( sys-apps/acl:0= ) |
195 |
- apparmor? ( sys-libs/libapparmor:0= ) |
196 |
- audit? ( >=sys-process/audit-2:0= ) |
197 |
- cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= ) |
198 |
- curl? ( net-misc/curl:0= ) |
199 |
- dns-over-tls? ( >=net-libs/gnutls-3.6.0:0= ) |
200 |
- elfutils? ( >=dev-libs/elfutils-0.158:0= ) |
201 |
- fido2? ( dev-libs/libfido2:0= ) |
202 |
- gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) |
203 |
- homed? ( ${OPENSSL_DEP} ) |
204 |
- http? ( |
205 |
- >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] |
206 |
- >=net-libs/gnutls-3.1.4:0= |
207 |
- ) |
208 |
- idn? ( net-dns/libidn2:= ) |
209 |
- importd? ( |
210 |
- app-arch/bzip2:0= |
211 |
- sys-libs/zlib:0= |
212 |
- ) |
213 |
- kmod? ( >=sys-apps/kmod-15:0= ) |
214 |
- lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) |
215 |
- lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) |
216 |
- nat? ( net-firewall/iptables:0= ) |
217 |
- pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] ) |
218 |
- pkcs11? ( app-crypt/p11-kit:0= ) |
219 |
- pcre? ( dev-libs/libpcre2 ) |
220 |
- pwquality? ( dev-libs/libpwquality:0= ) |
221 |
- qrcode? ( media-gfx/qrencode:0= ) |
222 |
- repart? ( ${OPENSSL_DEP} ) |
223 |
- seccomp? ( >=sys-libs/libseccomp-2.3.3:0= ) |
224 |
- selinux? ( sys-libs/libselinux:0= ) |
225 |
- tpm? ( app-crypt/tpm2-tss:0= ) |
226 |
- xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) |
227 |
- zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] ) |
228 |
-" |
229 |
- |
230 |
-# Newer linux-headers needed by ia64, bug #480218 |
231 |
-DEPEND="${COMMON_DEPEND} |
232 |
- >=sys-kernel/linux-headers-${MINKV} |
233 |
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) |
234 |
-" |
235 |
- |
236 |
-# baselayout-2.2 has /run |
237 |
-RDEPEND="${COMMON_DEPEND} |
238 |
- >=acct-group/adm-0-r1 |
239 |
- >=acct-group/wheel-0-r1 |
240 |
- >=acct-group/kmem-0-r1 |
241 |
- >=acct-group/tty-0-r1 |
242 |
- >=acct-group/utmp-0-r1 |
243 |
- >=acct-group/audio-0-r1 |
244 |
- >=acct-group/cdrom-0-r1 |
245 |
- >=acct-group/dialout-0-r1 |
246 |
- >=acct-group/disk-0-r1 |
247 |
- >=acct-group/input-0-r1 |
248 |
- >=acct-group/kvm-0-r1 |
249 |
- >=acct-group/lp-0-r1 |
250 |
- >=acct-group/render-0-r1 |
251 |
- acct-group/sgx |
252 |
- >=acct-group/tape-0-r1 |
253 |
- acct-group/users |
254 |
- >=acct-group/video-0-r1 |
255 |
- >=acct-group/systemd-journal-0-r1 |
256 |
- >=acct-user/root-0-r1 |
257 |
- acct-user/nobody |
258 |
- >=acct-user/systemd-journal-remote-0-r1 |
259 |
- >=acct-user/systemd-coredump-0-r1 |
260 |
- >=acct-user/systemd-network-0-r1 |
261 |
- acct-user/systemd-oom |
262 |
- >=acct-user/systemd-resolve-0-r1 |
263 |
- >=acct-user/systemd-timesync-0-r1 |
264 |
- >=sys-apps/baselayout-2.2 |
265 |
- selinux? ( sec-policy/selinux-base-policy[systemd] ) |
266 |
- sysv-utils? ( |
267 |
- !sys-apps/openrc[sysv-utils(-)] |
268 |
- !sys-apps/sysvinit |
269 |
- ) |
270 |
- !sysv-utils? ( sys-apps/sysvinit ) |
271 |
- resolvconf? ( !net-dns/openresolv ) |
272 |
- !build? ( || ( |
273 |
- sys-apps/util-linux[kill(-)] |
274 |
- sys-process/procps[kill(+)] |
275 |
- sys-apps/coreutils[kill(-)] |
276 |
- ) ) |
277 |
- !sys-apps/hwids[udev] |
278 |
- !sys-auth/nss-myhostname |
279 |
- !sys-fs/eudev |
280 |
- !sys-fs/udev |
281 |
-" |
282 |
- |
283 |
-# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) |
284 |
-PDEPEND=">=sys-apps/dbus-1.9.8[systemd] |
285 |
- >=sys-fs/udev-init-scripts-34 |
286 |
- policykit? ( sys-auth/polkit ) |
287 |
- !vanilla? ( sys-apps/gentoo-systemd-integration )" |
288 |
- |
289 |
-BDEPEND=" |
290 |
- app-arch/xz-utils:0 |
291 |
- dev-util/gperf |
292 |
- >=dev-util/meson-0.46 |
293 |
- >=sys-apps/coreutils-8.16 |
294 |
- sys-devel/gettext |
295 |
- virtual/pkgconfig |
296 |
- test? ( |
297 |
- app-text/tree |
298 |
- dev-lang/perl |
299 |
- sys-apps/dbus |
300 |
- ) |
301 |
- app-text/docbook-xml-dtd:4.2 |
302 |
- app-text/docbook-xml-dtd:4.5 |
303 |
- app-text/docbook-xsl-stylesheets |
304 |
- dev-libs/libxslt:0 |
305 |
- $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') |
306 |
- $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') |
307 |
-" |
308 |
- |
309 |
-python_check_deps() { |
310 |
- has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" && |
311 |
- has_version -b "dev-python/lxml[${PYTHON_USEDEP}]" |
312 |
-} |
313 |
- |
314 |
-QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" |
315 |
-QA_EXECSTACK="usr/lib/systemd/boot/efi/*" |
316 |
- |
317 |
-pkg_pretend() { |
318 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
319 |
- if use test && has pid-sandbox ${FEATURES}; then |
320 |
- ewarn "Tests are known to fail with PID sandboxing enabled." |
321 |
- ewarn "See https://bugs.gentoo.org/674458." |
322 |
- fi |
323 |
- |
324 |
- local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS |
325 |
- ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE |
326 |
- ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS |
327 |
- ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS |
328 |
- ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH |
329 |
- ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED |
330 |
- ~!SYSFS_DEPRECATED_V2" |
331 |
- |
332 |
- use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" |
333 |
- use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" |
334 |
- kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" |
335 |
- kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" |
336 |
- kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF" |
337 |
- |
338 |
- if kernel_is -lt 5 10 20; then |
339 |
- CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" |
340 |
- else |
341 |
- CONFIG_CHECK+=" ~KCMP" |
342 |
- fi |
343 |
- |
344 |
- if linux_config_exists; then |
345 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
346 |
- if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then |
347 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
348 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
349 |
- fi |
350 |
- if linux_chkconfig_present X86; then |
351 |
- CONFIG_CHECK+=" ~DMIID" |
352 |
- fi |
353 |
- fi |
354 |
- |
355 |
- if kernel_is -lt ${MINKV//./ }; then |
356 |
- ewarn "Kernel version at least ${MINKV} required" |
357 |
- fi |
358 |
- |
359 |
- check_extra_config |
360 |
- fi |
361 |
-} |
362 |
- |
363 |
-pkg_setup() { |
364 |
- : |
365 |
-} |
366 |
- |
367 |
-src_unpack() { |
368 |
- default |
369 |
- [[ ${PV} != 9999 ]] || git-r3_src_unpack |
370 |
-} |
371 |
- |
372 |
-src_prepare() { |
373 |
- # Do NOT add patches here |
374 |
- local PATCHES=() |
375 |
- |
376 |
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches ) |
377 |
- |
378 |
- # Add local patches here |
379 |
- PATCHES+=( |
380 |
- ) |
381 |
- |
382 |
- if ! use vanilla; then |
383 |
- PATCHES+=( |
384 |
- "${FILESDIR}/gentoo-generator-path-r2.patch" |
385 |
- "${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch" |
386 |
- "${FILESDIR}/gentoo-journald-audit.patch" |
387 |
- ) |
388 |
- fi |
389 |
- |
390 |
- default |
391 |
-} |
392 |
- |
393 |
-src_configure() { |
394 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
395 |
- tc-export AR CC NM OBJCOPY RANLIB |
396 |
- |
397 |
- python_setup |
398 |
- |
399 |
- multilib-minimal_src_configure |
400 |
-} |
401 |
- |
402 |
-multilib_src_configure() { |
403 |
- local myconf=( |
404 |
- --localstatedir="${EPREFIX}/var" |
405 |
- -Dsupport-url="https://gentoo.org/support/" |
406 |
- -Dpamlibdir="$(getpam_mod_dir)" |
407 |
- # avoid bash-completion dep |
408 |
- -Dbashcompletiondir="$(get_bashcompdir)" |
409 |
- # make sure we get /bin:/sbin in PATH |
410 |
- $(meson_use split-usr) |
411 |
- -Dsplit-bin=true |
412 |
- -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" |
413 |
- -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" |
414 |
- # Avoid infinite exec recursion, bug 642724 |
415 |
- -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit" |
416 |
- # no deps |
417 |
- -Dima=true |
418 |
- -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified) |
419 |
- # Optional components/dependencies |
420 |
- $(meson_native_use_bool acl) |
421 |
- $(meson_native_use_bool apparmor) |
422 |
- $(meson_native_use_bool audit) |
423 |
- $(meson_native_use_bool cryptsetup libcryptsetup) |
424 |
- $(meson_native_use_bool curl libcurl) |
425 |
- $(meson_native_use_bool dns-over-tls dns-over-tls) |
426 |
- $(meson_native_use_bool elfutils) |
427 |
- $(meson_native_use_bool fido2 libfido2) |
428 |
- $(meson_use gcrypt) |
429 |
- $(meson_native_use_bool gnuefi gnu-efi) |
430 |
- -Defi-includedir="${ESYSROOT}/usr/include/efi" |
431 |
- -Defi-ld="$(tc-getLD)" |
432 |
- -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" |
433 |
- $(meson_native_use_bool homed) |
434 |
- $(meson_native_use_bool http microhttpd) |
435 |
- $(meson_native_use_bool idn) |
436 |
- $(meson_native_use_bool importd) |
437 |
- $(meson_native_use_bool importd bzip2) |
438 |
- $(meson_native_use_bool importd zlib) |
439 |
- $(meson_native_use_bool kmod) |
440 |
- $(meson_use lz4) |
441 |
- $(meson_use lzma xz) |
442 |
- $(meson_use zstd) |
443 |
- $(meson_native_use_bool nat libiptc) |
444 |
- $(meson_use pam) |
445 |
- $(meson_native_use_bool pkcs11 p11kit) |
446 |
- $(meson_native_use_bool pcre pcre2) |
447 |
- $(meson_native_use_bool policykit polkit) |
448 |
- $(meson_native_use_bool pwquality) |
449 |
- $(meson_native_use_bool qrcode qrencode) |
450 |
- $(meson_native_use_bool repart) |
451 |
- $(meson_native_use_bool seccomp) |
452 |
- $(meson_native_use_bool selinux) |
453 |
- $(meson_native_use_bool tpm tpm2) |
454 |
- $(meson_native_use_bool test dbus) |
455 |
- $(meson_native_use_bool xkb xkbcommon) |
456 |
- -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" |
457 |
- # Breaks screen, tmux, etc. |
458 |
- -Ddefault-kill-user-processes=false |
459 |
- -Dcreate-log-dirs=false |
460 |
- |
461 |
- # multilib options |
462 |
- $(meson_native_true backlight) |
463 |
- $(meson_native_true binfmt) |
464 |
- $(meson_native_true coredump) |
465 |
- $(meson_native_true environment-d) |
466 |
- $(meson_native_true firstboot) |
467 |
- $(meson_native_true hibernate) |
468 |
- $(meson_native_true hostnamed) |
469 |
- $(meson_native_true ldconfig) |
470 |
- $(meson_native_true localed) |
471 |
- $(meson_native_true man) |
472 |
- $(meson_native_true networkd) |
473 |
- $(meson_native_true quotacheck) |
474 |
- $(meson_native_true randomseed) |
475 |
- $(meson_native_true rfkill) |
476 |
- $(meson_native_true sysusers) |
477 |
- $(meson_native_true timedated) |
478 |
- $(meson_native_true timesyncd) |
479 |
- $(meson_native_true tmpfiles) |
480 |
- $(meson_native_true vconsole) |
481 |
- ) |
482 |
- |
483 |
- meson_src_configure "${myconf[@]}" |
484 |
-} |
485 |
- |
486 |
-multilib_src_test() { |
487 |
- unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR |
488 |
- meson_src_test |
489 |
-} |
490 |
- |
491 |
-multilib_src_install_all() { |
492 |
- local rootprefix=$(usex split-usr '' /usr) |
493 |
- |
494 |
- # meson doesn't know about docdir |
495 |
- mv "${ED}"/usr/share/doc/{systemd,${PF}} || die |
496 |
- |
497 |
- einstalldocs |
498 |
- dodoc "${FILESDIR}"/nsswitch.conf |
499 |
- |
500 |
- if ! use resolvconf; then |
501 |
- rm -f "${ED}${rootprefix}"/sbin/resolvconf || die |
502 |
- fi |
503 |
- |
504 |
- rm "${ED}"/etc/init.d/README || die |
505 |
- rm "${ED}${rootprefix}"/lib/systemd/system-generators/systemd-sysv-generator || die |
506 |
- |
507 |
- if ! use sysv-utils; then |
508 |
- rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die |
509 |
- rm "${ED}"/usr/share/man/man1/init.1 || die |
510 |
- rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die |
511 |
- fi |
512 |
- |
513 |
- if ! use resolvconf && ! use sysv-utils; then |
514 |
- rmdir "${ED}${rootprefix}"/sbin || die |
515 |
- fi |
516 |
- |
517 |
- # https://bugs.gentoo.org/761763 |
518 |
- rm -r "${ED}"/usr/lib/sysusers.d || die |
519 |
- |
520 |
- # Preserve empty dirs in /etc & /var, bug #437008 |
521 |
- keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} |
522 |
- keepdir /etc/kernel/install.d |
523 |
- keepdir /etc/systemd/{network,system,user} |
524 |
- keepdir /etc/udev/rules.d |
525 |
- |
526 |
- keepdir /etc/udev/hwdb.d |
527 |
- |
528 |
- keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} |
529 |
- keepdir /usr/lib/{binfmt.d,modules-load.d} |
530 |
- keepdir /usr/lib/systemd/user-generators |
531 |
- keepdir /var/lib/systemd |
532 |
- keepdir /var/log/journal |
533 |
- |
534 |
- # Symlink /etc/sysctl.conf for easy migration. |
535 |
- dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf |
536 |
- |
537 |
- if use pam; then |
538 |
- newpamd "${FILESDIR}"/systemd-user.pam systemd-user |
539 |
- fi |
540 |
- |
541 |
- if use split-usr; then |
542 |
- # Avoid breaking boot/reboot |
543 |
- dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd |
544 |
- dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown |
545 |
- fi |
546 |
- |
547 |
- gen_usr_ldscript -a systemd udev |
548 |
-} |
549 |
- |
550 |
-migrate_locale() { |
551 |
- local envd_locale_def="${EROOT}/etc/env.d/02locale" |
552 |
- local envd_locale=( "${EROOT}"/etc/env.d/??locale ) |
553 |
- local locale_conf="${EROOT}/etc/locale.conf" |
554 |
- |
555 |
- if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
556 |
- # If locale.conf does not exist... |
557 |
- if [[ -e ${envd_locale} ]]; then |
558 |
- # ...either copy env.d/??locale if there's one |
559 |
- ebegin "Moving ${envd_locale} to ${locale_conf}" |
560 |
- mv "${envd_locale}" "${locale_conf}" |
561 |
- eend ${?} || FAIL=1 |
562 |
- else |
563 |
- # ...or create a dummy default |
564 |
- ebegin "Creating ${locale_conf}" |
565 |
- cat > "${locale_conf}" <<-EOF |
566 |
- # This file has been created by the sys-apps/systemd ebuild. |
567 |
- # See locale.conf(5) and localectl(1). |
568 |
- |
569 |
- # LANG=${LANG} |
570 |
- EOF |
571 |
- eend ${?} || FAIL=1 |
572 |
- fi |
573 |
- fi |
574 |
- |
575 |
- if [[ ! -L ${envd_locale} ]]; then |
576 |
- # now, if env.d/??locale is not a symlink (to locale.conf)... |
577 |
- if [[ -e ${envd_locale} ]]; then |
578 |
- # ...warn the user that he has duplicate locale settings |
579 |
- ewarn |
580 |
- ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
581 |
- ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
582 |
- ewarn "and create the symlink with the following command:" |
583 |
- ewarn "ln -s -n -f ../locale.conf ${envd_locale}" |
584 |
- ewarn |
585 |
- else |
586 |
- # ...or just create the symlink if there's nothing here |
587 |
- ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" |
588 |
- ln -n -s ../locale.conf "${envd_locale_def}" |
589 |
- eend ${?} || FAIL=1 |
590 |
- fi |
591 |
- fi |
592 |
-} |
593 |
- |
594 |
-pkg_preinst() { |
595 |
- if ! use split-usr; then |
596 |
- local dir |
597 |
- for dir in bin sbin lib; do |
598 |
- if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then |
599 |
- eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged." |
600 |
- eerror "One of them should be a symbolic link to the other one." |
601 |
- FAIL=1 |
602 |
- fi |
603 |
- done |
604 |
- if [[ ${FAIL} ]]; then |
605 |
- eerror "Migration to system layout with merged directories must be performed before" |
606 |
- eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage." |
607 |
- die "System layout with split directories still used" |
608 |
- fi |
609 |
- fi |
610 |
-} |
611 |
- |
612 |
-pkg_postinst() { |
613 |
- systemd_update_catalog |
614 |
- |
615 |
- # Keep this here in case the database format changes so it gets updated |
616 |
- # when required. |
617 |
- systemd-hwdb --root="${ROOT}" update |
618 |
- |
619 |
- udev_reload || FAIL=1 |
620 |
- |
621 |
- # Bug 465468, make sure locales are respected, and ensure consistency |
622 |
- # between OpenRC & systemd |
623 |
- migrate_locale |
624 |
- |
625 |
- if [[ -z ${REPLACING_VERSIONS} ]]; then |
626 |
- if type systemctl &>/dev/null; then |
627 |
- systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1 |
628 |
- fi |
629 |
- elog "To enable a useful set of services, run the following:" |
630 |
- elog " systemctl preset-all --preset-mode=enable-only" |
631 |
- fi |
632 |
- |
633 |
- if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then |
634 |
- rm "${EROOT}/var/lib/systemd/timesync" |
635 |
- fi |
636 |
- |
637 |
- if [[ ${FAIL} ]]; then |
638 |
- eerror "One of the postinst commands failed. Please check the postinst output" |
639 |
- eerror "for errors. You may need to clean up your system and/or try installing" |
640 |
- eerror "systemd again." |
641 |
- eerror |
642 |
- fi |
643 |
-} |
644 |
- |
645 |
-pkg_prerm() { |
646 |
- # If removing systemd completely, remove the catalog database. |
647 |
- if [[ ! ${REPLACED_BY_VERSION} ]]; then |
648 |
- rm -f -v "${EROOT}"/var/lib/systemd/catalog/database |
649 |
- fi |
650 |
-} |
651 |
|
652 |
diff --git a/sys-apps/systemd/systemd-249.7-r1.ebuild b/sys-apps/systemd/systemd-249.7-r1.ebuild |
653 |
deleted file mode 100644 |
654 |
index 84bdcb174f3d..000000000000 |
655 |
--- a/sys-apps/systemd/systemd-249.7-r1.ebuild |
656 |
+++ /dev/null |
657 |
@@ -1,507 +0,0 @@ |
658 |
-# Copyright 2011-2022 Gentoo Authors |
659 |
-# Distributed under the terms of the GNU General Public License v2 |
660 |
- |
661 |
-EAPI=7 |
662 |
-PYTHON_COMPAT=( python3_{8..10} ) |
663 |
- |
664 |
-# Avoid QA warnings |
665 |
-TMPFILES_OPTIONAL=1 |
666 |
- |
667 |
-if [[ ${PV} == 9999 ]]; then |
668 |
- EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
669 |
- inherit git-r3 |
670 |
-else |
671 |
- if [[ ${PV} == *.* ]]; then |
672 |
- MY_PN=systemd-stable |
673 |
- else |
674 |
- MY_PN=systemd |
675 |
- fi |
676 |
- MY_PV=${PV/_/-} |
677 |
- MY_P=${MY_PN}-${MY_PV} |
678 |
- S=${WORKDIR}/${MY_P} |
679 |
- SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" |
680 |
- SRC_URI+=" https://dev.gentoo.org/~floppym/dist/systemd-249.7-CVE-2021-3997.tar.gz" |
681 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" |
682 |
-fi |
683 |
- |
684 |
-inherit bash-completion-r1 linux-info meson-multilib pam python-any-r1 systemd toolchain-funcs udev usr-ldscript |
685 |
- |
686 |
-DESCRIPTION="System and service manager for Linux" |
687 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
688 |
- |
689 |
-LICENSE="GPL-2 LGPL-2.1 MIT public-domain" |
690 |
-SLOT="0/2" |
691 |
-IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils fido2 +gcrypt gnuefi homed http idn importd +kmod +lz4 lzma nat pam pcre pkcs11 policykit pwquality qrcode repart +resolvconf +seccomp selinux split-usr +sysv-utils test tpm vanilla xkb +zstd" |
692 |
- |
693 |
-REQUIRED_USE=" |
694 |
- homed? ( cryptsetup pam ) |
695 |
- importd? ( curl gcrypt lzma ) |
696 |
- pwquality? ( homed ) |
697 |
-" |
698 |
-RESTRICT="!test? ( test )" |
699 |
- |
700 |
-MINKV="3.11" |
701 |
- |
702 |
-OPENSSL_DEP=">=dev-libs/openssl-1.1.0:0=" |
703 |
- |
704 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] |
705 |
- sys-libs/libcap:0=[${MULTILIB_USEDEP}] |
706 |
- virtual/libcrypt:=[${MULTILIB_USEDEP}] |
707 |
- acl? ( sys-apps/acl:0= ) |
708 |
- apparmor? ( sys-libs/libapparmor:0= ) |
709 |
- audit? ( >=sys-process/audit-2:0= ) |
710 |
- cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= ) |
711 |
- curl? ( net-misc/curl:0= ) |
712 |
- dns-over-tls? ( >=net-libs/gnutls-3.6.0:0= ) |
713 |
- elfutils? ( >=dev-libs/elfutils-0.158:0= ) |
714 |
- fido2? ( dev-libs/libfido2:0= ) |
715 |
- gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) |
716 |
- homed? ( ${OPENSSL_DEP} ) |
717 |
- http? ( |
718 |
- >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] |
719 |
- >=net-libs/gnutls-3.1.4:0= |
720 |
- ) |
721 |
- idn? ( net-dns/libidn2:= ) |
722 |
- importd? ( |
723 |
- app-arch/bzip2:0= |
724 |
- sys-libs/zlib:0= |
725 |
- ) |
726 |
- kmod? ( >=sys-apps/kmod-15:0= ) |
727 |
- lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) |
728 |
- lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) |
729 |
- nat? ( net-firewall/iptables:0= ) |
730 |
- pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] ) |
731 |
- pkcs11? ( app-crypt/p11-kit:0= ) |
732 |
- pcre? ( dev-libs/libpcre2 ) |
733 |
- pwquality? ( dev-libs/libpwquality:0= ) |
734 |
- qrcode? ( media-gfx/qrencode:0= ) |
735 |
- repart? ( ${OPENSSL_DEP} ) |
736 |
- seccomp? ( >=sys-libs/libseccomp-2.3.3:0= ) |
737 |
- selinux? ( sys-libs/libselinux:0= ) |
738 |
- tpm? ( app-crypt/tpm2-tss:0= ) |
739 |
- xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) |
740 |
- zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] ) |
741 |
-" |
742 |
- |
743 |
-# Newer linux-headers needed by ia64, bug #480218 |
744 |
-DEPEND="${COMMON_DEPEND} |
745 |
- >=sys-kernel/linux-headers-${MINKV} |
746 |
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) |
747 |
-" |
748 |
- |
749 |
-# baselayout-2.2 has /run |
750 |
-RDEPEND="${COMMON_DEPEND} |
751 |
- >=acct-group/adm-0-r1 |
752 |
- >=acct-group/wheel-0-r1 |
753 |
- >=acct-group/kmem-0-r1 |
754 |
- >=acct-group/tty-0-r1 |
755 |
- >=acct-group/utmp-0-r1 |
756 |
- >=acct-group/audio-0-r1 |
757 |
- >=acct-group/cdrom-0-r1 |
758 |
- >=acct-group/dialout-0-r1 |
759 |
- >=acct-group/disk-0-r1 |
760 |
- >=acct-group/input-0-r1 |
761 |
- >=acct-group/kvm-0-r1 |
762 |
- >=acct-group/lp-0-r1 |
763 |
- >=acct-group/render-0-r1 |
764 |
- acct-group/sgx |
765 |
- >=acct-group/tape-0-r1 |
766 |
- acct-group/users |
767 |
- >=acct-group/video-0-r1 |
768 |
- >=acct-group/systemd-journal-0-r1 |
769 |
- >=acct-user/root-0-r1 |
770 |
- acct-user/nobody |
771 |
- >=acct-user/systemd-journal-remote-0-r1 |
772 |
- >=acct-user/systemd-coredump-0-r1 |
773 |
- >=acct-user/systemd-network-0-r1 |
774 |
- acct-user/systemd-oom |
775 |
- >=acct-user/systemd-resolve-0-r1 |
776 |
- >=acct-user/systemd-timesync-0-r1 |
777 |
- >=sys-apps/baselayout-2.2 |
778 |
- selinux? ( sec-policy/selinux-base-policy[systemd] ) |
779 |
- sysv-utils? ( |
780 |
- !sys-apps/openrc[sysv-utils(-)] |
781 |
- !sys-apps/sysvinit |
782 |
- ) |
783 |
- !sysv-utils? ( sys-apps/sysvinit ) |
784 |
- resolvconf? ( !net-dns/openresolv ) |
785 |
- !build? ( || ( |
786 |
- sys-apps/util-linux[kill(-)] |
787 |
- sys-process/procps[kill(+)] |
788 |
- sys-apps/coreutils[kill(-)] |
789 |
- ) ) |
790 |
- !sys-apps/hwids[udev] |
791 |
- !sys-auth/nss-myhostname |
792 |
- !sys-fs/eudev |
793 |
- !sys-fs/udev |
794 |
-" |
795 |
- |
796 |
-# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) |
797 |
-PDEPEND=">=sys-apps/dbus-1.9.8[systemd] |
798 |
- >=sys-fs/udev-init-scripts-34 |
799 |
- policykit? ( sys-auth/polkit ) |
800 |
- !vanilla? ( sys-apps/gentoo-systemd-integration )" |
801 |
- |
802 |
-BDEPEND=" |
803 |
- app-arch/xz-utils:0 |
804 |
- dev-util/gperf |
805 |
- >=dev-util/meson-0.46 |
806 |
- >=sys-apps/coreutils-8.16 |
807 |
- sys-devel/gettext |
808 |
- virtual/pkgconfig |
809 |
- test? ( |
810 |
- app-text/tree |
811 |
- dev-lang/perl |
812 |
- sys-apps/dbus |
813 |
- ) |
814 |
- app-text/docbook-xml-dtd:4.2 |
815 |
- app-text/docbook-xml-dtd:4.5 |
816 |
- app-text/docbook-xsl-stylesheets |
817 |
- dev-libs/libxslt:0 |
818 |
- $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') |
819 |
- $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') |
820 |
-" |
821 |
- |
822 |
-python_check_deps() { |
823 |
- has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" && |
824 |
- has_version -b "dev-python/lxml[${PYTHON_USEDEP}]" |
825 |
-} |
826 |
- |
827 |
-QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" |
828 |
-QA_EXECSTACK="usr/lib/systemd/boot/efi/*" |
829 |
- |
830 |
-pkg_pretend() { |
831 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
832 |
- if use test && has pid-sandbox ${FEATURES}; then |
833 |
- ewarn "Tests are known to fail with PID sandboxing enabled." |
834 |
- ewarn "See https://bugs.gentoo.org/674458." |
835 |
- fi |
836 |
- |
837 |
- local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS |
838 |
- ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE |
839 |
- ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS |
840 |
- ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS |
841 |
- ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH |
842 |
- ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED |
843 |
- ~!SYSFS_DEPRECATED_V2" |
844 |
- |
845 |
- use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" |
846 |
- use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" |
847 |
- kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" |
848 |
- kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" |
849 |
- kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF" |
850 |
- |
851 |
- if kernel_is -lt 5 10 20; then |
852 |
- CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" |
853 |
- else |
854 |
- CONFIG_CHECK+=" ~KCMP" |
855 |
- fi |
856 |
- |
857 |
- if linux_config_exists; then |
858 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
859 |
- if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then |
860 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
861 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
862 |
- fi |
863 |
- if linux_chkconfig_present X86; then |
864 |
- CONFIG_CHECK+=" ~DMIID" |
865 |
- fi |
866 |
- fi |
867 |
- |
868 |
- if kernel_is -lt ${MINKV//./ }; then |
869 |
- ewarn "Kernel version at least ${MINKV} required" |
870 |
- fi |
871 |
- |
872 |
- check_extra_config |
873 |
- fi |
874 |
-} |
875 |
- |
876 |
-pkg_setup() { |
877 |
- : |
878 |
-} |
879 |
- |
880 |
-src_unpack() { |
881 |
- default |
882 |
- [[ ${PV} != 9999 ]] || git-r3_src_unpack |
883 |
-} |
884 |
- |
885 |
-src_prepare() { |
886 |
- # Do NOT add patches here |
887 |
- local PATCHES=() |
888 |
- |
889 |
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches ) |
890 |
- |
891 |
- # Add local patches here |
892 |
- PATCHES+=( |
893 |
- "${WORKDIR}/systemd-249.7-CVE-2021-3997" |
894 |
- ) |
895 |
- |
896 |
- if ! use vanilla; then |
897 |
- PATCHES+=( |
898 |
- "${FILESDIR}/gentoo-generator-path-r2.patch" |
899 |
- "${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch" |
900 |
- "${FILESDIR}/gentoo-journald-audit.patch" |
901 |
- ) |
902 |
- fi |
903 |
- |
904 |
- default |
905 |
-} |
906 |
- |
907 |
-src_configure() { |
908 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
909 |
- tc-export AR CC NM OBJCOPY RANLIB |
910 |
- |
911 |
- python_setup |
912 |
- |
913 |
- multilib-minimal_src_configure |
914 |
-} |
915 |
- |
916 |
-multilib_src_configure() { |
917 |
- local myconf=( |
918 |
- --localstatedir="${EPREFIX}/var" |
919 |
- -Dsupport-url="https://gentoo.org/support/" |
920 |
- -Dpamlibdir="$(getpam_mod_dir)" |
921 |
- # avoid bash-completion dep |
922 |
- -Dbashcompletiondir="$(get_bashcompdir)" |
923 |
- # make sure we get /bin:/sbin in PATH |
924 |
- $(meson_use split-usr) |
925 |
- -Dsplit-bin=true |
926 |
- -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" |
927 |
- -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" |
928 |
- # Avoid infinite exec recursion, bug 642724 |
929 |
- -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit" |
930 |
- # no deps |
931 |
- -Dima=true |
932 |
- -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified) |
933 |
- # Optional components/dependencies |
934 |
- $(meson_native_use_bool acl) |
935 |
- $(meson_native_use_bool apparmor) |
936 |
- $(meson_native_use_bool audit) |
937 |
- $(meson_native_use_bool cryptsetup libcryptsetup) |
938 |
- $(meson_native_use_bool curl libcurl) |
939 |
- $(meson_native_use_bool dns-over-tls dns-over-tls) |
940 |
- $(meson_native_use_bool elfutils) |
941 |
- $(meson_native_use_bool fido2 libfido2) |
942 |
- $(meson_use gcrypt) |
943 |
- $(meson_native_use_bool gnuefi gnu-efi) |
944 |
- -Defi-includedir="${ESYSROOT}/usr/include/efi" |
945 |
- -Defi-ld="$(tc-getLD)" |
946 |
- -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" |
947 |
- $(meson_native_use_bool homed) |
948 |
- $(meson_native_use_bool http microhttpd) |
949 |
- $(meson_native_use_bool idn) |
950 |
- $(meson_native_use_bool importd) |
951 |
- $(meson_native_use_bool importd bzip2) |
952 |
- $(meson_native_use_bool importd zlib) |
953 |
- $(meson_native_use_bool kmod) |
954 |
- $(meson_use lz4) |
955 |
- $(meson_use lzma xz) |
956 |
- $(meson_use zstd) |
957 |
- $(meson_native_use_bool nat libiptc) |
958 |
- $(meson_use pam) |
959 |
- $(meson_native_use_bool pkcs11 p11kit) |
960 |
- $(meson_native_use_bool pcre pcre2) |
961 |
- $(meson_native_use_bool policykit polkit) |
962 |
- $(meson_native_use_bool pwquality) |
963 |
- $(meson_native_use_bool qrcode qrencode) |
964 |
- $(meson_native_use_bool repart) |
965 |
- $(meson_native_use_bool seccomp) |
966 |
- $(meson_native_use_bool selinux) |
967 |
- $(meson_native_use_bool tpm tpm2) |
968 |
- $(meson_native_use_bool test dbus) |
969 |
- $(meson_native_use_bool xkb xkbcommon) |
970 |
- -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" |
971 |
- # Breaks screen, tmux, etc. |
972 |
- -Ddefault-kill-user-processes=false |
973 |
- -Dcreate-log-dirs=false |
974 |
- |
975 |
- # multilib options |
976 |
- $(meson_native_true backlight) |
977 |
- $(meson_native_true binfmt) |
978 |
- $(meson_native_true coredump) |
979 |
- $(meson_native_true environment-d) |
980 |
- $(meson_native_true firstboot) |
981 |
- $(meson_native_true hibernate) |
982 |
- $(meson_native_true hostnamed) |
983 |
- $(meson_native_true ldconfig) |
984 |
- $(meson_native_true localed) |
985 |
- $(meson_native_true man) |
986 |
- $(meson_native_true networkd) |
987 |
- $(meson_native_true quotacheck) |
988 |
- $(meson_native_true randomseed) |
989 |
- $(meson_native_true rfkill) |
990 |
- $(meson_native_true sysusers) |
991 |
- $(meson_native_true timedated) |
992 |
- $(meson_native_true timesyncd) |
993 |
- $(meson_native_true tmpfiles) |
994 |
- $(meson_native_true vconsole) |
995 |
- ) |
996 |
- |
997 |
- meson_src_configure "${myconf[@]}" |
998 |
-} |
999 |
- |
1000 |
-multilib_src_test() { |
1001 |
- unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR |
1002 |
- meson_src_test |
1003 |
-} |
1004 |
- |
1005 |
-multilib_src_install_all() { |
1006 |
- local rootprefix=$(usex split-usr '' /usr) |
1007 |
- |
1008 |
- # meson doesn't know about docdir |
1009 |
- mv "${ED}"/usr/share/doc/{systemd,${PF}} || die |
1010 |
- |
1011 |
- einstalldocs |
1012 |
- dodoc "${FILESDIR}"/nsswitch.conf |
1013 |
- |
1014 |
- if ! use resolvconf; then |
1015 |
- rm -f "${ED}${rootprefix}"/sbin/resolvconf || die |
1016 |
- fi |
1017 |
- |
1018 |
- rm "${ED}"/etc/init.d/README || die |
1019 |
- rm "${ED}${rootprefix}"/lib/systemd/system-generators/systemd-sysv-generator || die |
1020 |
- |
1021 |
- if ! use sysv-utils; then |
1022 |
- rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die |
1023 |
- rm "${ED}"/usr/share/man/man1/init.1 || die |
1024 |
- rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die |
1025 |
- fi |
1026 |
- |
1027 |
- if ! use resolvconf && ! use sysv-utils; then |
1028 |
- rmdir "${ED}${rootprefix}"/sbin || die |
1029 |
- fi |
1030 |
- |
1031 |
- # https://bugs.gentoo.org/761763 |
1032 |
- rm -r "${ED}"/usr/lib/sysusers.d || die |
1033 |
- |
1034 |
- # Preserve empty dirs in /etc & /var, bug #437008 |
1035 |
- keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} |
1036 |
- keepdir /etc/kernel/install.d |
1037 |
- keepdir /etc/systemd/{network,system,user} |
1038 |
- keepdir /etc/udev/rules.d |
1039 |
- |
1040 |
- keepdir /etc/udev/hwdb.d |
1041 |
- |
1042 |
- keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} |
1043 |
- keepdir /usr/lib/{binfmt.d,modules-load.d} |
1044 |
- keepdir /usr/lib/systemd/user-generators |
1045 |
- keepdir /var/lib/systemd |
1046 |
- keepdir /var/log/journal |
1047 |
- |
1048 |
- # Symlink /etc/sysctl.conf for easy migration. |
1049 |
- dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf |
1050 |
- |
1051 |
- if use pam; then |
1052 |
- newpamd "${FILESDIR}"/systemd-user.pam systemd-user |
1053 |
- fi |
1054 |
- |
1055 |
- if use split-usr; then |
1056 |
- # Avoid breaking boot/reboot |
1057 |
- dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd |
1058 |
- dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown |
1059 |
- fi |
1060 |
- |
1061 |
- gen_usr_ldscript -a systemd udev |
1062 |
-} |
1063 |
- |
1064 |
-migrate_locale() { |
1065 |
- local envd_locale_def="${EROOT}/etc/env.d/02locale" |
1066 |
- local envd_locale=( "${EROOT}"/etc/env.d/??locale ) |
1067 |
- local locale_conf="${EROOT}/etc/locale.conf" |
1068 |
- |
1069 |
- if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
1070 |
- # If locale.conf does not exist... |
1071 |
- if [[ -e ${envd_locale} ]]; then |
1072 |
- # ...either copy env.d/??locale if there's one |
1073 |
- ebegin "Moving ${envd_locale} to ${locale_conf}" |
1074 |
- mv "${envd_locale}" "${locale_conf}" |
1075 |
- eend ${?} || FAIL=1 |
1076 |
- else |
1077 |
- # ...or create a dummy default |
1078 |
- ebegin "Creating ${locale_conf}" |
1079 |
- cat > "${locale_conf}" <<-EOF |
1080 |
- # This file has been created by the sys-apps/systemd ebuild. |
1081 |
- # See locale.conf(5) and localectl(1). |
1082 |
- |
1083 |
- # LANG=${LANG} |
1084 |
- EOF |
1085 |
- eend ${?} || FAIL=1 |
1086 |
- fi |
1087 |
- fi |
1088 |
- |
1089 |
- if [[ ! -L ${envd_locale} ]]; then |
1090 |
- # now, if env.d/??locale is not a symlink (to locale.conf)... |
1091 |
- if [[ -e ${envd_locale} ]]; then |
1092 |
- # ...warn the user that he has duplicate locale settings |
1093 |
- ewarn |
1094 |
- ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
1095 |
- ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
1096 |
- ewarn "and create the symlink with the following command:" |
1097 |
- ewarn "ln -s -n -f ../locale.conf ${envd_locale}" |
1098 |
- ewarn |
1099 |
- else |
1100 |
- # ...or just create the symlink if there's nothing here |
1101 |
- ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" |
1102 |
- ln -n -s ../locale.conf "${envd_locale_def}" |
1103 |
- eend ${?} || FAIL=1 |
1104 |
- fi |
1105 |
- fi |
1106 |
-} |
1107 |
- |
1108 |
-pkg_preinst() { |
1109 |
- if ! use split-usr; then |
1110 |
- local dir |
1111 |
- for dir in bin sbin lib; do |
1112 |
- if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then |
1113 |
- eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged." |
1114 |
- eerror "One of them should be a symbolic link to the other one." |
1115 |
- FAIL=1 |
1116 |
- fi |
1117 |
- done |
1118 |
- if [[ ${FAIL} ]]; then |
1119 |
- eerror "Migration to system layout with merged directories must be performed before" |
1120 |
- eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage." |
1121 |
- die "System layout with split directories still used" |
1122 |
- fi |
1123 |
- fi |
1124 |
-} |
1125 |
- |
1126 |
-pkg_postinst() { |
1127 |
- systemd_update_catalog |
1128 |
- |
1129 |
- # Keep this here in case the database format changes so it gets updated |
1130 |
- # when required. |
1131 |
- systemd-hwdb --root="${ROOT}" update |
1132 |
- |
1133 |
- udev_reload || FAIL=1 |
1134 |
- |
1135 |
- # Bug 465468, make sure locales are respected, and ensure consistency |
1136 |
- # between OpenRC & systemd |
1137 |
- migrate_locale |
1138 |
- |
1139 |
- if [[ -z ${REPLACING_VERSIONS} ]]; then |
1140 |
- if type systemctl &>/dev/null; then |
1141 |
- systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1 |
1142 |
- fi |
1143 |
- elog "To enable a useful set of services, run the following:" |
1144 |
- elog " systemctl preset-all --preset-mode=enable-only" |
1145 |
- fi |
1146 |
- |
1147 |
- if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then |
1148 |
- rm "${EROOT}/var/lib/systemd/timesync" |
1149 |
- fi |
1150 |
- |
1151 |
- if [[ ${FAIL} ]]; then |
1152 |
- eerror "One of the postinst commands failed. Please check the postinst output" |
1153 |
- eerror "for errors. You may need to clean up your system and/or try installing" |
1154 |
- eerror "systemd again." |
1155 |
- eerror |
1156 |
- fi |
1157 |
-} |
1158 |
- |
1159 |
-pkg_prerm() { |
1160 |
- # If removing systemd completely, remove the catalog database. |
1161 |
- if [[ ! ${REPLACED_BY_VERSION} ]]; then |
1162 |
- rm -f -v "${EROOT}"/var/lib/systemd/catalog/database |
1163 |
- fi |
1164 |
-} |
1165 |
|
1166 |
diff --git a/sys-apps/systemd/systemd-249.7.ebuild b/sys-apps/systemd/systemd-249.7.ebuild |
1167 |
deleted file mode 100644 |
1168 |
index 0d9a1792bad8..000000000000 |
1169 |
--- a/sys-apps/systemd/systemd-249.7.ebuild |
1170 |
+++ /dev/null |
1171 |
@@ -1,505 +0,0 @@ |
1172 |
-# Copyright 2011-2021 Gentoo Authors |
1173 |
-# Distributed under the terms of the GNU General Public License v2 |
1174 |
- |
1175 |
-EAPI=7 |
1176 |
-PYTHON_COMPAT=( python3_{8..10} ) |
1177 |
- |
1178 |
-# Avoid QA warnings |
1179 |
-TMPFILES_OPTIONAL=1 |
1180 |
- |
1181 |
-if [[ ${PV} == 9999 ]]; then |
1182 |
- EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
1183 |
- inherit git-r3 |
1184 |
-else |
1185 |
- if [[ ${PV} == *.* ]]; then |
1186 |
- MY_PN=systemd-stable |
1187 |
- else |
1188 |
- MY_PN=systemd |
1189 |
- fi |
1190 |
- MY_PV=${PV/_/-} |
1191 |
- MY_P=${MY_PN}-${MY_PV} |
1192 |
- S=${WORKDIR}/${MY_P} |
1193 |
- SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" |
1194 |
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~sparc x86" |
1195 |
-fi |
1196 |
- |
1197 |
-inherit bash-completion-r1 linux-info meson-multilib pam python-any-r1 systemd toolchain-funcs udev usr-ldscript |
1198 |
- |
1199 |
-DESCRIPTION="System and service manager for Linux" |
1200 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
1201 |
- |
1202 |
-LICENSE="GPL-2 LGPL-2.1 MIT public-domain" |
1203 |
-SLOT="0/2" |
1204 |
-IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils fido2 +gcrypt gnuefi homed http idn importd +kmod +lz4 lzma nat pam pcre pkcs11 policykit pwquality qrcode repart +resolvconf +seccomp selinux split-usr +sysv-utils test tpm vanilla xkb +zstd" |
1205 |
- |
1206 |
-REQUIRED_USE=" |
1207 |
- homed? ( cryptsetup pam ) |
1208 |
- importd? ( curl gcrypt lzma ) |
1209 |
- pwquality? ( homed ) |
1210 |
-" |
1211 |
-RESTRICT="!test? ( test )" |
1212 |
- |
1213 |
-MINKV="3.11" |
1214 |
- |
1215 |
-OPENSSL_DEP=">=dev-libs/openssl-1.1.0:0=" |
1216 |
- |
1217 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] |
1218 |
- sys-libs/libcap:0=[${MULTILIB_USEDEP}] |
1219 |
- virtual/libcrypt:=[${MULTILIB_USEDEP}] |
1220 |
- acl? ( sys-apps/acl:0= ) |
1221 |
- apparmor? ( sys-libs/libapparmor:0= ) |
1222 |
- audit? ( >=sys-process/audit-2:0= ) |
1223 |
- cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= ) |
1224 |
- curl? ( net-misc/curl:0= ) |
1225 |
- dns-over-tls? ( >=net-libs/gnutls-3.6.0:0= ) |
1226 |
- elfutils? ( >=dev-libs/elfutils-0.158:0= ) |
1227 |
- fido2? ( dev-libs/libfido2:0= ) |
1228 |
- gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) |
1229 |
- homed? ( ${OPENSSL_DEP} ) |
1230 |
- http? ( |
1231 |
- >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] |
1232 |
- >=net-libs/gnutls-3.1.4:0= |
1233 |
- ) |
1234 |
- idn? ( net-dns/libidn2:= ) |
1235 |
- importd? ( |
1236 |
- app-arch/bzip2:0= |
1237 |
- sys-libs/zlib:0= |
1238 |
- ) |
1239 |
- kmod? ( >=sys-apps/kmod-15:0= ) |
1240 |
- lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) |
1241 |
- lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) |
1242 |
- nat? ( net-firewall/iptables:0= ) |
1243 |
- pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] ) |
1244 |
- pkcs11? ( app-crypt/p11-kit:0= ) |
1245 |
- pcre? ( dev-libs/libpcre2 ) |
1246 |
- pwquality? ( dev-libs/libpwquality:0= ) |
1247 |
- qrcode? ( media-gfx/qrencode:0= ) |
1248 |
- repart? ( ${OPENSSL_DEP} ) |
1249 |
- seccomp? ( >=sys-libs/libseccomp-2.3.3:0= ) |
1250 |
- selinux? ( sys-libs/libselinux:0= ) |
1251 |
- tpm? ( app-crypt/tpm2-tss:0= ) |
1252 |
- xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) |
1253 |
- zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] ) |
1254 |
-" |
1255 |
- |
1256 |
-# Newer linux-headers needed by ia64, bug #480218 |
1257 |
-DEPEND="${COMMON_DEPEND} |
1258 |
- >=sys-kernel/linux-headers-${MINKV} |
1259 |
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) |
1260 |
-" |
1261 |
- |
1262 |
-# baselayout-2.2 has /run |
1263 |
-RDEPEND="${COMMON_DEPEND} |
1264 |
- >=acct-group/adm-0-r1 |
1265 |
- >=acct-group/wheel-0-r1 |
1266 |
- >=acct-group/kmem-0-r1 |
1267 |
- >=acct-group/tty-0-r1 |
1268 |
- >=acct-group/utmp-0-r1 |
1269 |
- >=acct-group/audio-0-r1 |
1270 |
- >=acct-group/cdrom-0-r1 |
1271 |
- >=acct-group/dialout-0-r1 |
1272 |
- >=acct-group/disk-0-r1 |
1273 |
- >=acct-group/input-0-r1 |
1274 |
- >=acct-group/kvm-0-r1 |
1275 |
- >=acct-group/lp-0-r1 |
1276 |
- >=acct-group/render-0-r1 |
1277 |
- acct-group/sgx |
1278 |
- >=acct-group/tape-0-r1 |
1279 |
- acct-group/users |
1280 |
- >=acct-group/video-0-r1 |
1281 |
- >=acct-group/systemd-journal-0-r1 |
1282 |
- >=acct-user/root-0-r1 |
1283 |
- acct-user/nobody |
1284 |
- >=acct-user/systemd-journal-remote-0-r1 |
1285 |
- >=acct-user/systemd-coredump-0-r1 |
1286 |
- >=acct-user/systemd-network-0-r1 |
1287 |
- acct-user/systemd-oom |
1288 |
- >=acct-user/systemd-resolve-0-r1 |
1289 |
- >=acct-user/systemd-timesync-0-r1 |
1290 |
- >=sys-apps/baselayout-2.2 |
1291 |
- selinux? ( sec-policy/selinux-base-policy[systemd] ) |
1292 |
- sysv-utils? ( |
1293 |
- !sys-apps/openrc[sysv-utils(-)] |
1294 |
- !sys-apps/sysvinit |
1295 |
- ) |
1296 |
- !sysv-utils? ( sys-apps/sysvinit ) |
1297 |
- resolvconf? ( !net-dns/openresolv ) |
1298 |
- !build? ( || ( |
1299 |
- sys-apps/util-linux[kill(-)] |
1300 |
- sys-process/procps[kill(+)] |
1301 |
- sys-apps/coreutils[kill(-)] |
1302 |
- ) ) |
1303 |
- !sys-apps/hwids[udev] |
1304 |
- !sys-auth/nss-myhostname |
1305 |
- !sys-fs/eudev |
1306 |
- !sys-fs/udev |
1307 |
-" |
1308 |
- |
1309 |
-# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) |
1310 |
-PDEPEND=">=sys-apps/dbus-1.9.8[systemd] |
1311 |
- >=sys-fs/udev-init-scripts-34 |
1312 |
- policykit? ( sys-auth/polkit ) |
1313 |
- !vanilla? ( sys-apps/gentoo-systemd-integration )" |
1314 |
- |
1315 |
-BDEPEND=" |
1316 |
- app-arch/xz-utils:0 |
1317 |
- dev-util/gperf |
1318 |
- >=dev-util/meson-0.46 |
1319 |
- >=sys-apps/coreutils-8.16 |
1320 |
- sys-devel/gettext |
1321 |
- virtual/pkgconfig |
1322 |
- test? ( |
1323 |
- app-text/tree |
1324 |
- dev-lang/perl |
1325 |
- sys-apps/dbus |
1326 |
- ) |
1327 |
- app-text/docbook-xml-dtd:4.2 |
1328 |
- app-text/docbook-xml-dtd:4.5 |
1329 |
- app-text/docbook-xsl-stylesheets |
1330 |
- dev-libs/libxslt:0 |
1331 |
- $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') |
1332 |
- $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') |
1333 |
-" |
1334 |
- |
1335 |
-python_check_deps() { |
1336 |
- has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" && |
1337 |
- has_version -b "dev-python/lxml[${PYTHON_USEDEP}]" |
1338 |
-} |
1339 |
- |
1340 |
-QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" |
1341 |
-QA_EXECSTACK="usr/lib/systemd/boot/efi/*" |
1342 |
- |
1343 |
-pkg_pretend() { |
1344 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
1345 |
- if use test && has pid-sandbox ${FEATURES}; then |
1346 |
- ewarn "Tests are known to fail with PID sandboxing enabled." |
1347 |
- ewarn "See https://bugs.gentoo.org/674458." |
1348 |
- fi |
1349 |
- |
1350 |
- local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS |
1351 |
- ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE |
1352 |
- ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS |
1353 |
- ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS |
1354 |
- ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH |
1355 |
- ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED |
1356 |
- ~!SYSFS_DEPRECATED_V2" |
1357 |
- |
1358 |
- use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" |
1359 |
- use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" |
1360 |
- kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" |
1361 |
- kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" |
1362 |
- kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF" |
1363 |
- |
1364 |
- if kernel_is -lt 5 10 20; then |
1365 |
- CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" |
1366 |
- else |
1367 |
- CONFIG_CHECK+=" ~KCMP" |
1368 |
- fi |
1369 |
- |
1370 |
- if linux_config_exists; then |
1371 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
1372 |
- if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then |
1373 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
1374 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
1375 |
- fi |
1376 |
- if linux_chkconfig_present X86; then |
1377 |
- CONFIG_CHECK+=" ~DMIID" |
1378 |
- fi |
1379 |
- fi |
1380 |
- |
1381 |
- if kernel_is -lt ${MINKV//./ }; then |
1382 |
- ewarn "Kernel version at least ${MINKV} required" |
1383 |
- fi |
1384 |
- |
1385 |
- check_extra_config |
1386 |
- fi |
1387 |
-} |
1388 |
- |
1389 |
-pkg_setup() { |
1390 |
- : |
1391 |
-} |
1392 |
- |
1393 |
-src_unpack() { |
1394 |
- default |
1395 |
- [[ ${PV} != 9999 ]] || git-r3_src_unpack |
1396 |
-} |
1397 |
- |
1398 |
-src_prepare() { |
1399 |
- # Do NOT add patches here |
1400 |
- local PATCHES=() |
1401 |
- |
1402 |
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches ) |
1403 |
- |
1404 |
- # Add local patches here |
1405 |
- PATCHES+=( |
1406 |
- ) |
1407 |
- |
1408 |
- if ! use vanilla; then |
1409 |
- PATCHES+=( |
1410 |
- "${FILESDIR}/gentoo-generator-path-r2.patch" |
1411 |
- "${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch" |
1412 |
- "${FILESDIR}/gentoo-journald-audit.patch" |
1413 |
- ) |
1414 |
- fi |
1415 |
- |
1416 |
- default |
1417 |
-} |
1418 |
- |
1419 |
-src_configure() { |
1420 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
1421 |
- tc-export AR CC NM OBJCOPY RANLIB |
1422 |
- |
1423 |
- python_setup |
1424 |
- |
1425 |
- multilib-minimal_src_configure |
1426 |
-} |
1427 |
- |
1428 |
-multilib_src_configure() { |
1429 |
- local myconf=( |
1430 |
- --localstatedir="${EPREFIX}/var" |
1431 |
- -Dsupport-url="https://gentoo.org/support/" |
1432 |
- -Dpamlibdir="$(getpam_mod_dir)" |
1433 |
- # avoid bash-completion dep |
1434 |
- -Dbashcompletiondir="$(get_bashcompdir)" |
1435 |
- # make sure we get /bin:/sbin in PATH |
1436 |
- $(meson_use split-usr) |
1437 |
- -Dsplit-bin=true |
1438 |
- -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" |
1439 |
- -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" |
1440 |
- # Avoid infinite exec recursion, bug 642724 |
1441 |
- -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit" |
1442 |
- # no deps |
1443 |
- -Dima=true |
1444 |
- -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified) |
1445 |
- # Optional components/dependencies |
1446 |
- $(meson_native_use_bool acl) |
1447 |
- $(meson_native_use_bool apparmor) |
1448 |
- $(meson_native_use_bool audit) |
1449 |
- $(meson_native_use_bool cryptsetup libcryptsetup) |
1450 |
- $(meson_native_use_bool curl libcurl) |
1451 |
- $(meson_native_use_bool dns-over-tls dns-over-tls) |
1452 |
- $(meson_native_use_bool elfutils) |
1453 |
- $(meson_native_use_bool fido2 libfido2) |
1454 |
- $(meson_use gcrypt) |
1455 |
- $(meson_native_use_bool gnuefi gnu-efi) |
1456 |
- -Defi-includedir="${ESYSROOT}/usr/include/efi" |
1457 |
- -Defi-ld="$(tc-getLD)" |
1458 |
- -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" |
1459 |
- $(meson_native_use_bool homed) |
1460 |
- $(meson_native_use_bool http microhttpd) |
1461 |
- $(meson_native_use_bool idn) |
1462 |
- $(meson_native_use_bool importd) |
1463 |
- $(meson_native_use_bool importd bzip2) |
1464 |
- $(meson_native_use_bool importd zlib) |
1465 |
- $(meson_native_use_bool kmod) |
1466 |
- $(meson_use lz4) |
1467 |
- $(meson_use lzma xz) |
1468 |
- $(meson_use zstd) |
1469 |
- $(meson_native_use_bool nat libiptc) |
1470 |
- $(meson_use pam) |
1471 |
- $(meson_native_use_bool pkcs11 p11kit) |
1472 |
- $(meson_native_use_bool pcre pcre2) |
1473 |
- $(meson_native_use_bool policykit polkit) |
1474 |
- $(meson_native_use_bool pwquality) |
1475 |
- $(meson_native_use_bool qrcode qrencode) |
1476 |
- $(meson_native_use_bool repart) |
1477 |
- $(meson_native_use_bool seccomp) |
1478 |
- $(meson_native_use_bool selinux) |
1479 |
- $(meson_native_use_bool tpm tpm2) |
1480 |
- $(meson_native_use_bool test dbus) |
1481 |
- $(meson_native_use_bool xkb xkbcommon) |
1482 |
- -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" |
1483 |
- # Breaks screen, tmux, etc. |
1484 |
- -Ddefault-kill-user-processes=false |
1485 |
- -Dcreate-log-dirs=false |
1486 |
- |
1487 |
- # multilib options |
1488 |
- $(meson_native_true backlight) |
1489 |
- $(meson_native_true binfmt) |
1490 |
- $(meson_native_true coredump) |
1491 |
- $(meson_native_true environment-d) |
1492 |
- $(meson_native_true firstboot) |
1493 |
- $(meson_native_true hibernate) |
1494 |
- $(meson_native_true hostnamed) |
1495 |
- $(meson_native_true ldconfig) |
1496 |
- $(meson_native_true localed) |
1497 |
- $(meson_native_true man) |
1498 |
- $(meson_native_true networkd) |
1499 |
- $(meson_native_true quotacheck) |
1500 |
- $(meson_native_true randomseed) |
1501 |
- $(meson_native_true rfkill) |
1502 |
- $(meson_native_true sysusers) |
1503 |
- $(meson_native_true timedated) |
1504 |
- $(meson_native_true timesyncd) |
1505 |
- $(meson_native_true tmpfiles) |
1506 |
- $(meson_native_true vconsole) |
1507 |
- ) |
1508 |
- |
1509 |
- meson_src_configure "${myconf[@]}" |
1510 |
-} |
1511 |
- |
1512 |
-multilib_src_test() { |
1513 |
- unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR |
1514 |
- meson_src_test |
1515 |
-} |
1516 |
- |
1517 |
-multilib_src_install_all() { |
1518 |
- local rootprefix=$(usex split-usr '' /usr) |
1519 |
- |
1520 |
- # meson doesn't know about docdir |
1521 |
- mv "${ED}"/usr/share/doc/{systemd,${PF}} || die |
1522 |
- |
1523 |
- einstalldocs |
1524 |
- dodoc "${FILESDIR}"/nsswitch.conf |
1525 |
- |
1526 |
- if ! use resolvconf; then |
1527 |
- rm -f "${ED}${rootprefix}"/sbin/resolvconf || die |
1528 |
- fi |
1529 |
- |
1530 |
- rm "${ED}"/etc/init.d/README || die |
1531 |
- rm "${ED}${rootprefix}"/lib/systemd/system-generators/systemd-sysv-generator || die |
1532 |
- |
1533 |
- if ! use sysv-utils; then |
1534 |
- rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die |
1535 |
- rm "${ED}"/usr/share/man/man1/init.1 || die |
1536 |
- rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die |
1537 |
- fi |
1538 |
- |
1539 |
- if ! use resolvconf && ! use sysv-utils; then |
1540 |
- rmdir "${ED}${rootprefix}"/sbin || die |
1541 |
- fi |
1542 |
- |
1543 |
- # https://bugs.gentoo.org/761763 |
1544 |
- rm -r "${ED}"/usr/lib/sysusers.d || die |
1545 |
- |
1546 |
- # Preserve empty dirs in /etc & /var, bug #437008 |
1547 |
- keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} |
1548 |
- keepdir /etc/kernel/install.d |
1549 |
- keepdir /etc/systemd/{network,system,user} |
1550 |
- keepdir /etc/udev/rules.d |
1551 |
- |
1552 |
- keepdir /etc/udev/hwdb.d |
1553 |
- |
1554 |
- keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} |
1555 |
- keepdir /usr/lib/{binfmt.d,modules-load.d} |
1556 |
- keepdir /usr/lib/systemd/user-generators |
1557 |
- keepdir /var/lib/systemd |
1558 |
- keepdir /var/log/journal |
1559 |
- |
1560 |
- # Symlink /etc/sysctl.conf for easy migration. |
1561 |
- dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf |
1562 |
- |
1563 |
- if use pam; then |
1564 |
- newpamd "${FILESDIR}"/systemd-user.pam systemd-user |
1565 |
- fi |
1566 |
- |
1567 |
- if use split-usr; then |
1568 |
- # Avoid breaking boot/reboot |
1569 |
- dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd |
1570 |
- dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown |
1571 |
- fi |
1572 |
- |
1573 |
- gen_usr_ldscript -a systemd udev |
1574 |
-} |
1575 |
- |
1576 |
-migrate_locale() { |
1577 |
- local envd_locale_def="${EROOT}/etc/env.d/02locale" |
1578 |
- local envd_locale=( "${EROOT}"/etc/env.d/??locale ) |
1579 |
- local locale_conf="${EROOT}/etc/locale.conf" |
1580 |
- |
1581 |
- if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
1582 |
- # If locale.conf does not exist... |
1583 |
- if [[ -e ${envd_locale} ]]; then |
1584 |
- # ...either copy env.d/??locale if there's one |
1585 |
- ebegin "Moving ${envd_locale} to ${locale_conf}" |
1586 |
- mv "${envd_locale}" "${locale_conf}" |
1587 |
- eend ${?} || FAIL=1 |
1588 |
- else |
1589 |
- # ...or create a dummy default |
1590 |
- ebegin "Creating ${locale_conf}" |
1591 |
- cat > "${locale_conf}" <<-EOF |
1592 |
- # This file has been created by the sys-apps/systemd ebuild. |
1593 |
- # See locale.conf(5) and localectl(1). |
1594 |
- |
1595 |
- # LANG=${LANG} |
1596 |
- EOF |
1597 |
- eend ${?} || FAIL=1 |
1598 |
- fi |
1599 |
- fi |
1600 |
- |
1601 |
- if [[ ! -L ${envd_locale} ]]; then |
1602 |
- # now, if env.d/??locale is not a symlink (to locale.conf)... |
1603 |
- if [[ -e ${envd_locale} ]]; then |
1604 |
- # ...warn the user that he has duplicate locale settings |
1605 |
- ewarn |
1606 |
- ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
1607 |
- ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
1608 |
- ewarn "and create the symlink with the following command:" |
1609 |
- ewarn "ln -s -n -f ../locale.conf ${envd_locale}" |
1610 |
- ewarn |
1611 |
- else |
1612 |
- # ...or just create the symlink if there's nothing here |
1613 |
- ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" |
1614 |
- ln -n -s ../locale.conf "${envd_locale_def}" |
1615 |
- eend ${?} || FAIL=1 |
1616 |
- fi |
1617 |
- fi |
1618 |
-} |
1619 |
- |
1620 |
-pkg_preinst() { |
1621 |
- if ! use split-usr; then |
1622 |
- local dir |
1623 |
- for dir in bin sbin lib; do |
1624 |
- if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then |
1625 |
- eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged." |
1626 |
- eerror "One of them should be a symbolic link to the other one." |
1627 |
- FAIL=1 |
1628 |
- fi |
1629 |
- done |
1630 |
- if [[ ${FAIL} ]]; then |
1631 |
- eerror "Migration to system layout with merged directories must be performed before" |
1632 |
- eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage." |
1633 |
- die "System layout with split directories still used" |
1634 |
- fi |
1635 |
- fi |
1636 |
-} |
1637 |
- |
1638 |
-pkg_postinst() { |
1639 |
- systemd_update_catalog |
1640 |
- |
1641 |
- # Keep this here in case the database format changes so it gets updated |
1642 |
- # when required. |
1643 |
- systemd-hwdb --root="${ROOT}" update |
1644 |
- |
1645 |
- udev_reload || FAIL=1 |
1646 |
- |
1647 |
- # Bug 465468, make sure locales are respected, and ensure consistency |
1648 |
- # between OpenRC & systemd |
1649 |
- migrate_locale |
1650 |
- |
1651 |
- if [[ -z ${REPLACING_VERSIONS} ]]; then |
1652 |
- if type systemctl &>/dev/null; then |
1653 |
- systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1 |
1654 |
- fi |
1655 |
- elog "To enable a useful set of services, run the following:" |
1656 |
- elog " systemctl preset-all --preset-mode=enable-only" |
1657 |
- fi |
1658 |
- |
1659 |
- if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then |
1660 |
- rm "${EROOT}/var/lib/systemd/timesync" |
1661 |
- fi |
1662 |
- |
1663 |
- if [[ ${FAIL} ]]; then |
1664 |
- eerror "One of the postinst commands failed. Please check the postinst output" |
1665 |
- eerror "for errors. You may need to clean up your system and/or try installing" |
1666 |
- eerror "systemd again." |
1667 |
- eerror |
1668 |
- fi |
1669 |
-} |
1670 |
- |
1671 |
-pkg_prerm() { |
1672 |
- # If removing systemd completely, remove the catalog database. |
1673 |
- if [[ ! ${REPLACED_BY_VERSION} ]]; then |
1674 |
- rm -f -v "${EROOT}"/var/lib/systemd/catalog/database |
1675 |
- fi |
1676 |
-} |