[Samba] Flushing wafcache when tweaking Samba builds

Andrew Bartlett abartlet at samba.org
Wed Mar 27 22:24:56 MDT 2013


On Wed, 2013-03-27 at 23:04 -0400, Nico Kadel-Garcia wrote:
> On Tue, Mar 26, 2013 at 5:55 PM, Andrew Bartlett <abartlet at samba.org> wrote:
> > On Fri, 2013-03-22 at 07:53 -0400, Nico Kadel-Garcia wrote:
> >> I notice that Sama builds with Samba 4.0.x now use WAFCACHE to store
> >> temporary files in the build process. Caching these files is fine, but
> >> what clears them out? I've been working in test environments where
> >> WAFCACHE was set to "/tmp/wafcache", such as building Fedora RPM's for
> >> testing, and eventually ran my filesystem out of inodes because
> >> nothing expires them.
> >>
> >> For now, I've left a cron job running to flush old files there, but
> >> does anyone have a better approach? Should the WAFCACHE be in inside
> >> the build tree, and flushed as part of "make clean"?
> >
> > The only waf cache I can find is in bin/.confcache.  Have you set
> > something manually?
> >
> > Andrew Bartlett
> 
> The Fedora SRPM's do, I wa working from those. I had a gentle word
> with them about this, and they're switching it to $PWD/WAFCACHE. in
> the build directory, although the default you've illuminated here
> actually makes more sense.

I wouldn't recommend using it at all between builds.  The Samba Team
never sets it, and ccache is a safer option, as it verifies the input to
gcc, rather than before gcc is called.  

We occasionally have strange situations where waf doesn't think the deps
on a task have changed, but they really have, and the only way to get
things building again is to blow away the target object or the whole
working tree.   If the WAFCACHE is used in an automated process, then
the 'old' result could be silently returned, which might be bad.  

I'm working from this description of it from here, and from private
discussions with Tridge from when we first started with waf:
https://groups.google.com/forum/?fromgroups=#!
topic/waf-users/jegukEHjJ68

Finally, I don't want to slander waf: we use an old version of waf, and
so my concerns might be addressed in a later version, or be specific to
the way Samba (ab)uses waf.

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba mailing list