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