rpms/rpm/devel rpm-4.8.1-eat-stdin.patch, NONE, 1.1 rpm-4.8.1-getoutput-emsg.patch, NONE, 1.1 rpm.spec, 1.401, 1.402

Panu Matilainen pmatilai at fedoraproject.org
Wed Jun 30 09:44:37 UTC 2010


Author: pmatilai

Update of /cvs/pkgs/rpms/rpm/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv26401

Modified Files:
	rpm.spec 
Added Files:
	rpm-4.8.1-eat-stdin.patch rpm-4.8.1-getoutput-emsg.patch 
Log Message:
- fix a potential getOutputFrom() error from font provide extraction
- debug-friendlier message to aid finding other similar cases (#565223)


rpm-4.8.1-eat-stdin.patch:
 fontconfig.prov |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- NEW FILE rpm-4.8.1-eat-stdin.patch ---
>From 53045d5dcdce3988e2586cb315b35e6a675a8152 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai at redhat.com>
Date: Wed, 30 Jun 2010 11:57:17 +0300
Subject: [PATCH 1/2] Fix potential getOutputFrom() error on font provide extraction (RhBug:609117)
 - if fonts are detected in the package being built but fc-query isn't
   present, the script exited without consuming stdin which can break
   getOutputFrom()

---
 scripts/fontconfig.prov |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/scripts/fontconfig.prov b/scripts/fontconfig.prov
index 8638680..594851d 100755
--- a/scripts/fontconfig.prov
+++ b/scripts/fontconfig.prov
@@ -12,7 +12,10 @@
 
 fcquery=/usr/bin/fc-query
 
-[ -x $fcquery ] || exit 0
+if [ -x $fcquery ]; then
+    cat > /dev/null
+    exit 0
+fi
 
 # filter out anything outside main fontconfig path
 grep /usr/share/fonts/ |
-- 
1.7.0.1


rpm-4.8.1-getoutput-emsg.patch:
 rpmfc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE rpm-4.8.1-getoutput-emsg.patch ---
>From 5711982e27c70bea4017632255a94630ea10d1ab Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai at redhat.com>
Date: Wed, 30 Jun 2010 12:27:56 +0300
Subject: [PATCH 2/2] Make the infamous getOutputFrom() error message more useful
 - ...like actually saying what was the failing script, doh
 - leaving the function name there for a googling hint

---
 build/rpmfc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/build/rpmfc.c b/build/rpmfc.c
index e76363a..3c915f5 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -234,7 +234,8 @@ top:
 	    if ((nbw = write(toProg[1], writePtr,
 		    (1024<writeBytesLeft) ? 1024 : writeBytesLeft)) < 0) {
 	        if (errno != EAGAIN) {
-		    perror("getOutputFrom()");
+		    rpmlog(RPMLOG_ERR, _("%s: failure writing to %s: %m\n"),
+			   __func__, argv[0]);
 	            exit(EXIT_FAILURE);
 		}
 	        nbw = 0;
-- 
1.7.0.1



Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/devel/rpm.spec,v
retrieving revision 1.401
retrieving revision 1.402
diff -u -p -r1.401 -r1.402
--- rpm.spec	11 Jun 2010 10:49:22 -0000	1.401
+++ rpm.spec	30 Jun 2010 09:44:37 -0000	1.402
@@ -21,7 +21,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: 1%{?dist}
+Release: 2%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/rpm-4.8.x/%{name}-%{srcver}.tar.bz2
@@ -44,6 +44,8 @@ Patch5: rpm-4.8.0-no-man-dirs.patch
 Patch200: rpm-4.8.0-pythondeps-parallel.patch
 Patch201: rpm-4.8.0-python-bytecompile.patch
 Patch202: rpm-4.8.0-findlang-localedirs.patch
+Patch203: rpm-4.8.1-eat-stdin.patch
+Patch204: rpm-4.8.1-getoutput-emsg.patch
 
 # These are not yet upstream
 Patch301: rpm-4.6.0-niagara.patch
@@ -194,6 +196,8 @@ packages on a system.
 %patch200 -p1 -b .pythondeps-parallel
 %patch201 -p1 -b .python-bytecompile
 %patch202 -p1 -b .findlang-localedirs
+%patch203 -p1 -b .eat-stdin
+%patch204 -p1 -b .getoutput-emsg
 
 %patch301 -p1 -b .niagara
 %patch302 -p1 -b .geode
@@ -410,6 +414,10 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Wed Jun 30 2010 Panu Matilainen <pmatilai at redhat.com> - 4.8.1-2
+- fix a potential getOutputFrom() error from font provide extraction
+- debug-friendlier message to aid finding other similar cases (#565223)
+
 * Fri Jun 11 2010 Panu Matilainen <pmatilai at redhat.com> - 4.8.1-1
 - update to 4.8.1 (http://rpm.org/wiki/Releases/4.8.1)
 - drop no longer needed patches



More information about the scm-commits mailing list