Red Hat Bugzilla – Bug 76234
check-files fails if $RPM_BUILD_ROOT contains //
Last modified: 2008-05-01 11:38:04 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830
Description of problem:
For some reason, my $RPM_BUILD_ROOT variable was set to //var/tmp/package. I
don't think the doubble slash in the beginning of the file name should be
considered an error, since the filesystem accepts it, however the check-files
script gave the result that all my files where not being packaged.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. make sure your $RPM_BUILD_ROOT starts with //
2. try to build an rpm
Created attachment 80944 [details]
This patch will solve the problem
The patch is OK (but perl, ick :-)
However, the real problem is that RPM_BUILD_ROOT
should never have had the double // in the first
How are you setting RPM_BUILD_ROOT? Manually, or
just using what rpm provides? If rpm, what version,
and do you have redhat-rpm-config installed (or
otherwise configuring rpm)?
I agree the original problem was that RPM_BUILD_ROOT contained doubble slashes,
however this little patch will make the script more robust. (And I guess it
could be make in sed as well (-:
I stumbeled upon the error while rebuilding a 3:rd party rpm,
http://ac2i.tzo.com/dctc/dctc-0.83.6-1.src.rpm I think it was. I never did find
out why I got that extra '/' in that variable, (can't say I looked that hard for
it though.) But no, I don not set it manually nor is it set in the spec-file
either as far as I can see. And no, I don't have redhat-rpm/config installed.
I have rpm-4.1-1.06
Again, the real problem (and fix) is to
sanitize the RPM_BUILD_ROOT path to
remove the double '//', not to deal
with the symptom by hacking the check-files
script. Ther are serious problems with
non-canonical paths like
that cannot be fixed or worked around in scripts.
Yes "//" is innocuous, the general canonicalization
FWIW, the check-files script will
be replaced by an rpmbuild internal fts(3)
walk in rpm-4.2.
I don't see a double '//' when rebuilding the
package. That means that your machine is configured
with either a trailing slash on the macro %_tmpdir
and/or a configured %buildroot. See the output
of rpm --showrc to figger what's up.