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