-
Couldn't load subscription status.
- Fork 722
Updating the license list
ffaf1 edited this page Mar 6, 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.
Here is the procedure to follow when updating the list:
- Download the
licenses.jsonandexceptions.jsonfiles from the SPDX licenses repository, under a git tag (not themasterbranch). 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-datadirectory with an appropriate number (e.g.exceptions-3.23.json). - Change the version in the Haddocks of the
LicenseIdandLicenseExceptionIdin the files./templates/SPDX.LicenseId.template.hsand./templates/SPDX.LicenseExceptionId.template.hs.- Update the
mkLicense(Exception)IdandstringLookup_x_xfunctions in both files.
- Update the
- Add the new version to the
SPDX_LICENSE_VERSIONSrule in the Makefile. - In ./cabal-dev-scripts/src/GenUtils.hs`
- Add the new version to the
SPDXLicenseListVersionADT, and itsRepresentableinstance - Add the new version to the
prettyVerandsuffixVerfunctions - Add a type parameter to the
PerVdata 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 :: PerVvalue in./cabal-dev-scripts/src/GenSPDXExc.hsandGenSPDX.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