]>
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 |
38fee88a | 16 | Release: 2 |
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 | |
38fee88a | 61 | Requires(post,preun,postun): systemd-units >= 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 |
38fee88a | 67 | Requires: systemd-units >= 250.1 |
b5824d21 | 68 | Provides: group(messagebus) |
69 | Provides: user(messagebus) | |
75a73017 | 70 | Obsoletes: dbus-glib-tools |
fde42832 | 71 | Obsoletes: dbus-systemd |
86eafeb2 | 72 | Conflicts: pam < 0.99.7.1 |
8a7e4f09 JB |
73 | # not available for dbus 0.9x yet(?) |
74 | #Obsoletes: dbus-gtk dbus-gcj dbus-gcj-devel dbus-gcj-static | |
bc0b5507 | 75 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3f8dd6e4 AF |
76 | |
77 | %description | |
78 | D-BUS is a system for sending messages between applications. It is | |
79 | used both for the systemwide message bus service, and as a | |
80 | per-user-login-session messaging facility. | |
81 | ||
702c1f82 JR |
82 | %description -l pl.UTF-8 |
83 | D-BUS to system przesyłania komunikatów pomiędzy aplikacjami. Jest | |
84 | używany zarówno jako ogólnosystemowa usługa magistrali komunikatów jak | |
85 | i możliwość przesyłania komunikatów w ramach jednej sesji użytkownika. | |
bc0b5507 | 86 | |
93c19477 | 87 | %package libs |
3bdcad6f JB |
88 | Summary: D-BUS library |
89 | Summary(pl.UTF-8): Biblioteka D-BUS | |
93c19477 | 90 | Group: Libraries |
a74f6581 | 91 | %{?with_systemd:Requires: systemd-libs >= 32} |
1dcc978d | 92 | Obsoletes: dbus-dirs |
93c19477 JB |
93 | |
94 | %description libs | |
3bdcad6f | 95 | D-BUS library. |
93c19477 | 96 | |
702c1f82 | 97 | %description libs -l pl.UTF-8 |
3bdcad6f | 98 | Biblioteka D-BUS. |
93c19477 | 99 | |
3f8dd6e4 | 100 | %package devel |
3bdcad6f JB |
101 | Summary: Header files for D-BUS library |
102 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki D-BUS | |
3f8dd6e4 | 103 | Group: Development/Libraries |
e58eea39 | 104 | Requires: %{name}-libs = %{version}-%{release} |
a74f6581 | 105 | %{?with_systemd:Requires: systemd-devel >= 32} |
3f8dd6e4 AF |
106 | |
107 | %description devel | |
3bdcad6f | 108 | Header files for D-BUS library. |
bc0b5507 | 109 | |
702c1f82 | 110 | %description devel -l pl.UTF-8 |
3bdcad6f | 111 | Pliki nagłówkowe biblioteki D-BUS. |
bc0b5507 JB |
112 | |
113 | %package static | |
3bdcad6f JB |
114 | Summary: Static D-BUS library |
115 | Summary(pl.UTF-8): Statyczna biblioteka D-BUS | |
bc0b5507 | 116 | Group: Development/Libraries |
26ded955 | 117 | Requires: %{name}-devel = %{version}-%{release} |
bc0b5507 JB |
118 | |
119 | %description static | |
3bdcad6f | 120 | Static D-BUS library. |
bc0b5507 | 121 | |
702c1f82 | 122 | %description static -l pl.UTF-8 |
3bdcad6f | 123 | Statyczna biblioteka D-BUS. |
3f8dd6e4 | 124 | |
0f66e1a4 JB |
125 | %package apidocs |
126 | Summary: D-BUS API documentation | |
127 | Summary(pl.UTF-8): Dokumentacja API D-BUS | |
128 | Group: Documentation | |
129 | # dbus.devhelp refers also to common docs packaged in -devel | |
130 | Requires: %{name}-devel = %{version}-%{release} | |
2314294a | 131 | BuildArch: noarch |
0f66e1a4 JB |
132 | |
133 | %description apidocs | |
134 | D-BUS API documentation. | |
135 | ||
136 | %description apidocs -l pl.UTF-8 | |
137 | Dokumentacja API D-BUS. | |
138 | ||
d94552dc | 139 | %package x11 |
11267a0a JB |
140 | Summary: X11 session support for D-BUS |
141 | Summary(pl.UTF-8): Obsługa sesji X11 dla D-BUS | |
d94552dc ER |
142 | Group: X11/Applications |
143 | Requires: %{name} = %{version}-%{release} | |
144 | Obsoletes: dbus-X11 | |
145 | ||
146 | %description x11 | |
11267a0a JB |
147 | This package contains D-BUS utilities to start D-BUS service together |
148 | with user X11 session. | |
149 | ||
150 | %description x11 -l pl.UTF-8 | |
151 | Ten pakiet zawiera narzędzia D-BUS pozwalające na uruchomienie usługi | |
152 | D-BUS wraz z sesją X11 użytkownika. | |
d94552dc | 153 | |
3f8dd6e4 AF |
154 | %prep |
155 | %setup -q | |
156 | %patch0 -p1 | |
d40e6d8d | 157 | %patch1 -p1 |
d63e2026 | 158 | %patch2 -p1 |
312606de | 159 | %patch3 -p1 |
708f1de0 | 160 | %patch4 -p1 |
3f8dd6e4 | 161 | |
7bbf9c80 JP |
162 | %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' tools/GetAllMatchRules.py |
163 | ||
3f8dd6e4 AF |
164 | %build |
165 | %{__libtoolize} | |
609b792a | 166 | %{__aclocal} -I m4 |
3f8dd6e4 | 167 | %{__autoconf} |
60d211c4 | 168 | %{__autoheader} |
3f8dd6e4 | 169 | %{__automake} |
92f6f38b | 170 | %configure \ |
194ba181 | 171 | %{!?with_apparmor:--disable-apparmor} \ |
7dee3cfe | 172 | --disable-asserts \ |
194ba181 JB |
173 | --disable-ducktype-docs \ |
174 | %{?debug:--enable-verbose-mode} \ | |
175 | %{!?with_selinux:--disable-selinux} \ | |
11267a0a | 176 | --disable-silent-rules \ |
194ba181 | 177 | %{!?with_systemd:--disable-systemd} \ |
d728aff5 | 178 | --disable-tests \ |
03857e64 | 179 | --enable-user-session \ |
845c3048 | 180 | --with-console-auth-dir=%{_localstatedir}/run/console/ \ |
c74466a5 | 181 | --with-session-socket-dir=/tmp \ |
ab3fabda | 182 | --with-system-pid-file=%{_localstatedir}/run/dbus.pid \ |
00960c12 | 183 | --with-systemdsystemunitdir=%{systemdunitdir} \ |
4c6c017a | 184 | %{!?with_X11:--without-x} |
d31ee46d | 185 | %{__make} |
3f8dd6e4 AF |
186 | |
187 | %install | |
188 | rm -rf $RPM_BUILD_ROOT | |
63456e69 | 189 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{profile.d,rc.d/init.d,sysconfig,X11/xinit/xinitrc.d} \ |
9d777b18 PG |
190 | $RPM_BUILD_ROOT%{_datadir}/dbus-1/{services,interfaces} \ |
191 | $RPM_BUILD_ROOT%{_localstatedir}/run/dbus \ | |
6a298ef2 | 192 | $RPM_BUILD_ROOT%{_localstatedir}/lib/dbus \ |
508e2779 | 193 | $RPM_BUILD_ROOT/%{_lib} \ |
66957508 | 194 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
3f8dd6e4 AF |
195 | |
196 | %{__make} install \ | |
d31ee46d | 197 | DESTDIR=$RPM_BUILD_ROOT |
3f8dd6e4 | 198 | |
6c17b0ba ER |
199 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/messagebus |
200 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/dbus-daemon-1.sh | |
201 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/messagebus | |
202 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d | |
817942a3 | 203 | |
63456e69 | 204 | cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
508e2779 | 205 | |
7958b662 | 206 | %if %{with systemd} |
00960c12 | 207 | ln -s dbus.service $RPM_BUILD_ROOT%{systemdunitdir}/messagebus.service |
4c1f648e | 208 | |
da49799a | 209 | # we are creating messagebus user from rpm pre |
ce47922b | 210 | %{__rm} $RPM_BUILD_ROOT/usr/lib/sysusers.d/dbus.conf |
7958b662 JP |
211 | %endif |
212 | ||
213 | # for local configuration in dbus 1.10+ | |
214 | install -d $RPM_BUILD_ROOT/etc/dbus-1/{session.d,system.d} | |
da49799a | 215 | |
3f8dd6e4 | 216 | %clean |
bc0b5507 | 217 | rm -rf $RPM_BUILD_ROOT |
3f8dd6e4 | 218 | |
817942a3 | 219 | %pre |
64d48b42 | 220 | %groupadd -g 122 messagebus |
d3e1076f | 221 | %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g 122 messagebus |
817942a3 | 222 | |
223 | %post | |
817942a3 | 224 | /sbin/chkconfig --add messagebus |
2b86874f | 225 | %service -n messagebus restart "D-Bus daemon" |
24fe08d4 JR |
226 | export NORESTART="yes" |
227 | %systemd_post messagebus.service | |
38fee88a | 228 | %systemd_user_post dbus.service dbus.socket |
817942a3 | 229 | |
230 | %preun | |
231 | if [ "$1" = "0" ];then | |
9a0bbf5a | 232 | %service messagebus stop |
817942a3 | 233 | /sbin/chkconfig --del messagebus |
234 | fi | |
38fee88a | 235 | %systemd_user_preun dbus.service dbus.socket |
817942a3 | 236 | |
237 | %postun | |
817942a3 | 238 | if [ "$1" = "0" ]; then |
b5824d21 | 239 | %userremove messagebus |
240 | %groupremove messagebus | |
817942a3 | 241 | fi |
24fe08d4 JR |
242 | %systemd_reload |
243 | ||
244 | %triggerpostun -- dbus < 1.4.16-5 | |
245 | %systemd_trigger messagebus.service | |
246 | if [ -f /etc/sysconfig/dbus ]; then | |
247 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
248 | mv -f /etc/sysconfig/{dbus,messagebus} | |
249 | elif [ -f /etc/sysconfig/dbus.rpmsave ]; then | |
250 | mv -f /etc/sysconfig/messagebus{,.rpmnew} | |
251 | mv -f /etc/sysconfig/{dbus.rpmsave,messagebus} | |
252 | fi | |
0186cbb3 | 253 | |
2c14f3cc | 254 | %post libs -p /sbin/ldconfig |
255 | %postun libs -p /sbin/ldconfig | |
f82a8a7b | 256 | |
3f8dd6e4 AF |
257 | %files |
258 | %defattr(644,root,root,755) | |
60d211c4 | 259 | %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets |
08c9542c | 260 | %attr(755,root,root) %{_bindir}/dbus-daemon |
e5453be6 | 261 | %attr(755,root,root) %{_bindir}/dbus-uuidgen |
d31ee46d | 262 | %attr(755,root,root) %{_bindir}/dbus-monitor |
b72e187e | 263 | %attr(755,root,root) %{_bindir}/dbus-run-session |
60d211c4 | 264 | %attr(755,root,root) %{_bindir}/dbus-send |
194ba181 JB |
265 | %attr(755,root,root) %{_bindir}/dbus-test-tool |
266 | %attr(755,root,root) %{_bindir}/dbus-update-activation-environment | |
b4de32e1 | 267 | %attr(4754,root,messagebus) %{_libexecdir}/dbus-daemon-launch-helper |
194ba181 JB |
268 | %{_datadir}/dbus-1/session.conf |
269 | %{_datadir}/dbus-1/system.conf | |
da49799a | 270 | %{_datadir}/xml/dbus-1 |
194ba181 JB |
271 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/session.conf |
272 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.conf | |
b89dd173 | 273 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus |
6a298ef2 | 274 | %attr(754,root,root) /etc/rc.d/init.d/messagebus |
6f305975 | 275 | %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh |
66957508 | 276 | %{systemdtmpfilesdir}/%{name}.conf |
6a298ef2 | 277 | %dir %{_localstatedir}/lib/dbus |
184f238c | 278 | %dir %{_localstatedir}/run/dbus |
60d211c4 | 279 | %{_mandir}/man1/dbus-cleanup-sockets.1* |
08c9542c | 280 | %{_mandir}/man1/dbus-daemon.1* |
e5453be6 | 281 | %{_mandir}/man1/dbus-uuidgen.1* |
d31ee46d | 282 | %{_mandir}/man1/dbus-monitor.1* |
b72e187e | 283 | %{_mandir}/man1/dbus-run-session.1* |
60d211c4 | 284 | %{_mandir}/man1/dbus-send.1* |
194ba181 JB |
285 | %{_mandir}/man1/dbus-test-tool.1* |
286 | %{_mandir}/man1/dbus-update-activation-environment.1* | |
3f8dd6e4 | 287 | |
7958b662 | 288 | %if %{with systemd} |
00960c12 AF |
289 | %{systemdunitdir}/dbus.service |
290 | %{systemdunitdir}/dbus.socket | |
00960c12 AF |
291 | %{systemdunitdir}/messagebus.service |
292 | %{systemdunitdir}/multi-user.target.wants/dbus.service | |
293 | %{systemdunitdir}/sockets.target.wants/dbus.socket | |
03857e64 AM |
294 | %{systemduserunitdir}/dbus.service |
295 | %{systemduserunitdir}/dbus.socket | |
296 | %{systemduserunitdir}/sockets.target.wants/dbus.socket | |
7958b662 | 297 | %endif |
4c1f648e | 298 | |
0186cbb3 | 299 | %files libs |
3f8dd6e4 | 300 | %defattr(644,root,root,755) |
e58eea39 | 301 | %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO |
f926e709 JR |
302 | %attr(755,root,root) %{_libdir}/libdbus-1.so.*.*.* |
303 | %attr(755,root,root) %ghost %{_libdir}/libdbus-1.so.3 | |
1dcc978d | 304 | %dir %{_datadir}/dbus-1 |
194ba181 JB |
305 | %dir %{_datadir}/dbus-1/session.d |
306 | %dir %{_datadir}/dbus-1/system.d | |
1dcc978d JB |
307 | # interfaces is basically devel thing, but keep dir here |
308 | # in case something uses it at runtime | |
309 | %dir %{_datadir}/dbus-1/interfaces | |
f4dfbde8 AM |
310 | %dir %{_datadir}/dbus-1/services |
311 | %dir %{_datadir}/dbus-1/system-services | |
194ba181 JB |
312 | # TODO: now it's only for local configuration - move to base dbus package |
313 | # after all packages place constant configuration in %{_datadir}/dbus-1 | |
314 | %dir /etc/dbus-1 | |
315 | %dir /etc/dbus-1/session.d | |
316 | %dir /etc/dbus-1/system.d | |
0186cbb3 | 317 | |
318 | %files devel | |
319 | %defattr(644,root,root,755) | |
2009405e | 320 | %attr(755,root,root) %{_libdir}/libdbus-1.so |
60d211c4 | 321 | %{_libdir}/libdbus-1.la |
9fb96e41 JB |
322 | %dir %{_libdir}/dbus-1.0 |
323 | %{_libdir}/dbus-1.0/include | |
ce47922b | 324 | %{_libdir}/cmake/DBus1 |
9fb96e41 | 325 | %{_includedir}/dbus-1.0 |
11267a0a | 326 | %{_pkgconfigdir}/dbus-1.pc |
0f66e1a4 JB |
327 | %dir %{_docdir}/dbus |
328 | %{_docdir}/dbus/*.html | |
329 | %{_docdir}/dbus/*.png | |
330 | %{_docdir}/dbus/*.svg | |
331 | %{_docdir}/dbus/*.txt | |
332 | ||
bc0b5507 JB |
333 | %files static |
334 | %defattr(644,root,root,755) | |
60d211c4 | 335 | %{_libdir}/libdbus-1.a |
d94552dc | 336 | |
0f66e1a4 JB |
337 | %files apidocs |
338 | %defattr(644,root,root,755) | |
339 | %{_docdir}/dbus/api | |
f4dfbde8 | 340 | %{_docdir}/dbus/dbus.devhelp2 |
0f66e1a4 | 341 | |
d94552dc ER |
342 | %files x11 |
343 | %defattr(644,root,root,755) | |
344 | %attr(755,root,root) %{_bindir}/dbus-launch | |
345 | %{_mandir}/man1/dbus-launch.1* | |
11267a0a | 346 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/dbus-xinitrc.sh |