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