Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/dbus: ChangeLog dbus-1.4.20.ebuild dbus-1.5.12-r1.ebuild
Date: Tue, 29 May 2012 15:21:30
Message-Id: 20120529152115.BBFCB2004B@flycatcher.gentoo.org
1 ssuominen 12/05/29 15:21:15
2
3 Modified: ChangeLog dbus-1.4.20.ebuild
4 Added: dbus-1.5.12-r1.ebuild
5 Log:
6 When dropping capabilities only include AUDIT caps if we have them wrt #405975. This makes audit/selinux enabled D-Bus work in a Linux container. Thanks to Jory A. Pratt and Hinnerk van Bruinehsen.
7
8 (Portage version: 2.2.0_alpha108/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.340 sys-apps/dbus/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/dbus/ChangeLog?rev=1.340&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/dbus/ChangeLog?rev=1.340&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/dbus/ChangeLog?r1=1.339&r2=1.340
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-apps/dbus/ChangeLog,v
20 retrieving revision 1.339
21 retrieving revision 1.340
22 diff -u -r1.339 -r1.340
23 --- ChangeLog 24 May 2012 04:21:00 -0000 1.339
24 +++ ChangeLog 29 May 2012 15:21:15 -0000 1.340
25 @@ -1,6 +1,15 @@
26 # ChangeLog for sys-apps/dbus
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/ChangeLog,v 1.339 2012/05/24 04:21:00 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/ChangeLog,v 1.340 2012/05/29 15:21:15 ssuominen Exp $
30 +
31 +*dbus-1.5.12-r1 (29 May 2012)
32 +
33 + 29 May 2012; Samuli Suominen <ssuominen@g.o> dbus-1.4.20.ebuild,
34 + +dbus-1.5.12-r1.ebuild,
35 + +files/dbus-1.5.12-selinux-when-dropping-capabilities-only-include-AUDI.patch:
36 + When dropping capabilities only include AUDIT caps if we have them wrt
37 + #405975. This makes audit/selinux enabled D-Bus work in a Linux container.
38 + Thanks to Jory A. Pratt and Hinnerk van Bruinehsen.
39
40 24 May 2012; Mike Frysinger <vapier@g.o> dbus-1.4.16-r2.ebuild,
41 dbus-1.4.16.ebuild, dbus-1.4.18.ebuild, dbus-1.4.20.ebuild,
42
43
44
45 1.11 sys-apps/dbus/dbus-1.4.20.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/dbus/dbus-1.4.20.ebuild?rev=1.11&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/dbus/dbus-1.4.20.ebuild?rev=1.11&content-type=text/plain
49 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/dbus/dbus-1.4.20.ebuild?r1=1.10&r2=1.11
50
51 Index: dbus-1.4.20.ebuild
52 ===================================================================
53 RCS file: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.4.20.ebuild,v
54 retrieving revision 1.10
55 retrieving revision 1.11
56 diff -u -r1.10 -r1.11
57 --- dbus-1.4.20.ebuild 24 May 2012 04:21:00 -0000 1.10
58 +++ dbus-1.4.20.ebuild 29 May 2012 15:21:15 -0000 1.11
59 @@ -1,6 +1,6 @@
60 # Copyright 1999-2012 Gentoo Foundation
61 # Distributed under the terms of the GNU General Public License v2
62 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.4.20.ebuild,v 1.10 2012/05/24 04:21:00 vapier Exp $
63 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.4.20.ebuild,v 1.11 2012/05/29 15:21:15 ssuominen Exp $
64
65 EAPI=4
66 inherit autotools eutils multilib flag-o-matic python systemd virtualx user
67 @@ -58,7 +58,9 @@
68 -e '/"dispatch"/d' \
69 bus/test-main.c || die
70
71 - epatch "${FILESDIR}"/${PN}-1.4.0-asneeded.patch
72 + epatch \
73 + "${FILESDIR}"/${PN}-1.4.0-asneeded.patch \
74 + "${FILESDIR}"/${PN}-1.5.12-selinux-when-dropping-capabilities-only-include-AUDI.patch
75
76 # required for asneeded patch but also for bug 263909, cross-compile so
77 # don't remove eautoreconf
78
79
80
81 1.1 sys-apps/dbus/dbus-1.5.12-r1.ebuild
82
83 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/dbus/dbus-1.5.12-r1.ebuild?rev=1.1&view=markup
84 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/dbus/dbus-1.5.12-r1.ebuild?rev=1.1&content-type=text/plain
85
86 Index: dbus-1.5.12-r1.ebuild
87 ===================================================================
88 # Copyright 1999-2012 Gentoo Foundation
89 # Distributed under the terms of the GNU General Public License v2
90 # $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.5.12-r1.ebuild,v 1.1 2012/05/29 15:21:15 ssuominen Exp $
91
92 EAPI=4
93 inherit autotools eutils linux-info flag-o-matic python systemd virtualx user
94
95 DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
96 HOMEPAGE="http://dbus.freedesktop.org/"
97 SRC_URI="http://dbus.freedesktop.org/releases/dbus/${P}.tar.gz"
98
99 LICENSE="|| ( AFL-2.1 GPL-2 )"
100 SLOT="0"
101 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
102 IUSE="debug doc selinux static-libs systemd test X"
103
104 RDEPEND=">=dev-libs/expat-2
105 selinux? (
106 sec-policy/selinux-dbus
107 sys-libs/libselinux
108 )
109 systemd? ( >=sys-apps/systemd-32 )
110 X? (
111 x11-libs/libX11
112 x11-libs/libXt
113 )"
114 DEPEND="${RDEPEND}
115 virtual/pkgconfig
116 doc? (
117 app-doc/doxygen
118 app-text/docbook-xml-dtd:4.1.2
119 app-text/xmlto
120 )
121 test? (
122 >=dev-libs/glib-2.24
123 dev-lang/python:2.7
124 )"
125
126 # out of sources build directory
127 BD=${WORKDIR}/${P}-build
128 # out of sources build dir for make check
129 TBD=${WORKDIR}/${P}-tests-build
130
131 pkg_setup() {
132 enewgroup messagebus
133 enewuser messagebus -1 -1 -1 messagebus
134
135 if use test; then
136 python_set_active_version 2
137 python_pkg_setup
138 fi
139
140 if use kernel_linux; then
141 CONFIG_CHECK="~EPOLL"
142 linux-info_pkg_setup
143 fi
144 }
145
146 src_prepare() {
147 epatch "${FILESDIR}"/${P}-selinux-when-dropping-capabilities-only-include-AUDI.patch
148
149 # Tests were restricted because of this
150 sed -i \
151 -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
152 -e '/"dispatch"/d' \
153 bus/test-main.c || die
154
155 # required for asneeded patch but also for bug 263909, cross-compile so
156 # don't remove eautoreconf
157 eautoreconf
158 }
159
160 src_configure() {
161 local myconf
162
163 # so we can get backtraces from apps
164 append-flags -rdynamic
165
166 # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
167 # not on an SELinux profile.
168 myconf=(
169 --localstatedir=/var
170 --docdir=/usr/share/doc/${PF}
171 --htmldir=/usr/share/doc/${PF}/html
172 $(use_enable static-libs static)
173 $(use_enable debug verbose-mode)
174 --disable-asserts
175 --disable-checks
176 $(use_enable selinux)
177 $(use_enable selinux libaudit)
178 $(use_enable kernel_linux inotify)
179 $(use_enable kernel_FreeBSD kqueue)
180 $(use_enable systemd)
181 --disable-embedded-tests
182 --disable-modular-tests
183 $(use_enable debug stats)
184 --with-xml=expat
185 --with-session-socket-dir=/tmp
186 --with-system-pid-file=/var/run/dbus.pid
187 --with-system-socket=/var/run/dbus/system_bus_socket
188 --with-dbus-user=messagebus
189 $(use_with X x)
190 "$(systemd_with_unitdir)"
191 )
192
193 mkdir "${BD}"
194 cd "${BD}"
195 einfo "Running configure in ${BD}"
196 ECONF_SOURCE="${S}" econf "${myconf[@]}" \
197 $(use_enable doc xml-docs) \
198 $(use_enable doc doxygen-docs)
199
200 if use test; then
201 mkdir "${TBD}"
202 cd "${TBD}"
203 einfo "Running configure in ${TBD}"
204 ECONF_SOURCE="${S}" econf "${myconf[@]}" \
205 $(use_enable test asserts) \
206 $(use_enable test checks) \
207 $(use_enable test embedded-tests) \
208 $(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
209 fi
210 }
211
212 src_compile() {
213 # after the compile, it uses a selinuxfs interface to
214 # check if the SELinux policy has the right support
215 use selinux && addwrite /selinux/access
216
217 cd "${BD}"
218 einfo "Running make in ${BD}"
219 emake
220
221 if use test; then
222 cd "${TBD}"
223 einfo "Running make in ${TBD}"
224 emake
225 fi
226 }
227
228 src_test() {
229 cd "${TBD}"
230 DBUS_VERBOSE=1 Xemake -j1 check
231 }
232
233 src_install() {
234 newinitd "${FILESDIR}"/dbus.initd dbus
235
236 if use X; then
237 # dbus X session script (#77504)
238 # turns out to only work for GDM (and startx). has been merged into
239 # other desktop (kdm and such scripts)
240 exeinto /etc/X11/xinit/xinitrc.d
241 doexe "${FILESDIR}"/80-dbus
242 fi
243
244 # needs to exist for dbus sessions to launch
245 keepdir /usr/share/dbus-1/services
246 keepdir /etc/dbus-1/{session,system}.d
247 # machine-id symlink from pkg_postinst()
248 keepdir /var/lib/dbus
249
250 dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
251
252 cd "${BD}"
253 emake DESTDIR="${D}" install
254
255 find "${ED}" -type f -name '*.la' -exec rm -f {} +
256 }
257
258 pkg_postinst() {
259 elog "To start the D-Bus system-wide messagebus by default"
260 elog "you should add it to the default runlevel :"
261 elog "\`rc-update add dbus default\`"
262 elog
263 elog "Some applications require a session bus in addition to the system"
264 elog "bus. Please see \`man dbus-launch\` for more information."
265 elog
266 ewarn "You must restart D-Bus \`/etc/init.d/dbus restart\` to run"
267 ewarn "the new version of the daemon."
268 ewarn "Don't do this while X is running because it will restart your X as well."
269
270 # Ensure unique id is generated and put it in /etc wrt #370451 but symlink
271 # for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
272 # dependencies with hardcoded paths (although the known ones got fixed already)
273 dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
274 ln -sf "${EROOT}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
275 }