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, 03 Jun 2022 02:32:19
Message-Id: 1654223523.a0e6089f9d18d327b4982b0dfeca1e0be436c194.sam@gentoo
1 commit: a0e6089f9d18d327b4982b0dfeca1e0be436c194
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 3 02:32:03 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 3 02:32:03 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0e6089f
7
8 sys-apps/systemd: drop 250.5-r1, 251, 251.1
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-apps/systemd/Manifest | 3 -
13 sys-apps/systemd/systemd-250.5-r1.ebuild | 534 -------------------------------
14 sys-apps/systemd/systemd-251.1.ebuild | 532 ------------------------------
15 sys-apps/systemd/systemd-251.ebuild | 512 -----------------------------
16 4 files changed, 1581 deletions(-)
17
18 diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest
19 index 879581d25573..63371ab8bbbc 100644
20 --- a/sys-apps/systemd/Manifest
21 +++ b/sys-apps/systemd/Manifest
22 @@ -1,7 +1,4 @@
23 -DIST systemd-251.tar.gz 11431104 BLAKE2B da783d815adf244defc3c1ec8a788fffdff45215f5c2449c457e872ad89b8270caa3e48ecb696fa79eb1d79578ded3d098802fed0fc69a191ba2d7d6b120e068 SHA512 5a7116cfd99f7875334a1ce55a76ba1840a28b6500b02de82b879629768e10457efd8278024aa1ffefd43defe657284c4d51ab502ed3c7e6b63d5b6e0cc1f642
24 DIST systemd-stable-250.4.tar.gz 11132786 BLAKE2B 8fdfe1bad76e572dc1be0955f3d1c4080f2beb81a2f9670f80827899f5406ab8ed8675400c2f5e8ccef44cf1bceff42ceae12a42e1b67d46c0deb523e6495f25 SHA512 307ed0920da660b6c45d909fea66864fb98db8b2f6905d629fb2012fc4bf64dd25fd61168c22bf4098200be541be9b0e815fbde98806a99c85cb33d49d8b63d0
25 -DIST systemd-stable-250.5.tar.gz 11212059 BLAKE2B b7dbcb9e82c51e966db20a92ccd59ac19309702c481dd575c4e6367ca5ade10fe4b689925416ce1169682380cbf22d7d692b2378ef091f3007c16891992e3f92 SHA512 ad864b67bd5e2f5fd5705b636467827e4735142cefba150d24bb8e51ac0263650b2b0e53d4426eb509d1db59b83dc3b4c4bf157cc355fc2b7524db6bc4a9b5cd
26 DIST systemd-stable-250.6.tar.gz 11212534 BLAKE2B faf065dbe5c02d9d3311202f93b9ad8984c4c9d127d32c17f305b81046f9e29cfc731cdd4abbd073965f448f4e1dff81d80313896b346548d2640939ad509365 SHA512 b625d5fb419370d238cf72f2e59c8fa6782972d94746835bde3a64a7746edd1d5fad901bbb01311f858b7dbdff6d759518b615708bb835a81964c16878d5644e
27 DIST systemd-stable-250.7.tar.gz 11214975 BLAKE2B 5d94b4b1f8b0cd6e8284a89ac0d4bd373eccdad2c3d6e6c453df79c8df47ee0f9cfbde764b72b1f9d172d07e2d9f1f1f41c1ab254cf4abd0722469ebc3ad7cf8 SHA512 99bc6f0c9757b280cb694f3fb4d6fe04d5ce55583eb2bae5ddeb324bb5ee9930c1720fcc27293d90cddba188473653ec541a471ae8115710a5850c26d0ba215d
28 -DIST systemd-stable-251.1.tar.gz 11431880 BLAKE2B 0442489242b2fbfb316f207c7c8c718322a1ea2af8176378fb39bea441fdd8bbb36ea840af9bdec257b714f5f3099daa1139bc6df6ca6f0c2f467c59013fba92 SHA512 6fc72197b684abc343480acb66b8f749c186bd7a031ddd757c4a0e5fd8fdeda0cde9c9e634fd3d9e2b2d1ed96019c5f8e7119ad10a7f51d5dc13fac2571c6c70
29 DIST systemd-stable-251.2.tar.gz 11434645 BLAKE2B a7e118649a7d27b789206ea9f6f2d0314e44561367506ee763a9e98fb97579b3fc49c7a402c8da142945dc98444558f0e311557f52c50863cebc7532c17c651f SHA512 0c4011b685a1e8d535af123cbaf79ab53d59ea665ca5350ab1077ad4e962b49c1fd5b1b5bb3f28c3e28145dfd02aa83023f78de5edec15afe84e3e06e742a67c
30
31 diff --git a/sys-apps/systemd/systemd-250.5-r1.ebuild b/sys-apps/systemd/systemd-250.5-r1.ebuild
32 deleted file mode 100644
33 index 455ecd8a9463..000000000000
34 --- a/sys-apps/systemd/systemd-250.5-r1.ebuild
35 +++ /dev/null
36 @@ -1,534 +0,0 @@
37 -# Copyright 2011-2022 Gentoo Authors
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=7
41 -PYTHON_COMPAT=( python3_{8..10} )
42 -
43 -# Avoid QA warnings
44 -TMPFILES_OPTIONAL=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 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
60 -fi
61 -
62 -inherit bash-completion-r1 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="https://www.freedesktop.org/wiki/Software/systemd"
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 hostnamed-fallback http idn importd +kmod
72 - +lz4 lzma nat +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 - policykit? ( !hostnamed-fallback )
80 - pwquality? ( homed )
81 -"
82 -RESTRICT="!test? ( test )"
83 -
84 -MINKV="3.11"
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 - nat? ( 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 - hostnamed-fallback? (
158 - acct-group/systemd-hostname
159 - sys-apps/dbus-broker
160 - )
161 - selinux? ( sec-policy/selinux-base-policy[systemd] )
162 - sysv-utils? (
163 - !sys-apps/openrc[sysv-utils(-)]
164 - !sys-apps/sysvinit
165 - )
166 - !sysv-utils? ( sys-apps/sysvinit )
167 - resolvconf? ( !net-dns/openresolv )
168 - !build? ( || (
169 - sys-apps/util-linux[kill(-)]
170 - sys-process/procps[kill(+)]
171 - sys-apps/coreutils[kill(-)]
172 - ) )
173 - !sys-apps/hwids[udev]
174 - !sys-auth/nss-myhostname
175 - !sys-fs/eudev
176 - !sys-fs/udev
177 -"
178 -
179 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
180 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
181 - >=sys-fs/udev-init-scripts-34
182 - policykit? ( sys-auth/polkit )
183 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
184 -
185 -BDEPEND="
186 - app-arch/xz-utils:0
187 - dev-util/gperf
188 - >=dev-util/meson-0.46
189 - >=sys-apps/coreutils-8.16
190 - sys-devel/gettext
191 - virtual/pkgconfig
192 - test? (
193 - app-text/tree
194 - dev-lang/perl
195 - sys-apps/dbus
196 - )
197 - app-text/docbook-xml-dtd:4.2
198 - app-text/docbook-xml-dtd:4.5
199 - app-text/docbook-xsl-stylesheets
200 - dev-libs/libxslt:0
201 - $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
202 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
203 -"
204 -
205 -python_check_deps() {
206 - has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" &&
207 - has_version -b "dev-python/lxml[${PYTHON_USEDEP}]"
208 -}
209 -
210 -QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
211 -QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
212 -
213 -pkg_pretend() {
214 - if [[ ${MERGE_TYPE} != buildonly ]]; then
215 - if use test && has pid-sandbox ${FEATURES}; then
216 - ewarn "Tests are known to fail with PID sandboxing enabled."
217 - ewarn "See https://bugs.gentoo.org/674458."
218 - fi
219 -
220 - local CONFIG_CHECK=" ~BINFMT_MISC ~BLK_DEV_BSG ~CGROUPS
221 - ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
222 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
223 - ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS
224 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
225 - ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
226 - ~!SYSFS_DEPRECATED_V2"
227 -
228 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
229 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
230 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
231 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
232 - kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
233 -
234 - if kernel_is -ge 5 10 20; then
235 - CONFIG_CHECK+=" ~KCMP"
236 - else
237 - CONFIG_CHECK+=" ~CHECKPOINT_RESTORE"
238 - fi
239 -
240 - if kernel_is -ge 4 18; then
241 - CONFIG_CHECK+=" ~AUTOFS_FS"
242 - else
243 - CONFIG_CHECK+=" ~AUTOFS4_FS"
244 - fi
245 -
246 - if linux_config_exists; then
247 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
248 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
249 - ewarn "It's recommended to set an empty value to the following kernel config option:"
250 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
251 - fi
252 - if linux_chkconfig_present X86; then
253 - CONFIG_CHECK+=" ~DMIID"
254 - fi
255 - fi
256 -
257 - if kernel_is -lt ${MINKV//./ }; then
258 - ewarn "Kernel version at least ${MINKV} required"
259 - fi
260 -
261 - check_extra_config
262 - fi
263 -}
264 -
265 -pkg_setup() {
266 - :
267 -}
268 -
269 -src_unpack() {
270 - default
271 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
272 -}
273 -
274 -src_prepare() {
275 - # Do NOT add patches here
276 - local PATCHES=()
277 -
278 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
279 -
280 - # Add local patches here
281 - PATCHES+=(
282 - )
283 -
284 - if ! use vanilla; then
285 - PATCHES+=(
286 - "${FILESDIR}/gentoo-generator-path-r2.patch"
287 - "${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch"
288 - "${FILESDIR}/gentoo-journald-audit.patch"
289 - )
290 - fi
291 -
292 - default
293 -}
294 -
295 -src_configure() {
296 - # Prevent conflicts with i686 cross toolchain, bug 559726
297 - tc-export AR CC NM OBJCOPY RANLIB
298 -
299 - python_setup
300 -
301 - multilib-minimal_src_configure
302 -}
303 -
304 -multilib_src_configure() {
305 - local myconf=(
306 - --localstatedir="${EPREFIX}/var"
307 - -Dsupport-url="https://gentoo.org/support/"
308 - -Dpamlibdir="$(getpam_mod_dir)"
309 - # avoid bash-completion dep
310 - -Dbashcompletiondir="$(get_bashcompdir)"
311 - # make sure we get /bin:/sbin in PATH
312 - $(meson_use split-usr)
313 - -Dsplit-bin=true
314 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
315 - -Drootlibdir="${EPREFIX}/usr/$(get_libdir)"
316 - # Avoid infinite exec recursion, bug 642724
317 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
318 - # no deps
319 - -Dima=true
320 - -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified)
321 - # Optional components/dependencies
322 - $(meson_native_use_bool acl)
323 - $(meson_native_use_bool apparmor)
324 - $(meson_native_use_bool audit)
325 - $(meson_native_use_bool cryptsetup libcryptsetup)
326 - $(meson_native_use_bool curl libcurl)
327 - $(meson_native_use_bool dns-over-tls dns-over-tls)
328 - $(meson_native_use_bool elfutils)
329 - $(meson_native_use_bool fido2 libfido2)
330 - $(meson_use gcrypt)
331 - $(meson_native_use_bool gnuefi gnu-efi)
332 - $(meson_native_use_bool gnutls)
333 - -Defi-includedir="${ESYSROOT}/usr/include/efi"
334 - -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)"
335 - $(meson_native_use_bool homed)
336 - $(meson_native_use_bool http microhttpd)
337 - $(meson_native_use_bool idn)
338 - $(meson_native_use_bool importd)
339 - $(meson_native_use_bool importd bzip2)
340 - $(meson_native_use_bool importd zlib)
341 - $(meson_native_use_bool kmod)
342 - $(meson_use lz4)
343 - $(meson_use lzma xz)
344 - $(meson_use zstd)
345 - $(meson_native_use_bool nat libiptc)
346 - $(meson_native_use_bool openssl)
347 - $(meson_use pam)
348 - $(meson_native_use_bool pkcs11 p11kit)
349 - $(meson_native_use_bool pcre pcre2)
350 - $(meson_native_use_bool policykit polkit)
351 - $(meson_native_use_bool pwquality)
352 - $(meson_native_use_bool qrcode qrencode)
353 - $(meson_native_use_bool seccomp)
354 - $(meson_native_use_bool selinux)
355 - $(meson_native_use_bool tpm tpm2)
356 - $(meson_native_use_bool test dbus)
357 - $(meson_native_use_bool xkb xkbcommon)
358 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
359 - # Breaks screen, tmux, etc.
360 - -Ddefault-kill-user-processes=false
361 - -Dcreate-log-dirs=false
362 -
363 - # multilib options
364 - $(meson_native_true backlight)
365 - $(meson_native_true binfmt)
366 - $(meson_native_true coredump)
367 - $(meson_native_true environment-d)
368 - $(meson_native_true firstboot)
369 - $(meson_native_true hibernate)
370 - $(meson_native_true hostnamed)
371 - $(meson_native_true ldconfig)
372 - $(meson_native_true localed)
373 - $(meson_native_true man)
374 - $(meson_native_true networkd)
375 - $(meson_native_true quotacheck)
376 - $(meson_native_true randomseed)
377 - $(meson_native_true rfkill)
378 - $(meson_native_true sysusers)
379 - $(meson_native_true timedated)
380 - $(meson_native_true timesyncd)
381 - $(meson_native_true tmpfiles)
382 - $(meson_native_true vconsole)
383 - )
384 -
385 - meson_src_configure "${myconf[@]}"
386 -}
387 -
388 -multilib_src_test() {
389 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
390 - meson_src_test
391 -}
392 -
393 -multilib_src_install_all() {
394 - local rootprefix=$(usex split-usr '' /usr)
395 -
396 - # meson doesn't know about docdir
397 - mv "${ED}"/usr/share/doc/{systemd,${PF}} || die
398 -
399 - einstalldocs
400 - dodoc "${FILESDIR}"/nsswitch.conf
401 -
402 - if ! use resolvconf; then
403 - rm -f "${ED}${rootprefix}"/sbin/resolvconf || die
404 - fi
405 -
406 - rm "${ED}"/etc/init.d/README || die
407 - rm "${ED}${rootprefix}"/lib/systemd/system-generators/systemd-sysv-generator || die
408 -
409 - if ! use sysv-utils; then
410 - rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
411 - rm "${ED}"/usr/share/man/man1/init.1 || die
412 - rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
413 - fi
414 -
415 - if ! use resolvconf && ! use sysv-utils; then
416 - rmdir "${ED}${rootprefix}"/sbin || die
417 - fi
418 -
419 - # https://bugs.gentoo.org/761763
420 - rm -r "${ED}"/usr/lib/sysusers.d || die
421 -
422 - # Preserve empty dirs in /etc & /var, bug #437008
423 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
424 - keepdir /etc/kernel/install.d
425 - keepdir /etc/systemd/{network,system,user}
426 - keepdir /etc/udev/rules.d
427 -
428 - keepdir /etc/udev/hwdb.d
429 -
430 - keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown}
431 - keepdir /usr/lib/{binfmt.d,modules-load.d}
432 - keepdir /usr/lib/systemd/user-generators
433 - keepdir /var/lib/systemd
434 - keepdir /var/log/journal
435 -
436 - # Symlink /etc/sysctl.conf for easy migration.
437 - dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf
438 -
439 - if use pam; then
440 - newpamd "${FILESDIR}"/systemd-user.pam systemd-user
441 - fi
442 -
443 - if use split-usr; then
444 - # Avoid breaking boot/reboot
445 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
446 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
447 - fi
448 -
449 - # workaround for https://github.com/systemd/systemd/issues/13501
450 - if use hostnamed-fallback; then
451 - # this file requires dbus-broker
452 - insinto /usr/share/dbus-1/system.d/
453 - doins "${FILESDIR}/org.freedesktop.hostname1_no_polkit.conf"
454 -
455 - insinto "${rootprefix}/lib/systemd/system/systemd-hostnamed.service.d/"
456 - doins "${FILESDIR}/00-hostnamed-network-user.conf"
457 - fi
458 -
459 - gen_usr_ldscript -a systemd udev
460 -}
461 -
462 -migrate_locale() {
463 - local envd_locale_def="${EROOT}/etc/env.d/02locale"
464 - local envd_locale=( "${EROOT}"/etc/env.d/??locale )
465 - local locale_conf="${EROOT}/etc/locale.conf"
466 -
467 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
468 - # If locale.conf does not exist...
469 - if [[ -e ${envd_locale} ]]; then
470 - # ...either copy env.d/??locale if there's one
471 - ebegin "Moving ${envd_locale} to ${locale_conf}"
472 - mv "${envd_locale}" "${locale_conf}"
473 - eend ${?} || FAIL=1
474 - else
475 - # ...or create a dummy default
476 - ebegin "Creating ${locale_conf}"
477 - cat > "${locale_conf}" <<-EOF
478 - # This file has been created by the sys-apps/systemd ebuild.
479 - # See locale.conf(5) and localectl(1).
480 -
481 - # LANG=${LANG}
482 - EOF
483 - eend ${?} || FAIL=1
484 - fi
485 - fi
486 -
487 - if [[ ! -L ${envd_locale} ]]; then
488 - # now, if env.d/??locale is not a symlink (to locale.conf)...
489 - if [[ -e ${envd_locale} ]]; then
490 - # ...warn the user that he has duplicate locale settings
491 - ewarn
492 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
493 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
494 - ewarn "and create the symlink with the following command:"
495 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
496 - ewarn
497 - else
498 - # ...or just create the symlink if there's nothing here
499 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
500 - ln -n -s ../locale.conf "${envd_locale_def}"
501 - eend ${?} || FAIL=1
502 - fi
503 - fi
504 -}
505 -
506 -pkg_preinst() {
507 - if ! use split-usr; then
508 - local dir
509 - for dir in bin sbin lib; do
510 - if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then
511 - eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged."
512 - eerror "One of them should be a symbolic link to the other one."
513 - FAIL=1
514 - fi
515 - done
516 - if [[ ${FAIL} ]]; then
517 - eerror "Migration to system layout with merged directories must be performed before"
518 - eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage."
519 - die "System layout with split directories still used"
520 - fi
521 - fi
522 -}
523 -
524 -pkg_postinst() {
525 - systemd_update_catalog
526 -
527 - # Keep this here in case the database format changes so it gets updated
528 - # when required.
529 - systemd-hwdb --root="${ROOT}" update
530 -
531 - udev_reload || FAIL=1
532 -
533 - # Bug 465468, make sure locales are respected, and ensure consistency
534 - # between OpenRC & systemd
535 - migrate_locale
536 -
537 - if [[ -z ${REPLACING_VERSIONS} ]]; then
538 - if type systemctl &>/dev/null; then
539 - systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1
540 - fi
541 - elog "To enable a useful set of services, run the following:"
542 - elog " systemctl preset-all --preset-mode=enable-only"
543 - fi
544 -
545 - if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then
546 - rm "${EROOT}/var/lib/systemd/timesync"
547 - fi
548 -
549 - if [[ ${FAIL} ]]; then
550 - eerror "One of the postinst commands failed. Please check the postinst output"
551 - eerror "for errors. You may need to clean up your system and/or try installing"
552 - eerror "systemd again."
553 - eerror
554 - fi
555 -
556 - if use hostnamed-fallback; then
557 - if ! systemctl --root="${ROOT:-/}" is-enabled --quiet dbus-broker.service 2>/dev/null; then
558 - ewarn "dbus-broker.service is not enabled, systemd-hostnamed will fail to run."
559 - ewarn "To enable dbus-broker.service run the next command as root:"
560 - ewarn "systemctl enable dbus-broker.service"
561 - fi
562 - fi
563 -}
564 -
565 -pkg_prerm() {
566 - # If removing systemd completely, remove the catalog database.
567 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
568 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
569 - fi
570 -}
571
572 diff --git a/sys-apps/systemd/systemd-251.1.ebuild b/sys-apps/systemd/systemd-251.1.ebuild
573 deleted file mode 100644
574 index a11dccb51ae7..000000000000
575 --- a/sys-apps/systemd/systemd-251.1.ebuild
576 +++ /dev/null
577 @@ -1,532 +0,0 @@
578 -# Copyright 2011-2022 Gentoo Authors
579 -# Distributed under the terms of the GNU General Public License v2
580 -
581 -EAPI=7
582 -PYTHON_COMPAT=( python3_{8..10} )
583 -
584 -# Avoid QA warnings
585 -TMPFILES_OPTIONAL=1
586 -
587 -QA_PKGCONFIG_VERSION=$(ver_cut 1)
588 -
589 -if [[ ${PV} == 9999 ]]; then
590 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
591 - inherit git-r3
592 -else
593 - if [[ ${PV} == *.* ]]; then
594 - MY_PN=systemd-stable
595 - else
596 - MY_PN=systemd
597 - fi
598 - MY_PV=${PV/_/-}
599 - MY_P=${MY_PN}-${MY_PV}
600 - S=${WORKDIR}/${MY_P}
601 - SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz"
602 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
603 -fi
604 -
605 -inherit bash-completion-r1 flag-o-matic linux-info meson-multilib pam python-any-r1 systemd toolchain-funcs udev usr-ldscript
606 -
607 -DESCRIPTION="System and service manager for Linux"
608 -HOMEPAGE="http://systemd.io/"
609 -
610 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
611 -SLOT="0/2"
612 -IUSE="
613 - acl apparmor audit build cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
614 - fido2 +gcrypt gnuefi gnutls homed http idn importd +kmod
615 - +lz4 lzma nat +openssl pam pcre pkcs11 policykit pwquality qrcode
616 - +resolvconf +seccomp selinux split-usr +sysv-utils test tpm vanilla xkb +zstd
617 -"
618 -REQUIRED_USE="
619 - dns-over-tls? ( || ( gnutls openssl ) )
620 - homed? ( cryptsetup pam openssl )
621 - importd? ( curl lzma || ( gcrypt openssl ) )
622 - pwquality? ( homed )
623 -"
624 -RESTRICT="!test? ( test )"
625 -
626 -MINKV="4.15"
627 -
628 -COMMON_DEPEND="
629 - >=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
630 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
631 - virtual/libcrypt:=[${MULTILIB_USEDEP}]
632 - acl? ( sys-apps/acl:0= )
633 - apparmor? ( sys-libs/libapparmor:0= )
634 - audit? ( >=sys-process/audit-2:0= )
635 - cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= )
636 - curl? ( net-misc/curl:0= )
637 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
638 - fido2? ( dev-libs/libfido2:0= )
639 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
640 - gnutls? ( >=net-libs/gnutls-3.6.0:0= )
641 - http? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] )
642 - idn? ( net-dns/libidn2:= )
643 - importd? (
644 - app-arch/bzip2:0=
645 - sys-libs/zlib:0=
646 - )
647 - kmod? ( >=sys-apps/kmod-15:0= )
648 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
649 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
650 - nat? ( net-firewall/iptables:0= )
651 - openssl? ( >=dev-libs/openssl-1.1.0:0= )
652 - pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] )
653 - pkcs11? ( app-crypt/p11-kit:0= )
654 - pcre? ( dev-libs/libpcre2 )
655 - pwquality? ( dev-libs/libpwquality:0= )
656 - qrcode? ( media-gfx/qrencode:0= )
657 - seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
658 - selinux? ( sys-libs/libselinux:0= )
659 - tpm? ( app-crypt/tpm2-tss:0= )
660 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
661 - zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] )
662 -"
663 -
664 -# Newer linux-headers needed by ia64, bug #480218
665 -DEPEND="${COMMON_DEPEND}
666 - >=sys-kernel/linux-headers-${MINKV}
667 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
668 -"
669 -
670 -# baselayout-2.2 has /run
671 -RDEPEND="${COMMON_DEPEND}
672 - >=acct-group/adm-0-r1
673 - >=acct-group/wheel-0-r1
674 - >=acct-group/kmem-0-r1
675 - >=acct-group/tty-0-r1
676 - >=acct-group/utmp-0-r1
677 - >=acct-group/audio-0-r1
678 - >=acct-group/cdrom-0-r1
679 - >=acct-group/dialout-0-r1
680 - >=acct-group/disk-0-r1
681 - >=acct-group/input-0-r1
682 - >=acct-group/kvm-0-r1
683 - >=acct-group/lp-0-r1
684 - >=acct-group/render-0-r1
685 - acct-group/sgx
686 - >=acct-group/tape-0-r1
687 - acct-group/users
688 - >=acct-group/video-0-r1
689 - >=acct-group/systemd-journal-0-r1
690 - >=acct-user/root-0-r1
691 - acct-user/nobody
692 - >=acct-user/systemd-journal-remote-0-r1
693 - >=acct-user/systemd-coredump-0-r1
694 - >=acct-user/systemd-network-0-r1
695 - acct-user/systemd-oom
696 - >=acct-user/systemd-resolve-0-r1
697 - >=acct-user/systemd-timesync-0-r1
698 - >=sys-apps/baselayout-2.2
699 - selinux? ( sec-policy/selinux-base-policy[systemd] )
700 - sysv-utils? (
701 - !sys-apps/openrc[sysv-utils(-)]
702 - !sys-apps/sysvinit
703 - )
704 - !sysv-utils? ( sys-apps/sysvinit )
705 - resolvconf? ( !net-dns/openresolv )
706 - !build? ( || (
707 - sys-apps/util-linux[kill(-)]
708 - sys-process/procps[kill(+)]
709 - sys-apps/coreutils[kill(-)]
710 - ) )
711 - !sys-apps/hwids[udev]
712 - !sys-auth/nss-myhostname
713 - !sys-fs/eudev
714 - !sys-fs/udev
715 -"
716 -
717 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
718 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
719 - >=sys-fs/udev-init-scripts-34
720 - policykit? ( sys-auth/polkit )
721 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
722 -
723 -BDEPEND="
724 - app-arch/xz-utils:0
725 - dev-util/gperf
726 - >=dev-util/meson-0.46
727 - >=sys-apps/coreutils-8.16
728 - sys-devel/gettext
729 - virtual/pkgconfig
730 - test? (
731 - app-text/tree
732 - dev-lang/perl
733 - sys-apps/dbus
734 - )
735 - app-text/docbook-xml-dtd:4.2
736 - app-text/docbook-xml-dtd:4.5
737 - app-text/docbook-xsl-stylesheets
738 - dev-libs/libxslt:0
739 - $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
740 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
741 -"
742 -
743 -python_check_deps() {
744 - has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" &&
745 - has_version -b "dev-python/lxml[${PYTHON_USEDEP}]"
746 -}
747 -
748 -QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
749 -QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
750 -
751 -pkg_pretend() {
752 - if [[ ${MERGE_TYPE} != buildonly ]]; then
753 - if use test && has pid-sandbox ${FEATURES}; then
754 - ewarn "Tests are known to fail with PID sandboxing enabled."
755 - ewarn "See https://bugs.gentoo.org/674458."
756 - fi
757 -
758 - local CONFIG_CHECK=" ~BINFMT_MISC ~BLK_DEV_BSG ~CGROUPS
759 - ~CGROUP_BPF ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
760 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
761 - ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS
762 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
763 - ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
764 - ~!SYSFS_DEPRECATED_V2"
765 -
766 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
767 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
768 -
769 - if kernel_is -ge 5 10 20; then
770 - CONFIG_CHECK+=" ~KCMP"
771 - else
772 - CONFIG_CHECK+=" ~CHECKPOINT_RESTORE"
773 - fi
774 -
775 - if kernel_is -ge 4 18; then
776 - CONFIG_CHECK+=" ~AUTOFS_FS"
777 - else
778 - CONFIG_CHECK+=" ~AUTOFS4_FS"
779 - fi
780 -
781 - if linux_config_exists; then
782 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
783 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
784 - ewarn "It's recommended to set an empty value to the following kernel config option:"
785 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
786 - fi
787 - if linux_chkconfig_present X86; then
788 - CONFIG_CHECK+=" ~DMIID"
789 - fi
790 - fi
791 -
792 - if kernel_is -lt ${MINKV//./ }; then
793 - ewarn "Kernel version at least ${MINKV} required"
794 - fi
795 -
796 - check_extra_config
797 - fi
798 -}
799 -
800 -pkg_setup() {
801 - :
802 -}
803 -
804 -src_unpack() {
805 - default
806 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
807 -}
808 -
809 -src_prepare() {
810 - # Do NOT add patches here
811 - local PATCHES=()
812 -
813 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
814 -
815 - # Add local patches here
816 - PATCHES+=(
817 - "${FILESDIR}/251-format-string.patch"
818 - # Breaks Clang. Revert the commit for now and force off F_S=3.
819 - # bug #841770.
820 - "${FILESDIR}/251-revert-fortify-source-3-fix.patch"
821 - )
822 -
823 - if ! use vanilla; then
824 - PATCHES+=(
825 - "${FILESDIR}/gentoo-generator-path-r2.patch"
826 - "${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch"
827 - "${FILESDIR}/gentoo-journald-audit.patch"
828 - )
829 - fi
830 -
831 - # Fails with split-usr.
832 - sed -i -e '2i exit 77' test/test-rpm-macros.sh || die
833 -
834 - default
835 -}
836 -
837 -src_configure() {
838 - # Prevent conflicts with i686 cross toolchain, bug 559726
839 - tc-export AR CC NM OBJCOPY RANLIB
840 -
841 - # Broken with FORTIFY_SOURCE=3 without a patch. We have to revert
842 - # the upstream patch for it because it breaks Clang: bug #841770.
843 - #
844 - # Our toolchain sets F_S=2 by default w/ >= -O2, so we need
845 - # to unset F_S first, then explicitly set 2, to negate any default
846 - # and anything set by the user if they're choosing 3 (or if they've
847 - # modified GCC to set 3).
848 - #
849 - if is-flagq '-O[23]' || is-flagq '-Ofast' ; then
850 - # We can't unconditionally do this b/c we fortify needs
851 - # some level of optimisation.
852 - filter-flags -D_FORTIFY_SOURCE=3
853 - append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
854 - fi
855 -
856 - python_setup
857 -
858 - multilib-minimal_src_configure
859 -}
860 -
861 -multilib_src_configure() {
862 - local myconf=(
863 - --localstatedir="${EPREFIX}/var"
864 - -Dsupport-url="https://gentoo.org/support/"
865 - -Dpamlibdir="$(getpam_mod_dir)"
866 - # avoid bash-completion dep
867 - -Dbashcompletiondir="$(get_bashcompdir)"
868 - # make sure we get /bin:/sbin in PATH
869 - $(meson_use split-usr)
870 - -Dsplit-bin=true
871 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
872 - -Drootlibdir="${EPREFIX}/usr/$(get_libdir)"
873 - # Avoid infinite exec recursion, bug 642724
874 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
875 - # no deps
876 - -Dima=true
877 - -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified)
878 - # Optional components/dependencies
879 - $(meson_native_use_bool acl)
880 - $(meson_native_use_bool apparmor)
881 - $(meson_native_use_bool audit)
882 - $(meson_native_use_bool cryptsetup libcryptsetup)
883 - $(meson_native_use_bool curl libcurl)
884 - $(meson_native_use_bool dns-over-tls dns-over-tls)
885 - $(meson_native_use_bool elfutils)
886 - $(meson_native_use_bool fido2 libfido2)
887 - $(meson_use gcrypt)
888 - $(meson_native_use_bool gnuefi gnu-efi)
889 - $(meson_native_use_bool gnutls)
890 - -Defi-includedir="${ESYSROOT}/usr/include/efi"
891 - -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)"
892 - $(meson_native_use_bool homed)
893 - $(meson_native_use_bool http microhttpd)
894 - $(meson_native_use_bool idn)
895 - $(meson_native_use_bool importd)
896 - $(meson_native_use_bool importd bzip2)
897 - $(meson_native_use_bool importd zlib)
898 - $(meson_native_use_bool kmod)
899 - $(meson_use lz4)
900 - $(meson_use lzma xz)
901 - $(meson_use zstd)
902 - $(meson_native_use_bool nat libiptc)
903 - $(meson_native_use_bool openssl)
904 - $(meson_use pam)
905 - $(meson_native_use_bool pkcs11 p11kit)
906 - $(meson_native_use_bool pcre pcre2)
907 - $(meson_native_use_bool policykit polkit)
908 - $(meson_native_use_bool pwquality)
909 - $(meson_native_use_bool qrcode qrencode)
910 - $(meson_native_use_bool seccomp)
911 - $(meson_native_use_bool selinux)
912 - $(meson_native_use_bool tpm tpm2)
913 - $(meson_native_use_bool test dbus)
914 - $(meson_native_use_bool xkb xkbcommon)
915 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
916 - # Breaks screen, tmux, etc.
917 - -Ddefault-kill-user-processes=false
918 - -Dcreate-log-dirs=false
919 -
920 - # multilib options
921 - $(meson_native_true backlight)
922 - $(meson_native_true binfmt)
923 - $(meson_native_true coredump)
924 - $(meson_native_true environment-d)
925 - $(meson_native_true firstboot)
926 - $(meson_native_true hibernate)
927 - $(meson_native_true hostnamed)
928 - $(meson_native_true ldconfig)
929 - $(meson_native_true localed)
930 - $(meson_native_true man)
931 - $(meson_native_true networkd)
932 - $(meson_native_true quotacheck)
933 - $(meson_native_true randomseed)
934 - $(meson_native_true rfkill)
935 - $(meson_native_true sysusers)
936 - $(meson_native_true timedated)
937 - $(meson_native_true timesyncd)
938 - $(meson_native_true tmpfiles)
939 - $(meson_native_true vconsole)
940 - )
941 -
942 - meson_src_configure "${myconf[@]}"
943 -}
944 -
945 -multilib_src_test() {
946 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
947 - meson_src_test
948 -}
949 -
950 -multilib_src_install_all() {
951 - local rootprefix=$(usex split-usr '' /usr)
952 -
953 - # meson doesn't know about docdir
954 - mv "${ED}"/usr/share/doc/{systemd,${PF}} || die
955 -
956 - einstalldocs
957 - dodoc "${FILESDIR}"/nsswitch.conf
958 -
959 - if ! use resolvconf; then
960 - rm -f "${ED}${rootprefix}"/sbin/resolvconf || die
961 - fi
962 -
963 - rm "${ED}"/etc/init.d/README || die
964 - rm "${ED}${rootprefix}"/lib/systemd/system-generators/systemd-sysv-generator || die
965 -
966 - if ! use sysv-utils; then
967 - rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
968 - rm "${ED}"/usr/share/man/man1/init.1 || die
969 - rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
970 - fi
971 -
972 - if ! use resolvconf && ! use sysv-utils; then
973 - rmdir "${ED}${rootprefix}"/sbin || die
974 - fi
975 -
976 - # https://bugs.gentoo.org/761763
977 - rm -r "${ED}"/usr/lib/sysusers.d || die
978 -
979 - # Preserve empty dirs in /etc & /var, bug #437008
980 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
981 - keepdir /etc/kernel/install.d
982 - keepdir /etc/systemd/{network,system,user}
983 - keepdir /etc/udev/rules.d
984 -
985 - keepdir /etc/udev/hwdb.d
986 -
987 - keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown}
988 - keepdir /usr/lib/{binfmt.d,modules-load.d}
989 - keepdir /usr/lib/systemd/user-generators
990 - keepdir /var/lib/systemd
991 - keepdir /var/log/journal
992 -
993 - # Symlink /etc/sysctl.conf for easy migration.
994 - dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf
995 -
996 - if use pam; then
997 - newpamd "${FILESDIR}"/systemd-user.pam systemd-user
998 - fi
999 -
1000 - if use split-usr; then
1001 - # Avoid breaking boot/reboot
1002 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
1003 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
1004 - fi
1005 -
1006 - gen_usr_ldscript -a systemd udev
1007 -}
1008 -
1009 -migrate_locale() {
1010 - local envd_locale_def="${EROOT}/etc/env.d/02locale"
1011 - local envd_locale=( "${EROOT}"/etc/env.d/??locale )
1012 - local locale_conf="${EROOT}/etc/locale.conf"
1013 -
1014 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
1015 - # If locale.conf does not exist...
1016 - if [[ -e ${envd_locale} ]]; then
1017 - # ...either copy env.d/??locale if there's one
1018 - ebegin "Moving ${envd_locale} to ${locale_conf}"
1019 - mv "${envd_locale}" "${locale_conf}"
1020 - eend ${?} || FAIL=1
1021 - else
1022 - # ...or create a dummy default
1023 - ebegin "Creating ${locale_conf}"
1024 - cat > "${locale_conf}" <<-EOF
1025 - # This file has been created by the sys-apps/systemd ebuild.
1026 - # See locale.conf(5) and localectl(1).
1027 -
1028 - # LANG=${LANG}
1029 - EOF
1030 - eend ${?} || FAIL=1
1031 - fi
1032 - fi
1033 -
1034 - if [[ ! -L ${envd_locale} ]]; then
1035 - # now, if env.d/??locale is not a symlink (to locale.conf)...
1036 - if [[ -e ${envd_locale} ]]; then
1037 - # ...warn the user that he has duplicate locale settings
1038 - ewarn
1039 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
1040 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
1041 - ewarn "and create the symlink with the following command:"
1042 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
1043 - ewarn
1044 - else
1045 - # ...or just create the symlink if there's nothing here
1046 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
1047 - ln -n -s ../locale.conf "${envd_locale_def}"
1048 - eend ${?} || FAIL=1
1049 - fi
1050 - fi
1051 -}
1052 -
1053 -pkg_preinst() {
1054 - if ! use split-usr; then
1055 - local dir
1056 - for dir in bin sbin lib; do
1057 - if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then
1058 - eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged."
1059 - eerror "One of them should be a symbolic link to the other one."
1060 - FAIL=1
1061 - fi
1062 - done
1063 - if [[ ${FAIL} ]]; then
1064 - eerror "Migration to system layout with merged directories must be performed before"
1065 - eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage."
1066 - die "System layout with split directories still used"
1067 - fi
1068 - fi
1069 -}
1070 -
1071 -pkg_postinst() {
1072 - systemd_update_catalog
1073 -
1074 - # Keep this here in case the database format changes so it gets updated
1075 - # when required.
1076 - systemd-hwdb --root="${ROOT}" update
1077 -
1078 - udev_reload || FAIL=1
1079 -
1080 - # Bug 465468, make sure locales are respected, and ensure consistency
1081 - # between OpenRC & systemd
1082 - migrate_locale
1083 -
1084 - if [[ -z ${REPLACING_VERSIONS} ]]; then
1085 - if type systemctl &>/dev/null; then
1086 - systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1
1087 - fi
1088 - elog "To enable a useful set of services, run the following:"
1089 - elog " systemctl preset-all --preset-mode=enable-only"
1090 - fi
1091 -
1092 - if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then
1093 - rm "${EROOT}/var/lib/systemd/timesync"
1094 - fi
1095 -
1096 - if [[ ${FAIL} ]]; then
1097 - eerror "One of the postinst commands failed. Please check the postinst output"
1098 - eerror "for errors. You may need to clean up your system and/or try installing"
1099 - eerror "systemd again."
1100 - eerror
1101 - fi
1102 -}
1103 -
1104 -pkg_prerm() {
1105 - # If removing systemd completely, remove the catalog database.
1106 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
1107 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
1108 - fi
1109 -}
1110
1111 diff --git a/sys-apps/systemd/systemd-251.ebuild b/sys-apps/systemd/systemd-251.ebuild
1112 deleted file mode 100644
1113 index b0d9cb825629..000000000000
1114 --- a/sys-apps/systemd/systemd-251.ebuild
1115 +++ /dev/null
1116 @@ -1,512 +0,0 @@
1117 -# Copyright 2011-2022 Gentoo Authors
1118 -# Distributed under the terms of the GNU General Public License v2
1119 -
1120 -EAPI=7
1121 -PYTHON_COMPAT=( python3_{8..10} )
1122 -
1123 -# Avoid QA warnings
1124 -TMPFILES_OPTIONAL=1
1125 -
1126 -if [[ ${PV} == 9999 ]]; then
1127 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
1128 - inherit git-r3
1129 -else
1130 - if [[ ${PV} == *.* ]]; then
1131 - MY_PN=systemd-stable
1132 - else
1133 - MY_PN=systemd
1134 - fi
1135 - MY_PV=${PV/_/-}
1136 - MY_P=${MY_PN}-${MY_PV}
1137 - S=${WORKDIR}/${MY_P}
1138 - SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz"
1139 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
1140 -fi
1141 -
1142 -inherit bash-completion-r1 linux-info meson-multilib pam python-any-r1 systemd toolchain-funcs udev usr-ldscript
1143 -
1144 -DESCRIPTION="System and service manager for Linux"
1145 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
1146 -
1147 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
1148 -SLOT="0/2"
1149 -IUSE="
1150 - acl apparmor audit build cgroup-hybrid cryptsetup curl +dns-over-tls elfutils
1151 - fido2 +gcrypt gnuefi gnutls homed http idn importd +kmod
1152 - +lz4 lzma nat +openssl pam pcre pkcs11 policykit pwquality qrcode
1153 - +resolvconf +seccomp selinux split-usr +sysv-utils test tpm vanilla xkb +zstd
1154 -"
1155 -REQUIRED_USE="
1156 - dns-over-tls? ( || ( gnutls openssl ) )
1157 - homed? ( cryptsetup pam openssl )
1158 - importd? ( curl lzma || ( gcrypt openssl ) )
1159 - pwquality? ( homed )
1160 -"
1161 -RESTRICT="!test? ( test )"
1162 -
1163 -MINKV="4.15"
1164 -
1165 -COMMON_DEPEND="
1166 - >=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
1167 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
1168 - virtual/libcrypt:=[${MULTILIB_USEDEP}]
1169 - acl? ( sys-apps/acl:0= )
1170 - apparmor? ( sys-libs/libapparmor:0= )
1171 - audit? ( >=sys-process/audit-2:0= )
1172 - cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= )
1173 - curl? ( net-misc/curl:0= )
1174 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
1175 - fido2? ( dev-libs/libfido2:0= )
1176 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
1177 - gnutls? ( >=net-libs/gnutls-3.6.0:0= )
1178 - http? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] )
1179 - idn? ( net-dns/libidn2:= )
1180 - importd? (
1181 - app-arch/bzip2:0=
1182 - sys-libs/zlib:0=
1183 - )
1184 - kmod? ( >=sys-apps/kmod-15:0= )
1185 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
1186 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
1187 - nat? ( net-firewall/iptables:0= )
1188 - openssl? ( >=dev-libs/openssl-1.1.0:0= )
1189 - pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] )
1190 - pkcs11? ( app-crypt/p11-kit:0= )
1191 - pcre? ( dev-libs/libpcre2 )
1192 - pwquality? ( dev-libs/libpwquality:0= )
1193 - qrcode? ( media-gfx/qrencode:0= )
1194 - seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
1195 - selinux? ( sys-libs/libselinux:0= )
1196 - tpm? ( app-crypt/tpm2-tss:0= )
1197 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
1198 - zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] )
1199 -"
1200 -
1201 -# Newer linux-headers needed by ia64, bug #480218
1202 -DEPEND="${COMMON_DEPEND}
1203 - >=sys-kernel/linux-headers-${MINKV}
1204 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
1205 -"
1206 -
1207 -# baselayout-2.2 has /run
1208 -RDEPEND="${COMMON_DEPEND}
1209 - >=acct-group/adm-0-r1
1210 - >=acct-group/wheel-0-r1
1211 - >=acct-group/kmem-0-r1
1212 - >=acct-group/tty-0-r1
1213 - >=acct-group/utmp-0-r1
1214 - >=acct-group/audio-0-r1
1215 - >=acct-group/cdrom-0-r1
1216 - >=acct-group/dialout-0-r1
1217 - >=acct-group/disk-0-r1
1218 - >=acct-group/input-0-r1
1219 - >=acct-group/kvm-0-r1
1220 - >=acct-group/lp-0-r1
1221 - >=acct-group/render-0-r1
1222 - acct-group/sgx
1223 - >=acct-group/tape-0-r1
1224 - acct-group/users
1225 - >=acct-group/video-0-r1
1226 - >=acct-group/systemd-journal-0-r1
1227 - >=acct-user/root-0-r1
1228 - acct-user/nobody
1229 - >=acct-user/systemd-journal-remote-0-r1
1230 - >=acct-user/systemd-coredump-0-r1
1231 - >=acct-user/systemd-network-0-r1
1232 - acct-user/systemd-oom
1233 - >=acct-user/systemd-resolve-0-r1
1234 - >=acct-user/systemd-timesync-0-r1
1235 - >=sys-apps/baselayout-2.2
1236 - selinux? ( sec-policy/selinux-base-policy[systemd] )
1237 - sysv-utils? (
1238 - !sys-apps/openrc[sysv-utils(-)]
1239 - !sys-apps/sysvinit
1240 - )
1241 - !sysv-utils? ( sys-apps/sysvinit )
1242 - resolvconf? ( !net-dns/openresolv )
1243 - !build? ( || (
1244 - sys-apps/util-linux[kill(-)]
1245 - sys-process/procps[kill(+)]
1246 - sys-apps/coreutils[kill(-)]
1247 - ) )
1248 - !sys-apps/hwids[udev]
1249 - !sys-auth/nss-myhostname
1250 - !sys-fs/eudev
1251 - !sys-fs/udev
1252 -"
1253 -
1254 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
1255 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
1256 - >=sys-fs/udev-init-scripts-34
1257 - policykit? ( sys-auth/polkit )
1258 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
1259 -
1260 -BDEPEND="
1261 - app-arch/xz-utils:0
1262 - dev-util/gperf
1263 - >=dev-util/meson-0.46
1264 - >=sys-apps/coreutils-8.16
1265 - sys-devel/gettext
1266 - virtual/pkgconfig
1267 - test? (
1268 - app-text/tree
1269 - dev-lang/perl
1270 - sys-apps/dbus
1271 - )
1272 - app-text/docbook-xml-dtd:4.2
1273 - app-text/docbook-xml-dtd:4.5
1274 - app-text/docbook-xsl-stylesheets
1275 - dev-libs/libxslt:0
1276 - $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
1277 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
1278 -"
1279 -
1280 -python_check_deps() {
1281 - has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" &&
1282 - has_version -b "dev-python/lxml[${PYTHON_USEDEP}]"
1283 -}
1284 -
1285 -QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*"
1286 -QA_EXECSTACK="usr/lib/systemd/boot/efi/*"
1287 -
1288 -pkg_pretend() {
1289 - if [[ ${MERGE_TYPE} != buildonly ]]; then
1290 - if use test && has pid-sandbox ${FEATURES}; then
1291 - ewarn "Tests are known to fail with PID sandboxing enabled."
1292 - ewarn "See https://bugs.gentoo.org/674458."
1293 - fi
1294 -
1295 - local CONFIG_CHECK=" ~BINFMT_MISC ~BLK_DEV_BSG ~CGROUPS
1296 - ~CGROUP_BPF ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
1297 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
1298 - ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS
1299 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
1300 - ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
1301 - ~!SYSFS_DEPRECATED_V2"
1302 -
1303 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
1304 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
1305 -
1306 - if kernel_is -ge 5 10 20; then
1307 - CONFIG_CHECK+=" ~KCMP"
1308 - else
1309 - CONFIG_CHECK+=" ~CHECKPOINT_RESTORE"
1310 - fi
1311 -
1312 - if kernel_is -ge 4 18; then
1313 - CONFIG_CHECK+=" ~AUTOFS_FS"
1314 - else
1315 - CONFIG_CHECK+=" ~AUTOFS4_FS"
1316 - fi
1317 -
1318 - if linux_config_exists; then
1319 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
1320 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
1321 - ewarn "It's recommended to set an empty value to the following kernel config option:"
1322 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
1323 - fi
1324 - if linux_chkconfig_present X86; then
1325 - CONFIG_CHECK+=" ~DMIID"
1326 - fi
1327 - fi
1328 -
1329 - if kernel_is -lt ${MINKV//./ }; then
1330 - ewarn "Kernel version at least ${MINKV} required"
1331 - fi
1332 -
1333 - check_extra_config
1334 - fi
1335 -}
1336 -
1337 -pkg_setup() {
1338 - :
1339 -}
1340 -
1341 -src_unpack() {
1342 - default
1343 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
1344 -}
1345 -
1346 -src_prepare() {
1347 - # Do NOT add patches here
1348 - local PATCHES=()
1349 -
1350 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
1351 -
1352 - # Add local patches here
1353 - PATCHES+=(
1354 - "${FILESDIR}/251-format-string.patch"
1355 - )
1356 -
1357 - if ! use vanilla; then
1358 - PATCHES+=(
1359 - "${FILESDIR}/gentoo-generator-path-r2.patch"
1360 - "${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch"
1361 - "${FILESDIR}/gentoo-journald-audit.patch"
1362 - )
1363 - fi
1364 -
1365 - # Fails with split-usr.
1366 - sed -i -e '2i exit 77' test/test-rpm-macros.sh || die
1367 -
1368 - default
1369 -}
1370 -
1371 -src_configure() {
1372 - # Prevent conflicts with i686 cross toolchain, bug 559726
1373 - tc-export AR CC NM OBJCOPY RANLIB
1374 -
1375 - python_setup
1376 -
1377 - multilib-minimal_src_configure
1378 -}
1379 -
1380 -multilib_src_configure() {
1381 - local myconf=(
1382 - --localstatedir="${EPREFIX}/var"
1383 - -Dsupport-url="https://gentoo.org/support/"
1384 - -Dpamlibdir="$(getpam_mod_dir)"
1385 - # avoid bash-completion dep
1386 - -Dbashcompletiondir="$(get_bashcompdir)"
1387 - # make sure we get /bin:/sbin in PATH
1388 - $(meson_use split-usr)
1389 - -Dsplit-bin=true
1390 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
1391 - -Drootlibdir="${EPREFIX}/usr/$(get_libdir)"
1392 - # Avoid infinite exec recursion, bug 642724
1393 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
1394 - # no deps
1395 - -Dima=true
1396 - -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified)
1397 - # Optional components/dependencies
1398 - $(meson_native_use_bool acl)
1399 - $(meson_native_use_bool apparmor)
1400 - $(meson_native_use_bool audit)
1401 - $(meson_native_use_bool cryptsetup libcryptsetup)
1402 - $(meson_native_use_bool curl libcurl)
1403 - $(meson_native_use_bool dns-over-tls dns-over-tls)
1404 - $(meson_native_use_bool elfutils)
1405 - $(meson_native_use_bool fido2 libfido2)
1406 - $(meson_use gcrypt)
1407 - $(meson_native_use_bool gnuefi gnu-efi)
1408 - $(meson_native_use_bool gnutls)
1409 - -Defi-includedir="${ESYSROOT}/usr/include/efi"
1410 - -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)"
1411 - $(meson_native_use_bool homed)
1412 - $(meson_native_use_bool http microhttpd)
1413 - $(meson_native_use_bool idn)
1414 - $(meson_native_use_bool importd)
1415 - $(meson_native_use_bool importd bzip2)
1416 - $(meson_native_use_bool importd zlib)
1417 - $(meson_native_use_bool kmod)
1418 - $(meson_use lz4)
1419 - $(meson_use lzma xz)
1420 - $(meson_use zstd)
1421 - $(meson_native_use_bool nat libiptc)
1422 - $(meson_native_use_bool openssl)
1423 - $(meson_use pam)
1424 - $(meson_native_use_bool pkcs11 p11kit)
1425 - $(meson_native_use_bool pcre pcre2)
1426 - $(meson_native_use_bool policykit polkit)
1427 - $(meson_native_use_bool pwquality)
1428 - $(meson_native_use_bool qrcode qrencode)
1429 - $(meson_native_use_bool seccomp)
1430 - $(meson_native_use_bool selinux)
1431 - $(meson_native_use_bool tpm tpm2)
1432 - $(meson_native_use_bool test dbus)
1433 - $(meson_native_use_bool xkb xkbcommon)
1434 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
1435 - # Breaks screen, tmux, etc.
1436 - -Ddefault-kill-user-processes=false
1437 - -Dcreate-log-dirs=false
1438 -
1439 - # multilib options
1440 - $(meson_native_true backlight)
1441 - $(meson_native_true binfmt)
1442 - $(meson_native_true coredump)
1443 - $(meson_native_true environment-d)
1444 - $(meson_native_true firstboot)
1445 - $(meson_native_true hibernate)
1446 - $(meson_native_true hostnamed)
1447 - $(meson_native_true ldconfig)
1448 - $(meson_native_true localed)
1449 - $(meson_native_true man)
1450 - $(meson_native_true networkd)
1451 - $(meson_native_true quotacheck)
1452 - $(meson_native_true randomseed)
1453 - $(meson_native_true rfkill)
1454 - $(meson_native_true sysusers)
1455 - $(meson_native_true timedated)
1456 - $(meson_native_true timesyncd)
1457 - $(meson_native_true tmpfiles)
1458 - $(meson_native_true vconsole)
1459 - )
1460 -
1461 - meson_src_configure "${myconf[@]}"
1462 -}
1463 -
1464 -multilib_src_test() {
1465 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
1466 - meson_src_test
1467 -}
1468 -
1469 -multilib_src_install_all() {
1470 - local rootprefix=$(usex split-usr '' /usr)
1471 -
1472 - # meson doesn't know about docdir
1473 - mv "${ED}"/usr/share/doc/{systemd,${PF}} || die
1474 -
1475 - einstalldocs
1476 - dodoc "${FILESDIR}"/nsswitch.conf
1477 -
1478 - if ! use resolvconf; then
1479 - rm -f "${ED}${rootprefix}"/sbin/resolvconf || die
1480 - fi
1481 -
1482 - rm "${ED}"/etc/init.d/README || die
1483 - rm "${ED}${rootprefix}"/lib/systemd/system-generators/systemd-sysv-generator || die
1484 -
1485 - if ! use sysv-utils; then
1486 - rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
1487 - rm "${ED}"/usr/share/man/man1/init.1 || die
1488 - rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
1489 - fi
1490 -
1491 - if ! use resolvconf && ! use sysv-utils; then
1492 - rmdir "${ED}${rootprefix}"/sbin || die
1493 - fi
1494 -
1495 - # https://bugs.gentoo.org/761763
1496 - rm -r "${ED}"/usr/lib/sysusers.d || die
1497 -
1498 - # Preserve empty dirs in /etc & /var, bug #437008
1499 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
1500 - keepdir /etc/kernel/install.d
1501 - keepdir /etc/systemd/{network,system,user}
1502 - keepdir /etc/udev/rules.d
1503 -
1504 - keepdir /etc/udev/hwdb.d
1505 -
1506 - keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown}
1507 - keepdir /usr/lib/{binfmt.d,modules-load.d}
1508 - keepdir /usr/lib/systemd/user-generators
1509 - keepdir /var/lib/systemd
1510 - keepdir /var/log/journal
1511 -
1512 - # Symlink /etc/sysctl.conf for easy migration.
1513 - dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf
1514 -
1515 - if use pam; then
1516 - newpamd "${FILESDIR}"/systemd-user.pam systemd-user
1517 - fi
1518 -
1519 - if use split-usr; then
1520 - # Avoid breaking boot/reboot
1521 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
1522 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
1523 - fi
1524 -
1525 - gen_usr_ldscript -a systemd udev
1526 -}
1527 -
1528 -migrate_locale() {
1529 - local envd_locale_def="${EROOT}/etc/env.d/02locale"
1530 - local envd_locale=( "${EROOT}"/etc/env.d/??locale )
1531 - local locale_conf="${EROOT}/etc/locale.conf"
1532 -
1533 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
1534 - # If locale.conf does not exist...
1535 - if [[ -e ${envd_locale} ]]; then
1536 - # ...either copy env.d/??locale if there's one
1537 - ebegin "Moving ${envd_locale} to ${locale_conf}"
1538 - mv "${envd_locale}" "${locale_conf}"
1539 - eend ${?} || FAIL=1
1540 - else
1541 - # ...or create a dummy default
1542 - ebegin "Creating ${locale_conf}"
1543 - cat > "${locale_conf}" <<-EOF
1544 - # This file has been created by the sys-apps/systemd ebuild.
1545 - # See locale.conf(5) and localectl(1).
1546 -
1547 - # LANG=${LANG}
1548 - EOF
1549 - eend ${?} || FAIL=1
1550 - fi
1551 - fi
1552 -
1553 - if [[ ! -L ${envd_locale} ]]; then
1554 - # now, if env.d/??locale is not a symlink (to locale.conf)...
1555 - if [[ -e ${envd_locale} ]]; then
1556 - # ...warn the user that he has duplicate locale settings
1557 - ewarn
1558 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
1559 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
1560 - ewarn "and create the symlink with the following command:"
1561 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
1562 - ewarn
1563 - else
1564 - # ...or just create the symlink if there's nothing here
1565 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
1566 - ln -n -s ../locale.conf "${envd_locale_def}"
1567 - eend ${?} || FAIL=1
1568 - fi
1569 - fi
1570 -}
1571 -
1572 -pkg_preinst() {
1573 - if ! use split-usr; then
1574 - local dir
1575 - for dir in bin sbin lib; do
1576 - if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then
1577 - eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged."
1578 - eerror "One of them should be a symbolic link to the other one."
1579 - FAIL=1
1580 - fi
1581 - done
1582 - if [[ ${FAIL} ]]; then
1583 - eerror "Migration to system layout with merged directories must be performed before"
1584 - eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage."
1585 - die "System layout with split directories still used"
1586 - fi
1587 - fi
1588 -}
1589 -
1590 -pkg_postinst() {
1591 - systemd_update_catalog
1592 -
1593 - # Keep this here in case the database format changes so it gets updated
1594 - # when required.
1595 - systemd-hwdb --root="${ROOT}" update
1596 -
1597 - udev_reload || FAIL=1
1598 -
1599 - # Bug 465468, make sure locales are respected, and ensure consistency
1600 - # between OpenRC & systemd
1601 - migrate_locale
1602 -
1603 - if [[ -z ${REPLACING_VERSIONS} ]]; then
1604 - if type systemctl &>/dev/null; then
1605 - systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1
1606 - fi
1607 - elog "To enable a useful set of services, run the following:"
1608 - elog " systemctl preset-all --preset-mode=enable-only"
1609 - fi
1610 -
1611 - if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then
1612 - rm "${EROOT}/var/lib/systemd/timesync"
1613 - fi
1614 -
1615 - if [[ ${FAIL} ]]; then
1616 - eerror "One of the postinst commands failed. Please check the postinst output"
1617 - eerror "for errors. You may need to clean up your system and/or try installing"
1618 - eerror "systemd again."
1619 - eerror
1620 - fi
1621 -}
1622 -
1623 -pkg_prerm() {
1624 - # If removing systemd completely, remove the catalog database.
1625 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
1626 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
1627 - fi
1628 -}