Upload upstream dpkg sources (v. 1.15.5.6)
[packages/centos6/dpkg.git] / dpkg.spec
1 Name:           dpkg
2 Version:        1.15.5.6
3 Release:        6%{?dist}
4 Summary:        Package maintenance system for Debian Linux
5 Group:          System Environment/Base
6 # The entire source code is GPLv2+ with exception of the following
7 # lib/dpkg/md5.c, lib/dpkg/md5.h - Public domain
8 # lib/dpkg/showpkg.c, dselect/methods/multicd, lib/dpkg/utils.c, lib/dpkg/showpkg.c - GPLv2
9 # dselect/methods/ftp - GPL no version info
10 # scripts/Dpkg/Gettext.pm - BSD
11 # lib/compat/obstack.h, lib/compat/gettext.h,lib/compat/obstack.c - LGPLv2+
12 License:        GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD
13 URL:            http://packages.debian.org/unstable/admin/dpkg
14 Source0:        http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.bz2
15 # obtained from dpkg-source -x dpkg_1.15.5.6.dsc
16 Source1:        dpkg.archtable
17 # Fedora specific patch to store files under /usr/share/dpkg, not these are not binary
18 # libs. and set user search path to /usr/local/share/dpkg
19 Patch1:         dpkg-change-libdir-path.patch
20 # Fixes CVE-2010-0396 bugzilla #572522
21 Patch2:         fedora-fix-CVE-2010-0396-00.patch
22 Patch3:         fedora-fix-CVE-2010-0396-01.patch
23 Patch4:     fedora-bug642160-empty-argv.patch
24 Patch5:         fedora-fix-CVE-2010-1679_CVE-2011-0402.patch
25 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
26 BuildRequires:  zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel
27
28 %description 
29
30 This package contains the tools (including dpkg-source) required 
31 to unpack, build and upload Debian source packages.
32
33 This package also contains the programs dpkg which used to handle the 
34 installation and removal of packages on a Debian system.
35
36 This package also contains dselect, an interface for managing the 
37 installation and removal of packages on the system.
38
39 dpkg and dselect will certainly be non-functional on a rpm-based system
40 because packages dependencies will likely be unmet.
41
42 %package devel
43 Summary:  Debian package development tools
44 Group:    Development/System
45 Requires: %{name} = %{version}-%{release}
46 Requires: perl, patch, make, binutils, bzip2, lzma
47 BuildArch: noarch
48
49 %description devel
50 This package provides the development tools (including dpkg-source).
51 Required to unpack, build and upload Debian source packages
52
53
54 %package -n dselect
55 Summary:  Debian package management front-end
56 Group:    System Environment/Base
57 Requires: %{name} = %{version}-%{release}
58
59 %description -n dselect
60 dselect is a high-level interface for the installation/removal of debs . 
61
62 %prep
63 %setup -q
64
65 %patch1 -p1
66 %patch2 -p1
67 %patch3 -p1
68 %patch4 -p1
69 %patch5 -p1
70
71 # Filter unwanted Requires:
72 cat << \EOF > %{name}-req
73 #!/bin/sh
74 %{__perl_requires} $* |\
75   sed -e '/perl(Dselect::Ftp)/d' -e '/perl(extra)/d' -e '/perl(file)/d' -e '/perl(dpkg-gettext.pl)/d' -e '/perl(controllib.pl)/d' -e '/perl(in)/d'
76 EOF
77
78 %define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req
79 chmod +x %{__perl_requires}
80
81 %build
82 %configure --without-start-stop-daemon \
83         --disable-linker-optimisations \
84         --with-admindir=%{_localstatedir}/lib/dpkg \
85         --libdir=%{_datadir} \
86         --with-selinux \
87         --with-zlib \
88         --with-bz2 \
89         --disable-silent-rules
90
91 make %{?_smp_mflags}
92
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96 make install DESTDIR=$RPM_BUILD_ROOT
97 install -pm0644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/dpkg/archtable
98
99 %find_lang dpkg
100 %find_lang dpkg-dev
101 %find_lang dselect
102
103 # fedora has its own implementation
104 rm -rf $RPM_BUILD_ROOT%{_bindir}/update-alternatives
105 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/alternatives/
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110
111 %files   -f dpkg.lang
112 %defattr(-,root,root,-)
113 %doc debian/changelog README AUTHORS COPYING THANKS TODO
114 %dir %{_sysconfdir}/dpkg
115 %{_bindir}/dpkg
116 %{_bindir}/dpkg-deb
117 %{_bindir}/dpkg-query
118 %{_bindir}/dpkg-split
119 %{_bindir}/dpkg-trigger
120 %{_bindir}/dpkg-divert
121 %{_bindir}/dpkg-statoverride
122 %{_sbindir}/*
123 %dir %{_datadir}/dpkg
124 %{_datadir}/dpkg/mksplit
125 %{_datadir}/dpkg/archtable
126 %{_datadir}/dpkg/cputable
127 %{_datadir}/dpkg/ostable
128 %{_datadir}/dpkg/triplettable
129 %{perl_vendorlib}/Dpkg.pm
130 %dir %{perl_vendorlib}/Dpkg
131 %{perl_vendorlib}/Dpkg/Gettext.pm
132 %{_mandir}/man1/dpkg-deb.1.gz
133 %{_mandir}/man1/dpkg-query.1.gz
134 %{_mandir}/man1/dpkg-split.1.gz
135 %{_mandir}/man1/dpkg-trigger.1.gz
136 %{_mandir}/man1/dpkg.1.gz
137 %{_mandir}/man5/dpkg.cfg.5.gz
138 %{_mandir}/man8/dpkg-divert.8.gz
139 %{_mandir}/man8/dpkg-statoverride.8.gz
140 #fedora has own implemenation
141 %exclude %{_sbindir}/install-info
142 #fedora has own implemenation
143 %exclude %{_mandir}/man8/update-alternatives.8.gz
144
145 %files  devel -f dpkg-dev.lang
146 %defattr(-,root,root,-)
147 %doc doc/README.api
148 %{_bindir}/dpkg-architecture
149 %{_bindir}/dpkg-buildpackage
150 %{_bindir}/dpkg-checkbuilddeps
151 %{_bindir}/dpkg-distaddfile
152 %{_bindir}/dpkg-genchanges
153 %{_bindir}/dpkg-gencontrol
154 %{_bindir}/dpkg-gensymbols
155 %{_bindir}/dpkg-name
156 %{_bindir}/dpkg-parsechangelog
157 %{_bindir}/dpkg-scanpackages
158 %{_bindir}/dpkg-scansources
159 %{_bindir}/dpkg-shlibdeps
160 %{_bindir}/dpkg-source
161 %{_bindir}/dpkg-vendor
162 %dir %{_datadir}/dpkg/parsechangelog
163 %{_datadir}/dpkg/parsechangelog/*
164 %exclude %{perl_vendorlib}/Dpkg/Gettext.pm
165 %{perl_vendorlib}/Dpkg/*.pm
166 %{perl_vendorlib}/Dpkg/Changelog
167 %{perl_vendorlib}/Dpkg/Shlibs
168 %{perl_vendorlib}/Dpkg/Source
169 %{perl_vendorlib}/Dpkg/Vendor
170 %{perl_vendorlib}/Dpkg/Control
171 %{_mandir}/man1/dpkg-architecture.1.gz
172 %{_mandir}/man1/dpkg-buildpackage.1.gz
173 %{_mandir}/man1/dpkg-checkbuilddeps.1.gz
174 %{_mandir}/man1/dpkg-distaddfile.1.gz
175 %{_mandir}/man1/dpkg-genchanges.1.gz
176 %{_mandir}/man1/dpkg-gencontrol.1.gz
177 %{_mandir}/man1/dpkg-gensymbols.1.gz
178 %{_mandir}/man1/dpkg-name.1.gz
179 %{_mandir}/man1/dpkg-parsechangelog.1.gz
180 %{_mandir}/man1/dpkg-scanpackages.1.gz
181 %{_mandir}/man1/dpkg-scansources.1.gz
182 %{_mandir}/man1/dpkg-shlibdeps.1.gz
183 %{_mandir}/man1/dpkg-source.1.gz
184 %{_mandir}/man1/dpkg-vendor.1.gz
185 %{_mandir}/man5/deb-control.5.gz
186 %{_mandir}/man5/deb-old.5.gz
187 %{_mandir}/man5/deb-override.5.gz
188 %{_mandir}/man5/deb-extra-override.5.gz
189 %{_mandir}/man5/deb-shlibs.5.gz
190 %{_mandir}/man5/deb-substvars.5.gz
191 %{_mandir}/man5/deb-symbols.5.gz
192 %{_mandir}/man5/deb-triggers.5.gz
193 %{_mandir}/man5/deb-version.5.gz
194 %{_mandir}/man5/deb.5.gz
195
196
197 %files -n dselect -f dselect.lang
198 %defattr(-,root,root,-)
199 %doc dselect/methods/multicd/README.multicd dselect/methods/ftp/README.mirrors.txt
200 %{_bindir}/dselect
201 %{perl_vendorlib}/Debian
202 %{_datadir}/dpkg/methods
203 %{_mandir}/man*/dselect*.gz
204
205
206
207 %changelog
208 * Wed Jan 12 2011 Andrew Colin Kissa <andrew@topdog.za.net> - 1.15.5.6-6
209 - Fix CVE-2010-1679
210 - Fix CVE-2011-0402
211
212 * Sun Oct 17 2010 Jeroen van Meeuwen <kanarip@kanarip.com> - 1.15.5.6-5
213 - Apply minimal fix for rhbz #642160
214
215 * Thu Mar 11 2010 Andrew Colin Kissa <andrew@topdog.za.net> - 1.15.5.6-4
216 - Fix CVE-2010-0396
217
218 * Mon Feb 15 2010 Andrew Colin Kissa <andrew@topdog.za.net> - 1.15.5.6-3
219 - review changes
220
221 * Sun Feb 14 2010 Andrew Colin Kissa <andrew@topdog.za.net> - 1.15.5.6-2
222 - review changes
223
224 * Sat Feb 13 2010 Andrew Colin Kissa <andrew@topdog.za.net> - 1.15.5.6-1
225 - Upgrade to latest upstream
226 - review changes
227
228 * Tue Nov 10 2009 Andrew Colin Kissa <andrew@topdog.za.net> - 1.15.4.1-1
229 - Upgrade to latest upstream
230 - review changes
231
232 * Tue Dec 30 2008 Leigh Scott <leigh123linux@googlemail.com> - 1.14.23-3
233 - more review changes               
234
235 * Mon Dec 15 2008 Leigh Scott <leigh123linux@googlemail.com> - 1.14.23-1
236 - bump version and make some of the review changes
237
238 * Tue Aug 19 2008 Leigh Scott <leigh123linux@googlemail.com> - 1.14.20-5
239 - made changes for review 
240
241 * Thu Jul 31 2008 Leigh Scott <leigh123linux@googlemail.com> - 1.14.20-4
242 - Change release to -4 as server refused -3
243
244 * Thu Jul 31 2008 Leigh Scott <leigh123linux@googlemail.com> - 1.14.20-3
245 - split the package into dkpg, dpkg-dev & dselect
246
247 * Tue Jul 29 2008 Leigh Scott <leigh123linux@googlemail.com> - 1.14.20-2
248 - recode man files to UTF8
249
250 * Tue Jul 29 2008 Leigh Scott <leigh123linux@googlemail.com> - 1.14.20-1
251 - Rebuild ans add build requires ncurses-devel
252
253 * Thu Jul 19 2007 Patrice Dumas <pertusus@free.fr> - 1.14.5-1
254 - initial packaging