gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gluster-devel] Rejected NetBSD patches


From: Kaleb S. KEITHLEY
Subject: Re: [Gluster-devel] Rejected NetBSD patches
Date: Mon, 30 Apr 2012 11:27:39 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

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

Attachment: basename.c
Description: Text Data

Attachment: dirname.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]