Bug 41822

Summary: PulseAudio LICENSE file is wrong or misleading about GPL/LGPL
Product: PulseAudio Reporter: Brian Cameron <brian.cameron>
Component: miscAssignee: pulseaudio-bugs
Status: RESOLVED FIXED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: colin, lennart, mkbosmans
Version: unspecified   
Hardware: Other   
OS: Solaris   
Whiteboard:
i915 platform: i915 features:
Attachments: suggested patch to improve LICENSE information.
updated patch

Description Brian Cameron 2011-10-15 13:12:35 UTC
As has been discussed in bug #41539, the LICENSE file in PulseAudio says this:

---

All PulseAudio source files are licensed under the GNU Lesser General Public
License. (see file LGPL for details)

However, the server side links to the GPL-only library 'libsamplerate' which
practically downgrades the license of the server part to GPL (see file GPL for
details), exercising section 3 of the LGPL.

Hence you should treat the client library ('libpulse') of PulseAudio as being
LGPL licensed and the server part ('libpulsecore') as being GPL licensed. Since
the PulseAudio daemon and the modules link to 'libpulsecore' they are of course
also GPL licensed.

---

However, in PulseAudio 1.0, libpulsecore is now linked against libpulsecommon and anything that uses libpulse.  For example, anything that uses the GStreamer PulseAudio plugin now links against libpulsecore and libsamplerate.

According to Tanu Kaskinen in bug #41539, only the server still actually uses libsamplerate, but it is questionable whether the fact that programs link against the same library that links against GPL libsamplerate affects the license of client programs.

The LICENSE file, at any rate, is clearly wrong and should be updated to provide more accurate information so that people building it can make a decision for themselves how to build PulseAudio.

It seems like there are a couple of reasonable solutions to this issue:

1) According to Tanu, the speex resampler also works.  Perhaps it is time to drop support for libsamplerate and instead favor the speex resampler, which avoids any licensing issues and makes PulseAudio more cleanly LGPL.

2) Fix the server so that it links against libsamplerate in a way that does not also cause libraries used by clients to link against a library that links against libsamplerate.
Comment 1 Brian Cameron 2011-10-17 16:15:45 UTC
Reviewing the LICENSE file and the licenses in the code a bit more closely, I notice the following issues

1) I think the LICENSE file could be more clear that libsamplerate is an 
   optional dependency and that the license of libpulsecore is affected if 
   you build with it.  The way it reads, it sounds like libpulsecore is GPL
   regardless.

2) I notice that these files are under the GPL:

   - pulseaudio-1.0/src/modules/bluetooth/proximity-helper.c
   - pulseaudio-1.0/src/modules/bluetooth/a2dp-codecs.h:

   The proximinity-helper is a binary delivered to libexec, so this is okay.  
   However, the LICENSE file should probably highlight that it ships this GPL
   binary.

   More seriously, the a2dp-codecs.h file is included in the following 
   bluetooth module files bluetooth-util.c and module-bluetooth-device.c 

   Is this an error, or should the LICENSE file highlight that building the 
   bluetooth module also affects the PulseAudio license.

3) The LICENSE file highlights that the echo-cancel module is under a more
   permissive license.  I notice that some code uses the MIT license.  Should
   this be highlighted as well if you are going to highlight more permissive
   licensing in the module?

   - pulseaudio-1.0/src/modules/reserve-monitor.c
   - pulseaudio-1.0/src/modules/reserve.c
   - pulseaudio-1.0/src/pulsecore/rtkit.c

   Also, this file is under a more permissive Sun Public Domain license:
   - pulseaudio-1.0/src/pulsecore/g711.c:
Comment 2 Maarten Bosmans 2011-10-17 22:31:32 UTC
(In reply to comment #1)
> Reviewing the LICENSE file and the licenses in the code a bit more closely, I
> notice the following issues
> 
> 1) I think the LICENSE file could be more clear that libsamplerate is an 
>    optional dependency and that the license of libpulsecore is affected if 
>    you build with it.  The way it reads, it sounds like libpulsecore is GPL
>    regardless.

Indeed. Patches welcome.

> 2) I notice that these files are under the GPL:
> 
>    - pulseaudio-1.0/src/modules/bluetooth/proximity-helper.c
>    - pulseaudio-1.0/src/modules/bluetooth/a2dp-codecs.h:
> 
>    The proximinity-helper is a binary delivered to libexec, so this is okay.  
>    However, the LICENSE file should probably highlight that it ships this GPL
>    binary.
> 
>    More seriously, the a2dp-codecs.h file is included in the following 
>    bluetooth module files bluetooth-util.c and module-bluetooth-device.c 
> 
>    Is this an error, or should the LICENSE file highlight that building the 
>    bluetooth module also affects the PulseAudio license.

Thanks for the review. It does indeed seem like an oversight. We should have been more careful in updating the LICENSE file when new code is imported. Again, patches welcome.

> 3) The LICENSE file highlights that the echo-cancel module is under a more
>    permissive license.  I notice that some code uses the MIT license.  Should
>    this be highlighted as well if you are going to highlight more permissive
>    licensing in the module?
> 
>    - pulseaudio-1.0/src/modules/reserve-monitor.c
>    - pulseaudio-1.0/src/modules/reserve.c
>    - pulseaudio-1.0/src/pulsecore/rtkit.c
> 
>    Also, this file is under a more permissive Sun Public Domain license:
>    - pulseaudio-1.0/src/pulsecore/g711.c:

Hmm, not that important, but if echo-cancel gets mentioned, I suppose we could as well be complete in the LICENSE file.

I already proposed to gather all imported code into a separate dir (e.g. src/ext/) to keep a clear separation between our code and external code, for licensing and updating issues. But that idea didn't seem to get traction with the other devs.
Comment 3 Brian Cameron 2011-10-19 12:13:51 UTC
Created attachment 52542 [details] [review]
suggested patch to improve LICENSE information.


Here is a patch that I think makes the LICENSE file more clear.  Obviously the maintainers should review to make sure it is correct and acceptable.
Comment 4 Colin Guthrie 2011-10-19 16:15:39 UTC
The wording seems OK to me but there seems to be a half finished sentence in there....

+also GPL licensed.  If the bluetooth module is built, then the
+
+So, the following PulseAudio binaries link against libpulsecore, and
Comment 5 Brian Cameron 2011-10-19 16:39:28 UTC
Created attachment 52559 [details] [review]
updated patch

Sorry about that, here's an updated patch.
Comment 6 Colin Guthrie 2011-10-20 02:07:25 UTC
OK, we've pushed this change which we think clarifies things sufficiently and also doesn't go into precise detail about specific files as this will certainly go out of date again in the future. 

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=d80a3cf56e4979eb5aa5bdfb8bfc03b87c72e2de

Of course we'll try to mention anything "weird" in that file and any further clarification would be welcome.

Thanks for your contribution :)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.