Gentoo Archives: gentoo-commits

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