R P M U N P A C K



Today, many sources and binaries for the Linux community get distributed as
files for the RedHat Package Manager, or RPM for short. Unfortunately, I
haven't been able to find any freely available decoder source code for those
packages, not to speak of a format description. Therefore I took a look at
some RPM packages, compared them a little bit, and finally wrote this little
program as a quick hack. It extracts the main archive from an RPM file, which
usually is a GZIP-compressed CPIO archive.


Usage:
=====

You can either feed the RPM file into rpmunpack via standard input, or give
the file name on the command line. In the first case, the archive gets
written to standard out, and in the second case the name of the output
file gets constructed by appending ".cpio.gz" to the end of the archive
name which is stored within the RPM file. Examples:

	rpmunpack < at.spm | gzip -d | cpio -idm

		This will decode the RPM file "at.spm", decompress it and
		extract all files with cpio, which are enclosed in the
		archive.

	rpmunpack at.spm

		Suppose that the package name "at-3.8.1-6" is encoded within
		the RPM file (you can check this package name by using the
		UNIX file command, BTW), rpmunpack will generate the output
		file "at-3.8.1-6.cpio.gz" from the source RPM file "at.spm".



Copyright:
=========

This program has been released into the public domain. You can do whatever
you like with it. This includes modifying the source, redistributing it etc.
However, this source code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. The author cannot be held liable for any
damage whatsoever produced by the intended or even incorrect use of any part
of this source code, the resulting binary or any product generated by using
and/or modifying these sources.


Gero Kuhlmann