Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/, sys-apps/dbus/files/
Date: Sun, 06 Dec 2015 17:41:03
Message-Id: 1449422916.86785cf34413a9de72c2f882888e4ff21a113c49.floppym@gentoo
1 commit: 86785cf34413a9de72c2f882888e4ff21a113c49
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 6 17:22:23 2015 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 6 17:28:36 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86785cf3
7
8 sys-apps/dbus: Bump to 1.10.6
9
10 Enables systemd user sessions.
11
12 init script rewrite by Polynomial-C, tweaked by me.
13
14 Package-Manager: portage-2.2.26_p10
15
16 sys-apps/dbus/Manifest | 1 +
17 sys-apps/dbus/dbus-1.10.6.ebuild | 255 ++++++++++++++++++++++++++++++++++++++
18 sys-apps/dbus/files/dbus.initd-r1 | 37 ++++++
19 3 files changed, 293 insertions(+)
20
21 diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
22 index 93b8c20..b371dba 100644
23 --- a/sys-apps/dbus/Manifest
24 +++ b/sys-apps/dbus/Manifest
25 @@ -1,3 +1,4 @@
26 +DIST dbus-1.10.6.tar.gz 1952608 SHA256 b5fefa08a77edd76cd64d872db949eebc02cf6f3f8be82e4bbc641742af5d35f SHA512 56108dde5097b063b25ef6e42e573b7e1affd5b5a6ce3c745e2de21b434d86542ac6b7c384572826f867a5c471692cc7468c74c4b0cf4a1f60a1a41b0394fb3c WHIRLPOOL 6b95e34e1c8f431c24bd95d09f2cf8fe7bbec68e273f3c31883fb46a638e24304f1f345064cece01693ba4cbff9de8cc668b4c8063a87bf0e71f1ba4a682f97f
27 DIST dbus-1.8.16.tar.gz 1866436 SHA256 7f795268efd343ff0498786acb35097564390d40b1b6158daf1b4f742b522b07 SHA512 79e0fb21912fe5644e1babf96fc2a64595edef6524ef50d54f6beb8cd0f1224b8484a52a7815494b40bd00bf048176002ab35443c0bb6bd04abdc3c60599f1d5 WHIRLPOOL 5e992caf51c0fb24885099b957ce01205a249118c5db27c5161e6d45ae85a889d7f26d32dfa03a207025e87e233f74c6cffd09a5ccc44d4e598d3d535b8d4247
28 DIST dbus-1.8.18.tar.gz 1868625 SHA256 36f2eb9c777a3c71562573da36a147e900a642afcd44d2b0470d992a4898c4f2 SHA512 4995246af3f940b939231a4af6ba743902e1260e1d1cca607d5b36c1cda4e5b1d586dd99e2b45c5058e04cf49e81217c68395fb1b22302438d9acb6a08e7d82e WHIRLPOOL 294ce01e260928388d2ac78e46bb00bc1305486ed11a19fa457d2581845ad15e64ae229ce8b778a3835722a1520ec234b0b8c7691cb3f98744181b652cf14a3c
29 DIST dbus-1.8.20.tar.gz 1871722 SHA256 5c4fbf4c64621c96e871da91d2b729a5b00536e116d3c4612a469d924b1b703a SHA512 d63c29267e0445e329dc811e72d7858847fbae260920fd359b1fa889f08dead2a8b380e372718994daa92a262af970d1fcc58034fbcb8ffb3026ab5f30f63067 WHIRLPOOL 9eaf3ab12396159e119cfe3435fc5d160440dab4c4abce4d506450f6db59b72e6e4feba43b1ee9fd304a8e514983186a8e61f3a1f0c917c2c72891f72167201e
30
31 diff --git a/sys-apps/dbus/dbus-1.10.6.ebuild b/sys-apps/dbus/dbus-1.10.6.ebuild
32 new file mode 100644
33 index 0000000..c7e7c59
34 --- /dev/null
35 +++ b/sys-apps/dbus/dbus-1.10.6.ebuild
36 @@ -0,0 +1,255 @@
37 +# Copyright 1999-2015 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +# $Id$
40 +
41 +EAPI=5
42 +PYTHON_COMPAT=( python2_7 )
43 +
44 +inherit autotools eutils linux-info flag-o-matic python-any-r1 readme.gentoo systemd virtualx user multilib-minimal
45 +
46 +DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
47 +HOMEPAGE="http://dbus.freedesktop.org/"
48 +SRC_URI="http://dbus.freedesktop.org/releases/dbus/${P}.tar.gz"
49 +
50 +LICENSE="|| ( AFL-2.1 GPL-2 )"
51 +SLOT="0"
52 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
53 +IUSE="debug doc selinux static-libs systemd test X"
54 +
55 +RESTRICT="test"
56 +
57 +CDEPEND="
58 + >=dev-libs/expat-2
59 + selinux? (
60 + sys-libs/libselinux
61 + )
62 + systemd? ( sys-apps/systemd:0= )
63 + X? (
64 + x11-libs/libX11
65 + x11-libs/libXt
66 + )
67 + abi_x86_32? (
68 + !<=app-emulation/emul-linux-x86-baselibs-20131008-r4
69 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
70 + )
71 +"
72 +DEPEND="${CDEPEND}
73 + app-text/xmlto
74 + app-text/docbook-xml-dtd:4.4
75 + virtual/pkgconfig
76 + doc? ( app-doc/doxygen )
77 + test? (
78 + >=dev-libs/glib-2.36:2
79 + ${PYTHON_DEPS}
80 + )
81 +"
82 +RDEPEND="${CDEPEND}
83 + selinux? ( sec-policy/selinux-dbus )
84 +"
85 +
86 +DOC_CONTENTS="
87 + Some applications require a session bus in addition to the system
88 + bus. Please see \`man dbus-launch\` for more information.
89 +"
90 +
91 +# out of sources build dir for make check
92 +TBD=${WORKDIR}/${P}-tests-build
93 +
94 +pkg_setup() {
95 + enewgroup messagebus
96 + enewuser messagebus -1 -1 -1 messagebus
97 +
98 + use test && python-any-r1_pkg_setup
99 +
100 + if use kernel_linux; then
101 + CONFIG_CHECK="~EPOLL"
102 + linux-info_pkg_setup
103 + fi
104 +}
105 +
106 +src_prepare() {
107 + # Tests were restricted because of this
108 + sed -i \
109 + -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
110 + -e '/"dispatch"/d' \
111 + bus/test-main.c || die
112 +
113 + epatch_user
114 +
115 + # required for asneeded patch but also for bug 263909, cross-compile so
116 + # don't remove eautoreconf
117 + eautoreconf
118 +}
119 +
120 +multilib_src_configure() {
121 + local docconf myconf
122 +
123 + # so we can get backtraces from apps
124 + case ${CHOST} in
125 + *-mingw*)
126 + # error: unrecognized command line option '-rdynamic' wrt #488036
127 + ;;
128 + *)
129 + append-flags -rdynamic
130 + ;;
131 + esac
132 +
133 + # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
134 + # not on an SELinux profile.
135 + myconf=(
136 + --localstatedir="${EPREFIX}/var"
137 + --docdir="${EPREFIX}/usr/share/doc/${PF}"
138 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
139 + $(use_enable static-libs static)
140 + $(use_enable debug verbose-mode)
141 + --disable-asserts
142 + --disable-checks
143 + $(use_enable selinux)
144 + $(use_enable selinux libaudit)
145 + $(use_enable kernel_linux inotify)
146 + $(use_enable kernel_FreeBSD kqueue)
147 + $(use_enable systemd)
148 + $(use_enable systemd user-session)
149 + --disable-embedded-tests
150 + --disable-modular-tests
151 + $(use_enable debug stats)
152 + --with-session-socket-dir="${EPREFIX}"/tmp
153 + --with-system-pid-file="${EPREFIX}"/var/run/dbus.pid
154 + --with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket
155 + --with-dbus-user=messagebus
156 + $(use_with X x)
157 + "$(systemd_with_unitdir)"
158 + )
159 +
160 + if [[ ${CHOST} == *-darwin* ]]; then
161 + myconf+=(
162 + --enable-launchd
163 + --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
164 + )
165 + fi
166 +
167 + if multilib_is_native_abi; then
168 + docconf=(
169 + --enable-xml-docs
170 + $(use_enable doc doxygen-docs)
171 + )
172 + else
173 + docconf=(
174 + --disable-xml-docs
175 + --disable-doxygen-docs
176 + )
177 + myconf+=(
178 + --disable-selinux
179 + --disable-libaudit
180 + --disable-systemd
181 + --without-x
182 +
183 + # expat is used for the daemon only
184 + # fake the check for multilib library build
185 + ac_cv_lib_expat_XML_ParserCreate_MM=yes
186 + )
187 + fi
188 +
189 + einfo "Running configure in ${BUILD_DIR}"
190 + ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
191 +
192 + if multilib_is_native_abi && use test; then
193 + mkdir "${TBD}" || die
194 + cd "${TBD}" || die
195 + einfo "Running configure in ${TBD}"
196 + ECONF_SOURCE="${S}" econf "${myconf[@]}" \
197 + $(use_enable test asserts) \
198 + $(use_enable test checks) \
199 + $(use_enable test embedded-tests) \
200 + $(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
201 + fi
202 +}
203 +
204 +multilib_src_compile() {
205 + if multilib_is_native_abi; then
206 + # after the compile, it uses a selinuxfs interface to
207 + # check if the SELinux policy has the right support
208 + use selinux && addwrite /selinux/access
209 +
210 + einfo "Running make in ${BUILD_DIR}"
211 + emake
212 +
213 + if use test; then
214 + einfo "Running make in ${TBD}"
215 + emake -C "${TBD}"
216 + fi
217 + else
218 + emake -C dbus libdbus-1.la
219 + fi
220 +}
221 +
222 +src_test() {
223 + DBUS_VERBOSE=1 Xemake -j1 -C "${TBD}" check
224 +}
225 +
226 +multilib_src_install() {
227 + if multilib_is_native_abi; then
228 + emake DESTDIR="${D}" install
229 + else
230 + emake DESTDIR="${D}" install-pkgconfigDATA
231 + emake DESTDIR="${D}" -C dbus \
232 + install-libLTLIBRARIES install-dbusincludeHEADERS \
233 + install-nodist_dbusarchincludeHEADERS
234 + fi
235 +}
236 +
237 +multilib_src_install_all() {
238 + newinitd "${FILESDIR}"/dbus.initd-r1 dbus
239 +
240 + if use X; then
241 + # dbus X session script (#77504)
242 + # turns out to only work for GDM (and startx). has been merged into
243 + # other desktop (kdm and such scripts)
244 + exeinto /etc/X11/xinit/xinitrc.d
245 + doexe "${FILESDIR}"/80-dbus
246 + fi
247 +
248 + # needs to exist for dbus sessions to launch
249 + keepdir /usr/share/dbus-1/services
250 + keepdir /etc/dbus-1/{session,system}.d
251 + # machine-id symlink from pkg_postinst()
252 + keepdir /var/lib/dbus
253 + # let the init script create the /var/run/dbus directory
254 + rm -rf "${ED}"/var/run
255 +
256 + dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
257 + readme.gentoo_create_doc
258 +
259 + prune_libtool_files --all
260 +}
261 +
262 +pkg_postinst() {
263 + readme.gentoo_print_elog
264 +
265 + # Ensure unique id is generated and put it in /etc wrt #370451 but symlink
266 + # for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
267 + # dependencies with hardcoded paths (although the known ones got fixed already)
268 + dbus-uuidgen --ensure="${EROOT%/}"/etc/machine-id
269 + ln -sf "${EPREFIX}"/etc/machine-id "${EROOT%/}"/var/lib/dbus/machine-id
270 +
271 + if [[ ${CHOST} == *-darwin* ]]; then
272 + local plist="org.freedesktop.dbus-session.plist"
273 + elog
274 + elog
275 + elog "For MacOS/Darwin we now ship launchd support for dbus."
276 + elog "This enables autolaunch of dbus at session login and makes"
277 + elog "dbus usable under MacOS/Darwin."
278 + elog
279 + elog "The launchd plist file ${plist} has been"
280 + elog "installed in ${EPREFIX}/Library/LaunchAgents."
281 + elog "For it to be used, you will have to do all of the following:"
282 + elog " + cd ~/Library/LaunchAgents"
283 + elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
284 + elog " + logout and log back in"
285 + elog
286 + elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
287 + elog "specified and refused to start otherwise, then export the"
288 + elog "the following to your environment:"
289 + elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
290 + fi
291 +}
292
293 diff --git a/sys-apps/dbus/files/dbus.initd-r1 b/sys-apps/dbus/files/dbus.initd-r1
294 new file mode 100644
295 index 0000000..a7cf24d
296 --- /dev/null
297 +++ b/sys-apps/dbus/files/dbus.initd-r1
298 @@ -0,0 +1,37 @@
299 +#!/sbin/runscript
300 +# Copyright 1999-2015 Gentoo Foundation
301 +# Distributed under the terms of the GNU General Public License, v2 or later
302 +# $Id$
303 +
304 +extra_started_commands="reload"
305 +
306 +description="An IPC message bus daemon"
307 +pidfile="/var/run/dbus.pid"
308 +command="/usr/bin/dbus-daemon"
309 +command_args="--system"
310 +
311 +dbus_socket="/var/run/dbus/system_bus_socket"
312 +
313 +depend() {
314 + need localmount
315 + after bootmisc
316 +}
317 +
318 +start_pre() {
319 + /usr/bin/dbus-uuidgen --ensure=/etc/machine-id
320 +
321 + # We need to test if /var/run/dbus exists, since script will fail if it does not
322 + checkpath -q -d /var/run/dbus
323 +}
324 +
325 +stop_post() {
326 + [ ! -S "${dbus_socket}" ] || rm -f "${dbus_socket}"
327 +}
328 +
329 +reload() {
330 + ebegin "Reloading D-BUS messagebus config"
331 + /usr/bin/dbus-send --print-reply --system --type=method_call \
332 + --dest=org.freedesktop.DBus \
333 + / org.freedesktop.DBus.ReloadConfig > /dev/null
334 + eend $?
335 +}