]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - enable ducktype-docs when it works | |
3 | # - move /etc/dbus-1 from -libs to base after external packages transition to /usr/share/dbus-1 | |
4 | # | |
5 | # Conditional build: | |
6 | %bcond_without apparmor # AppArmor support | |
7 | %bcond_without selinux # SELinux support | |
8 | %bcond_without systemd # systemd at_console support | |
9 | %bcond_without X11 # X11 support | |
10 | ||
11 | %define expat_version 1:1.95.5 | |
12 | Summary: D-BUS message bus | |
13 | Summary(pl.UTF-8): Magistrala przesyłania komunikatów D-BUS | |
14 | Name: dbus | |
15 | Version: 1.12.16 | |
16 | Release: 1 | |
17 | License: AFL v2.1 or GPL v2+ | |
18 | Group: Libraries | |
19 | Source0: https://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz | |
20 | # Source0-md5: 2dbeae80dfc9e3632320c6a53d5e8890 | |
21 | Source1: messagebus.init | |
22 | Source2: %{name}-daemon-1-profile.d-sh | |
23 | Source3: %{name}-sysconfig | |
24 | Source4: %{name}-xinitrc.sh | |
25 | Source5: %{name}.tmpfiles | |
26 | Patch0: %{name}-nolibs.patch | |
27 | Patch1: %{name}-config.patch | |
28 | Patch2: %{name}-no_fatal_checks.patch | |
29 | Patch3: %{name}-allow-introspection.patch | |
30 | Patch4: %{name}-autoconf-archive.patch | |
31 | URL: https://www.freedesktop.org/Software/dbus | |
32 | BuildRequires: audit-libs-devel | |
33 | BuildRequires: autoconf >= 2.63 | |
34 | BuildRequires: autoconf-archive >= 2019.01.06 | |
35 | BuildRequires: automake >= 1:1.13 | |
36 | BuildRequires: docbook-dtd44-xml | |
37 | BuildRequires: doxygen | |
38 | BuildRequires: expat-devel >= %{expat_version} | |
39 | %{?with_apparmor:BuildRequires: libapparmor-devel >= 1:2.10} | |
40 | BuildRequires: libcap-ng-devel | |
41 | %{?with_selinux:BuildRequires: libselinux-devel >= 2.0.86} | |
42 | BuildRequires: libtool >= 2:2.0 | |
43 | BuildRequires: libxslt-progs | |
44 | BuildRequires: pkgconfig | |
45 | #BuildRequires: python3-ducktype | |
46 | BuildRequires: rpmbuild(macros) >= 1.626 | |
47 | BuildRequires: sed >= 4.0 | |
48 | %{?with_systemd:BuildRequires: systemd-devel >= 32} | |
49 | BuildRequires: xmlto | |
50 | %{?with_X11:BuildRequires: xorg-lib-libX11-devel} | |
51 | BuildRequires: yelp-tools | |
52 | Requires(post,postun): /sbin/ldconfig | |
53 | Requires(post,preun): /sbin/chkconfig | |
54 | Requires(postun): /usr/sbin/groupdel | |
55 | Requires(postun): /usr/sbin/userdel | |
56 | Requires(pre): /bin/id | |
57 | Requires(pre): /usr/bin/getgid | |
58 | Requires(pre): /usr/sbin/groupadd | |
59 | Requires(pre): /usr/sbin/useradd | |
60 | Requires(post,preun,postun): systemd-units >= 38 | |
61 | Requires: %{name}-libs = %{version}-%{release} | |
62 | Requires: expat >= %{expat_version} | |
63 | %{?with_apparmor:Requires: libapparmor >= 1:2.10} | |
64 | %{?with_selinux:Requires: libselinux >= 2.0.86} | |
65 | Requires: rc-scripts >= 0.4.3.0 | |
66 | Requires: systemd-units >= 38 | |
67 | Provides: group(messagebus) | |
68 | Provides: user(messagebus) | |
69 | Obsoletes: dbus-glib-tools | |
70 | Obsoletes: dbus-systemd | |
71 | Conflicts: pam < 0.99.7.1 | |
72 | # not available for dbus 0.9x yet(?) | |
73 | #Obsoletes: dbus-gtk dbus-gcj dbus-gcj-devel dbus-gcj-static | |
74 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
75 | ||
76 | %description | |
77 | D-BUS is a system for sending messages between applications. It is | |
78 | used both for the systemwide message bus service, and as a | |
79 | per-user-login-session messaging facility. | |
80 | ||
81 | %description -l pl.UTF-8 | |
82 | D-BUS to system przesyłania komunikatów pomiędzy aplikacjami. Jest | |
83 | używany zarówno jako ogólnosystemowa usługa magistrali komunikatów jak | |
84 | i możliwość przesyłania komunikatów w ramach jednej sesji użytkownika. | |
85 | ||
86 | %package libs | |
87 | Summary: D-BUS library | |
88 | Summary(pl.UTF-8): Biblioteka D-BUS | |
89 | Group: Libraries | |
90 | %{?with_systemd:Requires: systemd-libs >= 32} | |
91 | Obsoletes: dbus-dirs | |
92 | ||
93 | %description libs | |
94 | D-BUS library. | |
95 | ||
96 | %description libs -l pl.UTF-8 | |
97 | Biblioteka D-BUS. | |
98 | ||
99 | %package devel | |
100 | Summary: Header files for D-BUS library | |
101 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki D-BUS | |
102 | Group: Development/Libraries | |
103 | Requires: %{name}-libs = %{version}-%{release} | |
104 | %{?with_systemd:Requires: systemd-devel >= 32} | |
105 | ||
106 | %description devel | |
107 | Header files for D-BUS library. | |
108 | ||
109 | %description devel -l pl.UTF-8 | |
110 | Pliki nagłówkowe biblioteki D-BUS. | |
111 | ||
112 | %package static | |
113 | Summary: Static D-BUS library | |
114 | Summary(pl.UTF-8): Statyczna biblioteka D-BUS | |
115 | Group: Development/Libraries | |
116 | Requires: %{name}-devel = %{version}-%{release} | |
117 | ||
118 | %description static | |
119 | Static D-BUS library. | |
120 | ||
121 | %description static -l pl.UTF-8 | |
122 | Statyczna biblioteka D-BUS. | |
123 | ||
124 | %package apidocs | |
125 | Summary: D-BUS API documentation | |
126 | Summary(pl.UTF-8): Dokumentacja API D-BUS | |
127 | Group: Documentation | |
128 | # dbus.devhelp refers also to common docs packaged in -devel | |
129 | Requires: %{name}-devel = %{version}-%{release} | |
130 | %if "%{_rpmversion}" >= "5" | |
131 | BuildArch: noarch | |
132 | %endif | |
133 | ||
134 | %description apidocs | |
135 | D-BUS API documentation. | |
136 | ||
137 | %description apidocs -l pl.UTF-8 | |
138 | Dokumentacja API D-BUS. | |
139 | ||
140 | %package x11 | |
141 | Summary: X11 session support for D-BUS | |
142 | Summary(pl.UTF-8): Obsługa sesji X11 dla D-BUS | |
143 | Group: X11/Applications | |
144 | Requires: %{name} = %{version}-%{release} | |
145 | Obsoletes: dbus-X11 | |
146 | ||
147 | %description x11 | |
148 | This package contains D-BUS utilities to start D-BUS service together | |
149 | with user X11 session. | |
150 | ||
151 | %description x11 -l pl.UTF-8 | |
152 | Ten pakiet zawiera narzędzia D-BUS pozwalające na uruchomienie usługi | |
153 | D-BUS wraz z sesją X11 użytkownika. | |
154 | ||
155 | %prep | |
156 | %setup -q | |
157 | %patch0 -p1 | |
158 | %patch1 -p1 | |
159 | %patch2 -p1 | |
160 | %patch3 -p1 | |
161 | %patch4 -p1 | |
162 | ||
163 | %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' tools/GetAllMatchRules.py | |
164 | ||
165 | %build | |
166 | %{__libtoolize} | |
167 | %{__aclocal} -I m4 | |
168 | %{__autoconf} | |
169 | %{__autoheader} | |
170 | %{__automake} | |
171 | %configure \ | |
172 | %{!?with_apparmor:--disable-apparmor} \ | |
173 | --disable-asserts \ | |
174 | --disable-ducktype-docs \ | |
175 | %{?debug:--enable-verbose-mode} \ | |
176 | %{!?with_selinux:--disable-selinux} \ | |
177 | --disable-silent-rules \ | |
178 | %{!?with_systemd:--disable-systemd} \ | |
179 | --disable-tests \ | |
180 | --enable-user-session \ | |
181 | --with-console-auth-dir=%{_localstatedir}/run/console/ \ | |
182 | --with-session-socket-dir=/tmp \ | |
183 | --with-system-pid-file=%{_localstatedir}/run/dbus.pid \ | |
184 | --with-systemdsystemunitdir=%{systemdunitdir} \ | |
185 | %{!?with_X11:--without-x} | |
186 | %{__make} | |
187 | ||
188 | %install | |
189 | rm -rf $RPM_BUILD_ROOT | |
190 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{profile.d,rc.d/init.d,sysconfig,X11/xinit/xinitrc.d} \ | |
191 | $RPM_BUILD_ROOT%{_datadir}/dbus-1/{services,interfaces} \ | |
192 | $RPM_BUILD_ROOT%{_localstatedir}/run/dbus \ | |
193 | $RPM_BUILD_ROOT%{_localstatedir}/lib/dbus \ | |
194 | $RPM_BUILD_ROOT/%{_lib} \ | |
195 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} | |
196 | ||
197 | %{__make} install \ | |
198 | DESTDIR=$RPM_BUILD_ROOT | |
199 | ||
200 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/messagebus | |
201 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/dbus-daemon-1.sh | |
202 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/messagebus | |
203 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d | |
204 | ||
205 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
206 | ||
207 | ln -s dbus.service $RPM_BUILD_ROOT%{systemdunitdir}/messagebus.service | |
208 | ||
209 | # for local configuration in dbus 1.10+ | |
210 | install -d $RPM_BUILD_ROOT/etc/dbus-1/{session.d,system.d} | |
211 | ||
212 | # we are creating messagebus user from rpm pre | |
213 | %{__rm} $RPM_BUILD_ROOT/usr/lib/sysusers.d/dbus.conf | |
214 | ||
215 | %clean | |
216 | rm -rf $RPM_BUILD_ROOT | |
217 | ||
218 | %pre | |
219 | %groupadd -g 122 messagebus | |
220 | %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g 122 messagebus | |
221 | ||
222 | %post | |
223 | /sbin/chkconfig --add messagebus | |
224 | %service -n messagebus restart "D-Bus daemon" | |
225 | export NORESTART="yes" | |
226 | %systemd_post messagebus.service | |
227 | ||
228 | %preun | |
229 | if [ "$1" = "0" ];then | |
230 | %service messagebus stop | |
231 | /sbin/chkconfig --del messagebus | |
232 | fi | |
233 | ||
234 | %postun | |
235 | if [ "$1" = "0" ]; then | |
236 | %userremove messagebus | |
237 | %groupremove messagebus | |
238 | fi | |
239 | %systemd_reload | |
240 | ||
241 | %triggerpostun -- dbus < 1.4.16-5 | |
242 | %systemd_trigger messagebus.service | |
243 | if [ -f /etc/sysconfig/dbus ]; then | |
244 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
245 | mv -f /etc/sysconfig/{dbus,messagebus} | |
246 | elif [ -f /etc/sysconfig/dbus.rpmsave ]; then | |
247 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
248 | mv -f /etc/sysconfig/{dbus.rpmsave,messagebus} | |
249 | fi | |
250 | ||
251 | %post libs -p /sbin/ldconfig | |
252 | %postun libs -p /sbin/ldconfig | |
253 | ||
254 | %files | |
255 | %defattr(644,root,root,755) | |
256 | %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets | |
257 | %attr(755,root,root) %{_bindir}/dbus-daemon | |
258 | %attr(755,root,root) %{_bindir}/dbus-uuidgen | |
259 | %attr(755,root,root) %{_bindir}/dbus-monitor | |
260 | %attr(755,root,root) %{_bindir}/dbus-run-session | |
261 | %attr(755,root,root) %{_bindir}/dbus-send | |
262 | %attr(755,root,root) %{_bindir}/dbus-test-tool | |
263 | %attr(755,root,root) %{_bindir}/dbus-update-activation-environment | |
264 | %attr(4754,root,messagebus) %{_libexecdir}/dbus-daemon-launch-helper | |
265 | %{_datadir}/dbus-1/session.conf | |
266 | %{_datadir}/dbus-1/system.conf | |
267 | %{_datadir}/xml/dbus-1 | |
268 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/session.conf | |
269 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.conf | |
270 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus | |
271 | %attr(754,root,root) /etc/rc.d/init.d/messagebus | |
272 | %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh | |
273 | %{systemdtmpfilesdir}/%{name}.conf | |
274 | %dir %{_localstatedir}/lib/dbus | |
275 | %dir %{_localstatedir}/run/dbus | |
276 | %{_mandir}/man1/dbus-cleanup-sockets.1* | |
277 | %{_mandir}/man1/dbus-daemon.1* | |
278 | %{_mandir}/man1/dbus-uuidgen.1* | |
279 | %{_mandir}/man1/dbus-monitor.1* | |
280 | %{_mandir}/man1/dbus-run-session.1* | |
281 | %{_mandir}/man1/dbus-send.1* | |
282 | %{_mandir}/man1/dbus-test-tool.1* | |
283 | %{_mandir}/man1/dbus-update-activation-environment.1* | |
284 | ||
285 | %{systemdunitdir}/dbus.service | |
286 | %{systemdunitdir}/dbus.socket | |
287 | %{systemdunitdir}/messagebus.service | |
288 | %{systemdunitdir}/multi-user.target.wants/dbus.service | |
289 | %{systemdunitdir}/sockets.target.wants/dbus.socket | |
290 | %{systemduserunitdir}/dbus.service | |
291 | %{systemduserunitdir}/dbus.socket | |
292 | %{systemduserunitdir}/sockets.target.wants/dbus.socket | |
293 | ||
294 | %files libs | |
295 | %defattr(644,root,root,755) | |
296 | %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO | |
297 | %attr(755,root,root) %{_libdir}/libdbus-1.so.*.*.* | |
298 | %attr(755,root,root) %ghost %{_libdir}/libdbus-1.so.3 | |
299 | %dir %{_datadir}/dbus-1 | |
300 | %dir %{_datadir}/dbus-1/session.d | |
301 | %dir %{_datadir}/dbus-1/system.d | |
302 | # interfaces is basically devel thing, but keep dir here | |
303 | # in case something uses it at runtime | |
304 | %dir %{_datadir}/dbus-1/interfaces | |
305 | %dir %{_datadir}/dbus-1/services | |
306 | %dir %{_datadir}/dbus-1/system-services | |
307 | # TODO: now it's only for local configuration - move to base dbus package | |
308 | # after all packages place constant configuration in %{_datadir}/dbus-1 | |
309 | %dir /etc/dbus-1 | |
310 | %dir /etc/dbus-1/session.d | |
311 | %dir /etc/dbus-1/system.d | |
312 | ||
313 | %files devel | |
314 | %defattr(644,root,root,755) | |
315 | %attr(755,root,root) %{_libdir}/libdbus-1.so | |
316 | %{_libdir}/libdbus-1.la | |
317 | %dir %{_libdir}/dbus-1.0 | |
318 | %{_libdir}/dbus-1.0/include | |
319 | %{_libdir}/cmake/DBus1 | |
320 | %{_includedir}/dbus-1.0 | |
321 | %{_pkgconfigdir}/dbus-1.pc | |
322 | %dir %{_docdir}/dbus | |
323 | %{_docdir}/dbus/*.html | |
324 | %{_docdir}/dbus/*.png | |
325 | %{_docdir}/dbus/*.svg | |
326 | %{_docdir}/dbus/*.txt | |
327 | ||
328 | %files static | |
329 | %defattr(644,root,root,755) | |
330 | %{_libdir}/libdbus-1.a | |
331 | ||
332 | %files apidocs | |
333 | %defattr(644,root,root,755) | |
334 | %{_docdir}/dbus/api | |
335 | %{_docdir}/dbus/dbus.devhelp2 | |
336 | ||
337 | %files x11 | |
338 | %defattr(644,root,root,755) | |
339 | %attr(755,root,root) %{_bindir}/dbus-launch | |
340 | %{_mandir}/man1/dbus-launch.1* | |
341 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/dbus-xinitrc.sh |