Bug 76234 - check-files fails if $RPM_BUILD_ROOT contains //
Summary: check-files fails if $RPM_BUILD_ROOT contains //
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm-build
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-18 15:13 UTC by David Juran
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-11-02 16:58:40 UTC
Embargoed:


Attachments (Terms of Use)
This patch will solve the problem (558 bytes, patch)
2002-10-18 15:16 UTC, David Juran
no flags Details | Diff

Description David Juran 2002-10-18 15:13:56 UTC
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):


How reproducible:
Always

Steps to Reproduce:
1. make sure your $RPM_BUILD_ROOT starts with //
2. try to build an rpm

Comment 1 David Juran 2002-10-18 15:16:51 UTC
Created attachment 80944 [details]
This patch will solve the problem

Comment 2 Jeff Johnson 2002-10-25 15:55:36 UTC
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
place.

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)?

Comment 3 David Juran 2002-11-02 16:30:48 UTC
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

Comment 4 Jeff Johnson 2002-11-02 16:58:33 UTC
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
	BuildRoot: /../../../../some_path
that cannot be fixed or worked around in scripts.
Yes "//" is innocuous, the general canonicalization
problem remains.

FWIW, the check-files script will
be replaced by an rpmbuild internal fts(3)
walk in rpm-4.2.

Comment 5 Jeff Johnson 2002-11-02 17:08:54 UTC
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.


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