/[packages]/updates/3/dbus/current/SPECS/dbus.spec
ViewVC logotype

Contents of /updates/3/dbus/current/SPECS/dbus.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 796217 - (show annotations) (download)
Mon Nov 10 20:20:31 2014 UTC (9 years, 5 months ago) by tmb
File size: 7320 byte(s)
set default auth_timeout to 30s as some systems still fail with 20s
1 %define bootstrap 0
2 %{?_without_bootstrap: %global bootstrap 0}
3 %{?_with_bootstrap: %global bootstrap 1}
4
5 %define expat_version 2.0.1
6
7 %define lib_major 3
8 %define lib_api 1
9 %define lib_name %mklibname dbus %{lib_api} %{lib_major}
10 %define develname %mklibname -d dbus
11
12 %define enable_test 0
13 %define enable_verbose 0
14
15 %define git_url git://git.freedesktop.org/git/dbus/dbus
16
17 Summary: D-Bus message bus
18 Name: dbus
19 Version: 1.6.8
20 %define subrel 8
21 Release: %mkrel 4
22 URL: http://www.freedesktop.org/Software/dbus
23 Source0: http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz
24 # (cg) See https://bugs.freedesktop.org/show_bug.cgi?id=56043
25 Patch0: dbus-1.6.8-dbus-spawn-ignore-sigpipe.patch
26 # (cg) CVE-2013-2168
27 # http://cgit.freedesktop.org/dbus/dbus/commit/?id=954d75b2b64e4799f360d2a6bf9cff6d9fee37e7
28 Patch1: 0001-CVE-2013-2168-_dbus_printf_string_upper_bound-copy-t.patch
29 # (tmb) CVE-2014-3477
30 # http://cgit.freedesktop.org/dbus/dbus/commit/?h=dbus-1.6&id=cab1c56bb9d70469128d2ae1c40539c0d3b30f13
31 Patch2: 0002-CVE-2014-3477-deliver-activation-errors-correctly.patch
32 # (fedora) CVE-2014-3532 and CVE-2014-3533, backported from 1.6 branch
33 Patch3: 0003-CVE-2014-3532-Handle-ETOOMANYREFS-when-sending-recursive-fds.patch
34 Patch4: 0004-CVE-2014-3533-If-loader-cont-two-msgs-with-fds-don-t-corru.patch
35 # (debian) (CVE-2014-3635/6/7/8/9) mga#14012
36 Patch5: 10001-system-bus-limit-use-max_replies_per_connection-128-.patch
37 Patch6: 10002-config-change-DEFAULT_MESSAGE_UNIX_FDS-to-16.patch
38 # (Nov 10th, 2014 /tmb) disable this as some systems still need 30s
39 # Patch7: 10003-config-change-default-auth_timeout-to-20-seconds.patch
40 Patch8: 10004-Stop-listening-on-DBusServer-sockets-when-reaching-m.patch
41 Patch9: 10005-config-add-new-limit-pending_fd_timeout.patch
42 Patch10: 10006-DBusConnection-implements-_dbus_connection_get_pendi.patch
43 Patch11: 10007-DBusConnection-implements-_dbus_connection_set_pendi.patch
44 Patch12: 10008-bus-enforce-pending_fd_timeout.patch
45 Patch13: 10010-_dbus_read_socket_with_unix_fds-do-not-accept-extra-.patch
46 # CVE-2014-7824
47 Patch14: 10011-dbus-set-fd-rlimit-to-64k-for-the-system-dbus-daemon_CVE-2014-7824.patch
48
49 License: GPLv2+ or AFL
50 Group: System/Servers
51 BuildRequires: libx11-devel
52 BuildRequires: expat-devel >= %{expat_version}
53 %if !%bootstrap
54 BuildRequires: xmlto docbook-dtd412-xml
55 BuildRequires: doxygen
56 %endif
57 BuildRequires: libtool
58 BuildRequires: libcap-ng-devel
59 BuildRequires: pkgconfig(gio-2.0) >= 2.24
60 BuildRequires: pkgconfig(glib-2.0) >= 2.24
61 BuildRequires: pkgconfig(libsystemd-daemon) >= 32
62 BuildRequires: pkgconfig(libsystemd-login) >= 32
63 Requires(pre): rpm-helper >= 0.24.8-1
64 Requires(preun): rpm-helper >= 0.24.8-1
65 Provides: should-restart = system
66
67 %description
68 D-Bus is a system for sending messages between applications. It is
69 used both for the systemwide message bus service, and as a
70 per-user-login-session messaging facility.
71
72 %package -n %{lib_name}
73 Summary: Shared library for using D-Bus
74 Group: System/Libraries
75 Requires: dbus >= %{version}
76 Obsoletes: %{_lib}dbus-1_3 < 1.6.0
77
78 %description -n %{lib_name}
79 D-Bus shared library.
80
81 %package -n %develname
82 Summary: Libraries and headers for D-Bus
83 Group: Development/C
84 Requires: %{name} = %{version}
85 Requires: %{lib_name} = %{version}
86 Provides: lib%{name}-1-devel = %{version}-%{release}
87 Provides: lib%{name}-devel = %{version}-%{release}
88 Provides: %{name}-devel = %{version}-%{release}
89 Conflicts: %{_lib}dbus-1_0-devel
90 Obsoletes: %{mklibname -d dbus- 1 3} < 1.6.0
91 Obsoletes: %{_lib}dbus-1-devel < 1.6.0
92
93 %description -n %develname
94 Headers and static libraries for D-Bus.
95
96 %package x11
97 Summary: X11-requiring add-ons for D-Bus
98 Group: System/Servers
99 Requires: dbus = %{version}
100
101 %package doc
102 Summary: Developer documentation for D-BUS
103 Group: Documentation
104 Requires: dbus = %{version}
105 Suggests: devhelp
106 BuildArch: noarch
107 Conflicts: libdbus-1-devel < 1.2.20
108 Conflicts: lib64dbus-1-devel < 1.2.20
109
110 %description doc
111 This package contains developer documentation for D-Bus along with
112 other supporting documentation such as the introspect dtd file.
113
114 %description x11
115 D-Bus contains some tools that require Xlib to be installed, those are
116 in this separate package so server systems need not install X.
117
118 %prep
119 %setup -q
120 %apply_patches
121
122 %build
123
124 COMMON_ARGS="--disable-static --disable-selinux --with-system-socket=/run/dbus/system_bus_socket --libexecdir=%{_libexecdir}/dbus-%{lib_api}"
125
126 #### Build once with tests to make check
127 %if %{enable_test}
128 %configure2_5x $COMMON_ARGS --enable-tests=yes --enable-systemd \
129 --enable-verbose-mode=yes \
130 --enable-asserts=yes \
131 --disable-doxygen-docs \
132 --enable-userdb-cache \
133 --disable-xml-docs
134 DBUS_VERBOSE=1 %make
135 make check
136
137 #### Clean up and build again
138 make clean
139 %endif
140
141 %configure2_5x $COMMON_ARGS --disable-tests --disable-asserts \
142 %if !%bootstrap
143 --enable-doxygen-docs --enable-xml-docs \
144 --htmldir=%{_datadir}/devhelp/books/%{name} \
145 %endif
146 %if %enable_verbose
147 --enable-verbose-mode=yes
148 %else
149 --enable-verbose-mode=no
150 %endif
151 %make
152
153 %check
154 make check
155
156 %install
157 %makeinstall_std
158
159 mkdir -p %{buildroot}%{_sysconfdir}/X11/xinit.d
160 cat << EOF > %{buildroot}%{_sysconfdir}/X11/xinit.d/30dbus
161 # to be sourced
162 if [ -z "\$DBUS_SESSION_BUS_ADDRESS" ]; then
163 eval \`/usr/bin/dbus-launch --exit-with-session --sh-syntax\`
164 fi
165 EOF
166 chmod 755 %{buildroot}%{_sysconfdir}/X11/xinit.d/30dbus
167
168 # create directory
169 mkdir %{buildroot}%{_datadir}/dbus-%{lib_api}/interfaces
170
171 # This is legacy
172 rm -rf %{buildroot}%{_unitdir}/dbus.target.wants
173
174 # link devhelp docs in docdir
175 mkdir -p %{buildroot}%{_docdir}/%{name}-doc
176 pushd %{buildroot}%{_datadir}/devhelp/books/%{name}
177 for f in *; do
178 ln -s ../../devhelp/books/%{name}/$f %{buildroot}%{_docdir}/%{name}-doc
179 done
180 popd
181
182 #remove unpackaged file
183 find %{buildroot} -name '*.la' -delete
184
185 %pre
186 %_pre_useradd messagebus / /sbin/nologin
187 %_pre_groupadd daemon messagebus
188
189 %postun
190 %_postun_userdel messagebus
191 %_postun_groupdel daemon messagebus
192
193 %files
194 %doc COPYING NEWS
195 %dir %{_sysconfdir}/dbus-%{lib_api}
196 %exclude %{_sysconfdir}/rc.d/init.d/*
197 %config(noreplace) %{_sysconfdir}/dbus-%{lib_api}/*.conf
198 %dir %{_sysconfdir}/dbus-%{lib_api}/system.d
199 %dir %{_sysconfdir}/dbus-%{lib_api}/session.d
200 %dir %{_localstatedir}/lib/dbus
201 %dir %{_libdir}/dbus-1.0
202 %{_bindir}/dbus-daemon
203 %{_bindir}/dbus-send
204 %{_bindir}/dbus-cleanup-sockets
205 %{_bindir}/dbus-uuidgen
206 %{_mandir}/man*/*
207 %dir %{_datadir}/dbus-%{lib_api}
208 %{_datadir}/dbus-%{lib_api}/system-services
209 %{_datadir}/dbus-%{lib_api}/services
210 %{_datadir}/dbus-%{lib_api}/interfaces
211 # See doc/system-activation.txt in source tarball for the rationale
212 # behind these permissions
213 %dir %{_libexecdir}/dbus-%{lib_api}
214 %attr(4750,root,messagebus) %{_libexecdir}/dbus-%{lib_api}/dbus-daemon-launch-helper
215 %{_unitdir}/dbus.service
216 %{_unitdir}/dbus.socket
217 %{_unitdir}/multi-user.target.wants/dbus.service
218 %{_unitdir}/sockets.target.wants/dbus.socket
219
220 %files -n %{lib_name}
221 %{_libdir}/*dbus-%{lib_api}*.so.%{lib_major}*
222
223 %files -n %develname
224 %doc ChangeLog
225 %{_libdir}/libdbus-%{lib_api}.so
226 %{_libdir}/dbus-1.0/include
227 %{_libdir}/pkgconfig/dbus-%{lib_api}.pc
228 %{_includedir}/dbus-1.0
229
230 %files x11
231 %{_sysconfdir}/X11/xinit.d/*
232 %{_bindir}/dbus-launch
233 %{_bindir}/dbus-monitor
234
235 %files doc
236 %doc %{_datadir}/devhelp/books/dbus
237 %{_docdir}/%{name}-doc

  ViewVC Help
Powered by ViewVC 1.1.30