1 |
commit: 40377bb2c91a705a57460090087807afaf0c0857 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 24 20:00:08 2021 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 25 00:02:14 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40377bb2 |
7 |
|
8 |
sys-apps/systemd: drop 249.6 |
9 |
|
10 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
11 |
|
12 |
sys-apps/systemd/metadata.xml | 1 - |
13 |
sys-apps/systemd/systemd-249.6.ebuild | 514 ---------------------------------- |
14 |
2 files changed, 515 deletions(-) |
15 |
|
16 |
diff --git a/sys-apps/systemd/metadata.xml b/sys-apps/systemd/metadata.xml |
17 |
index cd0754d004d6..1197a68cfdd0 100644 |
18 |
--- a/sys-apps/systemd/metadata.xml |
19 |
+++ b/sys-apps/systemd/metadata.xml |
20 |
@@ -22,7 +22,6 @@ |
21 |
<flag name="homed">Enable portable home directories</flag> |
22 |
<flag name="hostnamed-fallback">Enable setting hostname with networkd/hostnamed without polkit (requires running <pkg>sys-apps/dbus-broker</pkg>)</flag> |
23 |
<flag name="http">Enable embedded HTTP server in journald</flag> |
24 |
- <flag name="hwdb">Enable support for the hardware database</flag> |
25 |
<flag name="importd">Enable import daemon</flag> |
26 |
<flag name="kmod">Enable kernel module loading via <pkg>sys-apps/kmod</pkg></flag> |
27 |
<flag name="lz4">Enable lz4 compression for the journal</flag> |
28 |
|
29 |
diff --git a/sys-apps/systemd/systemd-249.6.ebuild b/sys-apps/systemd/systemd-249.6.ebuild |
30 |
deleted file mode 100644 |
31 |
index 3604e181f993..000000000000 |
32 |
--- a/sys-apps/systemd/systemd-249.6.ebuild |
33 |
+++ /dev/null |
34 |
@@ -1,514 +0,0 @@ |
35 |
-# Copyright 2011-2021 Gentoo Authors |
36 |
-# Distributed under the terms of the GNU General Public License v2 |
37 |
- |
38 |
-EAPI=7 |
39 |
-PYTHON_COMPAT=( python3_{8..10} ) |
40 |
- |
41 |
-# Avoid QA warnings |
42 |
-TMPFILES_OPTIONAL=1 |
43 |
- |
44 |
-if [[ ${PV} == 9999 ]]; then |
45 |
- EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
46 |
- inherit git-r3 |
47 |
-else |
48 |
- if [[ ${PV} == *.* ]]; then |
49 |
- MY_PN=systemd-stable |
50 |
- else |
51 |
- MY_PN=systemd |
52 |
- fi |
53 |
- MY_PV=${PV/_/-} |
54 |
- MY_P=${MY_PN}-${MY_PV} |
55 |
- S=${WORKDIR}/${MY_P} |
56 |
- SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" |
57 |
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86" |
58 |
-fi |
59 |
- |
60 |
-inherit bash-completion-r1 linux-info meson-multilib pam python-any-r1 systemd toolchain-funcs udev usr-ldscript |
61 |
- |
62 |
-DESCRIPTION="System and service manager for Linux" |
63 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
64 |
- |
65 |
-LICENSE="GPL-2 LGPL-2.1 MIT public-domain" |
66 |
-SLOT="0/2" |
67 |
-IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils fido2 +gcrypt gnuefi homed http +hwdb 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" |
68 |
- |
69 |
-REQUIRED_USE=" |
70 |
- homed? ( cryptsetup pam ) |
71 |
- importd? ( curl gcrypt lzma ) |
72 |
- pwquality? ( homed ) |
73 |
-" |
74 |
-RESTRICT="!test? ( test )" |
75 |
- |
76 |
-MINKV="3.11" |
77 |
- |
78 |
-OPENSSL_DEP=">=dev-libs/openssl-1.1.0:0=" |
79 |
- |
80 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] |
81 |
- sys-libs/libcap:0=[${MULTILIB_USEDEP}] |
82 |
- virtual/libcrypt:=[${MULTILIB_USEDEP}] |
83 |
- acl? ( sys-apps/acl:0= ) |
84 |
- apparmor? ( sys-libs/libapparmor:0= ) |
85 |
- audit? ( >=sys-process/audit-2:0= ) |
86 |
- cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= ) |
87 |
- curl? ( net-misc/curl:0= ) |
88 |
- dns-over-tls? ( >=net-libs/gnutls-3.6.0:0= ) |
89 |
- elfutils? ( >=dev-libs/elfutils-0.158:0= ) |
90 |
- fido2? ( dev-libs/libfido2:0= ) |
91 |
- gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) |
92 |
- homed? ( ${OPENSSL_DEP} ) |
93 |
- http? ( |
94 |
- >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] |
95 |
- >=net-libs/gnutls-3.1.4:0= |
96 |
- ) |
97 |
- idn? ( net-dns/libidn2:= ) |
98 |
- importd? ( |
99 |
- app-arch/bzip2:0= |
100 |
- sys-libs/zlib:0= |
101 |
- ) |
102 |
- kmod? ( >=sys-apps/kmod-15:0= ) |
103 |
- lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) |
104 |
- lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) |
105 |
- nat? ( net-firewall/iptables: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 |
- repart? ( ${OPENSSL_DEP} ) |
112 |
- seccomp? ( >=sys-libs/libseccomp-2.3.3:0= ) |
113 |
- selinux? ( sys-libs/libselinux:0= ) |
114 |
- tpm? ( app-crypt/tpm2-tss:0= ) |
115 |
- xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) |
116 |
- zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] ) |
117 |
-" |
118 |
- |
119 |
-# Newer linux-headers needed by ia64, bug #480218 |
120 |
-DEPEND="${COMMON_DEPEND} |
121 |
- >=sys-kernel/linux-headers-${MINKV} |
122 |
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) |
123 |
-" |
124 |
- |
125 |
-# baselayout-2.2 has /run |
126 |
-RDEPEND="${COMMON_DEPEND} |
127 |
- >=acct-group/adm-0-r1 |
128 |
- >=acct-group/wheel-0-r1 |
129 |
- >=acct-group/kmem-0-r1 |
130 |
- >=acct-group/tty-0-r1 |
131 |
- >=acct-group/utmp-0-r1 |
132 |
- >=acct-group/audio-0-r1 |
133 |
- >=acct-group/cdrom-0-r1 |
134 |
- >=acct-group/dialout-0-r1 |
135 |
- >=acct-group/disk-0-r1 |
136 |
- >=acct-group/input-0-r1 |
137 |
- >=acct-group/kvm-0-r1 |
138 |
- >=acct-group/lp-0-r1 |
139 |
- >=acct-group/render-0-r1 |
140 |
- acct-group/sgx |
141 |
- >=acct-group/tape-0-r1 |
142 |
- acct-group/users |
143 |
- >=acct-group/video-0-r1 |
144 |
- >=acct-group/systemd-journal-0-r1 |
145 |
- >=acct-user/root-0-r1 |
146 |
- acct-user/nobody |
147 |
- >=acct-user/systemd-journal-remote-0-r1 |
148 |
- >=acct-user/systemd-coredump-0-r1 |
149 |
- >=acct-user/systemd-network-0-r1 |
150 |
- acct-user/systemd-oom |
151 |
- >=acct-user/systemd-resolve-0-r1 |
152 |
- >=acct-user/systemd-timesync-0-r1 |
153 |
- >=sys-apps/baselayout-2.2 |
154 |
- selinux? ( sec-policy/selinux-base-policy[systemd] ) |
155 |
- sysv-utils? ( |
156 |
- !sys-apps/openrc[sysv-utils(-)] |
157 |
- !sys-apps/sysvinit |
158 |
- ) |
159 |
- !sysv-utils? ( sys-apps/sysvinit ) |
160 |
- resolvconf? ( !net-dns/openresolv ) |
161 |
- !build? ( || ( |
162 |
- sys-apps/util-linux[kill(-)] |
163 |
- sys-process/procps[kill(+)] |
164 |
- sys-apps/coreutils[kill(-)] |
165 |
- ) ) |
166 |
- !sys-auth/nss-myhostname |
167 |
- !sys-fs/eudev |
168 |
- !sys-fs/udev |
169 |
-" |
170 |
- |
171 |
-# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) |
172 |
-PDEPEND=">=sys-apps/dbus-1.9.8[systemd] |
173 |
- hwdb? ( sys-apps/hwids[systemd(+),udev] ) |
174 |
- >=sys-fs/udev-init-scripts-34 |
175 |
- policykit? ( sys-auth/polkit ) |
176 |
- !vanilla? ( sys-apps/gentoo-systemd-integration )" |
177 |
- |
178 |
-BDEPEND=" |
179 |
- app-arch/xz-utils:0 |
180 |
- dev-util/gperf |
181 |
- >=dev-util/meson-0.46 |
182 |
- >=sys-apps/coreutils-8.16 |
183 |
- sys-devel/gettext |
184 |
- virtual/pkgconfig |
185 |
- test? ( |
186 |
- app-text/tree |
187 |
- dev-lang/perl |
188 |
- sys-apps/dbus |
189 |
- ) |
190 |
- app-text/docbook-xml-dtd:4.2 |
191 |
- app-text/docbook-xml-dtd:4.5 |
192 |
- app-text/docbook-xsl-stylesheets |
193 |
- dev-libs/libxslt:0 |
194 |
- $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') |
195 |
- $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') |
196 |
-" |
197 |
- |
198 |
-python_check_deps() { |
199 |
- has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" && |
200 |
- has_version -b "dev-python/lxml[${PYTHON_USEDEP}]" |
201 |
-} |
202 |
- |
203 |
-QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" |
204 |
-QA_EXECSTACK="usr/lib/systemd/boot/efi/*" |
205 |
- |
206 |
-pkg_pretend() { |
207 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
208 |
- if use test && has pid-sandbox ${FEATURES}; then |
209 |
- ewarn "Tests are known to fail with PID sandboxing enabled." |
210 |
- ewarn "See https://bugs.gentoo.org/674458." |
211 |
- fi |
212 |
- |
213 |
- local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS |
214 |
- ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE |
215 |
- ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS |
216 |
- ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS |
217 |
- ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH |
218 |
- ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED |
219 |
- ~!SYSFS_DEPRECATED_V2" |
220 |
- |
221 |
- use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" |
222 |
- use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" |
223 |
- kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" |
224 |
- kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" |
225 |
- kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF" |
226 |
- |
227 |
- if kernel_is -lt 5 10 20; then |
228 |
- CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" |
229 |
- else |
230 |
- CONFIG_CHECK+=" ~KCMP" |
231 |
- fi |
232 |
- |
233 |
- if linux_config_exists; then |
234 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
235 |
- if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then |
236 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
237 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
238 |
- fi |
239 |
- if linux_chkconfig_present X86; then |
240 |
- CONFIG_CHECK+=" ~DMIID" |
241 |
- fi |
242 |
- fi |
243 |
- |
244 |
- if kernel_is -lt ${MINKV//./ }; then |
245 |
- ewarn "Kernel version at least ${MINKV} required" |
246 |
- fi |
247 |
- |
248 |
- check_extra_config |
249 |
- fi |
250 |
-} |
251 |
- |
252 |
-pkg_setup() { |
253 |
- : |
254 |
-} |
255 |
- |
256 |
-src_unpack() { |
257 |
- default |
258 |
- [[ ${PV} != 9999 ]] || git-r3_src_unpack |
259 |
-} |
260 |
- |
261 |
-src_prepare() { |
262 |
- # Do NOT add patches here |
263 |
- local PATCHES=() |
264 |
- |
265 |
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches ) |
266 |
- |
267 |
- # Add local patches here |
268 |
- PATCHES+=( |
269 |
- ) |
270 |
- |
271 |
- if ! use vanilla; then |
272 |
- PATCHES+=( |
273 |
- "${FILESDIR}/gentoo-generator-path-r2.patch" |
274 |
- "${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch" |
275 |
- "${FILESDIR}/gentoo-journald-audit.patch" |
276 |
- ) |
277 |
- fi |
278 |
- |
279 |
- default |
280 |
-} |
281 |
- |
282 |
-src_configure() { |
283 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
284 |
- tc-export AR CC NM OBJCOPY RANLIB |
285 |
- |
286 |
- python_setup |
287 |
- |
288 |
- multilib-minimal_src_configure |
289 |
-} |
290 |
- |
291 |
-multilib_src_configure() { |
292 |
- local myconf=( |
293 |
- --localstatedir="${EPREFIX}/var" |
294 |
- -Dsupport-url="https://gentoo.org/support/" |
295 |
- -Dpamlibdir="$(getpam_mod_dir)" |
296 |
- # avoid bash-completion dep |
297 |
- -Dbashcompletiondir="$(get_bashcompdir)" |
298 |
- # make sure we get /bin:/sbin in PATH |
299 |
- $(meson_use split-usr) |
300 |
- -Dsplit-bin=true |
301 |
- -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" |
302 |
- -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" |
303 |
- # Avoid infinite exec recursion, bug 642724 |
304 |
- -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit" |
305 |
- # no deps |
306 |
- -Dima=true |
307 |
- -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified) |
308 |
- # Optional components/dependencies |
309 |
- $(meson_native_use_bool acl) |
310 |
- $(meson_native_use_bool apparmor) |
311 |
- $(meson_native_use_bool audit) |
312 |
- $(meson_native_use_bool cryptsetup libcryptsetup) |
313 |
- $(meson_native_use_bool curl libcurl) |
314 |
- $(meson_native_use_bool dns-over-tls dns-over-tls) |
315 |
- $(meson_native_use_bool elfutils) |
316 |
- $(meson_native_use_bool fido2 libfido2) |
317 |
- $(meson_use gcrypt) |
318 |
- $(meson_native_use_bool gnuefi gnu-efi) |
319 |
- -Defi-includedir="${ESYSROOT}/usr/include/efi" |
320 |
- -Defi-ld="$(tc-getLD)" |
321 |
- -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" |
322 |
- $(meson_native_use_bool homed) |
323 |
- $(meson_native_use_bool hwdb) |
324 |
- $(meson_native_use_bool http microhttpd) |
325 |
- $(meson_native_use_bool idn) |
326 |
- $(meson_native_use_bool importd) |
327 |
- $(meson_native_use_bool importd bzip2) |
328 |
- $(meson_native_use_bool importd zlib) |
329 |
- $(meson_native_use_bool kmod) |
330 |
- $(meson_use lz4) |
331 |
- $(meson_use lzma xz) |
332 |
- $(meson_use zstd) |
333 |
- $(meson_native_use_bool nat libiptc) |
334 |
- $(meson_use pam) |
335 |
- $(meson_native_use_bool pkcs11 p11kit) |
336 |
- $(meson_native_use_bool pcre pcre2) |
337 |
- $(meson_native_use_bool policykit polkit) |
338 |
- $(meson_native_use_bool pwquality) |
339 |
- $(meson_native_use_bool qrcode qrencode) |
340 |
- $(meson_native_use_bool repart) |
341 |
- $(meson_native_use_bool seccomp) |
342 |
- $(meson_native_use_bool selinux) |
343 |
- $(meson_native_use_bool tpm tpm2) |
344 |
- $(meson_native_use_bool test dbus) |
345 |
- $(meson_native_use_bool xkb xkbcommon) |
346 |
- -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" |
347 |
- # Breaks screen, tmux, etc. |
348 |
- -Ddefault-kill-user-processes=false |
349 |
- -Dcreate-log-dirs=false |
350 |
- |
351 |
- # multilib options |
352 |
- $(meson_native_true backlight) |
353 |
- $(meson_native_true binfmt) |
354 |
- $(meson_native_true coredump) |
355 |
- $(meson_native_true environment-d) |
356 |
- $(meson_native_true firstboot) |
357 |
- $(meson_native_true hibernate) |
358 |
- $(meson_native_true hostnamed) |
359 |
- $(meson_native_true ldconfig) |
360 |
- $(meson_native_true localed) |
361 |
- $(meson_native_true man) |
362 |
- $(meson_native_true networkd) |
363 |
- $(meson_native_true quotacheck) |
364 |
- $(meson_native_true randomseed) |
365 |
- $(meson_native_true rfkill) |
366 |
- $(meson_native_true sysusers) |
367 |
- $(meson_native_true timedated) |
368 |
- $(meson_native_true timesyncd) |
369 |
- $(meson_native_true tmpfiles) |
370 |
- $(meson_native_true vconsole) |
371 |
- ) |
372 |
- |
373 |
- meson_src_configure "${myconf[@]}" |
374 |
-} |
375 |
- |
376 |
-multilib_src_test() { |
377 |
- unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR |
378 |
- meson_src_test |
379 |
-} |
380 |
- |
381 |
-multilib_src_install_all() { |
382 |
- local rootprefix=$(usex split-usr '' /usr) |
383 |
- |
384 |
- # meson doesn't know about docdir |
385 |
- mv "${ED}"/usr/share/doc/{systemd,${PF}} || die |
386 |
- |
387 |
- einstalldocs |
388 |
- dodoc "${FILESDIR}"/nsswitch.conf |
389 |
- |
390 |
- if ! use resolvconf; then |
391 |
- rm -f "${ED}${rootprefix}"/sbin/resolvconf || die |
392 |
- fi |
393 |
- |
394 |
- rm "${ED}"/etc/init.d/README || die |
395 |
- rm "${ED}${rootprefix}"/lib/systemd/system-generators/systemd-sysv-generator || die |
396 |
- |
397 |
- if ! use sysv-utils; then |
398 |
- rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die |
399 |
- rm "${ED}"/usr/share/man/man1/init.1 || die |
400 |
- rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die |
401 |
- fi |
402 |
- |
403 |
- if ! use resolvconf && ! use sysv-utils; then |
404 |
- rmdir "${ED}${rootprefix}"/sbin || die |
405 |
- fi |
406 |
- |
407 |
- # https://bugs.gentoo.org/761763 |
408 |
- rm -r "${ED}"/usr/lib/sysusers.d || die |
409 |
- |
410 |
- # Preserve empty dirs in /etc & /var, bug #437008 |
411 |
- keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} |
412 |
- keepdir /etc/kernel/install.d |
413 |
- keepdir /etc/systemd/{network,system,user} |
414 |
- keepdir /etc/udev/rules.d |
415 |
- |
416 |
- if use hwdb; then |
417 |
- keepdir /etc/udev/hwdb.d |
418 |
- fi |
419 |
- |
420 |
- keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} |
421 |
- keepdir /usr/lib/{binfmt.d,modules-load.d} |
422 |
- keepdir /usr/lib/systemd/user-generators |
423 |
- keepdir /var/lib/systemd |
424 |
- keepdir /var/log/journal |
425 |
- |
426 |
- # Symlink /etc/sysctl.conf for easy migration. |
427 |
- dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf |
428 |
- |
429 |
- if use pam; then |
430 |
- newpamd "${FILESDIR}"/systemd-user.pam systemd-user |
431 |
- fi |
432 |
- |
433 |
- if use hwdb; then |
434 |
- rm -r "${ED}${rootprefix}"/lib/udev/hwdb.d || die |
435 |
- fi |
436 |
- |
437 |
- if use split-usr; then |
438 |
- # Avoid breaking boot/reboot |
439 |
- dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd |
440 |
- dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown |
441 |
- fi |
442 |
- |
443 |
- gen_usr_ldscript -a systemd udev |
444 |
-} |
445 |
- |
446 |
-migrate_locale() { |
447 |
- local envd_locale_def="${EROOT}/etc/env.d/02locale" |
448 |
- local envd_locale=( "${EROOT}"/etc/env.d/??locale ) |
449 |
- local locale_conf="${EROOT}/etc/locale.conf" |
450 |
- |
451 |
- if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
452 |
- # If locale.conf does not exist... |
453 |
- if [[ -e ${envd_locale} ]]; then |
454 |
- # ...either copy env.d/??locale if there's one |
455 |
- ebegin "Moving ${envd_locale} to ${locale_conf}" |
456 |
- mv "${envd_locale}" "${locale_conf}" |
457 |
- eend ${?} || FAIL=1 |
458 |
- else |
459 |
- # ...or create a dummy default |
460 |
- ebegin "Creating ${locale_conf}" |
461 |
- cat > "${locale_conf}" <<-EOF |
462 |
- # This file has been created by the sys-apps/systemd ebuild. |
463 |
- # See locale.conf(5) and localectl(1). |
464 |
- |
465 |
- # LANG=${LANG} |
466 |
- EOF |
467 |
- eend ${?} || FAIL=1 |
468 |
- fi |
469 |
- fi |
470 |
- |
471 |
- if [[ ! -L ${envd_locale} ]]; then |
472 |
- # now, if env.d/??locale is not a symlink (to locale.conf)... |
473 |
- if [[ -e ${envd_locale} ]]; then |
474 |
- # ...warn the user that he has duplicate locale settings |
475 |
- ewarn |
476 |
- ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
477 |
- ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
478 |
- ewarn "and create the symlink with the following command:" |
479 |
- ewarn "ln -s -n -f ../locale.conf ${envd_locale}" |
480 |
- ewarn |
481 |
- else |
482 |
- # ...or just create the symlink if there's nothing here |
483 |
- ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" |
484 |
- ln -n -s ../locale.conf "${envd_locale_def}" |
485 |
- eend ${?} || FAIL=1 |
486 |
- fi |
487 |
- fi |
488 |
-} |
489 |
- |
490 |
-pkg_preinst() { |
491 |
- if ! use split-usr; then |
492 |
- local dir |
493 |
- for dir in bin sbin lib; do |
494 |
- if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then |
495 |
- eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged." |
496 |
- eerror "One of them should be a symbolic link to the other one." |
497 |
- FAIL=1 |
498 |
- fi |
499 |
- done |
500 |
- if [[ ${FAIL} ]]; then |
501 |
- eerror "Migration to system layout with merged directories must be performed before" |
502 |
- eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage." |
503 |
- die "System layout with split directories still used" |
504 |
- fi |
505 |
- fi |
506 |
-} |
507 |
- |
508 |
-pkg_postinst() { |
509 |
- systemd_update_catalog |
510 |
- |
511 |
- # Keep this here in case the database format changes so it gets updated |
512 |
- # when required. |
513 |
- if use hwdb; then |
514 |
- systemd-hwdb --root="${ROOT}" update |
515 |
- fi |
516 |
- |
517 |
- udev_reload || FAIL=1 |
518 |
- |
519 |
- # Bug 465468, make sure locales are respected, and ensure consistency |
520 |
- # between OpenRC & systemd |
521 |
- migrate_locale |
522 |
- |
523 |
- if [[ -z ${REPLACING_VERSIONS} ]]; then |
524 |
- if type systemctl &>/dev/null; then |
525 |
- systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1 |
526 |
- fi |
527 |
- elog "To enable a useful set of services, run the following:" |
528 |
- elog " systemctl preset-all --preset-mode=enable-only" |
529 |
- fi |
530 |
- |
531 |
- if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then |
532 |
- rm "${EROOT}/var/lib/systemd/timesync" |
533 |
- fi |
534 |
- |
535 |
- if [[ ${FAIL} ]]; then |
536 |
- eerror "One of the postinst commands failed. Please check the postinst output" |
537 |
- eerror "for errors. You may need to clean up your system and/or try installing" |
538 |
- eerror "systemd again." |
539 |
- eerror |
540 |
- fi |
541 |
-} |
542 |
- |
543 |
-pkg_prerm() { |
544 |
- # If removing systemd completely, remove the catalog database. |
545 |
- if [[ ! ${REPLACED_BY_VERSION} ]]; then |
546 |
- rm -f -v "${EROOT}"/var/lib/systemd/catalog/database |
547 |
- fi |
548 |
-} |