Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/
Date: Wed, 23 Dec 2020 00:46:41
Message-Id: 1608684388.94e3f3e68e844aaccb9d7b43b965991774df4a3d.whissi@gentoo
1 commit: 94e3f3e68e844aaccb9d7b43b965991774df4a3d
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 23 00:46:28 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 23 00:46:28 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94e3f3e6
7
8 sys-apps/dbus: security cleanup (bug #755392)
9
10 Package-Manager: Portage-3.0.12, Repoman-3.0.2
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 sys-apps/dbus/Manifest | 1 -
14 sys-apps/dbus/dbus-1.12.18.ebuild | 272 --------------------------------------
15 2 files changed, 273 deletions(-)
16
17 diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
18 index b407c1584db..0af7e50b0b6 100644
19 --- a/sys-apps/dbus/Manifest
20 +++ b/sys-apps/dbus/Manifest
21 @@ -1,2 +1 @@
22 -DIST dbus-1.12.18.tar.gz 2094453 BLAKE2B eba48940c80a7483b858199156b297d97896232283988940d3cdb915eaa30bcdd13bc01f8410dcdb34193040a8bc8ce2dd45f1310aed791071e5dc5a6b38eb27 SHA512 817674e86a5d4cbfa705a79ca5197176311e47505c5da02334c2811f63b55014b582a12bce53bc73a08a3ad5061f210ba0d1e5f3bbf7697c81ca70c22a76fc13
23 DIST dbus-1.12.20.tar.gz 2095511 BLAKE2B b467526e7e0281db7b8c7c178469fe006dab29ccb1ea197c02495bd297e8de766230b68ed86c4a7e05dbe09ca30ce941a15e0bf8030fe0df66c04febf0534b3b SHA512 0964683bc6859374cc94e42e1ec0cdb542cca67971c205fcba4352500b6c0891665b0718e7d85eb060c81cb82e3346c313892bc02384da300ddd306c7eef0056
24
25 diff --git a/sys-apps/dbus/dbus-1.12.18.ebuild b/sys-apps/dbus/dbus-1.12.18.ebuild
26 deleted file mode 100644
27 index cb206f892a9..00000000000
28 --- a/sys-apps/dbus/dbus-1.12.18.ebuild
29 +++ /dev/null
30 @@ -1,272 +0,0 @@
31 -# Copyright 1999-2020 Gentoo Authors
32 -# Distributed under the terms of the GNU General Public License v2
33 -
34 -EAPI=7
35 -
36 -PYTHON_COMPAT=( python3_{6,7} )
37 -inherit autotools flag-o-matic linux-info python-any-r1 readme.gentoo-r1 systemd virtualx 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 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
46 -IUSE="debug doc elogind kernel_linux selinux static-libs systemd test user-session X"
47 -RESTRICT="!test? ( test )"
48 -
49 -REQUIRED_USE="?? ( elogind systemd )"
50 -
51 -BDEPEND="
52 - acct-user/messagebus
53 - app-text/xmlto
54 - app-text/docbook-xml-dtd:4.4
55 - sys-devel/autoconf-archive
56 - virtual/pkgconfig
57 - doc? ( app-doc/doxygen )
58 -"
59 -COMMON_DEPEND="
60 - >=dev-libs/expat-2.1.0
61 - elogind? ( sys-auth/elogind )
62 - selinux? ( sys-libs/libselinux )
63 - systemd? ( sys-apps/systemd:0= )
64 - X? (
65 - x11-libs/libX11
66 - x11-libs/libXt
67 - )
68 -"
69 -DEPEND="${COMMON_DEPEND}
70 - dev-libs/expat
71 - test? (
72 - ${PYTHON_DEPS}
73 - >=dev-libs/glib-2.40:2
74 - )
75 -"
76 -RDEPEND="${COMMON_DEPEND}
77 - acct-user/messagebus
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 -PATCHES=(
90 - "${FILESDIR}/${PN}-enable-elogind.patch"
91 - "${FILESDIR}/${PN}-daemon-optional.patch" # bug #653136
92 -)
93 -
94 -pkg_setup() {
95 - use test && python-any-r1_pkg_setup
96 -
97 - if use kernel_linux; then
98 - CONFIG_CHECK="~EPOLL"
99 - linux-info_pkg_setup
100 - fi
101 -}
102 -
103 -src_prepare() {
104 - # Tests were restricted because of this
105 - sed -i \
106 - -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
107 - -e '/"dispatch"/d' \
108 - bus/test-main.c || die
109 -
110 - default
111 -
112 - if [[ ${CHOST} == *-solaris* ]]; then
113 - # fix standards conflict, due to gcc being c99 by default nowadays
114 - sed -i \
115 - -e 's/_XOPEN_SOURCE=500/_XOPEN_SOURCE=600/' \
116 - configure.ac || die
117 - fi
118 -
119 - # required for bug 263909, cross-compile so don't remove eautoreconf
120 - eautoreconf
121 -}
122 -
123 -src_configure() {
124 - local rundir=$(usex kernel_linux /run /var/run)
125 - sed -e "s;@rundir@;${EPREFIX}${rundir};g" "${FILESDIR}"/dbus.initd.in \
126 - > "${T}"/dbus.initd || die
127 - multilib-minimal_src_configure
128 -}
129 -
130 -multilib_src_configure() {
131 - local docconf myconf testconf
132 -
133 - # so we can get backtraces from apps
134 - case ${CHOST} in
135 - *-mingw*)
136 - # error: unrecognized command line option '-rdynamic' wrt #488036
137 - ;;
138 - *)
139 - append-flags -rdynamic
140 - ;;
141 - esac
142 -
143 - # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
144 - # not on an SELinux profile.
145 - myconf=(
146 - --localstatedir="${EPREFIX}/var"
147 - $(use_enable static-libs static)
148 - $(use_enable debug verbose-mode)
149 - --disable-asserts
150 - --disable-checks
151 - $(use_enable selinux)
152 - $(use_enable selinux libaudit)
153 - --disable-apparmor
154 - $(use_enable kernel_linux inotify)
155 - $(use_enable kernel_FreeBSD kqueue)
156 - $(use_enable elogind)
157 - $(use_enable systemd)
158 - $(use_enable user-session)
159 - --disable-embedded-tests
160 - --disable-modular-tests
161 - $(use_enable debug stats)
162 - --with-session-socket-dir="${EPREFIX}"/tmp
163 - --with-system-pid-file="${EPREFIX}${rundir}"/dbus.pid
164 - --with-system-socket="${EPREFIX}${rundir}"/dbus/system_bus_socket
165 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
166 - --with-dbus-user=messagebus
167 - $(use_with X x)
168 - )
169 -
170 - if [[ ${CHOST} == *-darwin* ]]; then
171 - myconf+=(
172 - --enable-launchd
173 - --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
174 - )
175 - fi
176 -
177 - if multilib_is_native_abi; then
178 - docconf=(
179 - --enable-xml-docs
180 - $(use_enable doc doxygen-docs)
181 - )
182 - else
183 - docconf=(
184 - --disable-xml-docs
185 - --disable-doxygen-docs
186 - )
187 - myconf+=(
188 - --disable-daemon
189 - --disable-selinux
190 - --disable-libaudit
191 - --disable-elogind
192 - --disable-systemd
193 - --without-x
194 - )
195 - fi
196 -
197 - einfo "Running configure in ${BUILD_DIR}"
198 - ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
199 -
200 - if multilib_is_native_abi && use test; then
201 - mkdir "${TBD}" || die
202 - cd "${TBD}" || die
203 - testconf=(
204 - $(use_enable test asserts)
205 - $(use_enable test checks)
206 - $(use_enable test embedded-tests)
207 - $(use_enable test stats)
208 - $(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
209 - )
210 - einfo "Running configure in ${TBD}"
211 - ECONF_SOURCE="${S}" econf "${myconf[@]}" "${testconf[@]}"
212 - fi
213 -}
214 -
215 -multilib_src_compile() {
216 - if multilib_is_native_abi; then
217 - # after the compile, it uses a selinuxfs interface to
218 - # check if the SELinux policy has the right support
219 - use selinux && addwrite /selinux/access
220 -
221 - einfo "Running make in ${BUILD_DIR}"
222 - emake
223 -
224 - if use test; then
225 - einfo "Running make in ${TBD}"
226 - emake -C "${TBD}"
227 - fi
228 - else
229 - emake -C dbus libdbus-1.la
230 - fi
231 -}
232 -
233 -src_test() {
234 - DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check
235 -}
236 -
237 -multilib_src_install() {
238 - if multilib_is_native_abi; then
239 - emake DESTDIR="${D}" install
240 - else
241 - emake DESTDIR="${D}" install-pkgconfigDATA
242 - emake DESTDIR="${D}" -C dbus \
243 - install-libLTLIBRARIES install-dbusincludeHEADERS \
244 - install-nodist_dbusarchincludeHEADERS
245 - fi
246 -}
247 -
248 -multilib_src_install_all() {
249 - newinitd "${T}"/dbus.initd dbus
250 -
251 - if use X; then
252 - # dbus X session script (#77504)
253 - # turns out to only work for GDM (and startx). has been merged into
254 - # other desktop (kdm and such scripts)
255 - exeinto /etc/X11/xinit/xinitrc.d
256 - doexe "${FILESDIR}"/80-dbus
257 - fi
258 -
259 - # needs to exist for dbus sessions to launch
260 - keepdir /usr/share/dbus-1/services
261 - keepdir /etc/dbus-1/{session,system}.d
262 - # machine-id symlink from pkg_postinst()
263 - keepdir /var/lib/dbus
264 - # let the init script create the /var/run/dbus directory
265 - rm -rf "${ED}"/var/run
266 -
267 - dodoc AUTHORS ChangeLog NEWS README doc/TODO
268 - readme.gentoo_create_doc
269 -
270 - find "${ED}" -name '*.la' -delete || die
271 -}
272 -
273 -pkg_postinst() {
274 - readme.gentoo_print_elog
275 -
276 - # Ensure unique id is generated and put it in /etc wrt #370451 but symlink
277 - # for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
278 - # dependencies with hardcoded paths (although the known ones got fixed already)
279 - dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
280 - ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
281 -
282 - if [[ ${CHOST} == *-darwin* ]]; then
283 - local plist="org.freedesktop.dbus-session.plist"
284 - elog
285 - elog
286 - elog "For MacOS/Darwin we now ship launchd support for dbus."
287 - elog "This enables autolaunch of dbus at session login and makes"
288 - elog "dbus usable under MacOS/Darwin."
289 - elog
290 - elog "The launchd plist file ${plist} has been"
291 - elog "installed in ${EPREFIX}/Library/LaunchAgents."
292 - elog "For it to be used, you will have to do all of the following:"
293 - elog " + cd ~/Library/LaunchAgents"
294 - elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
295 - elog " + logout and log back in"
296 - elog
297 - elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
298 - elog "specified and refused to start otherwise, then export the"
299 - elog "the following to your environment:"
300 - elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
301 - fi
302 -}