www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/09/06/19:49:53

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: "Suhaib M. Siddiqi" <ssiddiqi AT ipass DOT net>
To: "Charles S. Wilson" <cwilson AT ece DOT gatech DOT edu>,
<cygwin AT sourceware DOT cygnus DOT com>
Subject: RE: [ANN] rpm-3.0.2 for cygwinb20.1
Date: Mon, 6 Sep 1999 19:47:08 -0400
Message-ID: <LOBBLPGIHMIEGBEAFDMCCEPECAAA.ssiddiqi@ipass.net>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
In-Reply-To: <37D4397B.AAEFF2AC@ece.gatech.edu>
Importance: Normal

------=_NextPart_000_0000_01BEF8A0.9A9F75B0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Ummm... and i use the attached script rpm2cpio.  It uses your perl
to extract the *.tar.gz file from rpm.  Maybe you can stick it with
your rpm URL, since it relates to your Perl port.

Usage is: rpm2cpio my.rpm | cpio -i 
You also need cpio.

Suhaib

> -----Original Message-----
> From: cygwin-owner AT sourceware DOT cygnus DOT com
> [mailto:cygwin-owner AT sourceware DOT cygnus DOT com]On Behalf Of Charles S.
> Wilson
> Sent: Monday, September 06, 1999 6:00 PM
> To: cygwin AT sourceware DOT cygnus DOT com
> Subject: [ANN] rpm-3.0.2 for cygwinb20.1
> 
> 
> A binary kit, source + patches, and build instructions for rpm-3.0.2 are
> available at http://cygutils.netpedia.net/. It may also show up on
> ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/porters/Wil
> son_Charles/B20/rpm
> eventually. Built using gettext-0.10.35 and db-2.7.7 (with 1.85
> compatibility enabled).
> 
> Coming soon: perl5.005_61 (dynamic) with module installation via rpm.
> 
> --Chuck Wilson
> 
> 
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
> 
------=_NextPart_000_0000_01BEF8A0.9A9F75B0
Content-Type: application/octet-stream;
	name="rpm2cpio"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="rpm2cpio"

#!/usr/bin/perl

# why does the world need another rpm2cpio?  because the existing one
# won't build unless you have half a ton of things that aren't really
# required for it, since it uses the same library used to extract RPM's.
# in particular, it won't build on the HPsUX box i'm on.

# add a path if desired
$gzip = "gzip";

sub printhelp {
  print "rpm2cpio, perl version by orabidoo <odar\@pobox.com>\n";
  print "use: rpm2cpio [file.rpm]\n";
  print "dumps the contents to stdout as a GNU cpio archive\n";
  exit 0;
}

if ($#ARGV == -1) {
  printhelp if -t STDIN;
  $f = "STDIN";
} elsif ($#ARGV == 0) {
  open(F, "< $ARGV[0]") or die "Can't read file $ARGV[0]\n";
  $f = 'F';
} else {
  printhelp;
}

printhelp if -t STDOUT;

# gobble the file up
undef $/;
$|=1;
$rpm = <$f>;
close ($f);

($magic, $major, $minor, $crap) = unpack("NCC C90", $rpm);

die "Not an RPM\n" if $magic != 0xedabeedb;
die "Not a version 3 RPM\n" if $major != 3;

$rpm = substr($rpm, 96);

while ($rpm ne '') {
  $rpm =~ s/^\c@*//s;
  ($magic, $crap, $sections, $bytes) = unpack("N4", $rpm);
  $smagic = unpack("n", $rpm);
  last if $smagic eq 0x1f8b;
  die "Error: header not recognized\n" if $magic != 0x8eade801;
  $rpm = substr($rpm, 16*(1+$sections) + $bytes);
}

die "bogus RPM\n" if $rpm eq '';

open(ZCAT, "|gzip -cd") || die "can't pipe to gzip\n";
print STDERR "CPIO archive found!\n";

print ZCAT $rpm;
close ZCAT;





------=_NextPart_000_0000_01BEF8A0.9A9F75B0
Content-Type: text/plain; charset=us-ascii

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
------=_NextPart_000_0000_01BEF8A0.9A9F75B0--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019