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