Subject Re: [IBDI] GPL, mySQL, subroutines, & APIs
Author David K. Trudgett
On Thursday 2002-02-14 at 15:29:30 +0900, Ann W. Harrison wrote:

> At 04:12 PM 2/14/2002 +1100, David K. Trudgett wrote:
>
> >They do, however, try to give the impression that
> >commercial license fees must be paid under certain circumstances.
> >Since one may license the product under the GPL, this is not actually
> >true.
>
> Yes, but you cannot link to it, meaning that if they provide a
> subroutine library that communicates with the server and your program
> links to that subroutine library, then your program must be released
> under GPL.

Hi Ann! You're entitled to your view, of course, but you're wrong ;-)
From http://www.mysql.com/support/arrangements.html you will see:

A license is not required if:
You include the MySQL client code in a commercial program.
The client part of MySQL is licensed under the LGPL GNU
Library General Public License. The mysql command-line client
does include code from the readline library that is under the
GPL, however.

Notice, too, that they don't understand the word "license" (what the
above paragraph says is that you don't need a license if you use the
LGPL -- go figure). What they mean to say is, "You don't need to pay
us if:".


>
> From the GPL, Section 2 (http://www.gnu.org/copyleft/gpl.html):
>
> "b) You must cause any work that you distribute or publish, that in whole
> or in part contains or is derived from the Program or any part thereof, to
> be licensed as a whole at no charge to all third parties under the terms of
> this License.

Yes, that's why they would be cutting off their own nose to spite
their face if they licensed the client libraries under the GPL. That
would force people to develop their own client libraries if they were
so desperate to use MySQL (so no one would do it!).


>
> >They also say that a client application developed to the mySQL public
> >interface consitutes a "linked" application within the meaning of the
> >GPL. This would actually be a lie if they had openly stated that as a
> >fact (they instead indicate that it is their "interpretation" of the
> >GPL -- a plainly wrong interpretation, since such API interfaces are
> >specifically excluded from the definition of "linking" by the GPL).
>
> The GPL contains no such exclusion.

Sorry, you're right about that. I was going from memory (a bad thing
for me to do :-)), and I was no doubt thinking about the allowed
special exception:

As a special exception, the copyright holders of FOO give you
permission to link FOO with independent modules that communicate
with FOO solely through the FOOBAR interface, regardless of the
license terms of these independent modules, and to copy and
distribute the resulting combined work under terms of your choice,
provided that every copy of the combined work is accompanied by a
complete copy of the source code of FOO (the version of FOO used
to produce the combined work), being distributed under the terms
of the GNU General Public License plus this exception. An
independent module is a module which is not derived from or based
on FOO.

Also, by "API interfaces", I was being a bit more general than a C
programmer would be when talking about "APIs". I was including network
protocol communication and SQL queries. These are "at a distance"
relationships, even more so than interprocess pipes, RPC and
command-line interfaces (which do not invoke the GPL except under
extreme or special circumstances).


> LGPL does. The explanation that follows the GPL at the URL above
> includes this paragraph:
>
> "This General Public License does not permit incorporating your program
> into proprietary programs. If your program is a subroutine library, you may
> consider it more useful to permit linking proprietary applications with the
> library. If this is what you want to do, use the GNU Library General Public
> License instead of this License."

So it does. As you see, so do the MySQL people use the LGPL for their
client libraries. Didn't you read that <:-> (evil grin).


>
> >So, contrary to their claims, I may develop a client application for
> >the mySQL server, distribute my application under whatever license
> >I like, and distribute the mySQL server under the GPL.
>
> This is from the GNU website:
> http://www.gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL
>
> "If a library is released under the GPL (not the LGPL), does that mean that
> any
> program which uses it has to be under the GPL?
>
> "Yes, because the program as it is actually run includes the library."
>
> In the case of Firebird, linking with the client library would absolutely
> be covered by GPL, as would linking with the Classic engine.

There's nothing stopping Firebird from licensing the client code under
the LGPL or any other suitable license, including the current one.



>
> I said:
>
> > > The GPL is a restrictive license.
>
> The GPL says: "To protect your rights, we need to make restrictions ..."

All licenses make restrictions, however trivial. If they didn't, there
wouldn't be any need for them. There is basically only one thing you
cannot do with a program under a GPL license: you cannot steal it to
produce your own proprietary version of it. That restriction makes
certain the program remains free in every sense to everyone. Some
people are not interested in doing that, which is fine: they don't
have to do it.


> BSD is a free license. GPL is a copy left license.

A "copyleft" license is a guarantee of freedom. It is not correct to
contrast the term with the word "free", as you have done. In the words
of the FSF:

