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: Thu, 02 Jul 2020 19:38:29
Message-Id: 1593718693.181adb9d0916b582f4054f40eaead9fdfeb66482.polynomial-c@gentoo
1 commit: 181adb9d0916b582f4054f40eaead9fdfeb66482
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 2 19:12:00 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 2 19:38:13 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=181adb9d
7
8 sys-apps/dbus: Bump to version 1.12.20
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-apps/dbus/Manifest | 1 +
14 sys-apps/dbus/dbus-1.12.20.ebuild | 272 ++++++++++++++++++++++++++++++++++++++
15 2 files changed, 273 insertions(+)
16
17 diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
18 index d472108f92b..d33314ec2ee 100644
19 --- a/sys-apps/dbus/Manifest
20 +++ b/sys-apps/dbus/Manifest
21 @@ -1,2 +1,3 @@
22 DIST dbus-1.12.16.tar.gz 2093296 BLAKE2B 46c4f0d384d76dffd31c18a2d2df03d0658479d8f5b2d14b1db2bf0941fecdc023307ec035e3f977fde570a9f6493bbabd020ac2cd81b0577597e355f5a72522 SHA512 27ae805170e9515a8bb0fba5f29d414edc70e3b6b28b7b65bbea47035b8eafa9ac4820cdc92645be6035f6748f8aa45679e1ffc84ba74a64859a3056d318b9bb
23 DIST dbus-1.12.18.tar.gz 2094453 BLAKE2B eba48940c80a7483b858199156b297d97896232283988940d3cdb915eaa30bcdd13bc01f8410dcdb34193040a8bc8ce2dd45f1310aed791071e5dc5a6b38eb27 SHA512 817674e86a5d4cbfa705a79ca5197176311e47505c5da02334c2811f63b55014b582a12bce53bc73a08a3ad5061f210ba0d1e5f3bbf7697c81ca70c22a76fc13
24 +DIST dbus-1.12.20.tar.gz 2095511 BLAKE2B b467526e7e0281db7b8c7c178469fe006dab29ccb1ea197c02495bd297e8de766230b68ed86c4a7e05dbe09ca30ce941a15e0bf8030fe0df66c04febf0534b3b SHA512 0964683bc6859374cc94e42e1ec0cdb542cca67971c205fcba4352500b6c0891665b0718e7d85eb060c81cb82e3346c313892bc02384da300ddd306c7eef0056
25
26 diff --git a/sys-apps/dbus/dbus-1.12.20.ebuild b/sys-apps/dbus/dbus-1.12.20.ebuild
27 new file mode 100644
28 index 00000000000..3b9952f62bb
29 --- /dev/null
30 +++ b/sys-apps/dbus/dbus-1.12.20.ebuild
31 @@ -0,0 +1,272 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python3_{6,7} )
38 +inherit autotools flag-o-matic linux-info python-any-r1 readme.gentoo-r1 systemd virtualx 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 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
47 +IUSE="debug doc elogind kernel_linux selinux static-libs systemd test user-session X"
48 +RESTRICT="!test? ( test )"
49 +
50 +REQUIRED_USE="?? ( elogind systemd )"
51 +
52 +BDEPEND="
53 + acct-user/messagebus
54 + app-text/xmlto
55 + app-text/docbook-xml-dtd:4.4
56 + sys-devel/autoconf-archive
57 + virtual/pkgconfig
58 + doc? ( app-doc/doxygen )
59 +"
60 +COMMON_DEPEND="
61 + >=dev-libs/expat-2.1.0
62 + elogind? ( sys-auth/elogind )
63 + selinux? ( sys-libs/libselinux )
64 + systemd? ( sys-apps/systemd:0= )
65 + X? (
66 + x11-libs/libX11
67 + x11-libs/libXt
68 + )
69 +"
70 +DEPEND="${COMMON_DEPEND}
71 + dev-libs/expat
72 + test? (
73 + ${PYTHON_DEPS}
74 + >=dev-libs/glib-2.40:2
75 + )
76 +"
77 +RDEPEND="${COMMON_DEPEND}
78 + acct-user/messagebus
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 + "${FILESDIR}/${PN}-daemon-optional.patch" # bug #653136
93 +)
94 +
95 +pkg_setup() {
96 + use test && python-any-r1_pkg_setup
97 +
98 + if use kernel_linux; then
99 + CONFIG_CHECK="~EPOLL"
100 + linux-info_pkg_setup
101 + fi
102 +}
103 +
104 +src_prepare() {
105 + # Tests were restricted because of this
106 + sed -i \
107 + -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
108 + -e '/"dispatch"/d' \
109 + bus/test-main.c || die
110 +
111 + default
112 +
113 + if [[ ${CHOST} == *-solaris* ]]; then
114 + # fix standards conflict, due to gcc being c99 by default nowadays
115 + sed -i \
116 + -e 's/_XOPEN_SOURCE=500/_XOPEN_SOURCE=600/' \
117 + configure.ac || die
118 + fi
119 +
120 + # required for bug 263909, cross-compile so don't remove eautoreconf
121 + eautoreconf
122 +}
123 +
124 +src_configure() {
125 + local rundir=$(usex kernel_linux /run /var/run)
126 + sed -e "s;@rundir@;${EPREFIX}${rundir};g" "${FILESDIR}"/dbus.initd.in \
127 + > "${T}"/dbus.initd || die
128 + multilib-minimal_src_configure
129 +}
130 +
131 +multilib_src_configure() {
132 + local docconf myconf testconf
133 +
134 + # so we can get backtraces from apps
135 + case ${CHOST} in
136 + *-mingw*)
137 + # error: unrecognized command line option '-rdynamic' wrt #488036
138 + ;;
139 + *)
140 + append-flags -rdynamic
141 + ;;
142 + esac
143 +
144 + # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
145 + # not on an SELinux profile.
146 + myconf=(
147 + --localstatedir="${EPREFIX}/var"
148 + $(use_enable static-libs static)
149 + $(use_enable debug verbose-mode)
150 + --disable-asserts
151 + --disable-checks
152 + $(use_enable selinux)
153 + $(use_enable selinux libaudit)
154 + --disable-apparmor
155 + $(use_enable kernel_linux inotify)
156 + $(use_enable kernel_FreeBSD kqueue)
157 + $(use_enable elogind)
158 + $(use_enable systemd)
159 + $(use_enable user-session)
160 + --disable-embedded-tests
161 + --disable-modular-tests
162 + $(use_enable debug stats)
163 + --with-session-socket-dir="${EPREFIX}"/tmp
164 + --with-system-pid-file="${EPREFIX}${rundir}"/dbus.pid
165 + --with-system-socket="${EPREFIX}${rundir}"/dbus/system_bus_socket
166 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
167 + --with-dbus-user=messagebus
168 + $(use_with X x)
169 + )
170 +
171 + if [[ ${CHOST} == *-darwin* ]]; then
172 + myconf+=(
173 + --enable-launchd
174 + --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
175 + )
176 + fi
177 +
178 + if multilib_is_native_abi; then
179 + docconf=(
180 + --enable-xml-docs
181 + $(use_enable doc doxygen-docs)
182 + )
183 + else
184 + docconf=(
185 + --disable-xml-docs
186 + --disable-doxygen-docs
187 + )
188 + myconf+=(
189 + --disable-daemon
190 + --disable-selinux
191 + --disable-libaudit
192 + --disable-elogind
193 + --disable-systemd
194 + --without-x
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 "${T}"/dbus.initd 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 +}