1 |
commit: dd065a84d41ed86f157ecd9abefc0feb73258349 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 6 19:14:44 2020 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 6 19:14:44 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd065a84 |
7 |
|
8 |
sys-apps/systemd: bump to 245 |
9 |
|
10 |
Package-Manager: Portage-2.3.92_p3, Repoman-2.3.20_p118 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
sys-apps/systemd/Manifest | 3 +- |
14 |
.../{systemd-245_rc2.ebuild => systemd-245.ebuild} | 0 |
15 |
sys-apps/systemd/systemd-245_rc1-r2.ebuild | 512 --------------------- |
16 |
3 files changed, 1 insertion(+), 514 deletions(-) |
17 |
|
18 |
diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest |
19 |
index 1128f76364d..d88adc0fc83 100644 |
20 |
--- a/sys-apps/systemd/Manifest |
21 |
+++ b/sys-apps/systemd/Manifest |
22 |
@@ -1,5 +1,4 @@ |
23 |
DIST systemd-243.tar.gz 8242522 BLAKE2B 89e3ebbea5a99061329f7c78220a66c1e075d5ba90dfdf5ee8d0d9b762ef4600dc82d8ca2054632e5e343b6272cd8046c92f7f99dcfa8287c5ef2b42fb96d4cb SHA512 56b52a297aa5ac04d9667eb3afb1598725b197de73ff72baa1aabbc2844e36fba7b7fccdf6d214ae8b5b926616b2b7e15772763aaa80ec938d74333ff9c8673e |
24 |
DIST systemd-244.tar.gz 8445963 BLAKE2B 19751fb9c058a079694ee1b991259fd3f1fa30ae98ca38bbe8caadfc5628db7848c7f742a1b11781fbd67f911adda917d7a4da1dddb63064907f86f47e5a3256 SHA512 08f260fb15b5eb273faafda826dd9154e9a02841b4c5911cc1c7e1445072ad51389f8cced7b9acf112737c20fd56b2fbf48b3f914733c934c774d38a23b616fb |
25 |
-DIST systemd-245-rc1.tar.gz 8961356 BLAKE2B ed04166ead57c2f1cc1a1ca2f0041cae134b503d3448ea9fdd799e12d81f45721ee304d4aabd96d3eab8ea1321b283820e8d2a850b41733e40f07fd419f67b95 SHA512 2ef9a295f3897c6642a2fac2e3c73467ece9bc6fc196cc4f3707b9c23af2581eb9f74def78909d57513b67604bf1cf6dc5dbb31c6d435f7997677d09a73d006b |
26 |
-DIST systemd-245-rc2.tar.gz 8986493 BLAKE2B 7b5fdb3af94cbedf75e3c4d150797fe4a150102519766e5db3275df9d677ff0e4b69aef07f7bcd9e5efb52392be65c93f3fd3ba66c9b9a8de4e18b906545bddb SHA512 71d6a7c8db4845c95abe66aca041bf6df7d868a9f56be94a188c11647f723d33ea8611a8a84d0f2f71ceacafa4d41fa9c26df25c239c60e0121e762570b8a963 |
27 |
+DIST systemd-245.tar.gz 8993479 BLAKE2B be0b1fca5ba8585978f570868bc9135c1fee78ea64dcdf8b1a3419e856a83da90104ed2f86e5f3e5b0b6f29d4b34f603bfe1e4cbc61ccf71bedce547db62ff35 SHA512 1b80d0e02472dfc4197f11dab4f56cf90e8a6e105ce19f837cb11335b6d8577ed49031dad94cdb41aa9bdc06ec8eec62c8e9246272b83935e7bb9dcd3cd8c012 |
28 |
DIST systemd-stable-244.3.tar.gz 8484735 BLAKE2B 25125ecdae59c852e8ceb45b7ed0b76631b301ab4026c4e389c4bc12090fe41f5918411a75bd20f38b6b3993445df93c850ba98f8d9b30fd24fc4e25f8355a3d SHA512 f8e83fa3e57ac8fdbed61b66bb45fd0eafa6fb36eda26f10690d93f34b03daab6ce4e7eff45b79dcaf59f11f41c1b022d1d9314f576c50ad28f6bb5901f1b18d |
29 |
|
30 |
diff --git a/sys-apps/systemd/systemd-245_rc2.ebuild b/sys-apps/systemd/systemd-245.ebuild |
31 |
similarity index 100% |
32 |
rename from sys-apps/systemd/systemd-245_rc2.ebuild |
33 |
rename to sys-apps/systemd/systemd-245.ebuild |
34 |
|
35 |
diff --git a/sys-apps/systemd/systemd-245_rc1-r2.ebuild b/sys-apps/systemd/systemd-245_rc1-r2.ebuild |
36 |
deleted file mode 100644 |
37 |
index 3ab16fd6edd..00000000000 |
38 |
--- a/sys-apps/systemd/systemd-245_rc1-r2.ebuild |
39 |
+++ /dev/null |
40 |
@@ -1,512 +0,0 @@ |
41 |
-# Copyright 2011-2020 Gentoo Authors |
42 |
-# Distributed under the terms of the GNU General Public License v2 |
43 |
- |
44 |
-EAPI=7 |
45 |
- |
46 |
-if [[ ${PV} == 9999 ]]; then |
47 |
- EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
48 |
- inherit git-r3 |
49 |
-else |
50 |
- if [[ ${PV} == *.* ]]; then |
51 |
- MY_PN=systemd-stable |
52 |
- else |
53 |
- MY_PN=systemd |
54 |
- fi |
55 |
- MY_PV=${PV/_/-} |
56 |
- MY_P=${MY_PN}-${MY_PV} |
57 |
- S=${WORKDIR}/${MY_P} |
58 |
- SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" |
59 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" |
60 |
-fi |
61 |
- |
62 |
-PYTHON_COMPAT=( python3_{6,7,8} ) |
63 |
- |
64 |
-inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev usr-ldscript |
65 |
- |
66 |
-DESCRIPTION="System and service manager for Linux" |
67 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
68 |
- |
69 |
-LICENSE="GPL-2 LGPL-2.1 MIT public-domain" |
70 |
-SLOT="0/2" |
71 |
-IUSE="acl apparmor audit build cgroup-hybrid cryptsetup curl dns-over-tls elfutils +gcrypt gnuefi http idn importd +kmod +lz4 lzma nat pam pcre pkcs11 policykit pwquality qrcode +resolvconf +seccomp selinux split-usr static-libs +sysv-utils test vanilla xkb" |
72 |
- |
73 |
-REQUIRED_USE="importd? ( curl gcrypt lzma )" |
74 |
-RESTRICT="!test? ( test )" |
75 |
- |
76 |
-MINKV="3.11" |
77 |
- |
78 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] |
79 |
- sys-libs/libcap:0=[${MULTILIB_USEDEP}] |
80 |
- acl? ( sys-apps/acl:0= ) |
81 |
- apparmor? ( sys-libs/libapparmor:0= ) |
82 |
- audit? ( >=sys-process/audit-2:0= ) |
83 |
- cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= ) |
84 |
- curl? ( net-misc/curl:0= ) |
85 |
- dns-over-tls? ( >=net-libs/gnutls-3.5.3:0= ) |
86 |
- elfutils? ( >=dev-libs/elfutils-0.158:0= ) |
87 |
- gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) |
88 |
- http? ( |
89 |
- >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] |
90 |
- >=net-libs/gnutls-3.1.4:0= |
91 |
- ) |
92 |
- idn? ( net-dns/libidn2:= ) |
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? ( sys-libs/pam:=[${MULTILIB_USEDEP}] ) |
102 |
- pkcs11? ( app-crypt/p11-kit:0= ) |
103 |
- pcre? ( dev-libs/libpcre2 ) |
104 |
- pwquality? ( dev-libs/libpwquality:0= ) |
105 |
- qrcode? ( media-gfx/qrencode:0= ) |
106 |
- seccomp? ( >=sys-libs/libseccomp-2.3.3:0= ) |
107 |
- selinux? ( sys-libs/libselinux:0= ) |
108 |
- xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )" |
109 |
- |
110 |
-# Newer linux-headers needed by ia64, bug #480218 |
111 |
-DEPEND="${COMMON_DEPEND} |
112 |
- >=sys-kernel/linux-headers-${MINKV} |
113 |
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) |
114 |
-" |
115 |
- |
116 |
-# baselayout-2.2 has /run |
117 |
-RDEPEND="${COMMON_DEPEND} |
118 |
- acct-group/adm |
119 |
- acct-group/wheel |
120 |
- acct-group/kmem |
121 |
- acct-group/tty |
122 |
- acct-group/utmp |
123 |
- acct-group/audio |
124 |
- acct-group/cdrom |
125 |
- acct-group/dialout |
126 |
- acct-group/disk |
127 |
- acct-group/input |
128 |
- acct-group/kvm |
129 |
- acct-group/render |
130 |
- acct-group/tape |
131 |
- acct-group/video |
132 |
- acct-group/systemd-journal |
133 |
- acct-user/systemd-journal-remote |
134 |
- acct-user/systemd-coredump |
135 |
- acct-user/systemd-network |
136 |
- acct-user/systemd-resolve |
137 |
- acct-user/systemd-timesync |
138 |
- >=sys-apps/baselayout-2.2 |
139 |
- selinux? ( sec-policy/selinux-base-policy[systemd] ) |
140 |
- sysv-utils? ( !sys-apps/sysvinit ) |
141 |
- !sysv-utils? ( sys-apps/sysvinit ) |
142 |
- resolvconf? ( !net-dns/openresolv ) |
143 |
- !build? ( || ( |
144 |
- sys-apps/util-linux[kill(-)] |
145 |
- sys-process/procps[kill(+)] |
146 |
- sys-apps/coreutils[kill(-)] |
147 |
- ) ) |
148 |
- !sys-auth/nss-myhostname |
149 |
- !sys-fs/eudev |
150 |
- !sys-fs/udev |
151 |
-" |
152 |
- |
153 |
-# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) |
154 |
-PDEPEND=">=sys-apps/dbus-1.9.8[systemd] |
155 |
- >=sys-apps/hwids-20150417[udev] |
156 |
- >=sys-fs/udev-init-scripts-25 |
157 |
- policykit? ( sys-auth/polkit ) |
158 |
- !vanilla? ( sys-apps/gentoo-systemd-integration )" |
159 |
- |
160 |
-BDEPEND=" |
161 |
- app-arch/xz-utils:0 |
162 |
- dev-util/gperf |
163 |
- >=dev-util/meson-0.46 |
164 |
- >=dev-util/intltool-0.50 |
165 |
- >=sys-apps/coreutils-8.16 |
166 |
- sys-devel/m4 |
167 |
- virtual/pkgconfig[${MULTILIB_USEDEP}] |
168 |
- test? ( sys-apps/dbus ) |
169 |
- app-text/docbook-xml-dtd:4.2 |
170 |
- app-text/docbook-xml-dtd:4.5 |
171 |
- app-text/docbook-xsl-stylesheets |
172 |
- dev-libs/libxslt:0 |
173 |
- $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') |
174 |
-" |
175 |
- |
176 |
-python_check_deps() { |
177 |
- has_version -b "dev-python/lxml[${PYTHON_USEDEP}]" |
178 |
-} |
179 |
- |
180 |
-pkg_pretend() { |
181 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
182 |
- if use test && has pid-sandbox ${FEATURES}; then |
183 |
- ewarn "Tests are known to fail with PID sandboxing enabled." |
184 |
- ewarn "See https://bugs.gentoo.org/674458." |
185 |
- fi |
186 |
- |
187 |
- local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS |
188 |
- ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE |
189 |
- ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS |
190 |
- ~TIMERFD ~TMPFS_XATTR ~UNIX |
191 |
- ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH |
192 |
- ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED |
193 |
- ~!SYSFS_DEPRECATED_V2" |
194 |
- |
195 |
- use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" |
196 |
- use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" |
197 |
- kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" |
198 |
- kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" |
199 |
- kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF" |
200 |
- |
201 |
- if linux_config_exists; then |
202 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
203 |
- if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then |
204 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
205 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
206 |
- fi |
207 |
- if linux_chkconfig_present X86; then |
208 |
- CONFIG_CHECK+=" ~DMIID" |
209 |
- fi |
210 |
- fi |
211 |
- |
212 |
- if kernel_is -lt ${MINKV//./ }; then |
213 |
- ewarn "Kernel version at least ${MINKV} required" |
214 |
- fi |
215 |
- |
216 |
- check_extra_config |
217 |
- fi |
218 |
-} |
219 |
- |
220 |
-pkg_setup() { |
221 |
- : |
222 |
-} |
223 |
- |
224 |
-src_unpack() { |
225 |
- default |
226 |
- [[ ${PV} != 9999 ]] || git-r3_src_unpack |
227 |
-} |
228 |
- |
229 |
-src_prepare() { |
230 |
- # Do NOT add patches here |
231 |
- local PATCHES=() |
232 |
- |
233 |
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches ) |
234 |
- |
235 |
- # Add local patches here |
236 |
- PATCHES+=( |
237 |
- "${FILESDIR}"/245-rc1-network-debug.patch |
238 |
- "${FILESDIR}"/245-rc1-sysctl-segfault.patch |
239 |
- ) |
240 |
- |
241 |
- if ! use vanilla; then |
242 |
- PATCHES+=( |
243 |
- "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch" |
244 |
- "${FILESDIR}/gentoo-systemd-user-pam.patch" |
245 |
- "${FILESDIR}/gentoo-generator-path-r1.patch" |
246 |
- ) |
247 |
- fi |
248 |
- |
249 |
- default |
250 |
-} |
251 |
- |
252 |
-src_configure() { |
253 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
254 |
- tc-export AR CC NM OBJCOPY RANLIB |
255 |
- |
256 |
- python_setup |
257 |
- |
258 |
- multilib-minimal_src_configure |
259 |
-} |
260 |
- |
261 |
-meson_use() { |
262 |
- usex "$1" true false |
263 |
-} |
264 |
- |
265 |
-meson_multilib() { |
266 |
- if multilib_is_native_abi; then |
267 |
- echo true |
268 |
- else |
269 |
- echo false |
270 |
- fi |
271 |
-} |
272 |
- |
273 |
-meson_multilib_native_use() { |
274 |
- if multilib_is_native_abi && use "$1"; then |
275 |
- echo true |
276 |
- else |
277 |
- echo false |
278 |
- fi |
279 |
-} |
280 |
- |
281 |
-multilib_src_configure() { |
282 |
- local myconf=( |
283 |
- --localstatedir="${EPREFIX}/var" |
284 |
- -Dsupport-url="https://gentoo.org/support/" |
285 |
- -Dpamlibdir="$(getpam_mod_dir)" |
286 |
- # avoid bash-completion dep |
287 |
- -Dbashcompletiondir="$(get_bashcompdir)" |
288 |
- # make sure we get /bin:/sbin in PATH |
289 |
- -Dsplit-usr=$(usex split-usr true false) |
290 |
- -Dsplit-bin=true |
291 |
- -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" |
292 |
- -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" |
293 |
- -Dsysvinit-path= |
294 |
- -Dsysvrcnd-path= |
295 |
- # Avoid infinite exec recursion, bug 642724 |
296 |
- -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit" |
297 |
- # no deps |
298 |
- -Dima=true |
299 |
- -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified) |
300 |
- # Optional components/dependencies |
301 |
- -Dacl=$(meson_multilib_native_use acl) |
302 |
- -Dapparmor=$(meson_multilib_native_use apparmor) |
303 |
- -Daudit=$(meson_multilib_native_use audit) |
304 |
- -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup) |
305 |
- -Dlibcurl=$(meson_multilib_native_use curl) |
306 |
- -Ddns-over-tls=$(meson_multilib_native_use dns-over-tls) |
307 |
- -Delfutils=$(meson_multilib_native_use elfutils) |
308 |
- -Dgcrypt=$(meson_use gcrypt) |
309 |
- -Dgnu-efi=$(meson_multilib_native_use gnuefi) |
310 |
- -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" |
311 |
- -Dmicrohttpd=$(meson_multilib_native_use http) |
312 |
- -Didn=$(meson_multilib_native_use idn) |
313 |
- -Dimportd=$(meson_multilib_native_use importd) |
314 |
- -Dbzip2=$(meson_multilib_native_use importd) |
315 |
- -Dzlib=$(meson_multilib_native_use importd) |
316 |
- -Dkmod=$(meson_multilib_native_use kmod) |
317 |
- -Dlz4=$(meson_use lz4) |
318 |
- -Dxz=$(meson_use lzma) |
319 |
- -Dlibiptc=$(meson_multilib_native_use nat) |
320 |
- -Dpam=$(meson_use pam) |
321 |
- -Dp11kit=$(meson_multilib_native_use pkcs11) |
322 |
- -Dpcre2=$(meson_multilib_native_use pcre) |
323 |
- -Dpolkit=$(meson_multilib_native_use policykit) |
324 |
- -Dpwquality=$(meson_multilib_native_use pwquality) |
325 |
- -Dqrencode=$(meson_multilib_native_use qrcode) |
326 |
- -Dseccomp=$(meson_multilib_native_use seccomp) |
327 |
- -Dselinux=$(meson_multilib_native_use selinux) |
328 |
- -Ddbus=$(meson_multilib_native_use test) |
329 |
- -Dxkbcommon=$(meson_multilib_native_use xkb) |
330 |
- -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" |
331 |
- # Breaks screen, tmux, etc. |
332 |
- -Ddefault-kill-user-processes=false |
333 |
- -Dcreate-log-dirs=false |
334 |
- |
335 |
- # multilib options |
336 |
- -Dbacklight=$(meson_multilib) |
337 |
- -Dbinfmt=$(meson_multilib) |
338 |
- -Dcoredump=$(meson_multilib) |
339 |
- -Denvironment-d=$(meson_multilib) |
340 |
- -Dfirstboot=$(meson_multilib) |
341 |
- -Dhibernate=$(meson_multilib) |
342 |
- -Dhostnamed=$(meson_multilib) |
343 |
- -Dhwdb=$(meson_multilib) |
344 |
- -Dldconfig=$(meson_multilib) |
345 |
- -Dlocaled=$(meson_multilib) |
346 |
- -Dman=$(meson_multilib) |
347 |
- -Dnetworkd=$(meson_multilib) |
348 |
- -Dquotacheck=$(meson_multilib) |
349 |
- -Drandomseed=$(meson_multilib) |
350 |
- -Drfkill=$(meson_multilib) |
351 |
- -Dsysusers=$(meson_multilib) |
352 |
- -Dtimedated=$(meson_multilib) |
353 |
- -Dtimesyncd=$(meson_multilib) |
354 |
- -Dtmpfiles=$(meson_multilib) |
355 |
- -Dvconsole=$(meson_multilib) |
356 |
- |
357 |
- # static-libs |
358 |
- -Dstatic-libsystemd=$(usex static-libs true false) |
359 |
- -Dstatic-libudev=$(usex static-libs true false) |
360 |
- ) |
361 |
- |
362 |
- meson_src_configure "${myconf[@]}" |
363 |
-} |
364 |
- |
365 |
-multilib_src_compile() { |
366 |
- eninja |
367 |
-} |
368 |
- |
369 |
-multilib_src_test() { |
370 |
- unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR |
371 |
- meson_src_test |
372 |
-} |
373 |
- |
374 |
-multilib_src_install() { |
375 |
- DESTDIR="${D}" eninja install |
376 |
-} |
377 |
- |
378 |
-multilib_src_install_all() { |
379 |
- local rootprefix=$(usex split-usr '' /usr) |
380 |
- |
381 |
- # meson doesn't know about docdir |
382 |
- mv "${ED}"/usr/share/doc/{systemd,${PF}} || die |
383 |
- |
384 |
- einstalldocs |
385 |
- dodoc "${FILESDIR}"/nsswitch.conf |
386 |
- |
387 |
- if ! use resolvconf; then |
388 |
- rm -f "${ED}${rootprefix}"/sbin/resolvconf || die |
389 |
- fi |
390 |
- |
391 |
- if ! use sysv-utils; then |
392 |
- rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die |
393 |
- rm "${ED}"/usr/share/man/man1/init.1 || die |
394 |
- rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die |
395 |
- fi |
396 |
- |
397 |
- if ! use resolvconf && ! use sysv-utils; then |
398 |
- rmdir "${ED}${rootprefix}"/sbin || die |
399 |
- fi |
400 |
- |
401 |
- # Preserve empty dirs in /etc & /var, bug #437008 |
402 |
- keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} |
403 |
- keepdir /etc/kernel/install.d |
404 |
- keepdir /etc/systemd/{network,system,user} |
405 |
- keepdir /etc/udev/{hwdb.d,rules.d} |
406 |
- keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} |
407 |
- keepdir /usr/lib/{binfmt.d,modules-load.d} |
408 |
- keepdir /usr/lib/systemd/user-generators |
409 |
- keepdir /var/lib/systemd |
410 |
- keepdir /var/log/journal |
411 |
- |
412 |
- # Symlink /etc/sysctl.conf for easy migration. |
413 |
- dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf |
414 |
- |
415 |
- rm -r "${ED}${rootprefix}"/lib/udev/hwdb.d || die |
416 |
- |
417 |
- if use split-usr; then |
418 |
- # Avoid breaking boot/reboot |
419 |
- dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd |
420 |
- dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown |
421 |
- fi |
422 |
- |
423 |
- gen_usr_ldscript -a systemd udev |
424 |
-} |
425 |
- |
426 |
-migrate_locale() { |
427 |
- local envd_locale_def="${EROOT}/etc/env.d/02locale" |
428 |
- local envd_locale=( "${EROOT}"/etc/env.d/??locale ) |
429 |
- local locale_conf="${EROOT}/etc/locale.conf" |
430 |
- |
431 |
- if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
432 |
- # If locale.conf does not exist... |
433 |
- if [[ -e ${envd_locale} ]]; then |
434 |
- # ...either copy env.d/??locale if there's one |
435 |
- ebegin "Moving ${envd_locale} to ${locale_conf}" |
436 |
- mv "${envd_locale}" "${locale_conf}" |
437 |
- eend ${?} || FAIL=1 |
438 |
- else |
439 |
- # ...or create a dummy default |
440 |
- ebegin "Creating ${locale_conf}" |
441 |
- cat > "${locale_conf}" <<-EOF |
442 |
- # This file has been created by the sys-apps/systemd ebuild. |
443 |
- # See locale.conf(5) and localectl(1). |
444 |
- |
445 |
- # LANG=${LANG} |
446 |
- EOF |
447 |
- eend ${?} || FAIL=1 |
448 |
- fi |
449 |
- fi |
450 |
- |
451 |
- if [[ ! -L ${envd_locale} ]]; then |
452 |
- # now, if env.d/??locale is not a symlink (to locale.conf)... |
453 |
- if [[ -e ${envd_locale} ]]; then |
454 |
- # ...warn the user that he has duplicate locale settings |
455 |
- ewarn |
456 |
- ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
457 |
- ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
458 |
- ewarn "and create the symlink with the following command:" |
459 |
- ewarn "ln -s -n -f ../locale.conf ${envd_locale}" |
460 |
- ewarn |
461 |
- else |
462 |
- # ...or just create the symlink if there's nothing here |
463 |
- ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" |
464 |
- ln -n -s ../locale.conf "${envd_locale_def}" |
465 |
- eend ${?} || FAIL=1 |
466 |
- fi |
467 |
- fi |
468 |
-} |
469 |
- |
470 |
-save_enabled_units() { |
471 |
- ENABLED_UNITS=() |
472 |
- type systemctl &>/dev/null || return |
473 |
- for x; do |
474 |
- if systemctl --quiet --root="${ROOT:-/}" is-enabled "${x}"; then |
475 |
- ENABLED_UNITS+=( "${x}" ) |
476 |
- fi |
477 |
- done |
478 |
-} |
479 |
- |
480 |
-pkg_preinst() { |
481 |
- save_enabled_units {machines,remote-{cryptsetup,fs}}.target getty@××××.service |
482 |
- |
483 |
- if ! use split-usr; then |
484 |
- local dir |
485 |
- for dir in bin sbin lib; do |
486 |
- if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then |
487 |
- eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged." |
488 |
- eerror "One of them should be a symbolic link to the other one." |
489 |
- FAIL=1 |
490 |
- fi |
491 |
- done |
492 |
- if [[ ${FAIL} ]]; then |
493 |
- eerror "Migration to system layout with merged directories must be performed before" |
494 |
- eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage." |
495 |
- die "System layout with split directories still used" |
496 |
- fi |
497 |
- fi |
498 |
-} |
499 |
- |
500 |
-pkg_postinst() { |
501 |
- systemd_update_catalog |
502 |
- |
503 |
- # Keep this here in case the database format changes so it gets updated |
504 |
- # when required. Despite that this file is owned by sys-apps/hwids. |
505 |
- if has_version "sys-apps/hwids[udev]"; then |
506 |
- udevadm hwdb --update --root="${EROOT}" |
507 |
- fi |
508 |
- |
509 |
- udev_reload || FAIL=1 |
510 |
- |
511 |
- # Bug 465468, make sure locales are respect, and ensure consistency |
512 |
- # between OpenRC & systemd |
513 |
- migrate_locale |
514 |
- |
515 |
- systemd_reenable systemd-networkd.service systemd-resolved.service |
516 |
- |
517 |
- if [[ ${ENABLED_UNITS[@]} ]]; then |
518 |
- systemctl --root="${ROOT:-/}" enable "${ENABLED_UNITS[@]}" |
519 |
- fi |
520 |
- |
521 |
- if [[ -z ${REPLACING_VERSIONS} ]]; then |
522 |
- if type systemctl &>/dev/null; then |
523 |
- systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1 |
524 |
- fi |
525 |
- elog "To enable a useful set of services, run the following:" |
526 |
- elog " systemctl preset-all --preset-mode=enable-only" |
527 |
- fi |
528 |
- |
529 |
- if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then |
530 |
- rm "${EROOT}/var/lib/systemd/timesync" |
531 |
- fi |
532 |
- |
533 |
- if [[ -z ${ROOT} && -d /run/systemd/system ]]; then |
534 |
- ebegin "Reexecuting system manager" |
535 |
- systemctl daemon-reexec |
536 |
- eend $? |
537 |
- fi |
538 |
- |
539 |
- if [[ ${FAIL} ]]; then |
540 |
- eerror "One of the postinst commands failed. Please check the postinst output" |
541 |
- eerror "for errors. You may need to clean up your system and/or try installing" |
542 |
- eerror "systemd again." |
543 |
- eerror |
544 |
- fi |
545 |
-} |
546 |
- |
547 |
-pkg_prerm() { |
548 |
- # If removing systemd completely, remove the catalog database. |
549 |
- if [[ ! ${REPLACED_BY_VERSION} ]]; then |
550 |
- rm -f -v "${EROOT}"/var/lib/systemd/catalog/database |
551 |
- fi |
552 |
-} |