1 %define with_python_subpackage 1 %{nil}
2 %define with_perl_subpackage 1
3 %define with_bzip2 1 %{nil}
4 %define with_apidocs 1 %{nil}
5 %define with_internal_db 1 %{nil}
6 %define strip_binaries 1
8 # XXX enable at your own risk, CDB access to rpmdb isn't cooked yet.
9 %define enable_cdb create cdb
11 # XXX legacy requires './' payload prefix to be omitted from rpm packages.
12 %define _noPayloadPrefix 1
15 %{expand: %%define __share %(if [ -d %{__prefix}/share/man ]; then echo /share ; else echo %%{nil} ; fi)}
17 Summary: The Red Hat package management system.
21 %{expand: %%define rpm_version %{version}}
23 Group: System Environment/Base
24 Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
26 Conflicts: patch < 2.5
28 Prereq: gawk fileutils textutils mktemp shadow-utils
32 %if !%{with_internal_db}
33 BuildRequires: db3-devel
35 # XXX glibc-2.1.92 has incompatible locale changes that affect statically
36 # XXX linked binaries like /bin/rpm.
38 Requires: glibc >= 2.1.92
42 BuildRequires: zlib-devel
43 # XXX Red Hat 5.2 has not bzip2 or python
45 BuildRequires: bzip2 >= 0.9.0c-2
47 %if %{with_python_subpackage}
48 BuildRequires: python-devel >= 1.5.2
50 %if %{with_perl_subpackage}
51 BuildRequires: perl >= 0:5.00503
54 BuildRoot: %{_tmppath}/%{name}-root
57 The RPM Package Manager (RPM) is a powerful command line driven
58 package management system capable of installing, uninstalling,
59 verifying, querying, and updating software packages. Each software
60 package consists of an archive of files along with information about
61 the package like its version, a description, etc.
64 Summary: Development files for applications which will manipulate RPM packages.
65 Group: Development/Libraries
66 Requires: rpm = %{rpm_version}, popt = 1.7
69 This package contains the RPM C library and header files. These
70 development files will simplify the process of writing programs which
71 manipulate RPM packages and databases. These files are intended to
72 simplify the process of creating graphical package managers or any
73 other tools that need an intimate knowledge of RPM packages in order
76 This package should be installed if you want to develop programs that
77 will manipulate RPM packages and databases.
80 Summary: Scripts and executable programs used to build packages.
81 Group: Development/Tools
82 Requires: rpm = %{rpm_version}
85 This package contains scripts and executable programs that are used to
86 build packages using RPM.
88 %if %{with_python_subpackage}
90 Summary: Python bindings for apps which will manipulate RPM packages.
91 Group: Development/Libraries
92 Requires: rpm = %{rpm_version}
93 Requires: python >= 1.5.2
97 The rpm-python package contains a module which permits applications
98 written in the Python programming language to use the interface
99 supplied by RPM (RPM Package Manager) libraries.
101 This package should be installed if you want to develop Python
102 programs that will manipulate RPM packages and databases.
105 %if %{with_perl_subpackage}
107 Summary: Native bindings to the RPM API for Perl.
108 Group: Development/Languages
109 URL: http://www.cpan.org
110 Provides: perl(RPM::Database) = %{rpm_version}
111 Provides: perl(RPM::Header) = %{rpm_version}
112 Requires: rpm = %{rpm_version}
113 Requires: perl >= 0:5.00503
115 Obsoletes: perl-Perl-RPM
118 The Perl-RPM module is an attempt to provide Perl-level access to the
119 complete application programming interface that is a part of the Red
120 Hat Package Manager (RPM). Rather than have scripts rely on executing
121 RPM commands and parse the resulting output, this module aims to give
122 Perl programmers the ability to do anything that would otherwise have
123 been done in C or C++.
125 The interface is being designed and laid out as a collection of
126 classes, at least some of which are also available as tied-hash
129 At this time, the interface only provides access to the database of
130 installed packages, and header data retrieval for RPM and SRPM files
131 is not yet installed. Error management and the export of most defined
132 constants, through RPM::Error and RPM::Constants, respectively, are
138 Summary: A C library for parsing command line parameters.
139 Group: Development/Libraries
143 Popt is a C library for parsing command line parameters. Popt was
144 heavily influenced by the getopt() and getopt_long() functions, but it
145 improves on them by allowing more powerful argument expansion. Popt
146 can parse arbitrary argv[] style arrays and automatically set
147 variables based on command line arguments. Popt allows command line
148 arguments to be aliased via configuration files and includes utility
149 functions for parsing arbitrary strings into argv[] arrays using
152 Install popt if you're a C programmer and you'd like to use its
161 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix} --sysconfdir=/etc --localstatedir=/var --infodir='${prefix}%{__share}/info' --mandir='${prefix}%{__share}/man'
163 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix}
166 # XXX workaround alpha sha1 digest miscompilation
167 %ifarch alpha alphaev5 alphaev56 alphapca56 alphaev6 alphaev67
168 make CFLAGS="-g -O0" digest.o digest.lo -C rpmio
173 %if %{with_perl_subpackage}
175 CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL
176 export SUBDIR="%{_builddir}/%{buildsubdir}"
177 make INC="-I. -I$SUBDIR/lib -I$SUBDIR/rpmio -I$SUBDIR/popt" %{?_smp_mflags}
182 rm -rf $RPM_BUILD_ROOT
184 make DESTDIR="$RPM_BUILD_ROOT" install
188 # Save list of packages through cron
189 mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily
190 install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}/etc/cron.daily/rpm
192 mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
193 install -m 755 scripts/rpm.log ${RPM_BUILD_ROOT}/etc/logrotate.d/rpm
195 mkdir -p $RPM_BUILD_ROOT/etc/rpm
196 cat << E_O_F > $RPM_BUILD_ROOT/etc/rpm/macros.db1
199 cat << E_O_F > $RPM_BUILD_ROOT/etc/rpm/macros.cdb
200 %{?enable_cdb:#%%__dbi_cdb %{enable_cdb}}
203 mkdir -p $RPM_BUILD_ROOT/var/lib/rpm
205 Basenames Conflictname Dirnames Group Installtid Name Providename \
206 Provideversion Removetid Requirename Requireversion Triggername \
207 Packages __db.001 __db.002 __db.003 __db.004 __db.005 __db.006 __db.007 \
210 touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi
216 gzip -9n apidocs/man/man*/* || :
219 %if %{with_perl_subpackage}
221 eval `perl '-V:installsitearch'`
222 eval `perl '-V:installarchlib'`
223 mkdir -p $RPM_BUILD_ROOT/$installarchlib
224 make PREFIX=$RPM_BUILD_ROOT/usr install
225 rm -f $RPM_BUILD_ROOT/$installarchlib/perllocal.pod
226 rm -f $RPM_BUILD_ROOT/$installsitearch/auto/RPM/.packlist
231 %if %{strip_binaries}
234 %{__strip} .%{__prefix}/bin/rpm2cpio
239 rm -rf $RPM_BUILD_ROOT
243 if [ -f /var/lib/rpm/Packages -a -f /var/lib/rpm/packages.rpm ]; then
246 /var/lib/rpm/packages.rpm db1 format installed package headers
247 /var/lib/rpm/Packages db3 format installed package headers
248 Please remove (or at least rename) one of those files, and re-install.
252 /usr/sbin/groupadd -g 37 rpm > /dev/null 2>&1
253 /usr/sbin/useradd -r -d /var/lib/rpm -u 37 -g 37 rpm > /dev/null 2>&1
260 if [ -f /var/lib/rpm/packages.rpm ]; then
261 /bin/chown rpm.rpm /var/lib/rpm/*.rpm
262 elif [ -f /var/lib/rpm/Packages ]; then
263 # undo db1 configuration
264 rm -f /etc/rpm/macros.db1
265 /bin/chown rpm.rpm /var/lib/rpm/[A-Z]*
267 # initialize db3 database
268 rm -f /etc/rpm/macros.db1
278 /usr/sbin/userdel rpm
279 /usr/sbin/groupdel rpm
283 %post devel -p /sbin/ldconfig
284 %postun devel -p /sbin/ldconfig
286 %post -n popt -p /sbin/ldconfig
287 %postun -n popt -p /sbin/ldconfig
290 %if %{with_python_subpackage}
291 %post python -p /sbin/ldconfig
292 %postun python -p /sbin/ldconfig
295 %define rpmattr %attr(0755, rpm, rpm)
298 %defattr(-,root,root)
299 %doc RPM-PGP-KEY RPM-GPG-KEY CHANGES GROUPS doc/manual/[a-z]*
300 %attr(0755, rpm, rpm) /bin/rpm
303 %config(noreplace,missingok) /etc/cron.daily/rpm
304 %config(noreplace,missingok) /etc/logrotate.d/rpm
306 %config(noreplace,missingok) /etc/rpm/macros.*
307 %attr(0755, rpm, rpm) %dir /var/lib/rpm
309 %define rpmdbattr %attr(0644, rpm, rpm) %verify(not md5 size mtime) %ghost %config(missingok,noreplace)
310 %rpmdbattr /var/lib/rpm/Basenames
311 %rpmdbattr /var/lib/rpm/Conflictname
312 %rpmdbattr /var/lib/rpm/__db.0*
313 %rpmdbattr /var/lib/rpm/Dirnames
314 %rpmdbattr /var/lib/rpm/Group
315 %rpmdbattr /var/lib/rpm/Installtid
316 %rpmdbattr /var/lib/rpm/Name
317 %rpmdbattr /var/lib/rpm/Packages
318 %rpmdbattr /var/lib/rpm/Providename
319 %rpmdbattr /var/lib/rpm/Provideversion
320 %rpmdbattr /var/lib/rpm/Removetid
321 %rpmdbattr /var/lib/rpm/Requirename
322 %rpmdbattr /var/lib/rpm/Requireversion
323 %rpmdbattr /var/lib/rpm/Triggername
327 %rpmattr %{__prefix}/bin/rpm2cpio
328 %rpmattr %{__prefix}/bin/gendiff
329 %rpmattr %{__prefix}/bin/rpmdb
330 #%rpmattr %{__prefix}/bin/rpm[eiu]
331 %rpmattr %{__prefix}/bin/rpmsign
332 %rpmattr %{__prefix}/bin/rpmquery
333 %rpmattr %{__prefix}/bin/rpmverify
335 %{__prefix}/lib/librpm-4.1.so
336 %{__prefix}/lib/librpmdb-4.1.so
337 %{__prefix}/lib/librpmio-4.1.so
338 %{__prefix}/lib/librpmbuild-4.1.so
340 %attr(0755, rpm, rpm) %dir %{__prefix}/lib/rpm
341 %rpmattr %{__prefix}/lib/rpm/config.guess
342 %rpmattr %{__prefix}/lib/rpm/config.sub
343 %rpmattr %{__prefix}/lib/rpm/convertrpmrc.sh
344 %attr(0644, rpm, rpm) %{__prefix}/lib/rpm/macros
345 %rpmattr %{__prefix}/lib/rpm/mkinstalldirs
346 %rpmattr %{__prefix}/lib/rpm/rpm.*
347 %rpmattr %{__prefix}/lib/rpm/rpm[deiukqv]
348 %attr(0644, rpm, rpm) %{__prefix}/lib/rpm/rpmpopt*
349 %attr(0644, rpm, rpm) %{__prefix}/lib/rpm/rpmrc
351 %ifarch i386 i486 i586 i686 athlon
352 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/i[3456]86*
353 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/athlon*
355 %ifarch alpha alphaev5 alphaev56 alphapca56 alphaev6 alphaev67
356 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/alpha*
358 %ifarch sparc sparcv9 sparc64
359 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/sparc*
362 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/ia64*
364 %ifarch powerpc ppc ppciseries ppcpseries ppcmac
365 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/ppc*
368 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/s390*
370 %ifarch armv3l armv4l
371 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/armv[34][lb]*
373 %ifarch mips mipsel mipseb
374 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/mips*
376 %attr(-, rpm, rpm) %{__prefix}/lib/rpm/noarch*
378 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/rpm.mo
379 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/rpm.mo
380 %lang(de) %{__prefix}/*/locale/de/LC_MESSAGES/rpm.mo
381 %lang(fi) %{__prefix}/*/locale/fi/LC_MESSAGES/rpm.mo
382 %lang(fr) %{__prefix}/*/locale/fr/LC_MESSAGES/rpm.mo
383 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/rpm.mo
384 %lang(ja) %{__prefix}/*/locale/ja/LC_MESSAGES/rpm.mo
385 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/rpm.mo
386 %lang(pl) %{__prefix}/*/locale/pl/LC_MESSAGES/rpm.mo
387 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/rpm.mo
388 %lang(pt_BR) %{__prefix}/*/locale/pt_BR/LC_MESSAGES/rpm.mo
389 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/rpm.mo
390 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/rpm.mo
391 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/rpm.mo
392 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/rpm.mo
393 %lang(sr) %{__prefix}/*/locale/sr/LC_MESSAGES/rpm.mo
394 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/rpm.mo
395 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/rpm.mo
397 %{__prefix}%{__share}/man/man1/gendiff.1*
398 %{__prefix}%{__share}/man/man8/rpm.8*
399 %{__prefix}%{__share}/man/man8/rpm2cpio.8*
400 %lang(pl) %{__prefix}%{__share}/man/pl/man[18]/*.[18]*
401 %lang(ru) %{__prefix}%{__share}/man/ru/man[18]/*.[18]*
402 %lang(sk) %{__prefix}%{__share}/man/sk/man[18]/*.[18]*
405 %defattr(-,root,root)
406 %dir %{__prefix}/src/redhat
407 %dir %{__prefix}/src/redhat/BUILD
408 %dir %{__prefix}/src/redhat/SPECS
409 %dir %{__prefix}/src/redhat/SOURCES
410 %dir %{__prefix}/src/redhat/SRPMS
411 %dir %{__prefix}/src/redhat/RPMS
412 %{__prefix}/src/redhat/RPMS/*
413 %rpmattr %{__prefix}/bin/rpmbuild
414 %rpmattr %{__prefix}/lib/rpm/brp-*
415 %rpmattr %{__prefix}/lib/rpm/check-prereqs
416 %rpmattr %{__prefix}/lib/rpm/config.site
417 %rpmattr %{__prefix}/lib/rpm/cpanflute
418 %rpmattr %{__prefix}/lib/rpm/cross-build
419 %rpmattr %{__prefix}/lib/rpm/find-lang.sh
420 %rpmattr %{__prefix}/lib/rpm/find-prov.pl
421 %rpmattr %{__prefix}/lib/rpm/find-provides
422 %rpmattr %{__prefix}/lib/rpm/find-provides.perl
423 %rpmattr %{__prefix}/lib/rpm/find-req.pl
424 %rpmattr %{__prefix}/lib/rpm/find-requires
425 %rpmattr %{__prefix}/lib/rpm/find-requires.perl
426 %rpmattr %{__prefix}/lib/rpm/get_magic.pl
427 %rpmattr %{__prefix}/lib/rpm/getpo.sh
428 %rpmattr %{__prefix}/lib/rpm/http.req
429 %rpmattr %{__prefix}/lib/rpm/javadeps
430 %rpmattr %{__prefix}/lib/rpm/magic.prov
431 %rpmattr %{__prefix}/lib/rpm/magic.req
432 %rpmattr %{__prefix}/lib/rpm/perl.prov
434 # XXX remove executable bit to disable autogenerated perl requires for now.
435 #%rpmattr %{__prefix}/lib/rpm/perl.req
436 %attr(0644, rpm, rpm) %{__prefix}/lib/rpm/perl.req
438 %rpmattr %{__prefix}/lib/rpm/rpm[bt]
439 %rpmattr %{__prefix}/lib/rpm/rpmdiff
440 %rpmattr %{__prefix}/lib/rpm/rpmdiff.cgi
441 %rpmattr %{__prefix}/lib/rpm/u_pkg.sh
442 %rpmattr %{__prefix}/lib/rpm/vpkg-provides.sh
443 %rpmattr %{__prefix}/lib/rpm/vpkg-provides2.sh
445 %{__prefix}%{__share}/man/man8/rpmbuild.8*
447 %if %{with_python_subpackage}
449 %defattr(-,root,root)
450 %{__prefix}/lib/python1.5/site-packages/rpmmodule.so
451 %{__prefix}/lib/python1.5/site-packages/poptmodule.so
454 %if %{with_perl_subpackage}
456 %defattr(-,root,root)
457 %rpmattr %{__prefix}/bin/rpmprune
458 %{perl_sitearch}/auto/*
460 %{perl_sitearch}/RPM.pm
461 %{__prefix}%{__share}/man/man1/rpmprune.1*
462 %{__prefix}%{__share}/man/man3/RPM*
466 %defattr(-,root,root)
470 %{__prefix}/include/rpm
471 %{__prefix}/lib/librpm.a
472 %{__prefix}/lib/librpm.la
473 %{__prefix}/lib/librpm.so
474 %{__prefix}/lib/librpmdb.a
475 %{__prefix}/lib/librpmdb.la
476 %{__prefix}/lib/librpmdb.so
477 %{__prefix}/lib/librpmio.a
478 %{__prefix}/lib/librpmio.la
479 %{__prefix}/lib/librpmio.so
480 %{__prefix}/lib/librpmbuild.a
481 %{__prefix}/lib/librpmbuild.la
482 %{__prefix}/lib/librpmbuild.so
485 %defattr(-,root,root)
486 %{__prefix}/lib/libpopt.so.*
487 %{__prefix}%{__share}/man/man3/popt.3*
488 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/popt.mo
489 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/popt.mo
490 %lang(gl) %{__prefix}/*/locale/gl/LC_MESSAGES/popt.mo
491 %lang(hu) %{__prefix}/*/locale/hu/LC_MESSAGES/popt.mo
492 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/popt.mo
493 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/popt.mo
494 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/popt.mo
495 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/popt.mo
496 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/popt.mo
497 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/popt.mo
498 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/popt.mo
499 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/popt.mo
500 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/popt.mo
501 %lang(uk) %{__prefix}/*/locale/uk/LC_MESSAGES/popt.mo
502 %lang(wa) %{__prefix}/*/locale/wa/LC_MESSAGES/popt.mo
503 %lang(zh_CN) %{__prefix}/*/locale/zh_CN.GB2312/LC_MESSAGES/popt.mo
505 # XXX These may end up in popt-devel but it hardly seems worth the effort now.
506 %{__prefix}/lib/libpopt.a
507 %{__prefix}/lib/libpopt.la
508 %{__prefix}/lib/libpopt.so
509 %{__prefix}/include/popt.h
512 * Mon Sep 24 2001 Jeff Johnson <jbj@redhat.com>
514 - loosely wire beecrypt library into rpm.
515 - drop rpmio/base64.[ch] in favor of beecrypt versions.
516 - drop lib/md5*.[ch] files in favor of beecrypt.
517 - legacy: drop brokenMD5 support (rpm-2.3.3 to rpm-2.3.8 on sparc).
518 - eliminate DYING code.
519 - bind beecrypt md5/sha1 underneath rpmio.
520 - create RFC-2440 OpenPGP API in rpmio.
521 - proof-of-concept GPG/DSA verification for legacy signatures.