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