<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/features/quota, branch v4.1dev</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>build: Link libgfrpc within rpc-transport shared libraries</title>
<updated>2018-01-11T12:41:54+00:00</updated>
<author>
<name>Anoop C S</name>
<email>anoopcs@redhat.com</email>
</author>
<published>2018-01-08T12:02:05+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0e4fdfbc4fec55cdc3eb6e0e27408682afe22696'/>
<id>0e4fdfbc4fec55cdc3eb6e0e27408682afe22696</id>
<content type='text'>
Now with https://review.gluster.org/#/c/19056/ merged, we perform
dlopen() with RTLD_LOCAL so that every shared library is expected to
be explicitly linked against other required libraries.

"undefined symbol ..." was seen while trying to access GlusterFS volumes
via NFS-Ganesha/Samba using libgfapi resulting in an unusable state.

This is a follow-up patch to https://review.gluster.org/#/c/17659/
to make sure that we link libgfrpc too while making socket and rdma
rpc-transport shared libraries.

Change-Id: I9943cdc449c257ded3cb9f9f2becdd5784d1d82d
BUG: 1532238
Signed-off-by: Anoop C S &lt;anoopcs@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now with https://review.gluster.org/#/c/19056/ merged, we perform
dlopen() with RTLD_LOCAL so that every shared library is expected to
be explicitly linked against other required libraries.

"undefined symbol ..." was seen while trying to access GlusterFS volumes
via NFS-Ganesha/Samba using libgfapi resulting in an unusable state.

This is a follow-up patch to https://review.gluster.org/#/c/17659/
to make sure that we link libgfrpc too while making socket and rdma
rpc-transport shared libraries.

Change-Id: I9943cdc449c257ded3cb9f9f2becdd5784d1d82d
BUG: 1532238
Signed-off-by: Anoop C S &lt;anoopcs@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: Simplify component message id's definition</title>
<updated>2017-12-14T02:33:51+00:00</updated>
<author>
<name>Xavier Hernandez</name>
<email>jahernan@redhat.com</email>
</author>
<published>2017-12-12T21:31:53+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=415e0bcc80b350fc75f325b490560f44ba419b20'/>
<id>415e0bcc80b350fc75f325b490560f44ba419b20</id>
<content type='text'>
This patch creates a new way of defining message id's that is easier
and less error prone because it doesn't require so many manual changes
each time a new component is defined or a new message created.

Change-Id: I71ba8af9ac068f5add7e74f316a2478bc991c67b
Signed-off-by: Xavier Hernandez &lt;jahernan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch creates a new way of defining message id's that is easier
and less error prone because it doesn't require so many manual changes
each time a new component is defined or a new message created.

Change-Id: I71ba8af9ac068f5add7e74f316a2478bc991c67b
Signed-off-by: Xavier Hernandez &lt;jahernan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/quota: Fix brick crash in quota unlink callback</title>
<updated>2017-12-06T08:16:11+00:00</updated>
<author>
<name>Shreyas Siravara</name>
<email>sshreyas@fb.com</email>
</author>
<published>2017-12-05T15:43:40+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=e5e0d223ada35d6bdb1790054fcbf34273b7949c'/>
<id>e5e0d223ada35d6bdb1790054fcbf34273b7949c</id>
<content type='text'>
Change-Id: Iad16d7b2102376380eb0f6918111249af370aaeb
BUG: 1521014
Signed-off-by: Shreyas Siravara &lt;sshreyas@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Iad16d7b2102376380eb0f6918111249af370aaeb
BUG: 1521014
Signed-off-by: Shreyas Siravara &lt;sshreyas@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Coverity Issue: PW.INCLUDE_RECURSION in several files</title>
<updated>2017-11-09T13:21:11+00:00</updated>
<author>
<name>Girjesh Rajoria</name>
<email>grajoria@redhat.com</email>
</author>
<published>2017-11-02T21:12:23+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0821a57bd2e7518d1c8df2d4403a2dfbb8ee5b6b'/>
<id>0821a57bd2e7518d1c8df2d4403a2dfbb8ee5b6b</id>
<content type='text'>
Coverity ID: 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
418, 419, 423, 424, 425, 426, 427, 428, 429, 436, 437, 438, 439,
440, 441, 442, 443

