OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 25-Aug-2003 11:57:07
Branch: OPENPKG_UPGRADE_RPM42 Handle: 2003082510570700
Modified files: (Branch: OPENPKG_UPGRADE_RPM42)
openpkg-src/openpkg rpm.patch.bugfix rpm.patch.feature
rpm.patch.porting rpm.patch.regen
Log:
Upgrade to real from-scratch generated and annotated RPM patch set.
Summary:
Revision Changes Path
1.4.2.2 +82 -34 openpkg-src/openpkg/rpm.patch.bugfix
1.4.2.4 +295 -318 openpkg-src/openpkg/rpm.patch.feature
1.5.2.6 +189 -232 openpkg-src/openpkg/rpm.patch.porting
1.3.2.3 +24 -6 openpkg-src/openpkg/rpm.patch.regen
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/rpm.patch.bugfix
============================================================================
$ cvs diff -u -r1.4.2.1 -r1.4.2.2 rpm.patch.bugfix
--- openpkg-src/openpkg/rpm.patch.bugfix 22 Aug 2003 10:57:07 -0000 1.4.2.1
+++ openpkg-src/openpkg/rpm.patch.bugfix 25 Aug 2003 09:57:07 -0000 1.4.2.2
@@ -1,5 +1,5 @@
##
-## rpm-4.2.1.patch.bugfix -- Annotated patch file
+## rpm.patch.bugfix -- Annotated patch file
## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
## Copyright (c) 2000-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
@@ -10,16 +10,89 @@
## 'patch' tool to upgrade those files. Each patch snippet is annotated
## with a short description.
##
-## Created on: 22-Aug-2003
+## Created on: 25-Aug-2003
##
+---------------------------------------------------------------------------
+| %setup and %patch macros are treated very special internally, but
+| make sure they at least optically can be used like any other macro
+| and especially can have leading whitespaces.
++---------------------------------------------------------------------------
+Index: build/parsePrep.c
+--- build/parsePrep.c 7 Aug 2002 14:20:45 -0000 1.1.1.10
++++ build/parsePrep.c 24 Aug 2003 13:10:15 -0000
+@@ -264,11 +296,12 @@
+ "fi");
+ } else {
+ buf[0] = '\0';
+- t = stpcpy( stpcpy(buf, "tar "), taropts);
++ t = stpcpy( stpcpy(buf, tar), taropts);
+ *t++ = ' ';
+ t = stpcpy(t, fn);
+ }
+
++ tar = _free(tar);
+ urlfn = _free(urlfn);
+ return buf;
+ }
+
++---------------------------------------------------------------------------
+| Remove access to not-existing beecrypt/ subdirectory
+| to avoid the configure script to break building.
++---------------------------------------------------------------------------
+Index: configure.ac
+--- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4
++++ configure.ac 24 Aug 2003 13:10:21 -0000
+@@ -1274,7 +1275,6 @@
+ python/rpmdb/Makefile
+ python/test/Makefile
+ ], [ echo timestamp > popt/stamp-h.in
+- echo timestamp > beecrypt/stamp-h.in
+ echo timestamp > stamp-h.in
+ ]
+ )
+
++---------------------------------------------------------------------------
+| Fix filedescriptor leakage.
++---------------------------------------------------------------------------
+Index: lib/psm.c
+--- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6
++++ lib/psm.c 24 Aug 2003 13:10:11 -0000
+@@ -940,6 +940,8 @@
+ if (sfdno > STDERR_FILENO) {
+ xx = Fclose (scriptFd);
+ }
++ } else {
++ xx = Fclose(out);
+ }
+
+ { const char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL);
+
++---------------------------------------------------------------------------
+| Fix --justdb operation by consistently use the same rootDir checks
+| RPM uses everywhere else, too.
++---------------------------------------------------------------------------
+Index: lib/psm.c
+--- lib/psm.c 5 Jun 2003 12:43:18 -0000 1.1.1.6
++++ lib/psm.c 24 Aug 2003 13:10:11 -0000
+@@ -2027,7 +2029,8 @@
+ case PSM_CHROOT_IN:
+ { const char * rootDir = rpmtsRootDir(ts);
+ /* Change root directory if requested and not already done. */
+- if (rootDir != NULL && !rpmtsChrootDone(ts) && !psm->chrootDone) {
++ if (rootDir != NULL && !(rootDir[0] == '/' && rootDir[1] == '\0')
++ && !rpmtsChrootDone(ts) && !psm->chrootDone) {
+ static int _loaded = 0;
+
+ /*
+
++---------------------------------------------------------------------------
| First, remove incorrectly introduced buffer assignment. Second, fix
-| second and subsequent "%{foo -x}" constructs. Without resetting
-| the option index only the first construct works. Third, bugfix
-| the handling of macros inside macro arguments as in "%{foo
-| bar%{quux}baz}". RPM correctly determined the pointer to the
-| terminating second(1) closing brace, but instead of passing
+| second and subsequent "%{foo -x}" constructs for non-Linux systems
+| (without resetting the option index only the first construct would
+| work). Third, bugfix the handling of macros inside macro arguments
+| as in "%{foo bar%{quux}baz}": RPM correctly determined the pointer
+| to the terminating second closing brace, but instead of passing
| this pointer to the subroutine which handles the macro argument
| construction, it passed the underlying character. This in turn
| obviously leaded to an incorrect determination of the argument end
@@ -27,8 +100,8 @@
| passing the pointer and not the underlying character.
+---------------------------------------------------------------------------
Index: rpmio/macro.c
---- rpmio/macro.c.dist 2003-08-12 09:57:01.000000000 +0200
-+++ rpmio/macro.c 2003-08-12 10:01:48.000000000 +0200
+--- rpmio/macro.c 15 May 2003 13:42:01 -0000 1.1.1.7
++++ rpmio/macro.c 24 Aug 2003 13:10:11 -0000
@@ -879,7 +879,7 @@
*/
/[EMAIL PROTECTED]@*/
@@ -102,28 +175,3 @@
se = grabArgs(mb, me, fe, grab);
} else {
addMacro(mb->mc, "**", NULL, "", mb->depth);
-+---------------------------------------------------------------------------
-| Make sure that spawned childs (%xxxx scripts) do not have
-| a *copy* of the STDOUT filedescriptor of the RPM caller open.
-+---------------------------------------------------------------------------
---- lib/psm.c.dist 2003-06-05 14:43:18.000000000 +0200
-+++ lib/psm.c 2003-08-20 18:44:24.000000000 +0200
-@@ -940,6 +940,8 @@
- if (sfdno > STDERR_FILENO) {
- xx = Fclose (scriptFd);
- }
-+ } else {
-+ xx = Fclose(out);
- }
-
- { const char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL);
-@@ -2027,7 +2029,8 @@
- case PSM_CHROOT_IN:
- { const char * rootDir = rpmtsRootDir(ts);
- /* Change root directory if requested and not already done. */
-- if (rootDir != NULL && !rpmtsChrootDone(ts) && !psm->chrootDone) {
-+ if (rootDir != NULL && !(rootDir[0] == '/' && rootDir[1] == '\0')
-+ && !rpmtsChrootDone(ts) && !psm->chrootDone) {
- static int _loaded = 0;
-
- /*
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/rpm.patch.feature
============================================================================
$ cvs diff -u -r1.4.2.3 -r1.4.2.4 rpm.patch.feature
--- openpkg-src/openpkg/rpm.patch.feature 23 Aug 2003 20:56:26 -0000 1.4.2.3
+++ openpkg-src/openpkg/rpm.patch.feature 25 Aug 2003 09:57:07 -0000 1.4.2.4
@@ -1,5 +1,5 @@
##
-## rpm-4.2.1.patch.feature -- Annotated patch file
+## rpm.patch.feature -- Annotated patch file
## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
## Copyright (c) 2000-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
@@ -10,23 +10,175 @@
## 'patch' tool to upgrade those files. Each patch snippet is annotated
## with a short description.
##
-## Created on: 22-Aug-2003
+## Created on: 25-Aug-2003
##
+---------------------------------------------------------------------------
+| Remove "tools" directory from sub-directory list because it contains
+| things we are not interested in and which cause some build trouble
+| anyway.
++---------------------------------------------------------------------------
+Index: Makefile.in
+--- Makefile.in 16 Jul 2003 17:05:42 -0000 1.1.1.23
++++ Makefile.in 24 Aug 2003 13:10:21 -0000
+@@ -268,7 +268,7 @@
+ rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c
+
+
+-SUBDIRS = intl po @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ file @WITH_DB_SUBDIR@
popt @WITH_BEECRYPT_SUBDIR@ rpmio rpmdb lib build misc @WITH_PYTHON_SUBDIR@ tools
scripts tests doc .
++SUBDIRS = intl po @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ file @WITH_DB_SUBDIR@
popt @WITH_BEECRYPT_SUBDIR@ rpmio rpmdb lib build misc @WITH_PYTHON_SUBDIR@ scripts
tests doc .
+
+ INCLUDES = \
+ -I$(top_srcdir)/build \
+
++---------------------------------------------------------------------------
+| Add support for splitted source directories, i.e., source files
+| alternatively can be placed into the .spec directory and are picked
+| up there, too.
++---------------------------------------------------------------------------
+Index: build/build.c
+--- build/build.c 4 Mar 2003 15:27:33 -0000 1.1.1.20
++++ build/build.c 24 Aug 2003 13:10:15 -0000
+@@ -33,7 +33,15 @@
+
+ for (p = spec->sources; p != NULL; p = p->next) {
+ if (! (p->flags & RPMBUILD_ISNO)) {
++#ifndef OPENPKG
+ const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
++#else
++ const char *fn = rpmGetPath("%{_specdir}/", p->source, NULL);
++ if (access(fn, F_OK) == -1) {
++ fn = _free(fn);
++ fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
++ }
++#endif
+ rc = Unlink(fn);
+ fn = _free(fn);
+ }
+@@ -42,7 +50,15 @@
+ for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+ for (p = pkg->icon; p != NULL; p = p->next) {
+ if (! (p->flags & RPMBUILD_ISNO)) {
++#ifndef OPENPKG
+ const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
++#else
++ const char *fn = rpmGetPath("%{_specdir}/", p->source, NULL);
++ if (access(fn, F_OK) == -1) {
++ fn = _free(fn);
++ fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
++ }
++#endif
+ rc = Unlink(fn);
+ fn = _free(fn);
+ }
+
++---------------------------------------------------------------------------
+| Make sure the "Provides" headers are available for querying from the
+| .src.rpm files.
++---------------------------------------------------------------------------
+Index: build/files.c
+--- build/files.c 4 Mar 2003 17:04:13 -0000 1.1.1.20
++++ build/files.c 25 Aug 2003 09:42:08 -0000
+@@ -2183,6 +2183,11 @@
+ case RPMTAG_CHANGELOGTEXT:
+ case RPMTAG_URL:
+ case HEADER_I18NTABLE:
++#ifdef OPENPKG
++ case RPMTAG_PROVIDENAME:
++ case RPMTAG_PROVIDEVERSION:
++ case RPMTAG_PROVIDEFLAGS:
++#endif
+ if (ptr)
+ (void)headerAddEntry(spec->sourceHeader, tag, type, ptr, count);
+ /[EMAIL PROTECTED]@*/ break;
+
++---------------------------------------------------------------------------
+| Add support for splitted source directories, i.e., source files
+| alternatively can be placed into the .spec directory and are picked
+| up there, too.
++---------------------------------------------------------------------------
+Index: build/files.c
+--- build/files.c 4 Mar 2003 17:04:13 -0000 1.1.1.20
++++ build/files.c 25 Aug 2003 09:42:08 -0000
+@@ -2253,8 +2258,20 @@
+ }
+
+ { const char * sfn;
++#ifndef OPENPKG
+ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
+ "%{_sourcedir}/", srcPtr->source, NULL);
++#else
++ const char *sfn2;
++ sfn2 = rpmGetPath("%{_specdir}/", srcPtr->source, NULL);
++ if (access(sfn2, F_OK) == 0)
++ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
++ "%{_specdir}/", srcPtr->source, NULL);
++ else
++ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
++ "%{_sourcedir}/", srcPtr->source, NULL);
++ sfn2 = _free(sfn2);
++#endif
+ appendLineStringBuf(sourceFiles, sfn);
+ sfn = _free(sfn);
+ }
+@@ -2263,8 +2280,20 @@
+ for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+ for (srcPtr = pkg->icon; srcPtr != NULL; srcPtr = srcPtr->next) {
+ const char * sfn;
++#ifndef OPENPKG
+ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
+ "%{_sourcedir}/", srcPtr->source, NULL);
++#else
++ const char *sfn2;
++ sfn2 = rpmGetPath("%{_specdir}/", srcPtr->source, NULL);
++ if (access(sfn2, F_OK) == 0)
++ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
++ "%{_specdir}/", srcPtr->source, NULL);
++ else
++ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
++ "%{_sourcedir}/", srcPtr->source, NULL);
++ sfn2 = _free(sfn2);
++#endif
+ appendLineStringBuf(sourceFiles, sfn);
+ sfn = _free(sfn);
+ }
+
++---------------------------------------------------------------------------
+| Add support for splitted source directories, i.e., source files
+| alternatively can be placed into the .spec directory and are picked
+| up there, too.
++---------------------------------------------------------------------------
+Index: build/parsePreamble.c
+--- build/parsePreamble.c 3 Mar 2003 20:46:34 -0000 1.1.1.13
++++ build/parsePreamble.c 24 Aug 2003 13:10:15 -0000
+@@ -366,7 +366,15 @@
+ size_t nb, iconsize;
+
+ /* XXX use rpmGenPath(rootdir, "%{_sourcedir}/", file) for icon path. */
++#ifndef OPENPKG
+ fn = rpmGetPath("%{_sourcedir}/", file, NULL);
++#else
++ fn = rpmGetPath("%{_specdir}/", file, NULL);
++ if (access(fn, F_OK) == -1) {
++ fn = _free(fn);
++ fn = rpmGetPath("%{_sourcedir}/", file, NULL);
++ }
++#endif
+
+ fd = Fopen(fn, "r.ufdio");
+ if (fd == NULL || Ferror(fd)) {
+
++---------------------------------------------------------------------------
| In OpenPKG, the RPM package contains own local versions of the
| "patch" and "tar" tools, so we cannot accept hard-coded names here.
| Instead we expand a variable to allow us to direct RPM to our tools.
-| Also we allow %setup and %patch macros whitespace-indented in %prep,
-| because both in OpenPKG we both have all scripts indented and this
-| way it is more flexible and clean.
-| Additionally add support for splitted source directories, i.e.,
-| source files alternatively can be placed into the spec directory and
-| are picked up there, too.
+| Also, we allow %setup and %patch macros whitespace-indented in
+| %prep, because both in OpenPKG we both have all scripts indented and
+| this way it is more flexible and clean.
+---------------------------------------------------------------------------
Index: build/parsePrep.c
---- build/parsePrep.c.dist 2003-08-12 10:04:17.000000000 +0200
-+++ build/parsePrep.c 2003-08-12 10:15:47.000000000 +0200
+--- build/parsePrep.c 7 Aug 2002 14:20:45 -0000 1.1.1.10
++++ build/parsePrep.c 24 Aug 2003 13:10:15 -0000
@@ -76,6 +76,7 @@
struct Source *sp;
rpmCompressedMagic compressed = COMPRESSED_NOT;
@@ -35,22 +187,6 @@
for (sp = spec->sources; sp != NULL; sp = sp->next) {
if ((sp->flags & RPMBUILD_ISPATCH) && (sp->num == c)) {
-@@ -87,7 +88,15 @@
- return NULL;
- }
-
-+#ifndef OPENPKG
- urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
-+#else
-+ urlfn = rpmGetPath("%{_specdir}/", sp->source, NULL);
-+ if (access(urlfn, F_OK) == -1) {
-+ urlfn = _free(urlfn);
-+ urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
-+ }
-+#endif
-
- args[0] = '\0';
- if (db) {
@@ -124,6 +133,10 @@
/[EMAIL PROTECTED]@*/ break;
}
@@ -141,20 +277,6 @@
t = stpcpy(t,
"\n"
"STATUS=$?\n"
-@@ -264,11 +296,12 @@
- "fi");
- } else {
- buf[0] = '\0';
-- t = stpcpy( stpcpy(buf, "tar "), taropts);
-+ t = stpcpy( stpcpy(buf, tar), taropts);
- *t++ = ' ';
- t = stpcpy(t, fn);
- }
-
-+ tar = _free(tar);
- urlfn = _free(urlfn);
- return buf;
- }
@@ -584,12 +617,15 @@
saveLines = splitString(getStringBuf(sb), strlen(getStringBuf(sb)), '\n');
/[EMAIL PROTECTED]@*/
@@ -175,14 +297,40 @@
} else {
appendLineStringBuf(spec->prep, *lines);
}
+
++---------------------------------------------------------------------------
+| Add support for splitted source directories, i.e., source files
+| alternatively can be placed into the .spec directory and are picked
+| up there, too.
++---------------------------------------------------------------------------
+Index: build/parsePrep.c
+--- build/parsePrep.c 7 Aug 2002 14:20:45 -0000 1.1.1.10
++++ build/parsePrep.c 24 Aug 2003 13:10:15 -0000
+@@ -87,7 +88,15 @@
+ return NULL;
+ }
+
++#ifndef OPENPKG
+ urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
++#else
++ urlfn = rpmGetPath("%{_specdir}/", sp->source, NULL);
++ if (access(urlfn, F_OK) == -1) {
++ urlfn = _free(urlfn);
++ urlfn = rpmGetPath("%{_sourcedir}/", sp->source, NULL);
++ }
++#endif
+
+ args[0] = '\0';
+ if (db) {
+
+---------------------------------------------------------------------------
| Not everything on a system is RPM based (for instance OpenPKG is
| just an add-on to the system), so do not assume we can just require
| a package to provide "/bin/sh".
+---------------------------------------------------------------------------
Index: build/parseScript.c
---- build/parseScript.c.dist 2003-08-12 10:17:09.000000000 +0200
-+++ build/parseScript.c 2003-08-12 10:17:10.000000000 +0200
+--- build/parseScript.c 23 Jun 2002 19:47:12 -0000 1.1.1.12
++++ build/parseScript.c 24 Aug 2003 13:10:15 -0000
@@ -261,6 +261,7 @@
stripTrailingBlanksStringBuf(sb);
p = getStringBuf(sb);
@@ -191,6 +339,54 @@
(void) addReqProv(spec, pkg->header, (tagflags | RPMSENSE_INTERP),
progArgv[0], NULL, 0);
/* Trigger script insertion is always delayed in order to */
+
++---------------------------------------------------------------------------
+| Add support for splitted source directories, i.e., source files
+| alternatively can be placed into the spec directory and are picked
+| up there, too.
++---------------------------------------------------------------------------
+Index: build/spec.c
+--- build/spec.c 4 Mar 2003 15:25:51 -0000 1.1.1.21
++++ build/spec.c 24 Aug 2003 13:10:15 -0000
+@@ -334,7 +334,15 @@
+
+ if (tag != RPMTAG_ICON) {
+ /[EMAIL PROTECTED]@*/ /* LCL: varargs needs null annotate. */
++#ifndef OPENPKG
+ const char *body = rpmGetPath("%{_sourcedir}/", p->source, NULL);
++#else
++ const char *body = rpmGetPath("%{_specdir}/", p->source, NULL);
++ if (access(body, F_OK) == -1) {
++ body = _free(body);
++ body = rpmGetPath("%{_sourcedir}/", p->source, NULL);
++ }
++#endif
+ /[EMAIL PROTECTED]@*/
+
+ sprintf(buf, "%s%d",
+
++---------------------------------------------------------------------------
+| Use "sysconfdir".
++---------------------------------------------------------------------------
+Index: configure.ac
+--- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4
++++ configure.ac 24 Aug 2003 13:10:21 -0000
+@@ -1215,12 +1216,12 @@
+ [Colon separated paths of macro files to read.])
+ AC_SUBST(MACROFILES)
+
+-LIBRPMRC_FILENAME="${RPMCONFIGDIR}/rpmrc"
++LIBRPMRC_FILENAME="${SYSCONFIGDIR}/rpmrc"
+ AC_DEFINE_UNQUOTED(LIBRPMRC_FILENAME, "$LIBRPMRC_FILENAME",
+ [Full path to rpmrc configuration file (usually /usr/lib/rpm/rpmrc)])
+ AC_SUBST(LIBRPMRC_FILENAME)
+
+-VENDORRPMRC_FILENAME="${RPMCONFIGDIR}/${RPMCANONVENDOR}/rpmrc"
++VENDORRPMRC_FILENAME="${SYSCONFIGDIR}/${RPMCANONVENDOR}/rpmrc"
+ AC_DEFINE_UNQUOTED(VENDORRPMRC_FILENAME, "$VENDORRPMRC_FILENAME",
+ [Full path to vendor rpmrc configuration file (usually
/usr/lib/rpm/vendor/rpmrc)])
+ AC_SUBST(VENDORRPMRC_FILENAME)
+
+---------------------------------------------------------------------------
| RPM has two platform id canonicalizations: hard-coded ones in the
| "rpm" program and defined ones in the rpmrc files. The hard-coded
@@ -201,9 +397,9 @@
| order to simplify the "rpmrc" files.
+---------------------------------------------------------------------------
Index: lib/rpmrc.c
---- lib/rpmrc.c.dist 2003-08-12 10:18:17.000000000 +0200
-+++ lib/rpmrc.c 2003-08-12 10:25:41.000000000 +0200
-@@ -1082,6 +1082,26 @@
+--- lib/rpmrc.c 4 Jun 2003 18:18:45 -0000 1.1.1.25
++++ lib/rpmrc.c 24 Aug 2003 13:10:21 -0000
+@@ -1082,6 +1082,32 @@
rc = uname(&un);
if (rc < 0) return;
@@ -225,12 +421,18 @@
+ }
+ strcat(un.sysname, cpR);
+ }
++ /* fix up machine hardware name containing white-space as it
++ * happens to be on Power Macs running MacOS X
++ */
++ if (!strncmp(un.machine, "Power Macintosh", 15)) {
++ sprintf(un.machine, "powerpc");
++ }
+ }
+#else /* OPENPKG */
#if !defined(__linux__)
#ifdef SNI
/* USUALLY un.sysname on sinix does start with the word "SINIX"
-@@ -1298,6 +1318,7 @@
+@@ -1298,6 +1324,7 @@
}
}
# endif
@@ -238,261 +440,69 @@
/* the uname() result goes through the arch_canon table */
canon = lookupInCanonTable(un.machine,
-+---------------------------------------------------------------------------
-| Add support for splitted source directories, i.e., source files
-| alternatively can be placed into the spec directory and are picked
-| up there, too.
-+---------------------------------------------------------------------------
-Index: build/build.c
---- build/build.c.dist 2003-08-12 10:25:49.000000000 +0200
-+++ build/build.c 2003-08-12 10:27:24.000000000 +0200
-@@ -33,7 +33,15 @@
-
- for (p = spec->sources; p != NULL; p = p->next) {
- if (! (p->flags & RPMBUILD_ISNO)) {
-+#ifndef OPENPKG
- const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
-+#else
-+ const char *fn = rpmGetPath("%{_specdir}/", p->source, NULL);
-+ if (access(fn, F_OK) == -1) {
-+ fn = _free(fn);
-+ fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
-+ }
-+#endif
- rc = Unlink(fn);
- fn = _free(fn);
- }
-@@ -42,7 +50,15 @@
- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
- for (p = pkg->icon; p != NULL; p = p->next) {
- if (! (p->flags & RPMBUILD_ISNO)) {
-+#ifndef OPENPKG
- const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
-+#else
-+ const char *fn = rpmGetPath("%{_specdir}/", p->source, NULL);
-+ if (access(fn, F_OK) == -1) {
-+ fn = _free(fn);
-+ fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
-+ }
-+#endif
- rc = Unlink(fn);
- fn = _free(fn);
- }
-
-+---------------------------------------------------------------------------
-| Add support for splitted source directories, i.e., source files
-| alternatively can be placed into the spec directory and are picked
-| up there, too. Also add support for Provides headers in source RPMs.
-+---------------------------------------------------------------------------
-Index: build/files.c
---- build/files.c.dist 2003-08-12 10:27:40.000000000 +0200
-+++ build/files.c 2003-08-12 10:35:18.000000000 +0200
-@@ -2183,6 +2183,9 @@
- case RPMTAG_CHANGELOGTEXT:
- case RPMTAG_URL:
- case HEADER_I18NTABLE:
-+ case RPMTAG_PROVIDENAME:
-+ case RPMTAG_PROVIDEVERSION:
-+ case RPMTAG_PROVIDEFLAGS:
- if (ptr)
- (void)headerAddEntry(spec->sourceHeader, tag, type, ptr, count);
- /[EMAIL PROTECTED]@*/ break;
-@@ -2253,8 +2256,20 @@
- }
-
- { const char * sfn;
-+#ifndef OPENPKG
- sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
- "%{_sourcedir}/", srcPtr->source, NULL);
-+#else
-+ const char *sfn2;
-+ sfn2 = rpmGetPath("%{_specdir}/", srcPtr->source, NULL);
-+ if (access(sfn2, F_OK) == 0)
-+ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
-+ "%{_specdir}/", srcPtr->source, NULL);
-+ else
-+ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
-+ "%{_sourcedir}/", srcPtr->source, NULL);
-+ sfn2 = _free(sfn2);
-+#endif
- appendLineStringBuf(sourceFiles, sfn);
- sfn = _free(sfn);
- }
-@@ -2263,8 +2278,20 @@
- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
- for (srcPtr = pkg->icon; srcPtr != NULL; srcPtr = srcPtr->next) {
- const char * sfn;
-+#ifndef OPENPKG
- sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
- "%{_sourcedir}/", srcPtr->source, NULL);
-+#else
-+ const char *sfn2;
-+ sfn2 = rpmGetPath("%{_specdir}/", srcPtr->source, NULL);
-+ if (access(sfn2, F_OK) == 0)
-+ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
-+ "%{_specdir}/", srcPtr->source, NULL);
-+ else
-+ sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
-+ "%{_sourcedir}/", srcPtr->source, NULL);
-+ sfn2 = _free(sfn2);
-+#endif
- appendLineStringBuf(sourceFiles, sfn);
- sfn = _free(sfn);
- }
-
-+---------------------------------------------------------------------------
-| Add support for splitted source directories, i.e., source files
-| alternatively can be placed into the spec directory and are picked
-| up there, too.
-+---------------------------------------------------------------------------
-Index: build/parsePreamble.c
---- build/parsePreamble.c.dist 2003-08-12 10:32:09.000000000 +0200
-+++ build/parsePreamble.c 2003-08-12 10:34:18.000000000 +0200
-@@ -366,7 +366,15 @@
- size_t nb, iconsize;
-
- /* XXX use rpmGenPath(rootdir, "%{_sourcedir}/", file) for icon path. */
-+#ifndef OPENPKG
- fn = rpmGetPath("%{_sourcedir}/", file, NULL);
-+#else
-+ fn = rpmGetPath("%{_specdir}/", file, NULL);
-+ if (access(fn, F_OK) == -1) {
-+ fn = _free(fn);
-+ fn = rpmGetPath("%{_sourcedir}/", file, NULL);
-+ }
-+#endif
-
- fd = Fopen(fn, "r.ufdio");
- if (fd == NULL || Ferror(fd)) {
+---------------------------------------------------------------------------
-| Add support for splitted source directories, i.e., source files
-| alternatively can be placed into the spec directory and are picked
-| up there, too.
-+---------------------------------------------------------------------------
-Index: build/spec.c
---- build/spec.c.dist 2003-08-12 10:35:48.000000000 +0200
-+++ build/spec.c 2003-08-12 10:36:20.000000000 +0200
-@@ -334,7 +334,15 @@
-
- if (tag != RPMTAG_ICON) {
- /[EMAIL PROTECTED]@*/ /* LCL: varargs needs null annotate. */
-+#ifndef OPENPKG
- const char *body = rpmGetPath("%{_sourcedir}/", p->source, NULL);
-+#else
-+ const char *body = rpmGetPath("%{_specdir}/", p->source, NULL);
-+ if (access(body, F_OK) == -1) {
-+ body = _free(body);
-+ body = rpmGetPath("%{_sourcedir}/", p->source, NULL);
-+ }
-+#endif
- /[EMAIL PROTECTED]@*/
-
- sprintf(buf, "%s%d",
-+---------------------------------------------------------------------------
-| Relocate rpmrc file to SYSCONFIGDIR which is the standard place for
-| OpenPKG configuration files
-+---------------------------------------------------------------------------
---- configure.ac.dist 2003-08-14 14:28:05.000000000 +0200
-+++ configure.ac 2003-08-18 13:44:32.000000000 +0200
-@@ -1215,12 +1216,12 @@
- [Colon separated paths of macro files to read.])
- AC_SUBST(MACROFILES)
-
--LIBRPMRC_FILENAME="${RPMCONFIGDIR}/rpmrc"
-+LIBRPMRC_FILENAME="${SYSCONFIGDIR}/rpmrc"
- AC_DEFINE_UNQUOTED(LIBRPMRC_FILENAME, "$LIBRPMRC_FILENAME",
- [Full path to rpmrc configuration file (usually /usr/lib/rpm/rpmrc)])
- AC_SUBST(LIBRPMRC_FILENAME)
-
--VENDORRPMRC_FILENAME="${RPMCONFIGDIR}/${RPMCANONVENDOR}/rpmrc"
-+VENDORRPMRC_FILENAME="${SYSCONFIGDIR}/${RPMCANONVENDOR}/rpmrc"
- AC_DEFINE_UNQUOTED(VENDORRPMRC_FILENAME, "$VENDORRPMRC_FILENAME",
- [Full path to vendor rpmrc configuration file (usually
/usr/lib/rpm/vendor/rpmrc)])
- AC_SUBST(VENDORRPMRC_FILENAME)
-+---------------------------------------------------------------------------
-| chose paths relative to prefix macro instead of using
-| a compile time constant
-+---------------------------------------------------------------------------
---- macros.in.dist 2003-07-02 21:20:52.000000000 +0200
-+++ macros.in 2003-08-14 14:14:30.000000000 +0200
-@@ -111,7 +111,7 @@
- # Path to script that creates debug symbols in a /usr/lib/debug
- # shadow tree.
- %__debug_install_post \
-- @RPMCONFIGDIR@/find-debuginfo.sh %{_builddir}/%{?buildsubdir}\
-+ %{l_prefix}/lib/openpkg/find-debuginfo.sh %{_builddir}/%{?buildsubdir}\
- %{nil}
-
- # Template for debug information sub-package.
-@@ -131,7 +131,7 @@
- %endif\
- %{nil}
-
--%_defaultdocdir %{_usr}/doc
-+%_defaultdocdir %{l_prefix}/doc
-
- # The path to the gzip executable (legacy, use %{__gzip} instead).
- %_gzipbin %{__gzip}
+| Disable "check-files" feature, because it is useless in OpenPKG
+| (we consistently use BuildRoot and our %files lists are fully
+| autogenerated) and just makes problems on bootstrapping.
++---------------------------------------------------------------------------
+Index: macros.in
+--- macros.in 2 Jul 2003 19:20:52 -0000 1.1.1.14
++++ macros.in 25 Aug 2003 09:04:54 -0000
@@ -305,7 +305,7 @@
# Returns list of unpackaged files, i.e. files in $RPM_BUILD_ROOT not packaged.
#
# Note: Disable (by commenting out) for legacy compatibility.
-%__check_files @RPMCONFIGDIR@/check-files %{buildroot}
-+#__check_files %{l_prefix}/lib/openpkg/check-files %{buildroot}
++#%__check_files @RPMCONFIGDIR@/check-files %{buildroot}
#
# Should unpackaged files in a build root terminate a build?
-@@ -329,8 +329,8 @@
- # Note: Used iff _use_internal_dependency_generator is zero.
- #%__find_provides @RPMCONFIGDIR@/rpmdeps --provides
- #%__find_requires @RPMCONFIGDIR@/rpmdeps --requires
--%__find_provides @RPMCONFIGDIR@/find-provides
--%__find_requires @RPMCONFIGDIR@/find-requires
-+%__find_provides %{l_prefix}/lib/openpkg/find-provides
-+%__find_requires %{l_prefix}/lib/openpkg/find-requires
- #%__find_conflicts ???
- #%__find_obsoletes ???
-
-@@ -338,16 +338,16 @@
- # Path to scripts to autogenerate per-interpreter package dependencies,
- #
- # Note: Used iff _use_internal_dependency_generator is non-zero. The
--# helpers are also used by @RPMCONFIGDIR@/rpmdeps {--provides|--requires).
-+# helpers are also used by %{l_prefix}/lib/openpkg/rpmdeps {--provides|--requires).
- #%__perl_provides /usr/lib/rpm/perldeps --provides
- #%__perl_requires /usr/lib/rpm/perldeps --requires
--%__perl_provides @RPMCONFIGDIR@/perl.prov
--%__perl_requires @RPMCONFIGDIR@/perl.req
-+%__perl_provides %{l_prefix}/lib/openpkg/perl.prov
-+%__perl_requires %{l_prefix}/lib/openpkg/perl.req
+
++---------------------------------------------------------------------------
+| Revert back to the old behaviour of passing to "exec" programs an
+| extra "--" argument to separate options and arguments. Additionally,
+| allow the "!#:+" constructs to be used multiple times and then each
+| time eat another argument (instead of just eating an argument once
+| and expanding this multiple times).
++---------------------------------------------------------------------------
+Index: popt/popt.c
+--- popt/popt.c 22 Aug 2002 14:17:44 -0000 1.1.1.12
++++ popt/popt.c 24 Aug 2003 13:10:16 -0000
+@@ -400,9 +400,7 @@
+ }
- #
- # fixowner, fixgroup, and fixperms are run at the end of hardcoded setup
- # These macros are necessary only for legacy compatibility, and have moved
--# to per-platform macro configuration (i.e. @RPMCONFIGDIR@/<arch>-<os>/macros)
-+# to per-platform macro configuration (i.e.
%{l_prefix}/lib/openpkg/<arch>-<os>/macros)
- #
- # Note: These are no longer enabled by default.
- #%__id_u @__ID_U@
-@@ -1099,7 +1099,7 @@
- # ...
- # %files -f %{name}.lang
- #
--%find_lang @RPMCONFIGDIR@/find-lang.sh %{buildroot}
-+%find_lang %{l_prefix}/lib/openpkg/find-lang.sh %{buildroot}
+ if (con->leftovers != NULL && con->numLeftovers > 0) {
+-#if 0
+ argv[argc++] = "--";
+-#endif
+ memcpy(argv + argc, con->leftovers, sizeof(*argv) * con->numLeftovers);
+ argc += con->numLeftovers;
+ }
+@@ -580,10 +578,8 @@
+ if (!(s[0] == '#' && s[1] == ':' && s[2] == '+'))
+ /[EMAIL PROTECTED]@*/ break;
+ /* XXX Make sure that findNextArg deletes only next arg. */
+- if (a == NULL) {
+ if ((a = findNextArg(con, 1, 1)) == NULL)
+ /[EMAIL PROTECTED]@*/ break;
+- }
+ s += 3;
- # \endverbatim
- #*/
+ alen = strlen(a);
+
+---------------------------------------------------------------------------
-| re-enable legacy CLI behaviour
+| Reactivate build mode aliases which were removed in rpm-4.1
+| (and now should be available through "rpmbuild" only).
+---------------------------------------------------------------------------
---- rpmpopt.in.dist 2003-08-18 16:31:50.000000000 +0200
-+++ rpmpopt.in 2003-08-18 16:33:18.000000000 +0200
-@@ -148,27 +148,27 @@
+Index: rpmpopt.in
+--- rpmpopt.in 24 Jan 2003 14:56:30 -0000 1.1.1.7
++++ rpmpopt.in 25 Aug 2003 09:32:31 -0000
+@@ -147,28 +147,27 @@
+ # Popt glue to preserve legacy CLI behavior.
#
# XXX popt exec parsing doesn't honor POPT_ARGFLAG_ONEDASH
- # XXX Build mode aliases, removed in rpm-4.1.
+-# XXX Build mode aliases, removed in rpm-4.1.
-#rpm exec --bp rpmb -bp
-#rpm exec --bc rpmb -bc
-#rpm exec --bi rpmb -bi
@@ -538,36 +548,3 @@
rpm exec --initdb rpmd --initdb
rpm exec --rebuilddb rpmd --rebuilddb
-+---------------------------------------------------------------------------
-| re-enable legacy POPT behaviour of passing an extra "--" argument
-| to the executed commands (which allows the commands to do easier parsing)
-+---------------------------------------------------------------------------
---- popt/popt.c.orig Thu Aug 22 18:34:48 2002
-+++ popt/popt.c Sat Aug 23 13:06:05 2003
-@@ -400,9 +400,7 @@
- }
-
- if (con->leftovers != NULL && con->numLeftovers > 0) {
--#if 0
- argv[argc++] = "--";
--#endif
- memcpy(argv + argc, con->leftovers, sizeof(*argv) * con->numLeftovers);
- argc += con->numLeftovers;
- }
-+---------------------------------------------------------------------------
-| allow special marker '!#:+' to be used multiple times instead of
-| expanding always the same argument.
-+---------------------------------------------------------------------------
---- popt/popt.c.orig Sat Aug 23 22:30:26 2003
-+++ popt/popt.c Sat Aug 23 22:45:19 2003
-@@ -578,10 +578,8 @@
- if (!(s[0] == '#' && s[1] == ':' && s[2] == '+'))
- /[EMAIL PROTECTED]@*/ break;
- /* XXX Make sure that findNextArg deletes only next arg. */
-- if (a == NULL) {
- if ((a = findNextArg(con, 1, 1)) == NULL)
- /[EMAIL PROTECTED]@*/ break;
-- }
- s += 3;
-
- alen = strlen(a);
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/rpm.patch.porting
============================================================================
$ cvs diff -u -r1.5.2.5 -r1.5.2.6 rpm.patch.porting
--- openpkg-src/openpkg/rpm.patch.porting 22 Aug 2003 21:08:46 -0000 1.5.2.5
+++ openpkg-src/openpkg/rpm.patch.porting 25 Aug 2003 09:57:07 -0000 1.5.2.6
@@ -1,5 +1,5 @@
##
-## rpm-4.2.1.patch.porting -- Annotated patch file
+## rpm.patch.porting -- Annotated patch file
## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
## Copyright (c) 2000-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
@@ -10,15 +10,90 @@
## 'patch' tool to upgrade those files. Each patch snippet is annotated
## with a short description.
##
-## Created on: 22-Aug-2003
+## Created on: 25-Aug-2003
##
+---------------------------------------------------------------------------
-| Add support for OSF1/Tru64.
+| Add support for BSD getmntinfo(3).
++---------------------------------------------------------------------------
+Index: configure.ac
+--- configure.ac 2 Jul 2003 19:20:52 -0000 1.1.1.4
++++ configure.ac 24 Aug 2003 13:10:21 -0000
+@@ -963,12 +963,13 @@
+ AC_CHECK_FUNCS(getpassphrase)
+
+ AC_CHECK_FUNC(getmntent, AC_DEFINE(HAVE_GETMNTENT, 1, [Define if you have the
getmntent() function]), [
++ AC_CHECK_FUNC(getmntinfo, AC_DEFINE(HAVE_GETMNTINFO, 1, [Define as 1 if you have
the getmntinfo() function]), [
+ AC_CHECK_FUNC(mntctl, AC_DEFINE(HAVE_MNTCTL, 1, [Define as 1 if you have
mntctl() (only aix?)]),[
+ AC_CHECK_FUNC(getmntinfo_r, AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if
you have getmntinfo_r() (only osf?)]), [
+ AC_CHECK_LIB(c_r, getmntinfo_r, [LIBS="$LIBS -lc_r";
+ AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1
if you have getmntinfo_r() (only osf?)])], [
+ AC_DEFINE([USE_GETMNTENT], 1, [Defined if getmntent replacement is
used])
+- AC_LIBOBJ(getmntent)])])])])
++ AC_LIBOBJ(getmntent)])])])])])
+
+ AC_CHECK_FUNC(lchown,
+ [__CHOWN_RHF="%{__chown} -Rhf"
+
++---------------------------------------------------------------------------
+| Not all Bourne-Shells support embedded TAB characters in
+| here-document style constructs. Insert the TAB character indirectly
+| to workaround problems.
++---------------------------------------------------------------------------
+Index: db3/configure
+--- db3/configure 18 Jan 2003 14:04:22 -0000 1.1.1.4
++++ db3/configure 24 Aug 2003 13:10:21 -0000
+@@ -15,11 +15,11 @@
+ cat Makefile.orig | sed -e '/^install[:-]/c\
+ .PHONY: listobjs\
+ listobjs:\
+- @echo $(OBJS) $(C_OBJS) \
[EMAIL PROTECTED] $(OBJS) $(C_OBJS) \
+ \
+ distdir install check:\
+ \
+-db4_install: all install_setip' > Makefile
++db4_install: all install_setip' | tr '~' ' ' > Makefile
+
+ mv db.h db.h.orig
+ cat db.h.orig | sed \
+
++---------------------------------------------------------------------------
+| Add support for BSD getmntinfo(3).
++---------------------------------------------------------------------------
+Index: lib/fs.c
+--- lib/fs.c 4 Jun 2003 18:09:43 -0000 1.1.1.13
++++ lib/fs.c 24 Aug 2003 13:10:21 -0000
+@@ -164,6 +164,12 @@
+ int nextMount = 0;
+
+ getmntinfo_r(&mounts, flags, &mntCount, &bufSize);
++# elif HAVE_GETMNTINFO
++ struct statfs * mounts = NULL;
++ int mntCount, flags = MNT_NOWAIT;
++ int nextMount = 0;
++
++ mntCount = getmntinfo(&mounts, flags);
+ # endif
+
+ filesystems = xcalloc((numAlloced + 1), sizeof(*filesystems)); /* XXX memory
leak */
+@@ -191,6 +197,9 @@
+ if (getmntent(mtab, &item)) break;
+ mntdir = item.our_mntdir;
+ # elif HAVE_GETMNTINFO_R
++ if (nextMount == mntCount) break;
++ mntdir = mounts[nextMount++].f_mntonname;
++# elif HAVE_GETMNTINFO
+ if (nextMount == mntCount) break;
+ mntdir = mounts[nextMount++].f_mntonname;
+ # endif
+
++---------------------------------------------------------------------------
+| Add support for Compaq/HP OSF1/Tru64.
+---------------------------------------------------------------------------
Index: misc/fnmatch.h
---- misc/fnmatch.h 2000/03/10 22:02:29 1.1.1.2
-+++ misc/fnmatch.h 2001/06/25 19:43:38 1.2
+--- misc/fnmatch.h 22 Feb 2002 17:12:15 -0000 1.1.1.3
++++ misc/fnmatch.h 24 Aug 2003 13:10:21 -0000
@@ -55,7 +55,7 @@
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
@@ -30,11 +105,21 @@
# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
+---------------------------------------------------------------------------
-| Add support for OSF1/Tru64.
+| Use more correct Autoconf based size_t check.
+| Add support for Compaq/HP OSF1/Tru64.
+---------------------------------------------------------------------------
Index: misc/glob.h
---- misc/glob.h 2000/03/11 20:59:30 1.1.1.3
-+++ misc/glob.h 2001/06/25 19:43:38 1.2
+--- misc/glob.h 11 Mar 2000 20:59:30 -0000 1.1.1.3
++++ misc/glob.h 24 Aug 2003 13:10:21 -0000
+@@ -46,7 +46,7 @@
+ #endif /* C++ or ANSI C. */
+
+ /* We need `size_t' for the following definitions. */
+-#ifndef __size_t
++#if !defined(__size_t) && !defined(_SIZE_T_DECLARED)
+ # if defined __GNUC__ && __GNUC__ >= 2
+ typedef __SIZE_TYPE__ __size_t;
+ # ifdef _XOPEN_SOURCE
@@ -74,7 +74,7 @@
#define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */
@@ -46,44 +131,73 @@
# define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */
+---------------------------------------------------------------------------
-| Fix for FreeBSD 5.0
-+---------------------------------------------------------------------------
-Index: misc/glob.h
---- misc/glob.h 2002/09/23 16:45:45 1.1
-+++ misc/glob.h 2002/09/23 16:46:23
-@@ -46,7 +46,7 @@
- #endif /* C++ or ANSI C. */
+| Remove hard-coded Linux'ism of linking against POSIX rt/pthread
+| libraries (is not needed even under Linux itself) and make sure the
+| build does not break by an empty argument list when iterating over
+| (the not existing) BeeCrypt objects.
++---------------------------------------------------------------------------
+Index: rpmio/Makefile.in
+--- rpmio/Makefile.in 16 Jul 2003 17:05:49 -0000 1.1.1.9
++++ rpmio/Makefile.in 24 Aug 2003 13:10:21 -0000
+@@ -288,8 +288,7 @@
+ librpmio_la_LDFLAGS = -release 4.2 \
+ @WITH_BEECRYPT_LIB@ \
+ $(top_builddir)/file/libfmagic.la \
+- @WITH_ZLIB_LIB@ \
+- -lrt -lpthread
++ @WITH_ZLIB_LIB@
- /* We need `size_t' for the following definitions. */
--#ifndef __size_t
-+#if !defined(__size_t) && !defined(_SIZE_T_DECLARED)
- # if defined __GNUC__ && __GNUC__ >= 2
- typedef __SIZE_TYPE__ __size_t;
- # ifdef _XOPEN_SOURCE
+ librpmio_la_LIBADD = $(BEECRYPTLOBJS)
+ librpmio_la_DEPENDENCIES = .created
+@@ -743,8 +742,8 @@
+ .created:
+ if test X"@WITH_BEECRYPT_SUBDIR@" != X; then \
+ ${MAKE} -C $(top_builddir)/@WITH_BEECRYPT_SUBDIR@ listobjs ; \
+- for lo in $(BEECRYPTLOBJS); do \
+- [ -f $$lo ] || $(LN_S) $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \
++ for lo in $(BEECRYPTLOBJS) ''; do \
++ [ ".$$lo" = . ] || [ -f $$lo ] || $(LN_S)
$(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \
+ done \
+ fi
+ touch $@
+
+---------------------------------------------------------------------------
-| Fix for Power Macs running MacOS X
+| Add FreeBSD support.
+---------------------------------------------------------------------------
-Index: lib/rpmrc.c
---- lib/rpmrc.c Sat Mar 15 17:32:40 2003
-+++ lib/rpmrc.c Sat Mar 15 17:35:44 2003
-@@ -1100,6 +1100,12 @@
- }
- strcat(un.sysname, cpR);
- }
-+ /* fix up machine hardware name containing white-space as it
-+ * happens to be on Power Macs running MacOS X
-+ */
-+ if (!strncmp(un.machine, "Power Macintosh", 15)) {
-+ sprintf(un.machine, "powerpc");
-+ }
- }
- #else /* OPENPKG */
- #if !defined(__linux__)
+Index: rpmio/fts.c
+--- rpmio/fts.c 18 Jan 2003 16:13:17 -0000 1.1.1.3
++++ rpmio/fts.c 25 Aug 2003 09:19:37 -0000
+@@ -34,6 +34,8 @@
+ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
+ #endif /* LIBC_SCCS and not lint */
+
++#include <limits.h>
++
+ #if defined(_LIBC)
+ #include <sys/param.h>
+ #include <include/sys/stat.h>
+@@ -58,6 +60,13 @@
+ # define dirfd(dirp) -1
+ # define _STAT_VER 0
+ # define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp))
++#endif
++#if defined(__FreeBSD__)
++# define __errno_location() (&errno)
++# define stat64 stat
++# define _STAT_VER 0
++# define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp))
++# define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
+ #endif
+ #include "system.h"
+ #include "fts.h"
+
+---------------------------------------------------------------------------
-| Avoid unconditional inclusion of system header, conflicts with GNU glob
+| Remove inclusion of system <glob.h> because RPM uses its own glob(3)
+| implementation and this can conflict with the system one.
+---------------------------------------------------------------------------
---- rpmio/rpmio.h.dist 2003-08-13 11:35:47.000000000 +0200
-+++ rpmio/rpmio.h 2003-08-13 11:36:01.000000000 +0200
+Index: rpmio/rpmio.h
+--- rpmio/rpmio.h 12 Jun 2003 18:22:18 -0000 1.1.1.7
++++ rpmio/rpmio.h 24 Aug 2003 13:10:21 -0000
@@ -9,9 +9,6 @@
#include <sys/types.h>
#include <sys/stat.h>
@@ -94,39 +208,15 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+
+---------------------------------------------------------------------------
-| Make sure that FreeBSD 5 does not complain about deprecated malloc.h
-| Add support for BSD getmntinfo(3).
-+---------------------------------------------------------------------------
-Index: system.h
---- system.h.dist 2003-08-14 14:27:16.000000000 +0200
-+++ system.h 2003-08-22 18:31:18.000000000 +0200
-@@ -256,10 +256,6 @@
- #include <err.h>
- #endif
-
--#if HAVE_MALLOC_H && !defined(__LCLINT__)
--#include <malloc.h>
--#endif
--
- /[EMAIL PROTECTED] -incondefs @*/ /* FIX: these are macros */
- /**
- */
-@@ -550,7 +546,7 @@
- #define lchown chown
- #endif
-
--#if HAVE_GETMNTINFO_R || HAVE_MNTCTL
-+#if HAVE_GETMNTINFO_R || HAVE_GETMNTINFO || HAVE_MNTCTL
- # define GETMNTENT_ONE 0
- # define GETMNTENT_TWO 0
- # if HAVE_SYS_MNTCTL_H
-+---------------------------------------------------------------------------
-| patch FTP directory function for FreeBSD, better ISO C compatibility
+| Make this whole "dirent" fiddling at least working on FreeBSD,
+| Solaris and HPUX. This certainly is a bad corner of RPM which
+| inherently leads to portability problems.
+---------------------------------------------------------------------------
Index: rpmio/rpmrpc.c
---- rpmio/rpmrpc.c.dist 2003-05-30 00:14:04.000000000 +0200
-+++ rpmio/rpmrpc.c 2003-08-22 16:03:43.000000000 +0200
+--- rpmio/rpmrpc.c 29 May 2003 22:14:04 -0000 1.1.1.8
++++ rpmio/rpmrpc.c 24 Aug 2003 13:10:21 -0000
@@ -1079,6 +1079,8 @@
return rc;
}
@@ -355,172 +445,39 @@
/* XXX TODO: EBADF errno. */
return -1;
}
+
+---------------------------------------------------------------------------
-| Add support for BSD getmntinfo(3).
-+---------------------------------------------------------------------------
-Index: config.h.in
---- config.h.in.dist 2003-08-14 14:29:31.000000000 +0200
-+++ config.h.in 2003-08-14 14:29:52.000000000 +0200
-@@ -111,6 +111,9 @@
- /* Define as 1 if you have getmntinfo_r() (only osf?) */
- #undef HAVE_GETMNTINFO_R
-
-+/* Define as 1 if you have getmntinfo() */
-+#undef HAVE_GETMNTINFO
-+
- /* Define to 1 if you have the <getopt.h> header file. */
- #undef HAVE_GETOPT_H
-
-+---------------------------------------------------------------------------
-| Add support for BSD getmntinfo(3).
-| Don't fail if optional beecrypt directory is missing
-+---------------------------------------------------------------------------
-Index: configure.ac
---- configure.ac.dist 2003-08-14 14:28:05.000000000 +0200
-+++ configure.ac 2003-08-22 15:50:42.000000000 +0200
-@@ -963,12 +963,13 @@
- AC_CHECK_FUNCS(getpassphrase)
-
- AC_CHECK_FUNC(getmntent, AC_DEFINE(HAVE_GETMNTENT, 1, [Define if you have the
getmntent() function]), [
-+ AC_CHECK_FUNC(getmntinfo, AC_DEFINE(HAVE_GETMNTINFO, 1, [Define as 1 if you have
the getmntinfo() function]), [
- AC_CHECK_FUNC(mntctl, AC_DEFINE(HAVE_MNTCTL, 1, [Define as 1 if you have
mntctl() (only aix?)]),[
- AC_CHECK_FUNC(getmntinfo_r, AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if
you have getmntinfo_r() (only osf?)]), [
- AC_CHECK_LIB(c_r, getmntinfo_r, [LIBS="$LIBS -lc_r";
- AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1
if you have getmntinfo_r() (only osf?)])], [
- AC_DEFINE([USE_GETMNTENT], 1, [Defined if getmntent replacement is
used])
-- AC_LIBOBJ(getmntent)])])])])
-+ AC_LIBOBJ(getmntent)])])])])])
-
- AC_CHECK_FUNC(lchown,
- [__CHOWN_RHF="%{__chown} -Rhf"
-@@ -1274,7 +1275,6 @@
- python/rpmdb/Makefile
- python/test/Makefile
- ], [ echo timestamp > popt/stamp-h.in
-- echo timestamp > beecrypt/stamp-h.in
- echo timestamp > stamp-h.in
- ]
- )
-+---------------------------------------------------------------------------
-| Add support for BSD getmntinfo(3).
-+---------------------------------------------------------------------------
-Index: lib/fs.c
---- lib/fs.c.dist 2003-08-14 14:25:18.000000000 +0200
-+++ lib/fs.c 2003-08-14 14:25:20.000000000 +0200
-@@ -164,6 +164,12 @@
- int nextMount = 0;
-
- getmntinfo_r(&mounts, flags, &mntCount, &bufSize);
-+# elif HAVE_GETMNTINFO
-+ struct statfs * mounts = NULL;
-+ int mntCount, flags = MNT_NOWAIT;
-+ int nextMount = 0;
-+
-+ mntCount = getmntinfo(&mounts, flags);
- # endif
-
- filesystems = xcalloc((numAlloced + 1), sizeof(*filesystems)); /* XXX memory
leak */
-@@ -193,6 +199,9 @@
- # elif HAVE_GETMNTINFO_R
- if (nextMount == mntCount) break;
- mntdir = mounts[nextMount++].f_mntonname;
-+# elif HAVE_GETMNTINFO
-+ if (nextMount == mntCount) break;
-+ mntdir = mounts[nextMount++].f_mntonname;
- # endif
-
- if (stat(mntdir, &sb)) {
---- Makefile.in.dist 2003-07-16 19:05:42.000000000 +0200
-+++ Makefile.in 2003-08-14 14:14:37.000000000 +0200
-@@ -268,7 +268,7 @@
- rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c
-
-
--SUBDIRS = intl po @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ file @WITH_DB_SUBDIR@
popt @WITH_BEECRYPT_SUBDIR@ rpmio rpmdb lib build misc @WITH_PYTHON_SUBDIR@ tools
scripts tests doc .
-+SUBDIRS = intl po @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ file @WITH_DB_SUBDIR@
popt @WITH_BEECRYPT_SUBDIR@ rpmio rpmdb lib build misc @WITH_PYTHON_SUBDIR@ scripts
tests doc .
-
- INCLUDES = \
- -I$(top_srcdir)/build \
-+---------------------------------------------------------------------------
-| don't unconditionally link with rt/pthread
-| fix for loop which breaks under Solaris sh
-+---------------------------------------------------------------------------
---- rpmio/Makefile.in.dist 2003-08-14 15:03:41.000000000 +0200
-+++ rpmio/Makefile.in 2003-08-22 12:57:34.000000000 +0200
-@@ -288,8 +288,7 @@
- librpmio_la_LDFLAGS = -release 4.2 \
- @WITH_BEECRYPT_LIB@ \
- $(top_builddir)/file/libfmagic.la \
-- @WITH_ZLIB_LIB@ \
-- -lrt -lpthread
-+ @WITH_ZLIB_LIB@
-
- librpmio_la_LIBADD = $(BEECRYPTLOBJS)
- librpmio_la_DEPENDENCIES = .created
-@@ -743,8 +742,8 @@
- .created:
- if test X"@WITH_BEECRYPT_SUBDIR@" != X; then \
- ${MAKE} -C $(top_builddir)/@WITH_BEECRYPT_SUBDIR@ listobjs ; \
-- for lo in $(BEECRYPTLOBJS); do \
-- [ -f $$lo ] || $(LN_S) $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \
-+ for lo in $(BEECRYPTLOBJS) ''; do \
-+ [ ".$$lo" = . ] || [ -f $$lo ] || $(LN_S)
$(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \
- done \
- fi
- touch $@
-+---------------------------------------------------------------------------
-| Require limits.h header for USHRT_MAX
-| Add errno and dirent handling for FreeBSD
+| Remove inclusion of ancient (and since years deprecated) <malloc.h>
+| header. This especially makes sure RPM build does not break on
+| strict platforms like FreeBSD 5.
+---------------------------------------------------------------------------
---- rpmio/fts.c.dist 2003-08-12 11:10:07.000000000 +0200
-+++ rpmio/fts.c 2003-08-12 11:17:14.000000000 +0200
-@@ -34,6 +34,8 @@
- static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
- #endif /* LIBC_SCCS and not lint */
-
-+#include <limits.h>
-+
- #if defined(_LIBC)
- #include <sys/param.h>
- #include <include/sys/stat.h>
-@@ -59,6 +61,13 @@
- # define _STAT_VER 0
- # define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp))
- #endif
-+#if defined(__FreeBSD__)
-+# define __errno_location() (&errno)
-+# define stat64 stat
-+# define _STAT_VER 0
-+# define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp))
-+# define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
-+#endif
- #include "system.h"
- #include "fts.h"
- #include "rpmio.h"
-@@ -69,7 +78,6 @@
- # define __fchdir fchdir
+Index: system.h
+--- system.h 1 Mar 2003 19:53:08 -0000 1.1.1.10
++++ system.h 24 Aug 2003 13:10:21 -0000
+@@ -256,10 +256,6 @@
+ #include <err.h>
#endif
+-#if HAVE_MALLOC_H && !defined(__LCLINT__)
+-#include <malloc.h>
+-#endif
-
- /* Largest alignment size needed, minus one.
- Usually long double is the worst case. */
- #ifndef ALIGNBYTES
+ /[EMAIL PROTECTED] -incondefs @*/ /* FIX: these are macros */
+ /**
+ */
+
+---------------------------------------------------------------------------
-| Avoid literal TAB character (disliked by some shells within here-document)
+| Add support for BSD getmntinfo(3).
+---------------------------------------------------------------------------
---- db3/configure.dist 2003-08-22 16:28:41.000000000 +0200
-+++ db3/configure 2003-08-22 16:29:28.000000000 +0200
-@@ -15,11 +15,11 @@
- cat Makefile.orig | sed -e '/^install[:-]/c\
- .PHONY: listobjs\
- listobjs:\
-- @echo $(OBJS) $(C_OBJS) \
[EMAIL PROTECTED] $(OBJS) $(C_OBJS) \
- \
- distdir install check:\
- \
--db4_install: all install_setip' > Makefile
-+db4_install: all install_setip' | tr '~' ' ' > Makefile
+Index: system.h
+--- system.h 1 Mar 2003 19:53:08 -0000 1.1.1.10
++++ system.h 24 Aug 2003 13:10:21 -0000
+@@ -550,7 +546,7 @@
+ #define lchown chown
+ #endif
- mv db.h db.h.orig
- cat db.h.orig | sed \
+-#if HAVE_GETMNTINFO_R || HAVE_MNTCTL
++#if HAVE_GETMNTINFO_R || HAVE_GETMNTINFO || HAVE_MNTCTL
+ # define GETMNTENT_ONE 0
+ # define GETMNTENT_TWO 0
+ # if HAVE_SYS_MNTCTL_H
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg/rpm.patch.regen
============================================================================
$ cvs diff -u -r1.3.2.2 -r1.3.2.3 rpm.patch.regen
--- openpkg-src/openpkg/rpm.patch.regen 22 Aug 2003 16:37:09 -0000 1.3.2.2
+++ openpkg-src/openpkg/rpm.patch.regen 25 Aug 2003 09:57:07 -0000 1.3.2.3
@@ -1,5 +1,5 @@
##
-## rpm-4.2.1.patch.regen -- Annotated patch file
+## rpm.patch.regen -- Annotated patch file
## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
## Copyright (c) 2000-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
@@ -10,16 +10,34 @@
## 'patch' tool to upgrade those files. Each patch snippet is annotated
## with a short description.
##
-## Created on: 22-Aug-2003
+## Created on: 25-Aug-2003
##
+---------------------------------------------------------------------------
-| Regenerated configure script from GNU autoconf run after
-| the patches for configure.in were applied.
+| Corresponding patches in "config.h.in" script after regeneration from
+| patched "configure.ac" with "autoheader".
++---------------------------------------------------------------------------
+Index: config.h.in
+--- config.h.in 16 Jul 2003 17:17:13 -0000 1.1.1.18
++++ config.h.in 24 Aug 2003 18:58:58 -0000
+@@ -108,6 +108,9 @@
+ /* Define if you have the getmntent() function */
+ #undef HAVE_GETMNTENT
+
++/* Define as 1 if you have the getmntinfo() function */
++#undef HAVE_GETMNTINFO
++
+ /* Define as 1 if you have getmntinfo_r() (only osf?) */
+ #undef HAVE_GETMNTINFO_R
+
+
++---------------------------------------------------------------------------
+| Corresponding patches in "configure" script after regeneration from
+| patched "configure.ac" with "autoconf".
+---------------------------------------------------------------------------
Index: configure
---- configure.dist 2003-08-20 14:32:33.000000000 +0200
-+++ configure 2003-08-22 16:09:51.000000000 +0200
+--- configure 16 Jul 2003 17:05:55 -0000 1.1.1.23
++++ configure 24 Aug 2003 18:58:35 -0000
@@ -22911,6 +22911,86 @@
else
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]