Page MenuHomeFreeBSD

Add *GPL* (or later) licenses
ClosedPublic

Authored by AMDmi3 on Nov 13 2015, 2:38 PM.
Tags
None
Referenced Files
F132178568: D4148.id10159.diff
Tue, Oct 14, 12:28 PM
Unknown Object (File)
Mon, Sep 22, 3:16 PM
Unknown Object (File)
Thu, Sep 18, 2:47 PM
Unknown Object (File)
Sep 2 2025, 9:52 AM
Unknown Object (File)
Aug 30 2025, 7:38 AM
Unknown Object (File)
Aug 20 2025, 5:23 AM
Unknown Object (File)
Aug 14 2025, 12:33 AM
Unknown Object (File)
Aug 11 2025, 11:28 PM
Subscribers

Details

Summary

Most GPL-licensed software actually state that in addition to specific version of GPL they may be licensed under any later version:

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

There is huge difference between e.g. GPLv2 and GPLv2+. For instance, while GPLv2 is not compatible with GPLv3, GPLv2+ is.

Ports framework, though, does not currently differentiate between GPLv2 and GPLv2+.

Some ports mention this in a comment though:

LICENSE= GPLv2 # or later

And some erroneously declare dual licensing:

LICENSE= GPLv2 GPLv3
LICENSE_COMB= dual

To fix this, just add "plus" counterparts to all GPL licenses defined in bsd.license.mk. With this patch, it's possible to specify

LICENSE= GPLv2+

Note that in order to allow plus sign in variable name an extra space is needed after variable name in bsd.licenses.db.mk

The space is needed even in _FOO_${SOMETHING_WHICH_ENDS_WITH_A_PLUS}= case (but only for fmake)

Also, for convenience, split a list of all supported licenses (_LICENSE_LIST) into groups (misc/gpl/bsd/latex/artistic/etc.)

Test Plan

Tested by building GPLv2+ licensed port on all supported FreeBSD versions.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

AMDmi3 retitled this revision from to Add *GPL* (or later) licenses and public domain.
AMDmi3 updated this object.
AMDmi3 edited the test plan for this revision. (Show Details)
AMDmi3 edited edge metadata.
  • Further fix for copyfree group name
  • Convert more PD-licensed ports to new license
AMDmi3 edited edge metadata.
  • Split public domain addition into separate review (D4149). This one now only covers GPL "or later" part
AMDmi3 retitled this revision from Add *GPL* (or later) licenses and public domain to Add *GPL* (or later) licenses.Nov 13 2015, 2:58 PM
AMDmi3 updated this object.
AMDmi3 edited edge metadata.
bapt added a reviewer: bapt.
bapt added a subscriber: bapt.

Accept considering you do not commit the extra space :)

This revision is now accepted and ready to land.Jan 11 2016, 9:26 PM

There is a problem with fmake and some ports
For instance audio/musepack now fails to install with fmake

% fmake -V_LICENSE_FILE_GPLv2+ -C audio/musepack

% make -V_LICENSE_FILE_GPLv2+ -C audio/musepack
/usr/ports/audio/musepack/work/GPLv2+
% fmake -V_LICENSE_TEXT_GPLv2+ -C audio/musepack

% make -V_LICENSE_TEXT_GPLv2+ -C audio/musepack
The license: GPLv2+ (GNU General Public License version 2 (or later)) is standard, please read from the web.

Patch below seems to help but I have no idea if it's enough:

Index: bsd.licenses.mk
===================================================================
--- bsd.licenses.mk     (revision 406010)
+++ bsd.licenses.mk     (working copy)
@@ -317,8 +317,8 @@
 _LICENSE_FILE_${lic}=          ${_LICENSE_STORE}/${lic}
 .                                      else
 #  No license file in /usr/ports/Templates/Licenses
-_LICENSE_TEXT_${lic}=  The license: ${lic} (${_LICENSE_NAME_${lic}}) is standard, please read from the web.
-_LICENSE_FILE_${lic}=  ${WRKDIR}/${lic}
+_LICENSE_TEXT_${lic} = The license: ${lic} (${_LICENSE_NAME_${lic}}) is standard, please read from the web.
+_LICENSE_FILE_${lic} = ${WRKDIR}/${lic}
 .                                      endif
 .                              else
 _LICENSE_ERROR?=       defining LICENSE_TEXT_${lic} is not allowed for known licenses

With previous patch, games/freeminer was still broken with fmake

Patch below helps a bit more

Index: bsd.licenses.mk
===================================================================
--- bsd.licenses.mk     (revision 406010)
+++ bsd.licenses.mk     (working copy)
@@ -317,14 +317,14 @@
 _LICENSE_FILE_${lic}=          ${_LICENSE_STORE}/${lic}
 .                                      else
 #  No license file in /usr/ports/Templates/Licenses
-_LICENSE_TEXT_${lic}=  The license: ${lic} (${_LICENSE_NAME_${lic}}) is standard, please read from the web.
-_LICENSE_FILE_${lic}=  ${WRKDIR}/${lic}
+_LICENSE_TEXT_${lic} = The license: ${lic} (${_LICENSE_NAME_${lic}}) is standard, please read from the web.
+_LICENSE_FILE_${lic} = ${WRKDIR}/${lic}
 .                                      endif
 .                              else
 _LICENSE_ERROR?=       defining LICENSE_TEXT_${lic} is not allowed for known licenses
 .                              endif
 .                      else
-_LICENSE_FILE_${lic}=  ${LICENSE_FILE_${lic}}
+_LICENSE_FILE_${lic} = ${LICENSE_FILE_${lic}}
 .                      endif
 
 .              else