Doxyfile
Makefile
Makefile.in
+apidocs
config.cache
config.guess
config.h
Tim Mooney<mooney@dogbert.cc.ndsu.NoDak.edu>
- portability: remove use of GNU make subst in lib/Makefile (Joe Orton).
- python: bind package removal (#21274).
+ - autoconfigure building python bindings.
+ - autoconfigure generating rpm API doco.
+ - fix: don't fdFree in rpmVerifyScript, rpmtransFree does already.
3.0.6 -> 4.0
- use DIRNAMES/BASENAMES/DIRINDICES not FILENAMES in packages and db.
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = doxygen
+OUTPUT_DIRECTORY = @WITH_APIDOCS_TARGET@
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
./lib/cpio.c \
./lib/cpio.h \
./lib/db1.c \
- ./lib/db2.c \
./lib/db3.c \
./lib/depends.c \
./lib/depends.h \
./lib/verify.c \
./rpmio/base64.c \
./rpmio/base64.h \
+ ./rpmio/digest.c \
./rpmio/macro.c \
./rpmio/md5.c \
./rpmio/rpmlog.c \
*/
/** \defgroup db1 DB1.
*/
-/** \defgroup db2 DB2.
- */
/** \defgroup db3 DB3.
*/
/** \defgroup rpmrpc RPMRPC.
AUTOMAKE_OPTIONS = 1.4 foreign
-EXTRA_DIST = CHANGES CREDITS GROUPS README.amiga INSTALL \
+EXTRA_DIST = CHANGES CREDITS Doxyheader GROUPS README.amiga INSTALL \
RPM-GPG-KEY RPM-PGP-KEY \
autodeps/none autodeps/*.prov autodeps/*.req autogen.sh \
gendiff installplatform platform* \
po/*.in po/*.po po/rpm.pot \
python/*.am python/*.in python/*.c python/*.h python/testit \
- rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.spec
+ rpm.magic rpmpopt-$(VERSION) rpmqv.c
# XXX TODO: python perl
SUBDIRS = intl po popt rpmio lib build misc tools scripts tests doc .
$(COMPILE) -DIAM_RPMQV -o $@ -c $<
rpm2cpio_SOURCES = rpm2cpio.c
-rpm2cpio_LDFLAGS = $(myLDFLAGS)
+rpm2cpio_LDFLAGS = @LDFLAGS_STATIC@ $(myLDFLAGS)
rpm2cpio_LDADD = $(myLDADD) @LIBMISC@
-$(PROGRAMS): $(myLDADD)
+$(PROGRAMS): $(myLDADD) @WITH_APIDOCS_TARGET@
.PHONY: lclint
lclint:
@$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SRPMS
@$(mkinstalldirs) $(DESTDIR)/var/tmp
-
.PHONY: tar
tar:
rm -rf /tmp/rpm-$(VERSION)
nextsrpm: all archive
@sudo ./rpm -ta rpm-$(VERSION).tar.gz
-.PHONY: doxygen
-doxygen: Doxyfile
- rm -rf doxygen
- mkdir -p doxygen
+.PHONY: doxygen
+doxygen @WITH_APIDOCS_TARGET@: Doxyfile
+ rm -rf $@
+ mkdir -p $@
doxygen
ctags:
AC_PATH_PROG(__PERL, perl, /usr/bin/perl, $MYPATH)
AC_PATH_PROG(PGPBIN, pgp, /usr/bin/pgp, $MYPATH)
+ AC_PATH_PROG(__PYTHON, python, /usr/bin/python, $MYPATH)
AC_PATH_PROG(__RM, rm, /bin/rm, $MYPATH)
AC_PATH_PROG(__RSH, rsh, /usr/bin/rsh, $MYPATH)
AC_PATH_PROG(__SED, sed, /bin/sed, $MYPATH)
AC_CHECK_LIB(bz2, bzread, [LIBS="$LIBS -lbz2"],
AC_CHECK_LIB(bz2, BZ2_bzread, [
+ WITH_BZIP2=1
LIBS="$LIBS -lbz2"
AC_DEFINE(HAVE_BZ2_1_0) ],
- AC_MSG_WARN([rpm needs libbz2.a (from the bzip2 package)])))
+ WITH_BZIP2=0))
+AC_SUBST(WITH_BZIP2)
dnl Red Hat 4.x has not personality
AC_CHECK_FUNCS(personality)
dnl %files gets something like
dnl /usr/*/locale/*/LC_MESSAGES/*.mo
dnl (Note: more than one asterisk in glob pattern.)
-dnl The next version of rpm is going to need GNU extensions anyways, so ...
dnl
AC_ARG_WITH(glob, [ --with-glob use the internal GNU glob ],
[rpm_cv_glob=yes],
LIBOBJS="$LIBOBJS glob.o fnmatch.o"
fi
+dnl
+dnl Auto-detect whether python bindings should be built.
+dnl
+AC_ARG_WITH(python, [ --with-python build rpm python bindings ],
+ rpm_cv_python=yes, rpm_cv_python=no)
+
+if test $rpm_cv_python = no ; then
+ AC_MSG_CHECKING(for python 1.5.2)
+ AC_TRY_RUN([
+#include <python1.5/Python.h>
+main() {
+ exit(strcmp("1.5.2", PY_VERSION));
+} ],
+ rpm_cv_python=yes, rpm_cv_python=no, rpm_cv_python=no)
+ AC_MSG_RESULT([$rpm_cv_python])
+fi
+
+if test $rpm_cv_python = yes; then
+ WITH_PYTHON_SUBDIR=python
+ WITH_PYTHON_SUBPACKAGE=1
+else
+ WITH_PYTHON_SUBDIR=
+ WITH_PYTHON_SUBPACKAGE=0
+fi
+AC_SUBST(WITH_PYTHON_SUBDIR)
+AC_SUBST(WITH_PYTHON_SUBPACKAGE)
+
+AC_PATH_PROG(__DOXYGEN, doxygen, no, $PATH)
+dnl
+dnl Auto-detect whether doxygen generated API docs should be included.
+dnl
+AC_ARG_WITH(apidocs, [ --with-apidocs build rpm API docs ],
+ [ if test __DOXYGEN = no; then
+ AC_MSG_ERROR(--> rpm API docs need doxygen in PATH)
+ fi
+ rpm_cv_apidocs=yes
+ ],
+ [ if test __DOXYGEN = no; then
+ rpm_cv_apidocs=no
+ else
+ rpm_cv_apidocs=yes
+ fi
+ ]
+)
+
+if test $rpm_cv_apidocs = yes; then
+ WITH_APIDOCS_TARGET=apidocs
+ WITH_APIDOCS=1
+else
+ WITH_APIDOCS=0
+fi
+AC_SUBST(WITH_APIDOCS_TARGET)
+AC_SUBST(WITH_APIDOCS)
+
AC_CHECK_FUNCS(setlocale)
dnl XXX Solaris <= 2.6 only permits 8 chars in password.
AC_DEFINE_UNQUOTED(SYSCONFIGDIR, "$SYSCONFIGDIR")
AC_SUBST(SYSCONFIGDIR)
-MACROFILES="${RPMCONFIGDIR}/macros:${RPMCONFIGDIR}/%{_target_platform}/macros:${SYSCONFIGDIR}/macros:${SYSCONFIGDIR}/macros.specspo:${SYSCONFIGDIR}/%{_target_platform}/macros:~/.rpmmacros"
+MACROFILES="${RPMCONFIGDIR}/macros:${RPMCONFIGDIR}/%{_target_platform}/macros:${SYSCONFIGDIR}/macros:${SYSCONFIGDIR}/macros.specspo:${SYSCONFIGDIR}/macros.db1:${SYSCONFIGDIR}/%{_target_platform}/macros:~/.rpmmacros"
AC_DEFINE_UNQUOTED(MACROFILES, "$MACROFILES")
AC_SUBST(MACROFILES)
AC_SUBST(RPM)
+AC_SUBST(OBJDUMP)
+
dnl XXX this causes popt to depend on zlib et al
dnl # XXX Propagate -lucb to popt ...
dnl export LIBS INCPATH CONFIG_SITE
AC_CONFIG_SUBDIRS(popt)
-AC_OUTPUT([Doxyfile Makefile rpmrc macros platform rpmpopt scripts/brp-redhat
+AC_OUTPUT([Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec scripts/brp-redhat
rpmio/Makefile lib/Makefile build/Makefile tools/Makefile
scripts/Makefile
tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile
* This is a colon separated list of files. URI's are permitted as well,
* identified by the token '://', so file paths must not begin with '//'.
*/
-const char * macrofiles;
+extern const char * macrofiles;
/** \ingroup rpmrc
* Build and install arch/os table identifiers.
static const char *defrcfiles = LIBRPMRC_FILENAME ":/etc/rpmrc:~/.rpmrc";
+const char * macrofiles = MACROFILES;
+
typedef /*@owned@*/ const char * cptr_t;
struct machCacheEntry {
ts->scriptFd = fdLink(scriptFd, "rpmVerifyScript");
rc = runInstScript(ts, h, RPMTAG_VERIFYSCRIPT, RPMTAG_VERIFYSCRIPTPROG,
0, 0);
- ts->scriptFd = fdFree(ts->scriptFd, "rpmVerifyScript");
rpmtransFree(ts);
return rc;
}
-# $Id: macros.in,v 1.69 2000/11/02 17:57:26 jbj Exp $
+# $Id: macros.in,v 1.70 2000/12/04 00:55:17 jbj Exp $
#
# This is a global RPM configuration file. All changes made here will
# be lost when the rpm package is upgraded. Any per-system configuration
%__patch @__PATCH@
%__perl @__PERL@
%__pgp %{_pgpbin}
+%__python @__PYTHON@
%__rm @__RM@
%__rsh @__RSH@
%__sed @__SED@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+WITH_APIDOCS = @WITH_APIDOCS@
+WITH_APIDOCS_TARGET = @WITH_APIDOCS_TARGET@
+WITH_BZIP2 = @WITH_BZIP2@
+WITH_PYTHON_SUBDIR = @WITH_PYTHON_SUBDIR@
+WITH_PYTHON_SUBPACKAGE = @WITH_PYTHON_SUBPACKAGE@
__CAT = @__CAT@
__CHGRP = @__CHGRP@
__CHGRP_RHF = @__CHGRP_RHF@
__CHOWN_RHF = @__CHOWN_RHF@
__CP = @__CP@
__CPIO = @__CPIO@
+__DOXYGEN = @__DOXYGEN@
__GREP = @__GREP@
__ID = @__ID@
__ID_U = @__ID_U@
__OBJDUMP = @__OBJDUMP@
__PATCH = @__PATCH@
__PERL = @__PERL@
+__PYTHON = @__PYTHON@
__RM = @__RM@
__RSH = @__RSH@
__SED = @__SED@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2000-12-02 16:47-0500\n"
+"POT-Creation-Date: 2000-12-03 19:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "read failed: %s (%d)"
msgstr ""
-#: lib/rpmrc.c:147
+#: lib/rpmrc.c:149
#, c-format
msgid "missing second ':' at %s:%d"
msgstr ""
-#: lib/rpmrc.c:150
+#: lib/rpmrc.c:152
#, c-format
msgid "missing architecture name at %s:%d"
msgstr ""
-#: lib/rpmrc.c:310
+#: lib/rpmrc.c:312
#, c-format
msgid "Incomplete data line at %s:%d"
msgstr ""
-#: lib/rpmrc.c:314
+#: lib/rpmrc.c:316
#, c-format
msgid "Too many args in data line at %s:%d"
msgstr ""
-#: lib/rpmrc.c:321
+#: lib/rpmrc.c:323
#, c-format
msgid "Bad arch/os number: %s (%s:%d)"
msgstr ""
-#: lib/rpmrc.c:356
+#: lib/rpmrc.c:358
#, c-format
msgid "Incomplete default line at %s:%d"
msgstr ""
-#: lib/rpmrc.c:361
+#: lib/rpmrc.c:363
#, c-format
msgid "Too many args in default line at %s:%d"
msgstr ""
-#: lib/rpmrc.c:551
+#: lib/rpmrc.c:553
#, c-format
msgid "Cannot expand %s"
msgstr ""
-#: lib/rpmrc.c:556
+#: lib/rpmrc.c:558
#, c-format
msgid "Cannot read %s, HOME is too large."
msgstr ""
-#: lib/rpmrc.c:573
+#: lib/rpmrc.c:575
#, c-format
msgid "Unable to open %s for reading: %s."
msgstr ""
#. XXX Feof(fd)
-#: lib/rpmrc.c:618
+#: lib/rpmrc.c:620
#, c-format
msgid "Failed to read %s: %s."
msgstr ""
-#: lib/rpmrc.c:655
+#: lib/rpmrc.c:657
#, c-format
msgid "missing ':' (found 0x%02x) at %s:%d"
msgstr ""
-#: lib/rpmrc.c:672 lib/rpmrc.c:746
+#: lib/rpmrc.c:674 lib/rpmrc.c:748
#, c-format
msgid "missing argument for %s at %s:%d"
msgstr ""
-#: lib/rpmrc.c:689 lib/rpmrc.c:711
+#: lib/rpmrc.c:691 lib/rpmrc.c:713
#, c-format
msgid "%s expansion failed at %s:%d \"%s\""
msgstr ""
-#: lib/rpmrc.c:698
+#: lib/rpmrc.c:700
#, c-format
msgid "cannot open %s at %s:%d: %s"
msgstr ""
-#: lib/rpmrc.c:738
+#: lib/rpmrc.c:740
#, c-format
msgid "missing architecture for %s at %s:%d"
msgstr ""
-#: lib/rpmrc.c:805
+#: lib/rpmrc.c:807
#, c-format
msgid "bad option '%s' at %s:%d"
msgstr ""
-#: lib/rpmrc.c:1202
+#: lib/rpmrc.c:1204
#, c-format
msgid "Unknown system: %s\n"
msgstr ""
-#: lib/rpmrc.c:1203
+#: lib/rpmrc.c:1205
msgid "Please contact rpm-list@redhat.com\n"
msgstr ""
msgid "package lacks both group name and id lists (this should never happen)"
msgstr ""
-#: lib/verify.c:286
+#: lib/verify.c:285
#, c-format
msgid "missing %s\n"
msgstr ""
-#: lib/verify.c:348
+#: lib/verify.c:347
#, c-format
msgid "Unsatisfied dependencies for %s-%s-%s: "
msgstr ""
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+WITH_APIDOCS = @WITH_APIDOCS@
+WITH_APIDOCS_TARGET = @WITH_APIDOCS_TARGET@
+WITH_BZIP2 = @WITH_BZIP2@
+WITH_PYTHON_SUBDIR = @WITH_PYTHON_SUBDIR@
+WITH_PYTHON_SUBPACKAGE = @WITH_PYTHON_SUBPACKAGE@
__CAT = @__CAT@
__CHGRP = @__CHGRP@
__CHGRP_RHF = @__CHGRP_RHF@
__CHOWN_RHF = @__CHOWN_RHF@
__CP = @__CP@
__CPIO = @__CPIO@
+__DOXYGEN = @__DOXYGEN@
__GREP = @__GREP@
__ID = @__ID@
__ID_U = @__ID_U@
__OBJDUMP = @__OBJDUMP@
__PATCH = @__PATCH@
__PERL = @__PERL@
+__PYTHON = @__PYTHON@
__RM = @__RM@
__RSH = @__RSH@
__SED = @__SED@
sizeof(*psp->packages), (void *)pkgCompare);
if (!pack) {
if (headerGetEntryMinMemory(h, RPMTAG_BASENAMES, NULL,
- (void **) &installedFiles, &installedFileCount)) {
+ (const void **) &installedFiles, &installedFileCount)) {
headerGetEntryMinMemory(h, RPMTAG_DIRINDEXES, NULL,
- (void **) &installedDirIndexes, NULL);
+ (const void **) &installedDirIndexes, NULL);
headerGetEntryMinMemory(h, RPMTAG_DIRNAMES, NULL,
- (void **) &installedDirs, NULL);
+ (const void **) &installedDirs, NULL);
compareFileList(0, NULL, NULL, NULL, installedFileCount,
installedFiles, installedDirs,
}
if (headerGetEntryMinMemory((*pip)->h, RPMTAG_OBSOLETENAME, NULL,
- (void **) &obsoletes, &obsoletesCount)) {
+ (const void **) &obsoletes, &obsoletesCount)) {
while (obsoletesCount--) {
if (rpmdbCountPackages(db, obsoletes[obsoletesCount]) > 0) {
(*pip)->selected = 1;
(*pip)->selected = 1;
if (!headerGetEntryMinMemory(h, RPMTAG_BASENAMES, NULL,
- (void **) &availFiles, &availFileCount)) {
+ (const void **) &availFiles, &availFileCount)) {
availFiles = NULL;
availFileCount = 0;
} else {
headerGetEntryMinMemory(h, RPMTAG_DIRNAMES, NULL,
- (void **) &availDirs, NULL);
+ (const void **) &availDirs, NULL);
headerGetEntryMinMemory(h, RPMTAG_DIRINDEXES, NULL,
- (void **) &availDirIndexes, NULL);
+ (const void **) &availDirIndexes, NULL);
}
{ rpmdbMatchIterator mi;
mi = rpmdbInitIterator(db, RPMTAG_NAME, name, 0);
while((installedHeader = rpmdbNextIterator(mi)) != NULL) {
if (headerGetEntryMinMemory(installedHeader, RPMTAG_BASENAMES,
- NULL, (void **) &installedFiles,
+ NULL, (const void **) &installedFiles,
&installedFileCount)) {
headerGetEntryMinMemory(installedHeader, RPMTAG_DIRNAMES,
- NULL, (void **) &installedDirs, NULL);
+ NULL, (const void **) &installedDirs, NULL);
headerGetEntryMinMemory(installedHeader, RPMTAG_DIRINDEXES,
- NULL, (void **) &installedDirIndexes, NULL);
+ NULL, (const void **) &installedDirIndexes, NULL);
compareFileList(availFileCount, availFiles,
availDirs, availDirIndexes,
headerGetEntry(h, RPMTAG_NAME, NULL, (void **) &name, NULL);
if (headerGetEntryMinMemory(h, RPMTAG_BASENAMES, NULL,
- (void **) &availFiles, &availFileCount)) {
+ (const void **) &availFiles, &availFileCount)) {
headerGetEntryMinMemory(h, RPMTAG_DIRNAMES, NULL,
- (void **) &availDirs, NULL);
+ (const void **) &availDirs, NULL);
headerGetEntryMinMemory(h, RPMTAG_DIRINDEXES, NULL,
- (void **) &availDirIndexes, NULL);
+ (const void **) &availDirIndexes, NULL);
for (i = 0; i < availFileCount; i++) {
if (htInTable(ht, availDirs[availDirIndexes[i]],
if (headerGetEntry(h, RPMTAG_BASENAMES, NULL,
(void **) &availFiles, &availFileCount)) {
headerGetEntryMinMemory(h, RPMTAG_DIRNAMES, NULL,
- (void **) &availDirs, NULL);
+ (const void **) &availDirs, NULL);
headerGetEntryMinMemory(h, RPMTAG_DIRINDEXES, NULL,
- (void **) &availDirIndexes, NULL);
+ (const void **) &availDirIndexes, NULL);
headerGetEntryMinMemory(h, RPMTAG_FILEMODES, NULL,
- (void **) &availFileModes, NULL);
+ (const void **) &availFileModes, NULL);
for (i = 0; i < availFileCount; i++) {
if (S_ISDIR(availFileModes[i])) continue;
+%define with_python_subpackage 1
+%define with_bzip2 1
+%define with_apidocs 1
+
# XXX legacy requires './' payload prefix to be omitted from rpm packages.
%define _noPayloadPrefix 1
Name: rpm
%define version 4.1
Version: %{version}
-Release: 0.1
+Release: 0.15
Group: System Environment/Base
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{version}.tar.gz
Copyright: GPL
Conflicts: patch < 2.5
%ifos linux
Prereq: gawk fileutils textutils sh-utils mktemp
-Requires: popt, bzip2 >= 0.9.0c-2
+Requires: popt
+%endif
+
+BuildRequires: db3-devel
+
# XXX glibc-2.1.92 has incompatible locale changes that affect statically
# XXX linked binaries like /bin/rpm.
%ifnarch ia64
Requires: glibc >= 2.1.92
-%endif
# XXX needed to avoid libdb.so.2 satisfied by compat/libc5 provides.
Requires: db1 = 1.85
-BuildRequires: db3-devel
+%endif
+
+# XXX Red Hat 5.2 has not bzip2 or python
+%if %{with_bzip2}
BuildRequires: bzip2 >= 0.9.0c-2
+%endif
+%if %{with_python_subpackage}
BuildRequires: python-devel >= 1.5.2
%endif
+
BuildRoot: %{_tmppath}/%{name}-root
%description
This package contains scripts and executable programs that are used to
build packages using RPM.
-%ifos linux
+%if %{with_python_subpackage}
%package python
Summary: Python bindings for apps which will manipulate RPM packages.
Group: Development/Libraries
%package -n popt
Summary: A C library for parsing command line parameters.
Group: Development/Libraries
-Version: 1.7
+Version: 1.6.1
%description -n popt
Popt is a C library for parsing command line parameters. Popt was
make
-%ifos linux
-make -C python
-%endif
-
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR="$RPM_BUILD_ROOT" install
-%ifos linux
-make DESTDIR="$RPM_BUILD_ROOT" install -C python
-%endif
+
mkdir -p $RPM_BUILD_ROOT/etc/rpm
+cat << E_O_F > $RPM_BUILD_ROOT/etc/rpm/macros.db1
+%_dbpath 1
+%_dbpath_rebuild 1
+E_O_F
{ cd $RPM_BUILD_ROOT
strip ./bin/rpm
%clean
rm -rf $RPM_BUILD_ROOT
+%pre
+if [ -f /var/lib/rpm/Packages -a -f /var/lib/rpm/packages.rpm ]; then
+# echo "
+#You have both
+# /var/lib/rpm/packages.rpm db1 format installed package headers
+# /var/lib/rpm/Packages db3 format installed package headers
+#Please remove (or at least rename) one of those files, and re-install.
+#"
+ exit 1
+fi
+
%post
-/sbin/ldconfig
%ifos linux
-if [ ! -e /etc/rpm/macros -a -e /etc/rpmrc -a -f %{__prefix}/lib/rpm/convertrpmrc.sh ]
-then
+/sbin/ldconfig
+if [ ! -e /etc/rpm/macros -a -e /etc/rpmrc -a -f %{__prefix}/lib/rpm/convertrpmrc.sh ]; then
sh %{__prefix}/lib/rpm/convertrpmrc.sh > /dev/null 2>&1
fi
-%else
-/bin/rpm --initdb
%endif
+/bin/rpm --initdb
+if [ -f /var/lib/rpm/Packages]; then
+ rm -f /etc/rpm/macros.db1
+fi
+%ifos linux
%postun -p /sbin/ldconfig
-%ifos linux
%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig
%postun -n popt -p /sbin/ldconfig
%endif
-%ifos linux
+%if %{with_python_subpackage}
%post python -p /sbin/ldconfig
%postun python -p /sbin/ldconfig
%endif
%defattr(-,root,root)
%doc RPM-PGP-KEY RPM-GPG-KEY CHANGES GROUPS doc/manual/[a-z]*
/bin/rpm
-%dir /etc/rpm
+%dir /etc/rpm
+%config(missingok) /etc/rpm/macros.db1
%{__prefix}/bin/rpm2cpio
%{__prefix}/bin/gendiff
%{__prefix}/bin/rpmdb
%{__prefix}/lib/rpm/get_magic.pl
%{__prefix}/lib/rpm/getpo.sh
%{__prefix}/lib/rpm/http.req
+%{__prefix}/lib/rpm/javadeps
%{__prefix}/lib/rpm/magic.prov
%{__prefix}/lib/rpm/magic.req
%{__prefix}/lib/rpm/perl.prov
%{__prefix}/lib/rpm/vpkg-provides.sh
%{__prefix}/lib/rpm/vpkg-provides2.sh
-%ifos linux
+%if %{with_python_subpackage}
%files python
%defattr(-,root,root)
%{__prefix}/lib/python1.5/site-packages/rpmmodule.so
%files devel
%defattr(-,root,root)
+%if %{with_apidocs}
+%doc apidocs
+%endif
%{__prefix}/include/rpm
%{__prefix}/lib/librpm.a
%{__prefix}/lib/librpm.la
%{__prefix}/include/popt.h
%changelog
-* Wed Aug 16 2000 Jeff Johnson <jbj@redhat.com>
-- start rpm 4.1 development.
+* Sun Dec 3 2000 Jeff Johnson <jbj@redhat.com>
+- improved find-{requires,provides} for aix4/hpux/irix6/osf.
+ Tim Mooney<mooney@dogbert.cc.ndsu.NoDak.edu>
+- portability: remove use of GNU make subst in lib/Makefile (Joe Orton).
+- python: bind package removal (#21274).
+- autoconfigure building python bindings.
+- autoconfigure generating rpm API doco rpm-devel package.
+
+* Thu Nov 30 2000 Jeff Johnson <jbj@redhat.com>
+- add missing headerFree for legacy signature header.
+- fix: removed packages leaked DIRINDEXES tag data.
+- reload tags added during install when loading header from rpmdb.
+- avoid brp-compress hang with both compressed/uncompressed man pages.
+
+* Tue Nov 21 2000 Jeff Johnson <jbj@redhat.com>
+- add brp-strip-shared script <rodrigob@conectiva.com.br>.
+- better item/task progress bars <rodrigob@conectiva.com.br>.
+- load headers as single contiguous region.
+- add region marker as RPM_BIN_TYPE in packages and database.
+- fix: don't headerCopy() relocateable packages if not relocating.
+- merge signatures into header after reading from package.
+
+* Mon Nov 20 2000 Jeff Johnson <jbj@redhat.com>
+- add doxygen and lclint annotations most everywhere.
+- consistent return for all signature verification.
+- use enums for almost all rpmlib #define's.
+- API: change rpmProblem typedef to pass by reference, not value.
+- don't trim leading ./ in rpmCleanPath() (#14961).
+- detect (still need to test) rdonly linux file systems.
+- check available inodes as well as blocks on mounted file systems.
+- pass rpmTransactionSet, not elements, to installBinaryPackage et al.
+- add cscope/ctags (Rodrigo Barbosa<rodrigob@conectiva.com.br>).
+- remove getMacroBody() from rpmio API.
+- add support for unzip <rodrigob@conectiva.com.br>
+
+* Thu Nov 16 2000 Jeff Johnson <jbj@redhat.com>
+- don't verify src rpm MD5 sums (yet).
+- md5 sums are little endian (no swap) so big endian needs the swap.
+
+* Wed Nov 15 2000 Jeff Johnson <jbj@redhat.com>
+- fix: segfault on exit of "rpm -qp --qf '%{#fsnames}' pkg" (#20595).
+- hpux w/o -D_OPEN_SOURCE has not h_errno.
+- verify MD5 sums of payload files when unpacking archive.
+- hide libio lossage in prototype, not API.
+- add support for SHA1 as well as MD5 message digests.
+
+* Mon Nov 13 2000 Jeff Johnson <jbj@redhat.com>
+- fix: work around for (mis-compilation?!) segfaults on signature paths.
+
+* Sun Nov 12 2000 Jeff Johnson <jbj@redhat.com>
+- fix: duplicate headerFree() on instalBinaryPackage() error return.
+
+* Sat Nov 11 2000 Jeff Johnson <jbj@redhat.com>
+- fix: runTriggers was not adding countCorrection.
+- add rpmGetRpmlibProvides() to retrieve rpmlib(...) provides
+ "Pawel A. Gajda" <mis@k2.net.pl>.
+- syntax to specify source of Requires: (PreReq: now legacy).
+- rip out rpm{get,put}text, use getpo.sh and specspo instead.
+- fine-grained Requires, remove install PreReq's from Requires db.
+
+* Wed Oct 11 2000 Jeff Johnson <jbj@redhat.com>
+- fix: rpm2cpio error check wrong on non-libio platforms.
+
+* Fri Sep 29 2000 Jeff Johnson <jbj@redhat.com>
+- fix: more (possible) xstrdup side effects.
+
+* Wed Sep 27 2000 Jeff Johnson <jbj@redhat.com>
+- bump popt version to 1.6.1.
+
+* Tue Sep 26 2000 Jeff Johnson <jbj@redhat.com>
+- fix: avoid calling getpass twice as side effect of xstrdup macro (#17672).
+- order packages using tsort, clipping PreReq:'s in dependency loops.
+- handle possible db3 dependency on -lpthread more gracefully.
+
+* Thu Sep 14 2000 Jeff Johnson <jbj@redhat.com>
+- start rpm-4.0.1.
--- /dev/null
+%define with_python_subpackage @WITH_PYTHON_SUBPACKAGE@
+%define with_bzip2 @WITH_BZIP2@
+%define with_apidocs @WITH_APIDOCS@
+
+# XXX legacy requires './' payload prefix to be omitted from rpm packages.
+%define _noPayloadPrefix 1
+
+%define __prefix /usr
+%{expand:%%define __share %(if [ -d %{__prefix}/share/man ]; then echo /share ; else echo %%{nil} ; fi)}
+
+Summary: The Red Hat package management system.
+Name: rpm
+%define version @VERSION@
+Version: %{version}
+Release: 0.15
+Group: System Environment/Base
+Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{version}.tar.gz
+Copyright: GPL
+Conflicts: patch < 2.5
+%ifos linux
+Prereq: gawk fileutils textutils sh-utils mktemp
+Requires: popt
+%endif
+
+BuildRequires: db3-devel
+
+# XXX glibc-2.1.92 has incompatible locale changes that affect statically
+# XXX linked binaries like /bin/rpm.
+%ifnarch ia64
+Requires: glibc >= 2.1.92
+# XXX needed to avoid libdb.so.2 satisfied by compat/libc5 provides.
+Requires: db1 = 1.85
+%endif
+
+# XXX Red Hat 5.2 has not bzip2 or python
+%if %{with_bzip2}
+BuildRequires: bzip2 >= 0.9.0c-2
+%endif
+%if %{with_python_subpackage}
+BuildRequires: python-devel >= 1.5.2
+%endif
+
+BuildRoot: %{_tmppath}/%{name}-root
+
+%description
+The RPM Package Manager (RPM) is a powerful command line driven
+package management system capable of installing, uninstalling,
+verifying, querying, and updating software packages. Each software
+package consists of an archive of files along with information about
+the package like its version, a description, etc.
+
+%package devel
+Summary: Development files for applications which will manipulate RPM packages.
+Group: Development/Libraries
+Requires: rpm = %{version}, popt
+
+%description devel
+This package contains the RPM C library and header files. These
+development files will simplify the process of writing programs which
+manipulate RPM packages and databases. These files are intended to
+simplify the process of creating graphical package managers or any
+other tools that need an intimate knowledge of RPM packages in order
+to function.
+
+This package should be installed if you want to develop programs that
+will manipulate RPM packages and databases.
+
+%package build
+Summary: Scripts and executable programs used to build packages.
+Group: Development/Tools
+Requires: rpm = %{version}
+
+%description build
+This package contains scripts and executable programs that are used to
+build packages using RPM.
+
+%if %{with_python_subpackage}
+%package python
+Summary: Python bindings for apps which will manipulate RPM packages.
+Group: Development/Libraries
+BuildRequires: popt >= 1.5
+Requires: popt >= 1.5
+Requires: python >= 1.5.2
+
+%description python
+The rpm-python package contains a module which permits applications
+written in the Python programming language to use the interface
+supplied by RPM (RPM Package Manager) libraries.
+
+This package should be installed if you want to develop Python
+programs that will manipulate RPM packages and databases.
+%endif
+
+%package -n popt
+Summary: A C library for parsing command line parameters.
+Group: Development/Libraries
+Version: 1.6.1
+
+%description -n popt
+Popt is a C library for parsing command line parameters. Popt was
+heavily influenced by the getopt() and getopt_long() functions, but it
+improves on them by allowing more powerful argument expansion. Popt
+can parse arbitrary argv[] style arrays and automatically set
+variables based on command line arguments. Popt allows command line
+arguments to be aliased via configuration files and includes utility
+functions for parsing arbitrary strings into argv[] arrays using
+shell-like rules.
+
+Install popt if you're a C programmer and you'd like to use its
+capabilities.
+
+%prep
+%setup -q
+
+%build
+%ifos linux
+CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix} --sysconfdir=/etc --localstatedir=/var --infodir='${prefix}%{__share}/info' --mandir='${prefix}%{__share}/man'
+%else
+CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix}
+%endif
+
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+mkdir -p $RPM_BUILD_ROOT/etc/rpm
+cat << E_O_F > $RPM_BUILD_ROOT/etc/rpm/macros.db1
+%_dbpath 1
+%_dbpath_rebuild 1
+E_O_F
+
+{ cd $RPM_BUILD_ROOT
+ strip ./bin/rpm
+ strip .%{__prefix}/bin/rpm2cpio
+}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%pre
+if [ -f /var/lib/rpm/Packages -a -f /var/lib/rpm/packages.rpm ]; then
+# echo "
+#You have both
+# /var/lib/rpm/packages.rpm db1 format installed package headers
+# /var/lib/rpm/Packages db3 format installed package headers
+#Please remove (or at least rename) one of those files, and re-install.
+#"
+ exit 1
+fi
+
+%post
+%ifos linux
+/sbin/ldconfig
+if [ ! -e /etc/rpm/macros -a -e /etc/rpmrc -a -f %{__prefix}/lib/rpm/convertrpmrc.sh ]; then
+ sh %{__prefix}/lib/rpm/convertrpmrc.sh > /dev/null 2>&1
+fi
+%endif
+/bin/rpm --initdb
+if [ -f /var/lib/rpm/Packages]; then
+ rm -f /etc/rpm/macros.db1
+fi
+
+%ifos linux
+%postun -p /sbin/ldconfig
+
+%post devel -p /sbin/ldconfig
+%postun devel -p /sbin/ldconfig
+
+%post -n popt -p /sbin/ldconfig
+%postun -n popt -p /sbin/ldconfig
+%endif
+
+%if %{with_python_subpackage}
+%post python -p /sbin/ldconfig
+%postun python -p /sbin/ldconfig
+%endif
+
+%files
+%defattr(-,root,root)
+%doc RPM-PGP-KEY RPM-GPG-KEY CHANGES GROUPS doc/manual/[a-z]*
+/bin/rpm
+%dir /etc/rpm
+%config(missingok) /etc/rpm/macros.db1
+%{__prefix}/bin/rpm2cpio
+%{__prefix}/bin/gendiff
+%{__prefix}/bin/rpmdb
+%{__prefix}/bin/rpm[eiukqv]
+%{__prefix}/bin/rpmsign
+%{__prefix}/bin/rpmquery
+%{__prefix}/bin/rpmverify
+%{__prefix}/lib/librpm.so.*
+%{__prefix}/lib/librpmio.so.*
+%{__prefix}/lib/librpmbuild.so.*
+
+%{__prefix}/lib/rpm/config.guess
+%{__prefix}/lib/rpm/config.sub
+%{__prefix}/lib/rpm/convertrpmrc.sh
+%{__prefix}/lib/rpm/macros
+%{__prefix}/lib/rpm/mkinstalldirs
+%{__prefix}/lib/rpm/rpmdb
+%{__prefix}/lib/rpm/rpm[eiukqv]
+%{__prefix}/lib/rpm/rpmpopt*
+%{__prefix}/lib/rpm/rpmrc
+
+%ifarch i386 i486 i586 i686
+%{__prefix}/lib/rpm/i[3456]86*
+%endif
+%ifarch alpha
+%{__prefix}/lib/rpm/alpha*
+%endif
+%ifarch sparc sparc64
+%{__prefix}/lib/rpm/sparc*
+%endif
+%ifarch ia64
+%{__prefix}/lib/rpm/ia64*
+%endif
+%ifarch powerpc ppc
+%{__prefix}/lib/rpm/ppc*
+%endif
+%ifarch armv3l armv4l
+%{__prefix}/lib/rpm/armv[34][lb]*
+%endif
+
+%dir %{__prefix}/src/redhat
+%dir %{__prefix}/src/redhat/BUILD
+%dir %{__prefix}/src/redhat/SPECS
+%dir %{__prefix}/src/redhat/SOURCES
+%dir %{__prefix}/src/redhat/SRPMS
+%dir %{__prefix}/src/redhat/RPMS
+%{__prefix}/src/redhat/RPMS/*
+%{__prefix}/*/locale/*/LC_MESSAGES/rpm.mo
+%{__prefix}%{__share}/man/man[18]/*.[18]*
+%lang(pl) %{__prefix}%{__share}/man/pl/man[18]/*.[18]*
+%lang(ru) %{__prefix}%{__share}/man/ru/man[18]/*.[18]*
+%lang(sk) %{__prefix}%{__share}/man/sk/man[18]/*.[18]*
+
+%files build
+%defattr(-,root,root)
+%{__prefix}/bin/rpmbuild
+%{__prefix}/lib/rpm/brp-*
+%{__prefix}/lib/rpm/check-prereqs
+%{__prefix}/lib/rpm/cpanflute
+%{__prefix}/lib/rpm/find-lang.sh
+%{__prefix}/lib/rpm/find-prov.pl
+%{__prefix}/lib/rpm/find-provides
+%{__prefix}/lib/rpm/find-provides.perl
+%{__prefix}/lib/rpm/find-req.pl
+%{__prefix}/lib/rpm/find-requires
+%{__prefix}/lib/rpm/find-requires.perl
+%{__prefix}/lib/rpm/get_magic.pl
+%{__prefix}/lib/rpm/getpo.sh
+%{__prefix}/lib/rpm/http.req
+%{__prefix}/lib/rpm/javadeps
+%{__prefix}/lib/rpm/magic.prov
+%{__prefix}/lib/rpm/magic.req
+%{__prefix}/lib/rpm/perl.prov
+%{__prefix}/lib/rpm/perl.req
+%{__prefix}/lib/rpm/rpm[bt]
+%{__prefix}/lib/rpm/rpmdiff
+%{__prefix}/lib/rpm/rpmdiff.cgi
+%{__prefix}/lib/rpm/u_pkg.sh
+%{__prefix}/lib/rpm/vpkg-provides.sh
+%{__prefix}/lib/rpm/vpkg-provides2.sh
+
+%if %{with_python_subpackage}
+%files python
+%defattr(-,root,root)
+%{__prefix}/lib/python1.5/site-packages/rpmmodule.so
+%endif
+
+%files devel
+%defattr(-,root,root)
+%if %{with_apidocs}
+%doc @WITH_APIDOCS_TARGET@
+%endif
+%{__prefix}/include/rpm
+%{__prefix}/lib/librpm.a
+%{__prefix}/lib/librpm.la
+%{__prefix}/lib/librpm.so
+%{__prefix}/lib/librpmio.a
+%{__prefix}/lib/librpmio.la
+%{__prefix}/lib/librpmio.so
+%{__prefix}/lib/librpmbuild.a
+%{__prefix}/lib/librpmbuild.la
+%{__prefix}/lib/librpmbuild.so
+
+%files -n popt
+%defattr(-,root,root)
+%{__prefix}/lib/libpopt.so.*
+%{__prefix}/*/locale/*/LC_MESSAGES/popt.mo
+%{__prefix}%{__share}/man/man3/popt.3*
+
+# XXX These may end up in popt-devel but it hardly seems worth the effort now.
+%{__prefix}/lib/libpopt.a
+%{__prefix}/lib/libpopt.la
+%{__prefix}/lib/libpopt.so
+%{__prefix}/include/popt.h
+
+%changelog
+* Sun Dec 3 2000 Jeff Johnson <jbj@redhat.com>
+- improved find-{requires,provides} for aix4/hpux/irix6/osf.
+ Tim Mooney<mooney@dogbert.cc.ndsu.NoDak.edu>
+- portability: remove use of GNU make subst in lib/Makefile (Joe Orton).
+- python: bind package removal (#21274).
+- autoconfigure building python bindings.
+- autoconfigure generating rpm API doco rpm-devel package.
+- fix: don't fdFree in rpmVerifyScript, rpmtransFree does already.
+
+* Thu Nov 30 2000 Jeff Johnson <jbj@redhat.com>
+- add missing headerFree for legacy signature header.
+- fix: removed packages leaked DIRINDEXES tag data.
+- reload tags added during install when loading header from rpmdb.
+- avoid brp-compress hang with both compressed/uncompressed man pages.
+
+* Tue Nov 21 2000 Jeff Johnson <jbj@redhat.com>
+- add brp-strip-shared script <rodrigob@conectiva.com.br>.
+- better item/task progress bars <rodrigob@conectiva.com.br>.
+- load headers as single contiguous region.
+- add region marker as RPM_BIN_TYPE in packages and database.
+- fix: don't headerCopy() relocateable packages if not relocating.
+- merge signatures into header after reading from package.
+
+* Mon Nov 20 2000 Jeff Johnson <jbj@redhat.com>
+- add doxygen and lclint annotations most everywhere.
+- consistent return for all signature verification.
+- use enums for almost all rpmlib #define's.
+- API: change rpmProblem typedef to pass by reference, not value.
+- don't trim leading ./ in rpmCleanPath() (#14961).
+- detect (still need to test) rdonly linux file systems.
+- check available inodes as well as blocks on mounted file systems.
+- pass rpmTransactionSet, not elements, to installBinaryPackage et al.
+- add cscope/ctags (Rodrigo Barbosa<rodrigob@conectiva.com.br>).
+- remove getMacroBody() from rpmio API.
+- add support for unzip <rodrigob@conectiva.com.br>
+
+* Thu Nov 16 2000 Jeff Johnson <jbj@redhat.com>
+- don't verify src rpm MD5 sums (yet).
+- md5 sums are little endian (no swap) so big endian needs the swap.
+
+* Wed Nov 15 2000 Jeff Johnson <jbj@redhat.com>
+- fix: segfault on exit of "rpm -qp --qf '%{#fsnames}' pkg" (#20595).
+- hpux w/o -D_OPEN_SOURCE has not h_errno.
+- verify MD5 sums of payload files when unpacking archive.
+- hide libio lossage in prototype, not API.
+- add support for SHA1 as well as MD5 message digests.
+
+* Mon Nov 13 2000 Jeff Johnson <jbj@redhat.com>
+- fix: work around for (mis-compilation?!) segfaults on signature paths.
+
+* Sun Nov 12 2000 Jeff Johnson <jbj@redhat.com>
+- fix: duplicate headerFree() on instalBinaryPackage() error return.
+
+* Sat Nov 11 2000 Jeff Johnson <jbj@redhat.com>
+- fix: runTriggers was not adding countCorrection.
+- add rpmGetRpmlibProvides() to retrieve rpmlib(...) provides
+ "Pawel A. Gajda" <mis@k2.net.pl>.
+- syntax to specify source of Requires: (PreReq: now legacy).
+- rip out rpm{get,put}text, use getpo.sh and specspo instead.
+- fine-grained Requires, remove install PreReq's from Requires db.
+
+* Wed Oct 11 2000 Jeff Johnson <jbj@redhat.com>
+- fix: rpm2cpio error check wrong on non-libio platforms.
+
+* Fri Sep 29 2000 Jeff Johnson <jbj@redhat.com>
+- fix: more (possible) xstrdup side effects.
+
+* Wed Sep 27 2000 Jeff Johnson <jbj@redhat.com>
+- bump popt version to 1.6.1.
+
+* Tue Sep 26 2000 Jeff Johnson <jbj@redhat.com>
+- fix: avoid calling getpass twice as side effect of xstrdup macro (#17672).
+- order packages using tsort, clipping PreReq:'s in dependency loops.
+- handle possible db3 dependency on -lpthread more gracefully.
+
+* Thu Sep 14 2000 Jeff Johnson <jbj@redhat.com>
+- start rpm-4.0.1.