1 %define with_python_subpackage 1
4 %define strip_binaries 1
6 # XXX legacy requires './' payload prefix to be omitted from rpm packages.
7 %define _noPayloadPrefix 1
10 %{expand:%%define __share %(if [ -d %{__prefix}/share/man ]; then echo /share ; else echo %%{nil} ; fi)}
12 Summary: The Red Hat package management system.
17 Group: System Environment/Base
18 Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{version}.tar.gz
20 Conflicts: patch < 2.5
22 Prereq: gawk fileutils textutils mktemp
26 BuildRequires: db3-devel
28 # XXX glibc-2.1.92 has incompatible locale changes that affect statically
29 # XXX linked binaries like /bin/rpm.
31 Requires: glibc >= 2.1.92
32 # XXX needed to avoid libdb.so.2 satisfied by compat/libc5 provides.
36 # XXX Red Hat 5.2 has not bzip2 or python
38 BuildRequires: bzip2 >= 0.9.0c-2
40 %if %{with_python_subpackage}
41 BuildRequires: python-devel >= 1.5.2
44 BuildRoot: %{_tmppath}/%{name}-root
47 The RPM Package Manager (RPM) is a powerful command line driven
48 package management system capable of installing, uninstalling,
49 verifying, querying, and updating software packages. Each software
50 package consists of an archive of files along with information about
51 the package like its version, a description, etc.
54 Summary: Development files for applications which will manipulate RPM packages.
55 Group: Development/Libraries
56 Requires: rpm = %{version}, popt
59 This package contains the RPM C library and header files. These
60 development files will simplify the process of writing programs which
61 manipulate RPM packages and databases. These files are intended to
62 simplify the process of creating graphical package managers or any
63 other tools that need an intimate knowledge of RPM packages in order
66 This package should be installed if you want to develop programs that
67 will manipulate RPM packages and databases.
70 Summary: Scripts and executable programs used to build packages.
71 Group: Development/Tools
72 Requires: rpm = %{version}
75 This package contains scripts and executable programs that are used to
76 build packages using RPM.
78 %if %{with_python_subpackage}
80 Summary: Python bindings for apps which will manipulate RPM packages.
81 Group: Development/Libraries
82 BuildRequires: popt >= 1.5
84 Requires: python >= 1.5.2
87 The rpm-python package contains a module which permits applications
88 written in the Python programming language to use the interface
89 supplied by RPM (RPM Package Manager) libraries.
91 This package should be installed if you want to develop Python
92 programs that will manipulate RPM packages and databases.
96 Summary: A C library for parsing command line parameters.
97 Group: Development/Libraries
101 Popt is a C library for parsing command line parameters. Popt was
102 heavily influenced by the getopt() and getopt_long() functions, but it
103 improves on them by allowing more powerful argument expansion. Popt
104 can parse arbitrary argv[] style arrays and automatically set
105 variables based on command line arguments. Popt allows command line
106 arguments to be aliased via configuration files and includes utility
107 functions for parsing arbitrary strings into argv[] arrays using
110 Install popt if you're a C programmer and you'd like to use its
118 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix} --sysconfdir=/etc --localstatedir=/var --infodir='${prefix}%{__share}/info' --mandir='${prefix}%{__share}/man'
120 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix}
126 rm -rf $RPM_BUILD_ROOT
128 make DESTDIR="$RPM_BUILD_ROOT" install
130 mkdir -p $RPM_BUILD_ROOT/etc/rpm
131 cat << E_O_F > $RPM_BUILD_ROOT/etc/rpm/macros.db1
135 %if %{strip_binaries}
138 strip .%{__prefix}/bin/rpm2cpio
143 gzip -9n apidocs/man/man*/* || :
147 rm -rf $RPM_BUILD_ROOT
150 if [ -f /var/lib/rpm/Packages -a -f /var/lib/rpm/packages.rpm ]; then
153 # /var/lib/rpm/packages.rpm db1 format installed package headers
154 # /var/lib/rpm/Packages db3 format installed package headers
155 #Please remove (or at least rename) one of those files, and re-install.
164 if [ -f /var/lib/rpm/packages.rpm ]; then
166 elif [ -f /var/lib/rpm/Packages ]; then
167 # undo db1 configuration
168 rm -f /etc/rpm/macros.db1
170 # initialize db3 database
171 rm -f /etc/rpm/macros.db1
176 %postun -p /sbin/ldconfig
178 %post devel -p /sbin/ldconfig
179 %postun devel -p /sbin/ldconfig
181 %post -n popt -p /sbin/ldconfig
182 %postun -n popt -p /sbin/ldconfig
185 %if %{with_python_subpackage}
186 %post python -p /sbin/ldconfig
187 %postun python -p /sbin/ldconfig
191 %defattr(-,root,root)
192 %doc RPM-PGP-KEY RPM-GPG-KEY CHANGES GROUPS doc/manual/[a-z]*
195 %config(missingok) /etc/rpm/macros.db1
196 %{__prefix}/bin/rpm2cpio
197 %{__prefix}/bin/gendiff
198 %{__prefix}/bin/rpmdb
199 %{__prefix}/bin/rpm[eiukqv]
200 %{__prefix}/bin/rpmsign
201 %{__prefix}/bin/rpmquery
202 %{__prefix}/bin/rpmverify
203 %{__prefix}/lib/librpm.so.*
204 %{__prefix}/lib/librpmio.so.*
205 %{__prefix}/lib/librpmbuild.so.*
207 %{__prefix}/lib/rpm/config.guess
208 %{__prefix}/lib/rpm/config.sub
209 %{__prefix}/lib/rpm/convertrpmrc.sh
210 %{__prefix}/lib/rpm/macros
211 %{__prefix}/lib/rpm/mkinstalldirs
212 %{__prefix}/lib/rpm/rpmdb
213 %{__prefix}/lib/rpm/rpm[eiukqv]
214 %{__prefix}/lib/rpm/rpmpopt*
215 %{__prefix}/lib/rpm/rpmrc
217 %ifarch i386 i486 i586 i686
218 %{__prefix}/lib/rpm/i[3456]86*
221 %{__prefix}/lib/rpm/alpha*
223 %ifarch sparc sparc64
224 %{__prefix}/lib/rpm/sparc*
227 %{__prefix}/lib/rpm/ia64*
230 %{__prefix}/lib/rpm/ppc*
232 %ifarch armv3l armv4l
233 %{__prefix}/lib/rpm/armv[34][lb]*
236 %{__prefix}/*/locale/*/LC_MESSAGES/rpm.mo
237 %{__prefix}%{__share}/man/man[18]/*.[18]*
238 %lang(pl) %{__prefix}%{__share}/man/pl/man[18]/*.[18]*
239 %lang(ru) %{__prefix}%{__share}/man/ru/man[18]/*.[18]*
240 %lang(sk) %{__prefix}%{__share}/man/sk/man[18]/*.[18]*
243 %defattr(-,root,root)
244 %dir %{__prefix}/src/redhat
245 %dir %{__prefix}/src/redhat/BUILD
246 %dir %{__prefix}/src/redhat/SPECS
247 %dir %{__prefix}/src/redhat/SOURCES
248 %dir %{__prefix}/src/redhat/SRPMS
249 %dir %{__prefix}/src/redhat/RPMS
250 %{__prefix}/src/redhat/RPMS/*
251 %{__prefix}/bin/rpmbuild
252 %{__prefix}/lib/rpm/brp-*
253 %{__prefix}/lib/rpm/check-prereqs
254 %{__prefix}/lib/rpm/cpanflute
255 %{__prefix}/lib/rpm/find-lang.sh
256 %{__prefix}/lib/rpm/find-prov.pl
257 %{__prefix}/lib/rpm/find-provides
258 %{__prefix}/lib/rpm/find-provides.perl
259 %{__prefix}/lib/rpm/find-req.pl
260 %{__prefix}/lib/rpm/find-requires
261 %{__prefix}/lib/rpm/find-requires.perl
262 %{__prefix}/lib/rpm/get_magic.pl
263 %{__prefix}/lib/rpm/getpo.sh
264 %{__prefix}/lib/rpm/http.req
265 %{__prefix}/lib/rpm/javadeps
266 %{__prefix}/lib/rpm/magic.prov
267 %{__prefix}/lib/rpm/magic.req
268 %{__prefix}/lib/rpm/perl.prov
269 %{__prefix}/lib/rpm/perl.req
270 %{__prefix}/lib/rpm/rpm[bt]
271 %{__prefix}/lib/rpm/rpmdiff
272 %{__prefix}/lib/rpm/rpmdiff.cgi
273 %{__prefix}/lib/rpm/u_pkg.sh
274 %{__prefix}/lib/rpm/vpkg-provides.sh
275 %{__prefix}/lib/rpm/vpkg-provides2.sh
277 %if %{with_python_subpackage}
279 %defattr(-,root,root)
280 %{__prefix}/lib/python1.5/site-packages/rpmmodule.so
284 %defattr(-,root,root)
288 %{__prefix}/include/rpm
289 %{__prefix}/lib/librpm.a
290 %{__prefix}/lib/librpm.la
291 %{__prefix}/lib/librpm.so
292 %{__prefix}/lib/librpmio.a
293 %{__prefix}/lib/librpmio.la
294 %{__prefix}/lib/librpmio.so
295 %{__prefix}/lib/librpmbuild.a
296 %{__prefix}/lib/librpmbuild.la
297 %{__prefix}/lib/librpmbuild.so
300 %defattr(-,root,root)
301 %{__prefix}/lib/libpopt.so.*
302 %{__prefix}/*/locale/*/LC_MESSAGES/popt.mo
303 %{__prefix}%{__share}/man/man3/popt.3*
305 # XXX These may end up in popt-devel but it hardly seems worth the effort now.
306 %{__prefix}/lib/libpopt.a
307 %{__prefix}/lib/libpopt.la
308 %{__prefix}/lib/libpopt.so
309 %{__prefix}/include/popt.h
312 * Tue Jan 16 2001 Jeff Johnson <jbj@redhat.com>
313 - tsort prefers presentation order.
315 * Mon Jan 15 2001 Jeff Johnson <jbj@redhat.com>
316 - fix: extra newline in many error messages (#23947).
317 - fix: rpm -Va with db1 needs per-iterator, not per-index, offset.
318 - add install/remove transaction id tags.
320 * Sat Jan 13 2001 Jeff Johnson <jbj@redhat.com>
323 * Fri Jan 12 2001 Jeff Johnson <jbj@redhat.com>
324 - hack: permit installer to determine package ordering using 1000003 tag.
326 * Thu Jan 11 2001 Jeff Johnson <jbj@redhat.com>
327 - fix: don't hang on build error.
328 - fix: remove "error: " prefix from signature verification message.
330 * Wed Jan 10 2001 Jeff Johnson <jbj@redhat.com>
331 - successors from tsort are processed in presentation order.
332 - fix: find-requires.perl needed update (#23450).
334 * Tue Jan 9 2001 Jeff Johnson <jbj@redhat.com>
335 - fix: digests on input FD_t dinna work.
336 - fix: remove rebuilddb debugging leakage.
338 * Mon Jan 8 2001 Jeff Johnson <jbj@redhat.com>
339 - tsorted packages processed in successor count order.
340 - fix: resurrect --excludepath (#19666).
342 * Fri Jan 5 2001 Jeff Johnson <jbj@redhat.com>
343 - fix: 3 packages from Red Hat 5.2 had bogus %verifyscript tag.
345 * Wed Jan 3 2001 Jeff Johnson <jbj@redhat.com>
346 - fix: avoid locale issues with strcasecmp/strncasecmp (#23199).
347 - remove almost all explicit uses of stderr in rpmlib using rpmError().
348 - fix: pass scriptlet args, as in %post -p "/sbin/ldconfig -n /lib".
351 * Tue Jan 2 2001 Jeff Johnson <jbj@redhat.com>
354 * Mon Jan 1 2001 Jeff Johnson <jbj@redhat.com>
355 - use popt autohelp for rpm helper binaries.
357 * Sun Dec 31 2000 Jeff Johnson <jbj@redhat.com>
358 - (popt): fix float/double handling (#19701).
359 - (popt): non-linux needs <float.h> (#22732).
360 - (popt): add POPT_ARGFLAG_OPTIONAL for long options with optional arg.
361 - (popt): diddle auto-help to include type of arg expected.
363 * Sat Dec 30 2000 Jeff Johnson <jbj@redhat.com>
364 - (non-linux): move stubs.c to rpmio (#21132).
365 - (python): bind initdb (#20988).
367 * Fri Dec 29 2000 Jeff Johnson <jbj@redhat.com>
368 - fix: hack around alpha mis-compilation signature problems.
369 - rpmmodule.c(handleDbResult): return empty list when nothing matches.
371 * Thu Dec 28 2000 Jeff Johnson <jbj@redhat.com>
372 - fix: avoid FAT and other brain-dead file systems that have not inodes.
374 * Wed Dec 27 2000 Jeff Johnson <jbj@redhat.com>
375 - use malloc'ed buffer for large queries.
377 * Tue Dec 26 2000 Jeff Johnson <jbj@redhat.com>
378 - send query/verify output through rpmlog().
379 - resurrect rpmErrorSetCallback() and rpmErrorString().
381 * Thu Dec 21 2000 Jeff Johnson <jbj@redhat.com>
382 - immutable headers, once installed by rpm3, need to lose immutablity.
383 - fix: removed headers from db need a headerCopy().
385 * Wed Dec 20 2000 Jeff Johnson <jbj@redhat.com>
386 - whiteout mozilla loop for 7.1.
388 * Tue Dec 19 2000 Jeff Johnson <jbj@redhat.com>
389 - gendiff: generate ChangeLog patches more intelligently (#22356).
390 - identify install scriptlet failures with the name of the scriptlet.
391 - handle install chroot's identically throughout the install process.
392 - add rpmlib(HeaderLoadSortsTags) for tracking header regions "just in case".
393 - create _tmppath on the fly if not present.
394 - remove /etc/rpm/macros.db1 configuration file if db3 rebuilt.
396 * Wed Dec 13 2000 Jeff Johnson <jbj@redhat.com>
398 - fix: (transaction.c) assume file state normal if tag is missing.
399 - fix: failed signature read headerFree segfault.
400 - fix: revert ALPHA_LOSSAGE, breaks 6.2/i386.
401 - fix: segfault on build path, ignore deleted drips.
402 - fix: synthesized callbacks for removed packages have not a pkgkey.
404 * Tue Dec 12 2000 Jeff Johnson <jbj@redhat.com>
405 - bail on header regions.
406 - change dependency loop message to RPMMESS_WARNING to use stderr, not stdout.
408 * Sun Dec 10 2000 Jeff Johnson <jbj@redhat.com>
409 - handle added dirtoken tags (mostly) correctly with header regions.
410 - add FHS doc/man/info dirs, diddle autoconf goo.
411 - fix: headerUnload handles headers w/o regions correctly on rebuilddb.
413 * Thu Dec 7 2000 Jeff Johnson <jbj@redhat.com>
414 - add rpmtransGetKeys() to retrieve transaction keys in tsort'ed order.
415 - python bindings for rpmtransGetKeys().
416 - fix: include alignment in count when swabbing header region.
418 * Wed Dec 6 2000 Jeff Johnson <jbj@redhat.com>
419 - improved find-{requires,provides} for aix4/hpux/irix6/osf.
420 Tim Mooney<mooney@dogbert.cc.ndsu.NoDak.edu>
421 - portability: remove use of GNU make subst in lib/Makefile (Joe Orton).
422 - python: bind package removal (#21274).
423 - autoconfigure building python bindings.
424 - autoconfigure generating rpm API doco rpm-devel package.
425 - fix: don't fdFree in rpmVerifyScript, rpmtransFree does already.
426 - unify rpmError and rpmMessge interfaces through rpmlog.
427 - collect and display rpm build error messages at end of build.
428 - use package version 3 if --nodirtokens is specified.
429 - add package names to problem sets early, don't save removed header.
430 - make sure that replaced tags in region are counted in headerSizeof().
431 - support for dmalloc debugging.
432 - filter region tags in headerNextIterator, exit throut headerReload.
434 * Thu Nov 30 2000 Jeff Johnson <jbj@redhat.com>
435 - add missing headerFree for legacy signature header.
436 - fix: removed packages leaked DIRINDEXES tag data.
437 - reload tags added during install when loading header from rpmdb.
438 - avoid brp-compress hang with both compressed/uncompressed man pages.
440 * Tue Nov 21 2000 Jeff Johnson <jbj@redhat.com>
441 - add brp-strip-shared script <rodrigob@conectiva.com.br>.
442 - better item/task progress bars <rodrigob@conectiva.com.br>.
443 - load headers as single contiguous region.
444 - add region marker as RPM_BIN_TYPE in packages and database.
445 - fix: don't headerCopy() relocateable packages if not relocating.
446 - merge signatures into header after reading from package.
448 * Mon Nov 20 2000 Jeff Johnson <jbj@redhat.com>
449 - add doxygen and lclint annotations most everywhere.
450 - consistent return for all signature verification.
451 - use enums for almost all rpmlib #define's.
452 - API: change rpmProblem typedef to pass by reference, not value.
453 - don't trim leading ./ in rpmCleanPath() (#14961).
454 - detect (still need to test) rdonly linux file systems.
455 - check available inodes as well as blocks on mounted file systems.
456 - pass rpmTransactionSet, not elements, to installBinaryPackage et al.
457 - add cscope/ctags (Rodrigo Barbosa<rodrigob@conectiva.com.br>).
458 - remove getMacroBody() from rpmio API.
459 - add support for unzip <rodrigob@conectiva.com.br>
461 * Thu Nov 16 2000 Jeff Johnson <jbj@redhat.com>
462 - don't verify src rpm MD5 sums (yet).
463 - md5 sums are little endian (no swap) so big endian needs the swap.
465 * Wed Nov 15 2000 Jeff Johnson <jbj@redhat.com>
466 - fix: segfault on exit of "rpm -qp --qf '%{#fsnames}' pkg" (#20595).
467 - hpux w/o -D_OPEN_SOURCE has not h_errno.
468 - verify MD5 sums of payload files when unpacking archive.
469 - hide libio lossage in prototype, not API.
470 - add support for SHA1 as well as MD5 message digests.
472 * Mon Nov 13 2000 Jeff Johnson <jbj@redhat.com>
473 - fix: work around for (mis-compilation?!) segfaults on signature paths.
475 * Sun Nov 12 2000 Jeff Johnson <jbj@redhat.com>
476 - fix: duplicate headerFree() on instalBinaryPackage() error return.
478 * Sat Nov 11 2000 Jeff Johnson <jbj@redhat.com>
479 - fix: runTriggers was not adding countCorrection.
480 - add rpmGetRpmlibProvides() to retrieve rpmlib(...) provides
481 "Pawel A. Gajda" <mis@k2.net.pl>.
482 - syntax to specify source of Requires: (PreReq: now legacy).
483 - rip out rpm{get,put}text, use getpo.sh and specspo instead.
484 - fine-grained Requires, remove install PreReq's from Requires db.
486 * Wed Oct 11 2000 Jeff Johnson <jbj@redhat.com>
487 - fix: rpm2cpio error check wrong on non-libio platforms.
489 * Fri Sep 29 2000 Jeff Johnson <jbj@redhat.com>
490 - fix: more (possible) xstrdup side effects.
492 * Wed Sep 27 2000 Jeff Johnson <jbj@redhat.com>
493 - bump popt version to 1.6.1.
495 * Tue Sep 26 2000 Jeff Johnson <jbj@redhat.com>
496 - fix: avoid calling getpass twice as side effect of xstrdup macro (#17672).
497 - order packages using tsort, clipping PreReq:'s in dependency loops.
498 - handle possible db3 dependency on -lpthread more gracefully.
500 * Thu Sep 14 2000 Jeff Johnson <jbj@redhat.com>