rpm2cpio.pl revision 307
307N/A# Copyright (C) 1997,1998,1999, Roger Espel Llima 307N/A# Permission is hereby granted, free of charge, to any person obtaining a copy 307N/A# of this software and any associated documentation files (the "Software"), to 307N/A# deal in the Software without restriction, including without limitation the 307N/A# rights to use, copy, modify, merge, publish, distribute, sublicense, 307N/A# and/or sell copies of the Software, and to permit persons to whom the 307N/A# Software is furnished to do so, subject to the following conditions: 307N/A# The above copyright notice and this permission notice shall be included in 307N/A# all copies or substantial portions of the Software. 307N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 307N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 307N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 307N/A# SOFTWARE'S COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 307N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 307N/A# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 307N/A# why does the world need another rpm2cpio? because the existing one 307N/A# won't build unless you have half a ton of things that aren't really 307N/A# required for it, since it uses the same library used to extract RPM's. 307N/A# in particular, it won't build on the HPsUX box i'm on. 307N/A open(F,
"< $ARGV[0]")
or die "Can't read file $ARGV[0]\n";
307N/A die "Error: header not recognized\n" if $
magic !=
0x8eade801;
307N/Aopen(
ZCAT,
"|gzip -cd") ||
die "can't pipe to gzip\n";