<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">&lt;<a href="mailto:abartlet@samba.org" target="_blank">abartlet@samba.org</a>&gt;</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>

&gt; Implement a Samba VFS plugin for glusterfs based on gluster&#39;s gfapi.<br>
&gt; This is a &quot;bottom&quot; vfs plugin (not something to be stacked on top of<br>
&gt; another module), and translates (most) calls into closest actions<br>
&gt; on gfapi.<br>
<br>
</div>Thank you for your patience here.<br>
<div class="im"><br>
&gt; Signed-off-by: Anand Avati &lt;<a href="mailto:avati@redhat.com">avati@redhat.com</a>&gt;<br>
&gt; ---<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; 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(&#39;vfs_glusterfs&#39;,<br>
+                  subsystem=&#39;vfs&#39;,<br>
+                  source=VFS_GLUSTERFS_SRC,<br>
+                  deps=&#39;samba-util&#39;,<br>
+                  init_function=&#39;&#39;,<br>
+                  internal_module=bld.SAMBA3_IS_STATIC_MODULE(&#39;vfs_glusterfs&#39;),<br>
+                  enabled=bld.SAMBA3_IS_ENABLED_MODULE(&#39;vfs_glusterfs&#39;))<br>
<br>
</div>You should ensure your module depends on glusterfs, by changing that to<br>
adding deps=&#39;glusterfs samba-util&#39; (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=&#39;glusterfs&#39; and included &#39;glusterfs&#39; 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&#39;</div><div><span class="" style="white-space:pre">        </span>Selected embedded Heimdal build</div><div>Checking project rules ...</div><div>
Unknown dependency &#39;glusterfs&#39; in &#39;vfs_glusterfs&#39;</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&#39;t understand how the check_cfg() in wscript and source3/wscript_build&#39;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">
&gt; diff --git a/source3/wscript b/source3/wscript<br>
&gt; index dba6cdc..0d07692 100644<br>
&gt; --- a/source3/wscript<br>
&gt; +++ b/source3/wscript<br>
&gt; @@ -59,6 +59,11 @@ def set_options(opt):<br>
&gt;                     help=(&quot;Directory under which libcephfs is installed&quot;),<br>
&gt;                     action=&quot;store&quot;, dest=&#39;libcephfs_dir&#39;, default=None)<br>
&gt;<br>
&gt; +    opt.add_option(&#39;--enable-glusterfs&#39;,<br>
&gt; +                   help=(&quot;Enable building vfs_glusterfs module&quot;),<br>
&gt; +                   action=&quot;store_true&quot;, dest=&#39;enable_glusterfs&#39;, default=True)<br>
&gt; +    opt.add_option(&#39;--disable-glusterfs&#39;, help=SUPPRESS_HELP,<br>
&gt; +                   action=&quot;store_false&quot;, dest=&#39;enable_glusterfs&#39;)<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">
&gt;  def configure(conf):<br>
&gt; @@ -1709,6 +1714,13 @@ main() {<br>
&gt;      if conf.CHECK_HEADERS(&#39;cephfs/libcephfs.h&#39;, False, False, &#39;cephfs&#39;) and conf.CHECK_LIB(&#39;cephfs&#39;):<br>
&gt;          conf.DEFINE(&#39;HAVE_CEPH&#39;, &#39;1&#39;)<br>
&gt;<br>
&gt; +    conf.env.enable_glusterfs = Options.options.enable_glusterfs<br>
&gt; +<br>
&gt; +    if Options.options.enable_glusterfs:<br>
&gt; +        conf.check_cfg(package=&#39;glusterfs-api&#39;, args=&#39;&quot;glusterfs-api &gt;= 4&quot; --cflags --libs&#39;,<br>
&gt; +                       uselib_store=&#39;GLUSTERFS&#39;, msg=&#39;Checking for glusterfs-api &gt;= 4&#39;,<br>
&gt; +                       mandatory=False)<br>
&gt; +<br>
&gt;      conf.env.build_regedit = False<br>
&gt;      if not Options.options.with_regedit == False:<br>
&gt;          conf.PROCESS_SEPARATE_RULE(&#39;system_ncurses&#39;)<br>
&gt; @@ -1797,6 +1809,9 @@ main() {<br>
&gt;      if conf.CONFIG_SET(&quot;HAVE_CEPH&quot;):<br>
&gt;          default_shared_modules.extend(TO_LIST(&#39;vfs_ceph&#39;))<br>
&gt;<br>
&gt; +    if conf.CONFIG_SET(&#39;HAVE_GLUSTERFS&#39;):<br>
&gt; +        default_shared_modules.extend(TO_LIST(&#39;vfs_glusterfs&#39;))<br>
&gt; +<br>
&gt;      explicit_shared_modules = TO_LIST(Options.options.shared_modules, delimiter=&#39;,&#39;)<br>
&gt;      explicit_static_modules = TO_LIST(Options.options.static_modules, delimiter=&#39;,&#39;)<br>
<br>
</div>This much looks good, assuming it is tested and works.   You might need<br>
to make uselib_store=&#39;glusterfs&#39; (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>