From 353e517dc9e2bfedb59bee3e467c06e400e0c8ba Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Oct 01 2008 08:43:03 +0000 Subject: - update to official 4.5.90 alpha tarball - a big pile of misc bugfixes + translation updates - isa-macro generation fix for ppc (#464754) - avoid pulling in pile of perl dependencies for an unused script - handle both "invalid argument" and clear env version mismatch on posttrans --- diff --git a/.cvsignore b/.cvsignore index edd462f..c299f66 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -rpm-4.5.90.git8461.tar.bz2 +rpm-4.5.90.git8514.tar.bz2 diff --git a/rpm-4.5.90-archivesize.patch b/rpm-4.5.90-archivesize.patch deleted file mode 100644 index 3c70aa4..0000000 --- a/rpm-4.5.90-archivesize.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit 9068da47a912a6983a12d1024a118c16bcb2a057 -Author: Panu Matilainen -Date: Wed Aug 13 09:43:41 2008 +0300 - - Unbreak payload size tag generation on ppc (rhbz#458817) - -diff --git a/build/pack.c b/build/pack.c -index 41756bb..9891ae8 100644 ---- a/build/pack.c -+++ b/build/pack.c -@@ -496,13 +496,16 @@ rpmRC writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, - td.tag = payloadtag; - td.count = 1; - if (payloadtag == RPMSIGTAG_PAYLOADSIZE) { -+ rpm_off_t asize = csa->cpioArchiveSize; - td.type = RPM_INT32_TYPE; -- td.data = (rpm_off_t *) &csa->cpioArchiveSize; -+ td.data = &asize; -+ headerPut(sig, &td, HEADERPUT_DEFAULT); - } else { -+ rpm_loff_t asize = csa->cpioArchiveSize; - td.type = RPM_INT64_TYPE; -- td.data = (rpm_loff_t *) &csa->cpioArchiveSize; -+ td.data = &asize; -+ headerPut(sig, &td, HEADERPUT_DEFAULT); - } -- headerPut(sig, &td, HEADERPUT_DEFAULT); - } - - /* Reallocate the signature into one contiguous region. */ diff --git a/rpm-4.5.90-cpio-hardlink.patch b/rpm-4.5.90-cpio-hardlink.patch deleted file mode 100644 index cb3af5d..0000000 --- a/rpm-4.5.90-cpio-hardlink.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit 5c71ced2da7d99b870a07a83dd8f7e8d1f1b7e4b -Author: Jindrich Novy -Date: Wed Sep 10 15:04:57 2008 +0200 - - Don't generate broken cpio in case of hardlink pointing on softlink - - thanks to Pixel - -diff --git a/lib/fsm.c b/lib/fsm.c -index 0905e3c..8175f82 100644 ---- a/lib/fsm.c -+++ b/lib/fsm.c -@@ -1573,7 +1573,7 @@ static int fsmStage(FSM_t fsm, fileStage stage) - fsm->postpone = XFA_SKIPPING(fsm->action); - if (fsm->goal == FSM_PKGINSTALL || fsm->goal == FSM_PKGBUILD) { - /* FIX: saveHardLink can modify fsm */ -- if (!S_ISDIR(st->st_mode) && st->st_nlink > 1) -+ if (S_ISREG(st->st_mode) && st->st_nlink > 1) - fsm->postpone = saveHardLink(fsm); - } - break; -@@ -1599,7 +1599,7 @@ static int fsmStage(FSM_t fsm, fileStage stage) - if (fsm->goal == FSM_PKGBUILD) { - if (fsm->fflags & RPMFILE_GHOST) /* XXX Don't if %ghost file. */ - break; -- if (!S_ISDIR(st->st_mode) && st->st_nlink > 1) { -+ if (S_ISREG(st->st_mode) && st->st_nlink > 1) { - hardLink_t li, prev; - - if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break; -@@ -1699,7 +1699,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break; - if (!IS_DEV_LOG(fsm->path)) - rc = CPIOERR_UNKNOWN_FILETYPE; - } -- if (!S_ISDIR(st->st_mode) && st->st_nlink > 1) { -+ if (S_ISREG(st->st_mode) && st->st_nlink > 1) { - fsm->li->createdPath = fsm->li->linkIndex; - rc = fsmMakeLinks(fsm); - } -@@ -1743,7 +1743,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break; - case FSM_FINI: - if (!fsm->postpone && fsm->commit) { - if (fsm->goal == FSM_PKGINSTALL) -- rc = ((!S_ISDIR(st->st_mode) && st->st_nlink > 1) -+ rc = ((S_ISREG(st->st_mode) && st->st_nlink > 1) - ? fsmCommitLinks(fsm) : fsmNext(fsm, FSM_COMMIT)); - if (fsm->goal == FSM_PKGCOMMIT) - rc = fsmNext(fsm, FSM_COMMIT); diff --git a/rpm-4.5.90-macro-args.patch b/rpm-4.5.90-macro-args.patch deleted file mode 100644 index 8c3e601..0000000 --- a/rpm-4.5.90-macro-args.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/rpmio/macro.c b/rpmio/macro.c -index ad1f94a..1e292c6 100644 ---- a/rpmio/macro.c -+++ b/rpmio/macro.c -@@ -780,7 +780,7 @@ static const char * - grabArgs(MacroBuf mb, const rpmMacroEntry me, const char * se, - const char * lastc) - { -- const char *opts, *o, *ret; -+ const char *opts, *o; - char *args = NULL; - ARGV_t argv = NULL; - int argc = 0; -@@ -792,13 +792,10 @@ grabArgs(MacroBuf mb, const rpmMacroEntry me, const char * se, - - /* - * Make a copy of se up to lastc string that we can pass to argvSplit(). -- * Append the results to main argv, save return value. -+ * Append the results to main argv. - */ - { ARGV_t av = NULL; - char *s = xcalloc((lastc-se)+1, sizeof(*s)); -- -- /* XXX expandMacro() expects next \0 which can be beyond lastc */ -- ret = strchr(se, '\0'); - memcpy(s, se, (lastc-se)); - - argvSplit(&av, s, " "); -@@ -884,7 +881,7 @@ grabArgs(MacroBuf mb, const rpmMacroEntry me, const char * se, - - exit: - argvFree(argv); -- return ret; -+ return *lastc ? lastc + 1 : lastc; - } - - /** diff --git a/rpm-4.5.90-macrofix.patch b/rpm-4.5.90-macrofix.patch deleted file mode 100644 index 10522b9..0000000 --- a/rpm-4.5.90-macrofix.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 3b9636cd69b81b6e23331bb797c0fdde79e97316 -Author: Jindrich Novy -Date: Thu Aug 14 13:08:09 2008 +0200 - - Accept numerical characters in macro expansion (related to rhbz#456103) - -diff --git a/build/expression.c b/build/expression.c -index 970ec05..83a4021 100644 ---- a/build/expression.c -+++ b/build/expression.c -@@ -272,7 +272,7 @@ static int rdToken(ParseState state) - char *temp; - size_t ts; - -- for (ts=1; p[ts] && (risalpha(p[ts]) || p[ts] == '_'); ts++); -+ for (ts=1; p[ts] && (risalnum(p[ts]) || p[ts] == '_'); ts++); - temp = xmalloc(ts+1); - memcpy(temp, p, ts); - p += ts-1; diff --git a/rpm-4.5.90-noarch-subpackages.patch b/rpm-4.5.90-noarch-subpackages.patch deleted file mode 100644 index 4c84ca2..0000000 --- a/rpm-4.5.90-noarch-subpackages.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/build/parsePreamble.c b/build/parsePreamble.c -index d168978..988b615 100644 ---- a/build/parsePreamble.c -+++ b/build/parsePreamble.c -@@ -632,19 +632,32 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, - case RPMTAG_EXCLUSIVEOS: - addOrAppendListEntry(spec->buildRestrictions, tag, field); - break; -- case RPMTAG_BUILDARCHS: -- if ((rc = poptParseArgvString(field, -- &(spec->BACount), -- &(spec->BANames)))) { -+ case RPMTAG_BUILDARCHS: { -+ int BACount; -+ const char **BANames = NULL; -+ if ((rc = poptParseArgvString(field, &BACount, &BANames))) { - rpmlog(RPMLOG_ERR, - _("line %d: Bad BuildArchitecture format: %s\n"), - spec->lineNum, spec->line); - return RPMRC_FAIL; - } -- if (!spec->BACount) -+ if (spec->packages == pkg) { -+ spec->BACount = BACount; -+ spec->BANames = BANames; -+ } else { -+ if (BACount != 1 || strcmp(BANames[0], "noarch")) { -+ rpmlog(RPMLOG_ERR, -+ _("line %d: Only noarch subpackages are supported: %s\n"), -+ spec->lineNum, spec->line); -+ BANames = _free(BANames); -+ return RPMRC_FAIL; -+ } -+ headerAddEntry(pkg->header, RPMTAG_ARCH, RPM_STRING_TYPE, "noarch", 1); -+ } -+ if (!BACount) - spec->BANames = _free(spec->BANames); - break; -- -+ } - default: - rpmlog(RPMLOG_ERR, _("Internal error: Bogus tag %d\n"), tag); - return RPMRC_FAIL; diff --git a/rpm-4.5.90-patch-P.patch b/rpm-4.5.90-patch-P.patch deleted file mode 100644 index e5f2d30..0000000 --- a/rpm-4.5.90-patch-P.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit c4fa73c573f63d2e2b53e75d25feafbf65ebf671 -Author: Jindrich Novy -Date: Wed Sep 24 18:39:43 2008 +0200 - - Don't treat %patch numberless if -P parameter is present - -diff --git a/build/parsePrep.c b/build/parsePrep.c -index 2be0693..bfef325 100644 ---- a/build/parsePrep.c -+++ b/build/parsePrep.c -@@ -431,7 +431,10 @@ static rpmRC doPatchMacro(rpmSpec spec, const char *line) - if (! strchr(" \t\n", line[6])) { - rasprintf(&buf, "%%patch -P %s", line + 6); - } else { -- rasprintf(&buf, "%%patch -P %d %s", INT_MAX, line + 6); /* INT_MAX denotes not numbered %patch */ -+ if (strstr(line+6, " -P") == NULL) -+ rasprintf(&buf, "%%patch -P %d %s", INT_MAX, line + 6); /* INT_MAX denotes not numbered %patch */ -+ else -+ buf = strdup(line); /* it is not numberless patch because -P is present */ - } - poptParseArgvString(buf, &argc, &argv); - free(buf); diff --git a/rpm-4.5.90-patches.patch b/rpm-4.5.90-patches.patch deleted file mode 100644 index 303865d..0000000 --- a/rpm-4.5.90-patches.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit ce1db5af7036df54a21abab9a5d70b06a821fff4 -Author: Jindrich Novy -Date: Sat Sep 6 15:30:40 2008 +0200 - - Fail hard if patch isn't found (rhbz#461347) - -diff --git a/build/parsePrep.c b/build/parsePrep.c -index fcc28c8..2be0693 100644 ---- a/build/parsePrep.c -+++ b/build/parsePrep.c -@@ -538,7 +538,7 @@ int parsePrep(rpmSpec spec) - } - if (res && !spec->force) { - /* fixup from RPMRC_FAIL do*Macro() codes for now */ -- res = PART_ERROR; -+ nextPart = PART_ERROR; - goto exit; - } - } diff --git a/rpm-4.5.90-ppc-isa.patch b/rpm-4.5.90-ppc-isa.patch new file mode 100644 index 0000000..1d7d7d8 --- /dev/null +++ b/rpm-4.5.90-ppc-isa.patch @@ -0,0 +1,48 @@ +commit 65e06b20130da895fda8e3698a7ebe18e14d13ca +Author: Panu Matilainen +Date: Wed Oct 1 10:06:27 2008 +0300 + + Tweaks to how ISA-macros are generated (rhbz#464754) + - for ppc and sparc, move the check for 64bit version first and use a + wildcards to cover more field automatically + +diff --git a/installplatform b/installplatform +index bb5933d..8861df0 100755 +--- a/installplatform ++++ b/installplatform +@@ -80,13 +80,13 @@ for SUBST in $SUBSTS ; do + ISANAME= + ISABITS= + case "${ARCH}" in +- sparc|sparcv8|sparcv9*) ++ sparc64*) + ISANAME=sparc +- ISABITS=32 ++ ISABITS=64 + ;; +- sparc64|sparc64v) ++ sparc*) + ISANAME=sparc +- ISABITS=64 ++ ISABITS=32 + ;; + s390) + ISANAME=s390 +@@ -96,13 +96,13 @@ for SUBST in $SUBSTS ; do + ISANAME=s390 + ISABITS=64 + ;; +- ppc) ++ ppc64*) + ISANAME=ppc +- ISABITS=32 ++ ISABITS=64 + ;; +- ppc64) ++ ppc*) + ISANAME=ppc +- ISABITS=64 ++ ISABITS=32 + ;; + i?86|pentium?|athlon|geode) + ISANAME=x86 diff --git a/rpm-4.5.90-rpmbuild-dirs.patch b/rpm-4.5.90-rpmbuild-dirs.patch deleted file mode 100644 index 63454ba..0000000 --- a/rpm-4.5.90-rpmbuild-dirs.patch +++ /dev/null @@ -1,48 +0,0 @@ -commit ff7bfd9a32d672f8582ea334ee351af8c32229ad -Author: Jindrich Novy -Date: Mon Sep 1 14:35:34 2008 +0200 - - Create directory structure for rpmbuild prior to build if it doesn't exist - - creates all needed directories that rpmbuild uses for input and output - -diff --git a/build.c b/build.c -index faa09c5..83aaf20 100644 ---- a/build.c -+++ b/build.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - - #include "build.h" - #include "debug.h" -@@ -253,6 +254,28 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba) - goto exit; - } - -+ /* Be sure all required directories exist, attempt to create them if not */ -+ { -+ char *_topdir = rpmGenPath(rpmtsRootDir(ts), "%{_topdir}", ""), -+ *_builddir = rpmGenPath(rpmtsRootDir(ts), "%{_builddir}", ""), -+ *_buildrootdir = rpmGenPath(rpmtsRootDir(ts), "%{_buildrootdir}", ""), -+ *_sourcedir = rpmGenPath(rpmtsRootDir(ts), "%{_sourcedir}", ""), -+ *_rpmdir = rpmGenPath(rpmtsRootDir(ts), "%{_rpmdir}", ""), -+ *_specdir = rpmGenPath(rpmtsRootDir(ts), "%{_specdir}", ""), -+ *_srcrpmdir = rpmGenPath(rpmtsRootDir(ts), "%{_srcrpmdir}", ""); -+ -+ if ( rpmMkdirPath(_topdir, "_topdir") || -+ rpmMkdirPath(_builddir, "_builddir") || -+ rpmMkdirPath(_buildrootdir, "_buildrootdir") || -+ rpmMkdirPath(_sourcedir, "_sourcedir") || -+ rpmMkdirPath(_rpmdir, "_rpmdir") || -+ rpmMkdirPath(_specdir, "_specdir") || -+ rpmMkdirPath(_srcrpmdir, "_srcrpmdir") -+ ) { -+ goto exit; -+ } -+ } -+ - if (buildSpec(ts, spec, buildAmount, ba->noBuild)) { - goto exit; - } diff --git a/rpm-4.5.90-segfault.patch b/rpm-4.5.90-segfault.patch deleted file mode 100644 index 1d1cf4a..0000000 --- a/rpm-4.5.90-segfault.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up rpm-4.5.90.git8461/lib/rpmps.c.460146 rpm-4.5.90.git8461/lib/rpmps.c ---- rpm-4.5.90.git8461/lib/rpmps.c.460146 2008-06-30 14:50:49.000000000 +0200 -+++ rpm-4.5.90.git8461/lib/rpmps.c 2008-08-26 19:35:30.000000000 +0200 -@@ -319,7 +319,7 @@ char * rpmProblemString(const rpmProblem - break; - case RPMPROB_DISKSPACE: - rc = rasprintf(&buf, -- _("installing package %s needs %ld%cB on the %s filesystem"), -+ _("installing package %s needs %llu%cB on the %s filesystem"), - pkgNEVR, - prob->num1 > (1024*1024) - ? (prob->num1 + 1024 * 1024 - 1) / (1024 * 1024) diff --git a/rpm-4.5.90-topdir.patch b/rpm-4.5.90-topdir.patch deleted file mode 100644 index bb94c8b..0000000 --- a/rpm-4.5.90-topdir.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit b16df5b3089e36cf0bd697177983dcae11b849ec -Author: Jindrich Novy -Date: Mon Sep 1 14:31:33 2008 +0200 - - Create _topdir if it doesn't exist when installing SRPM - - otherwise creating _sourcedir and _specdir fails - -diff --git a/lib/psm.c b/lib/psm.c -index d4bea69..046964b 100644 ---- a/lib/psm.c -+++ b/lib/psm.c -@@ -231,6 +231,7 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, - { - int scareMem = 1; - rpmfi fi = NULL; -+ char * _topdir = NULL; - char * _sourcedir = NULL; - char * _specdir = NULL; - char * specFile = NULL; -@@ -335,6 +336,13 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, - } - } - -+ _topdir = rpmGenPath(rpmtsRootDir(ts), "%{_topdir}", ""); -+ rpmrc = rpmMkdirPath(_topdir, "_topdir"); -+ if (rpmrc) { -+ rpmrc = RPMRC_FAIL; -+ goto exit; -+ } -+ - _sourcedir = rpmGenPath(rpmtsRootDir(ts), "%{_sourcedir}", ""); - rpmrc = rpmMkdirPath(_sourcedir, "_sourcedir"); - if (rpmrc) { diff --git a/rpm.spec b/rpm.spec index ad55df9..1b41a69 100644 --- a/rpm.spec +++ b/rpm.spec @@ -10,7 +10,7 @@ %define rpmhome /usr/lib/rpm %define rpmver 4.5.90 -%define snapver git8461 +%define snapver git8514 %define srcver %{rpmver}.%{snapver} %define bdbver 4.5.20 @@ -18,7 +18,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: 0.%{snapver}.8 +Release: 0.%{snapver}.1 Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2 @@ -33,16 +33,7 @@ Patch2: rpm-4.5.90-gstreamer-provides.patch Patch100: rpm-4.6.x-no-pkgconfig-reqs.patch # Already in upstream, remove on next snapshot update -Patch200: rpm-4.5.90-archivesize.patch -Patch201: rpm-4.5.90-noarch-subpackages.patch -Patch202: rpm-4.5.90-segfault.patch -Patch203: rpm-4.5.90-macrofix.patch -Patch204: rpm-4.5.90-patches.patch -Patch205: rpm-4.5.90-topdir.patch -Patch206: rpm-4.5.90-rpmbuild-dirs.patch -Patch207: rpm-4.5.90-cpio-hardlink.patch -Patch208: rpm-4.5.90-macro-args.patch -Patch209: rpm-4.5.90-patch-P.patch +Patch200: rpm-4.5.90-ppc-isa.patch # These are not yet upstream Patch300: rpm-4.5.90-posttrans.patch @@ -174,16 +165,7 @@ that will manipulate RPM packages and databases. %patch2 -p1 -b .gstreamer-prov %patch100 -p1 -b .pkgconfig-deps -%patch200 -p1 -b .archivesize -%patch201 -p1 -b .noarch-subpackages -%patch202 -p1 -b .segfault -%patch203 -p1 -b .macrofix -%patch204 -p1 -b .patches -%patch205 -p1 -b .topdir -%patch206 -p1 -b .rpmbuild-dirs -%patch207 -p1 -b .cpio-hardlink -%patch208 -p1 -b .macro-args -%patch209 -p1 -b .patch-P +%patch200 -p1 -b .ppc-isa # needs a bit of upstream love first... #%patch300 -p1 -b .posttrans @@ -194,9 +176,11 @@ ln -s db-%{bdbver} db %build %if %{without int_bdb} -export CPPFLAGS=-I%{_includedir}/db%{bdbver} -export LDFLAGS=-L%{_libdir}/db%{bdbver} +CPPFLAGS=-I%{_includedir}/db%{bdbver} +LDFLAGS=-L%{_libdir}/db%{bdbver} %endif +CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`" +export CPPFLAGS LDFLAGS %configure \ %{!?with_int_bdb: --with-external-db} \ @@ -236,6 +220,9 @@ done find $RPM_BUILD_ROOT -name "*.la"|xargs rm -f +# avoid dragging in tonne of perl libs for an unused script +chmod 0644 $RPM_BUILD_ROOT/%{rpmhome}/perldeps.pl + %clean rm -rf $RPM_BUILD_ROOT @@ -250,7 +237,7 @@ dbstat=/usr/lib/rpm/rpmdb_stat dbstat=%{_bindir}/db45_stat %endif if [ -x "$dbstat" ]; then - if "$dbstat" -e -h /var/lib/rpm 2>&1 | grep -q "Invalid argument"; then + if "$dbstat" -e -h /var/lib/rpm 2>&1 | grep -q "doesn't match environment version \| Invalid argument"; then rm -f /var/lib/rpm/__db.* fi fi @@ -362,6 +349,13 @@ exit 0 %doc doc/librpm/html/* %changelog +* Wed Oct 01 2008 Panu Matilainen +- update to official 4.5.90 alpha tarball +- a big pile of misc bugfixes + translation updates +- isa-macro generation fix for ppc (#464754) +- avoid pulling in pile of perl dependencies for an unused script +- handle both "invalid argument" and clear env version mismatch on posttrans + * Thu Sep 25 2008 Jindrich Novy - don't treat %patch numberless if -P parameter is present (#463942) diff --git a/sources b/sources index 52c946c..93801c3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d1521d8974b4d7f091fb950005de3c03 rpm-4.5.90.git8461.tar.bz2 +5bb759ffc690dfc9e1456391fa001447 rpm-4.5.90.git8514.tar.bz2