Issue: Event include_recursion

Removed redundant, recursive includes from the files.

Change-Id: I920776b1fa089a2d4917ca722d0075a9239911a7
BUG: 789278
Signed-off-by: Girjesh Rajoria &lt;grajoria@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Coverity ID: 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
418, 419, 423, 424, 425, 426, 427, 428, 429, 436, 437, 438, 439,
440, 441, 442, 443

Issue: Event include_recursion

Removed redundant, recursive includes from the files.

Change-Id: I920776b1fa089a2d4917ca722d0075a9239911a7
BUG: 789278
Signed-off-by: Girjesh Rajoria &lt;grajoria@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc: optimize fop program lookup</title>
<updated>2017-11-06T16:46:33+00:00</updated>
<author>
<name>Milind Changire</name>
<email>mchangir@redhat.com</email>
</author>
<published>2017-10-19T06:19:42+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=6707eddaa5d7fdce16d39c19963911868a2c7fee'/>
<id>6707eddaa5d7fdce16d39c19963911868a2c7fee</id>
<content type='text'>
Ensure that the fop program is the first in the program list
so that there's minimum amount of time spent to search the
program for the most frequently needed use case.

Change-Id: I45c3dcdbf39ec90ba39d914432d13a2ace00a5ee
BUG: 1509647
Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that the fop program is the first in the program list
so that there's minimum amount of time spent to search the
program for the most frequently needed use case.

Change-Id: I45c3dcdbf39ec90ba39d914432d13a2ace00a5ee
BUG: 1509647
Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>stack.h:PW.INCLUDE_RECURSION</title>
<updated>2017-09-29T07:46:53+00:00</updated>
<author>
<name>Sanju Rakonde</name>
<email>srakonde@redhat.com</email>
</author>
<published>2017-09-25T11:59:25+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=2c124b5256bac5830d81552bfb4412620aa6cfb0'/>
<id>2c124b5256bac5830d81552bfb4412620aa6cfb0</id>
<content type='text'>
The headerfile globals.h is recursively adding itself.
( globals.h -&gt; xlator.h -&gt; stack.h -&gt; globals.h).
We are finding the source files which are including the header
file globals.h and removing the inclusion line.

I used git grep -l stack.h | xargs git grep globals.h --
to find out the files and removed the header file from all files
except libglusterfs/src/xlator.h and libglusterfs/src/Makefile.am

When I try to remove header file from libglusterfs/src/xlator.h
I'm getting some errors. In libglusterfs/src/Makefile.am it is
required for building RPMs.

Change-Id: I537218c09ade6d7ea51717768b26563a247daf60
BUG: 789278
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The headerfile globals.h is recursively adding itself.
( globals.h -&gt; xlator.h -&gt; stack.h -&gt; globals.h).
We are finding the source files which are including the header
file globals.h and removing the inclusion line.

I used git grep -l stack.h | xargs git grep globals.h --
to find out the files and removed the header file from all files
except libglusterfs/src/xlator.h and libglusterfs/src/Makefile.am

When I try to remove header file from libglusterfs/src/xlator.h
I'm getting some errors. In libglusterfs/src/Makefile.am it is
required for building RPMs.

Change-Id: I537218c09ade6d7ea51717768b26563a247daf60
BUG: 789278
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota: fix a crash by using bad regfile inode as parent</title>
<updated>2017-07-17T04:59:30+00:00</updated>
<author>
<name>Kinglong Mee</name>
<email>mijinlong@open-fs.com</email>
</author>
<published>2017-07-10T03:16:39+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=cc8bf4bb291870e3d98d25f1e2d08856be889d8d'/>
<id>cc8bf4bb291870e3d98d25f1e2d08856be889d8d</id>
<content type='text'>
0  0x00007f1482f1f1d7 in raise () from /lib64/libc.so.6
1  0x00007f1482f208c8 in abort () from /lib64/libc.so.6
2  0x00007f1482f18146 in __assert_fail_base () from /lib64/libc.so.6
3  0x00007f1482f181f2 in __assert_fail () from /lib64/libc.so.6
4  0x00007f148484986a in __inode_link (inode=inode@entry=0x7f14742404d4,
   parent=parent@entry=0x7f14742404d4,
   name=name@entry=0x7f1460001c48 "testfile5308",
   iatt=iatt@entry=0x7f1460001bc8) at inode.c:954