Copyleft is a general method for making a program free software
and requiring all modified and extended versions of the program to
be free software as well.

The simplest way to make a program free is to put it in the public
domain (18k characters), uncopyrighted. This allows people to
share the program and their improvements, if they are so minded.
But it also allows uncooperative people to convert the program
into proprietary software (18k characters). They can make
changes, many or few, and distribute the result as a proprietary
product. People who receive the program in that modified form do
not have the freedom that the original author gave them; the
middleman has stripped it away.

In the GNU project, our aim is to give all users the freedom to
redistribute and change GNU software. If middlemen could strip
off the freedom, we might have many users, but those users would
not have freedom. So instead of putting GNU software in the
public domain, we ``copyleft'' it. Copyleft says that anyone who
redistributes the software, with or without changes, must pass
along the freedom to further copy and change it. Copyleft
guarantees that every user has freedom.

Copyleft also provides an incentive for other programmers to add
to free software. Important free programs such as the GNU C++
compiler exist only because of this.

The full text can be found at:

http://www.gnu.org/licenses/licenses.html#WhatIsCopyleft




>
> >The GPL is a free license, designed to promote freedom. Not everyone
> >wants freedom, of course, such as people trying to sell their
> >applications according to the normal commercial model.
>
> Sorry. I find it difficult to accept that trying to make a living
> in my profession as a software developer makes me an opponent of freedom.

You're being deliberately obtuse, here. Nobody said it does any such
thing. If you wish to make a living from selling software you have
written, then the GPL would not be a clever choice of license in all
probability (neither would the IPL). Just don't pretend that the
software you thus sell is "free" to everyone, because obviously it
isn't: you are saying that no one may use it unless they pay you
money. For you, the software is completely free: you can do what you
like with it; but this is the case for nobody else, so it is not
free software.


>
> >Use the public API of GPL'd software and don't link it into
> >your executables (statically or dynamically) and you're quite safe.
>
> Forgive me. Perhaps I don't understand software any more. How exactly
> does one use an API without linking to the code that implements that
> API?

See my comments re what I was in reality referring to. A strict "C
programmer's API" is not what I meant, though I should have chosen my
terms more carefully.


>
> >Only by those who would like to benefit from other people's work
> >without giving anything back (like Borland's attitude to open source
> >InterBase). Borland can only get away with that because of the IPL,
> >which is not a free software license according to the FSF definition.
>
> Actually, Borland try very hard not to benefit from other
> people's work - notice how difficult it is to contribute to
> the project. Over the past decade or so, they spent nearly a
> hundred million dollars developing InterBase and gave all that
> work to the community. You've got your givers and takers backward.
> (I can't believe that I'm arguing in favor of Borland!)

You'll have nightmares about it now! :-)

To be fair, I was referring to Borland's current (changed) attitude to
open source InterBase. They are now ready and (in my opinion) willing
to reap whatever goodies they find among _your_ hard work, and
incorporate it into their proprietary software without so much as a by
your leave or simple acknowledgement. A sad state of affairs, I must
say.

Of course, Borland did manage to make a big contribution to open
source software, which the open software community must gratefully
acknowledge. It would have been a much bigger contribution had they
contributed to the body of free software, not just open source
software. Still, we shouldn't look a gift horse in the mouth.


>
> > > So, if you're developing Free Software under the FSF definition, you
> > > can use the GNU licensed MySQL. If you want to protect the sources
> > > of your program or restrict your customers' ability pass it on to
> > > their friends, you need a commercial license.
> >
> >Not true, as I explained above. It is only true if you want to link
> >the mySQL code into your application. Developing a client/server
> >application does not fall into this category.
>
> As above, that's only true if you can find someway to call the
> server without linking to it or any interface code.

I think there is such a way.... :-) (explained above)


>
> >A GPL'd InterBase/Firebird would make no difference to most developers
> >(the client/server developers). It might make a difference to embedded
> >application developers who might develop applications that directly
> >embed IB/FB code.
>
> That would be true if the client library were still available under
> IPL or BSD.

... or LGPL for that matter.


> Since the client library is a conditional compilation
> and link of the server, making that distinction would be difficult.

...but doable. Goodness me. Where there's a will, there's a way.


>
> >Thanks for your thoughts, Ann, but I must say there is a lot of
> >misunderstanding and unfounded fear surrounding the GPL,
>
> It's amazing the amount of misunderstanding that can be eliminated
> by reading the document.

Indeed. We both learnt that lesson, didn't we? :-)


Cheers (and thanks for all of your contributions to Firebird and open
source)


David Trudgett