1 |
commit: 05b6a3485ab294121f9065ee46392d2ebc123b09 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 24 14:48:54 2019 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 24 14:48:54 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05b6a348 |
7 |
|
8 |
sys-apps/systemd: remove old |
9 |
|
10 |
Package-Manager: Portage-2.3.56_p3, Repoman-2.3.12_p50 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
sys-apps/systemd/Manifest | 1 - |
14 |
sys-apps/systemd/systemd-240-r2.ebuild | 457 --------------------------------- |
15 |
2 files changed, 458 deletions(-) |
16 |
|
17 |
diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest |
18 |
index 690f6b032b0..56b3ef36d14 100644 |
19 |
--- a/sys-apps/systemd/Manifest |
20 |
+++ b/sys-apps/systemd/Manifest |
21 |
@@ -1,7 +1,6 @@ |
22 |
DIST systemd-239-patches-1.tar.gz 20639 BLAKE2B 9b03367becdef20d16056cdbbeaaefd9f10bf6c56528ad1a738684ab08d99a464411c23aea32d47307b0399f092107069d09ad42fb07217f8eca520cc4010b84 SHA512 757c7fc8f60ccf99d2803128a8c4d8b924093b150384569c5ffb3bc39f06728e99b18e2f77ff0f1c16bbd45bc75cbb0f385dac0135443d70c7dcd9cc1e84a490 |
23 |
DIST systemd-239-patches-2.tar.gz 33416 BLAKE2B 9602d101cbac65d3b2490f28308e843c28fcaea848dd09005abef0da0bc79ba0766a1cbe7c3cac63f796accddf0295b4eb946e601a201f7e81a48bd1720051ca SHA512 5f5a764d317c43c6b1854171a753eafaca006e12e4f91c81e6ba1d50e80bbbaca23c900fba417264bf9f0d827a73aca71a6da8f2a2043aaaefefed62f5a92b23 |
24 |
DIST systemd-239.tar.gz 7157293 BLAKE2B 975f6215c8bb6662d6e161f637e1fece22930c0190b3c31a8fc4cb1a10600546a252704ac95590d9d14e495fcd06082a590e6d755e36603a41b3a396d579d8b0 SHA512 fd44590dfd148504c5ed1e67521efce50d84b627b7fc77015fa95dfa76d7a42297c56cc89eff40181809732024b16d48f2a87038cf435e0c63bc2b95ecd86b0f |
25 |
-DIST systemd-240-patches-1.tar.gz 15364 BLAKE2B e5cf4c2b8666a5c03e658f46674422d2566a748d3dc088f3cda0f5c5e7b51aec00a531ef7e9d047fd59504299d2e8a44faa353da1183260ae72156bb486d51f7 SHA512 1541810dbcfcc75c4323015c056c963ef69d633761293dea7f27aa6106e3ccc59a84263c703fc5542cf2fb3410c846e97ffb11ecc7d56a98ca658b43b73b6313 |
26 |
DIST systemd-240-patches-2.tar.gz 28099 BLAKE2B 2e497ed729e2482ef3cc0d010504314f2982a9af19341d6f4efa06b24b3c01f9f69996d43e5b484c641777d00a8a0ba4508bcf6a0296a63d4fc57440f2d3708c SHA512 1be0432d918a4866056ffc65de6e8b412784e5018490c0349a98bba801536d2689c5b2ce41ddd5adbb945aac71bfd0168f94c1daf0788661cd83b159a8c975b8 |
27 |
DIST systemd-240-patches-3.tar.gz 31952 BLAKE2B 0677d24c4f4e1575dbd4953eb75734f0773671e4ffc2a8d848353a379f5ea2caf4f96620ed6303d98ec00a15367d5e2124b493aaef80b1a0fe118866a1c04ada SHA512 e604e1de17bcd4c941036f12d2e3ae96dd6e86647db2b07576e8468405900b6e8af6a0e55a50c7e9b19704601930b8152c8ac506b2624e261ee0cd35dfc91a21 |
28 |
DIST systemd-240.tar.gz 7582001 BLAKE2B cf53595a83424984dd9f533f7cd0c9905366c5a52ab946fc45ff7fd1bcc85978ff654720113641534e40c0f9a1ad1c9628255778616770762950426789f659c3 SHA512 da7467781b16f65d868931ae88fd07554db61542aec7f11dbec9f7279b529f900301edfea2d3813ddb64eeb3fdcfb7be86e540c65212dd7cfdcdebbc80de2ff5 |
29 |
|
30 |
diff --git a/sys-apps/systemd/systemd-240-r2.ebuild b/sys-apps/systemd/systemd-240-r2.ebuild |
31 |
deleted file mode 100644 |
32 |
index 6fa2f40e16b..00000000000 |
33 |
--- a/sys-apps/systemd/systemd-240-r2.ebuild |
34 |
+++ /dev/null |
35 |
@@ -1,457 +0,0 @@ |
36 |
-# Copyright 1999-2019 Gentoo Authors |
37 |
-# Distributed under the terms of the GNU General Public License v2 |
38 |
- |
39 |
-EAPI=7 |
40 |
- |
41 |
-if [[ ${PV} == 9999 ]]; then |
42 |
- EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
43 |
- inherit git-r3 |
44 |
-else |
45 |
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}/${P}.tar.gz |
46 |
- https://dev.gentoo.org/~floppym/dist/${P}-patches-1.tar.gz" |
47 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" |
48 |
-fi |
49 |
- |
50 |
-PYTHON_COMPAT=( python{3_5,3_6,3_7} ) |
51 |
- |
52 |
-inherit bash-completion-r1 linux-info meson multilib-minimal ninja-utils pam python-any-r1 systemd toolchain-funcs udev user |
53 |
- |
54 |
-DESCRIPTION="System and service manager for Linux" |
55 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
56 |
- |
57 |
-LICENSE="GPL-2 LGPL-2.1 MIT public-domain" |
58 |
-SLOT="0/2" |
59 |
-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" |
60 |
- |
61 |
-REQUIRED_USE="importd? ( curl gcrypt lzma )" |
62 |
-RESTRICT="!test? ( test )" |
63 |
- |
64 |
-MINKV="3.11" |
65 |
- |
66 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] |
67 |
- sys-libs/libcap:0=[${MULTILIB_USEDEP}] |
68 |
- !<sys-libs/glibc-2.16 |
69 |
- acl? ( sys-apps/acl:0= ) |
70 |
- apparmor? ( sys-libs/libapparmor:0= ) |
71 |
- audit? ( >=sys-process/audit-2:0= ) |
72 |
- cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= ) |
73 |
- curl? ( net-misc/curl:0= ) |
74 |
- elfutils? ( >=dev-libs/elfutils-0.158:0= ) |
75 |
- gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) |
76 |
- http? ( |
77 |
- >=net-libs/libmicrohttpd-0.9.33:0= |
78 |
- ssl? ( >=net-libs/gnutls-3.1.4:0= ) |
79 |
- ) |
80 |
- idn? ( |
81 |
- libidn2? ( net-dns/libidn2:= ) |
82 |
- !libidn2? ( net-dns/libidn:= ) |
83 |
- ) |
84 |
- importd? ( |
85 |
- app-arch/bzip2:0= |
86 |
- sys-libs/zlib:0= |
87 |
- ) |
88 |
- kmod? ( >=sys-apps/kmod-15:0= ) |
89 |
- lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) |
90 |
- lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) |
91 |
- nat? ( net-firewall/iptables:0= ) |
92 |
- pam? ( virtual/pam:=[${MULTILIB_USEDEP}] ) |
93 |
- pcre? ( dev-libs/libpcre2 ) |
94 |
- qrcode? ( media-gfx/qrencode:0= ) |
95 |
- seccomp? ( >=sys-libs/libseccomp-2.3.3:0= ) |
96 |
- selinux? ( sys-libs/libselinux:0= ) |
97 |
- xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )" |
98 |
- |
99 |
-# baselayout-2.2 has /run |
100 |
-RDEPEND="${COMMON_DEPEND} |
101 |
- >=sys-apps/baselayout-2.2 |
102 |
- selinux? ( sec-policy/selinux-base-policy[systemd] ) |
103 |
- sysv-utils? ( !sys-apps/sysvinit ) |
104 |
- !sysv-utils? ( sys-apps/sysvinit ) |
105 |
- resolvconf? ( !net-dns/openresolv ) |
106 |
- !build? ( || ( |
107 |
- sys-apps/util-linux[kill(-)] |
108 |
- sys-process/procps[kill(+)] |
109 |
- sys-apps/coreutils[kill(-)] |
110 |
- ) ) |
111 |
- !sys-auth/nss-myhostname |
112 |
- !<sys-kernel/dracut-044 |
113 |
- !sys-fs/eudev |
114 |
- !sys-fs/udev" |
115 |
- |
116 |
-# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) |
117 |
-PDEPEND=">=sys-apps/dbus-1.9.8[systemd] |
118 |
- >=sys-apps/hwids-20150417[udev] |
119 |
- >=sys-fs/udev-init-scripts-25 |
120 |
- policykit? ( sys-auth/polkit ) |
121 |
- !vanilla? ( sys-apps/gentoo-systemd-integration )" |
122 |
- |
123 |
-# Newer linux-headers needed by ia64, bug #480218 |
124 |
-DEPEND=" |
125 |
- >=sys-kernel/linux-headers-${MINKV} |
126 |
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) |
127 |
-" |
128 |
- |
129 |
-BDEPEND=" |
130 |
- app-arch/xz-utils:0 |
131 |
- dev-util/gperf |
132 |
- >=dev-util/meson-0.46 |
133 |
- >=dev-util/intltool-0.50 |
134 |
- >=sys-apps/coreutils-8.16 |
135 |
- virtual/pkgconfig[${MULTILIB_USEDEP}] |
136 |
- test? ( sys-apps/dbus ) |
137 |
- app-text/docbook-xml-dtd:4.2 |
138 |
- app-text/docbook-xml-dtd:4.5 |
139 |
- app-text/docbook-xsl-stylesheets |
140 |
- dev-libs/libxslt:0 |
141 |
- $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') |
142 |
-" |
143 |
- |
144 |
-pkg_pretend() { |
145 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
146 |
- local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS |
147 |
- ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE |
148 |
- ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS |
149 |
- ~TIMERFD ~TMPFS_XATTR ~UNIX |
150 |
- ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH |
151 |
- ~!FW_LOADER_USER_HELPER_FALLBACK ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED |
152 |
- ~!SYSFS_DEPRECATED_V2" |
153 |
- |
154 |
- use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" |
155 |
- use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" |
156 |
- kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" |
157 |
- kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" |
158 |
- kernel_is -ge 4 10 && CONFIG_CHECK+=" ~CGROUP_BPF" |
159 |
- |
160 |
- if linux_config_exists; then |
161 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
162 |
- if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then |
163 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
164 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
165 |
- fi |
166 |
- if linux_chkconfig_present X86; then |
167 |
- CONFIG_CHECK+=" ~DMIID" |
168 |
- fi |
169 |
- fi |
170 |
- |
171 |
- if kernel_is -lt ${MINKV//./ }; then |
172 |
- ewarn "Kernel version at least ${MINKV} required" |
173 |
- fi |
174 |
- |
175 |
- check_extra_config |
176 |
- fi |
177 |
-} |
178 |
- |
179 |
-pkg_setup() { |
180 |
- : |
181 |
-} |
182 |
- |
183 |
-src_unpack() { |
184 |
- default |
185 |
- [[ ${PV} != 9999 ]] || git-r3_src_unpack |
186 |
-} |
187 |
- |
188 |
-src_prepare() { |
189 |
- # Do NOT add patches here |
190 |
- local PATCHES=() |
191 |
- |
192 |
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches ) |
193 |
- |
194 |
- # Add local patches here |
195 |
- PATCHES+=( |
196 |
- ) |
197 |
- |
198 |
- if ! use vanilla; then |
199 |
- PATCHES+=( |
200 |
- "${FILESDIR}/gentoo-Dont-enable-audit-by-default.patch" |
201 |
- "${FILESDIR}/gentoo-systemd-user-pam.patch" |
202 |
- "${FILESDIR}/gentoo-uucp-group-r1.patch" |
203 |
- "${FILESDIR}/gentoo-generator-path-r1.patch" |
204 |
- ) |
205 |
- fi |
206 |
- |
207 |
- default |
208 |
-} |
209 |
- |
210 |
-src_configure() { |
211 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
212 |
- tc-export AR CC NM OBJCOPY RANLIB |
213 |
- |
214 |
- python_setup |
215 |
- |
216 |
- multilib-minimal_src_configure |
217 |
-} |
218 |
- |
219 |
-meson_use() { |
220 |
- usex "$1" true false |
221 |
-} |
222 |
- |
223 |
-meson_multilib() { |
224 |
- if multilib_is_native_abi; then |
225 |
- echo true |
226 |
- else |
227 |
- echo false |
228 |
- fi |
229 |
-} |
230 |
- |
231 |
-meson_multilib_native_use() { |
232 |
- if multilib_is_native_abi && use "$1"; then |
233 |
- echo true |
234 |
- else |
235 |
- echo false |
236 |
- fi |
237 |
-} |
238 |
- |
239 |
-multilib_src_configure() { |
240 |
- local myconf=( |
241 |
- --localstatedir="${EPREFIX}/var" |
242 |
- -Dpamlibdir="$(getpam_mod_dir)" |
243 |
- # avoid bash-completion dep |
244 |
- -Dbashcompletiondir="$(get_bashcompdir)" |
245 |
- # make sure we get /bin:/sbin in PATH |
246 |
- -Dsplit-usr=$(usex split-usr true false) |
247 |
- -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" |
248 |
- -Dsysvinit-path= |
249 |
- -Dsysvrcnd-path= |
250 |
- # Avoid infinite exec recursion, bug 642724 |
251 |
- -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit" |
252 |
- # no deps |
253 |
- -Defi=$(meson_multilib) |
254 |
- -Dima=true |
255 |
- # Optional components/dependencies |
256 |
- -Dacl=$(meson_multilib_native_use acl) |
257 |
- -Dapparmor=$(meson_multilib_native_use apparmor) |
258 |
- -Daudit=$(meson_multilib_native_use audit) |
259 |
- -Dlibcryptsetup=$(meson_multilib_native_use cryptsetup) |
260 |
- -Dlibcurl=$(meson_multilib_native_use curl) |
261 |
- -Delfutils=$(meson_multilib_native_use elfutils) |
262 |
- -Dgcrypt=$(meson_use gcrypt) |
263 |
- -Dgnu-efi=$(meson_multilib_native_use gnuefi) |
264 |
- -Defi-libdir="${EPREFIX}/usr/$(get_libdir)" |
265 |
- -Dmicrohttpd=$(meson_multilib_native_use http) |
266 |
- $(usex http -Dgnutls=$(meson_multilib_native_use ssl) -Dgnutls=false) |
267 |
- -Dimportd=$(meson_multilib_native_use importd) |
268 |
- -Dbzip2=$(meson_multilib_native_use importd) |
269 |
- -Dzlib=$(meson_multilib_native_use importd) |
270 |
- -Dkmod=$(meson_multilib_native_use kmod) |
271 |
- -Dlz4=$(meson_use lz4) |
272 |
- -Dxz=$(meson_use lzma) |
273 |
- -Dlibiptc=$(meson_multilib_native_use nat) |
274 |
- -Dpam=$(meson_use pam) |
275 |
- -Dpcre2=$(meson_multilib_native_use pcre) |
276 |
- -Dpolkit=$(meson_multilib_native_use policykit) |
277 |
- -Dqrencode=$(meson_multilib_native_use qrcode) |
278 |
- -Dseccomp=$(meson_multilib_native_use seccomp) |
279 |
- -Dselinux=$(meson_multilib_native_use selinux) |
280 |
- #-Dtests=$(meson_multilib_native_use test) |
281 |
- -Ddbus=$(meson_multilib_native_use test) |
282 |
- -Dxkbcommon=$(meson_multilib_native_use xkb) |
283 |
- # hardcode a few paths to spare some deps |
284 |
- -Dkill-path=/bin/kill |
285 |
- -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" |
286 |
- # Breaks screen, tmux, etc. |
287 |
- -Ddefault-kill-user-processes=false |
288 |
- |
289 |
- # multilib options |
290 |
- -Dbacklight=$(meson_multilib) |
291 |
- -Dbinfmt=$(meson_multilib) |
292 |
- -Dcoredump=$(meson_multilib) |
293 |
- -Denvironment-d=$(meson_multilib) |
294 |
- -Dfirstboot=$(meson_multilib) |
295 |
- -Dhibernate=$(meson_multilib) |
296 |
- -Dhostnamed=$(meson_multilib) |
297 |
- -Dhwdb=$(meson_multilib) |
298 |
- -Dldconfig=$(meson_multilib) |
299 |
- -Dlocaled=$(meson_multilib) |
300 |
- -Dman=$(meson_multilib) |
301 |
- -Dnetworkd=$(meson_multilib) |
302 |
- -Dquotacheck=$(meson_multilib) |
303 |
- -Drandomseed=$(meson_multilib) |
304 |
- -Drfkill=$(meson_multilib) |
305 |
- -Dsysusers=$(meson_multilib) |
306 |
- -Dtimedated=$(meson_multilib) |
307 |
- -Dtimesyncd=$(meson_multilib) |
308 |
- -Dtmpfiles=$(meson_multilib) |
309 |
- -Dvconsole=$(meson_multilib) |
310 |
- ) |
311 |
- |
312 |
- if multilib_is_native_abi && use idn; then |
313 |
- myconf+=( |
314 |
- -Dlibidn2=$(usex libidn2 true false) |
315 |
- -Dlibidn=$(usex libidn2 false true) |
316 |
- ) |
317 |
- else |
318 |
- myconf+=( |
319 |
- -Dlibidn2=false |
320 |
- -Dlibidn=false |
321 |
- ) |
322 |
- fi |
323 |
- |
324 |
- meson_src_configure "${myconf[@]}" |
325 |
-} |
326 |
- |
327 |
-multilib_src_compile() { |
328 |
- eninja |
329 |
-} |
330 |
- |
331 |
-multilib_src_test() { |
332 |
- unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR |
333 |
- eninja test |
334 |
-} |
335 |
- |
336 |
-multilib_src_install() { |
337 |
- DESTDIR="${D}" eninja install |
338 |
-} |
339 |
- |
340 |
-multilib_src_install_all() { |
341 |
- local rootprefix=$(usex split-usr '' /usr) |
342 |
- |
343 |
- # meson doesn't know about docdir |
344 |
- mv "${ED}"/usr/share/doc/{systemd,${PF}} || die |
345 |
- |
346 |
- einstalldocs |
347 |
- dodoc "${FILESDIR}"/nsswitch.conf |
348 |
- |
349 |
- if ! use resolvconf; then |
350 |
- rm -f "${ED}${rootprefix}"/sbin/resolvconf || die |
351 |
- fi |
352 |
- |
353 |
- if ! use sysv-utils; then |
354 |
- rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die |
355 |
- rm "${ED}"/usr/share/man/man1/init.1 || die |
356 |
- rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die |
357 |
- fi |
358 |
- |
359 |
- if ! use resolvconf && ! use sysv-utils; then |
360 |
- rmdir "${ED}${rootprefix}"/sbin || die |
361 |
- fi |
362 |
- |
363 |
- # Preserve empty dirs in /etc & /var, bug #437008 |
364 |
- keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} |
365 |
- keepdir /etc/systemd/{ntp-units.d,user} /var/lib/systemd |
366 |
- keepdir /etc/udev/{hwdb.d,rules.d} |
367 |
- keepdir /var/log/journal/remote |
368 |
- |
369 |
- # Symlink /etc/sysctl.conf for easy migration. |
370 |
- dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf |
371 |
- |
372 |
- # If we install these symlinks, there is no way for the sysadmin to remove them |
373 |
- # permanently. |
374 |
- rm -f "${ED}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die |
375 |
- rm -f "${ED}"/etc/systemd/system/dbus-org.freedesktop.network1.service || die |
376 |
- rm -f "${ED}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die |
377 |
- rm -f "${ED}"/etc/systemd/system/dbus-org.freedesktop.resolve1.service || die |
378 |
- rm -fr "${ED}"/etc/systemd/system/network-online.target.wants || die |
379 |
- rm -fr "${ED}"/etc/systemd/system/sockets.target.wants || die |
380 |
- rm -fr "${ED}"/etc/systemd/system/sysinit.target.wants || die |
381 |
- |
382 |
- local udevdir=/lib/udev |
383 |
- use split-usr || udevdir=/usr/lib/udev |
384 |
- |
385 |
- rm -r "${ED}${udevdir}/hwdb.d" || die |
386 |
- |
387 |
- if use split-usr; then |
388 |
- # Avoid breaking boot/reboot |
389 |
- dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd |
390 |
- dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown |
391 |
- fi |
392 |
-} |
393 |
- |
394 |
-migrate_locale() { |
395 |
- local envd_locale_def="${EROOT}/etc/env.d/02locale" |
396 |
- local envd_locale=( "${EROOT}"/etc/env.d/??locale ) |
397 |
- local locale_conf="${EROOT}/etc/locale.conf" |
398 |
- |
399 |
- if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
400 |
- # If locale.conf does not exist... |
401 |
- if [[ -e ${envd_locale} ]]; then |
402 |
- # ...either copy env.d/??locale if there's one |
403 |
- ebegin "Moving ${envd_locale} to ${locale_conf}" |
404 |
- mv "${envd_locale}" "${locale_conf}" |
405 |
- eend ${?} || FAIL=1 |
406 |
- else |
407 |
- # ...or create a dummy default |
408 |
- ebegin "Creating ${locale_conf}" |
409 |
- cat > "${locale_conf}" <<-EOF |
410 |
- # This file has been created by the sys-apps/systemd ebuild. |
411 |
- # See locale.conf(5) and localectl(1). |
412 |
- |
413 |
- # LANG=${LANG} |
414 |
- EOF |
415 |
- eend ${?} || FAIL=1 |
416 |
- fi |
417 |
- fi |
418 |
- |
419 |
- if [[ ! -L ${envd_locale} ]]; then |
420 |
- # now, if env.d/??locale is not a symlink (to locale.conf)... |
421 |
- if [[ -e ${envd_locale} ]]; then |
422 |
- # ...warn the user that he has duplicate locale settings |
423 |
- ewarn |
424 |
- ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
425 |
- ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
426 |
- ewarn "and create the symlink with the following command:" |
427 |
- ewarn "ln -s -n -f ../locale.conf ${envd_locale}" |
428 |
- ewarn |
429 |
- else |
430 |
- # ...or just create the symlink if there's nothing here |
431 |
- ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" |
432 |
- ln -n -s ../locale.conf "${envd_locale_def}" |
433 |
- eend ${?} || FAIL=1 |
434 |
- fi |
435 |
- fi |
436 |
-} |
437 |
- |
438 |
-pkg_postinst() { |
439 |
- newusergroup() { |
440 |
- enewgroup "$1" |
441 |
- enewuser "$1" -1 -1 -1 "$1" |
442 |
- } |
443 |
- |
444 |
- enewgroup input |
445 |
- enewgroup kvm 78 |
446 |
- enewgroup render |
447 |
- enewgroup systemd-journal |
448 |
- newusergroup systemd-bus-proxy |
449 |
- newusergroup systemd-coredump |
450 |
- newusergroup systemd-journal-gateway |
451 |
- newusergroup systemd-journal-remote |
452 |
- newusergroup systemd-journal-upload |
453 |
- newusergroup systemd-network |
454 |
- newusergroup systemd-resolve |
455 |
- newusergroup systemd-timesync |
456 |
- |
457 |
- systemd_update_catalog |
458 |
- |
459 |
- # Keep this here in case the database format changes so it gets updated |
460 |
- # when required. Despite that this file is owned by sys-apps/hwids. |
461 |
- if has_version "sys-apps/hwids[udev]"; then |
462 |
- udevadm hwdb --update --root="${EROOT}" |
463 |
- fi |
464 |
- |
465 |
- udev_reload || FAIL=1 |
466 |
- |
467 |
- # Bug 465468, make sure locales are respect, and ensure consistency |
468 |
- # between OpenRC & systemd |
469 |
- migrate_locale |
470 |
- |
471 |
- systemd_reenable systemd-networkd.service systemd-resolved.service |
472 |
- |
473 |
- if [[ -z ${ROOT} && -d /run/systemd/system ]]; then |
474 |
- ebegin "Reexecuting system manager" |
475 |
- systemctl daemon-reexec |
476 |
- eend $? |
477 |
- fi |
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 |
-} |