From 15426fb9a1711eaaf04a1cbac1b0d8e68ef362f2 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Feb 15 2011 13:49:32 +0000 Subject: - update to 4.9.0-rc1 - drop upstream patches --- diff --git a/.gitignore b/.gitignore index 89d8ab9..c0c59cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ rpm-4.8.1.tar.bz2 /rpm-4.9.0-beta1.tar.bz2 +/rpm-4.9.0-rc1.tar.bz2 diff --git a/rpm-4.9.0-beta1-env-noremove.patch b/rpm-4.9.0-beta1-env-noremove.patch deleted file mode 100644 index 32789e2..0000000 --- a/rpm-4.9.0-beta1-env-noremove.patch +++ /dev/null @@ -1,34 +0,0 @@ -commit 0ee494ea672b9125171098184c702ccc3dd0163e -Author: Panu Matilainen -Date: Fri Jan 21 15:20:01 2011 +0200 - - Don't try to remove existing environment when using private environment - (cherry picked from commit 88e63b050cfd3ba28cb44e75b3ac31fdf5fe9909) - -diff --git a/lib/backend/db3.c b/lib/backend/db3.c -index 365cd13..da1b602 100644 ---- a/lib/backend/db3.c -+++ b/lib/backend/db3.c -@@ -51,6 +51,7 @@ static int db_fini(rpmdb rdb, const char * dbhome) - { - DB_ENV * dbenv = rdb->db_dbenv; - int rc; -+ uint32_t eflags = 0; - - if (dbenv == NULL) - return 0; -@@ -60,12 +61,13 @@ static int db_fini(rpmdb rdb, const char * dbhome) - return 0; - } - -+ (void) dbenv->get_open_flags(dbenv, &eflags); - rc = dbenv->close(dbenv, 0); - rc = dbapi_err(rdb, "dbenv->close", rc, _debug); - - rpmlog(RPMLOG_DEBUG, "closed db environment %s\n", dbhome); - -- if (rdb->db_remove_env) { -+ if (!(eflags & DB_PRIVATE) && rdb->db_remove_env) { - int xx; - - xx = db_env_create(&dbenv, 0); diff --git a/rpm-4.9.0-beta1-index-iteration.patch b/rpm-4.9.0-beta1-index-iteration.patch deleted file mode 100644 index 9712ee3..0000000 --- a/rpm-4.9.0-beta1-index-iteration.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit a3ec6066af23e0c9e0de6160c14cb2a502e8fa89 -Author: Panu Matilainen -Date: Fri Jan 21 13:52:17 2011 +0200 - - Fix rpmdb index match iteration termination with NULL keyp (#671149) - - When iterating secondary indexes with NULL keyp, the last entry - was being returned twice as dbiAppendSet() would get called - even when dbiGet() returned non-zero. - -diff --git a/lib/rpmdb.c b/lib/rpmdb.c -index e58de35..dc6d7a7 100644 ---- a/lib/rpmdb.c -+++ b/lib/rpmdb.c -@@ -2048,10 +2048,9 @@ rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmDbiTagVal rpmtag, - /* get all entries from index */ - xx = dbiCopen(dbi, &dbcursor, 0); - -- while (rc==0) { -+ while ((rc = dbiGet(dbi, dbcursor, &key, &data, DB_NEXT)) == 0) { - dbiIndexSet newset = NULL; - -- rc = dbiGet(dbi, dbcursor, &key, &data, DB_NEXT); - (void) dbt2set(dbi, &data, &newset); - if (set == NULL) { - set = newset; diff --git a/rpm-4.9.0-beta1-index-rebuild.patch b/rpm-4.9.0-beta1-index-rebuild.patch deleted file mode 100644 index 2b02cbe..0000000 --- a/rpm-4.9.0-beta1-index-rebuild.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit 5ddb36d2739653ebe50dc39176a9ca43d0555676 -Author: Panu Matilainen -Date: Fri Jan 21 13:43:12 2011 +0200 - - Avoid automatic index generation on db rebuild - - The rebuild walks through it all anyway, calling buildIndexes() - while in middle of db rebuild ends up in first header added - twice to indexes - -diff --git a/lib/rpmdb.c b/lib/rpmdb.c -index 02aef4a..e58de35 100644 ---- a/lib/rpmdb.c -+++ b/lib/rpmdb.c -@@ -157,6 +157,7 @@ static dbiIndex rpmdbOpenIndex(rpmdb db, rpmDbiTagVal rpmtag, int flags) - } else { - db->_dbi[dbix] = dbi; - int verifyonly = (flags & RPMDB_FLAG_VERIFYONLY); -+ int rebuild = (db->db_flags & RPMDB_FLAG_REBUILD); - if (dbiType(dbi) == DBI_PRIMARY) { - /* Allocate based on max header instance number + some reserve */ - if (!verifyonly && (db->db_checked == NULL)) { -@@ -170,7 +171,7 @@ static dbiIndex rpmdbOpenIndex(rpmdb db, rpmDbiTagVal rpmtag, int flags) - dbSetFSync(db->db_dbenv, 0); - } - } else { /* secondary index */ -- if (!verifyonly && (dbiFlags(dbi) & DBI_CREATED)) { -+ if (!rebuild && !verifyonly && (dbiFlags(dbi) & DBI_CREATED)) { - rpmlog(RPMLOG_DEBUG, "index %s needs creating\n", dbiName(dbi)); - db->db_buildindex++; - if (db->db_buildindex == 1) { diff --git a/rpm-4.9.0-beta1-monodeps.patch b/rpm-4.9.0-beta1-monodeps.patch deleted file mode 100644 index 157c10d..0000000 --- a/rpm-4.9.0-beta1-monodeps.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up rpm-4.9.0-beta1/fileattrs/Makefile.am.monodeps rpm-4.9.0-beta1/fileattrs/Makefile.am ---- rpm-4.9.0-beta1/fileattrs/Makefile.am.monodeps 2010-12-03 14:11:57.000000000 +0200 -+++ rpm-4.9.0-beta1/fileattrs/Makefile.am 2011-01-31 09:46:05.000000000 +0200 -@@ -6,6 +6,6 @@ fattrsdir = $(rpmconfigdir)/fileattrs - - fattrs_DATA = \ - desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \ -- pkgconfig.attr python.attr ocaml.attr script.attr -+ pkgconfig.attr python.attr ocaml.attr script.attr mono.attr - - EXTRA_DIST = $(fattrs_DATA) -diff -up rpm-4.9.0-beta1/fileattrs/Makefile.in.monodeps rpm-4.9.0-beta1/fileattrs/Makefile.in ---- rpm-4.9.0-beta1/fileattrs/Makefile.in.monodeps 2011-01-31 09:56:15.000000000 +0200 -+++ rpm-4.9.0-beta1/fileattrs/Makefile.in 2011-01-31 09:56:24.000000000 +0200 -@@ -301,7 +301,7 @@ rpmconfigdir = $(prefix)/lib/rpm - fattrsdir = $(rpmconfigdir)/fileattrs - fattrs_DATA = \ - desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \ -- pkgconfig.attr python.attr ocaml.attr script.attr -+ pkgconfig.attr python.attr ocaml.attr script.attr mono.attr - - EXTRA_DIST = $(fattrs_DATA) - all: all-am -diff -up rpm-4.9.0-beta1/fileattrs/mono.attr.monodeps rpm-4.9.0-beta1/fileattrs/mono.attr ---- rpm-4.9.0-beta1/fileattrs/mono.attr.monodeps 2011-01-31 09:46:05.000000000 +0200 -+++ rpm-4.9.0-beta1/fileattrs/mono.attr 2011-01-31 09:46:05.000000000 +0200 -@@ -0,0 +1,3 @@ -+%__mono_provides %{_rpmconfigdir}/mono-find-provides %{_builddir}/%{?buildsubdir} %{buildroot} %{_libdir} -+%__mono_requires %{_rpmconfigdir}/mono-find-requires %{_builddir}/%{?buildsubdir} %{buildroot} %{_libdir} -+%__mono_magic ^.*Mono/.Net assembly.*$ diff --git a/rpm-4.9.0-beta1-ocaml-magic.patch b/rpm-4.9.0-beta1-ocaml-magic.patch deleted file mode 100644 index c54d645..0000000 --- a/rpm-4.9.0-beta1-ocaml-magic.patch +++ /dev/null @@ -1,15 +0,0 @@ -commit 9fa3a6c99d93c0eb9659f38a10eb43a0265cce4f -Author: Panu Matilainen -Date: Sun Feb 6 09:57:03 2011 +0200 - - Adjust OCaml detection rule for libmagic 5.04 -> 5.05 string change - -diff --git a/fileattrs/ocaml.attr b/fileattrs/ocaml.attr -index 53b63ae..5fd0870 100644 ---- a/fileattrs/ocaml.attr -+++ b/fileattrs/ocaml.attr -@@ -1,3 +1,3 @@ - %__ocaml_provides %{_rpmconfigdir}/ocaml-find-provides.sh - %__ocaml_requires %{_rpmconfigdir}/ocaml-find-requires.sh --%__ocaml_magic ^Objective caml.*$ -+%__ocaml_magic ^(Objective caml|OCaml) .*$ diff --git a/rpm-4.9.0-beta1-open-cwd.patch b/rpm-4.9.0-beta1-open-cwd.patch deleted file mode 100644 index 660324a..0000000 --- a/rpm-4.9.0-beta1-open-cwd.patch +++ /dev/null @@ -1,57 +0,0 @@ -commit 431afe5167675a89682eb7e07baa3a627ceb8770 -Author: Panu Matilainen -Date: Fri Jan 28 13:15:09 2011 +0200 - - Add an error message + comments on open(".") behavior (RhBug:672576) - - Bail out early and complain if current directory can't be open()'ed, - as we'll need it for reliable cwd restoration after running Lua - scripts. - - Technically we'd only need open(".") succeeding for chroot operations - and running Lua-scripts, but there's no easy way to determine whether - a transaction will run Lua-scripts. They could be in-db triggers - which will only be evaluated in the middle of transaction, better - to fail early for consistent behavior. - (cherry picked from commit fbdfe8e5bf1ef7044de7a14cff9205c4d845f90b) - -diff --git a/lib/rpmchroot.c b/lib/rpmchroot.c -index e91be71..81bb5e5 100644 ---- a/lib/rpmchroot.c -+++ b/lib/rpmchroot.c -@@ -40,6 +40,7 @@ int rpmChrootSet(const char *rootDir) - rootState.rootDir = rstrdup(rootDir); - rootState.cwd = open(".", O_RDONLY); - if (rootState.cwd < 0) { -+ rpmlog(RPMLOG_ERR, _("Unable to open current directory: %m\n")); - rc = -1; - } - } -diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index ed52608..3801873 100644 ---- a/lib/rpmscript.c -+++ b/lib/rpmscript.c -@@ -55,6 +55,7 @@ static rpmRC runLuaScript(int selinux, ARGV_const_t prefixes, - rpmluaPop(lua); - - /* Lua scripts can change our cwd and umask, save and restore */ -+ /* XXX TODO: use cwd from chroot state to save unnecessary open here */ - cwd = open(".", O_RDONLY); - if (cwd != -1) { - int xx; -diff --git a/lib/transaction.c b/lib/transaction.c -index 06e54af..628e4ea 100644 ---- a/lib/transaction.c -+++ b/lib/transaction.c -@@ -1260,7 +1260,12 @@ static int rpmtsSetup(rpmts ts, rpmprobFilterFlags ignoreSet) - rpmtsSELabelInit(ts, selinux_file_context_path()); - } - -- /* XXX Make sure the database is open RDWR for package install/erase. */ -+ /* -+ * Make sure the database is open RDWR for package install/erase. -+ * Note that we initialize chroot state here even if it's just "/" as -+ * this ensures we can successfully perform open(".") which is -+ * required to reliably restore cwd after Lua scripts. -+ */ - if (rpmtsOpenDB(ts, dbmode) || rpmChrootSet(rpmtsRootDir(ts))) - return -1; - diff --git a/rpm-4.9.0-beta1-posttrans-deps.patch b/rpm-4.9.0-beta1-posttrans-deps.patch deleted file mode 100644 index f20cd75..0000000 --- a/rpm-4.9.0-beta1-posttrans-deps.patch +++ /dev/null @@ -1,87 +0,0 @@ -commit d7e2a04d68dea4d1c7dbaf457b5b4210dfa452f2 -Author: Panu Matilainen -Date: Tue Jan 25 15:27:28 2011 +0200 - - Teach rpm about post-transaction dependencies - - %posttrans dependencies have their own peculiar semantics, they're - install-only dependencies which have no implications on ordering. - -diff --git a/build/parsePreamble.c b/build/parsePreamble.c -index 3d8b859..e4f4e0a 100644 ---- a/build/parsePreamble.c -+++ b/build/parsePreamble.c -@@ -309,6 +309,7 @@ static struct tokenBits_s const installScriptBits[] = { - { "rpmlib", RPMSENSE_RPMLIB }, - { "verify", RPMSENSE_SCRIPT_VERIFY }, - { "pretrans", RPMSENSE_PRETRANS }, -+ { "posttrans", RPMSENSE_POSTTRANS }, - { NULL, 0 } - }; - -diff --git a/build/parseScript.c b/build/parseScript.c -index d4b2293..87b3d58 100644 ---- a/build/parseScript.c -+++ b/build/parseScript.c -@@ -139,7 +139,7 @@ int parseScript(rpmSpec spec, int parsePart) - break; - case PART_POSTTRANS: - tag = RPMTAG_POSTTRANS; -- tagflags = 0; -+ tagflags = RPMSENSE_POSTTRANS; - progtag = RPMTAG_POSTTRANSPROG; - flagtag = RPMTAG_POSTTRANSFLAGS; - partname = "%posttrans"; -diff --git a/lib/formats.c b/lib/formats.c -index 386bdd3..7ce4608 100644 ---- a/lib/formats.c -+++ b/lib/formats.c -@@ -251,6 +251,8 @@ static char * deptypeFormat(rpmtd td, char * formatPrefix) - argvAdd(&sdeps, "prereq"); - if (item & RPMSENSE_PRETRANS) - argvAdd(&sdeps, "pretrans"); -+ if (item & RPMSENSE_POSTTRANS) -+ argvAdd(&sdeps, "posttrans"); - - if (sdeps) { - val = argvJoin(sdeps, ","); -diff --git a/lib/order.c b/lib/order.c -index 9cda649..3b0849d 100644 ---- a/lib/order.c -+++ b/lib/order.c -@@ -149,7 +149,7 @@ static inline int addRelation(rpmts ts, - dsflags = rpmdsFlags(requires); - - /* Avoid dependendencies which are not relevant for ordering */ -- if (dsflags & (RPMSENSE_RPMLIB|RPMSENSE_CONFIG|RPMSENSE_PRETRANS)) -+ if (dsflags & (RPMSENSE_RPMLIB|RPMSENSE_CONFIG|RPMSENSE_PRETRANS|RPMSENSE_POSTTRANS)) - return 0; - - q = rpmalSatisfiesDepend(al, requires); -diff --git a/lib/rpmds.h b/lib/rpmds.h -index 75c1541..bf3ee2c 100644 ---- a/lib/rpmds.h -+++ b/lib/rpmds.h -@@ -27,7 +27,8 @@ enum rpmsenseFlags_e { - RPMSENSE_LESS = (1 << 1), - RPMSENSE_GREATER = (1 << 2), - RPMSENSE_EQUAL = (1 << 3), -- /* bits 4-5 unused */ -+ /* bit 4 unused */ -+ RPMSENSE_POSTTRANS = (1 << 5), /*!< %posttrans dependency */ - RPMSENSE_PREREQ = (1 << 6), /* legacy prereq dependency */ - RPMSENSE_PRETRANS = (1 << 7), /*!< Pre-transaction dependency. */ - RPMSENSE_INTERP = (1 << 8), /*!< Interpreter used by scriptlet. */ -@@ -70,11 +71,12 @@ typedef rpmFlags rpmsenseFlags; - RPMSENSE_RPMLIB | \ - RPMSENSE_KEYRING | \ - RPMSENSE_PRETRANS | \ -+ RPMSENSE_POSTTRANS | \ - RPMSENSE_PREREQ) - - #define _notpre(_x) ((_x) & ~RPMSENSE_PREREQ) - #define _INSTALL_ONLY_MASK \ -- _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING|RPMSENSE_PRETRANS) -+ _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING|RPMSENSE_PRETRANS|RPMSENSE_POSTTRANS) - #define _ERASE_ONLY_MASK \ - _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN) - diff --git a/rpm-4.9.0-beta1-rofs-rpmdb.patch b/rpm-4.9.0-beta1-rofs-rpmdb.patch deleted file mode 100644 index 2e2c944..0000000 --- a/rpm-4.9.0-beta1-rofs-rpmdb.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit f1f7b59dab0c09402790daa04441fac435f52e26 -Author: Panu Matilainen -Date: Fri Jan 21 09:32:58 2011 +0200 - - Permit queries from rpmdb on read-only media (RhBug:671200) - (cherry picked from commit a429c99e13fbe9926243f29b78df8d64222c4469) - -diff --git a/lib/backend/db3.c b/lib/backend/db3.c -index 45b5363..365cd13 100644 ---- a/lib/backend/db3.c -+++ b/lib/backend/db3.c -@@ -171,7 +171,7 @@ static int db_init(rpmdb rdb, const char * dbhome) - free(fstr); - - rc = (dbenv->open)(dbenv, dbhome, eflags, rdb->db_perms); -- if (rc == EACCES) { -+ if (rc == EACCES || rc == EROFS) { - eflags |= DB_PRIVATE; - retry_open--; - } else { diff --git a/rpm-4.9.0-beta1-rpmdb-dsi.patch b/rpm-4.9.0-beta1-rpmdb-dsi.patch deleted file mode 100644 index f99ae23..0000000 --- a/rpm-4.9.0-beta1-rpmdb-dsi.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit bd96c179b79fce627403804ad6c236c783aca478 -Author: Panu Matilainen -Date: Fri Jan 21 14:02:28 2011 +0200 - - Plug potential division by zero in the rpmdb size calculation (RhBug:671056) - - This smells like treating the symptom instead of the disease, add - a reminder comment to figure out what's going on here... - -diff --git a/lib/transaction.c b/lib/transaction.c -index ed6f738..06e54af 100644 ---- a/lib/transaction.c -+++ b/lib/transaction.c -@@ -246,7 +246,8 @@ static void rpmtsUpdateDSIrpmDBSize(const rpmte p, - rpm_loff_t headerSize; - int64_t bneeded; - -- if (dsi==NULL) return; -+ /* XXX somehow we can end up here with bsize 0 (RhBug:671056) */ -+ if (dsi == NULL || dsi->bsize == 0) return; - - headerSize = rpmteHeaderSize(p); - bneeded = BLOCK_ROUND(headerSize, dsi->bsize); diff --git a/rpm-4.9.0-beta1-rpmugfree.patch b/rpm-4.9.0-beta1-rpmugfree.patch deleted file mode 100644 index 916db53..0000000 --- a/rpm-4.9.0-beta1-rpmugfree.patch +++ /dev/null @@ -1,18 +0,0 @@ -commit ec031020eb7ed9a0cc3d086bcd7ae7611eb308fc -Author: Panu Matilainen -Date: Mon Feb 7 09:15:29 2011 +0200 - - Fix segfault when building more than one rpm (RhBug:675565) - - Remember to set the static string cache pointer to NULL on free, duh - -diff --git a/lib/rpmug.c b/lib/rpmug.c -index 2bb18e5..b365e4a 100644 ---- a/lib/rpmug.c -+++ b/lib/rpmug.c -@@ -198,5 +198,5 @@ void rpmugFree(void) - rpmugGid(NULL, NULL); - rpmugUname(-1); - rpmugGname(-1); -- strCacheFree(strStash); -+ strStash = strCacheFree(strStash); - } diff --git a/rpm.spec b/rpm.spec index 244db0a..48854a1 100644 --- a/rpm.spec +++ b/rpm.spec @@ -12,7 +12,7 @@ %define rpmhome /usr/lib/rpm %define rpmver 4.9.0 -%define snapver beta1 +%define snapver rc1 %define srcver %{rpmver}%{?snapver:-%{snapver}} %define bdbname db4 @@ -22,7 +22,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}7%{?dist}.1 +Release: %{?snapver:0.%{snapver}.}1%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/rpm-4.8.x/%{name}-%{srcver}.tar.bz2 @@ -41,16 +41,6 @@ Patch3: rpm-4.8.0-no-man-dirs.patch Patch4: rpm-4.8.1-use-gpg2.patch # Patches already in upstream -Patch100: rpm-4.9.0-beta1-rofs-rpmdb.patch -Patch101: rpm-4.9.0-beta1-index-rebuild.patch -Patch102: rpm-4.9.0-beta1-index-iteration.patch -Patch103: rpm-4.9.0-beta1-rpmdb-dsi.patch -Patch104: rpm-4.9.0-beta1-posttrans-deps.patch -Patch105: rpm-4.9.0-beta1-env-noremove.patch -Patch106: rpm-4.9.0-beta1-open-cwd.patch -Patch107: rpm-4.9.0-beta1-monodeps.patch -Patch108: rpm-4.9.0-beta1-ocaml-magic.patch -Patch109: rpm-4.9.0-beta1-rpmugfree.patch # These are not yet upstream Patch301: rpm-4.6.0-niagara.patch @@ -215,17 +205,6 @@ packages on a system. %patch3 -p1 -b .no-man-dirs %patch4 -p1 -b .use-gpg2 -%patch100 -p1 -b .rofs-rpmdb -%patch101 -p1 -b .index-rebuild -%patch102 -p1 -b .index-iteration -%patch103 -p1 -b .rpmdb-dsi -%patch104 -p1 -b .posttrans-deps -%patch105 -p1 -b .env-noremove -%patch106 -p1 -b .open-cwd -%patch107 -p1 -b .monodeps -%patch108 -p1 -b .ocaml-magic -%patch109 -p1 -b .rpmugfree - %patch301 -p1 -b .niagara %patch302 -p1 -b .geode @@ -435,6 +414,10 @@ exit 0 %doc COPYING doc/librpm/html/* %changelog +* Tue Feb 15 2011 Panu Matilainen - 4.9.0-0.rc1.1 +- update to 4.9.0-rc1 +- drop upstream patches + * Wed Feb 09 2011 Fedora Release Engineering - 4.9.0-0.beta1.7.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/sources b/sources index 40a2468..194789b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -38684f12db6d68f42d69a0b1ce28b3c7 rpm-4.9.0-beta1.tar.bz2 +2529d0943d64a8c767527427ea88e84c rpm-4.9.0-rc1.tar.bz2