1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
%define dbus_user_uid 81
Name: dbus
Url: http://dbus.freedesktop.org/
Summary: D-Bus Message Bus System
License: GPL-2.0+ or AFL-2.1
Group: Base/IPC
# COMMON1-BEGIN
%define with_systemd 1
BuildRequires: doxygen
BuildRequires: expat-devel
BuildRequires: libtool
BuildRequires: libxslt-tools
BuildRequires: libzio
BuildRequires: pkg-config
BuildRequires: xmlto
%if %{with_systemd}
BuildRequires: pkgconfig(libsystemd-daemon)
BuildRequires: pkgconfig(libsystemd-login)
%endif
Version: 1.6.12
Release: 0
Source0: http://dbus.freedesktop.org/releases/dbus/dbus-%{version}.tar.gz
Source1: rc.boot.dbus
Source3: dbus_at_console.ck
Source4: baselibs.conf
Source5: dbus-user.service
Source6: dbus-user.socket
BuildRequires: libcap-ng-devel
# COMMON1-END
Requires(pre): /usr/sbin/groupadd /usr/sbin/useradd
%package devel-doc
Summary: Developer documentation package for D-Bus
Group: Documentation
Requires: %{name} = %{version}
BuildArch: noarch
%description
D-Bus is a message bus system, a simple way for applications to talk to
one another. D-Bus supplies both a system daemon and a
per-user-login-session daemon. Also, the message bus is built on top of
a general one-to-one message passing framework, which can be used by
any two apps to communicate directly (without going through the message
bus daemon).
%description devel-doc
D-Bus is a message bus system, a simple way for applications to talk to
one another. D-BUS supplies both a system daemon and a
per-user-login-session daemon. Also, the message bus is built on top of
a general one-to-one message passing framework, which can be used by
any two apps to communicate directly (without going through the message
bus daemon).
%prep
# COMMON2-BEGIN
%setup -n dbus-%{version} -q
%build
autoreconf -fi
# We use -fpie/-pie for the whole build; this is the recommended way to harden
# the build upstream, see discussion in fdo#46570
export CFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing -fPIC -fpie"
export LDFLAGS="-pie"
export CXXFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing"
export CFLAGS="$CFLAGS -fstack-protector"
export CXXFLAGS="$CXXFLAGS -fstack-protector"
export V=1
%configure \
--disable-static \
--with-pic \
--with-dbus-user=dbus \
--libexecdir=%{_libdir}/%{name} \
--libdir=%{_libdir} \
--with-init-scripts=suse \
--enable-inotify \
--enable-doxygen-docs \
%if %{with_systemd}
--enable-systemd \
%endif
--with-console-auth-dir=/var/run/dbus/at_console/ \
--with-systemdsystemunitdir=%{_unitdir}
make %{?_smp_mflags}
%install
# COMMON2-END
make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}/usr/sbin
install -d %{buildroot}/%{_localstatedir}/run/dbus
mkdir -p %{buildroot}/%{_libdir}/pkgconfig
mkdir -p %{buildroot}/lib/dbus-1/system-services
mkdir -p %{buildroot}/%{_datadir}/dbus-1/system-services
mkdir -p %{buildroot}/%{_datadir}/dbus-1/interfaces
#
chmod a-x AUTHORS COPYING HACKING NEWS README doc/*.txt doc/file-boilerplate.c doc/TODO
#
install -d %{buildroot}%{_sysconfdir}/ConsoleKit/run-session.d
install -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/ConsoleKit/run-session.d
mkdir -p %{buildroot}%{_localstatedir}/lib/dbus
touch %{buildroot}/%{_localstatedir}/lib/dbus/machine-id
mkdir -p %{buildroot}%{_unitdir_user}
install -m0644 %{SOURCE5} %{buildroot}%{_unitdir_user}/dbus.service
install -m0644 %{SOURCE6} %{buildroot}%{_unitdir_user}/dbus.socket
# File packaged by libdbus and dbus-devel
rm -rf %{buildroot}/%{_includedir}/*
rm -rf %{buildroot}/%{_libdir}/*.la
rm -rf %{buildroot}/%{_libdir}/libdbus-1.so
rm -rf %{buildroot}/%{_libdir}/libdbus-1.so.*
rm -rf %{buildroot}/%{_libdir}/dbus-1.0/include
rm -rf %{buildroot}/%{_libdir}/pkgconfig/dbus-1.pc
rm -rf %{buildroot}/%{_mandir}/man1/dbus-launch.1*
rm -rf %{buildroot}/%{_bindir}/dbus-launch
%pre
# Add the "dbus" user and group
/usr/sbin/groupadd -r -g %{dbus_user_uid} dbus 2>/dev/null || :
/usr/sbin/useradd -c 'System message bus' -u %{dbus_user_uid} -g %{dbus_user_uid} \
-s /sbin/nologin -r -d '/' dbus 2> /dev/null || :
%docs_package
%files
%defattr(-, root, root)
%dir %{_localstatedir}/lib/dbus
%dir /lib/dbus-1
%dir /lib/dbus-1/system-services
%license COPYING
%config(noreplace) %{_sysconfdir}/dbus-1/session.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.conf
%{_sysconfdir}/ConsoleKit
%{_bindir}/dbus-cleanup-sockets
%{_bindir}/dbus-daemon
%{_bindir}/dbus-monitor
%{_bindir}/dbus-send
%{_bindir}/dbus-uuidgen
# See doc/system-activation.txt in source tarball for the rationale
# behind these permissions
%attr(4750,root,dbus) %verify(not mode) %{_libdir}/dbus/dbus-daemon-launch-helper
%ghost %{_localstatedir}/run/dbus
%ghost %{_localstatedir}/lib/dbus/machine-id
%dir %{_unitdir}
%{_unitdir}/dbus.service
%{_unitdir}/dbus.socket
%{_unitdir_user}/dbus.service
%{_unitdir_user}/dbus.socket
%dir %{_unitdir}/dbus.target.wants
%{_unitdir}/dbus.target.wants/dbus.socket
%dir %{_unitdir}/multi-user.target.wants
%{_unitdir}/multi-user.target.wants/dbus.service
%dir %{_unitdir}/sockets.target.wants
%{_unitdir}/sockets.target.wants/dbus.socket
%files devel-doc
%defattr(-,root,root)
%dir %{_datadir}/doc/dbus
%{_datadir}/doc/dbus/api/
%doc %{_datadir}/doc/dbus/dbus-faq.html
%doc %{_datadir}/doc/dbus/dbus-specification.html
%doc %{_datadir}/doc/dbus/dbus-test-plan.html
%doc %{_datadir}/doc/dbus/dbus-tutorial.html
%doc %{_datadir}/doc/dbus/dbus.devhelp
%doc %{_datadir}/doc/dbus/diagram.*
%doc %{_datadir}/doc/dbus/system-activation.txt
%doc doc/*.txt doc/file-boilerplate.c doc/TODO
%changelog
|