5  0x00007f1484849969 in inode_link (inode=0x7f14742404d4,
   parent=parent@entry=0x7f14742404d4,
   name=name@entry=0x7f1460001c48 "testfile5308",
   iatt=iatt@entry=0x7f1460001bc8) at inode.c:1060
6  0x00007f147591b895 in quota_build_ancestry_cbk (
   frame=frame@entry=0x7f1482315e80, cookie=&lt;optimized out&gt;,
   this=0x7f147000e910, op_ret=op_ret@entry=6904, op_errno=op_errno@entry=0,
   entries=entries@entry=0x7f1474731c00, xdata=xdata@entry=0x0) at quota.c:779
7  0x00007f1475b2f505 in marker_build_ancestry_cbk (frame=0x7f1482315988,
   cookie=&lt;optimized out&gt;, this=&lt;optimized out&gt;, op_ret=&lt;optimized out&gt;,
   op_errno=&lt;optimized out&gt;, entries=0x7f1474731c00, xdata=0x0)
   at marker.c:3055
8  0x00007f14848b9cd9 in default_readdirp_cbk (
   frame=frame@entry=0x7f1482315b30, cookie=&lt;optimized out&gt;,
   this=&lt;optimized out&gt;, op_ret=op_ret@entry=6904, op_errno=op_errno@entry=0,
   entries=entries@entry=0x7f1474731c00, xdata=xdata@entry=0x0)
   at defaults.c:1403
9  0x00007f1475f68132 in pl_readdirp_cbk (frame=0x7f1482315dac,
   cookie=&lt;optimized out&gt;, this=&lt;optimized out&gt;, op_ret=6904, op_errno=0,
   entries=0x7f1474731c00, xdata=0x0) at posix.c:2700
10 0x00007f1476e26819 in posix_readdirp (frame=0x7f1482315f54,
   this=&lt;optimized out&gt;, fd=&lt;optimized out&gt;, size=&lt;optimized out&gt;,
   off=&lt;optimized out&gt;, dict=&lt;optimized out&gt;) at posix.c:6282
11 0x00007f1475f6599a in pl_readdirp (frame=0x7f1482315dac,
   this=0x7f147000a200, fd=0x7f1484b5106c, size=0, offset=0,
   xdata=0x7f1481ab4f34) at posix.c:2711
12 0x00007f14848ce954 in default_readdirp_resume (frame=0x7f1482315b30,
   this=0x7f147000b690, fd=0x7f1484b5106c, size=0, off=0,
   xdata=0x7f1481ab4f34) at defaults.c:2019
13 0x00007f148485c92d in call_resume (stub=0x7f1481b65710) at call-stub.c:2508
14 0x00007f1475d54743 in iot_worker (data=0x7f147004e7d0) at io-threads.c:210
15 0x00007f148369cdc5 in start_thread () from /lib64/libpthread.so.0
16 0x00007f1482fe173d in clone () from /lib64/libc.so.6

Change-Id: I740dc691e7be1bc2a9ae3a0cb14bbf566ea77bc5
Signed-off-by: Kinglong Mee &lt;mijinlong@open-fs.com&gt;
Reviewed-on: https://review.gluster.org/17730
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
0  0x00007f1482f1f1d7 in raise () from /lib64/libc.so.6
1  0x00007f1482f208c8 in abort () from /lib64/libc.so.6
2  0x00007f1482f18146 in __assert_fail_base () from /lib64/libc.so.6
3  0x00007f1482f181f2 in __assert_fail () from /lib64/libc.so.6
4  0x00007f148484986a in __inode_link (inode=inode@entry=0x7f14742404d4,
   parent=parent@entry=0x7f14742404d4,
   name=name@entry=0x7f1460001c48 "testfile5308",
   iatt=iatt@entry=0x7f1460001bc8) at inode.c:954
