Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd/
Date: Mon, 11 Mar 2019 01:16:57
Message-Id: 1552266995.a58a376b3fb78121d905dd52c3fa2070ec2f1bd1.floppym@gentoo
1 commit: a58a376b3fb78121d905dd52c3fa2070ec2f1bd1
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 11 01:16:35 2019 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 11 01:16:35 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a58a376b
7
8 sys-apps/systemd: remove old
9
10 Closes: https://bugs.gentoo.org/677944
11 Package-Manager: Portage-2.3.62, Repoman-2.3.12_p83
12 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
13
14 sys-apps/systemd/Manifest | 6 -
15 sys-apps/systemd/systemd-239-r2.ebuild | 448 -------------------------------
16 sys-apps/systemd/systemd-239-r3.ebuild | 448 -------------------------------
17 sys-apps/systemd/systemd-240-r3.ebuild | 457 -------------------------------
18 sys-apps/systemd/systemd-240-r4.ebuild | 457 -------------------------------
19 sys-apps/systemd/systemd-241.ebuild | 459 --------------------------------
20 sys-apps/systemd/systemd-241_rc1.ebuild | 459 --------------------------------
21 sys-apps/systemd/systemd-241_rc2.ebuild | 459 --------------------------------
22 8 files changed, 3193 deletions(-)
23
24 diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest
25 index bdfb13b3bd4..30f8aac4e80 100644
26 --- a/sys-apps/systemd/Manifest
27 +++ b/sys-apps/systemd/Manifest
28 @@ -1,9 +1,3 @@
29 -DIST systemd-239-patches-1.tar.gz 20639 BLAKE2B 9b03367becdef20d16056cdbbeaaefd9f10bf6c56528ad1a738684ab08d99a464411c23aea32d47307b0399f092107069d09ad42fb07217f8eca520cc4010b84 SHA512 757c7fc8f60ccf99d2803128a8c4d8b924093b150384569c5ffb3bc39f06728e99b18e2f77ff0f1c16bbd45bc75cbb0f385dac0135443d70c7dcd9cc1e84a490
30 DIST systemd-239-patches-2.tar.gz 33416 BLAKE2B 9602d101cbac65d3b2490f28308e843c28fcaea848dd09005abef0da0bc79ba0766a1cbe7c3cac63f796accddf0295b4eb946e601a201f7e81a48bd1720051ca SHA512 5f5a764d317c43c6b1854171a753eafaca006e12e4f91c81e6ba1d50e80bbbaca23c900fba417264bf9f0d827a73aca71a6da8f2a2043aaaefefed62f5a92b23
31 DIST systemd-239.tar.gz 7157293 BLAKE2B 975f6215c8bb6662d6e161f637e1fece22930c0190b3c31a8fc4cb1a10600546a252704ac95590d9d14e495fcd06082a590e6d755e36603a41b3a396d579d8b0 SHA512 fd44590dfd148504c5ed1e67521efce50d84b627b7fc77015fa95dfa76d7a42297c56cc89eff40181809732024b16d48f2a87038cf435e0c63bc2b95ecd86b0f
32 -DIST systemd-240-patches-2.tar.gz 28099 BLAKE2B 2e497ed729e2482ef3cc0d010504314f2982a9af19341d6f4efa06b24b3c01f9f69996d43e5b484c641777d00a8a0ba4508bcf6a0296a63d4fc57440f2d3708c SHA512 1be0432d918a4866056ffc65de6e8b412784e5018490c0349a98bba801536d2689c5b2ce41ddd5adbb945aac71bfd0168f94c1daf0788661cd83b159a8c975b8
33 -DIST systemd-240-patches-3.tar.gz 31952 BLAKE2B 0677d24c4f4e1575dbd4953eb75734f0773671e4ffc2a8d848353a379f5ea2caf4f96620ed6303d98ec00a15367d5e2124b493aaef80b1a0fe118866a1c04ada SHA512 e604e1de17bcd4c941036f12d2e3ae96dd6e86647db2b07576e8468405900b6e8af6a0e55a50c7e9b19704601930b8152c8ac506b2624e261ee0cd35dfc91a21
34 -DIST systemd-240.tar.gz 7582001 BLAKE2B cf53595a83424984dd9f533f7cd0c9905366c5a52ab946fc45ff7fd1bcc85978ff654720113641534e40c0f9a1ad1c9628255778616770762950426789f659c3 SHA512 da7467781b16f65d868931ae88fd07554db61542aec7f11dbec9f7279b529f900301edfea2d3813ddb64eeb3fdcfb7be86e540c65212dd7cfdcdebbc80de2ff5
35 -DIST systemd-241-rc1.tar.gz 7617965 BLAKE2B 6c491297b71ad3c473d644de04bb334f902ee4110d647b654c5452f34401cfc11c7564b290022072555f3fbd46674ce009f587622f412f8a66330a7089db34c5 SHA512 168ba80d6e8abadbf1ed84270f2b02e257f1490b61021bb6fb704d9b5fad2670b63e0fc0cb26071e8d56c993faa30274e80d53cf49154cce2b609f47c73b30e0
36 -DIST systemd-241-rc2.tar.gz 7619504 BLAKE2B 610940b3141d36a0534cf477d303eb681f418f8c04d7e9ff1d28832d02c05d68195aec108b15392662b134020c28df5b35f6c1c85f8eea8e7090cdc210ce5e26 SHA512 69932b1e5d48fbf6fd650a91354763b1e7e8d490def98a011d6377ee8623abc21244f2c8ddd97a500c4d3e6ab11bae2a6148ddc84e325d75a0273b3d456d8f41
37 DIST systemd-241.tar.gz 7640538 BLAKE2B 69d7196fee0d0ad06ea8d7c78b0299cc17517ecce3ca4c0b1181a3fbb13bc2627629156785051e2ff427dcc21414f7a078724c6409ebaa431618e4799ebcd50a SHA512 a7757574590e8aa37e1291ea0b2c5eb03a8d8062fe9462fa5b0bf50830c933e2b301d106c70d904f94afc0aa8e43a8acfd11926dfa25b1b89174580e491e545e
38
39 diff --git a/sys-apps/systemd/systemd-239-r2.ebuild b/sys-apps/systemd/systemd-239-r2.ebuild
40 deleted file mode 100644
41 index c88520b0406..00000000000
42 --- a/sys-apps/systemd/systemd-239-r2.ebuild
43 +++ /dev/null
44 @@ -1,448 +0,0 @@
45 -# Copyright 2011-2018 Gentoo Authors
46 -# Distributed under the terms of the GNU General Public License v2
47 -
48 -EAPI=6
49 -
50 -if [[ ${PV} == 9999 ]]; then
51 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
52 - inherit git-r3
53 -else
54 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}/${P}.tar.gz
55 - https://dev.gentoo.org/~floppym/dist/${P}-patches-1.tar.gz"
56 - KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 sparc x86"
57 -fi
58 -
59 -PYTHON_COMPAT=( python{3_4,3_5,3_6,3_7} )
60 -
61 -inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
62 -
63 -DESCRIPTION="System and service manager for Linux"
64 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
65 -
66 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
67 -SLOT="0/2"
68 -IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux +split-usr ssl +sysv-utils test vanilla xkb"
69 -
70 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
71 -RESTRICT="!test? ( test )"
72 -
73 -MINKV="3.11"
74 -
75 -COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
76 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
77 - !<sys-libs/glibc-2.16
78 - acl? ( sys-apps/acl:0= )
79 - apparmor? ( sys-libs/libapparmor:0= )
80 - audit? ( >=sys-process/audit-2:0= )
81 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
82 - curl? ( net-misc/curl:0= )
83 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
84 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
85 - http? (
86 - >=net-libs/libmicrohttpd-0.9.33:0=
87 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
88 - )
89 - idn? (
90 - libidn2? ( net-dns/libidn2:= )
91 - !libidn2? ( net-dns/libidn:= )
92 - )
93 - importd? (
94 - app-arch/bzip2:0=
95 - sys-libs/zlib:0=
96 - )
97 - kmod? ( >=sys-apps/kmod-15:0= )
98 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
99 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
100 - nat? ( net-firewall/iptables:0= )
101 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
102 - pcre? ( dev-libs/libpcre2 )
103 - qrcode? ( media-gfx/qrencode:0= )
104 - seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
105 - selinux? ( sys-libs/libselinux:0= )
106 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
107 -
108 -# baselayout-2.2 has /run
109 -RDEPEND="${COMMON_DEPEND}
110 - >=sys-apps/baselayout-2.2
111 - selinux? ( sec-policy/selinux-base-policy[systemd] )
112 - sysv-utils? ( !sys-apps/sysvinit )
113 - !sysv-utils? ( sys-apps/sysvinit )
114 - resolvconf? ( !net-dns/openresolv )
115 - !build? ( || (
116 - sys-apps/util-linux[kill(-)]
117 - sys-process/procps[kill(+)]
118 - sys-apps/coreutils[kill(-)]
119 - ) )
120 - !sys-auth/nss-myhostname
121 - !<sys-kernel/dracut-044
122 - !sys-fs/eudev
123 - !sys-fs/udev"
124 -
125 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
126 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
127 - >=sys-apps/hwids-20150417[udev]
128 - >=sys-fs/udev-init-scripts-25
129 - policykit? ( sys-auth/polkit )
130 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
131 -
132 -# Newer linux-headers needed by ia64, bug #480218
133 -DEPEND="${COMMON_DEPEND}
134 - app-arch/xz-utils:0
135 - dev-util/gperf
136 - >=dev-util/intltool-0.50
137 - >=sys-apps/coreutils-8.16
138 - >=sys-kernel/linux-headers-${MINKV}
139 - virtual/pkgconfig[${MULTILIB_USEDEP}]
140 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
141 - test? ( sys-apps/dbus )
142 - app-text/docbook-xml-dtd:4.2
143 - app-text/docbook-xml-dtd:4.5
144 - app-text/docbook-xsl-stylesheets
145 - dev-libs/libxslt:0
146 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
147 -"
148 -
149 -pkg_pretend() {
150 - if [[ ${MERGE_TYPE} != buildonly ]]; then
151 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
152 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
153 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
154 - ~TIMERFD ~TMPFS_XATTR ~UNIX
155 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
156 - ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
157 - ~!SYSFS_DEPRECATED_V2"
158 -
159 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
160 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
161 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
162 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
163 - kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
164 -
165 - if linux_config_exists; then
166 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
167 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
168 - ewarn "It's recommended to set an empty value to the following kernel config option:"
169 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
170 - fi
171 - if linux_chkconfig_present X86; then
172 - CONFIG_CHECK+=" ~DMIID"
173 - fi
174 - fi
175 -
176 - if kernel_is -lt ${MINKV//./ }; then
177 - ewarn "Kernel version at least ${MINKV} required"
178 - fi
179 -
180 - check_extra_config
181 - fi
182 -}
183 -
184 -pkg_setup() {
185 - :
186 -}
187 -
188 -src_unpack() {
189 - default
190 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
191 -}
192 -
193 -src_prepare() {
194 - # Do NOT add patches here
195 - local PATCHES=()
196 -
197 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
198 -
199 - # Add local patches here
200 - PATCHES+=(
201 - "${FILESDIR}"/239-debug-extra.patch
202 - )
203 -
204 - if ! use vanilla; then
205 - PATCHES+=(
206 - "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
207 - "${FILESDIR}/gentoo-systemd-user-pam.patch"
208 - "${FILESDIR}/gentoo-uucp-group-r1.patch"
209 - "${FILESDIR}/gentoo-generator-path.patch"
210 - )
211 - fi
212 -
213 - default
214 -}
215 -
216 -src_configure() {
217 - # Prevent conflicts with i686 cross toolchain, bug 559726
218 - tc-export AR CC NM OBJCOPY RANLIB
219 -
220 - python_setup
221 -
222 - multilib-minimal_src_configure
223 -}
224 -
225 -meson_use() {
226 - usex "$1" true false
227 -}
228 -
229 -meson_multilib() {
230 - if multilib_is_native_abi; then
231 - echo true
232 - else
233 - echo false
234 - fi
235 -}
236 -
237 -meson_multilib_native_use() {
238 - if multilib_is_native_abi && use "$1"; then
239 - echo true
240 - else
241 - echo false
242 - fi
243 -}
244 -
245 -multilib_src_configure() {
246 - local myconf=(
247 - --localstatedir="${EPREFIX}/var"
248 - -Dpamlibdir="$(getpam_mod_dir)"
249 - # avoid bash-completion dep
250 - -Dbashcompletiondir="$(get_bashcompdir)"
251 - # make sure we get /bin:/sbin in PATH
252 - -Dsplit-usr=$(usex split-usr true false)
253 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
254 - -Dsysvinit-path=
255 - -Dsysvrcnd-path=
256 - # Avoid infinite exec recursion, bug 642724
257 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
258 - # no deps
259 - -Defi=$(meson_multilib)
260 - -Dima=true
261 - # Optional components/dependencies
262 - -Dacl=$(meson_multilib_native_use acl)
263 - -Dapparmor=$(meson_multilib_native_use apparmor)
264 - -Daudit=$(meson_multilib_native_use audit)
265 - -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
266 - -Dlibcurl=$(meson_multilib_native_use curl)
267 - -Delfutils=$(meson_multilib_native_use elfutils)
268 - -Dgcrypt=$(meson_use gcrypt)
269 - -Dgnu-efi=$(meson_multilib_native_use gnuefi)
270 - -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
271 - -Dmicrohttpd=$(meson_multilib_native_use http)
272 - $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
273 - -Dimportd=$(meson_multilib_native_use importd)
274 - -Dbzip2=$(meson_multilib_native_use importd)
275 - -Dzlib=$(meson_multilib_native_use importd)
276 - -Dkmod=$(meson_multilib_native_use kmod)
277 - -Dlz4=$(meson_use lz4)
278 - -Dxz=$(meson_use lzma)
279 - -Dlibiptc=$(meson_multilib_native_use nat)
280 - -Dpam=$(meson_use pam)
281 - -Dpcre2=$(meson_multilib_native_use pcre)
282 - -Dpolkit=$(meson_multilib_native_use policykit)
283 - -Dqrencode=$(meson_multilib_native_use qrcode)
284 - -Dseccomp=$(meson_multilib_native_use seccomp)
285 - -Dselinux=$(meson_multilib_native_use selinux)
286 - #-Dtests=$(meson_multilib_native_use test)
287 - -Ddbus=$(meson_multilib_native_use test)
288 - -Dxkbcommon=$(meson_multilib_native_use xkb)
289 - # hardcode a few paths to spare some deps
290 - -Dkill-path=/bin/kill
291 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
292 - # Breaks screen, tmux, etc.
293 - -Ddefault-kill-user-processes=false
294 -
295 - # multilib options
296 - -Dbacklight=$(meson_multilib)
297 - -Dbinfmt=$(meson_multilib)
298 - -Dcoredump=$(meson_multilib)
299 - -Denvironment-d=$(meson_multilib)
300 - -Dfirstboot=$(meson_multilib)
301 - -Dhibernate=$(meson_multilib)
302 - -Dhostnamed=$(meson_multilib)
303 - -Dhwdb=$(meson_multilib)
304 - -Dldconfig=$(meson_multilib)
305 - -Dlocaled=$(meson_multilib)
306 - -Dman=$(meson_multilib)
307 - -Dnetworkd=$(meson_multilib)
308 - -Dquotacheck=$(meson_multilib)
309 - -Drandomseed=$(meson_multilib)
310 - -Drfkill=$(meson_multilib)
311 - -Dsysusers=$(meson_multilib)
312 - -Dtimedated=$(meson_multilib)
313 - -Dtimesyncd=$(meson_multilib)
314 - -Dtmpfiles=$(meson_multilib)
315 - -Dvconsole=$(meson_multilib)
316 - )
317 -
318 - if multilib_is_native_abi && use idn; then
319 - myconf+=(
320 - -Dlibidn2=$(usex libidn2 true false)
321 - -Dlibidn=$(usex libidn2 false true)
322 - )
323 - else
324 - myconf+=(
325 - -Dlibidn2=false
326 - -Dlibidn=false
327 - )
328 - fi
329 -
330 - meson_src_configure "${myconf[@]}"
331 -}
332 -
333 -multilib_src_compile() {
334 - eninja
335 -}
336 -
337 -multilib_src_test() {
338 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
339 - eninja test
340 -}
341 -
342 -multilib_src_install() {
343 - DESTDIR="${D}" eninja install
344 -}
345 -
346 -multilib_src_install_all() {
347 - local rootprefix=$(usex split-usr '' /usr)
348 -
349 - # meson doesn't know about docdir
350 - mv "${ED%/}"/usr/share/doc/{systemd,${PF}} || die
351 -
352 - einstalldocs
353 - dodoc "${FILESDIR}"/nsswitch.conf
354 -
355 - if ! use resolvconf; then
356 - rm -f "${ED%/}${rootprefix}"/sbin/resolvconf || die
357 - fi
358 -
359 - if ! use sysv-utils; then
360 - rm "${ED%/}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
361 - rm "${ED%/}"/usr/share/man/man1/init.1 || die
362 - rm "${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
363 - fi
364 -
365 - if ! use resolvconf && ! use sysv-utils; then
366 - rmdir "${ED%/}${rootprefix}"/sbin || die
367 - fi
368 -
369 - # Preserve empty dirs in /etc & /var, bug #437008
370 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
371 - keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
372 - keepdir /etc/udev/{hwdb.d,rules.d}
373 - keepdir /var/log/journal/remote
374 -
375 - # Symlink /etc/sysctl.conf for easy migration.
376 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
377 -
378 - # If we install these symlinks, there is no way for the sysadmin to remove them
379 - # permanently.
380 - rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
381 - rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
382 - rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
383 - rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
384 - rm -fr "${ED%/}"/etc/systemd/system/network-online.target.wants || die
385 - rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die
386 - rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
387 -
388 - local udevdir=/lib/udev
389 - use split-usr || udevdir=/usr/lib/udev
390 -
391 - rm -r "${ED%/}${udevdir}/hwdb.d" || die
392 -
393 - if use split-usr; then
394 - # Avoid breaking boot/reboot
395 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
396 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
397 - fi
398 -}
399 -
400 -migrate_locale() {
401 - local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
402 - local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
403 - local locale_conf="${EROOT%/}/etc/locale.conf"
404 -
405 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
406 - # If locale.conf does not exist...
407 - if [[ -e ${envd_locale} ]]; then
408 - # ...either copy env.d/??locale if there's one
409 - ebegin "Moving ${envd_locale} to ${locale_conf}"
410 - mv "${envd_locale}" "${locale_conf}"
411 - eend ${?} || FAIL=1
412 - else
413 - # ...or create a dummy default
414 - ebegin "Creating ${locale_conf}"
415 - cat > "${locale_conf}" <<-EOF
416 - # This file has been created by the sys-apps/systemd ebuild.
417 - # See locale.conf(5) and localectl(1).
418 -
419 - # LANG=${LANG}
420 - EOF
421 - eend ${?} || FAIL=1
422 - fi
423 - fi
424 -
425 - if [[ ! -L ${envd_locale} ]]; then
426 - # now, if env.d/??locale is not a symlink (to locale.conf)...
427 - if [[ -e ${envd_locale} ]]; then
428 - # ...warn the user that he has duplicate locale settings
429 - ewarn
430 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
431 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
432 - ewarn "and create the symlink with the following command:"
433 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
434 - ewarn
435 - else
436 - # ...or just create the symlink if there's nothing here
437 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
438 - ln -n -s ../locale.conf "${envd_locale_def}"
439 - eend ${?} || FAIL=1
440 - fi
441 - fi
442 -}
443 -
444 -pkg_postinst() {
445 - newusergroup() {
446 - enewgroup "$1"
447 - enewuser "$1" -1 -1 -1 "$1"
448 - }
449 -
450 - enewgroup input
451 - enewgroup kvm 78
452 - enewgroup render
453 - enewgroup systemd-journal
454 - newusergroup systemd-bus-proxy
455 - newusergroup systemd-coredump
456 - newusergroup systemd-journal-gateway
457 - newusergroup systemd-journal-remote
458 - newusergroup systemd-journal-upload
459 - newusergroup systemd-network
460 - newusergroup systemd-resolve
461 - newusergroup systemd-timesync
462 -
463 - systemd_update_catalog
464 -
465 - # Keep this here in case the database format changes so it gets updated
466 - # when required. Despite that this file is owned by sys-apps/hwids.
467 - if has_version "sys-apps/hwids[udev]"; then
468 - udevadm hwdb --update --root="${EROOT%/}"
469 - fi
470 -
471 - udev_reload || FAIL=1
472 -
473 - # Bug 465468, make sure locales are respect, and ensure consistency
474 - # between OpenRC & systemd
475 - migrate_locale
476 -
477 - systemd_reenable systemd-networkd.service systemd-resolved.service
478 -
479 - if [[ ${FAIL} ]]; then
480 - eerror "One of the postinst commands failed. Please check the postinst output"
481 - eerror "for errors. You may need to clean up your system and/or try installing"
482 - eerror "systemd again."
483 - eerror
484 - fi
485 -}
486 -
487 -pkg_prerm() {
488 - # If removing systemd completely, remove the catalog database.
489 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
490 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
491 - fi
492 -}
493
494 diff --git a/sys-apps/systemd/systemd-239-r3.ebuild b/sys-apps/systemd/systemd-239-r3.ebuild
495 deleted file mode 100644
496 index 4c6312766b3..00000000000
497 --- a/sys-apps/systemd/systemd-239-r3.ebuild
498 +++ /dev/null
499 @@ -1,448 +0,0 @@
500 -# Copyright 2011-2019 Gentoo Authors
501 -# Distributed under the terms of the GNU General Public License v2
502 -
503 -EAPI=6
504 -
505 -if [[ ${PV} == 9999 ]]; then
506 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
507 - inherit git-r3
508 -else
509 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}/${P}.tar.gz
510 - https://dev.gentoo.org/~floppym/dist/${P}-patches-2.tar.gz"
511 - KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 sparc x86"
512 -fi
513 -
514 -PYTHON_COMPAT=( python{3_4,3_5,3_6,3_7} )
515 -
516 -inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
517 -
518 -DESCRIPTION="System and service manager for Linux"
519 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
520 -
521 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
522 -SLOT="0/2"
523 -IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux +split-usr ssl +sysv-utils test vanilla xkb"
524 -
525 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
526 -RESTRICT="!test? ( test )"
527 -
528 -MINKV="3.11"
529 -
530 -COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
531 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
532 - !<sys-libs/glibc-2.16
533 - acl? ( sys-apps/acl:0= )
534 - apparmor? ( sys-libs/libapparmor:0= )
535 - audit? ( >=sys-process/audit-2:0= )
536 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
537 - curl? ( net-misc/curl:0= )
538 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
539 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
540 - http? (
541 - >=net-libs/libmicrohttpd-0.9.33:0=
542 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
543 - )
544 - idn? (
545 - libidn2? ( net-dns/libidn2:= )
546 - !libidn2? ( net-dns/libidn:= )
547 - )
548 - importd? (
549 - app-arch/bzip2:0=
550 - sys-libs/zlib:0=
551 - )
552 - kmod? ( >=sys-apps/kmod-15:0= )
553 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
554 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
555 - nat? ( net-firewall/iptables:0= )
556 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
557 - pcre? ( dev-libs/libpcre2 )
558 - qrcode? ( media-gfx/qrencode:0= )
559 - seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
560 - selinux? ( sys-libs/libselinux:0= )
561 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
562 -
563 -# baselayout-2.2 has /run
564 -RDEPEND="${COMMON_DEPEND}
565 - >=sys-apps/baselayout-2.2
566 - selinux? ( sec-policy/selinux-base-policy[systemd] )
567 - sysv-utils? ( !sys-apps/sysvinit )
568 - !sysv-utils? ( sys-apps/sysvinit )
569 - resolvconf? ( !net-dns/openresolv )
570 - !build? ( || (
571 - sys-apps/util-linux[kill(-)]
572 - sys-process/procps[kill(+)]
573 - sys-apps/coreutils[kill(-)]
574 - ) )
575 - !sys-auth/nss-myhostname
576 - !<sys-kernel/dracut-044
577 - !sys-fs/eudev
578 - !sys-fs/udev"
579 -
580 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
581 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
582 - >=sys-apps/hwids-20150417[udev]
583 - >=sys-fs/udev-init-scripts-25
584 - policykit? ( sys-auth/polkit )
585 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
586 -
587 -# Newer linux-headers needed by ia64, bug #480218
588 -DEPEND="${COMMON_DEPEND}
589 - app-arch/xz-utils:0
590 - dev-util/gperf
591 - >=dev-util/intltool-0.50
592 - >=sys-apps/coreutils-8.16
593 - >=sys-kernel/linux-headers-${MINKV}
594 - virtual/pkgconfig[${MULTILIB_USEDEP}]
595 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
596 - test? ( sys-apps/dbus )
597 - app-text/docbook-xml-dtd:4.2
598 - app-text/docbook-xml-dtd:4.5
599 - app-text/docbook-xsl-stylesheets
600 - dev-libs/libxslt:0
601 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
602 -"
603 -
604 -pkg_pretend() {
605 - if [[ ${MERGE_TYPE} != buildonly ]]; then
606 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
607 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
608 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
609 - ~TIMERFD ~TMPFS_XATTR ~UNIX
610 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
611 - ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
612 - ~!SYSFS_DEPRECATED_V2"
613 -
614 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
615 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
616 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
617 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
618 - kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
619 -
620 - if linux_config_exists; then
621 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
622 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
623 - ewarn "It's recommended to set an empty value to the following kernel config option:"
624 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
625 - fi
626 - if linux_chkconfig_present X86; then
627 - CONFIG_CHECK+=" ~DMIID"
628 - fi
629 - fi
630 -
631 - if kernel_is -lt ${MINKV//./ }; then
632 - ewarn "Kernel version at least ${MINKV} required"
633 - fi
634 -
635 - check_extra_config
636 - fi
637 -}
638 -
639 -pkg_setup() {
640 - :
641 -}
642 -
643 -src_unpack() {
644 - default
645 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
646 -}
647 -
648 -src_prepare() {
649 - # Do NOT add patches here
650 - local PATCHES=()
651 -
652 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
653 -
654 - # Add local patches here
655 - PATCHES+=(
656 - "${FILESDIR}"/239-debug-extra.patch
657 - )
658 -
659 - if ! use vanilla; then
660 - PATCHES+=(
661 - "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
662 - "${FILESDIR}/gentoo-systemd-user-pam.patch"
663 - "${FILESDIR}/gentoo-uucp-group-r1.patch"
664 - "${FILESDIR}/gentoo-generator-path.patch"
665 - )
666 - fi
667 -
668 - default
669 -}
670 -
671 -src_configure() {
672 - # Prevent conflicts with i686 cross toolchain, bug 559726
673 - tc-export AR CC NM OBJCOPY RANLIB
674 -
675 - python_setup
676 -
677 - multilib-minimal_src_configure
678 -}
679 -
680 -meson_use() {
681 - usex "$1" true false
682 -}
683 -
684 -meson_multilib() {
685 - if multilib_is_native_abi; then
686 - echo true
687 - else
688 - echo false
689 - fi
690 -}
691 -
692 -meson_multilib_native_use() {
693 - if multilib_is_native_abi && use "$1"; then
694 - echo true
695 - else
696 - echo false
697 - fi
698 -}
699 -
700 -multilib_src_configure() {
701 - local myconf=(
702 - --localstatedir="${EPREFIX}/var"
703 - -Dpamlibdir="$(getpam_mod_dir)"
704 - # avoid bash-completion dep
705 - -Dbashcompletiondir="$(get_bashcompdir)"
706 - # make sure we get /bin:/sbin in PATH
707 - -Dsplit-usr=$(usex split-usr true false)
708 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
709 - -Dsysvinit-path=
710 - -Dsysvrcnd-path=
711 - # Avoid infinite exec recursion, bug 642724
712 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
713 - # no deps
714 - -Defi=$(meson_multilib)
715 - -Dima=true
716 - # Optional components/dependencies
717 - -Dacl=$(meson_multilib_native_use acl)
718 - -Dapparmor=$(meson_multilib_native_use apparmor)
719 - -Daudit=$(meson_multilib_native_use audit)
720 - -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
721 - -Dlibcurl=$(meson_multilib_native_use curl)
722 - -Delfutils=$(meson_multilib_native_use elfutils)
723 - -Dgcrypt=$(meson_use gcrypt)
724 - -Dgnu-efi=$(meson_multilib_native_use gnuefi)
725 - -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
726 - -Dmicrohttpd=$(meson_multilib_native_use http)
727 - $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
728 - -Dimportd=$(meson_multilib_native_use importd)
729 - -Dbzip2=$(meson_multilib_native_use importd)
730 - -Dzlib=$(meson_multilib_native_use importd)
731 - -Dkmod=$(meson_multilib_native_use kmod)
732 - -Dlz4=$(meson_use lz4)
733 - -Dxz=$(meson_use lzma)
734 - -Dlibiptc=$(meson_multilib_native_use nat)
735 - -Dpam=$(meson_use pam)
736 - -Dpcre2=$(meson_multilib_native_use pcre)
737 - -Dpolkit=$(meson_multilib_native_use policykit)
738 - -Dqrencode=$(meson_multilib_native_use qrcode)
739 - -Dseccomp=$(meson_multilib_native_use seccomp)
740 - -Dselinux=$(meson_multilib_native_use selinux)
741 - #-Dtests=$(meson_multilib_native_use test)
742 - -Ddbus=$(meson_multilib_native_use test)
743 - -Dxkbcommon=$(meson_multilib_native_use xkb)
744 - # hardcode a few paths to spare some deps
745 - -Dkill-path=/bin/kill
746 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
747 - # Breaks screen, tmux, etc.
748 - -Ddefault-kill-user-processes=false
749 -
750 - # multilib options
751 - -Dbacklight=$(meson_multilib)
752 - -Dbinfmt=$(meson_multilib)
753 - -Dcoredump=$(meson_multilib)
754 - -Denvironment-d=$(meson_multilib)
755 - -Dfirstboot=$(meson_multilib)
756 - -Dhibernate=$(meson_multilib)
757 - -Dhostnamed=$(meson_multilib)
758 - -Dhwdb=$(meson_multilib)
759 - -Dldconfig=$(meson_multilib)
760 - -Dlocaled=$(meson_multilib)
761 - -Dman=$(meson_multilib)
762 - -Dnetworkd=$(meson_multilib)
763 - -Dquotacheck=$(meson_multilib)
764 - -Drandomseed=$(meson_multilib)
765 - -Drfkill=$(meson_multilib)
766 - -Dsysusers=$(meson_multilib)
767 - -Dtimedated=$(meson_multilib)
768 - -Dtimesyncd=$(meson_multilib)
769 - -Dtmpfiles=$(meson_multilib)
770 - -Dvconsole=$(meson_multilib)
771 - )
772 -
773 - if multilib_is_native_abi && use idn; then
774 - myconf+=(
775 - -Dlibidn2=$(usex libidn2 true false)
776 - -Dlibidn=$(usex libidn2 false true)
777 - )
778 - else
779 - myconf+=(
780 - -Dlibidn2=false
781 - -Dlibidn=false
782 - )
783 - fi
784 -
785 - meson_src_configure "${myconf[@]}"
786 -}
787 -
788 -multilib_src_compile() {
789 - eninja
790 -}
791 -
792 -multilib_src_test() {
793 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
794 - eninja test
795 -}
796 -
797 -multilib_src_install() {
798 - DESTDIR="${D}" eninja install
799 -}
800 -
801 -multilib_src_install_all() {
802 - local rootprefix=$(usex split-usr '' /usr)
803 -
804 - # meson doesn't know about docdir
805 - mv "${ED%/}"/usr/share/doc/{systemd,${PF}} || die
806 -
807 - einstalldocs
808 - dodoc "${FILESDIR}"/nsswitch.conf
809 -
810 - if ! use resolvconf; then
811 - rm -f "${ED%/}${rootprefix}"/sbin/resolvconf || die
812 - fi
813 -
814 - if ! use sysv-utils; then
815 - rm "${ED%/}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
816 - rm "${ED%/}"/usr/share/man/man1/init.1 || die
817 - rm "${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
818 - fi
819 -
820 - if ! use resolvconf && ! use sysv-utils; then
821 - rmdir "${ED%/}${rootprefix}"/sbin || die
822 - fi
823 -
824 - # Preserve empty dirs in /etc & /var, bug #437008
825 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
826 - keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
827 - keepdir /etc/udev/{hwdb.d,rules.d}
828 - keepdir /var/log/journal/remote
829 -
830 - # Symlink /etc/sysctl.conf for easy migration.
831 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
832 -
833 - # If we install these symlinks, there is no way for the sysadmin to remove them
834 - # permanently.
835 - rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
836 - rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
837 - rm -f "${ED%/}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
838 - rm -f "${ED%/}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
839 - rm -fr "${ED%/}"/etc/systemd/system/network-online.target.wants || die
840 - rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die
841 - rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die
842 -
843 - local udevdir=/lib/udev
844 - use split-usr || udevdir=/usr/lib/udev
845 -
846 - rm -r "${ED%/}${udevdir}/hwdb.d" || die
847 -
848 - if use split-usr; then
849 - # Avoid breaking boot/reboot
850 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
851 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
852 - fi
853 -}
854 -
855 -migrate_locale() {
856 - local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
857 - local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
858 - local locale_conf="${EROOT%/}/etc/locale.conf"
859 -
860 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
861 - # If locale.conf does not exist...
862 - if [[ -e ${envd_locale} ]]; then
863 - # ...either copy env.d/??locale if there's one
864 - ebegin "Moving ${envd_locale} to ${locale_conf}"
865 - mv "${envd_locale}" "${locale_conf}"
866 - eend ${?} || FAIL=1
867 - else
868 - # ...or create a dummy default
869 - ebegin "Creating ${locale_conf}"
870 - cat > "${locale_conf}" <<-EOF
871 - # This file has been created by the sys-apps/systemd ebuild.
872 - # See locale.conf(5) and localectl(1).
873 -
874 - # LANG=${LANG}
875 - EOF
876 - eend ${?} || FAIL=1
877 - fi
878 - fi
879 -
880 - if [[ ! -L ${envd_locale} ]]; then
881 - # now, if env.d/??locale is not a symlink (to locale.conf)...
882 - if [[ -e ${envd_locale} ]]; then
883 - # ...warn the user that he has duplicate locale settings
884 - ewarn
885 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
886 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
887 - ewarn "and create the symlink with the following command:"
888 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
889 - ewarn
890 - else
891 - # ...or just create the symlink if there's nothing here
892 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
893 - ln -n -s ../locale.conf "${envd_locale_def}"
894 - eend ${?} || FAIL=1
895 - fi
896 - fi
897 -}
898 -
899 -pkg_postinst() {
900 - newusergroup() {
901 - enewgroup "$1"
902 - enewuser "$1" -1 -1 -1 "$1"
903 - }
904 -
905 - enewgroup input
906 - enewgroup kvm 78
907 - enewgroup render
908 - enewgroup systemd-journal
909 - newusergroup systemd-bus-proxy
910 - newusergroup systemd-coredump
911 - newusergroup systemd-journal-gateway
912 - newusergroup systemd-journal-remote
913 - newusergroup systemd-journal-upload
914 - newusergroup systemd-network
915 - newusergroup systemd-resolve
916 - newusergroup systemd-timesync
917 -
918 - systemd_update_catalog
919 -
920 - # Keep this here in case the database format changes so it gets updated
921 - # when required. Despite that this file is owned by sys-apps/hwids.
922 - if has_version "sys-apps/hwids[udev]"; then
923 - udevadm hwdb --update --root="${EROOT%/}"
924 - fi
925 -
926 - udev_reload || FAIL=1
927 -
928 - # Bug 465468, make sure locales are respect, and ensure consistency
929 - # between OpenRC & systemd
930 - migrate_locale
931 -
932 - systemd_reenable systemd-networkd.service systemd-resolved.service
933 -
934 - if [[ ${FAIL} ]]; then
935 - eerror "One of the postinst commands failed. Please check the postinst output"
936 - eerror "for errors. You may need to clean up your system and/or try installing"
937 - eerror "systemd again."
938 - eerror
939 - fi
940 -}
941 -
942 -pkg_prerm() {
943 - # If removing systemd completely, remove the catalog database.
944 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
945 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
946 - fi
947 -}
948
949 diff --git a/sys-apps/systemd/systemd-240-r3.ebuild b/sys-apps/systemd/systemd-240-r3.ebuild
950 deleted file mode 100644
951 index 97922c3f4ed..00000000000
952 --- a/sys-apps/systemd/systemd-240-r3.ebuild
953 +++ /dev/null
954 @@ -1,457 +0,0 @@
955 -# Copyright 2011-2019 Gentoo Authors
956 -# Distributed under the terms of the GNU General Public License v2
957 -
958 -EAPI=7
959 -
960 -if [[ ${PV} == 9999 ]]; then
961 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
962 - inherit git-r3
963 -else
964 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}/${P}.tar.gz
965 - https://dev.gentoo.org/~floppym/dist/${P}-patches-2.tar.gz"
966 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
967 -fi
968 -
969 -PYTHON_COMPAT=( python{3_5,3_6,3_7} )
970 -
971 -inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
972 -
973 -DESCRIPTION="System and service manager for Linux"
974 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
975 -
976 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
977 -SLOT="0/2"
978 -IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux +split-usr ssl +sysv-utils test vanilla xkb"
979 -
980 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
981 -RESTRICT="!test? ( test )"
982 -
983 -MINKV="3.11"
984 -
985 -COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
986 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
987 - !<sys-libs/glibc-2.16
988 - acl? ( sys-apps/acl:0= )
989 - apparmor? ( sys-libs/libapparmor:0= )
990 - audit? ( >=sys-process/audit-2:0= )
991 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
992 - curl? ( net-misc/curl:0= )
993 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
994 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
995 - http? (
996 - >=net-libs/libmicrohttpd-0.9.33:0=
997 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
998 - )
999 - idn? (
1000 - libidn2? ( net-dns/libidn2:= )
1001 - !libidn2? ( net-dns/libidn:= )
1002 - )
1003 - importd? (
1004 - app-arch/bzip2:0=
1005 - sys-libs/zlib:0=
1006 - )
1007 - kmod? ( >=sys-apps/kmod-15:0= )
1008 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
1009 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
1010 - nat? ( net-firewall/iptables:0= )
1011 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
1012 - pcre? ( dev-libs/libpcre2 )
1013 - qrcode? ( media-gfx/qrencode:0= )
1014 - seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
1015 - selinux? ( sys-libs/libselinux:0= )
1016 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
1017 -
1018 -# baselayout-2.2 has /run
1019 -RDEPEND="${COMMON_DEPEND}
1020 - >=sys-apps/baselayout-2.2
1021 - selinux? ( sec-policy/selinux-base-policy[systemd] )
1022 - sysv-utils? ( !sys-apps/sysvinit )
1023 - !sysv-utils? ( sys-apps/sysvinit )
1024 - resolvconf? ( !net-dns/openresolv )
1025 - !build? ( || (
1026 - sys-apps/util-linux[kill(-)]
1027 - sys-process/procps[kill(+)]
1028 - sys-apps/coreutils[kill(-)]
1029 - ) )
1030 - !sys-auth/nss-myhostname
1031 - !<sys-kernel/dracut-044
1032 - !sys-fs/eudev
1033 - !sys-fs/udev"
1034 -
1035 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
1036 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
1037 - >=sys-apps/hwids-20150417[udev]
1038 - >=sys-fs/udev-init-scripts-25
1039 - policykit? ( sys-auth/polkit )
1040 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
1041 -
1042 -# Newer linux-headers needed by ia64, bug #480218
1043 -DEPEND="
1044 - >=sys-kernel/linux-headers-${MINKV}
1045 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
1046 -"
1047 -
1048 -BDEPEND="
1049 - app-arch/xz-utils:0
1050 - dev-util/gperf
1051 - >=dev-util/meson-0.46
1052 - >=dev-util/intltool-0.50
1053 - >=sys-apps/coreutils-8.16
1054 - virtual/pkgconfig[${MULTILIB_USEDEP}]
1055 - test? ( sys-apps/dbus )
1056 - app-text/docbook-xml-dtd:4.2
1057 - app-text/docbook-xml-dtd:4.5
1058 - app-text/docbook-xsl-stylesheets
1059 - dev-libs/libxslt:0
1060 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
1061 -"
1062 -
1063 -pkg_pretend() {
1064 - if [[ ${MERGE_TYPE} != buildonly ]]; then
1065 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
1066 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
1067 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
1068 - ~TIMERFD ~TMPFS_XATTR ~UNIX
1069 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
1070 - ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
1071 - ~!SYSFS_DEPRECATED_V2"
1072 -
1073 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
1074 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
1075 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
1076 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
1077 - kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
1078 -
1079 - if linux_config_exists; then
1080 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
1081 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
1082 - ewarn "It's recommended to set an empty value to the following kernel config option:"
1083 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
1084 - fi
1085 - if linux_chkconfig_present X86; then
1086 - CONFIG_CHECK+=" ~DMIID"
1087 - fi
1088 - fi
1089 -
1090 - if kernel_is -lt ${MINKV//./ }; then
1091 - ewarn "Kernel version at least ${MINKV} required"
1092 - fi
1093 -
1094 - check_extra_config
1095 - fi
1096 -}
1097 -
1098 -pkg_setup() {
1099 - :
1100 -}
1101 -
1102 -src_unpack() {
1103 - default
1104 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
1105 -}
1106 -
1107 -src_prepare() {
1108 - # Do NOT add patches here
1109 - local PATCHES=()
1110 -
1111 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
1112 -
1113 - # Add local patches here
1114 - PATCHES+=(
1115 - )
1116 -
1117 - if ! use vanilla; then
1118 - PATCHES+=(
1119 - "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
1120 - "${FILESDIR}/gentoo-systemd-user-pam.patch"
1121 - "${FILESDIR}/gentoo-uucp-group-r1.patch"
1122 - "${FILESDIR}/gentoo-generator-path-r1.patch"
1123 - )
1124 - fi
1125 -
1126 - default
1127 -}
1128 -
1129 -src_configure() {
1130 - # Prevent conflicts with i686 cross toolchain, bug 559726
1131 - tc-export AR CC NM OBJCOPY RANLIB
1132 -
1133 - python_setup
1134 -
1135 - multilib-minimal_src_configure
1136 -}
1137 -
1138 -meson_use() {
1139 - usex "$1" true false
1140 -}
1141 -
1142 -meson_multilib() {
1143 - if multilib_is_native_abi; then
1144 - echo true
1145 - else
1146 - echo false
1147 - fi
1148 -}
1149 -
1150 -meson_multilib_native_use() {
1151 - if multilib_is_native_abi && use "$1"; then
1152 - echo true
1153 - else
1154 - echo false
1155 - fi
1156 -}
1157 -
1158 -multilib_src_configure() {
1159 - local myconf=(
1160 - --localstatedir="${EPREFIX}/var"
1161 - -Dpamlibdir="$(getpam_mod_dir)"
1162 - # avoid bash-completion dep
1163 - -Dbashcompletiondir="$(get_bashcompdir)"
1164 - # make sure we get /bin:/sbin in PATH
1165 - -Dsplit-usr=$(usex split-usr true false)
1166 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
1167 - -Dsysvinit-path=
1168 - -Dsysvrcnd-path=
1169 - # Avoid infinite exec recursion, bug 642724
1170 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
1171 - # no deps
1172 - -Defi=$(meson_multilib)
1173 - -Dima=true
1174 - # Optional components/dependencies
1175 - -Dacl=$(meson_multilib_native_use acl)
1176 - -Dapparmor=$(meson_multilib_native_use apparmor)
1177 - -Daudit=$(meson_multilib_native_use audit)
1178 - -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
1179 - -Dlibcurl=$(meson_multilib_native_use curl)
1180 - -Delfutils=$(meson_multilib_native_use elfutils)
1181 - -Dgcrypt=$(meson_use gcrypt)
1182 - -Dgnu-efi=$(meson_multilib_native_use gnuefi)
1183 - -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
1184 - -Dmicrohttpd=$(meson_multilib_native_use http)
1185 - $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
1186 - -Dimportd=$(meson_multilib_native_use importd)
1187 - -Dbzip2=$(meson_multilib_native_use importd)
1188 - -Dzlib=$(meson_multilib_native_use importd)
1189 - -Dkmod=$(meson_multilib_native_use kmod)
1190 - -Dlz4=$(meson_use lz4)
1191 - -Dxz=$(meson_use lzma)
1192 - -Dlibiptc=$(meson_multilib_native_use nat)
1193 - -Dpam=$(meson_use pam)
1194 - -Dpcre2=$(meson_multilib_native_use pcre)
1195 - -Dpolkit=$(meson_multilib_native_use policykit)
1196 - -Dqrencode=$(meson_multilib_native_use qrcode)
1197 - -Dseccomp=$(meson_multilib_native_use seccomp)
1198 - -Dselinux=$(meson_multilib_native_use selinux)
1199 - #-Dtests=$(meson_multilib_native_use test)
1200 - -Ddbus=$(meson_multilib_native_use test)
1201 - -Dxkbcommon=$(meson_multilib_native_use xkb)
1202 - # hardcode a few paths to spare some deps
1203 - -Dkill-path=/bin/kill
1204 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
1205 - # Breaks screen, tmux, etc.
1206 - -Ddefault-kill-user-processes=false
1207 -
1208 - # multilib options
1209 - -Dbacklight=$(meson_multilib)
1210 - -Dbinfmt=$(meson_multilib)
1211 - -Dcoredump=$(meson_multilib)
1212 - -Denvironment-d=$(meson_multilib)
1213 - -Dfirstboot=$(meson_multilib)
1214 - -Dhibernate=$(meson_multilib)
1215 - -Dhostnamed=$(meson_multilib)
1216 - -Dhwdb=$(meson_multilib)
1217 - -Dldconfig=$(meson_multilib)
1218 - -Dlocaled=$(meson_multilib)
1219 - -Dman=$(meson_multilib)
1220 - -Dnetworkd=$(meson_multilib)
1221 - -Dquotacheck=$(meson_multilib)
1222 - -Drandomseed=$(meson_multilib)
1223 - -Drfkill=$(meson_multilib)
1224 - -Dsysusers=$(meson_multilib)
1225 - -Dtimedated=$(meson_multilib)
1226 - -Dtimesyncd=$(meson_multilib)
1227 - -Dtmpfiles=$(meson_multilib)
1228 - -Dvconsole=$(meson_multilib)
1229 - )
1230 -
1231 - if multilib_is_native_abi && use idn; then
1232 - myconf+=(
1233 - -Dlibidn2=$(usex libidn2 true false)
1234 - -Dlibidn=$(usex libidn2 false true)
1235 - )
1236 - else
1237 - myconf+=(
1238 - -Dlibidn2=false
1239 - -Dlibidn=false
1240 - )
1241 - fi
1242 -
1243 - meson_src_configure "${myconf[@]}"
1244 -}
1245 -
1246 -multilib_src_compile() {
1247 - eninja
1248 -}
1249 -
1250 -multilib_src_test() {
1251 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
1252 - eninja test
1253 -}
1254 -
1255 -multilib_src_install() {
1256 - DESTDIR="${D}" eninja install
1257 -}
1258 -
1259 -multilib_src_install_all() {
1260 - local rootprefix=$(usex split-usr '' /usr)
1261 -
1262 - # meson doesn't know about docdir
1263 - mv "${ED}"/usr/share/doc/{systemd,${PF}} || die
1264 -
1265 - einstalldocs
1266 - dodoc "${FILESDIR}"/nsswitch.conf
1267 -
1268 - if ! use resolvconf; then
1269 - rm -f "${ED}${rootprefix}"/sbin/resolvconf || die
1270 - fi
1271 -
1272 - if ! use sysv-utils; then
1273 - rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
1274 - rm "${ED}"/usr/share/man/man1/init.1 || die
1275 - rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
1276 - fi
1277 -
1278 - if ! use resolvconf && ! use sysv-utils; then
1279 - rmdir "${ED}${rootprefix}"/sbin || die
1280 - fi
1281 -
1282 - # Preserve empty dirs in /etc & /var, bug #437008
1283 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
1284 - keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
1285 - keepdir /etc/udev/{hwdb.d,rules.d}
1286 - keepdir /var/log/journal/remote
1287 -
1288 - # Symlink /etc/sysctl.conf for easy migration.
1289 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
1290 -
1291 - # If we install these symlinks, there is no way for the sysadmin to remove them
1292 - # permanently.
1293 - rm -f "${ED}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
1294 - rm -f "${ED}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
1295 - rm -f "${ED}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
1296 - rm -f "${ED}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
1297 - rm -fr "${ED}"/etc/systemd/system/network-online.target.wants || die
1298 - rm -fr "${ED}"/etc/systemd/system/sockets.target.wants || die
1299 - rm -fr "${ED}"/etc/systemd/system/sysinit.target.wants || die
1300 -
1301 - local udevdir=/lib/udev
1302 - use split-usr || udevdir=/usr/lib/udev
1303 -
1304 - rm -r "${ED}${udevdir}/hwdb.d" || die
1305 -
1306 - if use split-usr; then
1307 - # Avoid breaking boot/reboot
1308 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
1309 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
1310 - fi
1311 -}
1312 -
1313 -migrate_locale() {
1314 - local envd_locale_def="${EROOT}/etc/env.d/02locale"
1315 - local envd_locale=( "${EROOT}"/etc/env.d/??locale )
1316 - local locale_conf="${EROOT}/etc/locale.conf"
1317 -
1318 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
1319 - # If locale.conf does not exist...
1320 - if [[ -e ${envd_locale} ]]; then
1321 - # ...either copy env.d/??locale if there's one
1322 - ebegin "Moving ${envd_locale} to ${locale_conf}"
1323 - mv "${envd_locale}" "${locale_conf}"
1324 - eend ${?} || FAIL=1
1325 - else
1326 - # ...or create a dummy default
1327 - ebegin "Creating ${locale_conf}"
1328 - cat > "${locale_conf}" <<-EOF
1329 - # This file has been created by the sys-apps/systemd ebuild.
1330 - # See locale.conf(5) and localectl(1).
1331 -
1332 - # LANG=${LANG}
1333 - EOF
1334 - eend ${?} || FAIL=1
1335 - fi
1336 - fi
1337 -
1338 - if [[ ! -L ${envd_locale} ]]; then
1339 - # now, if env.d/??locale is not a symlink (to locale.conf)...
1340 - if [[ -e ${envd_locale} ]]; then
1341 - # ...warn the user that he has duplicate locale settings
1342 - ewarn
1343 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
1344 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
1345 - ewarn "and create the symlink with the following command:"
1346 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
1347 - ewarn
1348 - else
1349 - # ...or just create the symlink if there's nothing here
1350 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
1351 - ln -n -s ../locale.conf "${envd_locale_def}"
1352 - eend ${?} || FAIL=1
1353 - fi
1354 - fi
1355 -}
1356 -
1357 -pkg_postinst() {
1358 - newusergroup() {
1359 - enewgroup "$1"
1360 - enewuser "$1" -1 -1 -1 "$1"
1361 - }
1362 -
1363 - enewgroup input
1364 - enewgroup kvm 78
1365 - enewgroup render
1366 - enewgroup systemd-journal
1367 - newusergroup systemd-bus-proxy
1368 - newusergroup systemd-coredump
1369 - newusergroup systemd-journal-gateway
1370 - newusergroup systemd-journal-remote
1371 - newusergroup systemd-journal-upload
1372 - newusergroup systemd-network
1373 - newusergroup systemd-resolve
1374 - newusergroup systemd-timesync
1375 -
1376 - systemd_update_catalog
1377 -
1378 - # Keep this here in case the database format changes so it gets updated
1379 - # when required. Despite that this file is owned by sys-apps/hwids.
1380 - if has_version "sys-apps/hwids[udev]"; then
1381 - udevadm hwdb --update --root="${EROOT}"
1382 - fi
1383 -
1384 - udev_reload || FAIL=1
1385 -
1386 - # Bug 465468, make sure locales are respect, and ensure consistency
1387 - # between OpenRC & systemd
1388 - migrate_locale
1389 -
1390 - systemd_reenable systemd-networkd.service systemd-resolved.service
1391 -
1392 - if [[ -z ${ROOT} && -d /run/systemd/system ]]; then
1393 - ebegin "Reexecuting system manager"
1394 - systemctl daemon-reexec
1395 - eend $?
1396 - fi
1397 -
1398 - if [[ ${FAIL} ]]; then
1399 - eerror "One of the postinst commands failed. Please check the postinst output"
1400 - eerror "for errors. You may need to clean up your system and/or try installing"
1401 - eerror "systemd again."
1402 - eerror
1403 - fi
1404 -}
1405 -
1406 -pkg_prerm() {
1407 - # If removing systemd completely, remove the catalog database.
1408 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
1409 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
1410 - fi
1411 -}
1412
1413 diff --git a/sys-apps/systemd/systemd-240-r4.ebuild b/sys-apps/systemd/systemd-240-r4.ebuild
1414 deleted file mode 100644
1415 index 26988cc328f..00000000000
1416 --- a/sys-apps/systemd/systemd-240-r4.ebuild
1417 +++ /dev/null
1418 @@ -1,457 +0,0 @@
1419 -# Copyright 2011-2019 Gentoo Authors
1420 -# Distributed under the terms of the GNU General Public License v2
1421 -
1422 -EAPI=7
1423 -
1424 -if [[ ${PV} == 9999 ]]; then
1425 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
1426 - inherit git-r3
1427 -else
1428 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}/${P}.tar.gz
1429 - https://dev.gentoo.org/~floppym/dist/${P}-patches-3.tar.gz"
1430 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
1431 -fi
1432 -
1433 -PYTHON_COMPAT=( python{3_5,3_6,3_7} )
1434 -
1435 -inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
1436 -
1437 -DESCRIPTION="System and service manager for Linux"
1438 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
1439 -
1440 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
1441 -SLOT="0/2"
1442 -IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux +split-usr ssl +sysv-utils test vanilla xkb"
1443 -
1444 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
1445 -RESTRICT="!test? ( test )"
1446 -
1447 -MINKV="3.11"
1448 -
1449 -COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
1450 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
1451 - !<sys-libs/glibc-2.16
1452 - acl? ( sys-apps/acl:0= )
1453 - apparmor? ( sys-libs/libapparmor:0= )
1454 - audit? ( >=sys-process/audit-2:0= )
1455 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
1456 - curl? ( net-misc/curl:0= )
1457 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
1458 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
1459 - http? (
1460 - >=net-libs/libmicrohttpd-0.9.33:0=
1461 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
1462 - )
1463 - idn? (
1464 - libidn2? ( net-dns/libidn2:= )
1465 - !libidn2? ( net-dns/libidn:= )
1466 - )
1467 - importd? (
1468 - app-arch/bzip2:0=
1469 - sys-libs/zlib:0=
1470 - )
1471 - kmod? ( >=sys-apps/kmod-15:0= )
1472 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
1473 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
1474 - nat? ( net-firewall/iptables:0= )
1475 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
1476 - pcre? ( dev-libs/libpcre2 )
1477 - qrcode? ( media-gfx/qrencode:0= )
1478 - seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
1479 - selinux? ( sys-libs/libselinux:0= )
1480 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
1481 -
1482 -# baselayout-2.2 has /run
1483 -RDEPEND="${COMMON_DEPEND}
1484 - >=sys-apps/baselayout-2.2
1485 - selinux? ( sec-policy/selinux-base-policy[systemd] )
1486 - sysv-utils? ( !sys-apps/sysvinit )
1487 - !sysv-utils? ( sys-apps/sysvinit )
1488 - resolvconf? ( !net-dns/openresolv )
1489 - !build? ( || (
1490 - sys-apps/util-linux[kill(-)]
1491 - sys-process/procps[kill(+)]
1492 - sys-apps/coreutils[kill(-)]
1493 - ) )
1494 - !sys-auth/nss-myhostname
1495 - !<sys-kernel/dracut-044
1496 - !sys-fs/eudev
1497 - !sys-fs/udev"
1498 -
1499 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
1500 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
1501 - >=sys-apps/hwids-20150417[udev]
1502 - >=sys-fs/udev-init-scripts-25
1503 - policykit? ( sys-auth/polkit )
1504 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
1505 -
1506 -# Newer linux-headers needed by ia64, bug #480218
1507 -DEPEND="
1508 - >=sys-kernel/linux-headers-${MINKV}
1509 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
1510 -"
1511 -
1512 -BDEPEND="
1513 - app-arch/xz-utils:0
1514 - dev-util/gperf
1515 - >=dev-util/meson-0.46
1516 - >=dev-util/intltool-0.50
1517 - >=sys-apps/coreutils-8.16
1518 - virtual/pkgconfig[${MULTILIB_USEDEP}]
1519 - test? ( sys-apps/dbus )
1520 - app-text/docbook-xml-dtd:4.2
1521 - app-text/docbook-xml-dtd:4.5
1522 - app-text/docbook-xsl-stylesheets
1523 - dev-libs/libxslt:0
1524 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
1525 -"
1526 -
1527 -pkg_pretend() {
1528 - if [[ ${MERGE_TYPE} != buildonly ]]; then
1529 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
1530 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
1531 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
1532 - ~TIMERFD ~TMPFS_XATTR ~UNIX
1533 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
1534 - ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
1535 - ~!SYSFS_DEPRECATED_V2"
1536 -
1537 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
1538 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
1539 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
1540 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
1541 - kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
1542 -
1543 - if linux_config_exists; then
1544 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
1545 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
1546 - ewarn "It's recommended to set an empty value to the following kernel config option:"
1547 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
1548 - fi
1549 - if linux_chkconfig_present X86; then
1550 - CONFIG_CHECK+=" ~DMIID"
1551 - fi
1552 - fi
1553 -
1554 - if kernel_is -lt ${MINKV//./ }; then
1555 - ewarn "Kernel version at least ${MINKV} required"
1556 - fi
1557 -
1558 - check_extra_config
1559 - fi
1560 -}
1561 -
1562 -pkg_setup() {
1563 - :
1564 -}
1565 -
1566 -src_unpack() {
1567 - default
1568 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
1569 -}
1570 -
1571 -src_prepare() {
1572 - # Do NOT add patches here
1573 - local PATCHES=()
1574 -
1575 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
1576 -
1577 - # Add local patches here
1578 - PATCHES+=(
1579 - )
1580 -
1581 - if ! use vanilla; then
1582 - PATCHES+=(
1583 - "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
1584 - "${FILESDIR}/gentoo-systemd-user-pam.patch"
1585 - "${FILESDIR}/gentoo-uucp-group-r1.patch"
1586 - "${FILESDIR}/gentoo-generator-path-r1.patch"
1587 - )
1588 - fi
1589 -
1590 - default
1591 -}
1592 -
1593 -src_configure() {
1594 - # Prevent conflicts with i686 cross toolchain, bug 559726
1595 - tc-export AR CC NM OBJCOPY RANLIB
1596 -
1597 - python_setup
1598 -
1599 - multilib-minimal_src_configure
1600 -}
1601 -
1602 -meson_use() {
1603 - usex "$1" true false
1604 -}
1605 -
1606 -meson_multilib() {
1607 - if multilib_is_native_abi; then
1608 - echo true
1609 - else
1610 - echo false
1611 - fi
1612 -}
1613 -
1614 -meson_multilib_native_use() {
1615 - if multilib_is_native_abi && use "$1"; then
1616 - echo true
1617 - else
1618 - echo false
1619 - fi
1620 -}
1621 -
1622 -multilib_src_configure() {
1623 - local myconf=(
1624 - --localstatedir="${EPREFIX}/var"
1625 - -Dpamlibdir="$(getpam_mod_dir)"
1626 - # avoid bash-completion dep
1627 - -Dbashcompletiondir="$(get_bashcompdir)"
1628 - # make sure we get /bin:/sbin in PATH
1629 - -Dsplit-usr=$(usex split-usr true false)
1630 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
1631 - -Dsysvinit-path=
1632 - -Dsysvrcnd-path=
1633 - # Avoid infinite exec recursion, bug 642724
1634 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
1635 - # no deps
1636 - -Defi=$(meson_multilib)
1637 - -Dima=true
1638 - # Optional components/dependencies
1639 - -Dacl=$(meson_multilib_native_use acl)
1640 - -Dapparmor=$(meson_multilib_native_use apparmor)
1641 - -Daudit=$(meson_multilib_native_use audit)
1642 - -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
1643 - -Dlibcurl=$(meson_multilib_native_use curl)
1644 - -Delfutils=$(meson_multilib_native_use elfutils)
1645 - -Dgcrypt=$(meson_use gcrypt)
1646 - -Dgnu-efi=$(meson_multilib_native_use gnuefi)
1647 - -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
1648 - -Dmicrohttpd=$(meson_multilib_native_use http)
1649 - $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
1650 - -Dimportd=$(meson_multilib_native_use importd)
1651 - -Dbzip2=$(meson_multilib_native_use importd)
1652 - -Dzlib=$(meson_multilib_native_use importd)
1653 - -Dkmod=$(meson_multilib_native_use kmod)
1654 - -Dlz4=$(meson_use lz4)
1655 - -Dxz=$(meson_use lzma)
1656 - -Dlibiptc=$(meson_multilib_native_use nat)
1657 - -Dpam=$(meson_use pam)
1658 - -Dpcre2=$(meson_multilib_native_use pcre)
1659 - -Dpolkit=$(meson_multilib_native_use policykit)
1660 - -Dqrencode=$(meson_multilib_native_use qrcode)
1661 - -Dseccomp=$(meson_multilib_native_use seccomp)
1662 - -Dselinux=$(meson_multilib_native_use selinux)
1663 - #-Dtests=$(meson_multilib_native_use test)
1664 - -Ddbus=$(meson_multilib_native_use test)
1665 - -Dxkbcommon=$(meson_multilib_native_use xkb)
1666 - # hardcode a few paths to spare some deps
1667 - -Dkill-path=/bin/kill
1668 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
1669 - # Breaks screen, tmux, etc.
1670 - -Ddefault-kill-user-processes=false
1671 -
1672 - # multilib options
1673 - -Dbacklight=$(meson_multilib)
1674 - -Dbinfmt=$(meson_multilib)
1675 - -Dcoredump=$(meson_multilib)
1676 - -Denvironment-d=$(meson_multilib)
1677 - -Dfirstboot=$(meson_multilib)
1678 - -Dhibernate=$(meson_multilib)
1679 - -Dhostnamed=$(meson_multilib)
1680 - -Dhwdb=$(meson_multilib)
1681 - -Dldconfig=$(meson_multilib)
1682 - -Dlocaled=$(meson_multilib)
1683 - -Dman=$(meson_multilib)
1684 - -Dnetworkd=$(meson_multilib)
1685 - -Dquotacheck=$(meson_multilib)
1686 - -Drandomseed=$(meson_multilib)
1687 - -Drfkill=$(meson_multilib)
1688 - -Dsysusers=$(meson_multilib)
1689 - -Dtimedated=$(meson_multilib)
1690 - -Dtimesyncd=$(meson_multilib)
1691 - -Dtmpfiles=$(meson_multilib)
1692 - -Dvconsole=$(meson_multilib)
1693 - )
1694 -
1695 - if multilib_is_native_abi && use idn; then
1696 - myconf+=(
1697 - -Dlibidn2=$(usex libidn2 true false)
1698 - -Dlibidn=$(usex libidn2 false true)
1699 - )
1700 - else
1701 - myconf+=(
1702 - -Dlibidn2=false
1703 - -Dlibidn=false
1704 - )
1705 - fi
1706 -
1707 - meson_src_configure "${myconf[@]}"
1708 -}
1709 -
1710 -multilib_src_compile() {
1711 - eninja
1712 -}
1713 -
1714 -multilib_src_test() {
1715 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
1716 - eninja test
1717 -}
1718 -
1719 -multilib_src_install() {
1720 - DESTDIR="${D}" eninja install
1721 -}
1722 -
1723 -multilib_src_install_all() {
1724 - local rootprefix=$(usex split-usr '' /usr)
1725 -
1726 - # meson doesn't know about docdir
1727 - mv "${ED}"/usr/share/doc/{systemd,${PF}} || die
1728 -
1729 - einstalldocs
1730 - dodoc "${FILESDIR}"/nsswitch.conf
1731 -
1732 - if ! use resolvconf; then
1733 - rm -f "${ED}${rootprefix}"/sbin/resolvconf || die
1734 - fi
1735 -
1736 - if ! use sysv-utils; then
1737 - rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
1738 - rm "${ED}"/usr/share/man/man1/init.1 || die
1739 - rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
1740 - fi
1741 -
1742 - if ! use resolvconf && ! use sysv-utils; then
1743 - rmdir "${ED}${rootprefix}"/sbin || die
1744 - fi
1745 -
1746 - # Preserve empty dirs in /etc & /var, bug #437008
1747 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
1748 - keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
1749 - keepdir /etc/udev/{hwdb.d,rules.d}
1750 - keepdir /var/log/journal/remote
1751 -
1752 - # Symlink /etc/sysctl.conf for easy migration.
1753 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
1754 -
1755 - # If we install these symlinks, there is no way for the sysadmin to remove them
1756 - # permanently.
1757 - rm -f "${ED}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
1758 - rm -f "${ED}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
1759 - rm -f "${ED}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
1760 - rm -f "${ED}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
1761 - rm -fr "${ED}"/etc/systemd/system/network-online.target.wants || die
1762 - rm -fr "${ED}"/etc/systemd/system/sockets.target.wants || die
1763 - rm -fr "${ED}"/etc/systemd/system/sysinit.target.wants || die
1764 -
1765 - local udevdir=/lib/udev
1766 - use split-usr || udevdir=/usr/lib/udev
1767 -
1768 - rm -r "${ED}${udevdir}/hwdb.d" || die
1769 -
1770 - if use split-usr; then
1771 - # Avoid breaking boot/reboot
1772 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
1773 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
1774 - fi
1775 -}
1776 -
1777 -migrate_locale() {
1778 - local envd_locale_def="${EROOT}/etc/env.d/02locale"
1779 - local envd_locale=( "${EROOT}"/etc/env.d/??locale )
1780 - local locale_conf="${EROOT}/etc/locale.conf"
1781 -
1782 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
1783 - # If locale.conf does not exist...
1784 - if [[ -e ${envd_locale} ]]; then
1785 - # ...either copy env.d/??locale if there's one
1786 - ebegin "Moving ${envd_locale} to ${locale_conf}"
1787 - mv "${envd_locale}" "${locale_conf}"
1788 - eend ${?} || FAIL=1
1789 - else
1790 - # ...or create a dummy default
1791 - ebegin "Creating ${locale_conf}"
1792 - cat > "${locale_conf}" <<-EOF
1793 - # This file has been created by the sys-apps/systemd ebuild.
1794 - # See locale.conf(5) and localectl(1).
1795 -
1796 - # LANG=${LANG}
1797 - EOF
1798 - eend ${?} || FAIL=1
1799 - fi
1800 - fi
1801 -
1802 - if [[ ! -L ${envd_locale} ]]; then
1803 - # now, if env.d/??locale is not a symlink (to locale.conf)...
1804 - if [[ -e ${envd_locale} ]]; then
1805 - # ...warn the user that he has duplicate locale settings
1806 - ewarn
1807 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
1808 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
1809 - ewarn "and create the symlink with the following command:"
1810 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
1811 - ewarn
1812 - else
1813 - # ...or just create the symlink if there's nothing here
1814 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
1815 - ln -n -s ../locale.conf "${envd_locale_def}"
1816 - eend ${?} || FAIL=1
1817 - fi
1818 - fi
1819 -}
1820 -
1821 -pkg_postinst() {
1822 - newusergroup() {
1823 - enewgroup "$1"
1824 - enewuser "$1" -1 -1 -1 "$1"
1825 - }
1826 -
1827 - enewgroup input
1828 - enewgroup kvm 78
1829 - enewgroup render
1830 - enewgroup systemd-journal
1831 - newusergroup systemd-bus-proxy
1832 - newusergroup systemd-coredump
1833 - newusergroup systemd-journal-gateway
1834 - newusergroup systemd-journal-remote
1835 - newusergroup systemd-journal-upload
1836 - newusergroup systemd-network
1837 - newusergroup systemd-resolve
1838 - newusergroup systemd-timesync
1839 -
1840 - systemd_update_catalog
1841 -
1842 - # Keep this here in case the database format changes so it gets updated
1843 - # when required. Despite that this file is owned by sys-apps/hwids.
1844 - if has_version "sys-apps/hwids[udev]"; then
1845 - udevadm hwdb --update --root="${EROOT}"
1846 - fi
1847 -
1848 - udev_reload || FAIL=1
1849 -
1850 - # Bug 465468, make sure locales are respect, and ensure consistency
1851 - # between OpenRC & systemd
1852 - migrate_locale
1853 -
1854 - systemd_reenable systemd-networkd.service systemd-resolved.service
1855 -
1856 - if [[ -z ${ROOT} && -d /run/systemd/system ]]; then
1857 - ebegin "Reexecuting system manager"
1858 - systemctl daemon-reexec
1859 - eend $?
1860 - fi
1861 -
1862 - if [[ ${FAIL} ]]; then
1863 - eerror "One of the postinst commands failed. Please check the postinst output"
1864 - eerror "for errors. You may need to clean up your system and/or try installing"
1865 - eerror "systemd again."
1866 - eerror
1867 - fi
1868 -}
1869 -
1870 -pkg_prerm() {
1871 - # If removing systemd completely, remove the catalog database.
1872 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
1873 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
1874 - fi
1875 -}
1876
1877 diff --git a/sys-apps/systemd/systemd-241.ebuild b/sys-apps/systemd/systemd-241.ebuild
1878 deleted file mode 100644
1879 index 852df051610..00000000000
1880 --- a/sys-apps/systemd/systemd-241.ebuild
1881 +++ /dev/null
1882 @@ -1,459 +0,0 @@
1883 -# Copyright 2011-2019 Gentoo Authors
1884 -# Distributed under the terms of the GNU General Public License v2
1885 -
1886 -EAPI=7
1887 -
1888 -if [[ ${PV} == 9999 ]]; then
1889 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
1890 - inherit git-r3
1891 -else
1892 - MY_PV=${PV/_/-}
1893 - MY_P=${PN}-${MY_PV}
1894 - S=${WORKDIR}/${MY_P}
1895 - SRC_URI="https://github.com/systemd/systemd/archive/v${MY_PV}/${MY_P}.tar.gz"
1896 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
1897 -fi
1898 -
1899 -PYTHON_COMPAT=( python{3_5,3_6,3_7} )
1900 -
1901 -inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
1902 -
1903 -DESCRIPTION="System and service manager for Linux"
1904 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
1905 -
1906 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
1907 -SLOT="0/2"
1908 -IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux +split-usr ssl +sysv-utils test vanilla xkb"
1909 -
1910 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
1911 -RESTRICT="!test? ( test )"
1912 -
1913 -MINKV="3.11"
1914 -
1915 -COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
1916 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
1917 - !<sys-libs/glibc-2.16
1918 - acl? ( sys-apps/acl:0= )
1919 - apparmor? ( sys-libs/libapparmor:0= )
1920 - audit? ( >=sys-process/audit-2:0= )
1921 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
1922 - curl? ( net-misc/curl:0= )
1923 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
1924 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
1925 - http? (
1926 - >=net-libs/libmicrohttpd-0.9.33:0=
1927 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
1928 - )
1929 - idn? (
1930 - libidn2? ( net-dns/libidn2:= )
1931 - !libidn2? ( net-dns/libidn:= )
1932 - )
1933 - importd? (
1934 - app-arch/bzip2:0=
1935 - sys-libs/zlib:0=
1936 - )
1937 - kmod? ( >=sys-apps/kmod-15:0= )
1938 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
1939 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
1940 - nat? ( net-firewall/iptables:0= )
1941 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
1942 - pcre? ( dev-libs/libpcre2 )
1943 - qrcode? ( media-gfx/qrencode:0= )
1944 - seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
1945 - selinux? ( sys-libs/libselinux:0= )
1946 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
1947 -
1948 -# baselayout-2.2 has /run
1949 -RDEPEND="${COMMON_DEPEND}
1950 - >=sys-apps/baselayout-2.2
1951 - selinux? ( sec-policy/selinux-base-policy[systemd] )
1952 - sysv-utils? ( !sys-apps/sysvinit )
1953 - !sysv-utils? ( sys-apps/sysvinit )
1954 - resolvconf? ( !net-dns/openresolv )
1955 - !build? ( || (
1956 - sys-apps/util-linux[kill(-)]
1957 - sys-process/procps[kill(+)]
1958 - sys-apps/coreutils[kill(-)]
1959 - ) )
1960 - !sys-auth/nss-myhostname
1961 - !<sys-kernel/dracut-044
1962 - !sys-fs/eudev
1963 - !sys-fs/udev"
1964 -
1965 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
1966 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
1967 - >=sys-apps/hwids-20150417[udev]
1968 - >=sys-fs/udev-init-scripts-25
1969 - policykit? ( sys-auth/polkit )
1970 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
1971 -
1972 -# Newer linux-headers needed by ia64, bug #480218
1973 -DEPEND="
1974 - >=sys-kernel/linux-headers-${MINKV}
1975 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
1976 -"
1977 -
1978 -BDEPEND="
1979 - app-arch/xz-utils:0
1980 - dev-util/gperf
1981 - >=dev-util/meson-0.46
1982 - >=dev-util/intltool-0.50
1983 - >=sys-apps/coreutils-8.16
1984 - virtual/pkgconfig[${MULTILIB_USEDEP}]
1985 - test? ( sys-apps/dbus )
1986 - app-text/docbook-xml-dtd:4.2
1987 - app-text/docbook-xml-dtd:4.5
1988 - app-text/docbook-xsl-stylesheets
1989 - dev-libs/libxslt:0
1990 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
1991 -"
1992 -
1993 -pkg_pretend() {
1994 - if [[ ${MERGE_TYPE} != buildonly ]]; then
1995 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
1996 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
1997 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
1998 - ~TIMERFD ~TMPFS_XATTR ~UNIX
1999 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
2000 - ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
2001 - ~!SYSFS_DEPRECATED_V2"
2002 -
2003 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
2004 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
2005 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
2006 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
2007 - kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
2008 -
2009 - if linux_config_exists; then
2010 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
2011 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
2012 - ewarn "It's recommended to set an empty value to the following kernel config option:"
2013 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
2014 - fi
2015 - if linux_chkconfig_present X86; then
2016 - CONFIG_CHECK+=" ~DMIID"
2017 - fi
2018 - fi
2019 -
2020 - if kernel_is -lt ${MINKV//./ }; then
2021 - ewarn "Kernel version at least ${MINKV} required"
2022 - fi
2023 -
2024 - check_extra_config
2025 - fi
2026 -}
2027 -
2028 -pkg_setup() {
2029 - :
2030 -}
2031 -
2032 -src_unpack() {
2033 - default
2034 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
2035 -}
2036 -
2037 -src_prepare() {
2038 - # Do NOT add patches here
2039 - local PATCHES=()
2040 -
2041 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
2042 -
2043 - # Add local patches here
2044 - PATCHES+=(
2045 - )
2046 -
2047 - if ! use vanilla; then
2048 - PATCHES+=(
2049 - "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
2050 - "${FILESDIR}/gentoo-systemd-user-pam.patch"
2051 - "${FILESDIR}/gentoo-uucp-group-r1.patch"
2052 - "${FILESDIR}/gentoo-generator-path-r1.patch"
2053 - )
2054 - fi
2055 -
2056 - default
2057 -}
2058 -
2059 -src_configure() {
2060 - # Prevent conflicts with i686 cross toolchain, bug 559726
2061 - tc-export AR CC NM OBJCOPY RANLIB
2062 -
2063 - python_setup
2064 -
2065 - multilib-minimal_src_configure
2066 -}
2067 -
2068 -meson_use() {
2069 - usex "$1" true false
2070 -}
2071 -
2072 -meson_multilib() {
2073 - if multilib_is_native_abi; then
2074 - echo true
2075 - else
2076 - echo false
2077 - fi
2078 -}
2079 -
2080 -meson_multilib_native_use() {
2081 - if multilib_is_native_abi && use "$1"; then
2082 - echo true
2083 - else
2084 - echo false
2085 - fi
2086 -}
2087 -
2088 -multilib_src_configure() {
2089 - local myconf=(
2090 - --localstatedir="${EPREFIX}/var"
2091 - -Dpamlibdir="$(getpam_mod_dir)"
2092 - # avoid bash-completion dep
2093 - -Dbashcompletiondir="$(get_bashcompdir)"
2094 - # make sure we get /bin:/sbin in PATH
2095 - -Dsplit-usr=$(usex split-usr true false)
2096 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
2097 - -Dsysvinit-path=
2098 - -Dsysvrcnd-path=
2099 - # Avoid infinite exec recursion, bug 642724
2100 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
2101 - # no deps
2102 - -Defi=$(meson_multilib)
2103 - -Dima=true
2104 - # Optional components/dependencies
2105 - -Dacl=$(meson_multilib_native_use acl)
2106 - -Dapparmor=$(meson_multilib_native_use apparmor)
2107 - -Daudit=$(meson_multilib_native_use audit)
2108 - -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
2109 - -Dlibcurl=$(meson_multilib_native_use curl)
2110 - -Delfutils=$(meson_multilib_native_use elfutils)
2111 - -Dgcrypt=$(meson_use gcrypt)
2112 - -Dgnu-efi=$(meson_multilib_native_use gnuefi)
2113 - -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
2114 - -Dmicrohttpd=$(meson_multilib_native_use http)
2115 - $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
2116 - -Dimportd=$(meson_multilib_native_use importd)
2117 - -Dbzip2=$(meson_multilib_native_use importd)
2118 - -Dzlib=$(meson_multilib_native_use importd)
2119 - -Dkmod=$(meson_multilib_native_use kmod)
2120 - -Dlz4=$(meson_use lz4)
2121 - -Dxz=$(meson_use lzma)
2122 - -Dlibiptc=$(meson_multilib_native_use nat)
2123 - -Dpam=$(meson_use pam)
2124 - -Dpcre2=$(meson_multilib_native_use pcre)
2125 - -Dpolkit=$(meson_multilib_native_use policykit)
2126 - -Dqrencode=$(meson_multilib_native_use qrcode)
2127 - -Dseccomp=$(meson_multilib_native_use seccomp)
2128 - -Dselinux=$(meson_multilib_native_use selinux)
2129 - #-Dtests=$(meson_multilib_native_use test)
2130 - -Ddbus=$(meson_multilib_native_use test)
2131 - -Dxkbcommon=$(meson_multilib_native_use xkb)
2132 - # hardcode a few paths to spare some deps
2133 - -Dkill-path=/bin/kill
2134 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
2135 - # Breaks screen, tmux, etc.
2136 - -Ddefault-kill-user-processes=false
2137 -
2138 - # multilib options
2139 - -Dbacklight=$(meson_multilib)
2140 - -Dbinfmt=$(meson_multilib)
2141 - -Dcoredump=$(meson_multilib)
2142 - -Denvironment-d=$(meson_multilib)
2143 - -Dfirstboot=$(meson_multilib)
2144 - -Dhibernate=$(meson_multilib)
2145 - -Dhostnamed=$(meson_multilib)
2146 - -Dhwdb=$(meson_multilib)
2147 - -Dldconfig=$(meson_multilib)
2148 - -Dlocaled=$(meson_multilib)
2149 - -Dman=$(meson_multilib)
2150 - -Dnetworkd=$(meson_multilib)
2151 - -Dquotacheck=$(meson_multilib)
2152 - -Drandomseed=$(meson_multilib)
2153 - -Drfkill=$(meson_multilib)
2154 - -Dsysusers=$(meson_multilib)
2155 - -Dtimedated=$(meson_multilib)
2156 - -Dtimesyncd=$(meson_multilib)
2157 - -Dtmpfiles=$(meson_multilib)
2158 - -Dvconsole=$(meson_multilib)
2159 - )
2160 -
2161 - if multilib_is_native_abi && use idn; then
2162 - myconf+=(
2163 - -Dlibidn2=$(usex libidn2 true false)
2164 - -Dlibidn=$(usex libidn2 false true)
2165 - )
2166 - else
2167 - myconf+=(
2168 - -Dlibidn2=false
2169 - -Dlibidn=false
2170 - )
2171 - fi
2172 -
2173 - meson_src_configure "${myconf[@]}"
2174 -}
2175 -
2176 -multilib_src_compile() {
2177 - eninja
2178 -}
2179 -
2180 -multilib_src_test() {
2181 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
2182 - eninja test
2183 -}
2184 -
2185 -multilib_src_install() {
2186 - DESTDIR="${D}" eninja install
2187 -}
2188 -
2189 -multilib_src_install_all() {
2190 - local rootprefix=$(usex split-usr '' /usr)
2191 -
2192 - # meson doesn't know about docdir
2193 - mv "${ED}"/usr/share/doc/{systemd,${PF}} || die
2194 -
2195 - einstalldocs
2196 - dodoc "${FILESDIR}"/nsswitch.conf
2197 -
2198 - if ! use resolvconf; then
2199 - rm -f "${ED}${rootprefix}"/sbin/resolvconf || die
2200 - fi
2201 -
2202 - if ! use sysv-utils; then
2203 - rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
2204 - rm "${ED}"/usr/share/man/man1/init.1 || die
2205 - rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
2206 - fi
2207 -
2208 - if ! use resolvconf && ! use sysv-utils; then
2209 - rmdir "${ED}${rootprefix}"/sbin || die
2210 - fi
2211 -
2212 - # Preserve empty dirs in /etc & /var, bug #437008
2213 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
2214 - keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
2215 - keepdir /etc/udev/{hwdb.d,rules.d}
2216 - keepdir /var/log/journal/remote
2217 -
2218 - # Symlink /etc/sysctl.conf for easy migration.
2219 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
2220 -
2221 - # If we install these symlinks, there is no way for the sysadmin to remove them
2222 - # permanently.
2223 - rm -f "${ED}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
2224 - rm -f "${ED}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
2225 - rm -f "${ED}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
2226 - rm -f "${ED}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
2227 - rm -fr "${ED}"/etc/systemd/system/network-online.target.wants || die
2228 - rm -fr "${ED}"/etc/systemd/system/sockets.target.wants || die
2229 - rm -fr "${ED}"/etc/systemd/system/sysinit.target.wants || die
2230 -
2231 - local udevdir=/lib/udev
2232 - use split-usr || udevdir=/usr/lib/udev
2233 -
2234 - rm -r "${ED}${udevdir}/hwdb.d" || die
2235 -
2236 - if use split-usr; then
2237 - # Avoid breaking boot/reboot
2238 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
2239 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
2240 - fi
2241 -}
2242 -
2243 -migrate_locale() {
2244 - local envd_locale_def="${EROOT}/etc/env.d/02locale"
2245 - local envd_locale=( "${EROOT}"/etc/env.d/??locale )
2246 - local locale_conf="${EROOT}/etc/locale.conf"
2247 -
2248 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
2249 - # If locale.conf does not exist...
2250 - if [[ -e ${envd_locale} ]]; then
2251 - # ...either copy env.d/??locale if there's one
2252 - ebegin "Moving ${envd_locale} to ${locale_conf}"
2253 - mv "${envd_locale}" "${locale_conf}"
2254 - eend ${?} || FAIL=1
2255 - else
2256 - # ...or create a dummy default
2257 - ebegin "Creating ${locale_conf}"
2258 - cat > "${locale_conf}" <<-EOF
2259 - # This file has been created by the sys-apps/systemd ebuild.
2260 - # See locale.conf(5) and localectl(1).
2261 -
2262 - # LANG=${LANG}
2263 - EOF
2264 - eend ${?} || FAIL=1
2265 - fi
2266 - fi
2267 -
2268 - if [[ ! -L ${envd_locale} ]]; then
2269 - # now, if env.d/??locale is not a symlink (to locale.conf)...
2270 - if [[ -e ${envd_locale} ]]; then
2271 - # ...warn the user that he has duplicate locale settings
2272 - ewarn
2273 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
2274 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
2275 - ewarn "and create the symlink with the following command:"
2276 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
2277 - ewarn
2278 - else
2279 - # ...or just create the symlink if there's nothing here
2280 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
2281 - ln -n -s ../locale.conf "${envd_locale_def}"
2282 - eend ${?} || FAIL=1
2283 - fi
2284 - fi
2285 -}
2286 -
2287 -pkg_postinst() {
2288 - newusergroup() {
2289 - enewgroup "$1"
2290 - enewuser "$1" -1 -1 -1 "$1"
2291 - }
2292 -
2293 - enewgroup input
2294 - enewgroup kvm 78
2295 - enewgroup render
2296 - enewgroup systemd-journal
2297 - newusergroup systemd-bus-proxy
2298 - newusergroup systemd-coredump
2299 - newusergroup systemd-journal-gateway
2300 - newusergroup systemd-journal-remote
2301 - newusergroup systemd-journal-upload
2302 - newusergroup systemd-network
2303 - newusergroup systemd-resolve
2304 - newusergroup systemd-timesync
2305 -
2306 - systemd_update_catalog
2307 -
2308 - # Keep this here in case the database format changes so it gets updated
2309 - # when required. Despite that this file is owned by sys-apps/hwids.
2310 - if has_version "sys-apps/hwids[udev]"; then
2311 - udevadm hwdb --update --root="${EROOT}"
2312 - fi
2313 -
2314 - udev_reload || FAIL=1
2315 -
2316 - # Bug 465468, make sure locales are respect, and ensure consistency
2317 - # between OpenRC & systemd
2318 - migrate_locale
2319 -
2320 - systemd_reenable systemd-networkd.service systemd-resolved.service
2321 -
2322 - if [[ -z ${ROOT} && -d /run/systemd/system ]]; then
2323 - ebegin "Reexecuting system manager"
2324 - systemctl daemon-reexec
2325 - eend $?
2326 - fi
2327 -
2328 - if [[ ${FAIL} ]]; then
2329 - eerror "One of the postinst commands failed. Please check the postinst output"
2330 - eerror "for errors. You may need to clean up your system and/or try installing"
2331 - eerror "systemd again."
2332 - eerror
2333 - fi
2334 -}
2335 -
2336 -pkg_prerm() {
2337 - # If removing systemd completely, remove the catalog database.
2338 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
2339 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
2340 - fi
2341 -}
2342
2343 diff --git a/sys-apps/systemd/systemd-241_rc1.ebuild b/sys-apps/systemd/systemd-241_rc1.ebuild
2344 deleted file mode 100644
2345 index 852df051610..00000000000
2346 --- a/sys-apps/systemd/systemd-241_rc1.ebuild
2347 +++ /dev/null
2348 @@ -1,459 +0,0 @@
2349 -# Copyright 2011-2019 Gentoo Authors
2350 -# Distributed under the terms of the GNU General Public License v2
2351 -
2352 -EAPI=7
2353 -
2354 -if [[ ${PV} == 9999 ]]; then
2355 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
2356 - inherit git-r3
2357 -else
2358 - MY_PV=${PV/_/-}
2359 - MY_P=${PN}-${MY_PV}
2360 - S=${WORKDIR}/${MY_P}
2361 - SRC_URI="https://github.com/systemd/systemd/archive/v${MY_PV}/${MY_P}.tar.gz"
2362 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
2363 -fi
2364 -
2365 -PYTHON_COMPAT=( python{3_5,3_6,3_7} )
2366 -
2367 -inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
2368 -
2369 -DESCRIPTION="System and service manager for Linux"
2370 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
2371 -
2372 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
2373 -SLOT="0/2"
2374 -IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux +split-usr ssl +sysv-utils test vanilla xkb"
2375 -
2376 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
2377 -RESTRICT="!test? ( test )"
2378 -
2379 -MINKV="3.11"
2380 -
2381 -COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
2382 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
2383 - !<sys-libs/glibc-2.16
2384 - acl? ( sys-apps/acl:0= )
2385 - apparmor? ( sys-libs/libapparmor:0= )
2386 - audit? ( >=sys-process/audit-2:0= )
2387 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
2388 - curl? ( net-misc/curl:0= )
2389 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
2390 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
2391 - http? (
2392 - >=net-libs/libmicrohttpd-0.9.33:0=
2393 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
2394 - )
2395 - idn? (
2396 - libidn2? ( net-dns/libidn2:= )
2397 - !libidn2? ( net-dns/libidn:= )
2398 - )
2399 - importd? (
2400 - app-arch/bzip2:0=
2401 - sys-libs/zlib:0=
2402 - )
2403 - kmod? ( >=sys-apps/kmod-15:0= )
2404 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
2405 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
2406 - nat? ( net-firewall/iptables:0= )
2407 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
2408 - pcre? ( dev-libs/libpcre2 )
2409 - qrcode? ( media-gfx/qrencode:0= )
2410 - seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
2411 - selinux? ( sys-libs/libselinux:0= )
2412 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
2413 -
2414 -# baselayout-2.2 has /run
2415 -RDEPEND="${COMMON_DEPEND}
2416 - >=sys-apps/baselayout-2.2
2417 - selinux? ( sec-policy/selinux-base-policy[systemd] )
2418 - sysv-utils? ( !sys-apps/sysvinit )
2419 - !sysv-utils? ( sys-apps/sysvinit )
2420 - resolvconf? ( !net-dns/openresolv )
2421 - !build? ( || (
2422 - sys-apps/util-linux[kill(-)]
2423 - sys-process/procps[kill(+)]
2424 - sys-apps/coreutils[kill(-)]
2425 - ) )
2426 - !sys-auth/nss-myhostname
2427 - !<sys-kernel/dracut-044
2428 - !sys-fs/eudev
2429 - !sys-fs/udev"
2430 -
2431 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
2432 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
2433 - >=sys-apps/hwids-20150417[udev]
2434 - >=sys-fs/udev-init-scripts-25
2435 - policykit? ( sys-auth/polkit )
2436 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
2437 -
2438 -# Newer linux-headers needed by ia64, bug #480218
2439 -DEPEND="
2440 - >=sys-kernel/linux-headers-${MINKV}
2441 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
2442 -"
2443 -
2444 -BDEPEND="
2445 - app-arch/xz-utils:0
2446 - dev-util/gperf
2447 - >=dev-util/meson-0.46
2448 - >=dev-util/intltool-0.50
2449 - >=sys-apps/coreutils-8.16
2450 - virtual/pkgconfig[${MULTILIB_USEDEP}]
2451 - test? ( sys-apps/dbus )
2452 - app-text/docbook-xml-dtd:4.2
2453 - app-text/docbook-xml-dtd:4.5
2454 - app-text/docbook-xsl-stylesheets
2455 - dev-libs/libxslt:0
2456 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
2457 -"
2458 -
2459 -pkg_pretend() {
2460 - if [[ ${MERGE_TYPE} != buildonly ]]; then
2461 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
2462 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
2463 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
2464 - ~TIMERFD ~TMPFS_XATTR ~UNIX
2465 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
2466 - ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
2467 - ~!SYSFS_DEPRECATED_V2"
2468 -
2469 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
2470 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
2471 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
2472 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
2473 - kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
2474 -
2475 - if linux_config_exists; then
2476 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
2477 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
2478 - ewarn "It's recommended to set an empty value to the following kernel config option:"
2479 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
2480 - fi
2481 - if linux_chkconfig_present X86; then
2482 - CONFIG_CHECK+=" ~DMIID"
2483 - fi
2484 - fi
2485 -
2486 - if kernel_is -lt ${MINKV//./ }; then
2487 - ewarn "Kernel version at least ${MINKV} required"
2488 - fi
2489 -
2490 - check_extra_config
2491 - fi
2492 -}
2493 -
2494 -pkg_setup() {
2495 - :
2496 -}
2497 -
2498 -src_unpack() {
2499 - default
2500 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
2501 -}
2502 -
2503 -src_prepare() {
2504 - # Do NOT add patches here
2505 - local PATCHES=()
2506 -
2507 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
2508 -
2509 - # Add local patches here
2510 - PATCHES+=(
2511 - )
2512 -
2513 - if ! use vanilla; then
2514 - PATCHES+=(
2515 - "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
2516 - "${FILESDIR}/gentoo-systemd-user-pam.patch"
2517 - "${FILESDIR}/gentoo-uucp-group-r1.patch"
2518 - "${FILESDIR}/gentoo-generator-path-r1.patch"
2519 - )
2520 - fi
2521 -
2522 - default
2523 -}
2524 -
2525 -src_configure() {
2526 - # Prevent conflicts with i686 cross toolchain, bug 559726
2527 - tc-export AR CC NM OBJCOPY RANLIB
2528 -
2529 - python_setup
2530 -
2531 - multilib-minimal_src_configure
2532 -}
2533 -
2534 -meson_use() {
2535 - usex "$1" true false
2536 -}
2537 -
2538 -meson_multilib() {
2539 - if multilib_is_native_abi; then
2540 - echo true
2541 - else
2542 - echo false
2543 - fi
2544 -}
2545 -
2546 -meson_multilib_native_use() {
2547 - if multilib_is_native_abi && use "$1"; then
2548 - echo true
2549 - else
2550 - echo false
2551 - fi
2552 -}
2553 -
2554 -multilib_src_configure() {
2555 - local myconf=(
2556 - --localstatedir="${EPREFIX}/var"
2557 - -Dpamlibdir="$(getpam_mod_dir)"
2558 - # avoid bash-completion dep
2559 - -Dbashcompletiondir="$(get_bashcompdir)"
2560 - # make sure we get /bin:/sbin in PATH
2561 - -Dsplit-usr=$(usex split-usr true false)
2562 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
2563 - -Dsysvinit-path=
2564 - -Dsysvrcnd-path=
2565 - # Avoid infinite exec recursion, bug 642724
2566 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
2567 - # no deps
2568 - -Defi=$(meson_multilib)
2569 - -Dima=true
2570 - # Optional components/dependencies
2571 - -Dacl=$(meson_multilib_native_use acl)
2572 - -Dapparmor=$(meson_multilib_native_use apparmor)
2573 - -Daudit=$(meson_multilib_native_use audit)
2574 - -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
2575 - -Dlibcurl=$(meson_multilib_native_use curl)
2576 - -Delfutils=$(meson_multilib_native_use elfutils)
2577 - -Dgcrypt=$(meson_use gcrypt)
2578 - -Dgnu-efi=$(meson_multilib_native_use gnuefi)
2579 - -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
2580 - -Dmicrohttpd=$(meson_multilib_native_use http)
2581 - $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
2582 - -Dimportd=$(meson_multilib_native_use importd)
2583 - -Dbzip2=$(meson_multilib_native_use importd)
2584 - -Dzlib=$(meson_multilib_native_use importd)
2585 - -Dkmod=$(meson_multilib_native_use kmod)
2586 - -Dlz4=$(meson_use lz4)
2587 - -Dxz=$(meson_use lzma)
2588 - -Dlibiptc=$(meson_multilib_native_use nat)
2589 - -Dpam=$(meson_use pam)
2590 - -Dpcre2=$(meson_multilib_native_use pcre)
2591 - -Dpolkit=$(meson_multilib_native_use policykit)
2592 - -Dqrencode=$(meson_multilib_native_use qrcode)
2593 - -Dseccomp=$(meson_multilib_native_use seccomp)
2594 - -Dselinux=$(meson_multilib_native_use selinux)
2595 - #-Dtests=$(meson_multilib_native_use test)
2596 - -Ddbus=$(meson_multilib_native_use test)
2597 - -Dxkbcommon=$(meson_multilib_native_use xkb)
2598 - # hardcode a few paths to spare some deps
2599 - -Dkill-path=/bin/kill
2600 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
2601 - # Breaks screen, tmux, etc.
2602 - -Ddefault-kill-user-processes=false
2603 -
2604 - # multilib options
2605 - -Dbacklight=$(meson_multilib)
2606 - -Dbinfmt=$(meson_multilib)
2607 - -Dcoredump=$(meson_multilib)
2608 - -Denvironment-d=$(meson_multilib)
2609 - -Dfirstboot=$(meson_multilib)
2610 - -Dhibernate=$(meson_multilib)
2611 - -Dhostnamed=$(meson_multilib)
2612 - -Dhwdb=$(meson_multilib)
2613 - -Dldconfig=$(meson_multilib)
2614 - -Dlocaled=$(meson_multilib)
2615 - -Dman=$(meson_multilib)
2616 - -Dnetworkd=$(meson_multilib)
2617 - -Dquotacheck=$(meson_multilib)
2618 - -Drandomseed=$(meson_multilib)
2619 - -Drfkill=$(meson_multilib)
2620 - -Dsysusers=$(meson_multilib)
2621 - -Dtimedated=$(meson_multilib)
2622 - -Dtimesyncd=$(meson_multilib)
2623 - -Dtmpfiles=$(meson_multilib)
2624 - -Dvconsole=$(meson_multilib)
2625 - )
2626 -
2627 - if multilib_is_native_abi && use idn; then
2628 - myconf+=(
2629 - -Dlibidn2=$(usex libidn2 true false)
2630 - -Dlibidn=$(usex libidn2 false true)
2631 - )
2632 - else
2633 - myconf+=(
2634 - -Dlibidn2=false
2635 - -Dlibidn=false
2636 - )
2637 - fi
2638 -
2639 - meson_src_configure "${myconf[@]}"
2640 -}
2641 -
2642 -multilib_src_compile() {
2643 - eninja
2644 -}
2645 -
2646 -multilib_src_test() {
2647 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
2648 - eninja test
2649 -}
2650 -
2651 -multilib_src_install() {
2652 - DESTDIR="${D}" eninja install
2653 -}
2654 -
2655 -multilib_src_install_all() {
2656 - local rootprefix=$(usex split-usr '' /usr)
2657 -
2658 - # meson doesn't know about docdir
2659 - mv "${ED}"/usr/share/doc/{systemd,${PF}} || die
2660 -
2661 - einstalldocs
2662 - dodoc "${FILESDIR}"/nsswitch.conf
2663 -
2664 - if ! use resolvconf; then
2665 - rm -f "${ED}${rootprefix}"/sbin/resolvconf || die
2666 - fi
2667 -
2668 - if ! use sysv-utils; then
2669 - rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
2670 - rm "${ED}"/usr/share/man/man1/init.1 || die
2671 - rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
2672 - fi
2673 -
2674 - if ! use resolvconf && ! use sysv-utils; then
2675 - rmdir "${ED}${rootprefix}"/sbin || die
2676 - fi
2677 -
2678 - # Preserve empty dirs in /etc & /var, bug #437008
2679 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
2680 - keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
2681 - keepdir /etc/udev/{hwdb.d,rules.d}
2682 - keepdir /var/log/journal/remote
2683 -
2684 - # Symlink /etc/sysctl.conf for easy migration.
2685 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
2686 -
2687 - # If we install these symlinks, there is no way for the sysadmin to remove them
2688 - # permanently.
2689 - rm -f "${ED}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
2690 - rm -f "${ED}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
2691 - rm -f "${ED}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
2692 - rm -f "${ED}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
2693 - rm -fr "${ED}"/etc/systemd/system/network-online.target.wants || die
2694 - rm -fr "${ED}"/etc/systemd/system/sockets.target.wants || die
2695 - rm -fr "${ED}"/etc/systemd/system/sysinit.target.wants || die
2696 -
2697 - local udevdir=/lib/udev
2698 - use split-usr || udevdir=/usr/lib/udev
2699 -
2700 - rm -r "${ED}${udevdir}/hwdb.d" || die
2701 -
2702 - if use split-usr; then
2703 - # Avoid breaking boot/reboot
2704 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
2705 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
2706 - fi
2707 -}
2708 -
2709 -migrate_locale() {
2710 - local envd_locale_def="${EROOT}/etc/env.d/02locale"
2711 - local envd_locale=( "${EROOT}"/etc/env.d/??locale )
2712 - local locale_conf="${EROOT}/etc/locale.conf"
2713 -
2714 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
2715 - # If locale.conf does not exist...
2716 - if [[ -e ${envd_locale} ]]; then
2717 - # ...either copy env.d/??locale if there's one
2718 - ebegin "Moving ${envd_locale} to ${locale_conf}"
2719 - mv "${envd_locale}" "${locale_conf}"
2720 - eend ${?} || FAIL=1
2721 - else
2722 - # ...or create a dummy default
2723 - ebegin "Creating ${locale_conf}"
2724 - cat > "${locale_conf}" <<-EOF
2725 - # This file has been created by the sys-apps/systemd ebuild.
2726 - # See locale.conf(5) and localectl(1).
2727 -
2728 - # LANG=${LANG}
2729 - EOF
2730 - eend ${?} || FAIL=1
2731 - fi
2732 - fi
2733 -
2734 - if [[ ! -L ${envd_locale} ]]; then
2735 - # now, if env.d/??locale is not a symlink (to locale.conf)...
2736 - if [[ -e ${envd_locale} ]]; then
2737 - # ...warn the user that he has duplicate locale settings
2738 - ewarn
2739 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
2740 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
2741 - ewarn "and create the symlink with the following command:"
2742 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
2743 - ewarn
2744 - else
2745 - # ...or just create the symlink if there's nothing here
2746 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
2747 - ln -n -s ../locale.conf "${envd_locale_def}"
2748 - eend ${?} || FAIL=1
2749 - fi
2750 - fi
2751 -}
2752 -
2753 -pkg_postinst() {
2754 - newusergroup() {
2755 - enewgroup "$1"
2756 - enewuser "$1" -1 -1 -1 "$1"
2757 - }
2758 -
2759 - enewgroup input
2760 - enewgroup kvm 78
2761 - enewgroup render
2762 - enewgroup systemd-journal
2763 - newusergroup systemd-bus-proxy
2764 - newusergroup systemd-coredump
2765 - newusergroup systemd-journal-gateway
2766 - newusergroup systemd-journal-remote
2767 - newusergroup systemd-journal-upload
2768 - newusergroup systemd-network
2769 - newusergroup systemd-resolve
2770 - newusergroup systemd-timesync
2771 -
2772 - systemd_update_catalog
2773 -
2774 - # Keep this here in case the database format changes so it gets updated
2775 - # when required. Despite that this file is owned by sys-apps/hwids.
2776 - if has_version "sys-apps/hwids[udev]"; then
2777 - udevadm hwdb --update --root="${EROOT}"
2778 - fi
2779 -
2780 - udev_reload || FAIL=1
2781 -
2782 - # Bug 465468, make sure locales are respect, and ensure consistency
2783 - # between OpenRC & systemd
2784 - migrate_locale
2785 -
2786 - systemd_reenable systemd-networkd.service systemd-resolved.service
2787 -
2788 - if [[ -z ${ROOT} && -d /run/systemd/system ]]; then
2789 - ebegin "Reexecuting system manager"
2790 - systemctl daemon-reexec
2791 - eend $?
2792 - fi
2793 -
2794 - if [[ ${FAIL} ]]; then
2795 - eerror "One of the postinst commands failed. Please check the postinst output"
2796 - eerror "for errors. You may need to clean up your system and/or try installing"
2797 - eerror "systemd again."
2798 - eerror
2799 - fi
2800 -}
2801 -
2802 -pkg_prerm() {
2803 - # If removing systemd completely, remove the catalog database.
2804 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
2805 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
2806 - fi
2807 -}
2808
2809 diff --git a/sys-apps/systemd/systemd-241_rc2.ebuild b/sys-apps/systemd/systemd-241_rc2.ebuild
2810 deleted file mode 100644
2811 index 852df051610..00000000000
2812 --- a/sys-apps/systemd/systemd-241_rc2.ebuild
2813 +++ /dev/null
2814 @@ -1,459 +0,0 @@
2815 -# Copyright 2011-2019 Gentoo Authors
2816 -# Distributed under the terms of the GNU General Public License v2
2817 -
2818 -EAPI=7
2819 -
2820 -if [[ ${PV} == 9999 ]]; then
2821 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
2822 - inherit git-r3
2823 -else
2824 - MY_PV=${PV/_/-}
2825 - MY_P=${PN}-${MY_PV}
2826 - S=${WORKDIR}/${MY_P}
2827 - SRC_URI="https://github.com/systemd/systemd/archive/v${MY_PV}/${MY_P}.tar.gz"
2828 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
2829 -fi
2830 -
2831 -PYTHON_COMPAT=( python{3_5,3_6,3_7} )
2832 -
2833 -inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user
2834 -
2835 -DESCRIPTION="System and service manager for Linux"
2836 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
2837 -
2838 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
2839 -SLOT="0/2"
2840 -IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam pcre policykit qrcode +resolvconf +seccomp selinux +split-usr ssl +sysv-utils test vanilla xkb"
2841 -
2842 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
2843 -RESTRICT="!test? ( test )"
2844 -
2845 -MINKV="3.11"
2846 -
2847 -COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}]
2848 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
2849 - !<sys-libs/glibc-2.16
2850 - acl? ( sys-apps/acl:0= )
2851 - apparmor? ( sys-libs/libapparmor:0= )
2852 - audit? ( >=sys-process/audit-2:0= )
2853 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
2854 - curl? ( net-misc/curl:0= )
2855 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
2856 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
2857 - http? (
2858 - >=net-libs/libmicrohttpd-0.9.33:0=
2859 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
2860 - )
2861 - idn? (
2862 - libidn2? ( net-dns/libidn2:= )
2863 - !libidn2? ( net-dns/libidn:= )
2864 - )
2865 - importd? (
2866 - app-arch/bzip2:0=
2867 - sys-libs/zlib:0=
2868 - )
2869 - kmod? ( >=sys-apps/kmod-15:0= )
2870 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
2871 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
2872 - nat? ( net-firewall/iptables:0= )
2873 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
2874 - pcre? ( dev-libs/libpcre2 )
2875 - qrcode? ( media-gfx/qrencode:0= )
2876 - seccomp? ( >=sys-libs/libseccomp-2.3.3:0= )
2877 - selinux? ( sys-libs/libselinux:0= )
2878 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )"
2879 -
2880 -# baselayout-2.2 has /run
2881 -RDEPEND="${COMMON_DEPEND}
2882 - >=sys-apps/baselayout-2.2
2883 - selinux? ( sec-policy/selinux-base-policy[systemd] )
2884 - sysv-utils? ( !sys-apps/sysvinit )
2885 - !sysv-utils? ( sys-apps/sysvinit )
2886 - resolvconf? ( !net-dns/openresolv )
2887 - !build? ( || (
2888 - sys-apps/util-linux[kill(-)]
2889 - sys-process/procps[kill(+)]
2890 - sys-apps/coreutils[kill(-)]
2891 - ) )
2892 - !sys-auth/nss-myhostname
2893 - !<sys-kernel/dracut-044
2894 - !sys-fs/eudev
2895 - !sys-fs/udev"
2896 -
2897 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
2898 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
2899 - >=sys-apps/hwids-20150417[udev]
2900 - >=sys-fs/udev-init-scripts-25
2901 - policykit? ( sys-auth/polkit )
2902 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
2903 -
2904 -# Newer linux-headers needed by ia64, bug #480218
2905 -DEPEND="
2906 - >=sys-kernel/linux-headers-${MINKV}
2907 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
2908 -"
2909 -
2910 -BDEPEND="
2911 - app-arch/xz-utils:0
2912 - dev-util/gperf
2913 - >=dev-util/meson-0.46
2914 - >=dev-util/intltool-0.50
2915 - >=sys-apps/coreutils-8.16
2916 - virtual/pkgconfig[${MULTILIB_USEDEP}]
2917 - test? ( sys-apps/dbus )
2918 - app-text/docbook-xml-dtd:4.2
2919 - app-text/docbook-xml-dtd:4.5
2920 - app-text/docbook-xsl-stylesheets
2921 - dev-libs/libxslt:0
2922 - $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
2923 -"
2924 -
2925 -pkg_pretend() {
2926 - if [[ ${MERGE_TYPE} != buildonly ]]; then
2927 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
2928 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
2929 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
2930 - ~TIMERFD ~TMPFS_XATTR ~UNIX
2931 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
2932 - ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
2933 - ~!SYSFS_DEPRECATED_V2"
2934 -
2935 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
2936 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
2937 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
2938 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
2939 - kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF"
2940 -
2941 - if linux_config_exists; then
2942 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
2943 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
2944 - ewarn "It's recommended to set an empty value to the following kernel config option:"
2945 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
2946 - fi
2947 - if linux_chkconfig_present X86; then
2948 - CONFIG_CHECK+=" ~DMIID"
2949 - fi
2950 - fi
2951 -
2952 - if kernel_is -lt ${MINKV//./ }; then
2953 - ewarn "Kernel version at least ${MINKV} required"
2954 - fi
2955 -
2956 - check_extra_config
2957 - fi
2958 -}
2959 -
2960 -pkg_setup() {
2961 - :
2962 -}
2963 -
2964 -src_unpack() {
2965 - default
2966 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
2967 -}
2968 -
2969 -src_prepare() {
2970 - # Do NOT add patches here
2971 - local PATCHES=()
2972 -
2973 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
2974 -
2975 - # Add local patches here
2976 - PATCHES+=(
2977 - )
2978 -
2979 - if ! use vanilla; then
2980 - PATCHES+=(
2981 - "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch"
2982 - "${FILESDIR}/gentoo-systemd-user-pam.patch"
2983 - "${FILESDIR}/gentoo-uucp-group-r1.patch"
2984 - "${FILESDIR}/gentoo-generator-path-r1.patch"
2985 - )
2986 - fi
2987 -
2988 - default
2989 -}
2990 -
2991 -src_configure() {
2992 - # Prevent conflicts with i686 cross toolchain, bug 559726
2993 - tc-export AR CC NM OBJCOPY RANLIB
2994 -
2995 - python_setup
2996 -
2997 - multilib-minimal_src_configure
2998 -}
2999 -
3000 -meson_use() {
3001 - usex "$1" true false
3002 -}
3003 -
3004 -meson_multilib() {
3005 - if multilib_is_native_abi; then
3006 - echo true
3007 - else
3008 - echo false
3009 - fi
3010 -}
3011 -
3012 -meson_multilib_native_use() {
3013 - if multilib_is_native_abi && use "$1"; then
3014 - echo true
3015 - else
3016 - echo false
3017 - fi
3018 -}
3019 -
3020 -multilib_src_configure() {
3021 - local myconf=(
3022 - --localstatedir="${EPREFIX}/var"
3023 - -Dpamlibdir="$(getpam_mod_dir)"
3024 - # avoid bash-completion dep
3025 - -Dbashcompletiondir="$(get_bashcompdir)"
3026 - # make sure we get /bin:/sbin in PATH
3027 - -Dsplit-usr=$(usex split-usr true false)
3028 - -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
3029 - -Dsysvinit-path=
3030 - -Dsysvrcnd-path=
3031 - # Avoid infinite exec recursion, bug 642724
3032 - -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
3033 - # no deps
3034 - -Defi=$(meson_multilib)
3035 - -Dima=true
3036 - # Optional components/dependencies
3037 - -Dacl=$(meson_multilib_native_use acl)
3038 - -Dapparmor=$(meson_multilib_native_use apparmor)
3039 - -Daudit=$(meson_multilib_native_use audit)
3040 - -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup)
3041 - -Dlibcurl=$(meson_multilib_native_use curl)
3042 - -Delfutils=$(meson_multilib_native_use elfutils)
3043 - -Dgcrypt=$(meson_use gcrypt)
3044 - -Dgnu-efi=$(meson_multilib_native_use gnuefi)
3045 - -Defi-libdir="${EPREFIX}/usr/$(get_libdir)"
3046 - -Dmicrohttpd=$(meson_multilib_native_use http)
3047 - $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false)
3048 - -Dimportd=$(meson_multilib_native_use importd)
3049 - -Dbzip2=$(meson_multilib_native_use importd)
3050 - -Dzlib=$(meson_multilib_native_use importd)
3051 - -Dkmod=$(meson_multilib_native_use kmod)
3052 - -Dlz4=$(meson_use lz4)
3053 - -Dxz=$(meson_use lzma)
3054 - -Dlibiptc=$(meson_multilib_native_use nat)
3055 - -Dpam=$(meson_use pam)
3056 - -Dpcre2=$(meson_multilib_native_use pcre)
3057 - -Dpolkit=$(meson_multilib_native_use policykit)
3058 - -Dqrencode=$(meson_multilib_native_use qrcode)
3059 - -Dseccomp=$(meson_multilib_native_use seccomp)
3060 - -Dselinux=$(meson_multilib_native_use selinux)
3061 - #-Dtests=$(meson_multilib_native_use test)
3062 - -Ddbus=$(meson_multilib_native_use test)
3063 - -Dxkbcommon=$(meson_multilib_native_use xkb)
3064 - # hardcode a few paths to spare some deps
3065 - -Dkill-path=/bin/kill
3066 - -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
3067 - # Breaks screen, tmux, etc.
3068 - -Ddefault-kill-user-processes=false
3069 -
3070 - # multilib options
3071 - -Dbacklight=$(meson_multilib)
3072 - -Dbinfmt=$(meson_multilib)
3073 - -Dcoredump=$(meson_multilib)
3074 - -Denvironment-d=$(meson_multilib)
3075 - -Dfirstboot=$(meson_multilib)
3076 - -Dhibernate=$(meson_multilib)
3077 - -Dhostnamed=$(meson_multilib)
3078 - -Dhwdb=$(meson_multilib)
3079 - -Dldconfig=$(meson_multilib)
3080 - -Dlocaled=$(meson_multilib)
3081 - -Dman=$(meson_multilib)
3082 - -Dnetworkd=$(meson_multilib)
3083 - -Dquotacheck=$(meson_multilib)
3084 - -Drandomseed=$(meson_multilib)
3085 - -Drfkill=$(meson_multilib)
3086 - -Dsysusers=$(meson_multilib)
3087 - -Dtimedated=$(meson_multilib)
3088 - -Dtimesyncd=$(meson_multilib)
3089 - -Dtmpfiles=$(meson_multilib)
3090 - -Dvconsole=$(meson_multilib)
3091 - )
3092 -
3093 - if multilib_is_native_abi && use idn; then
3094 - myconf+=(
3095 - -Dlibidn2=$(usex libidn2 true false)
3096 - -Dlibidn=$(usex libidn2 false true)
3097 - )
3098 - else
3099 - myconf+=(
3100 - -Dlibidn2=false
3101 - -Dlibidn=false
3102 - )
3103 - fi
3104 -
3105 - meson_src_configure "${myconf[@]}"
3106 -}
3107 -
3108 -multilib_src_compile() {
3109 - eninja
3110 -}
3111 -
3112 -multilib_src_test() {
3113 - unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
3114 - eninja test
3115 -}
3116 -
3117 -multilib_src_install() {
3118 - DESTDIR="${D}" eninja install
3119 -}
3120 -
3121 -multilib_src_install_all() {
3122 - local rootprefix=$(usex split-usr '' /usr)
3123 -
3124 - # meson doesn't know about docdir
3125 - mv "${ED}"/usr/share/doc/{systemd,${PF}} || die
3126 -
3127 - einstalldocs
3128 - dodoc "${FILESDIR}"/nsswitch.conf
3129 -
3130 - if ! use resolvconf; then
3131 - rm -f "${ED}${rootprefix}"/sbin/resolvconf || die
3132 - fi
3133 -
3134 - if ! use sysv-utils; then
3135 - rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die
3136 - rm "${ED}"/usr/share/man/man1/init.1 || die
3137 - rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die
3138 - fi
3139 -
3140 - if ! use resolvconf && ! use sysv-utils; then
3141 - rmdir "${ED}${rootprefix}"/sbin || die
3142 - fi
3143 -
3144 - # Preserve empty dirs in /etc & /var, bug #437008
3145 - keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d}
3146 - keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd
3147 - keepdir /etc/udev/{hwdb.d,rules.d}
3148 - keepdir /var/log/journal/remote
3149 -
3150 - # Symlink /etc/sysctl.conf for easy migration.
3151 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
3152 -
3153 - # If we install these symlinks, there is no way for the sysadmin to remove them
3154 - # permanently.
3155 - rm -f "${ED}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
3156 - rm -f "${ED}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die
3157 - rm -f "${ED}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
3158 - rm -f "${ED}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die
3159 - rm -fr "${ED}"/etc/systemd/system/network-online.target.wants || die
3160 - rm -fr "${ED}"/etc/systemd/system/sockets.target.wants || die
3161 - rm -fr "${ED}"/etc/systemd/system/sysinit.target.wants || die
3162 -
3163 - local udevdir=/lib/udev
3164 - use split-usr || udevdir=/usr/lib/udev
3165 -
3166 - rm -r "${ED}${udevdir}/hwdb.d" || die
3167 -
3168 - if use split-usr; then
3169 - # Avoid breaking boot/reboot
3170 - dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd
3171 - dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown
3172 - fi
3173 -}
3174 -
3175 -migrate_locale() {
3176 - local envd_locale_def="${EROOT}/etc/env.d/02locale"
3177 - local envd_locale=( "${EROOT}"/etc/env.d/??locale )
3178 - local locale_conf="${EROOT}/etc/locale.conf"
3179 -
3180 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
3181 - # If locale.conf does not exist...
3182 - if [[ -e ${envd_locale} ]]; then
3183 - # ...either copy env.d/??locale if there's one
3184 - ebegin "Moving ${envd_locale} to ${locale_conf}"
3185 - mv "${envd_locale}" "${locale_conf}"
3186 - eend ${?} || FAIL=1
3187 - else
3188 - # ...or create a dummy default
3189 - ebegin "Creating ${locale_conf}"
3190 - cat > "${locale_conf}" <<-EOF
3191 - # This file has been created by the sys-apps/systemd ebuild.
3192 - # See locale.conf(5) and localectl(1).
3193 -
3194 - # LANG=${LANG}
3195 - EOF
3196 - eend ${?} || FAIL=1
3197 - fi
3198 - fi
3199 -
3200 - if [[ ! -L ${envd_locale} ]]; then
3201 - # now, if env.d/??locale is not a symlink (to locale.conf)...
3202 - if [[ -e ${envd_locale} ]]; then
3203 - # ...warn the user that he has duplicate locale settings
3204 - ewarn
3205 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
3206 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
3207 - ewarn "and create the symlink with the following command:"
3208 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
3209 - ewarn
3210 - else
3211 - # ...or just create the symlink if there's nothing here
3212 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
3213 - ln -n -s ../locale.conf "${envd_locale_def}"
3214 - eend ${?} || FAIL=1
3215 - fi
3216 - fi
3217 -}
3218 -
3219 -pkg_postinst() {
3220 - newusergroup() {
3221 - enewgroup "$1"
3222 - enewuser "$1" -1 -1 -1 "$1"
3223 - }
3224 -
3225 - enewgroup input
3226 - enewgroup kvm 78
3227 - enewgroup render
3228 - enewgroup systemd-journal
3229 - newusergroup systemd-bus-proxy
3230 - newusergroup systemd-coredump
3231 - newusergroup systemd-journal-gateway
3232 - newusergroup systemd-journal-remote
3233 - newusergroup systemd-journal-upload
3234 - newusergroup systemd-network
3235 - newusergroup systemd-resolve
3236 - newusergroup systemd-timesync
3237 -
3238 - systemd_update_catalog
3239 -
3240 - # Keep this here in case the database format changes so it gets updated
3241 - # when required. Despite that this file is owned by sys-apps/hwids.
3242 - if has_version "sys-apps/hwids[udev]"; then
3243 - udevadm hwdb --update --root="${EROOT}"
3244 - fi
3245 -
3246 - udev_reload || FAIL=1
3247 -
3248 - # Bug 465468, make sure locales are respect, and ensure consistency
3249 - # between OpenRC & systemd
3250 - migrate_locale
3251 -
3252 - systemd_reenable systemd-networkd.service systemd-resolved.service
3253 -
3254 - if [[ -z ${ROOT} && -d /run/systemd/system ]]; then
3255 - ebegin "Reexecuting system manager"
3256 - systemctl daemon-reexec
3257 - eend $?
3258 - fi
3259 -
3260 - if [[ ${FAIL} ]]; then
3261 - eerror "One of the postinst commands failed. Please check the postinst output"
3262 - eerror "for errors. You may need to clean up your system and/or try installing"
3263 - eerror "systemd again."
3264 - eerror
3265 - fi
3266 -}
3267 -
3268 -pkg_prerm() {
3269 - # If removing systemd completely, remove the catalog database.
3270 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
3271 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
3272 - fi
3273 -}