rpms/rpm/devel rpm-4.8.0-url-segfault.patch, NONE, 1.1 rpm-4.8.0-verify-exitcode.patch, NONE, 1.1 rpm.spec, 1.378, 1.379

Panu Matilainen pmatilai at fedoraproject.org
Thu Jan 21 13:51:00 UTC 2010


Author: pmatilai

Update of /cvs/pkgs/rpms/rpm/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15270

Modified Files:
	rpm.spec 
Added Files:
	rpm-4.8.0-url-segfault.patch rpm-4.8.0-verify-exitcode.patch 
Log Message:
- fix segfault on failed url retrieval
- fix verification error code depending on verbosity level
- if anything in testsuite fails, dump out the log


rpm-4.8.0-url-segfault.patch:
 rpminstall.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE rpm-4.8.0-url-segfault.patch ---
commit ce1d2e87157f4a7ebc4f4d6f26024ac597400367
Author: Panu Matilainen <pmatilai at redhat.com>
Date:   Thu Jan 21 13:45:34 2010 +0200

    Fix double-free segfault on url retrieve to read-only media (RhBug:557118)

diff --git a/lib/rpminstall.c b/lib/rpminstall.c
index 6b3dde7..568e13f 100644
--- a/lib/rpminstall.c
+++ b/lib/rpminstall.c
@@ -458,7 +458,7 @@ restart:
 	case URL_IS_HTTPS:
 	case URL_IS_HTTP:
 	case URL_IS_FTP:
-	{   char *tfn;
+	{   char *tfn = NULL;
 	    FD_t tfd;
 
 	    if (rpmIsVerbose())

rpm-4.8.0-verify-exitcode.patch:
 verify.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE rpm-4.8.0-verify-exitcode.patch ---
commit 04ad4b1155ec4b082fbac425a575a0ba05337ab1
Author: Panu Matilainen <pmatilai at redhat.com>
Date:   Thu Jan 21 14:14:28 2010 +0200

    Really fix verification error code to not depend on verbosity (RhBug:557101)
    - earlier fix from commit 6649c23cac5823d0c7415df5cfd66e5aac5eebd2 was
      broken as it could reset return code to zero after detecting errors
      earlier

diff --git a/lib/verify.c b/lib/verify.c
index 44ab314..1068cfe 100644
--- a/lib/verify.c
+++ b/lib/verify.c
@@ -353,7 +353,7 @@ static int verifyHeader(QVA_t qva, const rpmts ts, Header h)
 	    static const char *const aok = ".";
 	    static const char *const unknown = "?";
 
-	    ec = (verifyResult != 0);
+	    if (verifyResult) ec = 1;
 
 #define	_verify(_RPMVERIFY_F, _C)	\
 	((verifyResult & _RPMVERIFY_F) ? _C : aok)


Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/devel/rpm.spec,v
retrieving revision 1.378
retrieving revision 1.379
diff -u -p -r1.378 -r1.379
--- rpm.spec	8 Jan 2010 13:47:29 -0000	1.378
+++ rpm.spec	21 Jan 2010 13:50:59 -0000	1.379
@@ -21,7 +21,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: 2%{?dist}
+Release: 3%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -37,6 +37,8 @@ Patch2: rpm-4.5.90-gstreamer-provides.pa
 Patch3: rpm-4.7.90-fedora-specspo.patch
 
 # Patches already in upstream
+Patch200: rpm-4.8.0-url-segfault.patch
+Patch201: rpm-4.8.0-verify-exitcode.patch
 
 # These are not yet upstream
 Patch301: rpm-4.6.0-niagara.patch
@@ -181,6 +183,9 @@ packages on a system.
 %patch2 -p1 -b .gstreamer-prov
 %patch3 -p1 -b .fedora-specspo
 
+%patch200 -p1 -b .url-segfault
+%patch201 -p1 -b .verify-exitcode
+
 %patch301 -p1 -b .niagara
 %patch302 -p1 -b .geode
 
@@ -267,6 +272,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with check}
 %check
 make check
+[ "$(ls -A tests/rpmtests.dir)" ] && cat tests/rpmtests.log
 %endif
 
 %post libs -p /sbin/ldconfig
@@ -394,6 +400,11 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Thu Jan 21 2010 Panu Matilainen <pmatilai at redhat.com> - 4.8.0-3
+- fix segfault on failed url retrieval
+- fix verification error code depending on verbosity level
+- if anything in testsuite fails, dump out the log
+
 * Fri Jan 08 2010 Panu Matilainen <pmatilai at redhat.com> - 4.8.0-2
 - put disttag back, accidentally nuked in 4.8.0 final update
 



More information about the scm-commits mailing list