Bug 76234 - check-files fails if $RPM_BUILD_ROOT contains //
check-files fails if $RPM_BUILD_ROOT contains //
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-18 11:13 EDT by David Juran
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:
Environment:
Last Closed: 2002-11-02 11:58:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description David Juran 2002-10-18 11:13:56 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):


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 11:16:51 EDT
Created attachment 80944 [details]
This patch will solve the problem
Comment 2 Jeff Johnson 2002-10-25 11:55:36 EDT
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 11:30:48 EST
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 11:58:33 EST
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 12:08:54 EST
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.