RPM spec files and waf

simo idra at samba.org
Tue Apr 13 08:11:56 MDT 2010


On Tue, 2010-04-13 at 23:42 +1000, tridge at samba.org wrote:
> Hi Simo,
> 
> I did some work today to make the waf build of the RPMs for talloc,
> tdb and tevent work better. I've successfully built RPMs based on the
> FC13 spec files now.
> 
> The main changes I needed to make to the spec files were:
> 
>  - use ./autogen-waf.sh (as we've discussed already)

Yes, this would go away once we run it before building the tarball, but
it is ok for now.

>  - in some places use "ln -sf" instead of "ln -s" for the library
>    links. Some of the spec files assumed the build would create the
>    library links, and some of the spec files assumed it
>    wouldn't. Using ln -sf makes it worth either way (the waf build
>    always creates the links).

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

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

>  - I added --bundled-libraries=NONE to the libtevent spec file, to
>    ensure it used the system talloc. 

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

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

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.

> The working spec files are at:
> 
>   http://samba.org/tridge/waf-specs/
> 
> if you would like to take a look. I haven't tested the ldb RPM build
> yet, although I expect it will be the same level of simple changes
> needed for the others.

The changes are more or less what I expected for RPM builds, thanks!

rpmlint seem to be ok with the spec files too, it only complained about
the missing Sources, which is understandable given we have not released
them yet :)

$ rpmlint libtalloc.spec 
libtalloc.spec: W: invalid-url Source0: http://samba.org/ftp/talloc/talloc-2.0.2.tar.gz HTTP Error 404: Not Found
0 packages and 1 specfiles checked; 0 errors, 1 warnings.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the samba-technical mailing list