Gentoo Archives: gentoo-commits

From: "Mike Gilbert (floppym)" <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/systemd: systemd-220-r2.ebuild systemd-9999.ebuild ChangeLog
Date: Thu, 28 May 2015 03:35:06
Message-Id: 20150528033500.324F3A0C@oystercatcher.gentoo.org
1 floppym 15/05/28 03:35:00
2
3 Modified: systemd-9999.ebuild ChangeLog
4 Added: systemd-220-r2.ebuild
5 Log:
6 More backports.
7
8 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
9
10 Revision Changes Path
11 1.166 sys-apps/systemd/systemd-9999.ebuild
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild?rev=1.166&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild?rev=1.166&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild?r1=1.165&r2=1.166
16
17 Index: systemd-9999.ebuild
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild,v
20 retrieving revision 1.165
21 retrieving revision 1.166
22 diff -u -r1.165 -r1.166
23 --- systemd-9999.ebuild 24 May 2015 20:53:03 -0000 1.165
24 +++ systemd-9999.ebuild 28 May 2015 03:35:00 -0000 1.166
25 @@ -1,6 +1,6 @@
26 # Copyright 1999-2015 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild,v 1.165 2015/05/24 20:53:03 floppym Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild,v 1.166 2015/05/28 03:35:00 floppym Exp $
30
31 EAPI=5
32
33 @@ -109,7 +109,7 @@
34 app-text/docbook-xml-dtd:4.5
35 app-text/docbook-xsl-stylesheets
36 dev-libs/libxslt:0
37 - dev-libs/gobject-introspection
38 + dev-libs/gobject-introspection-common
39 >=dev-libs/libgcrypt-1.4.5:0"
40
41 SRC_URI=
42
43
44
45 1.369 sys-apps/systemd/ChangeLog
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/ChangeLog?rev=1.369&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/ChangeLog?rev=1.369&content-type=text/plain
49 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/ChangeLog?r1=1.368&r2=1.369
50
51 Index: ChangeLog
52 ===================================================================
53 RCS file: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v
54 retrieving revision 1.368
55 retrieving revision 1.369
56 diff -u -r1.368 -r1.369
57 --- ChangeLog 26 May 2015 19:47:15 -0000 1.368
58 +++ ChangeLog 28 May 2015 03:35:00 -0000 1.369
59 @@ -1,6 +1,12 @@
60 # ChangeLog for sys-apps/systemd
61 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
62 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v 1.368 2015/05/26 19:47:15 floppym Exp $
63 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v 1.369 2015/05/28 03:35:00 floppym Exp $
64 +
65 +*systemd-220-r2 (28 May 2015)
66 +
67 + 28 May 2015; Mike Gilbert <floppym@g.o> +systemd-220-r2.ebuild,
68 + systemd-220-r1.ebuild, systemd-9999.ebuild:
69 + More backports.
70
71 *systemd-220-r1 (26 May 2015)
72
73
74
75
76 1.1 sys-apps/systemd/systemd-220-r2.ebuild
77
78 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-220-r2.ebuild?rev=1.1&view=markup
79 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-220-r2.ebuild?rev=1.1&content-type=text/plain
80
81 Index: systemd-220-r2.ebuild
82 ===================================================================
83 # Copyright 1999-2015 Gentoo Foundation
84 # Distributed under the terms of the GNU General Public License v2
85 # $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-220-r2.ebuild,v 1.1 2015/05/28 03:35:00 floppym Exp $
86
87 EAPI=5
88
89 AUTOTOOLS_AUTORECONF=yes
90 AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
91 PYTHON_COMPAT=( python{2_7,3_3,3_4} )
92 inherit autotools-utils bash-completion-r1 linux-info multilib \
93 multilib-minimal pam python-single-r1 systemd toolchain-funcs udev \
94 user
95
96 DESCRIPTION="System and service manager for Linux"
97 HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
98 SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz
99 http://dev.gentoo.org/~floppym/dist/systemd-220-src-boot-efi.tar.xz
100 http://dev.gentoo.org/~floppym/dist/systemd-220-gentoo-r2.tar.xz"
101
102 LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
103 SLOT="0/2"
104 KEYWORDS="~amd64 ~arm ~ia64 ~x86"
105 IUSE="acl apparmor audit cryptsetup curl doc elfutils gcrypt gnuefi gudev http
106 idn importd introspection kdbus +kmod +lz4 lzma nat pam policykit python
107 qrcode +seccomp selinux ssl sysv-utils terminal test vanilla xkb"
108 REQUIRED_USE="importd? ( curl gcrypt lzma )"
109
110 MINKV="3.8"
111
112 COMMON_DEPEND=">=sys-apps/util-linux-2.25:0=
113 sys-libs/libcap:0=
114 !<sys-libs/glibc-2.16
115 acl? ( sys-apps/acl:0= )
116 apparmor? ( sys-libs/libapparmor:0= )
117 audit? ( >=sys-process/audit-2:0= )
118 cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
119 curl? ( net-misc/curl:0= )
120 elfutils? ( >=dev-libs/elfutils-0.158:0= )
121 gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
122 gudev? ( >=dev-libs/glib-2.34.3:2=[${MULTILIB_USEDEP}] )
123 http? (
124 >=net-libs/libmicrohttpd-0.9.33:0=
125 ssl? ( >=net-libs/gnutls-3.1.4:0= )
126 )
127 idn? ( net-dns/libidn:0= )
128 importd? (
129 app-arch/bzip2:0=
130 sys-libs/zlib:0=
131 )
132 introspection? ( >=dev-libs/gobject-introspection-1.31.1:0= )
133 kmod? ( >=sys-apps/kmod-15:0= )
134 lz4? ( >=app-arch/lz4-0_p119:0=[${MULTILIB_USEDEP}] )
135 lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
136 nat? ( net-firewall/iptables:0= )
137 pam? ( virtual/pam:= )
138 python? ( ${PYTHON_DEPS} )
139 qrcode? ( media-gfx/qrencode:0= )
140 seccomp? ( sys-libs/libseccomp:0= )
141 selinux? ( sys-libs/libselinux:0= )
142 sysv-utils? (
143 !sys-apps/systemd-sysv-utils
144 !sys-apps/sysvinit )
145 terminal? ( >=dev-libs/libevdev-1.2:0=
146 >=x11-libs/libxkbcommon-0.5:0=
147 >=x11-libs/libdrm-2.4:0= )
148 xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
149 abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
150 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
151
152 # baselayout-2.2 has /run
153 RDEPEND="${COMMON_DEPEND}
154 >=sys-apps/baselayout-2.2
155 !sys-auth/nss-myhostname
156 !sys-fs/eudev
157 !sys-fs/udev"
158
159 # sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
160 PDEPEND=">=sys-apps/dbus-1.6.8-r1:0[systemd]
161 >=sys-apps/hwids-20130717-r1[udev]
162 >=sys-fs/udev-init-scripts-25
163 policykit? ( sys-auth/polkit )
164 !vanilla? ( sys-apps/gentoo-systemd-integration )"
165
166 # Newer linux-headers needed by ia64, bug #480218
167 DEPEND="${COMMON_DEPEND}
168 app-arch/xz-utils:0
169 dev-util/gperf
170 >=dev-util/intltool-0.50
171 >=sys-apps/coreutils-8.16
172 >=sys-devel/binutils-2.23.1
173 >=sys-devel/gcc-4.6
174 >=sys-kernel/linux-headers-${MINKV}
175 ia64? ( >=sys-kernel/linux-headers-3.9 )
176 virtual/pkgconfig
177 doc? ( >=dev-util/gtk-doc-1.18 )
178 gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
179 python? ( dev-python/lxml[${PYTHON_USEDEP}] )
180 terminal? ( media-fonts/unifont[utils(+)] )
181 test? ( >=sys-apps/dbus-1.6.8-r1:0 )"
182
183 if [[ -n ${AUTOTOOLS_AUTORECONF} ]]; then
184 DEPEND+=" >=dev-libs/libgcrypt-1.4.5:0"
185 fi
186
187 PATCHES=( "${FILESDIR}/218-Dont-enable-audit-by-default.patch" )
188
189 pkg_pretend() {
190 local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
191 ~DEVPTS_MULTIPLE_INSTANCES ~DEVTMPFS ~DMIID ~EPOLL ~FANOTIFY ~FHANDLE
192 ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SECCOMP ~SIGNALFD ~SYSFS
193 ~TIMERFD ~TMPFS_XATTR
194 ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
195 ~!SYSFS_DEPRECATED_V2"
196
197 use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
198 kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
199
200 if linux_config_exists; then
201 local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
202 if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
203 ewarn "It's recommended to set an empty value to the following kernel config option:"
204 ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
205 fi
206 fi
207
208 if [[ ${MERGE_TYPE} != binary ]]; then
209 if [[ $(gcc-major-version) -lt 4
210 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ) ]]
211 then
212 eerror "systemd requires at least gcc 4.6 to build. Please switch the active"
213 eerror "gcc version using gcc-config."
214 die "systemd requires at least gcc 4.6"
215 fi
216 fi
217
218 if [[ ${MERGE_TYPE} != buildonly ]]; then
219 if kernel_is -lt ${MINKV//./ }; then
220 ewarn "Kernel version at least ${MINKV} required"
221 fi
222
223 check_extra_config
224 fi
225 }
226
227 pkg_setup() {
228 use python && python-single-r1_pkg_setup
229 }
230
231 src_prepare() {
232 # Bug 463376
233 sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
234
235 # http://lists.freedesktop.org/archives/systemd-devel/2015-May/032149.html
236 rm src/journal/audit_type-to-name.h src/udev/keyboard-keys-from-name.gperf || die
237
238 EPATCH_FORCE=yes EPATCH_SUFFIX=patch epatch
239
240 autotools-utils_src_prepare
241 }
242
243 src_configure() {
244 # Keep using the one where the rules were installed.
245 MY_UDEVDIR=$(get_udevdir)
246 # Fix systems broken by bug #509454.
247 [[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
248
249 multilib-minimal_src_configure
250 }
251
252 multilib_src_configure() {
253 local myeconfargs=(
254 # disable -flto since it is an optimization flag
255 # and makes distcc less effective
256 cc_cv_CFLAGS__flto=no
257
258 # Workaround for bug 516346
259 --enable-dependency-tracking
260
261 --disable-maintainer-mode
262 --localstatedir=/var
263 --with-pamlibdir=$(getpam_mod_dir)
264 # avoid bash-completion dep
265 --with-bashcompletiondir="$(get_bashcompdir)"
266 # make sure we get /bin:/sbin in $PATH
267 --enable-split-usr
268 # For testing.
269 --with-rootprefix="${ROOTPREFIX-/usr}"
270 --with-rootlibdir="${ROOTPREFIX-/usr}/$(get_libdir)"
271 # disable sysv compatibility
272 --with-sysvinit-path=
273 --with-sysvrcnd-path=
274 # no deps
275 --enable-efi
276 --enable-ima
277
278 # Optional components/dependencies
279 $(multilib_native_use_enable acl)
280 $(multilib_native_use_enable apparmor)
281 $(multilib_native_use_enable audit)
282 $(multilib_native_use_enable cryptsetup libcryptsetup)
283 $(multilib_native_use_enable curl libcurl)
284 $(multilib_native_use_enable doc gtk-doc)
285 $(multilib_native_use_enable elfutils)
286 $(use_enable gcrypt)
287 $(multilib_native_use_enable gnuefi)
288 $(use_enable gudev)
289 $(multilib_native_use_enable http microhttpd)
290 $(usex http $(multilib_native_use_enable ssl gnutls) --disable-gnutls)
291 $(multilib_native_use_enable idn libidn)
292 $(multilib_native_use_enable importd)
293 $(multilib_native_use_enable importd bzip2)
294 $(multilib_native_use_enable importd zlib)
295 $(multilib_native_use_enable introspection)
296 $(use_enable kdbus)
297 $(multilib_native_use_enable kmod)
298 $(use_enable lz4)
299 $(use_enable lzma xz)
300 $(multilib_native_use_enable nat libiptc)
301 $(multilib_native_use_enable pam)
302 $(multilib_native_use_enable policykit polkit)
303 $(multilib_native_use_with python)
304 $(multilib_native_use_enable python python-devel)
305 $(multilib_native_use_enable qrcode qrencode)
306 $(multilib_native_use_enable seccomp)
307 $(multilib_native_use_enable selinux)
308 $(multilib_native_use_enable terminal)
309 $(multilib_native_use_enable test tests)
310 $(multilib_native_use_enable test dbus)
311 $(multilib_native_use_enable xkb xkbcommon)
312
313 # not supported (avoid automagic deps in the future)
314 --disable-chkconfig
315
316 # hardcode a few paths to spare some deps
317 QUOTAON=/usr/sbin/quotaon
318 QUOTACHECK=/usr/sbin/quotacheck
319
320 # TODO: we may need to restrict this to gcc
321 EFI_CC="$(tc-getCC)"
322
323 # dbus paths
324 --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d"
325 --with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
326 --with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
327
328 --with-ntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
329 )
330
331 if ! multilib_is_native_abi; then
332 myeconfargs+=(
333 MOUNT_{CFLAGS,LIBS}=' '
334
335 ac_cv_search_cap_init=
336 ac_cv_header_sys_capability_h=yes
337 )
338 fi
339
340 # Work around bug 463846.
341 tc-export CC
342
343 autotools-utils_src_configure
344 }
345
346 multilib_src_compile() {
347 local mymakeopts=(
348 udevlibexecdir="${MY_UDEVDIR}"
349 )
350
351 if multilib_is_native_abi; then
352 emake "${mymakeopts[@]}"
353 else
354 # prerequisites for gudev
355 use gudev && emake src/gudev/gudev{enumtypes,marshal}.{c,h}
356
357 echo 'gentoo: $(BUILT_SOURCES)' | \
358 emake "${mymakeopts[@]}" -f Makefile -f - gentoo
359 echo 'gentoo: $(lib_LTLIBRARIES) $(pkgconfiglib_DATA)' | \
360 emake "${mymakeopts[@]}" -f Makefile -f - gentoo
361 fi
362 }
363
364 multilib_src_test() {
365 multilib_is_native_abi || continue
366
367 default
368 }
369
370 multilib_src_install() {
371 local mymakeopts=(
372 # automake fails with parallel libtool relinking
373 # https://bugs.gentoo.org/show_bug.cgi?id=491398
374 -j1
375
376 udevlibexecdir="${MY_UDEVDIR}"
377 dist_udevhwdb_DATA=
378 DESTDIR="${D}"
379 )
380
381 if multilib_is_native_abi; then
382 emake "${mymakeopts[@]}" install
383 else
384 mymakeopts+=(
385 install-libLTLIBRARIES
386 install-pkgconfiglibDATA
387 install-includeHEADERS
388 # safe to call unconditionally, 'installs' empty list
389 install-libgudev_includeHEADERS
390 install-pkgincludeHEADERS
391 )
392
393 emake "${mymakeopts[@]}"
394 fi
395
396 # install compat pkg-config files
397 # Change dbus to >=sys-apps/dbus-1.8.8 if/when this is dropped.
398 local pcfiles=( src/compat-libs/libsystemd-{daemon,id128,journal,login}.pc )
399 emake "${mymakeopts[@]}" install-pkgconfiglibDATA \
400 pkgconfiglib_DATA="${pcfiles[*]}"
401 }
402
403 multilib_src_install_all() {
404 prune_libtool_files --modules
405 einstalldocs
406
407 if use sysv-utils; then
408 for app in halt poweroff reboot runlevel shutdown telinit; do
409 dosym "..${ROOTPREFIX-/usr}/bin/systemctl" /sbin/${app}
410 done
411 dosym "..${ROOTPREFIX-/usr}/lib/systemd/systemd" /sbin/init
412 else
413 # we just keep sysvinit tools, so no need for the mans
414 rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
415 || die
416 rm "${D}"/usr/share/man/man1/init.1 || die
417 fi
418
419 # Disable storing coredumps in journald, bug #433457
420 mv "${D}"/usr/lib/sysctl.d/50-coredump.conf{,.disabled} || die
421
422 # Preserve empty dirs in /etc & /var, bug #437008
423 keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \
424 /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \
425 /var/log/journal/remote
426
427 # Symlink /etc/sysctl.conf for easy migration.
428 dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
429
430 # If we install these symlinks, there is no way for the sysadmin to remove them
431 # permanently.
432 rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
433 rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
434 rm -r "${D}"/etc/systemd/system/network-online.target.wants || die
435 rm -r "${D}"/etc/systemd/system/sysinit.target.wants || die
436 }
437
438 migrate_locale() {
439 local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
440 local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
441 local locale_conf="${EROOT%/}/etc/locale.conf"
442
443 if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
444 # If locale.conf does not exist...
445 if [[ -e ${envd_locale} ]]; then
446 # ...either copy env.d/??locale if there's one
447 ebegin "Moving ${envd_locale} to ${locale_conf}"
448 mv "${envd_locale}" "${locale_conf}"
449 eend ${?} || FAIL=1
450 else
451 # ...or create a dummy default
452 ebegin "Creating ${locale_conf}"
453 cat > "${locale_conf}" <<-EOF
454 # This file has been created by the sys-apps/systemd ebuild.
455 # See locale.conf(5) and localectl(1).
456
457 # LANG=${LANG}
458 EOF
459 eend ${?} || FAIL=1
460 fi
461 fi
462
463 if [[ ! -L ${envd_locale} ]]; then
464 # now, if env.d/??locale is not a symlink (to locale.conf)...
465 if [[ -e ${envd_locale} ]]; then
466 # ...warn the user that he has duplicate locale settings
467 ewarn
468 ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
469 ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
470 ewarn "and create the symlink with the following command:"
471 ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
472 ewarn
473 else
474 # ...or just create the symlink if there's nothing here
475 ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
476 ln -n -s ../locale.conf "${envd_locale_def}"
477 eend ${?} || FAIL=1
478 fi
479 fi
480 }
481
482 migrate_net_name_slot() {
483 # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null,
484 # do the same for 80-net-setup-link.rules to keep the old behavior
485 local net_move=no
486 local net_name_slot_sym=no
487 local net_rules_path="${EROOT%/}"/etc/udev/rules.d
488 local net_name_slot="${net_rules_path}"/80-net-name-slot.rules
489 local net_setup_link="${net_rules_path}"/80-net-setup-link.rules
490 if [[ -e ${net_setup_link} ]]; then
491 net_move=no
492 elif [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]]; then
493 net_move=yes
494 elif [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then
495 net_move=yes
496 net_name_slot_sym=yes
497 fi
498 if [[ ${net_move} == yes ]]; then
499 ebegin "Copying ${net_name_slot} to ${net_setup_link}"
500
501 if [[ ${net_name_slot_sym} == yes ]]; then
502 ln -nfs /dev/null "${net_setup_link}"
503 else
504 cp "${net_name_slot}" "${net_setup_link}"
505 fi
506 eend $? || FAIL=1
507 fi
508 }
509
510 pkg_postinst() {
511 newusergroup() {
512 enewgroup "$1"
513 enewuser "$1" -1 -1 -1 "$1"
514 }
515
516 enewgroup input
517 enewgroup systemd-journal
518 newusergroup systemd-bus-proxy
519 newusergroup systemd-journal-gateway
520 newusergroup systemd-journal-remote
521 newusergroup systemd-journal-upload
522 newusergroup systemd-network
523 newusergroup systemd-resolve
524 newusergroup systemd-timesync
525 use http && newusergroup systemd-journal-gateway
526
527 systemd_update_catalog
528
529 # Keep this here in case the database format changes so it gets updated
530 # when required. Despite that this file is owned by sys-apps/hwids.
531 if has_version "sys-apps/hwids[udev]"; then
532 udevadm hwdb --update --root="${ROOT%/}"
533 fi
534
535 udev_reload || FAIL=1
536
537 # Bug 465468, make sure locales are respect, and ensure consistency
538 # between OpenRC & systemd
539 migrate_locale
540
541 # Migrate 80-net-name-slot.rules -> 80-net-setup-link.rules
542 migrate_net_name_slot
543
544 if [[ ${FAIL} ]]; then
545 eerror "One of the postinst commands failed. Please check the postinst output"
546 eerror "for errors. You may need to clean up your system and/or try installing"
547 eerror "systemd again."
548 eerror
549 fi
550
551 if [[ ! -L "${ROOT}"/etc/mtab ]]; then
552 ewarn "Upstream mandates the /etc/mtab file should be a symlink to /proc/mounts."
553 ewarn "Not having it is not supported by upstream and will cause tools like 'df'"
554 ewarn "and 'mount' to not work properly. Please run:"
555 ewarn " # ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'"
556 ewarn
557 fi
558
559 if [[ $(readlink "${ROOT}"/etc/resolv.conf) == */run/systemd/network/resolv.conf ]]; then
560 ewarn "resolv.conf is now generated by systemd-resolved. To use it, enable"
561 ewarn "systemd-resolved.service, and create a symlink from /etc/resolv.conf"
562 ewarn "to /run/systemd/resolve/resolv.conf"
563 ewarn
564 fi
565
566 if ! has_version sys-apps/systemd-ui; then
567 elog "To get additional features, a number of optional runtime dependencies may"
568 elog "be installed:"
569 elog "- sys-apps/systemd-ui: for GTK+ systemadm UI and gnome-ask-password-agent"
570 fi
571
572 if has_version sys-apps/openrc &&
573 ! has_version sys-fs/udev-init-scripts; then
574 elog "If you plan to boot using OpenRC and udev or eudev, you"
575 elog "need to install the udev-init-scripts package."
576 fi
577 }
578
579 pkg_prerm() {
580 # If removing systemd completely, remove the catalog database.
581 if [[ ! ${REPLACED_BY_VERSION} ]]; then
582 rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
583 fi
584 }