Gentoo Archives: gentoo-commits

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