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