From owner-freebsd-ports Mon Oct 23 12:50: 6 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8F77337B4CF for ; Mon, 23 Oct 2000 12:50:00 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id MAA50569; Mon, 23 Oct 2000 12:50:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 1443A37B479; Mon, 23 Oct 2000 12:49:13 -0700 (PDT) Message-Id: <20001023194913.1443A37B479@hub.freebsd.org> Date: Mon, 23 Oct 2000 12:49:13 -0700 (PDT) From: scott@renfro.org To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: ports/22257: [ports/misc/rpm-3.0.6] rpm2cpio fails ''cannot re-open payload: (null)'' Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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