/[packages]/cauldron/dpkg/current/SPECS/dpkg.spec
ViewVC logotype

Contents of /cauldron/dpkg/current/SPECS/dpkg.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1834226 - (show annotations) (download)
Wed Mar 30 03:56:00 2022 UTC (8 weeks, 1 day ago) by umeabot
File size: 15642 byte(s)
Mageia 9 Mass Rebuild
1 %global pkgconfdir %{_sysconfdir}/dpkg
2 %global pkgdatadir %{_datadir}/dpkg
3
4 Name: dpkg
5 Version: 1.20.9
6 Release: %mkrel 2
7 Summary: Package maintenance system for Debian Linux
8 # The entire source code is GPLv2+ with exception of the following
9 # lib/dpkg/md5.c, lib/dpkg/md5.h - Public domain
10 # lib/dpkg/showpkg.c, dselect/methods/multicd, lib/dpkg/utils.c, lib/dpkg/showpkg.c - GPLv2
11 # dselect/methods/ftp - GPL no version info
12 # scripts/Dpkg/Gettext.pm - BSD
13 # lib/compat/obstack.h, lib/compat/gettext.h,lib/compat/obstack.c - LGPLv2+
14 License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD
15 URL: https://tracker.debian.org/pkg/dpkg
16 Source0: https://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz
17 Group: System/Packaging
18 # Please do not remove this script as it is useful to make signed debian pckages on Mageia
19 # without having to import the full devscripts debian package which is outside from it useless
20 Source1: debsign.sh
21 Source3: debsign.1.xz
22
23 BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel
24 BuildRequires: autoconf automake gettext-devel libtool
25 BuildRequires: doxygen flex xz-devel
26 BuildRequires: po4a >= 0.43
27 BuildRequires: dotconf-devel
28 BuildRequires: perl-devel
29 BuildRequires: perl-Time-Piece
30 BuildRequires: perl(Digest)
31 # for /usr/bin/pod2man
32 BuildRequires: perl-podlators
33 # Needed for --clamp-mtime in dpkg-source -b.
34 Requires: tar >= 1.28
35 # Need by make check
36 BuildRequires: perl(Test::More)
37 BuildRequires: perl(IPC::Cmd)
38 BuildRequires: perl(Digest::MD5)
39 BuildRequires: perl(Digest::SHA)
40 BuildRequires: perl(IO::String)
41 BuildRequires: fakeroot
42
43 Requires(post): coreutils
44
45
46 %description
47 This package provides the low-level infrastructure for handling the
48 installation and removal of Debian software packages.
49
50 This package contains the tools (including dpkg-source) required
51 to unpack, build and upload Debian source packages.
52
53 This package also contains the programs dpkg which used to handle the
54 installation and removal of packages on a Debian system.
55
56 This package also contains dselect, an interface for managing the
57 installation and removal of packages on the system.
58
59 dpkg and dselect will certainly be non-functional on a rpm-based system
60 because packages dependencies will likely be unmet.
61
62
63 %package devel
64 Summary: Debian package management static library
65 Provides: dpkg-static = %{version}-%{release}
66
67 %description devel
68 This package provides the header files and static library necessary to
69 develop software using dpkg, the same library used internally by dpkg.
70
71 Note though, that the API is to be considered volatile, and might change
72 at any time, use at your own risk.
73
74
75 %package dev
76 Summary: Debian package development tools
77 Requires: dpkg-perl = %{version}-%{release}
78 Requires: patch
79 Requires: make
80 Requires: binutils
81 Requires: bzip2
82 Requires: lzma
83 Requires: xz
84 Requires: perl(MIME::Lite)
85 Obsoletes: dpkg-devel < 1.16
86 BuildArch: noarch
87
88 %description dev
89 This package provides the development tools (including dpkg-source)
90 required to unpack, build and upload Debian source packages.
91 .
92 Most Debian source packages will require additional tools to build;
93 for example, most packages need make and the C compiler gcc.
94
95 %package -n perl-Dpkg
96 Summary: Dpkg perl modules
97 Requires: dpkg = %{version}-%{release}
98 Requires: perl-TimeDate
99 Requires: perl-Time-Piece
100 Requires: perl(Digest::MD5)
101 Requires: perl(Digest::SHA)
102 Requires: perl(Digest::SHA1)
103 BuildArch: noarch
104 Provides: dpkg-perl = %{version}-%{release}
105 Obsoletes: dpkg-perl <= 1.19.7-4.mga8
106
107 # ease upgrade mga7->mga8
108 Conflicts: dpkg < 1.19.7-1
109
110 %description -n perl-Dpkg
111 This package provides the perl modules used by the scripts
112 in dpkg-dev. They cover a wide range of functionality. Among them
113 there are the following public modules:
114 .
115 - Dpkg: core variables
116 - Dpkg::Arch: architecture handling functions
117 - Dpkg::Build::Info: build information functions
118 - Dpkg::BuildFlags: set, modify and query compilation build flags
119 - Dpkg::BuildOptions: parse and manipulate DEB_BUILD_OPTIONS
120 - Dpkg::BuildProfile: parse and manipulate build profiles
121 - Dpkg::Changelog: parse changelogs
122 - Dpkg::Changelog::Entry: represents a changelog entry
123 - Dpkg::Changelog::Parse: generic changelog parser for dpkg-parsechangelog
124 - Dpkg::Checksums: generate and parse checksums
125 - Dpkg::Compression: simple database of available compression methods
126 - Dpkg::Compression::Process: wrapper around compression tools
127 - Dpkg::Compression::FileHandle: transparently (de)compress files
128 - Dpkg::Conf: parse dpkg configuration files
129 - Dpkg::Control: parse and manipulate Debian control information
130 (.dsc, .changes, Packages/Sources entries, etc.)
131 - Dpkg::Control::Changelog: represent fields output by dpkg-parsechangelog
132 - Dpkg::Control::Fields: manage (list of known) control fields
133 - Dpkg::Control::Hash: parse and manipulate a block of RFC822-like fields
134 - Dpkg::Control::Info: parse files like debian/control
135 - Dpkg::Control::Tests: parse files like debian/tests/control
136 - Dpkg::Deps: parse and manipulate dependencies
137 - Dpkg::Exit: push, pop and run exit handlers
138 - Dpkg::Gettext: wrapper around Locale::gettext
139 - Dpkg::IPC: spawn sub-processes and feed/retrieve data
140 - Dpkg::Index: collections of Dpkg::Control (Packages/Sources files for
141 example)
142 - Dpkg::Interface::Storable: base object serializer
143 - Dpkg::Path: common path handling functions
144 - Dpkg::Source::Package: extract Debian source packages
145 - Dpkg::Substvars: substitute variables in strings
146 - Dpkg::Vendor: identify current distribution vendor
147 - Dpkg::Version: parse and manipulate Debian package versions
148 .
149 All the packages listed in Suggests or Recommends are used by some of the
150 modules.
151
152 %package -n dselect
153 Summary: Debian package management front-end
154 Requires: %{name} = %{version}-%{release}
155
156
157 %description -n dselect
158 dselect is a high-level interface for managing the installation and
159 removal of Debian software packages.
160 Many users find dselect intimidating and new users may prefer to use apt-based
161 user interfaces.
162
163 %prep
164 %setup -q
165
166 # Filter unwanted Requires:
167 cat << \EOF > %{name}-req
168 #!/bin/sh
169 %{__perl_requires} $* |\
170 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'
171 EOF
172
173 %define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req
174 chmod +x %{__perl_requires}
175
176 %build
177 autoreconf
178 export TAR=%{__tar}
179 %configure --disable-linker-optimisations \
180 --with-admindir=%{_localstatedir}/lib/dpkg \
181 --with-libselinux \
182 --without-libmd \
183 --with-libz \
184 --with-liblzma \
185 --with-libbz2
186
187 # todo add this
188 #--with-devlibdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
189 %make_build
190
191
192 %install
193 %make_install
194
195 # Please do not remove debsign delivery
196 install -m 755 %{SOURCE1} %{buildroot}/%{_bindir}/debsign
197 install -m 644 %{SOURCE3} %{buildroot}/%{_mandir}/man1
198
199 mkdir -p %{buildroot}/%{pkgconfdir}/origins
200
201 # Prepare "vendor" files for dpkg-vendor
202 cat <<EOF > %{buildroot}/%{pkgconfdir}/origins/mageia
203 Vendor: Mageia.org
204 Vendor-URL: https://www.mageia.org/
205 Bugs: https://bugs.mageia.org
206 EOF
207 ln -sf mageia %{buildroot}/%{pkgconfdir}/origins/default
208
209 # from debian/dpkg.install
210 install -pm0644 debian/dpkg.cfg %{buildroot}/%{pkgconfdir}
211 install -pm0644 debian/dselect.cfg %{buildroot}/%{pkgconfdir}
212 install -pm0644 debian/shlibs.default %{buildroot}/%{pkgconfdir}
213 install -pm0644 debian/shlibs.override %{buildroot}/%{pkgconfdir}
214
215 # patched debian/dpkg.logrotate
216 mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d
217 install -pm0644 debian/dpkg.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}
218
219 %find_lang dpkg
220 %find_lang dpkg-dev
221 %find_lang dselect
222
223 rm %{buildroot}%{_libdir}/libdpkg.la
224
225 # Mageia has its own implementation
226 rm %{buildroot}%{_bindir}/update-alternatives
227 rm %{buildroot}%{_mandir}/man1/update-alternatives.1
228 rm -r %{buildroot}%{_mandir}/*/man1/update-alternatives.1
229 rm -r %{buildroot}%{_sysconfdir}/alternatives/
230
231 #Mageia has own implemenation
232 #FIXME should we remove this ?
233 rm -rf %{buildroot}%{_sbindir}/install-info
234
235 #mkdir -p %{buildroot}%{_localstatedir}/lib/dpkg/alternatives %{buildroot}%{_localstatedir}/lib/dpkg/info \
236 # %{buildroot}%{_localstatedir}/lib/dpkg/parts %{buildroot}%{_localstatedir}/lib/dpkg/updates \
237 # %{buildroot}%{_localstatedir}/lib/dpkg/methods
238
239 # https://www.spinics.net/linux/fedora/epel-devel/msg02029.html
240 # avoid conflicts files with man-pages
241 rm -rf %{buildroot}%{_mandir}/it/man1/
242 rm -rf %{buildroot}%{_mandir}/it/man5/
243 rm -rf %{buildroot}%{_mandir}/pl/man1/
244
245 # remove useless (?) aclocal files
246 rm -rf %{buildroot}%{_datadir}/aclocal
247 # remove useless doc files
248 rm -rf %{buildroot}%{_datadir}/doc/dpkg
249
250 %check
251 make VERBOSE=1 TESTSUITEFLAGS=--verbose \
252 TEST_PARALLEL=4 check || :
253
254
255 %post
256 # from dpkg.postinst
257 # Create the database files if they don't already exist
258 create_database() {
259 admindir=${DPKG_ADMINDIR:-/var/lib/dpkg}
260
261 for file in diversions statoverride status; do
262 if [ ! -f "$admindir/$file" ]; then
263 touch "$admindir/$file"
264 fi
265 done
266 }
267
268 # Create log file and set default permissions if possible
269 create_logfile() {
270 logfile=/var/log/dpkg.log
271 touch $logfile
272 chmod 644 $logfile
273 chown root:root $logfile 2>/dev/null || chown 0:0 $logfile
274 }
275 create_database
276 create_logfile
277
278
279 %files -f dpkg.lang
280 %doc debian/changelog README AUTHORS THANKS TODO
281 %doc debian/dpkg.cron.daily
282 %license debian/copyright
283 %dir %{pkgconfdir}
284 %dir %{pkgconfdir}/dpkg.cfg.d
285 %dir %{pkgconfdir}/origins
286 %config(noreplace) %{pkgconfdir}/dpkg.cfg
287 %config(noreplace) %{pkgconfdir}/origins/*
288 %config(noreplace) %{_sysconfdir}/logrotate.d/dpkg
289 %{_bindir}/dpkg
290 %{_bindir}/debsign
291 %{_bindir}/dpkg-deb
292 %{_bindir}/dpkg-maintscript-helper
293 %{_bindir}/dpkg-query
294 %{_bindir}/dpkg-split
295 %{_bindir}/dpkg-trigger
296 %{_bindir}/dpkg-divert
297 %{_bindir}/dpkg-statoverride
298 %{_bindir}/dpkg-realpath
299 %{_sbindir}/start-stop-daemon
300 %{_sbindir}/dpkg-fsys-usrunmess
301 %dir %{pkgdatadir}
302 %{pkgdatadir}/abitable
303 %{pkgdatadir}/cputable
304 %{pkgdatadir}/ostable
305 %{pkgdatadir}/tupletable
306 %dir %{_localstatedir}/lib/dpkg
307 %dir %{_localstatedir}/lib/dpkg/alternatives
308 %dir %{_localstatedir}/lib/dpkg/info
309 %dir %{_localstatedir}/lib/dpkg/parts
310 %dir %{_localstatedir}/lib/dpkg/updates
311 %{_mandir}/man1/dpkg.1.*
312 %{_mandir}/man1/debsign.1.*
313 %{_mandir}/man1/dpkg-deb.1.*
314 %{_mandir}/man1/dpkg-maintscript-helper.1.*
315 %{_mandir}/man1/dpkg-query.1.*
316 %{_mandir}/man1/dpkg-split.1.*
317 %{_mandir}/man1/dpkg-trigger.1.*
318 %{_mandir}/man5/dpkg.cfg.5.*
319 %{_mandir}/man1/dpkg-divert.1.*
320 %{_mandir}/man1/dpkg-statoverride.1.*
321 %{_mandir}/man1/dpkg-realpath.1.*
322 %{_mandir}/man8/start-stop-daemon.8.*
323 %{_mandir}/man8/dpkg-fsys-usrunmess.8.xz
324 %{_mandir}/man5/deb-src-rules.5.*
325 %{_mandir}/man5/deb-src-symbols.5.*
326 %{_mandir}/man7/deb-version.7.*
327 %{_mandir}/*/man1/dpkg.1.*
328 %{_mandir}/*/man1/dpkg-deb.1.*
329 %{_mandir}/*/man1/dpkg-maintscript-helper.1.*
330 %{_mandir}/*/man1/dpkg-query.1.*
331 %{_mandir}/*/man1/dpkg-split.1.*
332 %{_mandir}/*/man1/dpkg-trigger.1.*
333 %{_mandir}/*/man1/dpkg-realpath.1.*
334 %{_mandir}/*/man5/dpkg.cfg.5.*
335 %{_mandir}/*/man5/deb-src-symbols.5.*
336 %{_mandir}/*/man1/dpkg-divert.1.*
337 %{_mandir}/*/man1/dpkg-statoverride.1.*
338 %{_mandir}/*/man8/start-stop-daemon.8.*
339 %{_mandir}/*/man5/deb-src-rules.5.*
340 %{_mandir}/*/man7/deb-version.7.*
341 %{_mandir}/*/man8/dpkg-fsys-usrunmess.8.xz
342 %{_datadir}/polkit-1/actions/org.dpkg.pkexec.update-alternatives.policy
343 %{_datadir}/dpkg/sh/dpkg-error.sh
344
345 %files devel
346 %{_libdir}/libdpkg.a
347 %{_libdir}/pkgconfig/libdpkg.pc
348 %{_includedir}/dpkg/*.h
349
350 %files dev -f dpkg-dev.lang
351 %doc AUTHORS THANKS doc/README.api doc/frontend.txt doc/triggers.txt
352 %config(noreplace) %{pkgconfdir}/shlibs.default
353 %config(noreplace) %{pkgconfdir}/shlibs.override
354
355 %{_bindir}/dpkg-architecture
356 %{_bindir}/dpkg-buildpackage
357 %{_bindir}/dpkg-buildflags
358 %{_bindir}/dpkg-checkbuilddeps
359 %{_bindir}/dpkg-distaddfile
360 %{_bindir}/dpkg-genbuildinfo
361 %{_bindir}/dpkg-genchanges
362 %{_bindir}/dpkg-gencontrol
363 %{_bindir}/dpkg-gensymbols
364 %{_bindir}/dpkg-mergechangelogs
365 %{_bindir}/dpkg-name
366 %{_bindir}/dpkg-parsechangelog
367 %{_bindir}/dpkg-scanpackages
368 %{_bindir}/dpkg-scansources
369 %{_bindir}/dpkg-shlibdeps
370 %{_bindir}/dpkg-source
371 %{_bindir}/dpkg-vendor
372 %{pkgdatadir}/*.mk
373 %{_mandir}/man1/dpkg-architecture.1.*
374 %{_mandir}/man1/dpkg-buildflags.1.*
375 %{_mandir}/man1/dpkg-buildpackage.1.*
376 %{_mandir}/man1/dpkg-checkbuilddeps.1.*
377 %{_mandir}/man1/dpkg-distaddfile.1.*
378 %{_mandir}/man1/dpkg-genbuildinfo.1.*
379 %{_mandir}/man1/dpkg-genchanges.1.*
380 %{_mandir}/man1/dpkg-gencontrol.1.*
381 %{_mandir}/man1/dpkg-gensymbols.1.*
382 %{_mandir}/man1/dpkg-mergechangelogs.1.*
383 %{_mandir}/man1/dpkg-name.1.*
384 %{_mandir}/man1/dpkg-parsechangelog.1.*
385 %{_mandir}/man1/dpkg-scanpackages.1.*
386 %{_mandir}/man1/dpkg-scansources.1.*
387 %{_mandir}/man1/dpkg-shlibdeps.1.*
388 %{_mandir}/man1/dpkg-source.1.*
389 %{_mandir}/man1/dpkg-vendor.1.*
390 %{_mandir}/man5/deb-buildinfo.5.*
391 %{_mandir}/man5/deb-changelog.5.*
392 %{_mandir}/man5/deb-changes.5.*
393 %{_mandir}/man5/deb-control.5.*
394 %{_mandir}/man5/deb-conffiles.5.*
395 %{_mandir}/man5/deb-src-files.5.*
396 %{_mandir}/man5/deb-extra-override.5.*
397 %{_mandir}/man5/deb-old.5.*
398 %{_mandir}/man5/deb-origin.5.*
399 %{_mandir}/man5/deb-override.5.*
400 %{_mandir}/man5/deb-shlibs.5.*
401 %{_mandir}/man5/deb-split.5.*
402 %{_mandir}/man5/deb-src-control.5.*
403 %{_mandir}/man5/deb-substvars.5.*
404 %{_mandir}/man5/deb-symbols.5.*
405 %{_mandir}/man5/deb-postinst.5.*
406 %{_mandir}/man5/deb-postrm.5.*
407 %{_mandir}/man5/deb-preinst.5.*
408 %{_mandir}/man5/deb-prerm.5.*
409 %{_mandir}/man5/deb-triggers.5.*
410 #{_mandir}/man5/deb-version.5.*
411 %{_mandir}/man5/deb.5.*
412 %{_mandir}/man5/deb822.5.*
413 %{_mandir}/man5/dsc.5.*
414 %{_mandir}/*/man1/dpkg-architecture.1.*
415 %{_mandir}/*/man1/dpkg-buildpackage.1.*
416 %{_mandir}/*/man1/dpkg-buildflags.1.*
417 %{_mandir}/*/man1/dpkg-checkbuilddeps.1.*
418 %{_mandir}/*/man1/dpkg-distaddfile.1.*
419 %{_mandir}/*/man1/dpkg-genbuildinfo.1.*
420 %{_mandir}/*/man1/dpkg-genchanges.1.*
421 %{_mandir}/*/man1/dpkg-gencontrol.1.*
422 %{_mandir}/*/man1/dpkg-gensymbols.1.*
423 %{_mandir}/*/man1/dpkg-mergechangelogs.1.*
424 %{_mandir}/*/man1/dpkg-name.1.*
425 %{_mandir}/*/man1/dpkg-parsechangelog.1.*
426 %{_mandir}/*/man1/dpkg-scanpackages.1.*
427 %{_mandir}/*/man1/dpkg-scansources.1.*
428 %{_mandir}/*/man1/dpkg-shlibdeps.1.*
429 %{_mandir}/*/man1/dpkg-source.1.*
430 %{_mandir}/*/man1/dpkg-vendor.1.*
431 %{_mandir}/*/man5/deb-buildinfo.5.*
432 %{_mandir}/*/man5/deb-changelog.5.*
433 %{_mandir}/*/man5/deb-changes.5.*
434 %{_mandir}/*/man5/deb-control.5.*
435 %{_mandir}/*/man5/deb-conffiles.5.*
436 %{_mandir}/*/man5/deb-src-files.5.*
437 %{_mandir}/*/man5/deb-extra-override.5.*
438 %{_mandir}/*/man5/deb-old.5.*
439 %{_mandir}/*/man5/deb-origin.5.*
440 %{_mandir}/*/man5/deb-override.5.*
441 %{_mandir}/*/man5/deb-shlibs.5.*
442 %{_mandir}/*/man5/deb-split.5.*
443 %{_mandir}/*/man5/deb-src-control.5.*
444 %{_mandir}/*/man5/deb-substvars.5.*
445 %{_mandir}/*/man5/deb-symbols.5.*
446 %{_mandir}/*/man5/deb-postinst.5.*
447 %{_mandir}/*/man5/deb-postrm.5.*
448 %{_mandir}/*/man5/deb-preinst.5.*
449 %{_mandir}/*/man5/deb-prerm.5.*
450 %{_mandir}/*/man5/deb-triggers.5.*
451 #{_mandir}/*/man5/deb-version.5.*
452 %{_mandir}/*/man5/deb.5.*
453 %{_mandir}/*/man5/deb822.5.*
454 %{_mandir}/*/man5/dsc.5.*
455
456
457 %files -n perl-Dpkg
458 %{perl_vendorlib}/Dpkg*
459 %{_mandir}/man3/Dpkg*.3*
460 %{_datadir}/dpkg/*.specs
461
462 %files -n dselect -f dselect.lang
463 #doc dselect/methods/multicd/README.multicd
464 %config(noreplace) %{pkgconfdir}/dselect.cfg
465 %{_bindir}/dselect
466 %{perl_vendorlib}/Dselect
467 %{_localstatedir}/lib/dpkg/methods
468 %{_libexecdir}/dpkg/methods
469 %{_mandir}/man1/dselect.1.*
470 %{_mandir}/*/man1/dselect.1.*
471 %{_mandir}/man5/dselect.cfg.5.*
472 %{_mandir}/*/man5/dselect.cfg.5.*
473 %dir %{pkgconfdir}/dselect.cfg.d

  ViewVC Help
Powered by ViewVC 1.1.28