Re: New extension: Inotify
| From: | Arnaud LB | Date: | Wed, 09 Jul 2008 03:17:38 +0000 |
| Subject: | Re: New extension: Inotify | ||
| References: | 1 2 3 4 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-5605@lists.php.net to get a copy of this message | ||
On Tue, Jul 8, 2008 at 3:31 PM, Antony Dovgal <tony@daylessday.org> wrote:
> On 04.07.2008 22:19, Arnaud LB wrote:
>>>
>>> lnotify is a part of Linux kernel, which is GPL-licensed.
>>
>> The inotify functions are a set of syscalls, just like open() and
>> close(). Using open() in your code does not force you to release it
>> under the GPL ;) That's the same situation with inotify.
>
> open() and close() exist in other (non-GPL) systems, i.e. your code doesn't
> depend on any certain kernel/library, hence its license doesn't affect your
> code.
>
> In case of Inotify, you code was clearly done especially for Inotify and
> fully depends on Inotify, which to my understanding means that this is a
> "derivative work" and it should be GPLed, too, unfortunately.
>
> We've had an opposite case: ext/readline can link to both GPL-ed readline
> and BSD-licensed libedit, which allows us to license it under PHP license.
>
> --
> Wbr, Antony Dovgal
>
I fully understand the purpose of these restrictions on the license of
the extensions you host on PECL. But I think that my extension can be
released under the PHP license without violating any license.
It does not link to any user-land GPL'd library. Inotify is not a
library like readline. Actually inotify is a set of 3 syscalls named
inotify_init, inotify_add_watch and inotify_rm_watch. The only
user-land code of inotify is in the glibc, and it may looks something
like that:
int inotify_init () {
return syscall (SYS_inotify_init);
}
Where SYS_inotify_init is the number for the inotif_init syscall. This
is so generic that the glibc writes these functions at compile time
from a list of syscall names and numbers.
So, yes, my code links and depends on the glibc (which is LGPL)
because it uses these 3 convenience functions instead of using
directly the syscall() function. I think it does not cause any problem
to the PHP license, but if it does I may use syscall() directly or
write these functions myself to not depend on any specific libc.
However there are chances that other non-(L)GPL libcs export (or will
export) the inotify functions, which would make my extension to not
depend on any specific libc.
And for the syscall part, Linux license [1] says:
"NOTE! This copyright does *not* cover user programs that use kernel
services by normal system calls - this is merely considered normal use
of the kernel, and does *not* fall under the heading of "derived work".
My extension is in this case, it uses only normal system calls, and is
not a derived work of Linux or Inotify.
[1] http://www.kernel.org/pub/linux/kernel/COPYING