Gentoo Archives: gentoo-commits

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