[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: format of cpio archive generated from rpm2cpio



On Tue, Nov 07, 2006 at 01:38:35PM +0100, Rohitashva Sharma wrote:
> Hello All,
> 
> can anybody tell me the format in which rpm2cpio creates the cpio archive?
> 
> can that cpio archive be tested against the --only-verify-crc option
> of cpio command?

format="$(rpm2cpio rpms/RPMS/i386/gpart-0.1h-3.1.i386.rpm | dd bs=6 count=1 2> /dev/null)"
echo format: $format
if [ $format = "070701" ]; then
	echo "cpio, no crc"
elif [ $format = "070702" ]; then
	echo "cpio, crc"
else
	echo "unknown format"
fi

From my tests, it doesn't include crc info. Note that it isn't
important. rpm includes md5/sha1 of all files and the data is usually
compressed with gzip/bzip2, that also includes a crc.

$ rpm -K rpms/RPMS/i386/gpart-0.1h-3.1.i386.rpm 
rpms/RPMS/i386/gpart-0.1h-3.1.i386.rpm: sha1 md5 OK

-- 
lfr
0/0

Attachment: pgpw65pDaAujG.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]