Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/
Date: Fri, 28 Jul 2017 07:41:34
Message-Id: 1501227062.59bafda20112b585374fca51c84f77e338904bd3.polynomial-c@gentoo
1 commit: 59bafda20112b585374fca51c84f77e338904bd3
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 28 07:31:02 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 28 07:31:02 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59bafda2
7
8 sys-apps/dbus: Bump to version 1.10.22
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 sys-apps/dbus/Manifest | 1 +
13 sys-apps/dbus/dbus-1.10.22.ebuild | 267 ++++++++++++++++++++++++++++++++++++++
14 2 files changed, 268 insertions(+)
15
16 diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
17 index 34a0411b646..79abdba0e4c 100644
18 --- a/sys-apps/dbus/Manifest
19 +++ b/sys-apps/dbus/Manifest
20 @@ -1,2 +1,3 @@
21 DIST dbus-1.10.18.tar.gz 1986589 SHA256 6049ddd5f3f3e2618f615f1faeda0a115104423a7996b7aa73e2f36e38cc514a SHA512 726f97d0a2016f4f0625ba332e93e2d33bb16857cd35cb6c79da0f44fff297df948c3df62c31ffbec34713a7b85b3ff5b65f31517fe3511ddbd3bf18bd4748ed WHIRLPOOL ee164e1f6de80595fbfbcbad65d78dab4b91b5ec4e1ce88e1c4015f1c1b531f09796d54db163b2c2eceb3b92261f8a57852d2e0b29f71d9c65f9b91684433d9e
22 DIST dbus-1.10.20.tar.gz 1989628 SHA256 e574b9780b5425fde4d973bb596e7ea0f09e00fe2edd662da9016e976c460b48 SHA512 0e43866b56d6ae4a5d885044793573908ce95b4dd84822292efa87f5eb0dec3d09adf58af0574ca41259b16c3d70476ef956b6c8aa3bf9ca7461e6196be71daf WHIRLPOOL 08c7b4d77cd40a8b8369f5272669cc981ec64af2f4f1233b450005e44c1db0e602aa720064dcc709e298cb4bf54db0210f9c3d93674ca2f176f47d55d6ae116d
23 +DIST dbus-1.10.22.tar.gz 1989350 SHA256 e2b1401e3eedc7b5c9a2034d31254c886e1fcbc7858006e0a1c59158fe4b7b97 SHA512 c5c0040717ecef66b788c5bcda94463c079502b5004639b3c1e93bb92b4de5d9be8b3fe43e18843f1d9e50411f742ba8a869375b57d479882f8aee46b613c545 WHIRLPOOL efc4a6efc78ac5ce3ba34b512ef4d74fb5f3cda563b4dcead1baf4f2d77d578fb54e8f9e69c1aa6ddf5f776bc050be69f1086428f293c0032f47acbaf66669eb
24
25 diff --git a/sys-apps/dbus/dbus-1.10.22.ebuild b/sys-apps/dbus/dbus-1.10.22.ebuild
26 new file mode 100644
27 index 00000000000..b166421a711
28 --- /dev/null
29 +++ b/sys-apps/dbus/dbus-1.10.22.ebuild
30 @@ -0,0 +1,267 @@
31 +# Copyright 1999-2017 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +PYTHON_COMPAT=( python2_7 )
36 +
37 +inherit autotools ltprune linux-info flag-o-matic python-any-r1 readme.gentoo-r1 systemd virtualx user multilib-minimal
38 +
39 +DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
40 +HOMEPAGE="https://dbus.freedesktop.org/"
41 +SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.gz"
42 +
43 +LICENSE="|| ( AFL-2.1 GPL-2 )"
44 +SLOT="0"
45 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
46 +IUSE="debug doc elogind selinux static-libs systemd test user-session X"
47 +
48 +RESTRICT="test"
49 +
50 +REQUIRED_USE="?? ( elogind systemd )"
51 +
52 +CDEPEND="
53 + >=dev-libs/expat-2
54 + selinux? ( sys-libs/libselinux )
55 + elogind? ( sys-auth/elogind )
56 + systemd? ( sys-apps/systemd:0= )
57 + X? (
58 + x11-libs/libX11
59 + x11-libs/libXt
60 + )
61 +"
62 +DEPEND="${CDEPEND}
63 + app-text/xmlto
64 + app-text/docbook-xml-dtd:4.4
65 + virtual/pkgconfig
66 + doc? ( app-doc/doxygen )
67 + test? (
68 + >=dev-libs/glib-2.36:2
69 + ${PYTHON_DEPS}
70 + )
71 +"
72 +RDEPEND="${CDEPEND}
73 + selinux? ( sec-policy/selinux-dbus )
74 +"
75 +
76 +DOC_CONTENTS="
77 + Some applications require a session bus in addition to the system
78 + bus. Please see \`man dbus-launch\` for more information.
79 +"
80 +
81 +# out of sources build dir for make check
82 +TBD="${WORKDIR}/${P}-tests-build"
83 +
84 +pkg_setup() {
85 + enewgroup messagebus
86 + enewuser messagebus -1 -1 -1 messagebus
87 +
88 + use test && python-any-r1_pkg_setup
89 +
90 + if use kernel_linux; then
91 + CONFIG_CHECK="~EPOLL"
92 + linux-info_pkg_setup
93 + fi
94 +}
95 +
96 +src_prepare() {
97 + # Tests were restricted because of this
98 + sed -i \
99 + -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
100 + -e '/"dispatch"/d' \
101 + bus/test-main.c || die
102 +
103 + eapply "${FILESDIR}/${PN}-enable-elogind.patch"
104 +
105 + eapply_user
106 +
107 + # required for bug 263909, cross-compile so don't remove eautoreconf
108 + eautoreconf
109 +}
110 +
111 +multilib_src_configure() {
112 + local docconf myconf
113 +
114 + # so we can get backtraces from apps
115 + case ${CHOST} in
116 + *-mingw*)
117 + # error: unrecognized command line option '-rdynamic' wrt #488036
118 + ;;
119 + *)
120 + append-flags -rdynamic
121 + ;;
122 + esac
123 +
124 + # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
125 + # not on an SELinux profile.
126 + myconf=(
127 + --localstatedir="${EPREFIX}/var"
128 + --docdir="${EPREFIX}/usr/share/doc/${PF}"
129 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
130 + $(use_enable static-libs static)
131 + $(use_enable debug verbose-mode)
132 + --disable-asserts
133 + --disable-checks
134 + $(use_enable selinux)
135 + $(use_enable selinux libaudit)
136 + --disable-apparmor
137 + $(use_enable kernel_linux inotify)
138 + $(use_enable kernel_FreeBSD kqueue)
139 + $(use_enable elogind)
140 + $(use_enable systemd)
141 + $(use_enable user-session)
142 + --disable-embedded-tests
143 + --disable-modular-tests
144 + $(use_enable debug stats)
145 + --with-session-socket-dir="${EPREFIX}"/tmp
146 + --with-system-pid-file="${EPREFIX}"/var/run/dbus.pid
147 + --with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket
148 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
149 + --with-dbus-user=messagebus
150 + $(use_with X x)
151 + )
152 +
153 + if [[ ${CHOST} == *-darwin* ]]; then
154 + myconf+=(
155 + --enable-launchd
156 + --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
157 + )
158 + fi
159 +
160 + if multilib_is_native_abi; then
161 + docconf=(
162 + --enable-xml-docs
163 + $(use_enable doc doxygen-docs)
164 + )
165 + else
166 + docconf=(
167 + --disable-xml-docs
168 + --disable-doxygen-docs
169 + )
170 + myconf+=(
171 + --disable-selinux
172 + --disable-libaudit
173 + --disable-elogind
174 + --disable-systemd
175 + --without-x
176 +
177 + # expat is used for the daemon only
178 + # fake the check for multilib library build
179 + ac_cv_lib_expat_XML_ParserCreate_MM=yes
180 + )
181 + fi
182 +
183 + einfo "Running configure in ${BUILD_DIR}"
184 + ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
185 +
186 + if multilib_is_native_abi && use test; then
187 + mkdir "${TBD}" || die
188 + cd "${TBD}" || die
189 + einfo "Running configure in ${TBD}"
190 + ECONF_SOURCE="${S}" econf "${myconf[@]}" \
191 + $(use_enable test asserts) \
192 + $(use_enable test checks) \
193 + $(use_enable test embedded-tests) \
194 + $(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
195 + fi
196 +}
197 +
198 +multilib_src_compile() {
199 + if multilib_is_native_abi; then
200 + # after the compile, it uses a selinuxfs interface to
201 + # check if the SELinux policy has the right support
202 + use selinux && addwrite /selinux/access
203 +
204 + einfo "Running make in ${BUILD_DIR}"
205 + emake
206 +
207 + if use test; then
208 + einfo "Running make in ${TBD}"
209 + emake -C "${TBD}"
210 + fi
211 + else
212 + emake -C dbus libdbus-1.la
213 + fi
214 +}
215 +
216 +src_test() {
217 + DBUS_VERBOSE=1 Xemake -j1 -C "${TBD}" check
218 +}
219 +
220 +multilib_src_install() {
221 + if multilib_is_native_abi; then
222 + emake DESTDIR="${D}" install
223 + else
224 + emake DESTDIR="${D}" install-pkgconfigDATA
225 + emake DESTDIR="${D}" -C dbus \
226 + install-libLTLIBRARIES install-dbusincludeHEADERS \
227 + install-nodist_dbusarchincludeHEADERS
228 + fi
229 +}
230 +
231 +multilib_src_install_all() {
232 + newinitd "${FILESDIR}"/dbus.initd-r1 dbus
233 +
234 + if use X; then
235 + # dbus X session script (#77504)
236 + # turns out to only work for GDM (and startx). has been merged into
237 + # other desktop (kdm and such scripts)
238 + exeinto /etc/X11/xinit/xinitrc.d
239 + doexe "${FILESDIR}"/80-dbus
240 + fi
241 +
242 + # needs to exist for dbus sessions to launch
243 + keepdir /usr/share/dbus-1/services
244 + keepdir /etc/dbus-1/{session,system}.d
245 + # machine-id symlink from pkg_postinst()
246 + keepdir /var/lib/dbus
247 + # let the init script create the /var/run/dbus directory
248 + rm -rf "${ED}"/var/run
249 +
250 + dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
251 + readme.gentoo_create_doc
252 +
253 + prune_libtool_files --all
254 +}
255 +
256 +pkg_postinst() {
257 + readme.gentoo_print_elog
258 +
259 + # Ensure unique id is generated and put it in /etc wrt #370451 but symlink
260 + # for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
261 + # dependencies with hardcoded paths (although the known ones got fixed already)
262 + dbus-uuidgen --ensure="${EROOT%/}"/etc/machine-id
263 + ln -sf "${EPREFIX%/}"/etc/machine-id "${EROOT%/}"/var/lib/dbus/machine-id
264 +
265 + if [[ ${CHOST} == *-darwin* ]]; then
266 + local plist="org.freedesktop.dbus-session.plist"
267 + elog
268 + elog
269 + elog "For MacOS/Darwin we now ship launchd support for dbus."
270 + elog "This enables autolaunch of dbus at session login and makes"
271 + elog "dbus usable under MacOS/Darwin."
272 + elog
273 + elog "The launchd plist file ${plist} has been"
274 + elog "installed in ${EPREFIX}/Library/LaunchAgents."
275 + elog "For it to be used, you will have to do all of the following:"
276 + elog " + cd ~/Library/LaunchAgents"
277 + elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
278 + elog " + logout and log back in"
279 + elog
280 + elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
281 + elog "specified and refused to start otherwise, then export the"
282 + elog "the following to your environment:"
283 + elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
284 + fi
285 +
286 + if use user-session; then
287 + ewarn "You have enabled user-session. Please note this can cause"
288 + ewarn "bogus behaviors in several dbus consumers that are not prepared"
289 + ewarn "for this dbus activation method yet."
290 + ewarn
291 + ewarn "See the following link for background on this change:"
292 + ewarn "https://lists.freedesktop.org/archives/systemd-devel/2015-January/027711.html"
293 + ewarn
294 + ewarn "Known issues are tracked here:"
295 + ewarn "https://bugs.gentoo.org/show_bug.cgi?id=576028"
296 + fi
297 +}