craigwblake / redline

Pure Java Rpm Library
http://redline-rpm.org
MIT License
128 stars 97 forks source link

RPM is not installable on RHEL4 (RPM v. 4.3.3) #107

Open sc1478 opened 8 years ago

sc1478 commented 8 years ago

This is different from some other similar issues in that I'm trying to install onto an older version of Linux than that on which the rpm was built. Other issues such as #42 seem to be trying to install on newer versions. In any case the error message is different:

# rpm -Uvh /var/tmp/xyz-12.0.1-cs.noarch.rpm 
error: /var/tmp/xyz-12.0.1-cs.noarch.rpm: headerRead failed: Header sanity check: OK
Segmentation fault

Same or similar issue is encountered when trying to READ the rpm


rpm -qlvp /var/tmp/xyz-12.0.1-cs.noarch.rpm 
error: /var/tmp/xyz-12.0.1-cs.noarch.rpm: headerRead failed: Header sanity check: OK
sc1478 commented 8 years ago

A temporary workaround for this issue is adopting pull request #104. In my case, my requirements include supporting rpm versions from 4.3.3 to 4.8.0. I do understand that rpm > 4.11.0 will break with this "fix", but that's an issue to be solved. I suppose some sort of optional setting will be required.

rschlussel-zz commented 8 years ago

I wanted to clarify that rpm > 4.11.0 doesn't break with the fix. The issues with 4.11.0 had to do with stricter spec validation (see http://www.rpm.org/wiki/Releases/4.11.0#Compatibilitynotes). The larger inode values are instead a feature that was added in rpm >=4.6 that's not available in 4.4 (See: http://www.rpm.org/wiki/Releases/4.6.0#Compatibilitynotes). The change to use 64-bit inode values just happens to have been in the same release of redline as the fixes for rpm>4.11.0.

In any case, I believe this can be closed as a duplicate of https://github.com/craigwblake/redline/issues/97