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