RPM spec files and waf

tridge at samba.org tridge at samba.org
Tue Apr 13 21:44:30 MDT 2010

Hi Simo,

 > In general we prefer to not use force flags to catch changes, but it is
 > not a big deal.

ok - once we have a single consistent build system that always
generates the right symlinks (which waf build does now) than we could
just remove those lines from the spec files.

 > >  - I added --disable-rpath into all 3 spec files, as discussed on the
 > >    waf wiki page
 > Uhmm I thought rpath would automatically stripped by default on make
 > install, is this not the case ?

rpath is enabled for both build and install by default. I did think
pretty carefully about the various use cases before choosing that
default. The reasoning is this:

 - for distro packaging people they will almost certainly want rpath
   off on install and probably on build too, but there aren't actually
   many packaging people, and requiring them to add --disable-rpath to
   the %configure line isn't much to ask

 - for people who download and install Samba themselves (eg. the
   various people on IRC, and all those who download our alpha/beta
   releases, or who build on platforms without up to date binary
   packages), I think rpath on in the install is much better as it
   ensures the right binary is used with the right library. It also
   means you don't need to modify your global ld.so.conf setup in
   order to install a test build of Samba, and you can have multiple
   builds setup in different directories without them interfering with
   each other.

For the 2nd group of people, I think we should have lower expectations
for them reading documentation. I think that ./configure --prefix=xxx
should work as well as it can for poeple doing their own builds. That
means using rpath on platforms where it is supported.

There is a section on this on the WAF wiki page, with a separate
section with recommendations for packagers.

 > I think --bundled-libraries=NONE should be the default for standalone
 > libs, but for now it is ok.

It's not the default at the moment because that would mean
"./configure --prefix=xxx" would fail for tevent and ldb if you didn't
have the required libs installed.

Note that it does currently prefer system libs if they are available
and have the right version. When you set --bundled-libraries=NONE you
are asking for the configure to fail if you don't have the right
system libs. That is more the sort of thing a packager wants, rather
than someone who is trying ldb after downloading from ldb.samba.org.

 > >  - I also had to add --minimum-library-version=talloc:2.0.1 as a hack
 > >    for tevent, as I didn't have root on the box I was testing on, so I
 > >    couldn't install the required 2.0.2 version of talloc.
 > Why didn't you just set Requires: libtalloc-devel >= 2.0.1 ?

The 'Requires' line in rpm is not passed down to the waf build. The
--minimum-library-version configure option changes the default minimum
system library version that ./configure will accept. The two have to
be done separately.

In practice we should never be using --minimum-library-version, as it
can lead to broken builds. For example, using
--minimum-library-version=talloc:2.0.1 would allow a system talloc
library to be used which has a serious bug that we have fixed in
2.0.2. I only added it for this example as I didn't have root on the
box, and I wanted to test the RPM build.

 > Also, we should probably require python too and any module that waf
 > depends on, or mock builds (builds done with a minimal chroot generated
 > from the Requires) may fail.

good point. I'm not quite sure what the right incantations for that
are in the spec file. Can you add that and test it with a mock build?

Cheers, Tridge

More information about the samba-technical mailing list