[Gluster-devel] Rejected NetBSD patches
Kaleb S. KEITHLEY
kkeithle at redhat.com
Mon Apr 30 15:27:39 UTC 2012
On 04/28/2012 12:46 AM, Emmanuel Dreyfus wrote:
> Hi
>
> I still have two unintegrated patches required to build glusterfs on
> NetBSD. Those were rejected some time ago to licensing concerns.
>
> 2) There are basename_r() and dirname_r(), stolen from GNU libc, which
> are licensed GPL v2.1 or later
>
> http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/filesystems/glusterfs/patches
> /patch-be?rev=1.8
>
> I understand that license mixing is undesirable, as it taints files and
> can cause problems later. On the other hand, having a glusterfs able to
> build out of the git on NetBSD would be nice. Would that code be
> accepted in tree if it was in a dedicated file? That way other glusterfs
> code would not be tainted, and the file can just be removed by anyone
> having a licensing issue.
>
> If the proposal is accepted, I propose adding a
> libglusterfs/src/compat_netbsd.c, which would be #include'ed with #ifdef
> __NetBSD__
Since we want to eventually change the license of libglusterfs to LGPL
(LGPLv3+ to be specific) to make it easier for partners and other third
parties to write for GlusterFS, it isn't (just) that adding GPL code
taints it—— It's just easier if we eliminate all GPL licenses from the
parts that we want to eventually be LGPL, and then nobody has to do
anything, including think very hard about it. ;-)
I've attached MT-SAFE versions of dirname() and basename() derived from
FreeBSD-8.2's implementations. (They compile on FreeBSD and Fedora, but
I haven't tested glusterfs with them.) Note that I'm rather dismayed
that dirname() and basename() in FreeBSD's libc aren't weak symbols. I
presume that NetBSD's libc has the same misfeature. (And yes, gnu libc
has the misfeature too.) As a result, obviously, it means that every use
in gluster has to be changed to dirname_r() or basename_r(), e.g. with
something like #define dirname dirname_r, instead of changing the 40-odd
places where dirname() and basename() are called.
I would suggest that any files associated with this change be added to
.../contrib/<something-or-other>.
I would also suggest that the feature test be #ifndef GF_LINUX_HOST_OS.
But note that Solaris' basename() and dirname() are MT-SAFE too, so
maybe #if !defined(GF_LINUX_HOST_OS) && !defined(GF_SOLARIS_HOST_OS)
instead?
Finally, I don't feel that the changes I made the FreeBSD
implementations to make them MT-SAFE are substantial enough to warrant
claiming a Red Hat copyright on them; I did add a comment though, but
feel free to tell me that I ought to claim copyright.
--
Kaleb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: basename.c
Type: text/x-csrc
Size: 3097 bytes
Desc: not available
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20120430/636fee35/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dirname.c
Type: text/x-csrc
Size: 2470 bytes
Desc: not available
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20120430/636fee35/attachment-0007.bin>
More information about the Gluster-devel
mailing list