<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 28, 2013 at 2:46 PM, Andrew Bartlett <span dir="ltr"><<a href="mailto:abartlet@samba.org" target="_blank">abartlet@samba.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On Tue, 2013-05-28 at 17:36 -0400, Anand Avati wrote:<br>
> Implement a Samba VFS plugin for glusterfs based on gluster's gfapi.<br>
> This is a "bottom" vfs plugin (not something to be stacked on top of<br>
> another module), and translates (most) calls into closest actions<br>
> on gfapi.<br>
<br>
</div>Thank you for your patience here.<br>
<div class="im"><br>
> Signed-off-by: Anand Avati <<a href="mailto:avati@redhat.com">avati@redhat.com</a>><br>
> ---<br>
><br>
> Hi,<br>
><br>
> I hope the waf changes are fine. I could not test them because builds were failing generally on samba.git master HEAD.<br>
<br>
</div>You need to resolve whatever is causing your problems here, as it is not<br>
a general issue. Our autobuild system ensures that git master and<br>
v4-0-test always compile and test in at least Ubuntu 10.04, and it is<br>
incredibly rare that it not work on at least Linux without it being a<br>
specifically local issue.<br>
<div class="im"><br>
+<br>
+bld.SAMBA3_MODULE('vfs_glusterfs',<br>
+ subsystem='vfs',<br>
+ source=VFS_GLUSTERFS_SRC,<br>
+ deps='samba-util',<br>
+ init_function='',<br>
+ internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_glusterfs'),<br>
+ enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_glusterfs'))<br>
<br>
</div>You should ensure your module depends on glusterfs, by changing that to<br>
adding deps='glusterfs samba-util' (and making that match what the<br>
conf.check_cfg finds and stores).</blockquote><div><br></div><div style>I tried that. I added uselib_store='glusterfs' and included 'glusterfs' in deps= line. However while building I get this error:</div>
<div style><br></div><div style><div>[avati@blackbox samba]$ make</div><div>WAF_MAKE=1 python ./buildtools/bin/waf build</div><div>./buildtools/wafsamba/samba_utils.py:397: DeprecationWarning: the md5 module is deprecated; use hashlib instead</div>
<div> import md5</div><div>Waf: Entering directory `/home/avati/work/samba/bin'</div><div><span class="" style="white-space:pre">        </span>Selected embedded Heimdal build</div><div>Checking project rules ...</div><div>
Unknown dependency 'glusterfs' in 'vfs_glusterfs'</div><div>make: *** [all] Error 1</div><div><br></div><div><br></div><div style>I am not familiar with waf, and trying to figure out how it works. I don't understand how the check_cfg() in wscript and source3/wscript_build's bld.SAMBA3_MODULE() actually integrate internally.</div>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">
> diff --git a/source3/wscript b/source3/wscript<br>
> index dba6cdc..0d07692 100644<br>
> --- a/source3/wscript<br>
> +++ b/source3/wscript<br>
> @@ -59,6 +59,11 @@ def set_options(opt):<br>
> help=("Directory under which libcephfs is installed"),<br>
> action="store", dest='libcephfs_dir', default=None)<br>
><br>
> + opt.add_option('--enable-glusterfs',<br>
> + help=("Enable building vfs_glusterfs module"),<br>
> + action="store_true", dest='enable_glusterfs', default=True)<br>
> + opt.add_option('--disable-glusterfs', help=SUPPRESS_HELP,<br>
> + action="store_false", dest='enable_glusterfs')<br>
<br>
</div>In general we would prefer not to have options for every possible<br>
module. Instead, please just make it automatic based on finding<br>
glusterfs.</blockquote><div><br></div><div style>OK, I will just leave things to check_cfg() detection then?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">
> def configure(conf):<br>
> @@ -1709,6 +1714,13 @@ main() {<br>
> if conf.CHECK_HEADERS('cephfs/libcephfs.h', False, False, 'cephfs') and conf.CHECK_LIB('cephfs'):<br>
> conf.DEFINE('HAVE_CEPH', '1')<br>
><br>
> + conf.env.enable_glusterfs = Options.options.enable_glusterfs<br>
> +<br>
> + if Options.options.enable_glusterfs:<br>
> + conf.check_cfg(package='glusterfs-api', args='"glusterfs-api >= 4" --cflags --libs',<br>
> + uselib_store='GLUSTERFS', msg='Checking for glusterfs-api >= 4',<br>
> + mandatory=False)<br>
> +<br>
> conf.env.build_regedit = False<br>
> if not Options.options.with_regedit == False:<br>
> conf.PROCESS_SEPARATE_RULE('system_ncurses')<br>
> @@ -1797,6 +1809,9 @@ main() {<br>
> if conf.CONFIG_SET("HAVE_CEPH"):<br>
> default_shared_modules.extend(TO_LIST('vfs_ceph'))<br>
><br>
> + if conf.CONFIG_SET('HAVE_GLUSTERFS'):<br>
> + default_shared_modules.extend(TO_LIST('vfs_glusterfs'))<br>
> +<br>
> explicit_shared_modules = TO_LIST(Options.options.shared_modules, delimiter=',')<br>
> explicit_static_modules = TO_LIST(Options.options.static_modules, delimiter=',')<br>
<br>
</div>This much looks good, assuming it is tested and works. You might need<br>
to make uselib_store='glusterfs' (not sure).</blockquote><div><br></div><div style>As mentioned above, I tried this but still get the dependency error. Not sure what I am missing..</div><div style><br></div><div style>
Avati</div></div></div></div>