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