5  0x00007f1484849969 in inode_link (inode=0x7f14742404d4,
   parent=parent@entry=0x7f14742404d4,
   name=name@entry=0x7f1460001c48 "testfile5308",
   iatt=iatt@entry=0x7f1460001bc8) at inode.c:1060
6  0x00007f147591b895 in quota_build_ancestry_cbk (
   frame=frame@entry=0x7f1482315e80, cookie=&lt;optimized out&gt;,
   this=0x7f147000e910, op_ret=op_ret@entry=6904, op_errno=op_errno@entry=0,
   entries=entries@entry=0x7f1474731c00, xdata=xdata@entry=0x0) at quota.c:779
7  0x00007f1475b2f505 in marker_build_ancestry_cbk (frame=0x7f1482315988,
   cookie=&lt;optimized out&gt;, this=&lt;optimized out&gt;, op_ret=&lt;optimized out&gt;,
   op_errno=&lt;optimized out&gt;, entries=0x7f1474731c00, xdata=0x0)
   at marker.c:3055
8  0x00007f14848b9cd9 in default_readdirp_cbk (
   frame=frame@entry=0x7f1482315b30, cookie=&lt;optimized out&gt;,
   this=&lt;optimized out&gt;, op_ret=op_ret@entry=6904, op_errno=op_errno@entry=0,
   entries=entries@entry=0x7f1474731c00, xdata=xdata@entry=0x0)
   at defaults.c:1403
9  0x00007f1475f68132 in pl_readdirp_cbk (frame=0x7f1482315dac,
   cookie=&lt;optimized out&gt;, this=&lt;optimized out&gt;, op_ret=6904, op_errno=0,
   entries=0x7f1474731c00, xdata=0x0) at posix.c:2700
10 0x00007f1476e26819 in posix_readdirp (frame=0x7f1482315f54,
   this=&lt;optimized out&gt;, fd=&lt;optimized out&gt;, size=&lt;optimized out&gt;,
   off=&lt;optimized out&gt;, dict=&lt;optimized out&gt;) at posix.c:6282
11 0x00007f1475f6599a in pl_readdirp (frame=0x7f1482315dac,
   this=0x7f147000a200, fd=0x7f1484b5106c, size=0, offset=0,
   xdata=0x7f1481ab4f34) at posix.c:2711
12 0x00007f14848ce954 in default_readdirp_resume (frame=0x7f1482315b30,
   this=0x7f147000b690, fd=0x7f1484b5106c, size=0, off=0,
   xdata=0x7f1481ab4f34) at defaults.c:2019
13 0x00007f148485c92d in call_resume (stub=0x7f1481b65710) at call-stub.c:2508
14 0x00007f1475d54743 in iot_worker (data=0x7f147004e7d0) at io-threads.c:210
15 0x00007f148369cdc5 in start_thread () from /lib64/libpthread.so.0
16 0x00007f1482fe173d in clone () from /lib64/libc.so.6

Change-Id: I740dc691e7be1bc2a9ae3a0cb14bbf566ea77bc5
Signed-off-by: Kinglong Mee &lt;mijinlong@open-fs.com&gt;
Reviewed-on: https://review.gluster.org/17730
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Link against missed libraries to resolve symbols</title>
<updated>2017-07-03T10:58:14+00:00</updated>
<author>
<name>Prashanth Pai</name>
<email>ppai@redhat.com</email>
</author>
<published>2017-06-30T10:22:53+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=97a08698058962a4ddc783008c92ee94f08740a9'/>
<id>97a08698058962a4ddc783008c92ee94f08740a9</id>
<content type='text'>
When external programs perform a dlopen("..so", RTLD_LAZY|RTLD_LOCAL)
on some shared objects like xlators, it can fail with dlerror set to
error string "undefined symbol &lt;some-type&gt;".

