Bug 2764 - RPM BuildRoot doesn't work properly
Summary: RPM BuildRoot doesn't work properly
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Packaging (show other bugs)
Version: 3.0.14a
Hardware: All Windows XP
: P3 normal
Target Milestone: none
Assignee: Gerald (Jerry) Carter (dead mail address)
QA Contact: Samba QA Contact
Depends on:
Reported: 2005-06-02 04:36 UTC by Joshua Weage
Modified: 2006-01-25 08:25 UTC (History)
1 user (show)

See Also:

RPM spec file (1.77 KB, text/plain)
2005-10-05 08:42 UTC, Joshua Weage
no flags Details
Output from make install portion of rpmbuild (5.97 KB, text/plain)
2005-10-05 09:10 UTC, Joshua Weage
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Weage 2005-06-02 04:36:02 UTC
The BuildRoot option, which installs software to a different location than the
build prefix doesn't work properly with Samba.

The reason is that several paths are set in the Makefile at configure time, and
are not overridden at make time.  In particular, BASEDIR, BINDIR, SBINDIR,
VARDIR and DATADIR.  The others properly reference ${prefix}.  Instead of using
direct autoconfig substitution for the capitalized variables, this should work


Comment 1 Gerald (Jerry) Carter (dead mail address) 2005-08-12 13:03:29 UTC
Joshua,  what packaging directory are you using?
Can you give me some more details on how to produce the failure
during an rpmbuild?  I'm not seeing problems during my 
Comment 2 Joshua Weage 2005-10-05 08:42:26 UTC
Created attachment 1488 [details]
RPM spec file
Comment 3 Joshua Weage 2005-10-05 09:10:18 UTC
Sorry for the slow response.  I've just tried building 3.0.20a and I get the
same problems.

I've attached my spec file and the output from the make install stage.  I'm
building on a Red Hat Enterprise 3 clone.

Samba is built properly; however, the install portion of the process puts the
bin/ sbin/ and var/ directories in the wrong place.  They end up in the final
install path rather than ${buildroot}/install_path.

i.e. at install time, the bin/ sbin/ and var/ directories are not being put into
the user specified prefix directory, which is set on the command line for make.

Possibly a problem with the installbin.sh script?  I don't think what I reported
earlier about the variable definitions is a problem, it should be fine as is.

Comment 4 Joshua Weage 2005-10-05 09:10:47 UTC
Created attachment 1489 [details]
Output from make install portion of rpmbuild
Comment 5 Gerald (Jerry) Carter (dead mail address) 2006-01-25 08:22:40 UTC
The BuildRoot variable works fine in the RHEL/Fedora specfiles
in the source tree.  I'm not sure what the problem here is.
Please recheck 3.0.21b and reopen if needed.  

Also, the rpmbuild log file doesn't really help me 
understand what the problem you reported is.
Comment 6 Gerald (Jerry) Carter (dead mail address) 2006-01-25 08:23:12 UTC
Scratch that.  I see it now.
Comment 7 Gerald (Jerry) Carter (dead mail address) 2006-01-25 08:25:13 UTC
OK.  The fix is to call make install like: