- 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)
This commit is contained in:
parent
224c3bc2bb
commit
e0a8ab7463
28
rpm-4.7.1-chroot-env-paths.patch
Normal file
28
rpm-4.7.1-chroot-env-paths.patch
Normal file
@ -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);
|
28
rpm-4.7.1-chroot-remove-env.patch
Normal file
28
rpm-4.7.1-chroot-remove-env.patch
Normal file
@ -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));
|
20
rpm-4.7.1-filedep-dnevr.patch
Normal file
20
rpm-4.7.1-filedep-dnevr.patch
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
27
rpm-4.7.1-rpm2cpio-init.patch
Normal file
27
rpm-4.7.1-rpm2cpio-init.patch
Normal file
@ -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;
|
16
rpm.spec
16
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)
|
||||
|
Loading…
Reference in New Issue
Block a user