1 %define dbus_user_uid 81
7 Url: http://dbus.freedesktop.org/
8 Summary: D-Bus Message Bus System
9 License: GPL-2.0+ or AFL-2.1, BSD-2.0, LGPL-2.1+, MIT
13 %define with_systemd 1
15 BuildRequires: expat-devel
16 BuildRequires: libtool
18 BuildRequires: pkg-config
20 BuildRequires: pkgconfig(libsystemd)
22 BuildRequires: pkgconfig(libsmack)
23 BuildRequires: pkgconfig(cynara-client-async)
24 BuildRequires: pkgconfig(cynara-session)
27 Source0: http://dbus.freedesktop.org/releases/dbus/dbus-%{version}.tar.gz
29 Source3: dbus_at_console.ck
30 Source4: baselibs.conf
31 Source5: dbus-user.service
32 Source6: dbus-user.socket
34 Source1001: dbus.manifest
35 BuildRequires: libcap-ng-devel
36 BuildRequires: pkgconfig(libsmack)
37 # Enable support for libdbuspolicy (only for kdbus transport)
39 %if %{with dbuspolicy}
40 BuildRequires: pkgconfig(libdbuspolicy1)
41 BuildRequires: pkgconfig(cynara-client)
45 Requires(pre): /usr/sbin/groupadd /usr/sbin/useradd
49 D-Bus is a message bus system, a simple way for applications to talk to
50 one another. D-Bus supplies both a system daemon and a
51 per-user-login-session daemon. Also, the message bus is built on top of
52 a general one-to-one message passing framework, which can be used by
53 any two apps to communicate directly (without going through the message
56 This package provides dbus-daemon.
59 Summary: Developer package for D-Bus
60 Group: Development/Libraries
61 Requires: dbus-libs = %{version}
64 D-Bus is a message bus system, a simple way for applications to talk to
67 This package provides development libraries.
70 Summary: Library package for D-Bus
71 Group: System/Libraries
74 D-Bus is a message bus system, a simple way for applications to talk to
77 This package provides shared libraries.
82 %setup -n dbus-%{version} -q
86 # We use -fpie/-pie for the whole build; this is the recommended way to harden
87 # the build upstream, see discussion in fdo#46570
88 export CFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing -fPIC -fpie"
90 export CXXFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing"
91 export CFLAGS="$CFLAGS -fstack-protector"
92 export CXXFLAGS="$CXXFLAGS -fstack-protector"
97 --with-dbus-user=dbus \
98 --libexecdir=%{_libdir}/%{name} \
100 --with-init-scripts=suse \
102 --disable-doxygen-docs \
108 --enable-kdbus-transport \
109 %if %{with dbuspolicy}
110 --enable-libdbuspolicy \
113 --with-system-pid-file=/tmp/dbus_launch \
114 --with-console-auth-dir=/var/run/dbus/at_console/ \
115 --with-systemdsystemunitdir=%{_unitdir} \
123 make DESTDIR=%{buildroot} install
124 mkdir -p %{buildroot}/usr/sbin
125 install -d %{buildroot}/%{_localstatedir}/run/dbus
126 mkdir -p %{buildroot}/%{_libdir}/pkgconfig
127 mkdir -p %{buildroot}/lib/dbus-1/system-services
128 mkdir -p %{buildroot}/%{_datadir}/dbus-1/system-services
129 mkdir -p %{buildroot}/%{_datadir}/dbus-1/interfaces
131 chmod a-x AUTHORS COPYING HACKING NEWS README doc/*.txt doc/file-boilerplate.c doc/TODO
133 install -d %{buildroot}%{_sysconfdir}/ConsoleKit/run-session.d
134 install -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/ConsoleKit/run-session.d
135 mkdir -p %{buildroot}%{_localstatedir}/lib/dbus
136 touch %{buildroot}/%{_localstatedir}/lib/dbus/machine-id
138 mkdir -p %{buildroot}%{_unitdir_user}
139 install -m0644 %{SOURCE5} %{buildroot}%{_unitdir_user}/dbus.service
140 install -m0644 %{SOURCE6} %{buildroot}%{_unitdir_user}/dbus.socket
141 rm -rf %{buildroot}/%{_libdir}/*.la
142 rm -rf %{buildroot}/%{_bindir}/dbus-launch
144 # install script for login shells (/etc/profile.d)
145 install -d %{buildroot}%{_sysconfdir}/profile.d
146 install -m0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/profile.d/dbus.sh
149 rm -rf %{buildroot}%{_datadir}/doc
152 # Add the "dbus" user and group
153 /usr/sbin/groupadd -r -g %{dbus_user_uid} dbus 2>/dev/null || :
154 /usr/sbin/useradd -c 'System message bus' -u %{dbus_user_uid} -g %{dbus_user_uid} \
155 -s /sbin/nologin -r -d '/' dbus 2> /dev/null || :
158 %post libs -p /sbin/ldconfig
160 %postun libs -p /sbin/ldconfig
164 %manifest %{name}.manifest
165 %defattr(-, root, root)
166 %dir %{_localstatedir}/lib/dbus
168 %dir /lib/dbus-1/system-services
170 %config(noreplace) %{_sysconfdir}/dbus-1/session.conf
171 %config(noreplace) %{_sysconfdir}/dbus-1/system.conf
172 %config(noreplace) %{_datadir}/dbus-1/session.conf
173 %config(noreplace) %{_datadir}/dbus-1/system.conf
174 %{_sysconfdir}/ConsoleKit
175 %{_bindir}/dbus-cleanup-sockets
176 %{_bindir}/dbus-daemon
177 %{_bindir}/dbus-monitor
178 %{_bindir}/dbus-run-session
180 %{_bindir}/dbus-uuidgen
181 %{_bindir}/dbus-test-tool
182 %{_bindir}/dbus-update-activation-environment
183 # See doc/system-activation.txt in source tarball for the rationale
184 # behind these permissions
185 %attr(4750,root,dbus) %verify(not mode) %{_libdir}/dbus/dbus-daemon-launch-helper
186 %ghost %{_localstatedir}/run/dbus
187 %ghost %{_localstatedir}/lib/dbus/machine-id
189 %{_unitdir}/dbus.service
190 %{_unitdir}/dbus.socket
191 %{_unitdir_user}/dbus.service
192 %{_unitdir_user}/dbus.socket
193 %dir %{_unitdir}/dbus.target.wants
194 %{_unitdir}/dbus.target.wants/dbus.socket
195 %dir %{_unitdir}/multi-user.target.wants
196 %{_unitdir}/multi-user.target.wants/dbus.service
197 %dir %{_unitdir}/sockets.target.wants
198 %{_unitdir}/sockets.target.wants/dbus.socket
199 %dir %{_sysconfdir}/dbus-1
200 %dir %{_datadir}/dbus-1/session.d
201 %dir %{_datadir}/dbus-1/system.d
202 %dir %{_datadir}/dbus-1
203 %dir %{_datadir}/dbus-1/interfaces
204 %dir %{_datadir}/dbus-1/services
205 %dir %{_datadir}/dbus-1/system-services
206 %{_sysconfdir}/profile.d/dbus.sh
209 %manifest %{name}.manifest
210 %defattr(-, root, root)
211 %{_libdir}/libdbus-1.so.*
214 %manifest %{name}.manifest
215 %defattr(-,root,root)
217 %{_libdir}/libdbus-1.so
218 %{_libdir}/dbus-1.0/include
219 %{_libdir}/pkgconfig/dbus-1.pc
220 %dir %{_libdir}/dbus-1.0