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