Patch for VFS Example

Richard Sharpe realrichardsharpe at gmail.com
Sun Feb 23 18:31:25 MST 2014


On Sun, Feb 23, 2014 at 7:12 AM, Dustin Oprea <myselfasunder at gmail.com> wrote:
> On Sat, Feb 22, 2014 at 8:30 PM, Richard Sharpe
> <realrichardsharpe at gmail.com> wrote:
>>
>> On Sat, Feb 22, 2014 at 4:00 PM, Dustin Oprea <myselfasunder at gmail.com>
>> wrote:
>> > On Sat, Feb 22, 2014 at 5:26 PM, Richard Sharpe
>> > <realrichardsharpe at gmail.com> wrote:
>> >>
>> >> On Sat, Feb 22, 2014 at 2:20 PM, Dustin Oprea <myselfasunder at gmail.com>
>> >> wrote:
>> >> > It looks like the "skel-opaque" VFS example needs to be fixed. I'm
>> >> > not
>> >> > sure
>> >> > how this function would've ever been called (
>> >> > ("init_samba_module", "samba_init_module", and "init_module" seem to
>> >> > be
>> >> > the
>> >> > only names that would've ever been acceptable), and the name-type
>> >> > literal
>> >> > implies that this example was just copied from the "transparent"
>> >> > example.
>> >>
>> >> There is some magic going on in an in-tree build ... however, the
>> >> magic might have lost its power in the face of Samba 4.x.
>> >>
>> >> > Original:
>> >> >
>> >> > NTSTATUS vfs_skel_transparent_init(void)
>> >> > {
>> >> >     return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
>> >> > "skel_transparent",
>> >> > &skel_transparent_fns);
>> >> > }
>> >> >
>> >> > Updated:
>> >> >
>> >> > NTSTATUS init_samba_module(void)
>> >> > {
>> >> >     return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque",
>> >> > &skel_transparent_fns);
>> >> > }
>> >> >
>> >> > This is probably obvious to anyone who has experience in building VFS
>> >> > modules, but not so much for those of us who'd like to do a simple
>> >> > example.
>> >> >
>> >> > Can I submit a patch?
>> >> >
>> >> > Also, the *http://www.samba.org/~sharpe/The-Samba-VFS.pdf
>> >> > <http://www.samba.org/~sharpe/The-Samba-VFS.pdf>* document seems to
>> >> > no
>> >> > longer be accurate in how to configure/build VFS modules. Can it be
>> >> > updated
>> >> > (I'd update it, but I don't see how I could), or is there a better
>> >> > alternative somewhere else?
>> >>
>> >> If you send me what you think are the corrections I will see if I can
>> >> find the time to verify them and update the document :-)
>> >
>> > I've attached a patch for the former.
>> >
>> > As for the latter (the doc fixes):
>> >
>> > - for the Git build, there is no longer a configure or configure.in in
>> > the
>> > source3/ directory.
>> > - for the package, the above applies, as well as the fact that there
>> > isn't a
>> > Makefile.in, either (which is required by the instructions).
>>
>> Ahhh, sure. Samba 4 has moved to using waf ...
>>
>> > Also, I wasn't interested in using my own source-tree (I just wanted to
>> > get
>> > something to build, to begin with, because it seems like it should be
>> > more
>> > straight-forward than any other route), but that section mentions
>> > autogen.sh, and none exists, in either the package or the Git tree.
>>
>> Hmmm, some updating is needed ...
>>
>> --
>> Regards,
>> Richard Sharpe
>> (何以解憂?唯有杜康。--曹操)
>
>
> Was that last patch going to be merged-in, to fix the example? I didn't get
> any feedback.

We are under no obligation to provide feedback ...

> Okay, so waf is being used. Based on the waf documentation, the commands
> that I should be able to run should be defined in the wscript module in
> whatever directory I'm currently running it from. The methods that
> correspond to these commands have a context parameter ("ctx", by
> convention). There are "configure" and "build" methods, but they are not
> defined in this way (and fail as expected).
>
> Do I need a specific version of waf? Is there an up-to-date walkthrough on
> how to build, somewhere online? Obviously, waf is a more obscure build tool,
> and I've never before used it.
>
> Can you just get me going on this...?

I tried this in the examples/VFS directory:

../../buildtools/bin/waf
Waf: Entering directory `/home/rsharpe/samba/samba.master/bin'
Selected embedded Heimdal build
Waf: Leaving directory `/home/rsharpe/samba/samba.master/bin'
input file '../examples/VFS/version.h' could not be found
('/home/rsharpe/samba/samba.master/dynconfig')

Something is wrong with my sandbox at the moment ...

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list