Wireshark-dev: Re: [Wireshark-dev] checklicenses.py
From: Guy Harris <[email protected]>
Date: Mon, 8 Aug 2016 11:38:17 -0700
> On Aug 8, 2016, at 11:00 AM, João Valverde <[email protected]> wrote:
> 
> 
> 
> On 08/08/2016 06:42 PM, Guy Harris wrote:
>> On Aug 8, 2016, at 9:00 AM, João Valverde <[email protected]> wrote:
>> 
>>>> Is there some reason not to treat "you can license this under the BSD license or under the GPL" as an acceptable license?
>>> 
>>> Please review https://code.wireshark.org/review/#/c/16957/.
>> 
>> That's still special-casing the dual-licensed files; any reason not to just treat it as an acceptable license by adding "BSD (3 clause) GPL (v2)" to WHITELISTED_LICENSES?
> 
> Repeating what I said in the Gerrit change (this is just my understanding of course):
> 
> There's a difference between "choose license A or B" and "this code is license A and that addition is license B".

Then perhaps licensecheck.pl should distinguish between them:

diff --git a/tools/licensecheck.pl b/tools/licensecheck.pl
index ae2a92e..03adb35 100755
--- a/tools/licensecheck.pl
+++ b/tools/licensecheck.pl
@@ -800,6 +800,10 @@ sub parselicense {
         $license = "WTFPL $license";
     }
 
+    if ($licensetext =~ /Alternatively, this software may be distributed under the terms of/i) {
+        $license = "Multiply-licensed: $license";
+    }
+
     $license = "UNKNOWN" if (!length($license));
 
     # Remove trailing spaces.

and the list of whitelisted licenses modified to include a number of

	'Multiply-licensed: XXX YYY"

entries for cases where we accept dual-licensed code:

diff --git a/tools/checklicenses.py b/tools/checklicenses.py
index 8ee64f7..dd6ec6a 100755
--- a/tools/checklicenses.py
+++ b/tools/checklicenses.py
@@ -121,6 +121,11 @@ WHITELISTED_LICENSES = [
     'zlib/libpng GPL (v2 or later)',
     'SGI Free Software License B',
     'University of Illinois/NCSA Open Source License (BSD like)',
+
+    # Multiply-licensed code, allowed to be released under license
+    # A or, alternatively, under license B.
+    'Multiply-licensed: BSD (3 clause) GPL (v2)',
+    'Multiply-licensed: ISC GPL (v2)',
 ]