Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 2000 12:49:13 -0700 (PDT)
From:      scott@renfro.org
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/22257: [ports/misc/rpm-3.0.6] rpm2cpio fails ''cannot re-open payload: (null)''
Message-ID:  <20001023194913.1443A37B479@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         22257
>Category:       ports
>Synopsis:       [ports/misc/rpm-3.0.6] rpm2cpio fails ''cannot re-open payload: (null)''
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 23 12:50:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Scott Renfro
>Release:        4.1.1-STABLE
>Organization:
>Environment:
FreeBSD scott.securify.com 4.1.1-STABLE FreeBSD 4.1.1-STABLE #0: Sun Oct 22 13:28:30 PDT 2000     root@scott.securify.com:/usr/obj/usr/src/sys/SCOTT  i386

>Description:
The rpm2cpio utility that comes as part of the redhat package manager
ports distribution bombs out trying to re-open the rpm.  Apparently,
ferror() returns a non-zero value although an error hasn't occured.

The patch in fix section corrects the problem.

Note: since redhat only distributes source in SRPMs (spit in their
general direction), rpm2cpio is needed to extract the tarballs
from the SRPM.  The perl rpm2cpio (ports/misc/rpm2cpio) doesn't
support version 4 RPMs.


>How-To-Repeat:
Download a recent RPM from redhat.  I ran into this with
pump-0.8.3-2.src.rpm.  Ran rpm2cpio < pump-0.8.3-2.src.rpm |pax -r
and rpm2cpio replies with cannot re-open payload: (null).


>Fix:
The following patch eliminates the problem.

--- rpm2cpio.c.orig     Mon Oct 23 10:06:43 2000
+++ rpm2cpio.c  Mon Oct 23 10:13:11 2000
@@ -55,7 +55,7 @@
     }
 
     gzdi = Fdopen(fdi, rpmio_flags);   /* XXX gzdi == fdi */
-    if (gzdi == NULL || Ferror(gzdi)) {
+    if (gzdi == NULL) {
        fprintf(stderr, _("cannot re-open payload: %s\n"), Fstrerror(gzdi));
        exit(EXIT_FAILURE);
     }



>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001023194913.1443A37B479>