Red Hat Bugzilla – Bug 58101
Packages built on Tru64 Unix are "different"
Last modified: 2008-05-01 11:38:01 EDT
This is per a discussion on firstname.lastname@example.org.
Jeff Johnson posted an "rpm2cpio.sh" that should decode RPM packages (this is to
avoid the number of dependencies in the C version). However, it does not decode
RPM packages built under Tru64 Unix, although the C version will. The problem
is not the Tru64 toolset (rpm2cpio.sh running on Linux/x86 cannot decode a Tru64
Anyway, here is a pointer to an RPM built on Tru64:
Hmmm, rpm2cpio.sh is reading the header 8b deeper than it should be.
That means that either
1) the padding calculation in rpm2cpio.sh is broken.
2) you've lost 8b from the signature/padding on Tru64.
Ah yes, modulo arithmetic to calculate the signature padding
with expr(1) was broke.
Here's the patch for rpm2cpio.sh:
- o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \% 8 \) + 8`
+ o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
BTW: if you change the last line to:
dd if=$pkg ibs=$o skip=1 2> /dev/null | gunzip
it (a) gets rid of the messages from dd and (b) changes the block size
to something bigger so it runs much faster (the odd block size shouldn't
Also, I added a little error checking at the top:
if [ "$pkg" = "" -o ! -e "$pkg" ]; then
echo "no package supplied" 1>&2
Thanks for the patch.
FWIW, the to rpm2cpio.sh script was written in a moment of pique
caused by one too many attacks from Debian/dpkg folk that
The rpm package format cannot be read by common unix tools.