-
Notifications
You must be signed in to change notification settings - Fork 697
Updating the license list
ffaf1 edited this page Mar 22, 2024
·
13 revisions
Cabal uses the SPDX License list, and automatically generates the appropriate data types from the official JSON data provided by the Linux Foundation.
Do this on master
, then backport to release branch.
Here is the procedure to follow when updating the list:
- Download the
licenses.json
andexceptions.json
files from the SPDX licenses repository, under a git tag (not themaster
branch). eg:https://github.com/spdx/license-list-data/blob/v3.17/json/exceptions.json
, nothttps://github.com/spdx/license-list-data/blob/master/json/exceptions.json
. - Put these files under the
./license-list-data
directory with an appropriate number (e.g.exceptions-3.23.json
). - Change the version in the Haddocks of the
LicenseId
andLicenseExceptionId
in the files./templates/SPDX.LicenseId.template.hs
and./templates/SPDX.LicenseExceptionId.template.hs
.- Update the
mkLicense(Exception)Id
andstringLookup_x_x
functions in both files.
- Update the
- Add the new version to the
SPDX_LICENSE_VERSIONS
rule in the Makefile. - In ./cabal-dev-scripts/src/GenUtils.hs`
- Add the new version to the
SPDXLicenseListVersion
ADT, and itsRepresentable
instance - Add the new version to the
prettyVer
andsuffixVer
functions - Add a type parameter to the
PerV
data type
- Add the new version to the
- Add the new version in
LicenseListVersion
, in./Cabal-syntax/src/Distribution/SPDX/LicenseListVersion.hs
- Add the new version to the
licensesAll :: PerV
value in./cabal-dev-scripts/src/GenSPDXExc.hs
and./cabal-dev-scripts/src/GenSPDX.hs
. - Generate the types from the template and new data
- Run
make Cabal-syntax/src/Distribution/SPDX/LicenseId.hs
- Run
make Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs
- Run
- Add changelog entries
- In
changelog.d
- In
./doc/file-format-changelog.rst
- In