Bug 58101 - Packages built on Tru64 Unix are "different"
Packages built on Tru64 Unix are "different"
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2002-01-08 10:52 EST by Chris Adams
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-01-08 11:39:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Chris Adams 2002-01-08 10:52:28 EST
This is per a discussion on rpm-list@redhat.com.

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
package either).

Anyway, here is a pointer to an RPM built on Tru64:

Comment 1 Jeff Johnson 2002-01-08 11:39:19 EST
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.
Comment 2 Jeff Johnson 2002-01-08 11:59:14 EST
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`
Comment 3 Chris Adams 2002-01-08 12:14:46 EST
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
hurt anything).

Also, I added a little error checking at the top:

if [ "$pkg" = "" -o ! -e "$pkg" ]; then
        echo "no package supplied" 1>&2
        exit 1

Comment 4 Jeff Johnson 2002-01-08 12:26:31 EST
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.

Note You need to log in before you can comment on or make changes to this bug.