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