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, 30 Jun 2017 10:01:16
Message-Id: 1498816861.8f40ddacf416c4a813accfb1f2cc54ee5b1e2d66.polynomial-c@gentoo
1 commit: 8f40ddacf416c4a813accfb1f2cc54ee5b1e2d66
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 30 09:57:39 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 30 10:01:01 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f40ddac
7
8 sys-apps/dbus: Bump to version 1.10.20
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 sys-apps/dbus/Manifest | 1 +
13 sys-apps/dbus/dbus-1.10.20.ebuild | 274 ++++++++++++++++++++++++++++++++++++++
14 2 files changed, 275 insertions(+)
15
16 diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
17 index f6df01184c0..34a0411b646 100644
18 --- a/sys-apps/dbus/Manifest
19 +++ b/sys-apps/dbus/Manifest
20 @@ -1 +1,2 @@
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
24 diff --git a/sys-apps/dbus/dbus-1.10.20.ebuild b/sys-apps/dbus/dbus-1.10.20.ebuild
25 new file mode 100644
26 index 00000000000..850235a998a
27 --- /dev/null
28 +++ b/sys-apps/dbus/dbus-1.10.20.ebuild
29 @@ -0,0 +1,274 @@
30 +# Copyright 1999-2017 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=6
34 +PYTHON_COMPAT=( python2_7 )
35 +
36 +inherit autotools eutils linux-info flag-o-matic python-any-r1 readme.gentoo-r1 systemd virtualx user multilib-minimal
37 +
38 +DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
39 +HOMEPAGE="https://dbus.freedesktop.org/"
40 +SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.gz"
41 +
42 +LICENSE="|| ( AFL-2.1 GPL-2 )"
43 +SLOT="0"
44 +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"
45 +IUSE="debug doc elogind selinux static-libs systemd test user-session X"
46 +
47 +RESTRICT="test"
48 +
49 +REQUIRED_USE="?? ( elogind systemd )"
50 +
51 +CDEPEND="
52 + >=dev-libs/expat-2
53 + selinux? (
54 + sys-libs/libselinux
55 + )
56 + elogind? ( sys-auth/elogind )
57 + systemd? ( sys-apps/systemd:0= )
58 + X? (
59 + x11-libs/libX11
60 + x11-libs/libXt
61 + )
62 + abi_x86_32? (
63 + !<=app-emulation/emul-linux-x86-baselibs-20131008-r4
64 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
65 + )
66 +"
67 +DEPEND="${CDEPEND}
68 + app-text/xmlto
69 + app-text/docbook-xml-dtd:4.4
70 + virtual/pkgconfig
71 + doc? ( app-doc/doxygen )
72 + test? (
73 + >=dev-libs/glib-2.36:2
74 + ${PYTHON_DEPS}
75 + )
76 +"
77 +RDEPEND="${CDEPEND}
78 + selinux? ( sec-policy/selinux-dbus )
79 +"
80 +
81 +DOC_CONTENTS="
82 + Some applications require a session bus in addition to the system
83 + bus. Please see \`man dbus-launch\` for more information.
84 +"
85 +
86 +# out of sources build dir for make check
87 +TBD=${WORKDIR}/${P}-tests-build
88 +
89 +pkg_setup() {
90 + enewgroup messagebus
91 + enewuser messagebus -1 -1 -1 messagebus
92 +
93 + use test && python-any-r1_pkg_setup
94 +
95 + if use kernel_linux; then
96 + CONFIG_CHECK="~EPOLL"
97 + linux-info_pkg_setup
98 + fi
99 +}
100 +
101 +src_prepare() {
102 + # Tests were restricted because of this
103 + sed -i \
104 + -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
105 + -e '/"dispatch"/d' \
106 + bus/test-main.c || die
107 +
108 + eapply "${FILESDIR}/${PN}-enable-elogind.patch"
109 +
110 + eapply_user
111 +
112 + # required for asneeded patch but also for bug 263909, cross-compile so
113 + # don't remove eautoreconf
114 + eautoreconf
115 +}
116 +
117 +multilib_src_configure() {
118 + local docconf myconf
119 +
120 + # so we can get backtraces from apps
121 + case ${CHOST} in
122 + *-mingw*)
123 + # error: unrecognized command line option '-rdynamic' wrt #488036
124 + ;;
125 + *)
126 + append-flags -rdynamic
127 + ;;
128 + esac
129 +
130 + # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
131 + # not on an SELinux profile.
132 + myconf=(
133 + --localstatedir="${EPREFIX}/var"
134 + --docdir="${EPREFIX}/usr/share/doc/${PF}"
135 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
136 + $(use_enable static-libs static)
137 + $(use_enable debug verbose-mode)
138 + --disable-asserts
139 + --disable-checks
140 + $(use_enable selinux)
141 + $(use_enable selinux libaudit)
142 + --disable-apparmor
143 + $(use_enable kernel_linux inotify)
144 + $(use_enable kernel_FreeBSD kqueue)
145 + $(use_enable elogind)
146 + $(use_enable systemd)
147 + $(use_enable user-session)
148 + --disable-embedded-tests
149 + --disable-modular-tests
150 + $(use_enable debug stats)
151 + --with-session-socket-dir="${EPREFIX}"/tmp
152 + --with-system-pid-file="${EPREFIX}"/var/run/dbus.pid
153 + --with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket
154 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
155 + --with-dbus-user=messagebus
156 + $(use_with X x)
157 + )
158 +
159 + if [[ ${CHOST} == *-darwin* ]]; then
160 + myconf+=(
161 + --enable-launchd
162 + --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
163 + )
164 + fi
165 +
166 + if multilib_is_native_abi; then
167 + docconf=(
168 + --enable-xml-docs
169 + $(use_enable doc doxygen-docs)
170 + )
171 + else
172 + docconf=(
173 + --disable-xml-docs
174 + --disable-doxygen-docs
175 + )
176 + myconf+=(
177 + --disable-selinux
178 + --disable-libaudit
179 + --disable-elogind
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 + if use user-session; then
293 + ewarn "You have enabled user-session. Please note this can cause"
294 + ewarn "bogus behaviors in several dbus consumers that are not prepared"
295 + ewarn "for this dbus activation method yet."
296 + ewarn
297 + ewarn "See the following link for background on this change:"
298 + ewarn "https://lists.freedesktop.org/archives/systemd-devel/2015-January/027711.html"
299 + ewarn
300 + ewarn "Known issues are tracked here:"
301 + ewarn "https://bugs.gentoo.org/show_bug.cgi?id=576028"
302 + fi
303 +}