This was observed for the following shared objects: fuse.so, quota.so,
quotad.so, server.so, libgfrpc.so and socket.so

P.S: This was found while running a go program which fetches the list
of xlator options (volume_option_t) from xlator's shared object.

BUG: 1193929
Change-Id: I7b958409cf11fb67c2be32a3f85a96fb1260236b
Signed-off-by: Prashanth Pai &lt;ppai@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17659
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jeff@pl.atyp.us&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When external programs perform a dlopen("..so", RTLD_LAZY|RTLD_LOCAL)
on some shared objects like xlators, it can fail with dlerror set to
error string "undefined symbol &lt;some-type&gt;".

This was observed for the following shared objects: fuse.so, quota.so,
quotad.so, server.so, libgfrpc.so and socket.so

P.S: This was found while running a go program which fetches the list
of xlator options (volume_option_t) from xlator's shared object.

BUG: 1193929
Change-Id: I7b958409cf11fb67c2be32a3f85a96fb1260236b
Signed-off-by: Prashanth Pai &lt;ppai@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17659
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Amar Tumballi &lt;amarts@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jeff@pl.atyp.us&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: fix spelling errors</title>
<updated>2017-06-02T11:50:43+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2017-06-01T10:56:22+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=07fd39479bdd6502f7781894be06eb66aaa8ef10'/>
<id>07fd39479bdd6502f7781894be06eb66aaa8ef10</id>
<content type='text'>
fixes for various minor spelling errors and typos

Reported-by: Patrick Matthäi &lt;pmatthaei@debian.org&gt;
Change-Id: Ic1be36f82e3d822bbdc9559878bd79520fc0fcd5
BUG: 1457808
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17442
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes for various minor spelling errors and typos

Reported-by: Patrick Matthäi &lt;pmatthaei@debian.org&gt;
Change-Id: Ic1be36f82e3d822bbdc9559878bd79520fc0fcd5
BUG: 1457808
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17442
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: out-of-tree builds generates files in the wrong directory</title>
<updated>2016-09-18T16:34:37+00:00</updated>
<author>
<name>Kaleb S KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2016-04-26T21:04:04+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=e38dff5b4e0f0a25db664810fc3617eac44673ce'/>
<id>e38dff5b4e0f0a25db664810fc3617eac44673ce</id>
<content type='text'>
And minor cleanup of a few of the Makefile.am files while we're
at it.

Rewrite the make rules to do what xdrgen does. Now we can get rid
of xdrgen.

Note 1. netbsd6's sed doesn't do -i. Why are we still running
smoke tests on netbsd6 and not netbsd7? We barely support netbsd7
as it is.

Note 2. Why is/was libgfxdr.so (.../rpc/xdr/src/...) linked with
libglusterfs? A cut-and-paste mistake? It has no references to
symbols in libglusterfs.

Note3. "/#ifndef\|#define\|#endif/" (note the '\'s) is a _basic_
regex that matches the same lines as the _extended_ regex
"/#(ifndef|define|endif)/". To match the extended regex sed needs to
be run with -r on Linux; with -E on *BSD. However NetBSD's and
FreeBSD's sed helpfully also provide -r for compatibility. Using a
basic regex avoids having to use a kludge in order to run sed with
the correct option on OS X.

Note 4. Not copying the bit of xdrgen that inserts copyright/license
boilerplate. AFAIK it's silly to pretend that machine generated
files like these can be copyrighted or need license boilerplate.
The XDR source files have their own copyright and license; and
their copyrights are bound to be more up to date than old
boilerplate inserted by a script. From what I've seen of other
Open Source projects -- e.g. gcc and its C parser files generated
by yacc and lex -- IIRC they don't bother to add copyright/license
boilerplate to their generated files.

It appears that it's a long-standing feature of make (SysV, BSD,
gnu) for out-of-tree builds to helpfully pretend that the source
files it can find in the VPATH "exist" as if they are in the $cwd.
rpcgen doesn't work well in this situation and generates files
with "bad" #include directives.

