/[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 442898 - (show annotations) (download)
Thu Jun 13 18:45:11 2013 UTC (10 years, 10 months ago) by colin
File size: 6063 byte(s)
Apply upstream fix for CVE-2013-2168 (va_args DoS risk on x86_64)
1 %define subrel 1
2 %define bootstrap 0
3 %{?_without_bootstrap: %global bootstrap 0}
4 %{?_with_bootstrap: %global bootstrap 1}
5
6 %define expat_version 2.0.1
7
8 %define lib_major 3
9 %define lib_api 1
10 %define lib_name %mklibname dbus %{lib_api} %{lib_major}
11 %define develname %mklibname -d dbus
12
13 %define enable_test 0
14 %define enable_verbose 0
15
16 %define git_url git://git.freedesktop.org/git/dbus/dbus
17
18 Summary: D-Bus message bus
19 Name: dbus
20 Version: 1.6.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 License: GPLv2+ or AFL
30 Group: System/Servers
31 BuildRequires: libx11-devel
32 BuildRequires: expat-devel >= %{expat_version}
33 %if !%bootstrap
34 BuildRequires: xmlto docbook-dtd412-xml
35 BuildRequires: doxygen
36 %endif
37 BuildRequires: libtool
38 BuildRequires: libcap-ng-devel
39 BuildRequires: pkgconfig(gio-2.0) >= 2.24
40 BuildRequires: pkgconfig(glib-2.0) >= 2.24
41 BuildRequires: pkgconfig(libsystemd-daemon) >= 32
42 BuildRequires: pkgconfig(libsystemd-login) >= 32
43 Requires(pre): rpm-helper >= 0.24.8-1
44 Requires(preun): rpm-helper >= 0.24.8-1
45 Provides: should-restart = system
46
47 %description
48 D-Bus is a system for sending messages between applications. It is
49 used both for the systemwide message bus service, and as a
50 per-user-login-session messaging facility.
51
52 %package -n %{lib_name}
53 Summary: Shared library for using D-Bus
54 Group: System/Libraries
55 Requires: dbus >= %{version}
56 Obsoletes: %{_lib}dbus-1_3 < 1.6.0
57
58 %description -n %{lib_name}
59 D-Bus shared library.
60
61 %package -n %develname
62 Summary: Libraries and headers for D-Bus
63 Group: Development/C
64 Requires: %{name} = %{version}
65 Requires: %{lib_name} = %{version}
66 Provides: lib%{name}-1-devel = %{version}-%{release}
67 Provides: lib%{name}-devel = %{version}-%{release}
68 Provides: %{name}-devel = %{version}-%{release}
69 Conflicts: %{_lib}dbus-1_0-devel
70 Obsoletes: %{mklibname -d dbus- 1 3} < 1.6.0
71 Obsoletes: %{_lib}dbus-1-devel < 1.6.0
72
73 %description -n %develname
74 Headers and static libraries for D-Bus.
75
76 %package x11
77 Summary: X11-requiring add-ons for D-Bus
78 Group: System/Servers
79 Requires: dbus = %{version}
80
81 %package doc
82 Summary: Developer documentation for D-BUS
83 Group: Documentation
84 Requires: dbus = %{version}
85 Suggests: devhelp
86 BuildArch: noarch
87 Conflicts: libdbus-1-devel < 1.2.20
88 Conflicts: lib64dbus-1-devel < 1.2.20
89
90 %description doc
91 This package contains developer documentation for D-Bus along with
92 other supporting documentation such as the introspect dtd file.
93
94 %description x11
95 D-Bus contains some tools that require Xlib to be installed, those are
96 in this separate package so server systems need not install X.
97
98 %prep
99 %setup -q
100 %apply_patches
101
102 %build
103
104 COMMON_ARGS="--disable-static --disable-selinux --with-system-socket=/run/dbus/system_bus_socket --libexecdir=%{_libexecdir}/dbus-%{lib_api}"
105
106 #### Build once with tests to make check
107 %if %{enable_test}
108 %configure2_5x $COMMON_ARGS --enable-tests=yes --enable-systemd \
109 --enable-verbose-mode=yes \
110 --enable-asserts=yes \
111 --disable-doxygen-docs \
112 --enable-userdb-cache \
113 --disable-xml-docs
114 DBUS_VERBOSE=1 %make
115 make check
116
117 #### Clean up and build again
118 make clean
119 %endif
120
121 %configure2_5x $COMMON_ARGS --disable-tests --disable-asserts \
122 %if !%bootstrap
123 --enable-doxygen-docs --enable-xml-docs \
124 --htmldir=%{_datadir}/devhelp/books/%{name} \
125 %endif
126 %if %enable_verbose
127 --enable-verbose-mode=yes
128 %else
129 --enable-verbose-mode=no
130 %endif
131 %make
132
133 %check
134 make check
135
136 %install
137 %makeinstall_std
138
139 mkdir -p %{buildroot}%{_sysconfdir}/X11/xinit.d
140 cat << EOF > %{buildroot}%{_sysconfdir}/X11/xinit.d/30dbus
141 # to be sourced
142 if [ -z "\$DBUS_SESSION_BUS_ADDRESS" ]; then
143 eval \`/usr/bin/dbus-launch --exit-with-session --sh-syntax\`
144 fi
145 EOF
146 chmod 755 %{buildroot}%{_sysconfdir}/X11/xinit.d/30dbus
147
148 # create directory
149 mkdir %{buildroot}%{_datadir}/dbus-%{lib_api}/interfaces
150
151 # This is legacy
152 rm -rf %{buildroot}%{_unitdir}/dbus.target.wants
153
154 # link devhelp docs in docdir
155 mkdir -p %{buildroot}%{_docdir}/%{name}-doc
156 pushd %{buildroot}%{_datadir}/devhelp/books/%{name}
157 for f in *; do
158 ln -s ../../devhelp/books/%{name}/$f %{buildroot}%{_docdir}/%{name}-doc
159 done
160 popd
161
162 #remove unpackaged file
163 find %{buildroot} -name '*.la' -delete
164
165 %pre
166 %_pre_useradd messagebus / /sbin/nologin
167 %_pre_groupadd daemon messagebus
168
169 %postun
170 %_postun_userdel messagebus
171 %_postun_groupdel daemon messagebus
172
173 %files
174 %doc COPYING NEWS
175 %dir %{_sysconfdir}/dbus-%{lib_api}
176 %exclude %{_sysconfdir}/rc.d/init.d/*
177 %config(noreplace) %{_sysconfdir}/dbus-%{lib_api}/*.conf
178 %dir %{_sysconfdir}/dbus-%{lib_api}/system.d
179 %dir %{_sysconfdir}/dbus-%{lib_api}/session.d
180 %dir %{_localstatedir}/lib/dbus
181 %dir %{_libdir}/dbus-1.0
182 %{_bindir}/dbus-daemon
183 %{_bindir}/dbus-send
184 %{_bindir}/dbus-cleanup-sockets
185 %{_bindir}/dbus-uuidgen
186 %{_mandir}/man*/*
187 %dir %{_datadir}/dbus-%{lib_api}
188 %{_datadir}/dbus-%{lib_api}/system-services
189 %{_datadir}/dbus-%{lib_api}/services
190 %{_datadir}/dbus-%{lib_api}/interfaces
191 # See doc/system-activation.txt in source tarball for the rationale
192 # behind these permissions
193 %dir %{_libexecdir}/dbus-%{lib_api}
194 %attr(4750,root,messagebus) %{_libexecdir}/dbus-%{lib_api}/dbus-daemon-launch-helper
195 %{_unitdir}/dbus.service
196 %{_unitdir}/dbus.socket
197 %{_unitdir}/multi-user.target.wants/dbus.service
198 %{_unitdir}/sockets.target.wants/dbus.socket
199
200 %files -n %{lib_name}
201 %{_libdir}/*dbus-%{lib_api}*.so.%{lib_major}*
202
203 %files -n %develname
204 %doc ChangeLog
205 %{_libdir}/libdbus-%{lib_api}.so
206 %{_libdir}/dbus-1.0/include
207 %{_libdir}/pkgconfig/dbus-%{lib_api}.pc
208 %{_includedir}/dbus-1.0
209
210 %files x11
211 %{_sysconfdir}/X11/xinit.d/*
212 %{_bindir}/dbus-launch
213 %{_bindir}/dbus-monitor
214
215 %files doc
216 %doc %{_datadir}/devhelp/books/dbus
217 %{_docdir}/%{name}-doc

  ViewVC Help
Powered by ViewVC 1.1.30