1 |
commit: ba109f938b4dbad0df205aa89d9c948d3d5dd41b |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 4 17:27:38 2022 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 4 17:38:13 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba109f93 |
7 |
|
8 |
sys-apps/systemd: drop 250.4-r2, 250.6 |
9 |
|
10 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
11 |
|
12 |
sys-apps/systemd/Manifest | 2 - |
13 |
sys-apps/systemd/systemd-250.4-r2.ebuild | 538 ------------------------------ |
14 |
sys-apps/systemd/systemd-250.6.ebuild | 554 ------------------------------- |
15 |
3 files changed, 1094 deletions(-) |
16 |
|
17 |
diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest |
18 |
index 63371ab8bbbc..a436fe9f93e0 100644 |
19 |
--- a/sys-apps/systemd/Manifest |
20 |
+++ b/sys-apps/systemd/Manifest |
21 |
@@ -1,4 +1,2 @@ |
22 |
-DIST systemd-stable-250.4.tar.gz 11132786 BLAKE2B 8fdfe1bad76e572dc1be0955f3d1c4080f2beb81a2f9670f80827899f5406ab8ed8675400c2f5e8ccef44cf1bceff42ceae12a42e1b67d46c0deb523e6495f25 SHA512 307ed0920da660b6c45d909fea66864fb98db8b2f6905d629fb2012fc4bf64dd25fd61168c22bf4098200be541be9b0e815fbde98806a99c85cb33d49d8b63d0 |
23 |
-DIST systemd-stable-250.6.tar.gz 11212534 BLAKE2B faf065dbe5c02d9d3311202f93b9ad8984c4c9d127d32c17f305b81046f9e29cfc731cdd4abbd073965f448f4e1dff81d80313896b346548d2640939ad509365 SHA512 b625d5fb419370d238cf72f2e59c8fa6782972d94746835bde3a64a7746edd1d5fad901bbb01311f858b7dbdff6d759518b615708bb835a81964c16878d5644e |
24 |
DIST systemd-stable-250.7.tar.gz 11214975 BLAKE2B 5d94b4b1f8b0cd6e8284a89ac0d4bd373eccdad2c3d6e6c453df79c8df47ee0f9cfbde764b72b1f9d172d07e2d9f1f1f41c1ab254cf4abd0722469ebc3ad7cf8 SHA512 99bc6f0c9757b280cb694f3fb4d6fe04d5ce55583eb2bae5ddeb324bb5ee9930c1720fcc27293d90cddba188473653ec541a471ae8115710a5850c26d0ba215d |
25 |
DIST systemd-stable-251.2.tar.gz 11434645 BLAKE2B a7e118649a7d27b789206ea9f6f2d0314e44561367506ee763a9e98fb97579b3fc49c7a402c8da142945dc98444558f0e311557f52c50863cebc7532c17c651f SHA512 0c4011b685a1e8d535af123cbaf79ab53d59ea665ca5350ab1077ad4e962b49c1fd5b1b5bb3f28c3e28145dfd02aa83023f78de5edec15afe84e3e06e742a67c |
26 |
|
27 |
diff --git a/sys-apps/systemd/systemd-250.4-r2.ebuild b/sys-apps/systemd/systemd-250.4-r2.ebuild |
28 |
deleted file mode 100644 |
29 |
index 2c6f143758cf..000000000000 |
30 |
--- a/sys-apps/systemd/systemd-250.4-r2.ebuild |
31 |
+++ /dev/null |
32 |
@@ -1,538 +0,0 @@ |
33 |
-# Copyright 2011-2022 Gentoo Authors |
34 |
-# Distributed under the terms of the GNU General Public License v2 |
35 |
- |
36 |
-EAPI=7 |
37 |
-PYTHON_COMPAT=( python3_{8..10} ) |
38 |
- |
39 |
-# Avoid QA warnings |
40 |
-TMPFILES_OPTIONAL=1 |
41 |
- |
42 |
-if [[ ${PV} == 9999 ]]; then |
43 |
- EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
44 |
- inherit git-r3 |
45 |
-else |
46 |
- if [[ ${PV} == *.* ]]; then |
47 |
- MY_PN=systemd-stable |
48 |
- else |
49 |
- MY_PN=systemd |
50 |
- fi |
51 |
- MY_PV=${PV/_/-} |
52 |
- MY_P=${MY_PN}-${MY_PV} |
53 |
- S=${WORKDIR}/${MY_P} |
54 |
- SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" |
55 |
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86" |
56 |
-fi |
57 |
- |
58 |
-inherit bash-completion-r1 linux-info meson-multilib pam python-any-r1 systemd toolchain-funcs udev usr-ldscript |
59 |
- |
60 |
-DESCRIPTION="System and service manager for Linux" |
61 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
62 |
- |
63 |
-LICENSE="GPL-2 LGPL-2.1 MIT public-domain" |
64 |
-SLOT="0/2" |
65 |
-IUSE=" |
66 |
- acl apparmor audit build cgroup-hybrid cryptsetup curl +dns-over-tls elfutils |
67 |
- fido2 +gcrypt gnuefi gnutls homed hostnamed-fallback http idn importd +kmod |
68 |
- +lz4 lzma nat +openssl pam pcre pkcs11 policykit pwquality qrcode |
69 |
- +resolvconf +seccomp selinux split-usr +sysv-utils test tpm vanilla xkb +zstd |
70 |
-" |
71 |
-REQUIRED_USE=" |
72 |
- dns-over-tls? ( || ( gnutls openssl ) ) |
73 |
- homed? ( cryptsetup pam openssl ) |
74 |
- importd? ( curl lzma || ( gcrypt openssl ) ) |
75 |
- policykit? ( !hostnamed-fallback ) |
76 |
- pwquality? ( homed ) |
77 |
-" |
78 |
-RESTRICT="!test? ( test )" |
79 |
- |
80 |
-MINKV="3.11" |
81 |
- |
82 |
-COMMON_DEPEND=" |
83 |
- >=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] |
84 |
- sys-libs/libcap:0=[${MULTILIB_USEDEP}] |
85 |
- virtual/libcrypt:=[${MULTILIB_USEDEP}] |
86 |
- acl? ( sys-apps/acl:0= ) |
87 |
- apparmor? ( sys-libs/libapparmor:0= ) |
88 |
- audit? ( >=sys-process/audit-2:0= ) |
89 |
- cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= ) |
90 |
- curl? ( net-misc/curl:0= ) |
91 |
- elfutils? ( >=dev-libs/elfutils-0.158:0= ) |
92 |
- fido2? ( dev-libs/libfido2:0= ) |
93 |
- gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) |
94 |
- gnutls? ( >=net-libs/gnutls-3.6.0:0= ) |
95 |
- http? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] ) |
96 |
- idn? ( net-dns/libidn2:= ) |
97 |
- importd? ( |
98 |
- app-arch/bzip2:0= |
99 |
- sys-libs/zlib:0= |
100 |
- ) |
101 |
- kmod? ( >=sys-apps/kmod-15:0= ) |
102 |
- lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) |
103 |
- lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) |
104 |
- nat? ( net-firewall/iptables:0= ) |
105 |
- openssl? ( >=dev-libs/openssl-1.1.0:0= ) |
106 |
- pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] ) |
107 |
- pkcs11? ( app-crypt/p11-kit:0= ) |
108 |
- pcre? ( dev-libs/libpcre2 ) |
109 |
- pwquality? ( dev-libs/libpwquality:0= ) |
110 |
- qrcode? ( media-gfx/qrencode:0= ) |
111 |
- seccomp? ( >=sys-libs/libseccomp-2.3.3:0= ) |
112 |
- selinux? ( sys-libs/libselinux:0= ) |
113 |
- tpm? ( app-crypt/tpm2-tss:0= ) |
114 |
- xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) |
115 |
- zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] ) |
116 |
-" |
117 |
- |
118 |
-# Newer linux-headers needed by ia64, bug #480218 |
119 |
-DEPEND="${COMMON_DEPEND} |
120 |
- >=sys-kernel/linux-headers-${MINKV} |
121 |
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) |
122 |
-" |
123 |
- |
124 |
-# baselayout-2.2 has /run |
125 |
-RDEPEND="${COMMON_DEPEND} |
126 |
- >=acct-group/adm-0-r1 |
127 |
- >=acct-group/wheel-0-r1 |
128 |
- >=acct-group/kmem-0-r1 |
129 |
- >=acct-group/tty-0-r1 |
130 |
- >=acct-group/utmp-0-r1 |
131 |
- >=acct-group/audio-0-r1 |
132 |
- >=acct-group/cdrom-0-r1 |
133 |
- >=acct-group/dialout-0-r1 |
134 |
- >=acct-group/disk-0-r1 |
135 |
- >=acct-group/input-0-r1 |
136 |
- >=acct-group/kvm-0-r1 |
137 |
- >=acct-group/lp-0-r1 |
138 |
- >=acct-group/render-0-r1 |
139 |
- acct-group/sgx |
140 |
- >=acct-group/tape-0-r1 |
141 |
- acct-group/users |
142 |
- >=acct-group/video-0-r1 |
143 |
- >=acct-group/systemd-journal-0-r1 |
144 |
- >=acct-user/root-0-r1 |
145 |
- acct-user/nobody |
146 |
- >=acct-user/systemd-journal-remote-0-r1 |
147 |
- >=acct-user/systemd-coredump-0-r1 |
148 |
- >=acct-user/systemd-network-0-r1 |
149 |
- acct-user/systemd-oom |
150 |
- >=acct-user/systemd-resolve-0-r1 |
151 |
- >=acct-user/systemd-timesync-0-r1 |
152 |
- >=sys-apps/baselayout-2.2 |
153 |
- hostnamed-fallback? ( |
154 |
- acct-group/systemd-hostname |
155 |
- sys-apps/dbus-broker |
156 |
- ) |
157 |
- selinux? ( |
158 |
- sec-policy/selinux-base-policy[systemd] |
159 |
- sec-policy/selinux-ntp |
160 |
- ) |
161 |
- sysv-utils? ( |
162 |
- !sys-apps/openrc[sysv-utils(-)] |
163 |
- !sys-apps/sysvinit |
164 |
- ) |
165 |
- !sysv-utils? ( sys-apps/sysvinit ) |
166 |
- resolvconf? ( !net-dns/openresolv ) |
167 |
- !build? ( || ( |
168 |
- sys-apps/util-linux[kill(-)] |
169 |
- sys-process/procps[kill(+)] |
170 |
- sys-apps/coreutils[kill(-)] |
171 |
- ) ) |
172 |
- !sys-apps/hwids[udev] |
173 |
- !sys-auth/nss-myhostname |
174 |
- !sys-fs/eudev |
175 |
- !sys-fs/udev |
176 |
-" |
177 |
- |
178 |
-# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) |
179 |
-PDEPEND=">=sys-apps/dbus-1.9.8[systemd] |
180 |
- >=sys-fs/udev-init-scripts-34 |
181 |
- policykit? ( sys-auth/polkit ) |
182 |
- !vanilla? ( sys-apps/gentoo-systemd-integration )" |
183 |
- |
184 |
-BDEPEND=" |
185 |
- app-arch/xz-utils:0 |
186 |
- dev-util/gperf |
187 |
- >=dev-util/meson-0.46 |
188 |
- >=sys-apps/coreutils-8.16 |
189 |
- sys-devel/gettext |
190 |
- virtual/pkgconfig |
191 |
- test? ( |
192 |
- app-text/tree |
193 |
- dev-lang/perl |
194 |
- sys-apps/dbus |
195 |
- ) |
196 |
- app-text/docbook-xml-dtd:4.2 |
197 |
- app-text/docbook-xml-dtd:4.5 |
198 |
- app-text/docbook-xsl-stylesheets |
199 |
- dev-libs/libxslt:0 |
200 |
- $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') |
201 |
- $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') |
202 |
-" |
203 |
- |
204 |
-python_check_deps() { |
205 |
- has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" && |
206 |
- has_version -b "dev-python/lxml[${PYTHON_USEDEP}]" |
207 |
-} |
208 |
- |
209 |
-QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" |
210 |
-QA_EXECSTACK="usr/lib/systemd/boot/efi/*" |
211 |
- |
212 |
-pkg_pretend() { |
213 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
214 |
- if use test && has pid-sandbox ${FEATURES}; then |
215 |
- ewarn "Tests are known to fail with PID sandboxing enabled." |
216 |
- ewarn "See https://bugs.gentoo.org/674458." |
217 |
- fi |
218 |
- |
219 |
- local CONFIG_CHECK=" ~BINFMT_MISC ~BLK_DEV_BSG ~CGROUPS |
220 |
- ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE |
221 |
- ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS |
222 |
- ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS |
223 |
- ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH |
224 |
- ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED |
225 |
- ~!SYSFS_DEPRECATED_V2" |
226 |
- |
227 |
- use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" |
228 |
- use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" |
229 |
- kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" |
230 |
- kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" |
231 |
- kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF" |
232 |
- |
233 |
- if kernel_is -ge 5 10 20; then |
234 |
- CONFIG_CHECK+=" ~KCMP" |
235 |
- else |
236 |
- CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" |
237 |
- fi |
238 |
- |
239 |
- if kernel_is -ge 4 18; then |
240 |
- CONFIG_CHECK+=" ~AUTOFS_FS" |
241 |
- else |
242 |
- CONFIG_CHECK+=" ~AUTOFS4_FS" |
243 |
- fi |
244 |
- |
245 |
- if linux_config_exists; then |
246 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
247 |
- if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then |
248 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
249 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
250 |
- fi |
251 |
- if linux_chkconfig_present X86; then |
252 |
- CONFIG_CHECK+=" ~DMIID" |
253 |
- fi |
254 |
- fi |
255 |
- |
256 |
- if kernel_is -lt ${MINKV//./ }; then |
257 |
- ewarn "Kernel version at least ${MINKV} required" |
258 |
- fi |
259 |
- |
260 |
- check_extra_config |
261 |
- fi |
262 |
-} |
263 |
- |
264 |
-pkg_setup() { |
265 |
- : |
266 |
-} |
267 |
- |
268 |
-src_unpack() { |
269 |
- default |
270 |
- [[ ${PV} != 9999 ]] || git-r3_src_unpack |
271 |
-} |
272 |
- |
273 |
-src_prepare() { |
274 |
- # Do NOT add patches here |
275 |
- local PATCHES=() |
276 |
- |
277 |
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches ) |
278 |
- |
279 |
- # Add local patches here |
280 |
- PATCHES+=( |
281 |
- "${FILESDIR}/250.4-random-seed-hash.patch" |
282 |
- ) |
283 |
- |
284 |
- if ! use vanilla; then |
285 |
- PATCHES+=( |
286 |
- "${FILESDIR}/gentoo-generator-path-r2.patch" |
287 |
- "${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch" |
288 |
- "${FILESDIR}/gentoo-journald-audit.patch" |
289 |
- ) |
290 |
- fi |
291 |
- |
292 |
- default |
293 |
-} |
294 |
- |
295 |
-src_configure() { |
296 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
297 |
- tc-export AR CC NM OBJCOPY RANLIB |
298 |
- |
299 |
- python_setup |
300 |
- |
301 |
- multilib-minimal_src_configure |
302 |
-} |
303 |
- |
304 |
-multilib_src_configure() { |
305 |
- local myconf=( |
306 |
- --localstatedir="${EPREFIX}/var" |
307 |
- -Dsupport-url="https://gentoo.org/support/" |
308 |
- -Dpamlibdir="$(getpam_mod_dir)" |
309 |
- # avoid bash-completion dep |
310 |
- -Dbashcompletiondir="$(get_bashcompdir)" |
311 |
- # make sure we get /bin:/sbin in PATH |
312 |
- $(meson_use split-usr) |
313 |
- -Dsplit-bin=true |
314 |
- -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" |
315 |
- -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" |
316 |
- # Avoid infinite exec recursion, bug 642724 |
317 |
- -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit" |
318 |
- # no deps |
319 |
- -Dima=true |
320 |
- -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified) |
321 |
- # Optional components/dependencies |
322 |
- $(meson_native_use_bool acl) |
323 |
- $(meson_native_use_bool apparmor) |
324 |
- $(meson_native_use_bool audit) |
325 |
- $(meson_native_use_bool cryptsetup libcryptsetup) |
326 |
- $(meson_native_use_bool curl libcurl) |
327 |
- $(meson_native_use_bool dns-over-tls dns-over-tls) |
328 |
- $(meson_native_use_bool elfutils) |
329 |
- $(meson_native_use_bool fido2 libfido2) |
330 |
- $(meson_use gcrypt) |
331 |
- $(meson_native_use_bool gnuefi gnu-efi) |
332 |
- $(meson_native_use_bool gnutls) |
333 |
- -Defi-includedir="${ESYSROOT}/usr/include/efi" |
334 |
- -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" |
335 |
- $(meson_native_use_bool homed) |
336 |
- $(meson_native_use_bool http microhttpd) |
337 |
- $(meson_native_use_bool idn) |
338 |
- $(meson_native_use_bool importd) |
339 |
- $(meson_native_use_bool importd bzip2) |
340 |
- $(meson_native_use_bool importd zlib) |
341 |
- $(meson_native_use_bool kmod) |
342 |
- $(meson_use lz4) |
343 |
- $(meson_use lzma xz) |
344 |
- $(meson_use zstd) |
345 |
- $(meson_native_use_bool nat libiptc) |
346 |
- $(meson_native_use_bool openssl) |
347 |
- $(meson_use pam) |
348 |
- $(meson_native_use_bool pkcs11 p11kit) |
349 |
- $(meson_native_use_bool pcre pcre2) |
350 |
- $(meson_native_use_bool policykit polkit) |
351 |
- $(meson_native_use_bool pwquality) |
352 |
- $(meson_native_use_bool qrcode qrencode) |
353 |
- $(meson_native_use_bool seccomp) |
354 |
- $(meson_native_use_bool selinux) |
355 |
- $(meson_native_use_bool tpm tpm2) |
356 |
- $(meson_native_use_bool test dbus) |
357 |
- $(meson_native_use_bool xkb xkbcommon) |
358 |
- -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" |
359 |
- # Breaks screen, tmux, etc. |
360 |
- -Ddefault-kill-user-processes=false |
361 |
- -Dcreate-log-dirs=false |
362 |
- |
363 |
- # multilib options |
364 |
- $(meson_native_true backlight) |
365 |
- $(meson_native_true binfmt) |
366 |
- $(meson_native_true coredump) |
367 |
- $(meson_native_true environment-d) |
368 |
- $(meson_native_true firstboot) |
369 |
- $(meson_native_true hibernate) |
370 |
- $(meson_native_true hostnamed) |
371 |
- $(meson_native_true ldconfig) |
372 |
- $(meson_native_true localed) |
373 |
- $(meson_native_true man) |
374 |
- $(meson_native_true networkd) |
375 |
- $(meson_native_true quotacheck) |
376 |
- $(meson_native_true randomseed) |
377 |
- $(meson_native_true rfkill) |
378 |
- $(meson_native_true sysusers) |
379 |
- $(meson_native_true timedated) |
380 |
- $(meson_native_true timesyncd) |
381 |
- $(meson_native_true tmpfiles) |
382 |
- $(meson_native_true vconsole) |
383 |
- ) |
384 |
- |
385 |
- meson_src_configure "${myconf[@]}" |
386 |
-} |
387 |
- |
388 |
-multilib_src_test() { |
389 |
- unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR |
390 |
- meson_src_test |
391 |
-} |
392 |
- |
393 |
-multilib_src_install_all() { |
394 |
- local rootprefix=$(usex split-usr '' /usr) |
395 |
- |
396 |
- # meson doesn't know about docdir |
397 |
- mv "${ED}"/usr/share/doc/{systemd,${PF}} || die |
398 |
- |
399 |
- einstalldocs |
400 |
- dodoc "${FILESDIR}"/nsswitch.conf |
401 |
- |
402 |
- if ! use resolvconf; then |
403 |
- rm -f "${ED}${rootprefix}"/sbin/resolvconf || die |
404 |
- fi |
405 |
- |
406 |
- rm "${ED}"/etc/init.d/README || die |
407 |
- rm "${ED}${rootprefix}"/lib/systemd/system-generators/systemd-sysv-generator || die |
408 |
- |
409 |
- if ! use sysv-utils; then |
410 |
- rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die |
411 |
- rm "${ED}"/usr/share/man/man1/init.1 || die |
412 |
- rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die |
413 |
- fi |
414 |
- |
415 |
- if ! use resolvconf && ! use sysv-utils; then |
416 |
- rmdir "${ED}${rootprefix}"/sbin || die |
417 |
- fi |
418 |
- |
419 |
- # https://bugs.gentoo.org/761763 |
420 |
- rm -r "${ED}"/usr/lib/sysusers.d || die |
421 |
- |
422 |
- # Preserve empty dirs in /etc & /var, bug #437008 |
423 |
- keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} |
424 |
- keepdir /etc/kernel/install.d |
425 |
- keepdir /etc/systemd/{network,system,user} |
426 |
- keepdir /etc/udev/rules.d |
427 |
- |
428 |
- keepdir /etc/udev/hwdb.d |
429 |
- |
430 |
- keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} |
431 |
- keepdir /usr/lib/{binfmt.d,modules-load.d} |
432 |
- keepdir /usr/lib/systemd/user-generators |
433 |
- keepdir /var/lib/systemd |
434 |
- keepdir /var/log/journal |
435 |
- |
436 |
- # Symlink /etc/sysctl.conf for easy migration. |
437 |
- dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf |
438 |
- |
439 |
- if use pam; then |
440 |
- newpamd "${FILESDIR}"/systemd-user.pam systemd-user |
441 |
- fi |
442 |
- |
443 |
- if use split-usr; then |
444 |
- # Avoid breaking boot/reboot |
445 |
- dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd |
446 |
- dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown |
447 |
- fi |
448 |
- |
449 |
- # workaround for https://github.com/systemd/systemd/issues/13501 |
450 |
- if use hostnamed-fallback; then |
451 |
- # this file requires dbus-broker |
452 |
- insinto /usr/share/dbus-1/system.d/ |
453 |
- doins "${FILESDIR}/org.freedesktop.hostname1_no_polkit.conf" |
454 |
- |
455 |
- insinto "${rootprefix}/lib/systemd/system/systemd-hostnamed.service.d/" |
456 |
- doins "${FILESDIR}/00-hostnamed-network-user.conf" |
457 |
- fi |
458 |
- |
459 |
- gen_usr_ldscript -a systemd udev |
460 |
-} |
461 |
- |
462 |
-migrate_locale() { |
463 |
- local envd_locale_def="${EROOT}/etc/env.d/02locale" |
464 |
- local envd_locale=( "${EROOT}"/etc/env.d/??locale ) |
465 |
- local locale_conf="${EROOT}/etc/locale.conf" |
466 |
- |
467 |
- if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
468 |
- # If locale.conf does not exist... |
469 |
- if [[ -e ${envd_locale} ]]; then |
470 |
- # ...either copy env.d/??locale if there's one |
471 |
- ebegin "Moving ${envd_locale} to ${locale_conf}" |
472 |
- mv "${envd_locale}" "${locale_conf}" |
473 |
- eend ${?} || FAIL=1 |
474 |
- else |
475 |
- # ...or create a dummy default |
476 |
- ebegin "Creating ${locale_conf}" |
477 |
- cat > "${locale_conf}" <<-EOF |
478 |
- # This file has been created by the sys-apps/systemd ebuild. |
479 |
- # See locale.conf(5) and localectl(1). |
480 |
- |
481 |
- # LANG=${LANG} |
482 |
- EOF |
483 |
- eend ${?} || FAIL=1 |
484 |
- fi |
485 |
- fi |
486 |
- |
487 |
- if [[ ! -L ${envd_locale} ]]; then |
488 |
- # now, if env.d/??locale is not a symlink (to locale.conf)... |
489 |
- if [[ -e ${envd_locale} ]]; then |
490 |
- # ...warn the user that he has duplicate locale settings |
491 |
- ewarn |
492 |
- ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
493 |
- ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
494 |
- ewarn "and create the symlink with the following command:" |
495 |
- ewarn "ln -s -n -f ../locale.conf ${envd_locale}" |
496 |
- ewarn |
497 |
- else |
498 |
- # ...or just create the symlink if there's nothing here |
499 |
- ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" |
500 |
- ln -n -s ../locale.conf "${envd_locale_def}" |
501 |
- eend ${?} || FAIL=1 |
502 |
- fi |
503 |
- fi |
504 |
-} |
505 |
- |
506 |
-pkg_preinst() { |
507 |
- if ! use split-usr; then |
508 |
- local dir |
509 |
- for dir in bin sbin lib; do |
510 |
- if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then |
511 |
- eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged." |
512 |
- eerror "One of them should be a symbolic link to the other one." |
513 |
- FAIL=1 |
514 |
- fi |
515 |
- done |
516 |
- if [[ ${FAIL} ]]; then |
517 |
- eerror "Migration to system layout with merged directories must be performed before" |
518 |
- eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage." |
519 |
- die "System layout with split directories still used" |
520 |
- fi |
521 |
- fi |
522 |
-} |
523 |
- |
524 |
-pkg_postinst() { |
525 |
- systemd_update_catalog |
526 |
- |
527 |
- # Keep this here in case the database format changes so it gets updated |
528 |
- # when required. |
529 |
- systemd-hwdb --root="${ROOT}" update |
530 |
- |
531 |
- udev_reload || FAIL=1 |
532 |
- |
533 |
- # Bug 465468, make sure locales are respected, and ensure consistency |
534 |
- # between OpenRC & systemd |
535 |
- migrate_locale |
536 |
- |
537 |
- if [[ -z ${REPLACING_VERSIONS} ]]; then |
538 |
- if type systemctl &>/dev/null; then |
539 |
- systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1 |
540 |
- fi |
541 |
- elog "To enable a useful set of services, run the following:" |
542 |
- elog " systemctl preset-all --preset-mode=enable-only" |
543 |
- fi |
544 |
- |
545 |
- if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then |
546 |
- rm "${EROOT}/var/lib/systemd/timesync" |
547 |
- fi |
548 |
- |
549 |
- if [[ ${FAIL} ]]; then |
550 |
- eerror "One of the postinst commands failed. Please check the postinst output" |
551 |
- eerror "for errors. You may need to clean up your system and/or try installing" |
552 |
- eerror "systemd again." |
553 |
- eerror |
554 |
- fi |
555 |
- |
556 |
- if use hostnamed-fallback; then |
557 |
- if ! systemctl --root="${ROOT:-/}" is-enabled --quiet dbus-broker.service 2>/dev/null; then |
558 |
- ewarn "dbus-broker.service is not enabled, systemd-hostnamed will fail to run." |
559 |
- ewarn "To enable dbus-broker.service run the next command as root:" |
560 |
- ewarn "systemctl enable dbus-broker.service" |
561 |
- fi |
562 |
- fi |
563 |
-} |
564 |
- |
565 |
-pkg_prerm() { |
566 |
- # If removing systemd completely, remove the catalog database. |
567 |
- if [[ ! ${REPLACED_BY_VERSION} ]]; then |
568 |
- rm -f -v "${EROOT}"/var/lib/systemd/catalog/database |
569 |
- fi |
570 |
-} |
571 |
|
572 |
diff --git a/sys-apps/systemd/systemd-250.6.ebuild b/sys-apps/systemd/systemd-250.6.ebuild |
573 |
deleted file mode 100644 |
574 |
index 56fa2b1cb927..000000000000 |
575 |
--- a/sys-apps/systemd/systemd-250.6.ebuild |
576 |
+++ /dev/null |
577 |
@@ -1,554 +0,0 @@ |
578 |
-# Copyright 2011-2022 Gentoo Authors |
579 |
-# Distributed under the terms of the GNU General Public License v2 |
580 |
- |
581 |
-EAPI=7 |
582 |
-PYTHON_COMPAT=( python3_{8..10} ) |
583 |
- |
584 |
-# Avoid QA warnings |
585 |
-TMPFILES_OPTIONAL=1 |
586 |
-UDEV_OPTIONAL=1 |
587 |
- |
588 |
-if [[ ${PV} == 9999 ]]; then |
589 |
- EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
590 |
- inherit git-r3 |
591 |
-else |
592 |
- if [[ ${PV} == *.* ]]; then |
593 |
- MY_PN=systemd-stable |
594 |
- else |
595 |
- MY_PN=systemd |
596 |
- fi |
597 |
- MY_PV=${PV/_/-} |
598 |
- MY_P=${MY_PN}-${MY_PV} |
599 |
- S=${WORKDIR}/${MY_P} |
600 |
- SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" |
601 |
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" |
602 |
-fi |
603 |
- |
604 |
-inherit bash-completion-r1 flag-o-matic linux-info meson-multilib pam python-any-r1 systemd toolchain-funcs udev usr-ldscript |
605 |
- |
606 |
-DESCRIPTION="System and service manager for Linux" |
607 |
-HOMEPAGE="http://systemd.io/" |
608 |
- |
609 |
-LICENSE="GPL-2 LGPL-2.1 MIT public-domain" |
610 |
-SLOT="0/2" |
611 |
-IUSE=" |
612 |
- acl apparmor audit build cgroup-hybrid cryptsetup curl +dns-over-tls elfutils |
613 |
- fido2 +gcrypt gnuefi gnutls homed hostnamed-fallback http idn importd +kmod |
614 |
- +lz4 lzma nat +openssl pam pcre pkcs11 policykit pwquality qrcode |
615 |
- +resolvconf +seccomp selinux split-usr +sysv-utils test tpm vanilla xkb +zstd |
616 |
-" |
617 |
-REQUIRED_USE=" |
618 |
- dns-over-tls? ( || ( gnutls openssl ) ) |
619 |
- homed? ( cryptsetup pam openssl ) |
620 |
- importd? ( curl lzma || ( gcrypt openssl ) ) |
621 |
- policykit? ( !hostnamed-fallback ) |
622 |
- pwquality? ( homed ) |
623 |
-" |
624 |
-RESTRICT="!test? ( test )" |
625 |
- |
626 |
-MINKV="3.11" |
627 |
- |
628 |
-COMMON_DEPEND=" |
629 |
- >=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] |
630 |
- sys-libs/libcap:0=[${MULTILIB_USEDEP}] |
631 |
- virtual/libcrypt:=[${MULTILIB_USEDEP}] |
632 |
- acl? ( sys-apps/acl:0= ) |
633 |
- apparmor? ( sys-libs/libapparmor:0= ) |
634 |
- audit? ( >=sys-process/audit-2:0= ) |
635 |
- cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= ) |
636 |
- curl? ( net-misc/curl:0= ) |
637 |
- elfutils? ( >=dev-libs/elfutils-0.158:0= ) |
638 |
- fido2? ( dev-libs/libfido2:0= ) |
639 |
- gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) |
640 |
- gnutls? ( >=net-libs/gnutls-3.6.0:0= ) |
641 |
- http? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] ) |
642 |
- idn? ( net-dns/libidn2:= ) |
643 |
- importd? ( |
644 |
- app-arch/bzip2:0= |
645 |
- sys-libs/zlib:0= |
646 |
- ) |
647 |
- kmod? ( >=sys-apps/kmod-15:0= ) |
648 |
- lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) |
649 |
- lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) |
650 |
- nat? ( net-firewall/iptables:0= ) |
651 |
- openssl? ( >=dev-libs/openssl-1.1.0:0= ) |
652 |
- pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] ) |
653 |
- pkcs11? ( app-crypt/p11-kit:0= ) |
654 |
- pcre? ( dev-libs/libpcre2 ) |
655 |
- pwquality? ( dev-libs/libpwquality:0= ) |
656 |
- qrcode? ( media-gfx/qrencode:0= ) |
657 |
- seccomp? ( >=sys-libs/libseccomp-2.3.3:0= ) |
658 |
- selinux? ( sys-libs/libselinux:0= ) |
659 |
- tpm? ( app-crypt/tpm2-tss:0= ) |
660 |
- xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) |
661 |
- zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] ) |
662 |
-" |
663 |
- |
664 |
-# Newer linux-headers needed by ia64, bug #480218 |
665 |
-DEPEND="${COMMON_DEPEND} |
666 |
- >=sys-kernel/linux-headers-${MINKV} |
667 |
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) |
668 |
-" |
669 |
- |
670 |
-# baselayout-2.2 has /run |
671 |
-RDEPEND="${COMMON_DEPEND} |
672 |
- >=acct-group/adm-0-r1 |
673 |
- >=acct-group/wheel-0-r1 |
674 |
- >=acct-group/kmem-0-r1 |
675 |
- >=acct-group/tty-0-r1 |
676 |
- >=acct-group/utmp-0-r1 |
677 |
- >=acct-group/audio-0-r1 |
678 |
- >=acct-group/cdrom-0-r1 |
679 |
- >=acct-group/dialout-0-r1 |
680 |
- >=acct-group/disk-0-r1 |
681 |
- >=acct-group/input-0-r1 |
682 |
- >=acct-group/kvm-0-r1 |
683 |
- >=acct-group/lp-0-r1 |
684 |
- >=acct-group/render-0-r1 |
685 |
- acct-group/sgx |
686 |
- >=acct-group/tape-0-r1 |
687 |
- acct-group/users |
688 |
- >=acct-group/video-0-r1 |
689 |
- >=acct-group/systemd-journal-0-r1 |
690 |
- >=acct-user/root-0-r1 |
691 |
- acct-user/nobody |
692 |
- >=acct-user/systemd-journal-remote-0-r1 |
693 |
- >=acct-user/systemd-coredump-0-r1 |
694 |
- >=acct-user/systemd-network-0-r1 |
695 |
- acct-user/systemd-oom |
696 |
- >=acct-user/systemd-resolve-0-r1 |
697 |
- >=acct-user/systemd-timesync-0-r1 |
698 |
- >=sys-apps/baselayout-2.2 |
699 |
- hostnamed-fallback? ( |
700 |
- acct-group/systemd-hostname |
701 |
- sys-apps/dbus-broker |
702 |
- ) |
703 |
- selinux? ( |
704 |
- sec-policy/selinux-base-policy[systemd] |
705 |
- sec-policy/selinux-ntp |
706 |
- ) |
707 |
- sysv-utils? ( |
708 |
- !sys-apps/openrc[sysv-utils(-)] |
709 |
- !sys-apps/sysvinit |
710 |
- ) |
711 |
- !sysv-utils? ( sys-apps/sysvinit ) |
712 |
- resolvconf? ( !net-dns/openresolv ) |
713 |
- !build? ( || ( |
714 |
- sys-apps/util-linux[kill(-)] |
715 |
- sys-process/procps[kill(+)] |
716 |
- sys-apps/coreutils[kill(-)] |
717 |
- ) ) |
718 |
- !sys-apps/hwids[udev] |
719 |
- !sys-auth/nss-myhostname |
720 |
- !sys-fs/eudev |
721 |
- !sys-fs/udev |
722 |
-" |
723 |
- |
724 |
-# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) |
725 |
-PDEPEND=">=sys-apps/dbus-1.9.8[systemd] |
726 |
- >=sys-fs/udev-init-scripts-34 |
727 |
- policykit? ( sys-auth/polkit ) |
728 |
- !vanilla? ( sys-apps/gentoo-systemd-integration )" |
729 |
- |
730 |
-BDEPEND=" |
731 |
- app-arch/xz-utils:0 |
732 |
- dev-util/gperf |
733 |
- >=dev-util/meson-0.46 |
734 |
- >=sys-apps/coreutils-8.16 |
735 |
- sys-devel/gettext |
736 |
- virtual/pkgconfig |
737 |
- test? ( |
738 |
- app-text/tree |
739 |
- dev-lang/perl |
740 |
- sys-apps/dbus |
741 |
- ) |
742 |
- app-text/docbook-xml-dtd:4.2 |
743 |
- app-text/docbook-xml-dtd:4.5 |
744 |
- app-text/docbook-xsl-stylesheets |
745 |
- dev-libs/libxslt:0 |
746 |
- $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') |
747 |
- $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') |
748 |
-" |
749 |
- |
750 |
-python_check_deps() { |
751 |
- has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" && |
752 |
- has_version -b "dev-python/lxml[${PYTHON_USEDEP}]" |
753 |
-} |
754 |
- |
755 |
-QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" |
756 |
-QA_EXECSTACK="usr/lib/systemd/boot/efi/*" |
757 |
- |
758 |
-pkg_pretend() { |
759 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
760 |
- if use test && has pid-sandbox ${FEATURES}; then |
761 |
- ewarn "Tests are known to fail with PID sandboxing enabled." |
762 |
- ewarn "See https://bugs.gentoo.org/674458." |
763 |
- fi |
764 |
- |
765 |
- local CONFIG_CHECK=" ~BINFMT_MISC ~BLK_DEV_BSG ~CGROUPS |
766 |
- ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE |
767 |
- ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS |
768 |
- ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS |
769 |
- ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH |
770 |
- ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED |
771 |
- ~!SYSFS_DEPRECATED_V2" |
772 |
- |
773 |
- use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" |
774 |
- use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" |
775 |
- kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" |
776 |
- kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" |
777 |
- kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF" |
778 |
- |
779 |
- if kernel_is -ge 5 10 20; then |
780 |
- CONFIG_CHECK+=" ~KCMP" |
781 |
- else |
782 |
- CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" |
783 |
- fi |
784 |
- |
785 |
- if kernel_is -ge 4 18; then |
786 |
- CONFIG_CHECK+=" ~AUTOFS_FS" |
787 |
- else |
788 |
- CONFIG_CHECK+=" ~AUTOFS4_FS" |
789 |
- fi |
790 |
- |
791 |
- if linux_config_exists; then |
792 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
793 |
- if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then |
794 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
795 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
796 |
- fi |
797 |
- if linux_chkconfig_present X86; then |
798 |
- CONFIG_CHECK+=" ~DMIID" |
799 |
- fi |
800 |
- fi |
801 |
- |
802 |
- if kernel_is -lt ${MINKV//./ }; then |
803 |
- ewarn "Kernel version at least ${MINKV} required" |
804 |
- fi |
805 |
- |
806 |
- check_extra_config |
807 |
- fi |
808 |
-} |
809 |
- |
810 |
-pkg_setup() { |
811 |
- : |
812 |
-} |
813 |
- |
814 |
-src_unpack() { |
815 |
- default |
816 |
- [[ ${PV} != 9999 ]] || git-r3_src_unpack |
817 |
-} |
818 |
- |
819 |
-src_prepare() { |
820 |
- # Do NOT add patches here |
821 |
- local PATCHES=() |
822 |
- |
823 |
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches ) |
824 |
- |
825 |
- # Add local patches here |
826 |
- PATCHES+=( |
827 |
- ) |
828 |
- |
829 |
- if ! use vanilla; then |
830 |
- PATCHES+=( |
831 |
- "${FILESDIR}/gentoo-generator-path-r2.patch" |
832 |
- "${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch" |
833 |
- "${FILESDIR}/gentoo-journald-audit.patch" |
834 |
- ) |
835 |
- fi |
836 |
- |
837 |
- default |
838 |
-} |
839 |
- |
840 |
-src_configure() { |
841 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
842 |
- tc-export AR CC NM OBJCOPY RANLIB |
843 |
- |
844 |
- # Broken with FORTIFY_SOURCE=3 without a patch. And the patch |
845 |
- # wasn't backported to 250.x, but it turns out to break Clang |
846 |
- # anyway: bug #841770. |
847 |
- # |
848 |
- # Our toolchain sets F_S=2 by default w/ >= -O2, so we need |
849 |
- # to unset F_S first, then explicitly set 2, to negate any default |
850 |
- # and anything set by the user if they're choosing 3 (or if they've |
851 |
- # modified GCC to set 3). |
852 |
- # |
853 |
- if is-flagq '-O[23]' || is-flagq '-Ofast' ; then |
854 |
- # We can't unconditionally do this b/c we fortify needs |
855 |
- # some level of optimisation. |
856 |
- filter-flags -D_FORTIFY_SOURCE=3 |
857 |
- append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 |
858 |
- fi |
859 |
- |
860 |
- python_setup |
861 |
- |
862 |
- multilib-minimal_src_configure |
863 |
-} |
864 |
- |
865 |
-multilib_src_configure() { |
866 |
- local myconf=( |
867 |
- --localstatedir="${EPREFIX}/var" |
868 |
- -Dsupport-url="https://gentoo.org/support/" |
869 |
- -Dpamlibdir="$(getpam_mod_dir)" |
870 |
- # avoid bash-completion dep |
871 |
- -Dbashcompletiondir="$(get_bashcompdir)" |
872 |
- # make sure we get /bin:/sbin in PATH |
873 |
- $(meson_use split-usr) |
874 |
- -Dsplit-bin=true |
875 |
- -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" |
876 |
- -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" |
877 |
- # Avoid infinite exec recursion, bug 642724 |
878 |
- -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit" |
879 |
- # no deps |
880 |
- -Dima=true |
881 |
- -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified) |
882 |
- # Optional components/dependencies |
883 |
- $(meson_native_use_bool acl) |
884 |
- $(meson_native_use_bool apparmor) |
885 |
- $(meson_native_use_bool audit) |
886 |
- $(meson_native_use_bool cryptsetup libcryptsetup) |
887 |
- $(meson_native_use_bool curl libcurl) |
888 |
- $(meson_native_use_bool dns-over-tls dns-over-tls) |
889 |
- $(meson_native_use_bool elfutils) |
890 |
- $(meson_native_use_bool fido2 libfido2) |
891 |
- $(meson_use gcrypt) |
892 |
- $(meson_native_use_bool gnuefi gnu-efi) |
893 |
- $(meson_native_use_bool gnutls) |
894 |
- -Defi-includedir="${ESYSROOT}/usr/include/efi" |
895 |
- -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" |
896 |
- $(meson_native_use_bool homed) |
897 |
- $(meson_native_use_bool http microhttpd) |
898 |
- $(meson_native_use_bool idn) |
899 |
- $(meson_native_use_bool importd) |
900 |
- $(meson_native_use_bool importd bzip2) |
901 |
- $(meson_native_use_bool importd zlib) |
902 |
- $(meson_native_use_bool kmod) |
903 |
- $(meson_use lz4) |
904 |
- $(meson_use lzma xz) |
905 |
- $(meson_use zstd) |
906 |
- $(meson_native_use_bool nat libiptc) |
907 |
- $(meson_native_use_bool openssl) |
908 |
- $(meson_use pam) |
909 |
- $(meson_native_use_bool pkcs11 p11kit) |
910 |
- $(meson_native_use_bool pcre pcre2) |
911 |
- $(meson_native_use_bool policykit polkit) |
912 |
- $(meson_native_use_bool pwquality) |
913 |
- $(meson_native_use_bool qrcode qrencode) |
914 |
- $(meson_native_use_bool seccomp) |
915 |
- $(meson_native_use_bool selinux) |
916 |
- $(meson_native_use_bool tpm tpm2) |
917 |
- $(meson_native_use_bool test dbus) |
918 |
- $(meson_native_use_bool xkb xkbcommon) |
919 |
- -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" |
920 |
- # Breaks screen, tmux, etc. |
921 |
- -Ddefault-kill-user-processes=false |
922 |
- -Dcreate-log-dirs=false |
923 |
- |
924 |
- # multilib options |
925 |
- $(meson_native_true backlight) |
926 |
- $(meson_native_true binfmt) |
927 |
- $(meson_native_true coredump) |
928 |
- $(meson_native_true environment-d) |
929 |
- $(meson_native_true firstboot) |
930 |
- $(meson_native_true hibernate) |
931 |
- $(meson_native_true hostnamed) |
932 |
- $(meson_native_true ldconfig) |
933 |
- $(meson_native_true localed) |
934 |
- $(meson_native_true man) |
935 |
- $(meson_native_true networkd) |
936 |
- $(meson_native_true quotacheck) |
937 |
- $(meson_native_true randomseed) |
938 |
- $(meson_native_true rfkill) |
939 |
- $(meson_native_true sysusers) |
940 |
- $(meson_native_true timedated) |
941 |
- $(meson_native_true timesyncd) |
942 |
- $(meson_native_true tmpfiles) |
943 |
- $(meson_native_true vconsole) |
944 |
- ) |
945 |
- |
946 |
- meson_src_configure "${myconf[@]}" |
947 |
-} |
948 |
- |
949 |
-multilib_src_test() { |
950 |
- unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR |
951 |
- meson_src_test |
952 |
-} |
953 |
- |
954 |
-multilib_src_install_all() { |
955 |
- local rootprefix=$(usex split-usr '' /usr) |
956 |
- |
957 |
- # meson doesn't know about docdir |
958 |
- mv "${ED}"/usr/share/doc/{systemd,${PF}} || die |
959 |
- |
960 |
- einstalldocs |
961 |
- dodoc "${FILESDIR}"/nsswitch.conf |
962 |
- |
963 |
- if ! use resolvconf; then |
964 |
- rm -f "${ED}${rootprefix}"/sbin/resolvconf || die |
965 |
- fi |
966 |
- |
967 |
- rm "${ED}"/etc/init.d/README || die |
968 |
- rm "${ED}${rootprefix}"/lib/systemd/system-generators/systemd-sysv-generator || die |
969 |
- |
970 |
- if ! use sysv-utils; then |
971 |
- rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die |
972 |
- rm "${ED}"/usr/share/man/man1/init.1 || die |
973 |
- rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die |
974 |
- fi |
975 |
- |
976 |
- if ! use resolvconf && ! use sysv-utils; then |
977 |
- rmdir "${ED}${rootprefix}"/sbin || die |
978 |
- fi |
979 |
- |
980 |
- # https://bugs.gentoo.org/761763 |
981 |
- rm -r "${ED}"/usr/lib/sysusers.d || die |
982 |
- |
983 |
- # Preserve empty dirs in /etc & /var, bug #437008 |
984 |
- keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} |
985 |
- keepdir /etc/kernel/install.d |
986 |
- keepdir /etc/systemd/{network,system,user} |
987 |
- keepdir /etc/udev/rules.d |
988 |
- |
989 |
- keepdir /etc/udev/hwdb.d |
990 |
- |
991 |
- keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} |
992 |
- keepdir /usr/lib/{binfmt.d,modules-load.d} |
993 |
- keepdir /usr/lib/systemd/user-generators |
994 |
- keepdir /var/lib/systemd |
995 |
- keepdir /var/log/journal |
996 |
- |
997 |
- # Symlink /etc/sysctl.conf for easy migration. |
998 |
- dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf |
999 |
- |
1000 |
- if use pam; then |
1001 |
- newpamd "${FILESDIR}"/systemd-user.pam systemd-user |
1002 |
- fi |
1003 |
- |
1004 |
- if use split-usr; then |
1005 |
- # Avoid breaking boot/reboot |
1006 |
- dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd |
1007 |
- dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown |
1008 |
- fi |
1009 |
- |
1010 |
- # workaround for https://github.com/systemd/systemd/issues/13501 |
1011 |
- if use hostnamed-fallback; then |
1012 |
- # this file requires dbus-broker |
1013 |
- insinto /usr/share/dbus-1/system.d/ |
1014 |
- doins "${FILESDIR}/org.freedesktop.hostname1_no_polkit.conf" |
1015 |
- |
1016 |
- insinto "${rootprefix}/lib/systemd/system/systemd-hostnamed.service.d/" |
1017 |
- doins "${FILESDIR}/00-hostnamed-network-user.conf" |
1018 |
- fi |
1019 |
- |
1020 |
- gen_usr_ldscript -a systemd udev |
1021 |
-} |
1022 |
- |
1023 |
-migrate_locale() { |
1024 |
- local envd_locale_def="${EROOT}/etc/env.d/02locale" |
1025 |
- local envd_locale=( "${EROOT}"/etc/env.d/??locale ) |
1026 |
- local locale_conf="${EROOT}/etc/locale.conf" |
1027 |
- |
1028 |
- if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
1029 |
- # If locale.conf does not exist... |
1030 |
- if [[ -e ${envd_locale} ]]; then |
1031 |
- # ...either copy env.d/??locale if there's one |
1032 |
- ebegin "Moving ${envd_locale} to ${locale_conf}" |
1033 |
- mv "${envd_locale}" "${locale_conf}" |
1034 |
- eend ${?} || FAIL=1 |
1035 |
- else |
1036 |
- # ...or create a dummy default |
1037 |
- ebegin "Creating ${locale_conf}" |
1038 |
- cat > "${locale_conf}" <<-EOF |
1039 |
- # This file has been created by the sys-apps/systemd ebuild. |
1040 |
- # See locale.conf(5) and localectl(1). |
1041 |
- |
1042 |
- # LANG=${LANG} |
1043 |
- EOF |
1044 |
- eend ${?} || FAIL=1 |
1045 |
- fi |
1046 |
- fi |
1047 |
- |
1048 |
- if [[ ! -L ${envd_locale} ]]; then |
1049 |
- # now, if env.d/??locale is not a symlink (to locale.conf)... |
1050 |
- if [[ -e ${envd_locale} ]]; then |
1051 |
- # ...warn the user that he has duplicate locale settings |
1052 |
- ewarn |
1053 |
- ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
1054 |
- ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
1055 |
- ewarn "and create the symlink with the following command:" |
1056 |
- ewarn "ln -s -n -f ../locale.conf ${envd_locale}" |
1057 |
- ewarn |
1058 |
- else |
1059 |
- # ...or just create the symlink if there's nothing here |
1060 |
- ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" |
1061 |
- ln -n -s ../locale.conf "${envd_locale_def}" |
1062 |
- eend ${?} || FAIL=1 |
1063 |
- fi |
1064 |
- fi |
1065 |
-} |
1066 |
- |
1067 |
-pkg_preinst() { |
1068 |
- if ! use split-usr; then |
1069 |
- local dir |
1070 |
- for dir in bin sbin lib; do |
1071 |
- if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then |
1072 |
- eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged." |
1073 |
- eerror "One of them should be a symbolic link to the other one." |
1074 |
- FAIL=1 |
1075 |
- fi |
1076 |
- done |
1077 |
- if [[ ${FAIL} ]]; then |
1078 |
- eerror "Migration to system layout with merged directories must be performed before" |
1079 |
- eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage." |
1080 |
- die "System layout with split directories still used" |
1081 |
- fi |
1082 |
- fi |
1083 |
-} |
1084 |
- |
1085 |
-pkg_postinst() { |
1086 |
- systemd_update_catalog |
1087 |
- |
1088 |
- # Keep this here in case the database format changes so it gets updated |
1089 |
- # when required. |
1090 |
- systemd-hwdb --root="${ROOT}" update |
1091 |
- |
1092 |
- udev_reload || FAIL=1 |
1093 |
- |
1094 |
- # Bug 465468, make sure locales are respected, and ensure consistency |
1095 |
- # between OpenRC & systemd |
1096 |
- migrate_locale |
1097 |
- |
1098 |
- if [[ -z ${REPLACING_VERSIONS} ]]; then |
1099 |
- if type systemctl &>/dev/null; then |
1100 |
- systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1 |
1101 |
- fi |
1102 |
- elog "To enable a useful set of services, run the following:" |
1103 |
- elog " systemctl preset-all --preset-mode=enable-only" |
1104 |
- fi |
1105 |
- |
1106 |
- if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then |
1107 |
- rm "${EROOT}/var/lib/systemd/timesync" |
1108 |
- fi |
1109 |
- |
1110 |
- if [[ ${FAIL} ]]; then |
1111 |
- eerror "One of the postinst commands failed. Please check the postinst output" |
1112 |
- eerror "for errors. You may need to clean up your system and/or try installing" |
1113 |
- eerror "systemd again." |
1114 |
- eerror |
1115 |
- fi |
1116 |
- |
1117 |
- if use hostnamed-fallback; then |
1118 |
- if ! systemctl --root="${ROOT:-/}" is-enabled --quiet dbus-broker.service 2>/dev/null; then |
1119 |
- ewarn "dbus-broker.service is not enabled, systemd-hostnamed will fail to run." |
1120 |
- ewarn "To enable dbus-broker.service run the next command as root:" |
1121 |
- ewarn "systemctl enable dbus-broker.service" |
1122 |
- fi |
1123 |
- fi |
1124 |
-} |
1125 |
- |
1126 |
-pkg_prerm() { |
1127 |
- # If removing systemd completely, remove the catalog database. |
1128 |
- if [[ ! ${REPLACED_BY_VERSION} ]]; then |
1129 |
- rm -f -v "${EROOT}"/var/lib/systemd/catalog/database |
1130 |
- fi |
1131 |
-} |