1 %define with_python_subpackage @WITH_PYTHON_SUBPACKAGE@%{nil}
2 %define with_python_version @WITH_PYTHON_VERSION@%{nil}
3 %define with_bzip2 @WITH_BZIP2@%{nil}
4 %define with_apidocs @WITH_APIDOCS@%{nil}
6 # XXX legacy requires './' payload prefix to be omitted from rpm packages.
7 %define _noPayloadPrefix 1
10 %{?!_lib: %define _lib lib}
11 %{expand: %%define __share %(if [ -d %{__prefix}/share/man ]; then echo /share ; else echo %%{nil} ; fi)}
13 %define __bindir %{__prefix}/bin
14 %define __includedir %{__prefix}/include
15 %define __libdir %{__prefix}/%{_lib}
16 %define __mandir %{__prefix}%{__share}/man
18 Summary: The RPM package management system.
20 %define version @VERSION@
22 %{expand: %%define rpm_version %{version}}
24 Group: System Environment/Base
25 Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
27 Conflicts: patch < 2.5
29 Prereq: fileutils shadow-utils
32 Obsoletes: rpm-perl < %{version}
34 # XXX necessary only to drag in /usr/lib/libelf.a, otherwise internal elfutils.
35 BuildRequires: elfutils-libelf
37 BuildRequires: zlib-devel
39 BuildRequires: beecrypt-devel >= 3.0.1
40 Requires: beecrypt-devel >= 3.0.1
42 # XXX Red Hat 5.2 has not bzip2 or python
44 BuildRequires: bzip2 >= 0.9.0c-2
46 %if %{with_python_subpackage}
47 BuildRequires: python-devel >= %{with_python_version}
50 BuildRoot: %{_tmppath}/%{name}-root
53 The RPM Package Manager (RPM) is a powerful command line driven
54 package management system capable of installing, uninstalling,
55 verifying, querying, and updating software packages. Each software
56 package consists of an archive of files along with information about
57 the package like its version, a description, etc.
60 Summary: Development files for manipulating RPM packages.
61 Group: Development/Libraries
62 Requires: rpm = %{rpm_version}
65 This package contains the RPM C library and header files. These
66 development files will simplify the process of writing programs that
67 manipulate RPM packages and databases. These files are intended to
68 simplify the process of creating graphical package managers or any
69 other tools that need an intimate knowledge of RPM packages in order
72 This package should be installed if you want to develop programs that
73 will manipulate RPM packages and databases.
76 Summary: Scripts and executable programs used to build packages.
77 Group: Development/Tools
78 Requires: rpm = %{rpm_version}, patch >= 2.5, file
79 Provides: rpmbuild(VendorConfig) = 4.1-1
82 The rpm-build package contains the scripts and executable programs
83 that are used to build packages using the RPM Package Manager.
85 %if %{with_python_subpackage}
87 Summary: Python bindings for apps which will manipulate RPM packages.
88 Group: Development/Libraries
89 Requires: rpm = %{rpm_version}
90 Requires: python >= %{with_python_version}
91 Requires: elfutils >= 0.55
94 The rpm-python package contains a module that permits applications
95 written in the Python programming language to use the interface
96 supplied by RPM Package Manager libraries.
98 This package should be installed if you want to develop Python
99 programs that will manipulate RPM packages and databases.
103 Summary: A C library for parsing command line parameters.
104 Group: Development/Libraries
108 Popt is a C library for parsing command line parameters. Popt was
109 heavily influenced by the getopt() and getopt_long() functions, but it
110 improves on them by allowing more powerful argument expansion. Popt
111 can parse arbitrary argv[] style arrays and automatically set
112 variables based on command line arguments. Popt allows command line
113 arguments to be aliased via configuration files and includes utility
114 functions for parsing arbitrary strings into argv[] arrays using
122 # XXX rpm needs functioning nptl for configure tests
123 unset LD_ASSUME_KERNEL || :
125 %if %{with_python_subpackage}
126 WITH_PYTHON="--with-python=%{with_python_version}"
128 WITH_PYTHON="--without-python"
132 %ifarch x86_64 s390 s390x
133 CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS
135 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
137 ./configure --prefix=%{__prefix} --sysconfdir=/etc \
138 --localstatedir=/var --infodir='${prefix}%{__share}/info' \
139 --mandir='${prefix}%{__share}/man' \
140 $WITH_PYTHON --without-javaglue
142 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix} $WITH_PYTHON \
146 # XXX hack out O_DIRECT support in db4 for now.
147 perl -pi -e 's/#define HAVE_O_DIRECT 1/#undef HAVE_O_DIRECT/' db3/db_config.h
152 # XXX rpm needs functioning nptl for configure tests
153 unset LD_ASSUME_KERNEL || :
155 rm -rf $RPM_BUILD_ROOT
157 make DESTDIR="$RPM_BUILD_ROOT" install
161 # Save list of packages through cron
162 mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily
163 install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}/etc/cron.daily/rpm
165 mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
166 install -m 644 scripts/rpm.log ${RPM_BUILD_ROOT}/etc/logrotate.d/rpm
168 mkdir -p $RPM_BUILD_ROOT/etc/rpm
170 mkdir -p $RPM_BUILD_ROOT/var/spool/repackage
171 mkdir -p $RPM_BUILD_ROOT/var/lib/rpm
173 Basenames Conflictname Dirnames Group Installtid Name Packages \
174 Providename Provideversion Requirename Requireversion Triggername \
175 Filemd5s Pubkeys Sha1header Sigmd5 \
176 __db.001 __db.002 __db.003 __db.004 __db.005 __db.006 __db.007 \
179 touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi
185 gzip -9n apidocs/man/man*/* || :
188 # Get rid of unpackaged files
190 rm -rf .%{__includedir}/beecrypt
191 rm -f .%{__libdir}/libbeecrypt.{a,la,so.2.2.0}
192 rm -f .%{__prefix}/lib/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req}
193 rm -rf .%{__mandir}/{fr,ko}
197 rm -rf $RPM_BUILD_ROOT
201 if [ -f /var/lib/rpm/packages.rpm ]; then
203 You have (unsupported)
204 /var/lib/rpm/packages.rpm db1 format installed package headers
205 Please install rpm-4.0.4 first, and do
207 to convert your database from db1 to db3 format.
211 /usr/sbin/groupadd -g 37 @RPMGROUP@ > /dev/null 2>&1
212 /usr/sbin/useradd -r -d /var/lib/rpm -u 37 -g 37 @RPMUSER@ -s /sbin/nologin > /dev/null 2>&1
220 # Establish correct rpmdb ownership.
221 /bin/chown @RPMUSER@.@RPMGROUP@ /var/lib/rpm/[A-Z]*
223 # XXX Detect (and remove) incompatible dbenv files during db-4.2.52 upgrade.
224 # XXX Removing dbenv files in %%post opens a lock race window, a tolerable
225 # XXX risk compared to the support issues involved with upgrading Berkeley DB.
226 [ -w /var/lib/rpm/__db.001 ] &&
227 /usr/lib/rpm/rpmdb_stat -CA -h /var/lib/rpm 2>&1 |
228 grep "db_stat: Program version 4.2 doesn't match environment version" 2>&1 > /dev/null &&
229 rm -f /var/lib/rpm/__db*
238 /usr/sbin/userdel @RPMUSER@
239 /usr/sbin/groupdel @RPMGROUP@
243 %post devel -p /sbin/ldconfig
244 %postun devel -p /sbin/ldconfig
246 %post -n popt -p /sbin/ldconfig
247 %postun -n popt -p /sbin/ldconfig
250 %if %{with_python_subpackage}
251 %post python -p /sbin/ldconfig
252 %postun python -p /sbin/ldconfig
255 %define rpmattr %attr(0755, @RPMUSER@, @RPMGROUP@)
258 %defattr(-,root,root)
259 %doc RPM-PGP-KEY RPM-GPG-KEY BETA-GPG-KEY CHANGES GROUPS doc/manual/[a-z]*
260 # XXX comment these lines out if building with rpm that knows not %pubkey attr
264 %attr(0755, @RPMUSER@, @RPMGROUP@) /bin/rpm
267 %config(noreplace,missingok) /etc/cron.daily/rpm
268 %config(noreplace,missingok) /etc/logrotate.d/rpm
270 #%config(noreplace,missingok) /etc/rpm/macros.*
271 %attr(0755, @RPMUSER@, @RPMGROUP@) %dir /var/lib/rpm
272 %attr(0755, @RPMUSER@, @RPMGROUP@) %dir /var/spool/repackage
274 %define rpmdbattr %attr(0644, @RPMUSER@, @RPMGROUP@) %verify(not md5 size mtime) %ghost %config(missingok,noreplace)
275 %rpmdbattr /var/lib/rpm/*
278 %rpmattr %{__bindir}/rpm2cpio
279 %rpmattr %{__bindir}/gendiff
280 %rpmattr %{__bindir}/rpmdb
281 #%rpmattr %{__bindir}/rpm[eiu]
282 %rpmattr %{__bindir}/rpmsign
283 %rpmattr %{__bindir}/rpmquery
284 %rpmattr %{__bindir}/rpmverify
286 %{__libdir}/librpm-@VERSION@.so
287 %{__libdir}/librpmdb-@VERSION@.so
288 %{__libdir}/librpmio-@VERSION@.so
289 %{__libdir}/librpmbuild-@VERSION@.so
291 %attr(0755, @RPMUSER@, @RPMGROUP@) %dir %{__prefix}/lib/rpm
292 %rpmattr %{__prefix}/lib/rpm/config.guess
293 %rpmattr %{__prefix}/lib/rpm/config.sub
294 %rpmattr %{__prefix}/lib/rpm/convertrpmrc.sh
295 %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/macros
296 %rpmattr %{__prefix}/lib/rpm/mkinstalldirs
297 %rpmattr %{__prefix}/lib/rpm/rpm.*
298 %rpmattr %{__prefix}/lib/rpm/rpm2cpio.sh
299 %rpmattr %{__prefix}/lib/rpm/rpm[deiukqv]
300 %rpmattr %{__prefix}/lib/rpm/tgpg
301 %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpmpopt*
302 %attr(0644, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/rpmrc
304 %ifarch i386 i486 i586 i686 athlon
305 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/i[3456]86*
306 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/athlon*
308 %ifarch alpha alphaev5 alphaev56 alphapca56 alphaev6 alphaev67
309 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/alpha*
311 %ifarch sparc sparcv9 sparc64
312 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/sparc*
315 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/ia64*
317 %ifarch powerpc ppc ppciseries ppcpseries ppcmac ppc64
318 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/ppc*
321 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/s390*
323 %ifarch armv3l armv4l
324 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/armv[34][lb]*
327 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/mips*
330 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/x86_64*
332 %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/noarch*
334 %rpmattr %{__prefix}/lib/rpm/rpmdb_deadlock
335 %rpmattr %{__prefix}/lib/rpm/rpmdb_dump
336 %rpmattr %{__prefix}/lib/rpm/rpmdb_load
337 %rpmattr %{__prefix}/lib/rpm/rpmdb_loadcvt
338 %rpmattr %{__prefix}/lib/rpm/rpmdb_svc
339 %rpmattr %{__prefix}/lib/rpm/rpmdb_stat
340 %rpmattr %{__prefix}/lib/rpm/rpmdb_verify
341 %rpmattr %{__prefix}/lib/rpm/rpmfile
343 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/rpm.mo
344 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/rpm.mo
345 %lang(de) %{__prefix}/*/locale/de/LC_MESSAGES/rpm.mo
346 %lang(fi) %{__prefix}/*/locale/fi/LC_MESSAGES/rpm.mo
347 %lang(fr) %{__prefix}/*/locale/fr/LC_MESSAGES/rpm.mo
348 %lang(gl) %{__prefix}/*/locale/gl/LC_MESSAGES/rpm.mo
349 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/rpm.mo
350 %lang(ja) %{__prefix}/*/locale/ja/LC_MESSAGES/rpm.mo
351 %lang(ko) %{__prefix}/*/locale/ko/LC_MESSAGES/rpm.mo
352 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/rpm.mo
353 %lang(pl) %{__prefix}/*/locale/pl/LC_MESSAGES/rpm.mo
354 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/rpm.mo
355 %lang(pt_BR) %{__prefix}/*/locale/pt_BR/LC_MESSAGES/rpm.mo
356 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/rpm.mo
357 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/rpm.mo
358 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/rpm.mo
359 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/rpm.mo
360 %lang(sr) %{__prefix}/*/locale/sr/LC_MESSAGES/rpm.mo
361 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/rpm.mo
362 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/rpm.mo
364 %{__mandir}/man1/gendiff.1*
365 %{__mandir}/man8/rpm.8*
366 %{__mandir}/man8/rpm2cpio.8*
367 %lang(ja) %{__mandir}/ja/man[18]/*.[18]*
368 %lang(pl) %{__mandir}/pl/man[18]/*.[18]*
369 %lang(ru) %{__mandir}/ru/man[18]/*.[18]*
370 %lang(sk) %{__mandir}/sk/man[18]/*.[18]*
373 %defattr(-,root,root)
374 %dir %{__prefix}/src/@RPMCANONVENDOR@
375 %dir %{__prefix}/src/@RPMCANONVENDOR@/BUILD
376 %dir %{__prefix}/src/@RPMCANONVENDOR@/SPECS
377 %dir %{__prefix}/src/@RPMCANONVENDOR@/SOURCES
378 %dir %{__prefix}/src/@RPMCANONVENDOR@/SRPMS
379 %dir %{__prefix}/src/@RPMCANONVENDOR@/RPMS
380 %{__prefix}/src/@RPMCANONVENDOR@/RPMS/*
381 %rpmattr %{__bindir}/rpmbuild
382 %rpmattr %{__prefix}/lib/rpm/brp-*
383 %rpmattr %{__prefix}/lib/rpm/check-files
384 %rpmattr %{__prefix}/lib/rpm/check-prereqs
385 %rpmattr %{__prefix}/lib/rpm/config.site
386 %rpmattr %{__prefix}/lib/rpm/cross-build
387 %rpmattr %{__prefix}/lib/rpm/debugedit
388 %rpmattr %{__prefix}/lib/rpm/find-debuginfo.sh
389 %rpmattr %{__prefix}/lib/rpm/find-lang.sh
390 %rpmattr %{__prefix}/lib/rpm/find-prov.pl
391 %rpmattr %{__prefix}/lib/rpm/find-provides
392 %rpmattr %{__prefix}/lib/rpm/find-provides.perl
393 %rpmattr %{__prefix}/lib/rpm/find-req.pl
394 %rpmattr %{__prefix}/lib/rpm/find-requires
395 %rpmattr %{__prefix}/lib/rpm/find-requires.perl
396 %rpmattr %{__prefix}/lib/rpm/get_magic.pl
397 %rpmattr %{__prefix}/lib/rpm/getpo.sh
398 %rpmattr %{__prefix}/lib/rpm/http.req
399 %rpmattr %{__prefix}/lib/rpm/javadeps
400 %rpmattr %{__prefix}/lib/rpm/magic
401 %rpmattr %{__prefix}/lib/rpm/magic.mgc
402 %rpmattr %{__prefix}/lib/rpm/magic.mime
403 %rpmattr %{__prefix}/lib/rpm/magic.mime.mgc
404 %rpmattr %{__prefix}/lib/rpm/magic.prov
405 %rpmattr %{__prefix}/lib/rpm/magic.req
406 %rpmattr %{__prefix}/lib/rpm/perldeps.pl
407 %rpmattr %{__prefix}/lib/rpm/perl.prov
408 %rpmattr %{__prefix}/lib/rpm/perl.req
410 %rpmattr %{__prefix}/lib/rpm/rpm[bt]
411 %rpmattr %{__prefix}/lib/rpm/rpmdeps
412 %rpmattr %{__prefix}/lib/rpm/trpm
413 %rpmattr %{__prefix}/lib/rpm/u_pkg.sh
414 %rpmattr %{__prefix}/lib/rpm/vpkg-provides.sh
415 %rpmattr %{__prefix}/lib/rpm/vpkg-provides2.sh
417 %{__mandir}/man8/rpmbuild.8*
418 %{__mandir}/man8/rpmdeps.8*
420 %if %{with_python_subpackage}
422 %defattr(-,root,root)
423 %{__libdir}/python%{with_python_version}/site-packages/rpmmodule.so
424 %{__libdir}/python%{with_python_version}/site-packages/rpmdb
428 %defattr(-,root,root)
430 %doc @WITH_APIDOCS_TARGET@
434 %{__libdir}/librpm.la
435 %{__libdir}/librpm.so
436 %{__libdir}/librpmdb.a
437 %{__libdir}/librpmdb.la
438 %{__libdir}/librpmdb.so
439 %{__libdir}/librpmio.a
440 %{__libdir}/librpmio.la
441 %{__libdir}/librpmio.so
442 %{__libdir}/librpmbuild.a
443 %{__libdir}/librpmbuild.la
444 %{__libdir}/librpmbuild.so
445 %{__mandir}/man8/rpmcache.8*
446 %{__mandir}/man8/rpmgraph.8*
447 %rpmattr %{__prefix}/lib/rpm/rpmcache
448 %rpmattr %{__bindir}/rpmgraph
451 %defattr(-,root,root)
452 %{__libdir}/libpopt.so.*
453 %{__mandir}/man3/popt.3*
454 %lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/popt.mo
455 %lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/popt.mo
456 %lang(de) %{__prefix}/*/locale/de/LC_MESSAGES/popt.mo
457 %lang(es) %{__prefix}/*/locale/es/LC_MESSAGES/popt.mo
458 %lang(eu_ES) %{__prefix}/*/locale/eu_ES/LC_MESSAGES/popt.mo
459 %lang(fi) %{__prefix}/*/locale/fi/LC_MESSAGES/popt.mo
460 %lang(fr) %{__prefix}/*/locale/fr/LC_MESSAGES/popt.mo
461 %lang(gl) %{__prefix}/*/locale/gl/LC_MESSAGES/popt.mo
462 %lang(hu) %{__prefix}/*/locale/hu/LC_MESSAGES/popt.mo
463 %lang(id) %{__prefix}/*/locale/id/LC_MESSAGES/popt.mo
464 %lang(is) %{__prefix}/*/locale/is/LC_MESSAGES/popt.mo
465 %lang(it) %{__prefix}/*/locale/it/LC_MESSAGES/popt.mo
466 %lang(ja) %{__prefix}/*/locale/ja/LC_MESSAGES/popt.mo
467 %lang(ko) %{__prefix}/*/locale/ko/LC_MESSAGES/popt.mo
468 %lang(no) %{__prefix}/*/locale/no/LC_MESSAGES/popt.mo
469 %lang(pl) %{__prefix}/*/locale/pl/LC_MESSAGES/popt.mo
470 %lang(pt) %{__prefix}/*/locale/pt/LC_MESSAGES/popt.mo
471 %lang(pt_BR) %{__prefix}/*/locale/pt_BR/LC_MESSAGES/popt.mo
472 %lang(ro) %{__prefix}/*/locale/ro/LC_MESSAGES/popt.mo
473 %lang(ru) %{__prefix}/*/locale/ru/LC_MESSAGES/popt.mo
474 %lang(sk) %{__prefix}/*/locale/sk/LC_MESSAGES/popt.mo
475 %lang(sl) %{__prefix}/*/locale/sl/LC_MESSAGES/popt.mo
476 %lang(sr) %{__prefix}/*/locale/sr/LC_MESSAGES/popt.mo
477 %lang(sv) %{__prefix}/*/locale/sv/LC_MESSAGES/popt.mo
478 %lang(tr) %{__prefix}/*/locale/tr/LC_MESSAGES/popt.mo
479 %lang(uk) %{__prefix}/*/locale/uk/LC_MESSAGES/popt.mo
480 %lang(wa) %{__prefix}/*/locale/wa/LC_MESSAGES/popt.mo
481 %lang(zh) %{__prefix}/*/locale/zh/LC_MESSAGES/popt.mo
482 %lang(zh_CN) %{__prefix}/*/locale/zh_CN.GB2312/LC_MESSAGES/popt.mo
484 # XXX These may end up in popt-devel but it hardly seems worth the effort.
485 %{__libdir}/libpopt.a
486 %{__libdir}/libpopt.la
487 %{__libdir}/libpopt.so
488 %{__includedir}/popt.h
491 * Wed Dec 17 2003 Jeff Johnson <jbj@jbj.org> 4.2-0.3
492 - detect (and remove) dbenv files while upgrading to db-4.2.52.
493 - fix: dangling pointer brain fart (#107835).
495 * Sun Dec 7 2003 Jeff Johnson <jbj@jbj.org> 4.3-0.2
496 - only internal Berkeley db from now on.
497 - revive "make dist".
499 * Wed Mar 19 2003 Jeff Johnson <jbj@redhat.com> 4.3-0.1
500 - upgrade to zlib-1.2.beta7.
501 - pass structure pointer, not args, through headerSprintf call chain.
502 - add ":xml" tag format modifier.
503 - --queryformat '[%%{*:xml}\n]' to dump header content in XML.
504 - fix: short option help missing string terminator.
505 - unify signal handling in librpmio, use condvar to deliver signal.