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