1 |
commit: 5c77e68530064ad17be49e01aa8a84a1792a9b20 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 30 14:56:03 2016 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 30 14:56:03 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c77e685 |
7 |
|
8 |
sys-apps/systemd: drop 229-r100 |
9 |
|
10 |
profiles/package.mask | 5 - |
11 |
sys-apps/systemd/systemd-229-r100.ebuild | 485 ------------------------------- |
12 |
2 files changed, 490 deletions(-) |
13 |
|
14 |
diff --git a/profiles/package.mask b/profiles/package.mask |
15 |
index dd41543..bbddb2a 100644 |
16 |
--- a/profiles/package.mask |
17 |
+++ b/profiles/package.mask |
18 |
@@ -267,11 +267,6 @@ dev-ruby/extlib |
19 |
dev-vcs/statsvn |
20 |
dev-vcs/statcvs |
21 |
|
22 |
-# Mike Gilbert <floppym@g.o> (12 Mar 2016) |
23 |
-# Drops libsystemd-{daemon,id128,journal,login}.pc. |
24 |
-# Bug: https://bugs.gentoo.org/577158 |
25 |
-=sys-apps/systemd-229-r100 |
26 |
- |
27 |
# Ian Stakenvicius <axs@g.o> (06 Mar 2016) |
28 |
# Mask old versions of thunderbird as they are no longer supported, |
29 |
# but we keep them in the repo for now in case there is a need |
30 |
|
31 |
diff --git a/sys-apps/systemd/systemd-229-r100.ebuild b/sys-apps/systemd/systemd-229-r100.ebuild |
32 |
deleted file mode 100644 |
33 |
index dc20846..0000000 |
34 |
--- a/sys-apps/systemd/systemd-229-r100.ebuild |
35 |
+++ /dev/null |
36 |
@@ -1,485 +0,0 @@ |
37 |
-# Copyright 1999-2016 Gentoo Foundation |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
-# $Id$ |
40 |
- |
41 |
-EAPI=6 |
42 |
- |
43 |
-if [[ ${PV} == 9999 ]]; then |
44 |
- EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
45 |
- inherit git-r3 |
46 |
-else |
47 |
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz |
48 |
- https://dev.gentoo.org/~floppym/dist/${P}-patches.tar.gz" |
49 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
50 |
-fi |
51 |
- |
52 |
-inherit autotools bash-completion-r1 linux-info \ |
53 |
- multilib-minimal pam systemd toolchain-funcs udev user |
54 |
- |
55 |
-DESCRIPTION="System and service manager for Linux" |
56 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
57 |
- |
58 |
-LICENSE="GPL-2 LGPL-2.1 MIT public-domain" |
59 |
-SLOT="0/2" |
60 |
-IUSE="acl apparmor audit cryptsetup curl elfutils +gcrypt gnuefi http |
61 |
- idn importd +kdbus +kmod +lz4 lzma nat pam policykit |
62 |
- qrcode +seccomp selinux ssl sysv-utils test vanilla xkb" |
63 |
- |
64 |
-REQUIRED_USE="importd? ( curl gcrypt lzma )" |
65 |
- |
66 |
-MINKV="3.11" |
67 |
- |
68 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.27.1:0=[${MULTILIB_USEDEP}] |
69 |
- sys-libs/libcap:0=[${MULTILIB_USEDEP}] |
70 |
- !<sys-libs/glibc-2.16 |
71 |
- acl? ( sys-apps/acl:0= ) |
72 |
- apparmor? ( sys-libs/libapparmor:0= ) |
73 |
- audit? ( >=sys-process/audit-2:0= ) |
74 |
- cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= ) |
75 |
- curl? ( net-misc/curl:0= ) |
76 |
- elfutils? ( >=dev-libs/elfutils-0.158:0= ) |
77 |
- gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) |
78 |
- http? ( |
79 |
- >=net-libs/libmicrohttpd-0.9.33:0= |
80 |
- ssl? ( >=net-libs/gnutls-3.1.4:0= ) |
81 |
- ) |
82 |
- idn? ( net-dns/libidn:0= ) |
83 |
- importd? ( |
84 |
- app-arch/bzip2:0= |
85 |
- sys-libs/zlib:0= |
86 |
- ) |
87 |
- kmod? ( >=sys-apps/kmod-15:0= ) |
88 |
- lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) |
89 |
- lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) |
90 |
- nat? ( net-firewall/iptables:0= ) |
91 |
- pam? ( virtual/pam:= ) |
92 |
- qrcode? ( media-gfx/qrencode:0= ) |
93 |
- seccomp? ( sys-libs/libseccomp:0= ) |
94 |
- selinux? ( sys-libs/libselinux:0= ) |
95 |
- sysv-utils? ( |
96 |
- !sys-apps/systemd-sysv-utils |
97 |
- !sys-apps/sysvinit ) |
98 |
- xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) |
99 |
- abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9 |
100 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
101 |
- |
102 |
-# baselayout-2.2 has /run |
103 |
-# laptop-mode-tools: https://github.com/systemd/systemd/issues/2684 |
104 |
-RDEPEND="${COMMON_DEPEND} |
105 |
- >=sys-apps/baselayout-2.2 |
106 |
- selinux? ( sec-policy/selinux-systemd ) |
107 |
- !sys-auth/nss-myhostname |
108 |
- !sys-fs/eudev |
109 |
- !sys-fs/udev |
110 |
- !app-laptop/laptop-mode-tools" |
111 |
- |
112 |
-# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) |
113 |
-PDEPEND=">=sys-apps/dbus-1.6.8-r1:0[systemd] |
114 |
- >=sys-apps/hwids-20150417[udev] |
115 |
- >=sys-fs/udev-init-scripts-25 |
116 |
- policykit? ( sys-auth/polkit ) |
117 |
- !vanilla? ( sys-apps/gentoo-systemd-integration )" |
118 |
- |
119 |
-# Newer linux-headers needed by ia64, bug #480218 |
120 |
-DEPEND="${COMMON_DEPEND} |
121 |
- app-arch/xz-utils:0 |
122 |
- dev-util/gperf |
123 |
- >=dev-util/intltool-0.50 |
124 |
- >=sys-apps/coreutils-8.16 |
125 |
- >=sys-devel/binutils-2.23.1 |
126 |
- >=sys-devel/gcc-4.6 |
127 |
- >=sys-kernel/linux-headers-${MINKV} |
128 |
- virtual/pkgconfig |
129 |
- gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) |
130 |
- test? ( >=sys-apps/dbus-1.6.8-r1:0 ) |
131 |
- app-text/docbook-xml-dtd:4.2 |
132 |
- app-text/docbook-xml-dtd:4.5 |
133 |
- app-text/docbook-xsl-stylesheets |
134 |
- dev-libs/libxslt:0 |
135 |
-" |
136 |
- |
137 |
-pkg_pretend() { |
138 |
- local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS |
139 |
- ~DEVPTS_MULTIPLE_INSTANCES ~DEVTMPFS ~DMIID ~EPOLL ~FANOTIFY ~FHANDLE |
140 |
- ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SECCOMP ~SIGNALFD ~SYSFS |
141 |
- ~TIMERFD ~TMPFS_XATTR |
142 |
- ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED |
143 |
- ~!SYSFS_DEPRECATED_V2" |
144 |
- |
145 |
- use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" |
146 |
- kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" |
147 |
- |
148 |
- if linux_config_exists; then |
149 |
- local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
150 |
- if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then |
151 |
- ewarn "It's recommended to set an empty value to the following kernel config option:" |
152 |
- ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
153 |
- fi |
154 |
- fi |
155 |
- |
156 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
157 |
- if [[ $(gcc-major-version) -lt 4 |
158 |
- || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ) ]] |
159 |
- then |
160 |
- eerror "systemd requires at least gcc 4.6 to build. Please switch the active" |
161 |
- eerror "gcc version using gcc-config." |
162 |
- die "systemd requires at least gcc 4.6" |
163 |
- fi |
164 |
- fi |
165 |
- |
166 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
167 |
- if kernel_is -lt ${MINKV//./ }; then |
168 |
- ewarn "Kernel version at least ${MINKV} required" |
169 |
- fi |
170 |
- |
171 |
- check_extra_config |
172 |
- fi |
173 |
-} |
174 |
- |
175 |
-pkg_setup() { |
176 |
- : |
177 |
-} |
178 |
- |
179 |
-src_unpack() { |
180 |
- default |
181 |
- [[ ${PV} != 9999 ]] || git-r3_src_unpack |
182 |
-} |
183 |
- |
184 |
-src_prepare() { |
185 |
- # Bug 463376 |
186 |
- sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die |
187 |
- |
188 |
- local PATCHES=( |
189 |
- "${FILESDIR}/218-Dont-enable-audit-by-default.patch" |
190 |
- "${FILESDIR}/228-noclean-tmp.patch" |
191 |
- "${FILESDIR}/linux-headers-if.h.patch" |
192 |
- "${FILESDIR}/229-sysmacros.patch" |
193 |
- ) |
194 |
- [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches ) |
195 |
- |
196 |
- default |
197 |
- |
198 |
- eautoreconf |
199 |
-} |
200 |
- |
201 |
-src_configure() { |
202 |
- # Keep using the one where the rules were installed. |
203 |
- MY_UDEVDIR=$(get_udevdir) |
204 |
- # Fix systems broken by bug #509454. |
205 |
- [[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev |
206 |
- |
207 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
208 |
- tc-export AR CC NM OBJCOPY RANLIB |
209 |
- |
210 |
- multilib-minimal_src_configure |
211 |
-} |
212 |
- |
213 |
-multilib_src_configure() { |
214 |
- local myeconfargs=( |
215 |
- # disable -flto since it is an optimization flag |
216 |
- # and makes distcc less effective |
217 |
- cc_cv_CFLAGS__flto=no |
218 |
- # disable -fuse-ld=gold since Gentoo supports explicit linker |
219 |
- # choice and forcing gold is undesired, #539998 |
220 |
- # ld.gold may collide with user's LDFLAGS, #545168 |
221 |
- # ld.gold breaks sparc, #573874 |
222 |
- cc_cv_LDFLAGS__Wl__fuse_ld_gold=no |
223 |
- |
224 |
- # Workaround for gcc-4.7, bug 554454. |
225 |
- cc_cv_CFLAGS__Werror_shadow=no |
226 |
- |
227 |
- # Workaround for bug 516346 |
228 |
- --enable-dependency-tracking |
229 |
- |
230 |
- --disable-maintainer-mode |
231 |
- --localstatedir=/var |
232 |
- --with-pamlibdir=$(getpam_mod_dir) |
233 |
- # avoid bash-completion dep |
234 |
- --with-bashcompletiondir="$(get_bashcompdir)" |
235 |
- # make sure we get /bin:/sbin in $PATH |
236 |
- --enable-split-usr |
237 |
- # For testing. |
238 |
- --with-rootprefix="${ROOTPREFIX-/usr}" |
239 |
- --with-rootlibdir="${ROOTPREFIX-/usr}/$(get_libdir)" |
240 |
- # disable sysv compatibility |
241 |
- --with-sysvinit-path= |
242 |
- --with-sysvrcnd-path= |
243 |
- # no deps |
244 |
- --enable-efi |
245 |
- --enable-ima |
246 |
- --without-python |
247 |
- |
248 |
- # Optional components/dependencies |
249 |
- $(multilib_native_use_enable acl) |
250 |
- $(multilib_native_use_enable apparmor) |
251 |
- $(multilib_native_use_enable audit) |
252 |
- $(multilib_native_use_enable cryptsetup libcryptsetup) |
253 |
- $(multilib_native_use_enable curl libcurl) |
254 |
- $(multilib_native_use_enable elfutils) |
255 |
- $(use_enable gcrypt) |
256 |
- $(multilib_native_use_enable gnuefi) |
257 |
- $(multilib_native_use_enable http microhttpd) |
258 |
- $(usex http $(multilib_native_use_enable ssl gnutls) --disable-gnutls) |
259 |
- $(multilib_native_use_enable idn libidn) |
260 |
- $(multilib_native_use_enable importd) |
261 |
- $(multilib_native_use_enable importd bzip2) |
262 |
- $(multilib_native_use_enable importd zlib) |
263 |
- $(use_enable kdbus) |
264 |
- $(multilib_native_use_enable kmod) |
265 |
- $(use_enable lz4) |
266 |
- $(use_enable lzma xz) |
267 |
- $(multilib_native_use_enable nat libiptc) |
268 |
- $(multilib_native_use_enable pam) |
269 |
- $(multilib_native_use_enable policykit polkit) |
270 |
- $(multilib_native_use_enable qrcode qrencode) |
271 |
- $(multilib_native_use_enable seccomp) |
272 |
- $(multilib_native_use_enable selinux) |
273 |
- $(multilib_native_use_enable test tests) |
274 |
- $(multilib_native_use_enable test dbus) |
275 |
- $(multilib_native_use_enable xkb xkbcommon) |
276 |
- |
277 |
- # hardcode a few paths to spare some deps |
278 |
- KILL=/bin/kill |
279 |
- QUOTAON=/usr/sbin/quotaon |
280 |
- QUOTACHECK=/usr/sbin/quotacheck |
281 |
- |
282 |
- # TODO: we may need to restrict this to gcc |
283 |
- EFI_CC="$(tc-getCC)" |
284 |
- |
285 |
- # dbus paths |
286 |
- --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d" |
287 |
- --with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services" |
288 |
- --with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services" |
289 |
- |
290 |
- --with-ntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" |
291 |
- ) |
292 |
- |
293 |
- # Work around bug 463846. |
294 |
- tc-export CC |
295 |
- |
296 |
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
297 |
-} |
298 |
- |
299 |
-multilib_src_compile() { |
300 |
- local mymakeopts=( |
301 |
- udevlibexecdir="${MY_UDEVDIR}" |
302 |
- ) |
303 |
- |
304 |
- if multilib_is_native_abi; then |
305 |
- emake "${mymakeopts[@]}" |
306 |
- else |
307 |
- echo 'gentoo: $(BUILT_SOURCES)' | \ |
308 |
- emake "${mymakeopts[@]}" -f Makefile -f - gentoo |
309 |
- echo 'gentoo: $(lib_LTLIBRARIES) $(pkgconfiglib_DATA)' | \ |
310 |
- emake "${mymakeopts[@]}" -f Makefile -f - gentoo |
311 |
- fi |
312 |
-} |
313 |
- |
314 |
-multilib_src_test() { |
315 |
- multilib_is_native_abi || continue |
316 |
- |
317 |
- # Needed for bus-related tests |
318 |
- local -x SANDBOX_WRITE=${SANDBOX_WRITE} |
319 |
- addwrite /sys/fs/kdbus |
320 |
- |
321 |
- default |
322 |
-} |
323 |
- |
324 |
-multilib_src_install() { |
325 |
- local mymakeopts=( |
326 |
- # automake fails with parallel libtool relinking |
327 |
- # https://bugs.gentoo.org/show_bug.cgi?id=491398 |
328 |
- -j1 |
329 |
- |
330 |
- udevlibexecdir="${MY_UDEVDIR}" |
331 |
- dist_udevhwdb_DATA= |
332 |
- DESTDIR="${D}" |
333 |
- ) |
334 |
- |
335 |
- if multilib_is_native_abi; then |
336 |
- emake "${mymakeopts[@]}" install |
337 |
- else |
338 |
- mymakeopts+=( |
339 |
- install-libLTLIBRARIES |
340 |
- install-pkgconfiglibDATA |
341 |
- install-includeHEADERS |
342 |
- # safe to call unconditionally, 'installs' empty list |
343 |
- install-pkgincludeHEADERS |
344 |
- ) |
345 |
- |
346 |
- emake "${mymakeopts[@]}" |
347 |
- fi |
348 |
-} |
349 |
- |
350 |
-multilib_src_install_all() { |
351 |
- prune_libtool_files --modules |
352 |
- einstalldocs |
353 |
- |
354 |
- if use sysv-utils; then |
355 |
- for app in halt poweroff reboot runlevel shutdown telinit; do |
356 |
- dosym "..${ROOTPREFIX-/usr}/bin/systemctl" /sbin/${app} |
357 |
- done |
358 |
- dosym "..${ROOTPREFIX-/usr}/lib/systemd/systemd" /sbin/init |
359 |
- else |
360 |
- # we just keep sysvinit tools, so no need for the mans |
361 |
- rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \ |
362 |
- || die |
363 |
- rm "${D}"/usr/share/man/man1/init.1 || die |
364 |
- fi |
365 |
- |
366 |
- # Preserve empty dirs in /etc & /var, bug #437008 |
367 |
- keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \ |
368 |
- /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \ |
369 |
- /var/log/journal/remote |
370 |
- |
371 |
- # Symlink /etc/sysctl.conf for easy migration. |
372 |
- dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf |
373 |
- |
374 |
- # If we install these symlinks, there is no way for the sysadmin to remove them |
375 |
- # permanently. |
376 |
- rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die |
377 |
- rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die |
378 |
- rm -r "${D}"/etc/systemd/system/network-online.target.wants || die |
379 |
- rm -r "${D}"/etc/systemd/system/sockets.target.wants || die |
380 |
- rm -r "${D}"/etc/systemd/system/sysinit.target.wants || die |
381 |
-} |
382 |
- |
383 |
-migrate_locale() { |
384 |
- local envd_locale_def="${EROOT%/}/etc/env.d/02locale" |
385 |
- local envd_locale=( "${EROOT%/}"/etc/env.d/??locale ) |
386 |
- local locale_conf="${EROOT%/}/etc/locale.conf" |
387 |
- |
388 |
- if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
389 |
- # If locale.conf does not exist... |
390 |
- if [[ -e ${envd_locale} ]]; then |
391 |
- # ...either copy env.d/??locale if there's one |
392 |
- ebegin "Moving ${envd_locale} to ${locale_conf}" |
393 |
- mv "${envd_locale}" "${locale_conf}" |
394 |
- eend ${?} || FAIL=1 |
395 |
- else |
396 |
- # ...or create a dummy default |
397 |
- ebegin "Creating ${locale_conf}" |
398 |
- cat > "${locale_conf}" <<-EOF |
399 |
- # This file has been created by the sys-apps/systemd ebuild. |
400 |
- # See locale.conf(5) and localectl(1). |
401 |
- |
402 |
- # LANG=${LANG} |
403 |
- EOF |
404 |
- eend ${?} || FAIL=1 |
405 |
- fi |
406 |
- fi |
407 |
- |
408 |
- if [[ ! -L ${envd_locale} ]]; then |
409 |
- # now, if env.d/??locale is not a symlink (to locale.conf)... |
410 |
- if [[ -e ${envd_locale} ]]; then |
411 |
- # ...warn the user that he has duplicate locale settings |
412 |
- ewarn |
413 |
- ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
414 |
- ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
415 |
- ewarn "and create the symlink with the following command:" |
416 |
- ewarn "ln -s -n -f ../locale.conf ${envd_locale}" |
417 |
- ewarn |
418 |
- else |
419 |
- # ...or just create the symlink if there's nothing here |
420 |
- ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" |
421 |
- ln -n -s ../locale.conf "${envd_locale_def}" |
422 |
- eend ${?} || FAIL=1 |
423 |
- fi |
424 |
- fi |
425 |
-} |
426 |
- |
427 |
-migrate_net_name_slot() { |
428 |
- # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, |
429 |
- # do the same for 80-net-setup-link.rules to keep the old behavior |
430 |
- local net_move=no |
431 |
- local net_name_slot_sym=no |
432 |
- local net_rules_path="${EROOT%/}"/etc/udev/rules.d |
433 |
- local net_name_slot="${net_rules_path}"/80-net-name-slot.rules |
434 |
- local net_setup_link="${net_rules_path}"/80-net-setup-link.rules |
435 |
- if [[ -e ${net_setup_link} ]]; then |
436 |
- net_move=no |
437 |
- elif [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]]; then |
438 |
- net_move=yes |
439 |
- elif [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then |
440 |
- net_move=yes |
441 |
- net_name_slot_sym=yes |
442 |
- fi |
443 |
- if [[ ${net_move} == yes ]]; then |
444 |
- ebegin "Copying ${net_name_slot} to ${net_setup_link}" |
445 |
- |
446 |
- if [[ ${net_name_slot_sym} == yes ]]; then |
447 |
- ln -nfs /dev/null "${net_setup_link}" |
448 |
- else |
449 |
- cp "${net_name_slot}" "${net_setup_link}" |
450 |
- fi |
451 |
- eend $? || FAIL=1 |
452 |
- fi |
453 |
-} |
454 |
- |
455 |
-reenable_unit() { |
456 |
- if systemctl is-enabled --root="${ROOT}" "$1" &> /dev/null; then |
457 |
- ebegin "Re-enabling $1" |
458 |
- systemctl reenable --root="${ROOT}" "$1" |
459 |
- eend $? || FAIL=1 |
460 |
- fi |
461 |
-} |
462 |
- |
463 |
-pkg_postinst() { |
464 |
- newusergroup() { |
465 |
- enewgroup "$1" |
466 |
- enewuser "$1" -1 -1 -1 "$1" |
467 |
- } |
468 |
- |
469 |
- enewgroup input |
470 |
- enewgroup systemd-journal |
471 |
- newusergroup systemd-bus-proxy |
472 |
- newusergroup systemd-coredump |
473 |
- newusergroup systemd-journal-gateway |
474 |
- newusergroup systemd-journal-remote |
475 |
- newusergroup systemd-journal-upload |
476 |
- newusergroup systemd-network |
477 |
- newusergroup systemd-resolve |
478 |
- newusergroup systemd-timesync |
479 |
- use http && newusergroup systemd-journal-gateway |
480 |
- |
481 |
- systemd_update_catalog |
482 |
- |
483 |
- # Keep this here in case the database format changes so it gets updated |
484 |
- # when required. Despite that this file is owned by sys-apps/hwids. |
485 |
- if has_version "sys-apps/hwids[udev]"; then |
486 |
- udevadm hwdb --update --root="${ROOT%/}" |
487 |
- fi |
488 |
- |
489 |
- udev_reload || FAIL=1 |
490 |
- |
491 |
- # Bug 465468, make sure locales are respect, and ensure consistency |
492 |
- # between OpenRC & systemd |
493 |
- migrate_locale |
494 |
- |
495 |
- # Migrate 80-net-name-slot.rules -> 80-net-setup-link.rules |
496 |
- migrate_net_name_slot |
497 |
- |
498 |
- # Re-enable systemd-networkd for socket activation |
499 |
- reenable_unit systemd-networkd.service |
500 |
- |
501 |
- if [[ ${FAIL} ]]; then |
502 |
- eerror "One of the postinst commands failed. Please check the postinst output" |
503 |
- eerror "for errors. You may need to clean up your system and/or try installing" |
504 |
- eerror "systemd again." |
505 |
- eerror |
506 |
- fi |
507 |
- |
508 |
- if [[ $(readlink "${ROOT}"/etc/resolv.conf) == */run/systemd/network/resolv.conf ]]; then |
509 |
- ewarn "resolv.conf is now generated by systemd-resolved. To use it, enable" |
510 |
- ewarn "systemd-resolved.service, and create a symlink from /etc/resolv.conf" |
511 |
- ewarn "to /run/systemd/resolve/resolv.conf" |
512 |
- ewarn |
513 |
- fi |
514 |
-} |
515 |
- |
516 |
-pkg_prerm() { |
517 |
- # If removing systemd completely, remove the catalog database. |
518 |
- if [[ ! ${REPLACED_BY_VERSION} ]]; then |
519 |
- rm -f -v "${EROOT}"/var/lib/systemd/catalog/database |
520 |
- fi |
521 |
-} |