Red Hat Bugzilla – Bug 1001553
error reading from file in case if rpm has only one file within
Last modified: 2013-09-22 20:16:15 EDT
Description of problem:
In case if I try to install the rpm which is consists from only one file to the specific directory with doubled slashes in the path, then I'll get the error.
But if I remove the duplicate slash from the prefix path or choose the package with two or more files then no any errors will apear.
Version-Release number of selected component (if applicable):
RPM version 18.104.22.168
How reproducible: always
Steps to Reproduce:
1. Create the rpm with one file within.
2. Run the rpm install with following command:
[root@nntclxxx rpm]# rpm -i --nodeps --prefix="/opt/aaa//bbb" "intel-mkl-pgi-devel-080-11.1-0.x86_64.rpm"
Actual results: Following error appeared:
"error: error reading from file intel-mkl-pgi-devel-080-11.1-0.x86_64.rpm"
Expected results: The rpm installed w/o any errors.
Additional info: This bug cannot be reproduced on other OS'es.
The problem can be reproduced not only with prefix with double slash, for example it can be reproooodduced with following command:
rpm -i --nodeps --prefix="/opt/aaa" "intel-mkl-pgi-devel-080-11.1-0.x86_64.rpm"
But the following command installs rpm w/o errors:
rpm -i --nodeps --prefix="/opt/aaa/bbb" "intel-mkl-pgi-devel-080-11.1-0.x86_64.rpm"
Can you provide a pointer to the reproducer package?
Created attachment 790884 [details]
rpm for reproducing the issue
The RPM for reproducing the issue was attached.
Okay, easily reproduced with that, thanks. The problem starts with this commit (between rpm 4.9.x and 4.10.x):
Author: Panu Matilainen <email@example.com>
Date: Sat Jan 28 17:53:11 2012 +0200
Test for filename triplet sanity in rpmfiNew()
- Basename and dirindex counts must be equal, dirnames count must be
larger than zero and no larger than number of basenames. Check
that directory indexes are within range.
- There are mountains of further checks to be added here (and elsewhere)
but we gotta start somewhere... and filename triplets are one of the more
critical elements we got.
In other words, its tripping up on this new sanity check when relocating, which suggests a bug in the relocation code. By the look of things, the relocation bug is old as ages but as its mostly harmless in that it just leaves an "orphan" (ie unused) directory name in the header nobody has noticed it prior to the sanity check.
Fixed upstream: http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=65c7cc17664358051f0358de272e616dd88ab624
ran into this problem too, i've even tracked it down to the indexSane function some weeks ago but then totally forgot about the problem :(
this is why one can't install LibreOffice upstream RPM releases
on Fedora 19 with the user-install script, which uses rpm --relocate;
the (first) failure is on the libreoffice4.0-base RPM which contains
a single file.
with the commit from comment #5 it works again, thanks!
rpm-4.11.1-7.fc20 has been submitted as an update for Fedora 20.
rpm-4.11.1-2.fc19 has been submitted as an update for Fedora 19.
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rpm-4.11.1-3.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
rpm-4.11.1-3.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
rpm-4.11.1-7.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.