From e296089e4d0313b368f78b581487e5a0faff48ab Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 21 Jul 2009 10:15:33 +0000 Subject: [PATCH] - update to 4.7.1, drop merged patches - fix source url --- .cvsignore | 2 +- rpm-4.7.0-dwarf3.patch | 158 ---------- rpm-4.7.0-findlang-kde3.patch | 19 -- rpm-4.7.0-fp-findbyfile.patch | 105 ------- rpm-4.7.0-fp-symlink.patch | 26 -- rpm-4.7.0-hardlink-sizes.patch | 98 ------ rpm-4.7.0-osgideps.patch | 531 --------------------------------- rpm-4.7.0-prtsig.patch | 29 -- rpm-4.7.0-python-altnevr.patch | 39 --- rpm.spec | 27 +- sources | 2 +- 11 files changed, 9 insertions(+), 1027 deletions(-) delete mode 100644 rpm-4.7.0-dwarf3.patch delete mode 100644 rpm-4.7.0-findlang-kde3.patch delete mode 100644 rpm-4.7.0-fp-findbyfile.patch delete mode 100644 rpm-4.7.0-fp-symlink.patch delete mode 100644 rpm-4.7.0-hardlink-sizes.patch delete mode 100644 rpm-4.7.0-osgideps.patch delete mode 100644 rpm-4.7.0-prtsig.patch delete mode 100644 rpm-4.7.0-python-altnevr.patch diff --git a/.cvsignore b/.cvsignore index 3eb00bc..6394026 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -rpm-4.7.0.tar.bz2 +rpm-4.7.1.tar.bz2 diff --git a/rpm-4.7.0-dwarf3.patch b/rpm-4.7.0-dwarf3.patch deleted file mode 100644 index b00aaac..0000000 --- a/rpm-4.7.0-dwarf3.patch +++ /dev/null @@ -1,158 +0,0 @@ -commit 71a7dd8b7a2df677214c18473eac661ea38fb649 -Author: Panu Matilainen -Date: Tue Jun 16 13:52:43 2009 +0300 - - Add debugedit support for DWARF-3 (RhBug:505774) - - patch from Jakub Jelinek - -diff --git a/tools/debugedit.c b/tools/debugedit.c -index f42b34a..b9db7db 100644 ---- a/tools/debugedit.c -+++ b/tools/debugedit.c -@@ -1,4 +1,4 @@ --/* Copyright (C) 2001, 2002, 2003, 2005, 2007 Red Hat, Inc. -+/* Copyright (C) 2001, 2002, 2003, 2005, 2007, 2009 Red Hat, Inc. - Written by Alexander Larsson , 2002 - Based on code by Jakub Jelinek , 2001. - -@@ -88,6 +88,7 @@ static uint32_t (*do_read_32) (unsigned char *ptr); - static void (*write_32) (unsigned char *ptr, GElf_Addr val); - - static int ptr_size; -+static int cu_version; - - static inline uint16_t - buf_read_ule16 (unsigned char *data) -@@ -213,16 +214,18 @@ static struct - #define DEBUG_LINE 2 - #define DEBUG_ARANGES 3 - #define DEBUG_PUBNAMES 4 --#define DEBUG_MACINFO 5 --#define DEBUG_LOC 6 --#define DEBUG_STR 7 --#define DEBUG_FRAME 8 --#define DEBUG_RANGES 9 -+#define DEBUG_PUBTYPES 5 -+#define DEBUG_MACINFO 6 -+#define DEBUG_LOC 7 -+#define DEBUG_STR 8 -+#define DEBUG_FRAME 9 -+#define DEBUG_RANGES 10 - { ".debug_info", NULL, NULL, 0, 0, 0 }, - { ".debug_abbrev", NULL, NULL, 0, 0, 0 }, - { ".debug_line", NULL, NULL, 0, 0, 0 }, - { ".debug_aranges", NULL, NULL, 0, 0, 0 }, - { ".debug_pubnames", NULL, NULL, 0, 0, 0 }, -+ { ".debug_pubtypes", NULL, NULL, 0, 0, 0 }, - { ".debug_macinfo", NULL, NULL, 0, 0, 0 }, - { ".debug_loc", NULL, NULL, 0, 0, 0 }, - { ".debug_str", NULL, NULL, 0, 0, 0 }, -@@ -302,7 +305,7 @@ no_memory: - } - if (*slot != NULL) - { -- error (0, 0, "%s: Duplicate DWARF-2 abbreviation %d", dso->filename, -+ error (0, 0, "%s: Duplicate DWARF abbreviation %d", dso->filename, - t->entry); - free (t); - htab_delete (h); -@@ -322,7 +325,7 @@ no_memory: - form = read_uleb128 (ptr); - if (form == 2 || form > DW_FORM_indirect) - { -- error (0, 0, "%s: Unknown DWARF-2 DW_FORM_%d", dso->filename, form); -+ error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename, form); - htab_delete (h); - return NULL; - } -@@ -332,7 +335,7 @@ no_memory: - } - if (read_uleb128 (ptr) != 0) - { -- error (0, 0, "%s: DWARF-2 abbreviation does not end with 2 zeros", -+ error (0, 0, "%s: DWARF abbreviation does not end with 2 zeros", - dso->filename); - htab_delete (h); - return NULL; -@@ -484,7 +487,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off, char *comp_dir, int phase) - } - - value = read_16 (ptr); -- if (value != 2) -+ if (value != 2 && value != 3) - { - error (0, 0, "%s: DWARF version %d unhandled", dso->filename, - value); -@@ -829,7 +832,12 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase) - - switch (form) - { -- case DW_FORM_ref_addr: /* ptr_size in DWARF 2, offset in DWARF 3 */ -+ case DW_FORM_ref_addr: -+ if (cu_version == 2) -+ ptr += ptr_size; -+ else -+ ptr += 4; -+ break; - case DW_FORM_addr: - ptr += ptr_size; - break; -@@ -881,7 +889,7 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase) - assert (len < UINT_MAX); - break; - default: -- error (0, 0, "%s: Unknown DWARF-2 DW_FORM_%d", dso->filename, -+ error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename, - form); - return NULL; - } -@@ -1178,11 +1186,11 @@ edit_dwarf2 (DSO *dso) - return 1; - } - -- value = read_16 (ptr); -- if (value != 2) -+ cu_version = read_16 (ptr); -+ if (cu_version != 2 && cu_version != 3) - { - error (0, 0, "%s: DWARF version %d unhandled", dso->filename, -- value); -+ cu_version); - return 1; - } - -@@ -1192,7 +1200,7 @@ edit_dwarf2 (DSO *dso) - if (debug_sections[DEBUG_ABBREV].data == NULL) - error (0, 0, "%s: .debug_abbrev not present", dso->filename); - else -- error (0, 0, "%s: DWARF-2 CU abbrev offset too large", -+ error (0, 0, "%s: DWARF CU abbrev offset too large", - dso->filename); - return 1; - } -@@ -1202,14 +1210,14 @@ edit_dwarf2 (DSO *dso) - ptr_size = read_1 (ptr); - if (ptr_size != 4 && ptr_size != 8) - { -- error (0, 0, "%s: Invalid DWARF-2 pointer size %d", -+ error (0, 0, "%s: Invalid DWARF pointer size %d", - dso->filename, ptr_size); - return 1; - } - } - else if (read_1 (ptr) != ptr_size) - { -- error (0, 0, "%s: DWARF-2 pointer size differs between CUs", -+ error (0, 0, "%s: DWARF pointer size differs between CUs", - dso->filename); - return 1; - } -@@ -1227,7 +1235,7 @@ edit_dwarf2 (DSO *dso) - t = htab_find_with_hash (abbrev, &tag, tag.entry); - if (t == NULL) - { -- error (0, 0, "%s: Could not find DWARF-2 abbreviation %d", -+ error (0, 0, "%s: Could not find DWARF abbreviation %d", - dso->filename, tag.entry); - htab_delete (abbrev); - return 1; diff --git a/rpm-4.7.0-findlang-kde3.patch b/rpm-4.7.0-findlang-kde3.patch deleted file mode 100644 index d74a21d..0000000 --- a/rpm-4.7.0-findlang-kde3.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit acfe923bf21a4402a48b6e357a53a398b107f0b3 -Author: Ville Skyttä -Date: Sun Apr 12 21:39:50 2009 +0300 - - Fix --with-kde with KDE3 (rhbz#466009). - -diff --git a/scripts/find-lang.sh b/scripts/find-lang.sh -index 2dd9e0d..bb25b31 100755 ---- a/scripts/find-lang.sh -+++ b/scripts/find-lang.sh -@@ -138,7 +138,7 @@ if [ x"$KDE3_HTML" != x -a -d "$TOP_DIR$KDE3_HTML" ]; then - find $TOP_DIR$KDE3_HTML -type d|sed ' - s:'"$TOP_DIR"':: - '"$NO_ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\):: --'"$NO_ALL_NAME$KDE"'s:\(.*/HTML\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3: -+'"$NO_ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3: - '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: - '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: - s:^\([^%].*\):: diff --git a/rpm-4.7.0-fp-findbyfile.patch b/rpm-4.7.0-fp-findbyfile.patch deleted file mode 100644 index af3f69b..0000000 --- a/rpm-4.7.0-fp-findbyfile.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff --git a/lib/fprint.c b/lib/fprint.c -index e57ba20..c56b0e5 100644 ---- a/lib/fprint.c -+++ b/lib/fprint.c -@@ -37,8 +37,10 @@ fingerPrintCache fpCacheCreate(int sizeHint) - - fingerPrintCache fpCacheFree(fingerPrintCache cache) - { -- cache->ht = rpmFpEntryHashFree(cache->ht); -- free(cache); -+ if (cache) { -+ cache->ht = rpmFpEntryHashFree(cache->ht); -+ free(cache); -+ } - return NULL; - } - -diff --git a/lib/rpmdb.c b/lib/rpmdb.c -index 439a974..d76630e 100644 ---- a/lib/rpmdb.c -+++ b/lib/rpmdb.c -@@ -1098,20 +1098,20 @@ int rpmdbVerify(const char * prefix) - static int rpmdbFindByFile(rpmdb db, const char * filespec, - DBT * key, DBT * data, dbiIndexSet * matches) - { -- char * dirName; -+ char * dirName = NULL; - const char * baseName; -- fingerPrintCache fpc; -+ fingerPrintCache fpc = NULL; - fingerPrint fp1; - dbiIndex dbi = NULL; - DBC * dbcursor; - dbiIndexSet allMatches = NULL; - dbiIndexItem rec = NULL; - unsigned int i; -- int rc; -+ int rc = -2; /* assume error */ - int xx; - - *matches = NULL; -- if (filespec == NULL) return -2; -+ if (filespec == NULL) return rc; /* nothing alloced yet */ - - if ((baseName = strrchr(filespec, '/')) != NULL) { - size_t len = baseName - filespec + 1; -@@ -1123,11 +1123,7 @@ static int rpmdbFindByFile(rpmdb db, const char * filespec, - baseName = filespec; - } - if (baseName == NULL) -- return -2; -- -- fpc = fpCacheCreate(20); -- fp1 = fpLookup(fpc, dirName, baseName, 1); -- free(dirName); -+ goto exit; - - dbi = dbiOpen(db, RPMTAG_BASENAMES, 0); - if (dbi != NULL) { -@@ -1154,16 +1150,14 @@ static int rpmdbFindByFile(rpmdb db, const char * filespec, - } else - rc = -2; - -- if (rc) { -- allMatches = dbiFreeIndexSet(allMatches); -- fpc = fpCacheFree(fpc); -- return rc; -- } -+ if (rc || allMatches == NULL) goto exit; - - *matches = xcalloc(1, sizeof(**matches)); - rec = dbiIndexNewItem(0, 0); -+ fpc = fpCacheCreate(allMatches->count); -+ fp1 = fpLookup(fpc, dirName, baseName, 1); -+ - i = 0; -- if (allMatches != NULL) - while (i < allMatches->count) { - struct rpmtd_s bn, dn, di; - const char ** baseNames, ** dirNames; -@@ -1216,16 +1210,19 @@ static int rpmdbFindByFile(rpmdb db, const char * filespec, - } - - rec = _free(rec); -- allMatches = dbiFreeIndexSet(allMatches); -- -- fpc = fpCacheFree(fpc); -+ fpCacheFree(fpc); - - if ((*matches)->count == 0) { - *matches = dbiFreeIndexSet(*matches); -- return 1; -+ rc = 1; -+ } else { -+ rc = 0; - } - -- return 0; -+exit: -+ dbiFreeIndexSet(allMatches); -+ free(dirName); -+ return rc; - } - - /* XXX python/upgrade.c, install.c, uninstall.c */ diff --git a/rpm-4.7.0-fp-symlink.patch b/rpm-4.7.0-fp-symlink.patch deleted file mode 100644 index 071f4ec..0000000 --- a/rpm-4.7.0-fp-symlink.patch +++ /dev/null @@ -1,26 +0,0 @@ -commit 1b9e6d7f48a68fd677c70d04c9a6bb4274cf7b9f -Author: Florian Festi -Date: Tue Jun 16 17:37:40 2009 +0200 - - Fix Segfault for to be installed symlinks pointing to existing locations - fixes rhbz#505777 - -diff --git a/lib/fprint.c b/lib/fprint.c -index d32eec1..e57ba20 100644 ---- a/lib/fprint.c -+++ b/lib/fprint.c -@@ -311,10 +311,10 @@ void fpLookupSubdir(rpmFpHash symlinks, rpmFpHash fphash, fingerPrintCache fpc, - /* setup current_fp for the new path */ - found = 1; - current_fp = *fp; -- if (!fp->subDir) { -- lensubDir = 0; -- currentsubdir = endsubdir = NULL; -- break; -+ if (fp->subDir == NULL) { -+ /* directory exists - no need to look for symlinks */ -+ rpmFpHashAddEntry(fphash, fp, ffi); -+ return; - } - lensubDir = strlen(fp->subDir); - currentsubdir = xstrdup(fp->subDir); diff --git a/rpm-4.7.0-hardlink-sizes.patch b/rpm-4.7.0-hardlink-sizes.patch deleted file mode 100644 index 487b86d..0000000 --- a/rpm-4.7.0-hardlink-sizes.patch +++ /dev/null @@ -1,98 +0,0 @@ -commit cdfd0934841d4eccc26d7da7c35b23e6e9f76a9c -Author: Panu Matilainen -Date: Fri May 29 09:02:44 2009 +0300 - - Fix calculation of hardlinked files (RhBug:503020) - - regression from commit 899dfb58927ec6e91014773430824462f4d0002e, - size of hardlinked file set is the size of one file of the set - - add isHardLink() internal helper to avoid a copy-paste code - -diff --git a/build/files.c b/build/files.c -index ef60ae2..98abedd 100644 ---- a/build/files.c -+++ b/build/files.c -@@ -981,6 +981,14 @@ static int isDoc(FileList fl, const char * fileName) - return 0; - } - -+static int isHardLink(FileListRec flp, FileListRec tlp) -+{ -+ return ((S_ISREG(flp->fl_mode) && S_ISREG(tlp->fl_mode)) && -+ ((flp->fl_nlink > 1) && (flp->fl_nlink == tlp->fl_nlink)) && -+ (flp->fl_ino == tlp->fl_ino) && -+ (flp->fl_dev == tlp->fl_dev)); -+} -+ - /** - * Verify that file attributes scope over hardlinks correctly. - * If partial hardlink sets are possible, then add tracking dependency. -@@ -999,14 +1007,18 @@ static int checkHardLinks(FileList fl) - - for (j = i + 1; j < fl->fileListRecsUsed; j++) { - jlp = fl->fileList + j; -- if (!S_ISREG(jlp->fl_mode)) -- continue; -- if (ilp->fl_nlink != jlp->fl_nlink) -- continue; -- if (ilp->fl_ino != jlp->fl_ino) -- continue; -- if (ilp->fl_dev != jlp->fl_dev) -- continue; -+ if (isHardLink(ilp, jlp)) { -+ return 1; -+ } -+ } -+ } -+ return 0; -+} -+ -+static int seenHardLink(FileList fl, FileListRec flp) -+{ -+ for (FileListRec ilp = fl->fileList; ilp < flp; ilp++) { -+ if (isHardLink(flp, ilp)) { - return 1; - } - } -@@ -1147,9 +1159,12 @@ static void genCpioListAndHeader(FileList fl, - rpm_off_t rsize32 = (rpm_off_t)flp->fl_size; - headerPutUint32(h, RPMTAG_FILESIZES, &rsize32, 1); - } -- /* Excludes and dupes have been filtered out by now */ -- if (S_ISREG(flp->fl_mode)) -- totalFileSize += flp->fl_size; -+ /* Excludes and dupes have been filtered out by now. */ -+ if (S_ISREG(flp->fl_mode)) { -+ if (flp->fl_nlink == 1 || !seenHardLink(fl, flp)) { -+ totalFileSize += flp->fl_size; -+ } -+ } - - /* - * For items whose size varies between systems, always explicitly -@@ -1492,25 +1507,7 @@ static rpmRC addFile(FileList fl, const char * diskPath, - flp->specdFlags = fl->currentSpecdFlags; - flp->verifyFlags = fl->currentVerifyFlags; - -- /* Hard links need be counted only once. */ -- if (S_ISREG(flp->fl_mode) && flp->fl_nlink > 1) { -- FileListRec ilp; -- for (i = 0; i < fl->fileListRecsUsed; i++) { -- ilp = fl->fileList + i; -- if (!S_ISREG(ilp->fl_mode)) -- continue; -- if (flp->fl_nlink != ilp->fl_nlink) -- continue; -- if (flp->fl_ino != ilp->fl_ino) -- continue; -- if (flp->fl_dev != ilp->fl_dev) -- continue; -- break; -- } -- } else -- i = fl->fileListRecsUsed; -- -- if (!(flp->flags & RPMFILE_EXCLUDE) && S_ISREG(flp->fl_mode) && i >= fl->fileListRecsUsed) { -+ if (!(flp->flags & RPMFILE_EXCLUDE) && S_ISREG(flp->fl_mode)) { - /* - * XXX Simple and stupid check for now, this needs to be per-payload - * format check once we have other payloads than good 'ole cpio. diff --git a/rpm-4.7.0-osgideps.patch b/rpm-4.7.0-osgideps.patch deleted file mode 100644 index da71377..0000000 --- a/rpm-4.7.0-osgideps.patch +++ /dev/null @@ -1,531 +0,0 @@ -commit 7417cd283a3641ee62b282ae36c5d2d7df349d04 -Author: Panu Matilainen -Date: Thu Jun 18 13:06:42 2009 +0300 - - Pile of OSGi dependency generator fixes from Alphonse Van Assche (ticket #39) - - use Temp perl module to provide temp dir - - re-enable deps solving in Require-Bundle, Import-Package, Export-Package - OSGI properties - - remove uses bundle of Export-Package OSGI property - - use RPM '>=' as version operator to match OSGI '=' - - remove all .0 at the end of the version string - - typo fixes - -diff --git a/scripts/osgideps.pl b/scripts/osgideps.pl -index 7b02016..971dade 100644 ---- a/scripts/osgideps.pl -+++ b/scripts/osgideps.pl -@@ -1,203 +1,357 @@ - #!/usr/bin/perl -- -+# -+# osgideps.pl -- Analyze dependencies of OSGi bundles. -+# -+# Kyu Lee -+# Alphonse Van Assche -+# -+# $Id: osgideps.pl,v 1.0 2009/06/08 12:12:12 mej Exp $ -+# - - use Cwd; - use Getopt::Long; -- -+use File::Temp qw/ tempdir /; - - $cdir = getcwd(); --$TEMPDIR="/tmp"; --$MANIFEST_NAME="META-INF/MANIFEST.MF"; -- -+$TEMPDIR = tempdir( CLEANUP => 1 ); -+$MANIFEST_NAME = "META-INF/MANIFEST.MF"; - - # prepare temporary directory --if (! (-d $TEMPDIR)) { -- if (($_ = `mkdir $TEMPDIR`) != 0) {exit 1;} -- elsif (! (-w $TEMPDIR) && (-x $TEMPDIR)) {exit 1;} -+if ( !( -d $TEMPDIR ) ) { -+ if ( ( $_ = `mkdir $TEMPDIR` ) != 0 ) { exit 1; } -+ elsif ( !( -w $TEMPDIR ) && ( -x $TEMPDIR ) ) { exit 1; } - } - - # parse options --my ($show_provides, $show_requires); -- --my $result = GetOptions("provides" => \$show_provides, -- "requires" => \$show_requires); -- --exit(1) if (not $result); -- -- -+my ( $show_provides, $show_requires, $show_system_bundles, $debug ); -+my $result = GetOptions( -+ "provides" => \$show_provides, -+ "requires" => \$show_requires, -+ "system" => \$show_system_bundles, -+ "debug" => \$debug -+); -+exit(1) if ( not $result ); - -+# run selected function - @allfiles = ; -- - if ($show_provides) { -- do_provides(@allfiles); -+ getProvides(@allfiles); - } -- - if ($show_requires) { -- do_requires(@allfiles); -+ getRequires(@allfiles); -+} -+if ($show_system_bundles) { -+ getSystemBundles(@allfiles); - } -- -- - exit(0); - -- -- --sub do_provides { -- --foreach $file (@_) { -- -- next if -f $file && -r $file && !-l $file; -- $file =~ s/[^[:print:]]//g; -- if ($file =~ m/$MANIFEST_NAME$/ || $file =~ m/\.jar$/ ) { -- if ($file =~ m/\.jar$/) { -- # if this jar contains MANIFEST.MF file -- if (`jar tf $file | grep -e \^$MANIFEST_NAME` eq "$MANIFEST_NAME\n") { -- # extract MANIFEST.MF file from jar to temporary directory -- chdir $TEMPDIR; -- `jar xf $file $MANIFEST_NAME`; -- open(MANIFEST, "$MANIFEST_NAME"); -- chdir $cdir; -+# this function print provides of OSGi aware files -+sub getProvides { -+ foreach $file (@_) { -+ chomp($file); -+ # we don't follow symlinks for provides -+ next if -f $file && -r $file && -l $file; -+ $file =~ s/[^[:print:]]//g; -+ if ( $file =~ m/$MANIFEST_NAME$/ || $file =~ m/\.jar$/ ) { -+ if ( $file =~ m/\.jar$/ ) { -+ if ( `jar tf $file | grep -e \^$MANIFEST_NAME` eq "$MANIFEST_NAME\n" ) { -+ # extract MANIFEST.MF file from jar to temporary directory -+ chdir $TEMPDIR; -+ `jar xf $file $MANIFEST_NAME`; -+ open( MANIFEST, "$MANIFEST_NAME" ); -+ chdir $cdir; -+ } -+ } else { -+ open( MANIFEST, "$file" ); - } -- } else { -- open(MANIFEST, "$file"); -- } -- my $bundleName = ""; -- my $version = ""; -- # parse bundle name and version -- while() { -- # get rid of non-print chars (some manifest files contain weird chars) -- s/[^[:print]]//g; -- if (m/(^Bundle-SymbolicName: )((\w|\.)+)(\;*)(.*\n)/) { -- $bundleName = $2; -- } -- if (m/(^Bundle-Version: )(.*)/) { -- $version = $2; -- $version = fixVersion($version); -+ my $bundleName = ""; -+ my $version = ""; -+ # parse Bundle-SymbolicName, Bundle-Version and Export-Package attributes -+ while () { -+ # get rid of non-print chars (some manifest files contain weird chars) -+ s/[^[:print]]//g; -+ if ( m/(^(Bundle-SymbolicName): )(.*)$/ ) { -+ $bundleName = "$3" . "\n"; -+ while () { -+ if ( m/^[[:upper:]][[:alpha:]]+-[[:upper:]][[:alpha:]]+: .*/ ) { -+ $len = length $_; -+ seek MANIFEST, $len * -1, 1; -+ last; -+ } -+ $bundleName .= "$_"; -+ } -+ $bundleName =~ s/\s+//g; -+ $bundleName =~ s/;.*//g; -+ } -+ if ( m/(^Bundle-Version: )(.*)/ ) { -+ $version = $2; -+ } -+ if ( m/(^(Export-Package): )(.*)$/ ) { -+ my $bunlist = "$3" . "\n"; -+ while () { -+ if ( m/^[[:upper:]][[:alpha:]]+-[[:upper:]][[:alpha:]]+: .*/ ) { -+ $len = length $_; -+ seek MANIFEST, $len * -1, 1; -+ last; -+ } -+ $bunlist .= "$_"; -+ } -+ push @bundlelist, parsePkgString($bunlist, $file); -+ } - } -- if (m/(^(Export-Package): )(.*)$/) { -- my $bunlist = "$3"."\n"; -- while() { -- if (m/^[[:upper:]][[:alpha:]]+-[[:upper:]][[:alpha:]]+: .*/) { -- $len = length $_; -- seek MANIFEST, $len*-1 , 1; -- last; -- } -- $bunlist.="$_"; -+ -+ # skip this jar if no bundle name exists -+ if ( !$bundleName eq "" ) { -+ if ( !$version eq "" ) { -+ $version = parseVersion($version); -+ push @bundlelist, { FILE => "$file", NAME => "$bundleName", VERSION => "$version" }; -+ } else { -+ push @bundlelist, { FILE => "$file", NAME => "$bundleName", VERSION => "" }; - } -- push @bundlelist, parsePkgString($bunlist); - } -- } -- # skip this jar if no bundle name exists -- if (! $bundleName eq "") { -- if (! $version eq "") { -- print "osgi(".$bundleName.") = ".$version."\n"; -- } else { -- print "osgi(".$bundleName.")\n"; -- } -- } -+ } - } --} --$list = ""; --for $bundle (@bundlelist) { -- $list .= "osgi(".$bundle->{NAME}.")".$bundle->{VERSION}."\n"; --} --# For now we dont take Require-Bundle AND Import-Package in account --#print $list; -+ if ( !$debug ) { @bundlelist = prepareOSGiBundlesList(@bundlelist); } -+ $list = ""; -+ for $bundle (@bundlelist) { -+ if ( !$debug ) { -+ $list .= "osgi(" . $bundle->{NAME} . ")" . $bundle->{VERSION} . "\n"; -+ } else { -+ $list .= $bundle->{FILE} . " osgi(" . $bundle->{NAME} . ")" . $bundle->{VERSION} . "\n"; -+ } -+ } -+ print $list; - } - -- --sub do_requires { -- -+# this function print requires of OSGi aware files -+sub getRequires { - foreach $file (@_) { -- -- next if -f $file && -r $file; -+ next if (-f $file && -r $file); -+ # we explicitly requires symlinked jars -+ if (-l $file) { -+ $file = readlink $file; -+ if ( !$file eq "" ) { -+ print "$file" . "\n"; -+ } -+ next; -+ } - $file =~ s/[^[:print:]]//g; -- if ($file =~ m/$MANIFEST_NAME$/ || $file =~ m/\.jar$/ ) { -- if ($file =~ m/\.jar$/) { -- # if this jar contains MANIFEST.MF file -- if (`jar tf $file | grep -e \^$MANIFEST_NAME` eq "$MANIFEST_NAME\n") { -+ if ( $file =~ m/$MANIFEST_NAME$/ || $file =~ m/\.jar$/ ) { -+ if ( $file =~ m/\.jar$/ ) { -+ if ( `jar tf $file | grep -e \^$MANIFEST_NAME` eq "$MANIFEST_NAME\n" ) { - # extract MANIFEST.MF file from jar to temporary directory -- chdir $TEMPDIR; -- `jar xf $file $MANIFEST_NAME`; -- open(MANIFEST, "$MANIFEST_NAME"); -+ chdir $TEMPDIR; -+ `jar xf $file $MANIFEST_NAME`; -+ open( MANIFEST, "$MANIFEST_NAME" ); - chdir $cdir; - } -- } else { -- open(MANIFEST, "$file"); -+ } else { -+ open( MANIFEST, "$file" ); -+ } -+ while () { -+ if ( m/(^(Require-Bundle|Import-Package): )(.*)$/ ) { -+ my $bunlist = "$3" . "\n"; -+ while () { -+ if (m/^[[:upper:]][[:alpha:]]+-[[:upper:]][[:alpha:]]+: .*/ ) { -+ $len = length $_; -+ seek MANIFEST, $len * -1, 1; -+ last; -+ } -+ $bunlist .= "$_"; -+ } -+ push @bundlelist, parsePkgString($bunlist, $file); -+ } -+ # we also explicitly require symlinked jars define by -+ # Bundle-ClassPath attribut -+ if ( m/(^(Bundle-ClassPath): )(.*)$/ ) { -+ $bunclp = "$3" . "\n"; -+ while () { -+ if ( m/^[[:upper:]][[:alpha:]]+-[[:upper:]][[:alpha:]]+: .*/ ) { -+ $len = length $_; -+ seek MANIFEST, $len * -1, 1; -+ last; -+ } -+ $bunclp .= "$_"; -+ } -+ $bunclp =~ s/\ //g; -+ $bunclp =~ s/\n//g; -+ $bunclp =~ s/[^[:print:]]//g; -+ $dir = `dirname $file`; -+ $dir =~ s/\n//g; -+ @jars = split /,/, $bunclp; -+ for $jarfile (@jars) { -+ $jarfile = "$dir\/\.\.\/$jarfile"; -+ $jarfile = readlink $jarfile; -+ if ( !$jarfile eq "" ) { -+ print "$jarfile" . "\n"; -+ } -+ } -+ } - } -- my %reqcomp = (); -- while() { -- if (m/(^(Require-Bundle|Import-Package): )(.*)$/) { -- my $bunlist = "$3"."\n"; -- while() { -- if (m/^[[:upper:]][[:alpha:]]+-[[:upper:]][[:alpha:]]+: .*/) { -- $len = length $_; -- seek MANIFEST, $len*-1 , 1; -- last; -- } -- $bunlist.="$_"; -- } -- push @bundlelist, parsePkgString($bunlist); -- } -- } -+ } - } -+ if ( !$debug ) { @bundlelist = prepareOSGiBundlesList(@bundlelist); } -+ $list = ""; -+ for $bundle (@bundlelist) { -+ # replace '=' by '>=' because qualifiers are set on provides -+ # but not on requires. -+ $bundle->{VERSION} =~ s/\ =/\ >=/g; -+ if ( !$debug ) { -+ $list .= "osgi(" . $bundle->{NAME} . ")" . $bundle->{VERSION} . "\n"; -+ } else { -+ $list .= $bundle->{FILE} . " osgi(" . $bundle->{NAME} . ")" . $bundle->{VERSION} . "\n"; -+ } -+ } -+ print $list; - } - --$list = ""; --for $bundle (@bundlelist) { -- $list .= "osgi(".$bundle->{NAME}.")".$bundle->{VERSION}."\n"; --} --# For now we dont take Require-Bundle AND Import-Package in account --#print $list; -+# this function print system bundles of OSGi profile files. -+sub getSystemBundles { -+ foreach $file (@_) { -+ if ( -r $file && -r $file ) { -+ print "'$file' file not found or cannot be read!"; -+ next; -+ } else { -+ open( PROFILE, "$file" ); -+ while () { -+ if ( $file =~ m/\.profile$/ ) { -+ if (m/(^(org\.osgi\.framework\.system\.packages)[=|\ ]+)(.*)$/) { -+ $syspkgs = "$3" . "\n"; -+ while () { -+ if (m/^[a-z]/) { -+ $len = length $_; -+ seek MANIFEST, $len * -1, 1; -+ last; -+ } -+ $syspkgs .= "$_"; -+ } -+ $syspkgs =~ s/\s+//g; -+ $syspkgs =~ s/\\//g; -+ @bundles = split /,/, $syspkgs; -+ foreach $bundle (@bundles) { -+ print "osgi(" . $bundle . ")\n"; -+ } -+ } -+ } -+ } -+ } -+ } - } - - sub parsePkgString { -- my $bunstr = $_[0]; -- my @return; -+ my $bunstr = $_[0]; -+ my $file = $_[1]; -+ my @return; - $bunstr =~ s/ //g; -- $bunstr =~ s/\n//g; -- $bunstr =~ s/[^[:print:]]//g; -- $bunstr =~ s/("[[:alnum:]|\-|\_|\.|\(|\)|\[|\]]+)(,)([[:alnum:]|\-|\_|\.|\(|\)|\[|\]]+")/$1 $3/g; -- @reqcomp = split /,/g, $bunstr; -- foreach $reqelement (@reqcomp) { -- @reqelementfrmnt = split /;/g, $reqelement; -- $name=""; -- $version=""; -- $name = $reqelementfrmnt[0]; -- for $i (1 .. $#reqelementfrmnt) { -- if ($reqelementfrmnt[$i] =~ m/(^(bundle-|)version=")(.*)(")/){ -- $version = $3; -- last; -- } -- } -- $version = parseVersion($version); -- $version = fixVersion($version); -- # dirty fix for provides that contain " char -+ $bunstr =~ s/\n//g; -+ $bunstr =~ s/[^[:print:]]//g; -+ $bunstr =~ s/("[[:alnum:]|\-|\_|\.|\(|\)|\[|\]]+)(,)([[:alnum:]|\-|\_|\.|\(|\)|\[|\]]+")/$1 $3/g; -+ # remove uses bundle from Export-Package attribute -+ $bunstr =~ s/uses:="[[:alnum:]|\-|\_|\.|\(|\)|\[|\]|,]+"//g; -+ # remove optional dependencies -+ $bunstr =~ s/,.*;resolution:=optional//g; -+ # remove x-friends -+ $bunstr =~ s/;x-friends:="[[:alnum:]|\-|\_|\.|\(|\)|\[|\]|,]+"//g; -+ # remove signatures -+ $bunstr =~ s/Name:.*SHA1-Digest:.*//g; -+ @reqcomp = split /,/, $bunstr; -+ foreach $reqelement (@reqcomp) { -+ @reqelementfrmnt = split /;/, $reqelement; -+ $name = ""; -+ $version = ""; -+ $name = $reqelementfrmnt[0]; - $name =~ s/\"//g; -- push @return, { NAME=>"$name", VERSION=>"$version"}; -- } -- -- return @return; -+ # ignore 'system.bundle'. -+ # see http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/porting/3.3/incompatibilities.html -+ next if ( $name =~ m/^system\.bundle$/ ); -+ for $i ( 1 .. $#reqelementfrmnt ) { -+ if ( $reqelementfrmnt[$i] =~ m/(^(bundle-|)version=")(.*)(")/ ) { -+ $version = $3; -+ last; -+ } -+ } -+ $version = parseVersion($version); -+ push @return, { FILE => "$file", NAME => "$name", VERSION => "$version" }; -+ } -+ return @return; - } - - sub parseVersion { -- my $ver = $_[0]; -- if ($ver eq "") { return "";} -- if ($ver =~ m/(^[\[|\(])(.+)\ (.+)([\]|\)]$)/) { -- # FIXME: The right rpm match of osgi version [1,2) seems to be <= 2 -- # but when you look at the requires >= look more permssive/correct? -- ($1 eq "\[") ? return " >= $2" : return " > $2"; -- } else { -- return " = $ver"; -- } -- return $ver; -+ my $ver = $_[0]; -+ if ( $ver eq "" ) { return ""; } -+ if ( $ver =~ m/(^[\[|\(])(.+)\ (.+)([\]|\)]$)/ ) { -+ if ( $1 eq "\[" ) { -+ $ver = " >= $2"; -+ } else { -+ $ver = " > $2"; -+ } -+ } else { -+ $ver = " = $ver"; -+ } -+ # we always return a full OSGi version to be able to match 1.0 -+ # and 1.0.0 as equal in RPM. -+ ( $major, $minor, $micro, $qualifier ) = split( '\.', $ver ); -+ if ( !defined($minor) || !$minor ) { -+ $minor = 0; -+ } -+ if ( !defined($micro) || !$micro ) { -+ $micro = 0; -+ } -+ if ( !defined($qualifier) || !$qualifier ) { -+ $qualifier = ""; -+ } else { -+ $qualifier = "." . $qualifier; -+ } -+ $ver = $major . "." . $minor . "." . $micro . $qualifier; -+ return $ver; - } - --sub fixVersion { -- my $version = $_[0]; -- # remove version qualifier. -- $version =~ s/\.v.[0-9]*.*//g; -- # We try to match RPM version, so remove last .0 -- $version =~ s/\.0$//g; -- return $version; -+# this function put the max version on each bundles to be able to remove -+# duplicate deps with 'sort -u' command. -+sub prepareOSGiBundlesList { -+ foreach $bundle (@_) { -+ foreach $cmp (@_) { -+ if ( $bundle->{NAME} eq $cmp->{NAME} ) { -+ $result = compareVersion( $bundle->{VERSION}, $cmp->{VERSION} ); -+ if ( $result < 0 ) { -+ $bundle->{VERSION} = $cmp->{VERSION}; -+ } -+ } -+ } -+ } -+ return @_; - } - -+# this function returns a negative integer, zero, or a positive integer if -+# $ver1 is less than, equal to, or greater than $ver2. -+# -+# REMEMBER: we mimic org.osgi.framework.Version#compareTo method but -+# *at this time* we don't take care of the qualifier part of the version. -+sub compareVersion { -+ my $ver1 = $_[0]; -+ my $ver2 = $_[1]; -+ -+ $ver1 = "0.0.0" if ( $ver1 eq "" ); -+ $ver2 = "0.0.0" if ( $ver2 eq "" ); -+ -+ $ver1 =~ m/([0-9]+)(\.)([0-9]+)(\.)([0-9]+)/; -+ $major1 = $1; -+ $minor1 = $3; -+ $micro1 = $5; -+ -+ $ver2 =~ m/([0-9]+)(\.)([0-9]+)(\.)([0-9]+)/; -+ $major2 = $1; -+ $minor2 = $3; -+ $micro2 = $5; -+ -+ $result = $major1 - $major2; -+ return $result if ( $result != 0 ); -+ -+ $result = $minor1 - $minor2; -+ return $result if ( $result != 0 ); -+ -+ $result = $micro1 - $micro2; -+ return $result if ( $result != 0 ); -+ -+ return $result; -+} diff --git a/rpm-4.7.0-prtsig.patch b/rpm-4.7.0-prtsig.patch deleted file mode 100644 index 7096240..0000000 --- a/rpm-4.7.0-prtsig.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c -index 3819449..eb5d627 100644 ---- a/rpmio/rpmpgp.c -+++ b/rpmio/rpmpgp.c -@@ -638,13 +638,13 @@ static int pgpPrtSigParams(pgpTag tag, uint8_t pubkey_algo, uint8_t sigtype, - return 0; - } - --static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen, pgpDig _dig) -+static int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen, -+ pgpDig _dig, pgpDigParams _digp) - { - uint8_t version = h[0]; - uint8_t * p; - size_t plen; - int rc; -- pgpDigParams _digp = _dig ? &_dig->signature : NULL; - - switch (version) { - case 3: -@@ -1170,7 +1170,7 @@ static int pgpPrtPkt(const uint8_t *pkt, size_t pleft, - h = pkt + 1 + plen; - switch (tag) { - case PGPTAG_SIGNATURE: -- rc = pgpPrtSig(tag, h, hlen, _dig); -+ rc = pgpPrtSig(tag, h, hlen, _dig, _digp); - break; - case PGPTAG_PUBLIC_KEY: - /* Get the public key fingerprint. */ diff --git a/rpm-4.7.0-python-altnevr.patch b/rpm-4.7.0-python-altnevr.patch deleted file mode 100644 index 1626fed..0000000 --- a/rpm-4.7.0-python-altnevr.patch +++ /dev/null @@ -1,39 +0,0 @@ -commit 9322f737819a3d81088699b1d7fa667259245411 -Author: Panu Matilainen -Date: Tue May 19 10:26:50 2009 +0300 - - Don't mess up problem altNEVR in python ts.check() (rhbz#501068) - - the use of strrchr() silently casts away the const from the problem - set altNEVR string, which we then happily modify.. - - similar to commit 62cc76e25cdfad78ac30bb28f626b474efdecddc - -diff --git a/python/rpmts-py.c b/python/rpmts-py.c -index e56e001..9877fbc 100644 ---- a/python/rpmts-py.c -+++ b/python/rpmts-py.c -@@ -365,7 +365,7 @@ fprintf(stderr, "*** rpmts_Check(%p) ts %p cb %p\n", s, s->ts, cbInfo.cb); - - /* XXX TODO: rpmlib >= 4.0.3 can return multiple suggested keys. */ - while ((i = rpmpsNextIterator(psi)) >= 0) { -- const char * needsName; -+ char * altNEVR, * needsName; - char * byName, * byVersion, * byRelease, *byArch; - char * needsOP, * needsVersion; - rpmsenseFlags needsFlags, sense; -@@ -383,7 +383,7 @@ fprintf(stderr, "*** rpmts_Check(%p) ts %p cb %p\n", s, s->ts, cbInfo.cb); - - key = rpmProblemGetKey(p); - -- needsName = rpmProblemGetAltNEVR(p); -+ altNEVR = needsName = xstrdup(rpmProblemGetAltNEVR(p)); - if (needsName[1] == ' ') { - sense = (needsName[0] == 'C') - ? RPMDEP_SENSE_CONFLICTS : RPMDEP_SENSE_REQUIRES; -@@ -409,6 +409,7 @@ fprintf(stderr, "*** rpmts_Check(%p) ts %p cb %p\n", s, s->ts, cbInfo.cb); - PyList_Append(list, (PyObject *) cf); - Py_DECREF(cf); - free(byName); -+ free(altNEVR); - } - - psi = rpmpsFreeIterator(psi); diff --git a/rpm.spec b/rpm.spec index 514dc3d..8e54033 100644 --- a/rpm.spec +++ b/rpm.spec @@ -11,7 +11,7 @@ %define rpmhome /usr/lib/rpm -%define rpmver 4.7.0 +%define rpmver 4.7.1 %define snapver {nil} %define srcver %{rpmver} @@ -21,10 +21,10 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: 9%{?dist} +Release: 1%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ -Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2 +Source0: http://rpm.org/releases/rpm-4.7.x/%{name}-%{srcver}.tar.bz2 %if %{with int_bdb} Source1: db-%{bdbver}.tar.gz %endif @@ -39,14 +39,6 @@ Patch2: rpm-4.5.90-gstreamer-provides.patch Patch3: rpm-4.6.0-fedora-specspo.patch # Patches already in upstream -Patch200: rpm-4.7.0-findlang-kde3.patch -Patch201: rpm-4.7.0-prtsig.patch -Patch202: rpm-4.7.0-python-altnevr.patch -Patch203: rpm-4.7.0-hardlink-sizes.patch -Patch204: rpm-4.7.0-dwarf3.patch -Patch205: rpm-4.7.0-osgideps.patch -Patch206: rpm-4.7.0-fp-symlink.patch -Patch207: rpm-4.7.0-fp-findbyfile.patch # These are not yet upstream Patch300: rpm-4.7.0-extra-provides.patch @@ -199,15 +191,6 @@ packages on a system. %patch2 -p1 -b .gstreamer-prov %patch3 -p1 -b .fedora-specspo -%patch200 -p1 -b .findlang-kde3 -%patch201 -p1 -b .prtsig -%patch202 -p1 -b .py-altnevr -%patch203 -p1 -b .hardlink-sizes -%patch204 -p1 -b .dwarf3 -%patch205 -p1 -b .osgideps -%patch206 -p1 -b .fp-symlink -%patch207 -p1 -b .fp-findbyfile - %patch300 -p1 -b .extra-prov %patch301 -p1 -b .niagara @@ -421,6 +404,10 @@ exit 0 %doc doc/librpm/html/* %changelog +* Tue Jul 21 2009 Panu Matilainen - 4.7.1-1 +- update to 4.7.1 ((http://rpm.org/wiki/Releases/4.7.1) +- fix source url + * Mon Jul 20 2009 Bill Nottingham - 4.7.0-9 - enable XZ support diff --git a/sources b/sources index 9ee2abb..9ffc0ab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -74791d638c571ec79f06227d453a6a03 rpm-4.7.0.tar.bz2 +e1abe3bcf6514a319a3803d2cf3bf83b rpm-4.7.1.tar.bz2