]>
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 |
a01ba631 | 15 | Version: 1.12.16 |
0cd8e708 | 16 | Release: 1 |
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 |
a01ba631 | 20 | # Source0-md5: 2dbeae80dfc9e3632320c6a53d5e8890 |
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 |
00960c12 | 46 | BuildRequires: rpmbuild(macros) >= 1.626 |
f15cbea8 | 47 | BuildRequires: sed >= 4.0 |
194ba181 | 48 | %{?with_systemd:BuildRequires: systemd-devel >= 32} |
17b61c76 | 49 | BuildRequires: xmlto |
4c6c017a | 50 | %{?with_X11:BuildRequires: xorg-lib-libX11-devel} |
194ba181 | 51 | BuildRequires: yelp-tools |
9a0bbf5a ER |
52 | Requires(post,postun): /sbin/ldconfig |
53 | Requires(post,preun): /sbin/chkconfig | |
54 | Requires(postun): /usr/sbin/groupdel | |
55 | Requires(postun): /usr/sbin/userdel | |
48d7fff5 | 56 | Requires(pre): /bin/id |
b5824d21 | 57 | Requires(pre): /usr/bin/getgid |
48d7fff5 JB |
58 | Requires(pre): /usr/sbin/groupadd |
59 | Requires(pre): /usr/sbin/useradd | |
9d99a896 | 60 | Requires(post,preun,postun): systemd-units >= 38 |
9a0bbf5a | 61 | Requires: %{name}-libs = %{version}-%{release} |
9fb96e41 | 62 | Requires: expat >= %{expat_version} |
ce47922b JB |
63 | %{?with_apparmor:Requires: libapparmor >= 1:2.10} |
64 | %{?with_selinux:Requires: libselinux >= 2.0.86} | |
f4dffbbc | 65 | Requires: rc-scripts >= 0.4.3.0 |
9d99a896 | 66 | Requires: systemd-units >= 38 |
b5824d21 | 67 | Provides: group(messagebus) |
68 | Provides: user(messagebus) | |
75a73017 | 69 | Obsoletes: dbus-glib-tools |
fde42832 | 70 | Obsoletes: dbus-systemd |
86eafeb2 | 71 | Conflicts: pam < 0.99.7.1 |
8a7e4f09 JB |
72 | # not available for dbus 0.9x yet(?) |
73 | #Obsoletes: dbus-gtk dbus-gcj dbus-gcj-devel dbus-gcj-static | |
bc0b5507 | 74 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
3f8dd6e4 AF |
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 | ||
702c1f82 JR |
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. | |
bc0b5507 | 85 | |
93c19477 | 86 | %package libs |
3bdcad6f JB |
87 | Summary: D-BUS library |
88 | Summary(pl.UTF-8): Biblioteka D-BUS | |
93c19477 | 89 | Group: Libraries |
a74f6581 | 90 | %{?with_systemd:Requires: systemd-libs >= 32} |
1dcc978d | 91 | Obsoletes: dbus-dirs |
93c19477 JB |
92 | |
93 | %description libs | |
3bdcad6f | 94 | D-BUS library. |
93c19477 | 95 | |
702c1f82 | 96 | %description libs -l pl.UTF-8 |
3bdcad6f | 97 | Biblioteka D-BUS. |
93c19477 | 98 | |
3f8dd6e4 | 99 | %package devel |
3bdcad6f JB |
100 | Summary: Header files for D-BUS library |
101 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki D-BUS | |
3f8dd6e4 | 102 | Group: Development/Libraries |
e58eea39 | 103 | Requires: %{name}-libs = %{version}-%{release} |
a74f6581 | 104 | %{?with_systemd:Requires: systemd-devel >= 32} |
3f8dd6e4 AF |
105 | |
106 | %description devel | |
3bdcad6f | 107 | Header files for D-BUS library. |
bc0b5507 | 108 | |
702c1f82 | 109 | %description devel -l pl.UTF-8 |
3bdcad6f | 110 | Pliki nagłówkowe biblioteki D-BUS. |
bc0b5507 JB |
111 | |
112 | %package static | |
3bdcad6f JB |
113 | Summary: Static D-BUS library |
114 | Summary(pl.UTF-8): Statyczna biblioteka D-BUS | |
bc0b5507 | 115 | Group: Development/Libraries |
26ded955 | 116 | Requires: %{name}-devel = %{version}-%{release} |
bc0b5507 JB |
117 | |
118 | %description static | |
3bdcad6f | 119 | Static D-BUS library. |
bc0b5507 | 120 | |
702c1f82 | 121 | %description static -l pl.UTF-8 |
3bdcad6f | 122 | Statyczna biblioteka D-BUS. |
3f8dd6e4 | 123 | |
0f66e1a4 JB |
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} | |
2314294a ER |
130 | %if "%{_rpmversion}" >= "5" |
131 | BuildArch: noarch | |
132 | %endif | |
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} | |
145 | Obsoletes: dbus-X11 | |
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 | |
00960c12 | 207 | ln -s dbus.service $RPM_BUILD_ROOT%{systemdunitdir}/messagebus.service |
4c1f648e | 208 | |
194ba181 JB |
209 | # for local configuration in dbus 1.10+ |
210 | install -d $RPM_BUILD_ROOT/etc/dbus-1/{session.d,system.d} | |
211 | ||
da49799a | 212 | # we are creating messagebus user from rpm pre |
ce47922b | 213 | %{__rm} $RPM_BUILD_ROOT/usr/lib/sysusers.d/dbus.conf |
da49799a | 214 | |
3f8dd6e4 | 215 | %clean |
bc0b5507 | 216 | rm -rf $RPM_BUILD_ROOT |
3f8dd6e4 | 217 | |
817942a3 | 218 | %pre |
64d48b42 | 219 | %groupadd -g 122 messagebus |
d3e1076f | 220 | %useradd -u 122 -d /usr/share/empty -s /bin/false -c "System message bus" -g 122 messagebus |
817942a3 | 221 | |
222 | %post | |
817942a3 | 223 | /sbin/chkconfig --add messagebus |
2b86874f | 224 | %service -n messagebus restart "D-Bus daemon" |
24fe08d4 JR |
225 | export NORESTART="yes" |
226 | %systemd_post messagebus.service | |
817942a3 | 227 | |
228 | %preun | |
229 | if [ "$1" = "0" ];then | |
9a0bbf5a | 230 | %service messagebus stop |
817942a3 | 231 | /sbin/chkconfig --del messagebus |
232 | fi | |
233 | ||
234 | %postun | |
817942a3 | 235 | if [ "$1" = "0" ]; then |
b5824d21 | 236 | %userremove messagebus |
237 | %groupremove messagebus | |
817942a3 | 238 | fi |
24fe08d4 JR |
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 | |
0186cbb3 | 250 | |
2c14f3cc | 251 | %post libs -p /sbin/ldconfig |
252 | %postun libs -p /sbin/ldconfig | |
f82a8a7b | 253 | |
3f8dd6e4 AF |
254 | %files |
255 | %defattr(644,root,root,755) | |
60d211c4 | 256 | %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets |
08c9542c | 257 | %attr(755,root,root) %{_bindir}/dbus-daemon |
e5453be6 | 258 | %attr(755,root,root) %{_bindir}/dbus-uuidgen |
d31ee46d | 259 | %attr(755,root,root) %{_bindir}/dbus-monitor |
b72e187e | 260 | %attr(755,root,root) %{_bindir}/dbus-run-session |
60d211c4 | 261 | %attr(755,root,root) %{_bindir}/dbus-send |
194ba181 JB |
262 | %attr(755,root,root) %{_bindir}/dbus-test-tool |
263 | %attr(755,root,root) %{_bindir}/dbus-update-activation-environment | |
b4de32e1 | 264 | %attr(4754,root,messagebus) %{_libexecdir}/dbus-daemon-launch-helper |
194ba181 JB |
265 | %{_datadir}/dbus-1/session.conf |
266 | %{_datadir}/dbus-1/system.conf | |
da49799a | 267 | %{_datadir}/xml/dbus-1 |
194ba181 JB |
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 | |
b89dd173 | 270 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus |
6a298ef2 | 271 | %attr(754,root,root) /etc/rc.d/init.d/messagebus |
6f305975 | 272 | %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh |
66957508 | 273 | %{systemdtmpfilesdir}/%{name}.conf |
6a298ef2 | 274 | %dir %{_localstatedir}/lib/dbus |
184f238c | 275 | %dir %{_localstatedir}/run/dbus |
60d211c4 | 276 | %{_mandir}/man1/dbus-cleanup-sockets.1* |
08c9542c | 277 | %{_mandir}/man1/dbus-daemon.1* |
e5453be6 | 278 | %{_mandir}/man1/dbus-uuidgen.1* |
d31ee46d | 279 | %{_mandir}/man1/dbus-monitor.1* |
b72e187e | 280 | %{_mandir}/man1/dbus-run-session.1* |
60d211c4 | 281 | %{_mandir}/man1/dbus-send.1* |
194ba181 JB |
282 | %{_mandir}/man1/dbus-test-tool.1* |
283 | %{_mandir}/man1/dbus-update-activation-environment.1* | |
3f8dd6e4 | 284 | |
00960c12 AF |
285 | %{systemdunitdir}/dbus.service |
286 | %{systemdunitdir}/dbus.socket | |
00960c12 AF |
287 | %{systemdunitdir}/messagebus.service |
288 | %{systemdunitdir}/multi-user.target.wants/dbus.service | |
289 | %{systemdunitdir}/sockets.target.wants/dbus.socket | |
03857e64 AM |
290 | %{systemduserunitdir}/dbus.service |
291 | %{systemduserunitdir}/dbus.socket | |
292 | %{systemduserunitdir}/sockets.target.wants/dbus.socket | |
4c1f648e | 293 | |
0186cbb3 | 294 | %files libs |
3f8dd6e4 | 295 | %defattr(644,root,root,755) |
e58eea39 | 296 | %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO |
f926e709 JR |
297 | %attr(755,root,root) %{_libdir}/libdbus-1.so.*.*.* |
298 | %attr(755,root,root) %ghost %{_libdir}/libdbus-1.so.3 | |
1dcc978d | 299 | %dir %{_datadir}/dbus-1 |
194ba181 JB |
300 | %dir %{_datadir}/dbus-1/session.d |
301 | %dir %{_datadir}/dbus-1/system.d | |
1dcc978d JB |
302 | # interfaces is basically devel thing, but keep dir here |
303 | # in case something uses it at runtime | |
304 | %dir %{_datadir}/dbus-1/interfaces | |
f4dfbde8 AM |
305 | %dir %{_datadir}/dbus-1/services |
306 | %dir %{_datadir}/dbus-1/system-services | |
194ba181 JB |
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 | |
0186cbb3 | 312 | |
313 | %files devel | |
314 | %defattr(644,root,root,755) | |
2009405e | 315 | %attr(755,root,root) %{_libdir}/libdbus-1.so |
60d211c4 | 316 | %{_libdir}/libdbus-1.la |
9fb96e41 JB |
317 | %dir %{_libdir}/dbus-1.0 |
318 | %{_libdir}/dbus-1.0/include | |
ce47922b | 319 | %{_libdir}/cmake/DBus1 |
9fb96e41 | 320 | %{_includedir}/dbus-1.0 |
11267a0a | 321 | %{_pkgconfigdir}/dbus-1.pc |
0f66e1a4 JB |
322 | %dir %{_docdir}/dbus |
323 | %{_docdir}/dbus/*.html | |
324 | %{_docdir}/dbus/*.png | |
325 | %{_docdir}/dbus/*.svg | |
326 | %{_docdir}/dbus/*.txt | |
327 | ||
bc0b5507 JB |
328 | %files static |
329 | %defattr(644,root,root,755) | |
60d211c4 | 330 | %{_libdir}/libdbus-1.a |
d94552dc | 331 | |
0f66e1a4 JB |
332 | %files apidocs |
333 | %defattr(644,root,root,755) | |
334 | %{_docdir}/dbus/api | |
f4dfbde8 | 335 | %{_docdir}/dbus/dbus.devhelp2 |
0f66e1a4 | 336 | |
d94552dc ER |
337 | %files x11 |
338 | %defattr(644,root,root,755) | |
339 | %attr(755,root,root) %{_bindir}/dbus-launch | |
340 | %{_mandir}/man1/dbus-launch.1* | |
11267a0a | 341 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/dbus-xinitrc.sh |