1 |
mgorny 14/03/02 16:37:50 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: systemd-210.9999.ebuild systemd-208.9999.ebuild |
5 |
Log: |
6 |
Add stable branch git ebuilds, bug #503172. |
7 |
|
8 |
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!) |
9 |
|
10 |
Revision Changes Path |
11 |
1.233 sys-apps/systemd/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/ChangeLog?rev=1.233&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/ChangeLog?rev=1.233&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/ChangeLog?r1=1.232&r2=1.233 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v |
20 |
retrieving revision 1.232 |
21 |
retrieving revision 1.233 |
22 |
diff -u -r1.232 -r1.233 |
23 |
--- ChangeLog 2 Mar 2014 16:12:01 -0000 1.232 |
24 |
+++ ChangeLog 2 Mar 2014 16:37:49 -0000 1.233 |
25 |
@@ -1,6 +1,13 @@ |
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.232 2014/03/02 16:12:01 floppym Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v 1.233 2014/03/02 16:37:49 mgorny Exp $ |
30 |
+ |
31 |
+*systemd-208.9999 (02 Mar 2014) |
32 |
+*systemd-210.9999 (02 Mar 2014) |
33 |
+ |
34 |
+ 02 Mar 2014; Michał Górny <mgorny@g.o> +systemd-208.9999.ebuild, |
35 |
+ +systemd-210.9999.ebuild: |
36 |
+ Add stable branch git ebuilds, bug #503172. |
37 |
|
38 |
02 Mar 2014; Mike Gilbert <floppym@g.o> systemd-210.ebuild, |
39 |
systemd-9999.ebuild: |
40 |
|
41 |
|
42 |
|
43 |
1.1 sys-apps/systemd/systemd-210.9999.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-210.9999.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-210.9999.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: systemd-210.9999.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2014 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-210.9999.ebuild,v 1.1 2014/03/02 16:37:49 mgorny Exp $ |
53 |
|
54 |
EAPI=5 |
55 |
|
56 |
#if LIVE |
57 |
AUTOTOOLS_AUTORECONF=yes |
58 |
EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN}-stable |
59 |
http://cgit.freedesktop.org/${PN}/${PN}-stable/" |
60 |
EGIT_BRANCH=v210-stable |
61 |
|
62 |
inherit git-r3 |
63 |
#endif |
64 |
|
65 |
AUTOTOOLS_PRUNE_LIBTOOL_FILES=all |
66 |
PYTHON_COMPAT=( python{2_7,3_2,3_3} ) |
67 |
inherit autotools-utils bash-completion-r1 fcaps linux-info multilib \ |
68 |
multilib-minimal pam python-single-r1 systemd toolchain-funcs udev \ |
69 |
user |
70 |
|
71 |
DESCRIPTION="System and service manager for Linux" |
72 |
HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd" |
73 |
SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz" |
74 |
|
75 |
LICENSE="GPL-2 LGPL-2.1 MIT public-domain" |
76 |
SLOT="0/2" |
77 |
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
78 |
IUSE="acl audit cryptsetup doc +firmware-loader gcrypt gudev http introspection |
79 |
kdbus +kmod lzma pam policykit python qrcode +seccomp selinux tcpd |
80 |
test vanilla xattr" |
81 |
|
82 |
MINKV="3.0" |
83 |
|
84 |
COMMON_DEPEND=">=sys-apps/util-linux-2.20:0= |
85 |
sys-libs/libcap:0= |
86 |
acl? ( sys-apps/acl:0= ) |
87 |
audit? ( >=sys-process/audit-2:0= ) |
88 |
cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= ) |
89 |
gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0= ) |
90 |
gudev? ( dev-libs/glib:2=[${MULTILIB_USEDEP}] ) |
91 |
http? ( net-libs/libmicrohttpd:0= ) |
92 |
introspection? ( >=dev-libs/gobject-introspection-1.31.1:0= ) |
93 |
kmod? ( >=sys-apps/kmod-15:0= ) |
94 |
lzma? ( app-arch/xz-utils:0=[${MULTILIB_USEDEP}] ) |
95 |
pam? ( virtual/pam:= ) |
96 |
python? ( ${PYTHON_DEPS} ) |
97 |
qrcode? ( media-gfx/qrencode:0= ) |
98 |
seccomp? ( sys-libs/libseccomp:0= ) |
99 |
selinux? ( sys-libs/libselinux:0= ) |
100 |
tcpd? ( sys-apps/tcp-wrappers:0= ) |
101 |
xattr? ( sys-apps/attr:0= ) |
102 |
abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9 |
103 |
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
104 |
|
105 |
# baselayout-2.2 has /run |
106 |
RDEPEND="${COMMON_DEPEND} |
107 |
>=sys-apps/baselayout-2.2 |
108 |
|| ( |
109 |
>=sys-apps/util-linux-2.22 |
110 |
<sys-apps/sysvinit-2.88-r4 |
111 |
) |
112 |
!sys-auth/nss-myhostname |
113 |
!<sys-libs/glibc-2.14 |
114 |
!sys-fs/udev" |
115 |
|
116 |
# sys-apps/daemon: the daemon only (+ build-time lib dep for tests) |
117 |
PDEPEND=">=sys-apps/dbus-1.6.8-r1:0 |
118 |
>=sys-apps/hwids-20130717-r1[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="${COMMON_DEPEND} |
125 |
app-arch/xz-utils:0 |
126 |
dev-util/gperf |
127 |
>=dev-util/intltool-0.50 |
128 |
>=sys-devel/binutils-2.23.1 |
129 |
>=sys-devel/gcc-4.6 |
130 |
>=sys-kernel/linux-headers-${MINKV} |
131 |
ia64? ( >=sys-kernel/linux-headers-3.9 ) |
132 |
virtual/pkgconfig |
133 |
doc? ( >=dev-util/gtk-doc-1.18 ) |
134 |
python? ( dev-python/lxml[${PYTHON_USEDEP}] ) |
135 |
test? ( >=sys-apps/dbus-1.6.8-r1:0 )" |
136 |
|
137 |
#if LIVE |
138 |
DEPEND="${DEPEND} |
139 |
app-text/docbook-xml-dtd:4.2 |
140 |
app-text/docbook-xml-dtd:4.5 |
141 |
app-text/docbook-xsl-stylesheets |
142 |
dev-libs/libxslt:0 |
143 |
dev-libs/gobject-introspection |
144 |
>=dev-libs/libgcrypt-1.4.5:0" |
145 |
|
146 |
SRC_URI= |
147 |
KEYWORDS= |
148 |
#endif |
149 |
|
150 |
src_prepare() { |
151 |
if use doc; then |
152 |
gtkdocize --docdir docs/ || die |
153 |
else |
154 |
echo 'EXTRA_DIST =' > docs/gtk-doc.make |
155 |
fi |
156 |
|
157 |
# Bug 463376 |
158 |
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die |
159 |
|
160 |
autotools-utils_src_prepare |
161 |
} |
162 |
|
163 |
pkg_pretend() { |
164 |
local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS ~DEVTMPFS ~DMIID |
165 |
~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~PROC_FS |
166 |
~SECCOMP ~SIGNALFD ~SYSFS ~TIMERFD |
167 |
~!IDE ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 |
168 |
~!GRKERNSEC_PROC" |
169 |
|
170 |
use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" |
171 |
use pam && CONFIG_CHECK+=" ~AUDITSYSCALL" |
172 |
use xattr && CONFIG_CHECK+=" ~TMPFS_XATTR" |
173 |
kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" |
174 |
use firmware-loader || CONFIG_CHECK+=" ~!FW_LOADER_USER_HELPER" |
175 |
|
176 |
if linux_config_exists; then |
177 |
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
178 |
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then |
179 |
ewarn "It's recommended to set an empty value to the following kernel config option:" |
180 |
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
181 |
fi |
182 |
fi |
183 |
|
184 |
if [[ ${MERGE_TYPE} != binary ]]; then |
185 |
if [[ $(gcc-major-version) -lt 4 |
186 |
|| ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ) ]] |
187 |
then |
188 |
eerror "systemd requires at least gcc 4.6 to build. Please switch the active" |
189 |
eerror "gcc version using gcc-config." |
190 |
die "systemd requires at least gcc 4.6" |
191 |
fi |
192 |
fi |
193 |
|
194 |
if [[ ${MERGE_TYPE} != buildonly ]]; then |
195 |
if kernel_is -lt ${MINKV//./ }; then |
196 |
ewarn "Kernel version at least ${MINKV} required" |
197 |
fi |
198 |
|
199 |
if ! use firmware-loader && kernel_is -lt 3 8; then |
200 |
ewarn "You seem to be using kernel older than 3.8. Those kernel versions" |
201 |
ewarn "require systemd with USE=firmware-loader to support loading" |
202 |
ewarn "firmware. Missing this flag may cause some hardware not to work." |
203 |
fi |
204 |
|
205 |
check_extra_config |
206 |
fi |
207 |
} |
208 |
|
209 |
pkg_setup() { |
210 |
use python && python-single-r1_pkg_setup |
211 |
} |
212 |
|
213 |
multilib_src_configure() { |
214 |
local myeconfargs=( |
215 |
--disable-maintainer-mode |
216 |
--localstatedir=/var |
217 |
--with-pamlibdir=$(getpam_mod_dir) |
218 |
# avoid bash-completion dep |
219 |
--with-bashcompletiondir="$(get_bashcompdir)" |
220 |
# make sure we get /bin:/sbin in $PATH |
221 |
--enable-split-usr |
222 |
# disable sysv compatibility |
223 |
--with-sysvinit-path= |
224 |
--with-sysvrcnd-path= |
225 |
# no deps |
226 |
--enable-efi |
227 |
--enable-ima |
228 |
# optional components/dependencies |
229 |
$(use_enable acl) |
230 |
$(use_enable audit) |
231 |
$(use_enable cryptsetup libcryptsetup) |
232 |
$(use_enable doc gtk-doc) |
233 |
$(use_enable gcrypt) |
234 |
$(use_enable gudev) |
235 |
$(use_enable http microhttpd) |
236 |
$(use_enable introspection) |
237 |
$(use_enable kdbus) |
238 |
$(use_enable kmod) |
239 |
$(use_enable lzma xz) |
240 |
$(use_enable pam) |
241 |
$(use_enable policykit polkit) |
242 |
$(use_with python) |
243 |
$(use_enable python python-devel) |
244 |
$(use_enable qrcode qrencode) |
245 |
$(use_enable seccomp) |
246 |
$(use_enable selinux) |
247 |
$(use_enable tcpd tcpwrap) |
248 |
$(use_enable test tests) |
249 |
$(use_enable xattr) |
250 |
|
251 |
# not supported (avoid automagic deps in the future) |
252 |
--disable-chkconfig |
253 |
|
254 |
# hardcode a few paths to spare some deps |
255 |
QUOTAON=/usr/sbin/quotaon |
256 |
QUOTACHECK=/usr/sbin/quotacheck |
257 |
) |
258 |
|
259 |
# Keep using the one where the rules were installed. |
260 |
MY_UDEVDIR=$(get_udevdir) |
261 |
|
262 |
if use firmware-loader; then |
263 |
myeconfargs+=( |
264 |
--with-firmware-path="/lib/firmware/updates:/lib/firmware" |
265 |
) |
266 |
fi |
267 |
|
268 |
if ! multilib_is_native_abi; then |
269 |
myeconfargs+=( |
270 |
ac_cv_search_cap_init= |
271 |
ac_cv_header_sys_capability_h=yes |
272 |
DBUS_CFLAGS=' ' |
273 |
DBUS_LIBS=' ' |
274 |
|
275 |
--disable-acl |
276 |
--disable-audit |
277 |
--disable-gcrypt |
278 |
--disable-gtk-doc |
279 |
--disable-introspection |
280 |
--disable-kmod |
281 |
--disable-libcryptsetup |
282 |
--disable-microhttpd |
283 |
--disable-networkd |
284 |
--disable-pam |
285 |
--disable-polkit |
286 |
--disable-qrencode |
287 |
--disable-seccomp |
288 |
--disable-selinux |
289 |
--disable-tcpwrap |
290 |
--disable-tests |
291 |
--disable-xattr |
292 |
--disable-xz |
293 |
--disable-python-devel |
294 |
) |
295 |
fi |
296 |
|
297 |
# Work around bug 463846. |
298 |
tc-export CC |
299 |
|
300 |
autotools-utils_src_configure |
301 |
} |
302 |
|
303 |
multilib_src_compile() { |
304 |
local mymakeopts=( |
305 |
udevlibexecdir="${MY_UDEVDIR}" |
306 |
) |
307 |
|
308 |
if multilib_is_native_abi; then |
309 |
emake "${mymakeopts[@]}" |
310 |
else |
311 |
# prerequisites for gudev |
312 |
use gudev && emake src/gudev/gudev{enumtypes,marshal}.{c,h} |
313 |
|
314 |
echo 'gentoo: $(BUILT_SOURCES)' | \ |
315 |
emake "${mymakeopts[@]}" -f Makefile -f - gentoo |
316 |
echo 'gentoo: $(lib_LTLIBRARIES) $(pkgconfiglib_DATA)' | \ |
317 |
emake "${mymakeopts[@]}" -f Makefile -f - gentoo |
318 |
fi |
319 |
} |
320 |
|
321 |
multilib_src_test() { |
322 |
multilib_is_native_abi || continue |
323 |
|
324 |
default |
325 |
} |
326 |
|
327 |
multilib_src_install() { |
328 |
local mymakeopts=( |
329 |
# automake fails with parallel libtool relinking |
330 |
# https://bugs.gentoo.org/show_bug.cgi?id=491398 |
331 |
-j1 |
332 |
|
333 |
udevlibexecdir="${MY_UDEVDIR}" |
334 |
dist_udevhwdb_DATA= |
335 |
DESTDIR="${D}" |
336 |
) |
337 |
|
338 |
if multilib_is_native_abi; then |
339 |
emake "${mymakeopts[@]}" install |
340 |
# Even with --enable-networkd, it's not right to have this running by default |
341 |
# when it's unconfigured. |
342 |
rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service |
343 |
else |
344 |
mymakeopts+=( |
345 |
install-libLTLIBRARIES |
346 |
install-pkgconfiglibDATA |
347 |
install-includeHEADERS |
348 |
# safe to call unconditionally, 'installs' empty list |
349 |
install-libgudev_includeHEADERS |
350 |
install-pkgincludeHEADERS |
351 |
) |
352 |
|
353 |
emake "${mymakeopts[@]}" |
354 |
fi |
355 |
|
356 |
# install compat pkg-config files |
357 |
local pcfiles=( src/compat-libs/libsystemd-{daemon,id128,journal,login}.pc ) |
358 |
emake "${mymakeopts[@]}" install-pkgconfiglibDATA \ |
359 |
pkgconfiglib_DATA="${pcfiles[*]}" |
360 |
} |
361 |
|
362 |
multilib_src_install_all() { |
363 |
prune_libtool_files --modules |
364 |
einstalldocs |
365 |
|
366 |
# we just keep sysvinit tools, so no need for the mans |
367 |
rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \ |
368 |
|| die |
369 |
rm "${D}"/usr/share/man/man1/init.1 || die |
370 |
|
371 |
# Disable storing coredumps in journald, bug #433457 |
372 |
mv "${D}"/usr/lib/sysctl.d/50-coredump.conf{,.disabled} || die |
373 |
|
374 |
# Preserve empty dirs in /etc & /var, bug #437008 |
375 |
keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \ |
376 |
/etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd |
377 |
|
378 |
# Symlink /etc/sysctl.conf for easy migration. |
379 |
dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf |
380 |
} |
381 |
|
382 |
migrate_locale() { |
383 |
local envd_locale_def="${EROOT%/}/etc/env.d/02locale" |
384 |
local envd_locale=( "${EROOT%/}"/etc/env.d/??locale ) |
385 |
local locale_conf="${EROOT%/}/etc/locale.conf" |
386 |
|
387 |
if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
388 |
# If locale.conf does not exist... |
389 |
if [[ -e ${envd_locale} ]]; then |
390 |
# ...either copy env.d/??locale if there's one |
391 |
ebegin "Moving ${envd_locale} to ${locale_conf}" |
392 |
mv "${envd_locale}" "${locale_conf}" |
393 |
eend ${?} || FAIL=1 |
394 |
else |
395 |
# ...or create a dummy default |
396 |
ebegin "Creating ${locale_conf}" |
397 |
cat > "${locale_conf}" <<-EOF |
398 |
# This file has been created by the sys-apps/systemd ebuild. |
399 |
# See locale.conf(5) and localectl(1). |
400 |
|
401 |
# LANG=${LANG} |
402 |
EOF |
403 |
eend ${?} || FAIL=1 |
404 |
fi |
405 |
fi |
406 |
|
407 |
if [[ ! -L ${envd_locale} ]]; then |
408 |
# now, if env.d/??locale is not a symlink (to locale.conf)... |
409 |
if [[ -e ${envd_locale} ]]; then |
410 |
# ...warn the user that he has duplicate locale settings |
411 |
ewarn |
412 |
ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
413 |
ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
414 |
ewarn "and create the symlink with the following command:" |
415 |
ewarn "ln -s -n -f ../locale.conf ${envd_locale}" |
416 |
ewarn |
417 |
else |
418 |
# ...or just create the symlink if there's nothing here |
419 |
ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" |
420 |
ln -n -s ../locale.conf "${envd_locale_def}" |
421 |
eend ${?} || FAIL=1 |
422 |
fi |
423 |
fi |
424 |
} |
425 |
|
426 |
migrate_net_name_slot() { |
427 |
# If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, |
428 |
# do the same for 80-net-setup-link.rules to keep the old behavior |
429 |
local net_move=no |
430 |
local net_name_slot_sym=no |
431 |
local net_rules_path="${EROOT%/}"/etc/udev/rules.d |
432 |
local net_name_slot="${net_rules_path}"/80-net-name-slot.rules |
433 |
local net_setup_link="${net_rules_path}"/80-net-setup-link.rules |
434 |
if [[ -e ${net_setup_link} ]]; then |
435 |
net_move=no |
436 |
elif [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]]; then |
437 |
net_move=yes |
438 |
elif [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then |
439 |
net_move=yes |
440 |
net_name_slot_sym=yes |
441 |
fi |
442 |
if [[ ${net_move} == yes ]]; then |
443 |
ebegin "Copying ${net_name_slot} to ${net_setup_link}" |
444 |
|
445 |
if [[ ${net_name_slot_sym} == yes ]]; then |
446 |
ln -nfs /dev/null "${net_setup_link}" |
447 |
else |
448 |
cp "${net_name_slot}" "${net_setup_link}" |
449 |
fi |
450 |
eend $? || FAIL=1 |
451 |
fi |
452 |
} |
453 |
|
454 |
pkg_postinst() { |
455 |
enewgroup systemd-journal |
456 |
if use http; then |
457 |
enewgroup systemd-journal-gateway |
458 |
enewuser systemd-journal-gateway -1 -1 -1 systemd-journal-gateway |
459 |
fi |
460 |
systemd_update_catalog |
461 |
|
462 |
# Keep this here in case the database format changes so it gets updated |
463 |
# when required. Despite that this file is owned by sys-apps/hwids. |
464 |
if has_version "sys-apps/hwids[udev]"; then |
465 |
udevadm hwdb --update --root="${ROOT%/}" |
466 |
fi |
467 |
|
468 |
udev_reload || FAIL=1 |
469 |
|
470 |
# Bug 468876 |
471 |
fcaps cap_dac_override,cap_sys_ptrace=ep usr/bin/systemd-detect-virt |
472 |
|
473 |
# Bug 465468, make sure locales are respect, and ensure consistency |
474 |
# between OpenRC & systemd |
475 |
migrate_locale |
476 |
|
477 |
# Migrate 80-net-name-slot.rules -> 80-net-setup-link.rules |
478 |
migrate_net_name_slot |
479 |
|
480 |
if [[ ${FAIL} ]]; then |
481 |
eerror "One of the postinst commands failed. Please check the postinst output" |
482 |
eerror "for errors. You may need to clean up your system and/or try installing" |
483 |
eerror "systemd again." |
484 |
eerror |
485 |
fi |
486 |
|
487 |
if [[ ! -L "${ROOT}"/etc/mtab ]]; then |
488 |
ewarn "Upstream mandates the /etc/mtab file should be a symlink to /proc/mounts." |
489 |
ewarn "Not having it is not supported by upstream and will cause tools like 'df'" |
490 |
ewarn "and 'mount' to not work properly. Please run:" |
491 |
ewarn " # ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'" |
492 |
ewarn |
493 |
fi |
494 |
|
495 |
if ! has_version sys-apps/systemd-ui; then |
496 |
elog "To get additional features, a number of optional runtime dependencies may" |
497 |
elog "be installed:" |
498 |
elog "- sys-apps/systemd-ui: for GTK+ systemadm UI and gnome-ask-password-agent" |
499 |
fi |
500 |
} |
501 |
|
502 |
pkg_prerm() { |
503 |
# If removing systemd completely, remove the catalog database. |
504 |
if [[ ! ${REPLACED_BY_VERSION} ]]; then |
505 |
rm -f -v "${EROOT}"/var/lib/systemd/catalog/database |
506 |
fi |
507 |
} |
508 |
|
509 |
|
510 |
|
511 |
1.1 sys-apps/systemd/systemd-208.9999.ebuild |
512 |
|
513 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-208.9999.ebuild?rev=1.1&view=markup |
514 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-208.9999.ebuild?rev=1.1&content-type=text/plain |
515 |
|
516 |
Index: systemd-208.9999.ebuild |
517 |
=================================================================== |
518 |
# Copyright 1999-2014 Gentoo Foundation |
519 |
# Distributed under the terms of the GNU General Public License v2 |
520 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-208.9999.ebuild,v 1.1 2014/03/02 16:37:49 mgorny Exp $ |
521 |
|
522 |
EAPI=5 |
523 |
|
524 |
#if LIVE |
525 |
AUTOTOOLS_AUTORECONF=yes |
526 |
EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN}-stable |
527 |
http://cgit.freedesktop.org/${PN}/${PN}-stable/" |
528 |
EGIT_BRANCH=v208-stable |
529 |
|
530 |
inherit git-r3 |
531 |
#endif |
532 |
|
533 |
AUTOTOOLS_PRUNE_LIBTOOL_FILES=all |
534 |
PYTHON_COMPAT=( python{2_7,3_2,3_3} ) |
535 |
inherit autotools-utils bash-completion-r1 fcaps linux-info multilib \ |
536 |
multilib-minimal pam python-single-r1 systemd toolchain-funcs udev \ |
537 |
user |
538 |
|
539 |
DESCRIPTION="System and service manager for Linux" |
540 |
HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd" |
541 |
SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz" |
542 |
|
543 |
LICENSE="GPL-2 LGPL-2.1 MIT public-domain" |
544 |
SLOT="0/1" |
545 |
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
546 |
IUSE="acl audit cryptsetup doc +firmware-loader gcrypt gudev http introspection |
547 |
+kmod lzma pam policykit python qrcode selinux tcpd test |
548 |
vanilla xattr" |
549 |
|
550 |
MINKV="3.0" |
551 |
|
552 |
COMMON_DEPEND=">=sys-apps/dbus-1.6.8-r1 |
553 |
>=sys-apps/util-linux-2.20 |
554 |
sys-libs/libcap |
555 |
acl? ( sys-apps/acl ) |
556 |
audit? ( >=sys-process/audit-2 ) |
557 |
cryptsetup? ( >=sys-fs/cryptsetup-1.6 ) |
558 |
gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0 ) |
559 |
gudev? ( >=dev-libs/glib-2[${MULTILIB_USEDEP}] ) |
560 |
http? ( net-libs/libmicrohttpd ) |
561 |
introspection? ( >=dev-libs/gobject-introspection-1.31.1 ) |
562 |
kmod? ( >=sys-apps/kmod-14-r1 ) |
563 |
lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] ) |
564 |
pam? ( virtual/pam ) |
565 |
python? ( ${PYTHON_DEPS} ) |
566 |
qrcode? ( media-gfx/qrencode ) |
567 |
selinux? ( sys-libs/libselinux ) |
568 |
tcpd? ( sys-apps/tcp-wrappers ) |
569 |
xattr? ( sys-apps/attr ) |
570 |
abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9 |
571 |
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
572 |
|
573 |
# baselayout-2.2 has /run |
574 |
RDEPEND="${COMMON_DEPEND} |
575 |
>=sys-apps/baselayout-2.2 |
576 |
|| ( |
577 |
>=sys-apps/util-linux-2.22 |
578 |
<sys-apps/sysvinit-2.88-r4 |
579 |
) |
580 |
!sys-auth/nss-myhostname |
581 |
!<sys-libs/glibc-2.10 |
582 |
!sys-fs/udev" |
583 |
|
584 |
PDEPEND=">=sys-apps/hwids-20130717-r1[udev] |
585 |
>=sys-fs/udev-init-scripts-25 |
586 |
policykit? ( sys-auth/polkit ) |
587 |
!vanilla? ( sys-apps/gentoo-systemd-integration )" |
588 |
|
589 |
# Newer linux-headers needed by ia64, bug #480218 |
590 |
DEPEND="${COMMON_DEPEND} |
591 |
app-arch/xz-utils |
592 |
app-text/docbook-xml-dtd:4.2 |
593 |
app-text/docbook-xsl-stylesheets |
594 |
dev-libs/libxslt |
595 |
dev-util/gperf |
596 |
>=dev-util/intltool-0.50 |
597 |
>=sys-devel/binutils-2.23.1 |
598 |
>=sys-devel/gcc-4.6 |
599 |
>=sys-kernel/linux-headers-${MINKV} |
600 |
ia64? ( >=sys-kernel/linux-headers-3.9 ) |
601 |
virtual/pkgconfig |
602 |
doc? ( >=dev-util/gtk-doc-1.18 )" |
603 |
|
604 |
#if LIVE |
605 |
DEPEND="${DEPEND} |
606 |
app-text/docbook-xml-dtd:4.2 |
607 |
app-text/docbook-xml-dtd:4.5 |
608 |
app-text/docbook-xsl-stylesheets |
609 |
dev-libs/libxslt:0 |
610 |
dev-libs/gobject-introspection |
611 |
>=dev-libs/libgcrypt-1.4.5:0" |
612 |
|
613 |
SRC_URI= |
614 |
KEYWORDS= |
615 |
#endif |
616 |
|
617 |
src_prepare() { |
618 |
if use doc; then |
619 |
gtkdocize --docdir docs/ || die |
620 |
else |
621 |
echo 'EXTRA_DIST =' > docs/gtk-doc.make |
622 |
fi |
623 |
|
624 |
# Bug 463376 |
625 |
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die |
626 |
|
627 |
autotools-utils_src_prepare |
628 |
} |
629 |
|
630 |
pkg_pretend() { |
631 |
local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS ~DEVTMPFS ~DMIID |
632 |
~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~PROC_FS |
633 |
~SECCOMP ~SIGNALFD ~SYSFS ~TIMERFD |
634 |
~!IDE ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 |
635 |
~!GRKERNSEC_PROC" |
636 |
|
637 |
use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" |
638 |
use pam && CONFIG_CHECK+=" ~AUDITSYSCALL" |
639 |
use xattr && CONFIG_CHECK+=" ~TMPFS_XATTR" |
640 |
kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" |
641 |
use firmware-loader || CONFIG_CHECK+=" ~!FW_LOADER_USER_HELPER" |
642 |
|
643 |
if linux_config_exists; then |
644 |
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
645 |
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then |
646 |
ewarn "It's recommended to set an empty value to the following kernel config option:" |
647 |
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
648 |
fi |
649 |
fi |
650 |
|
651 |
if [[ ${MERGE_TYPE} != binary ]]; then |
652 |
if [[ $(gcc-major-version) -lt 4 |
653 |
|| ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ) ]] |
654 |
then |
655 |
eerror "systemd requires at least gcc 4.6 to build. Please switch the active" |
656 |
eerror "gcc version using gcc-config." |
657 |
die "systemd requires at least gcc 4.6" |
658 |
fi |
659 |
fi |
660 |
|
661 |
if [[ ${MERGE_TYPE} != buildonly ]]; then |
662 |
if kernel_is -lt ${MINKV//./ }; then |
663 |
ewarn "Kernel version at least ${MINKV} required" |
664 |
fi |
665 |
|
666 |
if ! use firmware-loader && kernel_is -lt 3 8; then |
667 |
ewarn "You seem to be using kernel older than 3.8. Those kernel versions" |
668 |
ewarn "require systemd with USE=firmware-loader to support loading" |
669 |
ewarn "firmware. Missing this flag may cause some hardware not to work." |
670 |
fi |
671 |
|
672 |
check_extra_config |
673 |
fi |
674 |
} |
675 |
|
676 |
pkg_setup() { |
677 |
use python && python-single-r1_pkg_setup |
678 |
} |
679 |
|
680 |
multilib_src_configure() { |
681 |
local myeconfargs=( |
682 |
--localstatedir=/var |
683 |
--with-pamlibdir=$(getpam_mod_dir) |
684 |
# avoid bash-completion dep |
685 |
--with-bashcompletiondir="$(get_bashcompdir)" |
686 |
# make sure we get /bin:/sbin in $PATH |
687 |
--enable-split-usr |
688 |
# disable sysv compatibility |
689 |
--with-sysvinit-path= |
690 |
--with-sysvrcnd-path= |
691 |
# no deps |
692 |
--enable-efi |
693 |
--enable-ima |
694 |
# optional components/dependencies |
695 |
$(use_enable acl) |
696 |
$(use_enable audit) |
697 |
$(use_enable cryptsetup libcryptsetup) |
698 |
$(use_enable doc gtk-doc) |
699 |
$(use_enable gcrypt) |
700 |
$(use_enable gudev) |
701 |
$(use_enable http microhttpd) |
702 |
$(use_enable introspection) |
703 |
$(use_enable kmod) |
704 |
$(use_enable lzma xz) |
705 |
$(use_enable pam) |
706 |
$(use_enable policykit polkit) |
707 |
$(use_enable python python-devel) |
708 |
$(use python && echo PYTHON_CONFIG=/usr/bin/python-config-${EPYTHON#python}) |
709 |
$(use_enable qrcode qrencode) |
710 |
$(use_enable selinux) |
711 |
$(use_enable tcpd tcpwrap) |
712 |
$(use_enable test tests) |
713 |
$(use_enable xattr) |
714 |
|
715 |
# not supported (avoid automagic deps in the future) |
716 |
--disable-chkconfig |
717 |
|
718 |
# hardcode a few paths to spare some deps |
719 |
QUOTAON=/usr/sbin/quotaon |
720 |
QUOTACHECK=/usr/sbin/quotacheck |
721 |
) |
722 |
|
723 |
# Keep using the one where the rules were installed. |
724 |
MY_UDEVDIR=$(get_udevdir) |
725 |
|
726 |
if use firmware-loader; then |
727 |
myeconfargs+=( |
728 |
--with-firmware-path="/lib/firmware/updates:/lib/firmware" |
729 |
) |
730 |
fi |
731 |
|
732 |
if ! multilib_is_native_abi; then |
733 |
myeconfargs+=( |
734 |
ac_cv_search_cap_init= |
735 |
ac_cv_header_sys_capability_h=yes |
736 |
DBUS_CFLAGS=' ' |
737 |
DBUS_LIBS=' ' |
738 |
|
739 |
--disable-acl |
740 |
--disable-audit |
741 |
--disable-gcrypt |
742 |
--disable-gtk-doc |
743 |
--disable-introspection |
744 |
--disable-kmod |
745 |
--disable-libcryptsetup |
746 |
--disable-microhttpd |
747 |
--disable-pam |
748 |
--disable-polkit |
749 |
--disable-qrencode |
750 |
--disable-selinux |
751 |
--disable-tcpwrap |
752 |
--disable-tests |
753 |
--disable-xattr |
754 |
--disable-xz |
755 |
--disable-python-devel |
756 |
) |
757 |
fi |
758 |
|
759 |
# Work around bug 463846. |
760 |
tc-export CC |
761 |
|
762 |
autotools-utils_src_configure |
763 |
} |
764 |
|
765 |
multilib_src_compile() { |
766 |
local mymakeopts=( |
767 |
udevlibexecdir="${MY_UDEVDIR}" |
768 |
) |
769 |
|
770 |
if multilib_is_native_abi; then |
771 |
emake "${mymakeopts[@]}" |
772 |
else |
773 |
# prerequisites for gudev |
774 |
use gudev && emake src/gudev/gudev{enumtypes,marshal}.{c,h} |
775 |
|
776 |
echo 'gentoo: $(lib_LTLIBRARIES) $(pkgconfiglib_DATA)' | \ |
777 |
emake "${mymakeopts[@]}" -f Makefile -f - gentoo |
778 |
fi |
779 |
} |
780 |
|
781 |
multilib_src_test() { |
782 |
multilib_is_native_abi || continue |
783 |
|
784 |
default |
785 |
} |
786 |
|
787 |
multilib_src_install() { |
788 |
local mymakeopts=( |
789 |
# automake fails with parallel libtool relinking |
790 |
# https://bugs.gentoo.org/show_bug.cgi?id=491398 |
791 |
-j1 |
792 |
|
793 |
udevlibexecdir="${MY_UDEVDIR}" |
794 |
dist_udevhwdb_DATA= |
795 |
DESTDIR="${D}" |
796 |
) |
797 |
|
798 |
if multilib_is_native_abi; then |
799 |
emake "${mymakeopts[@]}" install |
800 |
else |
801 |
mymakeopts+=( |
802 |
install-libLTLIBRARIES |
803 |
install-pkgconfiglibDATA |
804 |
install-includeHEADERS |
805 |
# safe to call unconditionally, 'installs' empty list |
806 |
install-libgudev_includeHEADERS |
807 |
install-pkgincludeHEADERS |
808 |
) |
809 |
|
810 |
emake "${mymakeopts[@]}" |
811 |
fi |
812 |
} |
813 |
|
814 |
multilib_src_install_all() { |
815 |
prune_libtool_files --modules |
816 |
einstalldocs |
817 |
|
818 |
# we just keep sysvinit tools, so no need for the mans |
819 |
rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \ |
820 |
|| die |
821 |
rm "${D}"/usr/share/man/man1/init.1 || die |
822 |
|
823 |
# Disable storing coredumps in journald, bug #433457 |
824 |
mv "${D}"/usr/lib/sysctl.d/50-coredump.conf{,.disabled} || die |
825 |
|
826 |
# Preserve empty dirs in /etc & /var, bug #437008 |
827 |
keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \ |
828 |
/etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd |
829 |
|
830 |
# Symlink /etc/sysctl.conf for easy migration. |
831 |
dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf |
832 |
} |
833 |
|
834 |
migrate_locale() { |
835 |
local envd_locale_def="${EROOT%/}/etc/env.d/02locale" |
836 |
local envd_locale=( "${EROOT%/}"/etc/env.d/??locale ) |
837 |
local locale_conf="${EROOT%/}/etc/locale.conf" |
838 |
|
839 |
if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
840 |
# if locale.conf does not exist... |
841 |
if [[ -e ${envd_locale} ]]; then |
842 |
# ...either copy env.d/??locale if there's one |
843 |
ebegin "Moving ${envd_locale} to ${locale_conf}" |
844 |
mv "${envd_locale}" "${locale_conf}" |
845 |
eend ${?} || FAIL=1 |
846 |
else |
847 |
# ...or create a dummy default |
848 |
ebegin "Creating ${locale_conf}" |
849 |
cat > "${locale_conf}" <<-EOF |
850 |
# This file has been created by the sys-apps/systemd ebuild. |
851 |
# See locale.conf(5) and localectl(1). |
852 |
|
853 |
# LANG=${LANG} |
854 |
EOF |
855 |
eend ${?} || FAIL=1 |
856 |
fi |
857 |
fi |
858 |
|
859 |
if [[ ! -L ${envd_locale} ]]; then |
860 |
# now, if env.d/??locale is not a symlink (to locale.conf)... |
861 |
if [[ -e ${envd_locale} ]]; then |
862 |
# ...warn the user that he has duplicate locale settings |
863 |
ewarn |
864 |
ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
865 |
ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
866 |
ewarn "and create the symlink with the following command:" |
867 |
ewarn "ln -s -n -f ../locale.conf ${envd_locale}" |
868 |
ewarn |
869 |
else |
870 |
# ...or just create the symlink if there's nothing here |
871 |
ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" |
872 |
ln -n -s ../locale.conf "${envd_locale_def}" |
873 |
eend ${?} || FAIL=1 |
874 |
fi |
875 |
fi |
876 |
} |
877 |
|
878 |
pkg_postinst() { |
879 |
enewgroup systemd-journal |
880 |
if use http; then |
881 |
enewgroup systemd-journal-gateway |
882 |
enewuser systemd-journal-gateway -1 -1 -1 systemd-journal-gateway |
883 |
fi |
884 |
systemd_update_catalog |
885 |
|
886 |
# Keep this here in case the database format changes so it gets updated |
887 |
# when required. Despite that this file is owned by sys-apps/hwids. |
888 |
if has_version "sys-apps/hwids[udev]"; then |
889 |
udevadm hwdb --update --root="${ROOT%/}" |
890 |
fi |
891 |
|
892 |
udev_reload || FAIL=1 |
893 |
|
894 |
# Bug 468876 |
895 |
fcaps cap_dac_override,cap_sys_ptrace=ep usr/bin/systemd-detect-virt |
896 |
|
897 |
# Bug 465468, make sure locales are respect, and ensure consistency |
898 |
# between OpenRC & systemd |
899 |
migrate_locale |
900 |
|
901 |
if [[ ${FAIL} ]]; then |
902 |
eerror "One of the postinst commands failed. Please check the postinst output" |
903 |
eerror "for errors. You may need to clean up your system and/or try installing" |
904 |
eerror "systemd again." |
905 |
eerror |
906 |
fi |
907 |
|
908 |
if [[ ! -L "${ROOT}"/etc/mtab ]]; then |
909 |
ewarn "Upstream mandates the /etc/mtab file should be a symlink to /proc/mounts." |
910 |
ewarn "Not having it is not supported by upstream and will cause tools like 'df'" |
911 |
ewarn "and 'mount' to not work properly. Please run:" |
912 |
ewarn " # ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'" |
913 |
ewarn |
914 |
fi |
915 |
|
916 |
if ! has_version sys-apps/systemd-ui; then |
917 |
elog "To get additional features, a number of optional runtime dependencies may" |
918 |
elog "be installed:" |
919 |
elog "- sys-apps/systemd-ui: for GTK+ systemadm UI and gnome-ask-password-agent" |
920 |
fi |
921 |
} |
922 |
|
923 |
pkg_prerm() { |
924 |
# If removing systemd completely, remove the catalog database. |
925 |
if [[ ! ${REPLACED_BY_VERSION} ]]; then |
926 |
rm -f -v "${EROOT}"/var/lib/systemd/catalog/database |
927 |
fi |
928 |
} |