Gentoo Archives: gentoo-commits

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