Best practice in building custom vfs modules

Holger Hetterich hhetter at novell.com
Wed May 19 06:49:22 MDT 2010


Am Mittwoch, 19. Mai 2010 13:48:39 schrieb Giampaolo Tomassoni:
> > Hi Giampaolo,
> 
> Hi Holger,
> 
> > I don't know of such a way currently.There's samba-vscan, which
> > tries to build externally
> 
> Ah, samba-vscan: thank you for the hint. Now I have a starting point to
> build a configure script to deal with it.
> 

Beware, vscan is currently not in a compile able state against the current
VFS api, and probably will never be, as Rainer Link and me are working
on a new implementation, that is as simplified as possible from the VFS POV, 
and should be much easier to maintain in future.

> > , but it a) requires generated config.h
> > from a ./configure run of Samba b) does do a lot of effort to care
> > for any older samba version it should run on.

In the case of samba-vscan, it led to horrible code over the years. No pun
intendet to the author(s), but it can for sure be redesigned to a single
module, and doing all the rest in 3rd party applications.

> 
> > As my modules are likely for public interest, I also have the option to
> > get it into the samba master tree by asking some friendly samba team
> > members (they are all friendly ;)  ). As you said your module is for
> > someones specific needs, that situation might not be interesting to
> > you.
> 
> In my case it would be like shooting to sparrows with a cannon... :)
> 

That depends. By maintaining a version of your module for the samba
master tree (be it even upstream or not), it's relativly easy to stay on
track, once you have the code running based on the newest source.  
And once you have backported a version of the code to the samba version
you are targetting, it's easy to bring back changes you made,
down to this version. I then provide my client a completely packaged samba
containing this module. (e.g. through the openSUSE Buildservice).

> I guess however that we are not the only two persons to develop a custom
> vfs for samba, so maybe also the samba team may find useful to somehow
> "externalize" the includes needed to build a vfs. I think it should be
> possible.

I think it should be possible, it just isn't in my focus currently.

> 
> What about posting a feature request?
> 

Do it. Maybe I am totally wrong and a nice way to build external modules
already exists.


> Thank you for your hints,

Thanks for your interest,
Holger

> 
> Giampaolo


-- 
Holger Hetterich, hhetter at novell.com, 
  SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
   Maxfeldstr. 5, 90409 Nürnberg, Germany


More information about the samba-technical mailing list