E.g. if you `rpcgen ../../../../$srcdir/rpc/xdr/src/glusterfs3-xdr.x`,
you get an #include directive in the generated .c file like this:

  ...
  #include "../../../../$srcdir/rpc/xdr/src/glusterfs3-xdr.h"
  ...

which (obviously) results in compile errors on out-of-tree build
because the (generated) header file doesn't exist at that location.
Compared to `rpcgen ./glusterfs3-xdr.x` where you get:

  ...
  #include "glusterfs3-xdr.h"
  ...

Which is what we need. We have to resort to some Stupid Make Tricks
like the addition of various .PHONY targets to work around the VPATH
"help".

Warning: When doing an in-tree build, -I$(top_builddir)/rpc/xdr/...
looks exactly like -I$(top_srcdir)/rpc/xdr/...  Don't be fooled though.
And don't delete the -I$(top_builddir)/rpc/xdr/... bits

Change-Id: Iba6ab96b2d0a17c5a7e9f92233993b318858b62e
BUG: 1330604
Signed-off-by: Kaleb S KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14085
Tested-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And minor cleanup of a few of the Makefile.am files while we're
at it.

Rewrite the make rules to do what xdrgen does. Now we can get rid
of xdrgen.

Note 1. netbsd6's sed doesn't do -i. Why are we still running
smoke tests on netbsd6 and not netbsd7? We barely support netbsd7
as it is.

Note 2. Why is/was libgfxdr.so (.../rpc/xdr/src/...) linked with
libglusterfs? A cut-and-paste mistake? It has no references to
symbols in libglusterfs.

Note3. "/#ifndef\|#define\|#endif/" (note the '\'s) is a _basic_
regex that matches the same lines as the _extended_ regex
"/#(ifndef|define|endif)/". To match the extended regex sed needs to
be run with -r on Linux; with -E on *BSD. However NetBSD's and
FreeBSD's sed helpfully also provide -r for compatibility. Using a
basic regex avoids having to use a kludge in order to run sed with
the correct option on OS X.

Note 4. Not copying the bit of xdrgen that inserts copyright/license
boilerplate. AFAIK it's silly to pretend that machine generated
files like these can be copyrighted or need license boilerplate.
The XDR source files have their own copyright and license; and
their copyrights are bound to be more up to date than old
boilerplate inserted by a script. From what I've seen of other
Open Source projects -- e.g. gcc and its C parser files generated
by yacc and lex -- IIRC they don't bother to add copyright/license
boilerplate to their generated files.

It appears that it's a long-standing feature of make (SysV, BSD,
gnu) for out-of-tree builds to helpfully pretend that the source
files it can find in the VPATH "exist" as if they are in the $cwd.
rpcgen doesn't work well in this situation and generates files
with "bad" #include directives.

E.g. if you `rpcgen ../../../../$srcdir/rpc/xdr/src/glusterfs3-xdr.x`,
you get an #include directive in the generated .c file like this:

  ...
  #include "../../../../$srcdir/rpc/xdr/src/glusterfs3-xdr.h"
  ...

which (obviously) results in compile errors on out-of-tree build
because the (generated) header file doesn't exist at that location.
Compared to `rpcgen ./glusterfs3-xdr.x` where you get:

  ...
  #include "glusterfs3-xdr.h"
  ...

Which is what we need. We have to resort to some Stupid Make Tricks
like the addition of various .PHONY targets to work around the VPATH
"help".

Warning: When doing an in-tree build, -I$(top_builddir)/rpc/xdr/...
looks exactly like -I$(top_srcdir)/rpc/xdr/...  Don't be fooled though.
And don't delete the -I$(top_builddir)/rpc/xdr/... bits

Change-Id: Iba6ab96b2d0a17c5a7e9f92233993b318858b62e
BUG: 1330604
Signed-off-by: Kaleb S KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14085
Tested-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
