public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - use relative paths within db environment (related to #507309, #507309...)
@ 2026-11-23  9:26 Panu Matilainen
  0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23  9:26 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : e0a8ab746313937cb985923b449dcbed27aecff1
            Author : Panu Matilainen <pmatilai@fedoraproject.org>
            Date   : 2009-09-21T13:25:25+00:00
            Stats  : +118/-1 in 5 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/e0a8ab746313937cb985923b449dcbed27aecff1?branch=pmatilai-v6

            Log:
            - use relative paths within db environment (related to #507309, #507309...)
- remove db environment on close in chrooted operation (related to above)
- initialize rpmlib earlier in rpm2cpio (#523260)
- fix file dependency tag extension formatting (#523282)

---
diff --git a/rpm-4.7.1-chroot-env-paths.patch b/rpm-4.7.1-chroot-env-paths.patch
new file mode 100644
index 0000000..0effaa4
--- /dev/null
+++ b/rpm-4.7.1-chroot-env-paths.patch
@@ -0,0 +1,28 @@
+diff --git a/lib/backend/db3.c b/lib/backend/db3.c
+index 9f0f941..b0b2a86 100644
+--- a/lib/backend/db3.c
++++ b/lib/backend/db3.c
+@@ -1015,17 +1015,12 @@ static int db3open(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
+ 	    }
+ 
+ 	    if (rc == 0) {
+-		char * fullpath;
+-		const char * dbpath;
+-		fullpath = rpmGetPath(dbhome, "/", dbfile ? dbfile : "", NULL);
+-
+-#ifdef	HACK	/* XXX necessary to support dbsubfile */
+-		dbpath = (!dbi->dbi_use_dbenv && !dbi->dbi_temporary)
+-			? fullpath : dbfile;
+-#else
+-		dbpath = (!dbi->dbi_temporary)
+-			? fullpath : dbfile;
+-#endif
++		char * fullpath = NULL;
++		const char * dbpath = dbfile;
++		if (!dbi->dbi_use_dbenv && !dbi->dbi_temporary) {
++		    fullpath = rpmGetPath(dbhome, "/", dbfile, NULL);
++		    dbpath = fullpath;
++		}
+ 
+ 		rc = (db->open)(db, txnid, dbpath, dbsubfile,
+ 		    dbi->dbi_type, oflags, dbi->dbi_perms);

diff --git a/rpm-4.7.1-chroot-remove-env.patch b/rpm-4.7.1-chroot-remove-env.patch
new file mode 100644
index 0000000..6da7ab7
--- /dev/null
+++ b/rpm-4.7.1-chroot-remove-env.patch
@@ -0,0 +1,28 @@
+diff --git a/lib/backend/db3.c b/lib/backend/db3.c
+index 9f0f941..9683100 100644
+--- a/lib/backend/db3.c
++++ b/lib/backend/db3.c
+@@ -181,7 +181,8 @@ static int db_fini(dbiIndex dbi, const char * dbhome,
+ 	xx = db_env_create(&dbenv, 0);
+ 	xx = cvtdberr(dbi, "db_env_create", xx, _debug);
+ 	xx = dbenv->remove(dbenv, dbhome, 0);
+-	xx = cvtdberr(dbi, "dbenv->remove", xx, _debug);
++	/* filter out EBUSY as it just means somebody else gets to clean it */
++	xx = cvtdberr(dbi, "dbenv->remove", xx, (xx == EBUSY ? 0 : _debug));
+ 
+ 	if (dbfile)
+ 	    rpmlog(RPMLOG_DEBUG, "removed  db environment %s/%s\n",
+diff --git a/lib/rpmdb.c b/lib/rpmdb.c
+index 0754b99..b781cfc 100644
+--- a/lib/rpmdb.c
++++ b/lib/rpmdb.c
+@@ -921,7 +921,8 @@ rpmdb newRpmdb(const char * root,
+ 	return NULL;
+     }
+     db->db_errpfx = rpmExpand( (epfx && *epfx ? epfx : _DB_ERRPFX), NULL);
+-    db->db_remove_env = 0;
++    /* XXX remove environment after chrooted operations, for now... */
++    db->db_remove_env = ((strcmp(db->db_root, "/") != 0)? 1 : 0);
+     db->db_filter_dups = _db_filter_dups;
+     db->db_ndbi = dbiTags.max;
+     db->_dbi = xcalloc(db->db_ndbi, sizeof(*db->_dbi));

diff --git a/rpm-4.7.1-filedep-dnevr.patch b/rpm-4.7.1-filedep-dnevr.patch
new file mode 100644
index 0000000..b57f86f
--- /dev/null
+++ b/rpm-4.7.1-filedep-dnevr.patch
@@ -0,0 +1,20 @@
+commit d846e6b0f829791e6ffce4fd496c9378bff19c43
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date:   Tue Sep 15 08:45:14 2009 +0300
+
+    Don't add dependency type into file requires and provides (RhBug:523282)
+    - unintended change in commit 3d8656f040d2c780c88d0cd63594898f0605a6fa
+
+diff --git a/lib/tagexts.c b/lib/tagexts.c
+index ec0b001..4588365 100644
+--- a/lib/tagexts.c
++++ b/lib/tagexts.c
+@@ -137,7 +137,7 @@ static int filedepTag(Header h, rpmTag tagN, rpmtd td, headerGetFlags hgflags)
+ 		    continue;
+ 		DNEVR = rpmdsDNEVR(ds);
+ 		if (DNEVR != NULL) {
+-		    argvAdd(&deps, DNEVR);
++		    argvAdd(&deps, DNEVR + 2);
+ 		}
+ 	    }
+ 	}

diff --git a/rpm-4.7.1-rpm2cpio-init.patch b/rpm-4.7.1-rpm2cpio-init.patch
new file mode 100644
index 0000000..389b7a6
--- /dev/null
+++ b/rpm-4.7.1-rpm2cpio-init.patch
@@ -0,0 +1,27 @@
+commit 63d37be6b4a854b9cbbd47306c5c383a2ad356c2
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date:   Tue Sep 15 12:57:51 2009 +0300
+
+    Initialize rpm earlier in rpm2cpio (RhBug:523260)
+    - url retrieval requires macros to be loaded
+
+diff --git a/rpm2cpio.c b/rpm2cpio.c
+index 6c29cab..bf7f17c 100644
+--- a/rpm2cpio.c
++++ b/rpm2cpio.c
+@@ -21,6 +21,7 @@ int main(int argc, char *argv[])
+     FD_t gzdi;
+     
+     setprogname(argv[0]);	/* Retrofit glibc __progname */
++    rpmReadConfigFiles(NULL, NULL);
+     if (argc == 1)
+ 	fdi = fdDup(STDIN_FILENO);
+     else {
+@@ -37,7 +38,6 @@ int main(int argc, char *argv[])
+ 	exit(EXIT_FAILURE);
+     }
+     fdo = fdDup(STDOUT_FILENO);
+-    rpmReadConfigFiles(NULL, NULL);
+ 
+     {	rpmts ts = rpmtsCreate();
+ 	rpmVSFlags vsflags = 0;

diff --git a/rpm.spec b/rpm.spec
index 7c5fe49..e92f666 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -21,7 +21,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: 5%{?dist}
+Release: 6%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/rpm-4.7.x/%{name}-%{srcver}.tar.bz2
@@ -43,6 +43,10 @@ Patch200: rpm-4.7.1-bugurl.patch
 Patch201: rpm-4.7.1-abs-filelist.patch
 Patch202: rpm-4.7.1-debug-perms.patch
 Patch203: rpm-4.7.1-duplicate-deps.patch
+Patch204: rpm-4.7.1-chroot-env-paths.patch
+Patch205: rpm-4.7.1-rpm2cpio-init.patch
+Patch206: rpm-4.7.1-filedep-dnevr.patch
+Patch207: rpm-4.7.1-chroot-remove-env.patch
 
 # These are not yet upstream
 Patch300: rpm-4.7.0-extra-provides.patch
@@ -200,6 +204,10 @@ packages on a system.
 %patch201 -p1 -b .abs-filelist
 %patch202 -p1 -b .debug-perms
 %patch203 -p1 -b .duplicate-deps
+%patch204 -p1 -b .chroot-env-paths
+%patch205 -p1 -b .rpm2cpio.init
+%patch206 -p1 -b .filedep-dnevr
+%patch207 -p1 -b .chroot-remove-env
 
 %patch300 -p1 -b .extra-prov
 %patch301 -p1 -b .niagara
@@ -415,6 +423,12 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Mon Sep 21 2009 Panu Matilainen <pmatilai@redhat.com> - 4.7.1-6
+- use relative paths within db environment (related to #507309, #507309...)
+- remove db environment on close in chrooted operation (related to above)
+- initialize rpmlib earlier in rpm2cpio (#523260)
+- fix file dependency tag extension formatting (#523282)
+
 * Tue Sep 15 2009 Panu Matilainen <pmatilai@redhat.com> - 4.7.1-5
 - fix duplicate dependency filtering on build (#490378)
 - permit absolute paths in file lists again (#521760)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23  9:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:26 [rpms/rpm] pmatilai-v6: - use relative paths within db environment (related to #507309, #507309...) Panu Matilainen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox