Skip to content

Commit 48a444a

Browse files
committed
Add SPDX List v3.16 to LicenseListVersion and the file format changelog
1 parent f26a066 commit 48a444a

File tree

6 files changed

+187
-2
lines changed

6 files changed

+187
-2
lines changed

Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,23 @@ licenseExceptionIdList LicenseListVersion_3_10 =
255255
, Universal_FOSS_exception_1_0
256256
]
257257
++ bulkOfLicenses
258+
licenseExceptionIdList LicenseListVersion_3_16 =
259+
[ GPL_3_0_linking_exception
260+
, GPL_3_0_linking_source_exception
261+
, GPL_CC_1_0
262+
, LGPL_3_0_linking_exception
263+
, LLVM_exception
264+
, OCaml_LGPL_linking_exception
265+
, OpenJDK_assembly_exception_1_0
266+
, PS_or_PDF_font_exception_20170817
267+
, Qt_GPL_exception_1_0
268+
, Qt_LGPL_exception_1_1
269+
, SHL_2_0
270+
, SHL_2_1
271+
, Swift_exception
272+
, Universal_FOSS_exception_1_0
273+
]
274+
++ bulkOfLicenses
258275

259276
-- | Create a 'LicenseExceptionId' from a 'String'.
260277
mkLicenseExceptionId :: LicenseListVersion -> String -> Maybe LicenseExceptionId
@@ -263,6 +280,7 @@ mkLicenseExceptionId LicenseListVersion_3_2 s = Map.lookup s stringLookup_3_2
263280
mkLicenseExceptionId LicenseListVersion_3_6 s = Map.lookup s stringLookup_3_6
264281
mkLicenseExceptionId LicenseListVersion_3_9 s = Map.lookup s stringLookup_3_9
265282
mkLicenseExceptionId LicenseListVersion_3_10 s = Map.lookup s stringLookup_3_10
283+
mkLicenseExceptionId LicenseListVersion_3_16 s = Map.lookup s stringLookup_3_16
266284

267285
stringLookup_3_0 :: Map String LicenseExceptionId
268286
stringLookup_3_0 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
@@ -284,6 +302,10 @@ stringLookup_3_10 :: Map String LicenseExceptionId
284302
stringLookup_3_10 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
285303
licenseExceptionIdList LicenseListVersion_3_10
286304

305+
stringLookup_3_16 :: Map String LicenseExceptionId
306+
stringLookup_3_16 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
307+
licenseExceptionIdList LicenseListVersion_3_16
308+
287309
-- | License exceptions in all SPDX License lists
288310
bulkOfLicenses :: [LicenseExceptionId]
289311
bulkOfLicenses =

Cabal-syntax/src/Distribution/SPDX/LicenseId.hs

Lines changed: 143 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1864,11 +1864,14 @@ licenseIdList LicenseListVersion_3_10 =
18641864
, AGPL_1_0_or_later
18651865
, Blessing
18661866
, BlueOak_1_0_0
1867-
, BSD_2_Clause_FreeBSD
1867+
, BSD_2_Clause_Views
18681868
, BSD_3_Clause_Open_MPI
18691869
, Bzip2_1_0_5
18701870
, CAL_1_0_Combined_Work_Exception
18711871
, CAL_1_0
1872+
, CC_BY_3_0_AT
1873+
, CC_BY_NC_ND_3_0_IGO
1874+
, CC_BY_SA_3_0_AT
18721875
, CC_PDDC
18731876
, CERN_OHL_1_1
18741877
, CERN_OHL_1_2
@@ -1877,7 +1880,21 @@ licenseIdList LicenseListVersion_3_10 =
18771880
, CERN_OHL_W_2_0
18781881
, Copyleft_next_0_3_0
18791882
, Copyleft_next_0_3_1
1883+
, EPICS
18801884
, Etalab_2_0
1885+
, GFDL_1_1_invariants_only
1886+
, GFDL_1_1_invariants_or_later
1887+
, GFDL_1_1_no_invariants_only
1888+
, GFDL_1_1_no_invariants_or_later
1889+
, GFDL_1_2_invariants_only
1890+
, GFDL_1_2_invariants_or_later
1891+
, GFDL_1_2_no_invariants_only
1892+
, GFDL_1_2_no_invariants_or_later
1893+
, GFDL_1_3_invariants_only
1894+
, GFDL_1_3_invariants_or_later
1895+
, GFDL_1_3_no_invariants_only
1896+
, GFDL_1_3_no_invariants_or_later
1897+
, GLWTPL
18811898
, Hippocratic_2_1
18821899
, HPND_sell_variant
18831900
, JPNIC
@@ -1888,6 +1905,8 @@ licenseIdList LicenseListVersion_3_10 =
18881905
, MulanPSL_1_0
18891906
, MulanPSL_2_0
18901907
, NCGL_UK_2_0
1908+
, NIST_PD_fallback
1909+
, NIST_PD
18911910
, NTP_0
18921911
, O_UDA_1_0
18931912
, ODC_By_1_0
@@ -1917,6 +1936,124 @@ licenseIdList LicenseListVersion_3_10 =
19171936
, UCL_1_0
19181937
]
19191938
++ bulkOfLicenses
1939+
licenseIdList LicenseListVersion_3_16 =
1940+
[ AGPL_1_0_only
1941+
, AGPL_1_0_or_later
1942+
, ANTLR_PD_fallback
1943+
, App_s2p
1944+
, Blessing
1945+
, BlueOak_1_0_0
1946+
, BSD_2_Clause_Views
1947+
, BSD_3_Clause_Modification
1948+
, BSD_3_Clause_No_Military_License
1949+
, BSD_3_Clause_Open_MPI
1950+
, BSD_4_Clause_Shortened
1951+
, BUSL_1_1
1952+
, C_UDA_1_0
1953+
, CAL_1_0_Combined_Work_Exception
1954+
, CAL_1_0
1955+
, CC_BY_2_5_AU
1956+
, CC_BY_3_0_AT
1957+
, CC_BY_3_0_DE
1958+
, CC_BY_3_0_NL
1959+
, CC_BY_3_0_US
1960+
, CC_BY_NC_3_0_DE
1961+
, CC_BY_NC_ND_3_0_DE
1962+
, CC_BY_NC_ND_3_0_IGO
1963+
, CC_BY_NC_SA_2_0_FR
1964+
, CC_BY_NC_SA_2_0_UK
1965+
, CC_BY_NC_SA_3_0_DE
1966+
, CC_BY_NC_SA_3_0_IGO
1967+
, CC_BY_ND_3_0_DE
1968+
, CC_BY_SA_2_0_UK
1969+
, CC_BY_SA_2_1_JP
1970+
, CC_BY_SA_3_0_AT
1971+
, CC_BY_SA_3_0_DE
1972+
, CC_PDDC
1973+
, CDL_1_0
1974+
, CDLA_Permissive_2_0
1975+
, CERN_OHL_1_1
1976+
, CERN_OHL_1_2
1977+
, CERN_OHL_P_2_0
1978+
, CERN_OHL_S_2_0
1979+
, CERN_OHL_W_2_0
1980+
, COIL_1_0
1981+
, Community_Spec_1_0
1982+
, Copyleft_next_0_3_0
1983+
, Copyleft_next_0_3_1
1984+
, DL_DE_BY_2_0
1985+
, DRL_1_0
1986+
, Elastic_2_0
1987+
, EPICS
1988+
, Etalab_2_0
1989+
, FDK_AAC
1990+
, FreeBSD_DOC
1991+
, GD
1992+
, GFDL_1_1_invariants_only
1993+
, GFDL_1_1_invariants_or_later
1994+
, GFDL_1_1_no_invariants_only
1995+
, GFDL_1_1_no_invariants_or_later
1996+
, GFDL_1_2_invariants_only
1997+
, GFDL_1_2_invariants_or_later
1998+
, GFDL_1_2_no_invariants_only
1999+
, GFDL_1_2_no_invariants_or_later
2000+
, GFDL_1_3_invariants_only
2001+
, GFDL_1_3_invariants_or_later
2002+
, GFDL_1_3_no_invariants_only
2003+
, GFDL_1_3_no_invariants_or_later
2004+
, GLWTPL
2005+
, Hippocratic_2_1
2006+
, HPND_sell_variant
2007+
, HTMLTIDY
2008+
, Jam
2009+
, JPNIC
2010+
, Libpng_2_0
2011+
, Libselinux_1_0
2012+
, Linux_man_pages_copyleft
2013+
, Linux_OpenIB
2014+
, MIT_0
2015+
, MIT_Modern_Variant
2016+
, MIT_open_group
2017+
, MulanPSL_1_0
2018+
, MulanPSL_2_0
2019+
, NAIST_2003
2020+
, NCGL_UK_2_0
2021+
, NIST_PD_fallback
2022+
, NIST_PD
2023+
, NLOD_2_0
2024+
, NTP_0
2025+
, O_UDA_1_0
2026+
, ODC_By_1_0
2027+
, OFL_1_0_no_RFN
2028+
, OFL_1_0_RFN
2029+
, OFL_1_1_no_RFN
2030+
, OFL_1_1_RFN
2031+
, OGC_1_0
2032+
, OGDL_Taiwan_1_0
2033+
, OGL_Canada_2_0
2034+
, OGL_UK_1_0
2035+
, OGL_UK_2_0
2036+
, OGL_UK_3_0
2037+
, OPUBL_1_0
2038+
, Parity_6_0_0
2039+
, Parity_7_0_0
2040+
, PolyForm_Noncommercial_1_0_0
2041+
, PolyForm_Small_Business_1_0_0
2042+
, PSF_2_0
2043+
, SchemeReport
2044+
, Sendmail_8_23
2045+
, SHL_0_51
2046+
, SHL_0_5
2047+
, SSH_OpenSSH
2048+
, SSH_short
2049+
, SSPL_1_0
2050+
, TAPR_OHL_1_0
2051+
, TU_Berlin_1_0
2052+
, TU_Berlin_2_0
2053+
, UCL_1_0
2054+
, X11_distribute_modifications_variant
2055+
]
2056+
++ bulkOfLicenses
19202057

19212058
-- | Create a 'LicenseId' from a 'String'.
19222059
mkLicenseId :: LicenseListVersion -> String -> Maybe LicenseId
@@ -1925,6 +2062,7 @@ mkLicenseId LicenseListVersion_3_2 s = Map.lookup s stringLookup_3_2
19252062
mkLicenseId LicenseListVersion_3_6 s = Map.lookup s stringLookup_3_6
19262063
mkLicenseId LicenseListVersion_3_9 s = Map.lookup s stringLookup_3_9
19272064
mkLicenseId LicenseListVersion_3_10 s = Map.lookup s stringLookup_3_10
2065+
mkLicenseId LicenseListVersion_3_16 s = Map.lookup s stringLookup_3_16
19282066

19292067
stringLookup_3_0 :: Map String LicenseId
19302068
stringLookup_3_0 = Map.fromList $ map (\i -> (licenseId i, i)) $
@@ -1946,6 +2084,10 @@ stringLookup_3_10 :: Map String LicenseId
19462084
stringLookup_3_10 = Map.fromList $ map (\i -> (licenseId i, i)) $
19472085
licenseIdList LicenseListVersion_3_10
19482086

2087+
stringLookup_3_16 :: Map String LicenseId
2088+
stringLookup_3_16 = Map.fromList $ map (\i -> (licenseId i, i)) $
2089+
licenseIdList LicenseListVersion_3_16
2090+
19492091
-- | Licenses in all SPDX License lists
19502092
bulkOfLicenses :: [LicenseId]
19512093
bulkOfLicenses =

Cabal-syntax/src/Distribution/SPDX/LicenseListVersion.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ data LicenseListVersion
1212
| LicenseListVersion_3_6
1313
| LicenseListVersion_3_9
1414
| LicenseListVersion_3_10
15+
| LicenseListVersion_3_16
1516
deriving (Eq, Ord, Show, Enum, Bounded)
1617

1718
cabalSpecVersionToSPDXListVersion :: CabalSpecVersion -> LicenseListVersion
19+
cabalSpecVersionToSPDXListVersion CabalSpecV3_8 = LicenseListVersion_3_16
1820
cabalSpecVersionToSPDXListVersion CabalSpecV3_6 = LicenseListVersion_3_10
1921
cabalSpecVersionToSPDXListVersion CabalSpecV3_4 = LicenseListVersion_3_9
2022
cabalSpecVersionToSPDXListVersion CabalSpecV3_0 = LicenseListVersion_3_6

doc/file-format-changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ relative to the respective preceding *published* version.
4949
allowed of the form ``foo/**/literalFile``. Prior, double-star
5050
wildcards required the trailing filename itself be a wildcard.
5151

52+
* License fields use identifiers from SPDX License List version
53+
``3.16 2022-02-06``
54+
5255

5356
``cabal-version: 3.6``
5457
----------------------

templates/SPDX.LicenseExceptionId.template.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ licenseExceptionIdList LicenseListVersion_3_9 =
9494
licenseExceptionIdList LicenseListVersion_3_10 =
9595
{{licenseList_perv.v_3_10}}
9696
++ bulkOfLicenses
97+
licenseExceptionIdList LicenseListVersion_3_16 =
98+
{{licenseList_perv.v_3_16}}
99+
++ bulkOfLicenses
97100

98101
-- | Create a 'LicenseExceptionId' from a 'String'.
99102
mkLicenseExceptionId :: LicenseListVersion -> String -> Maybe LicenseExceptionId
@@ -102,6 +105,7 @@ mkLicenseExceptionId LicenseListVersion_3_2 s = Map.lookup s stringLookup_3_2
102105
mkLicenseExceptionId LicenseListVersion_3_6 s = Map.lookup s stringLookup_3_6
103106
mkLicenseExceptionId LicenseListVersion_3_9 s = Map.lookup s stringLookup_3_9
104107
mkLicenseExceptionId LicenseListVersion_3_10 s = Map.lookup s stringLookup_3_10
108+
mkLicenseExceptionId LicenseListVersion_3_16 s = Map.lookup s stringLookup_3_16
105109

106110
stringLookup_3_0 :: Map String LicenseExceptionId
107111
stringLookup_3_0 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
@@ -123,6 +127,10 @@ stringLookup_3_10 :: Map String LicenseExceptionId
123127
stringLookup_3_10 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
124128
licenseExceptionIdList LicenseListVersion_3_10
125129

130+
stringLookup_3_16 :: Map String LicenseExceptionId
131+
stringLookup_3_16 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
132+
licenseExceptionIdList LicenseListVersion_3_16
133+
126134
-- | License exceptions in all SPDX License lists
127135
bulkOfLicenses :: [LicenseExceptionId]
128136
bulkOfLicenses =

templates/SPDX.LicenseId.template.hs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ licenseIdList LicenseListVersion_3_9 =
169169
{{licenseList_perv.v_3_9}}
170170
++ bulkOfLicenses
171171
licenseIdList LicenseListVersion_3_10 =
172-
{{licenseList_perv.v_3_9}}
172+
{{licenseList_perv.v_3_10}}
173+
++ bulkOfLicenses
174+
licenseIdList LicenseListVersion_3_16 =
175+
{{licenseList_perv.v_3_16}}
173176
++ bulkOfLicenses
174177

175178
-- | Create a 'LicenseId' from a 'String'.
@@ -179,6 +182,7 @@ mkLicenseId LicenseListVersion_3_2 s = Map.lookup s stringLookup_3_2
179182
mkLicenseId LicenseListVersion_3_6 s = Map.lookup s stringLookup_3_6
180183
mkLicenseId LicenseListVersion_3_9 s = Map.lookup s stringLookup_3_9
181184
mkLicenseId LicenseListVersion_3_10 s = Map.lookup s stringLookup_3_10
185+
mkLicenseId LicenseListVersion_3_16 s = Map.lookup s stringLookup_3_16
182186

183187
stringLookup_3_0 :: Map String LicenseId
184188
stringLookup_3_0 = Map.fromList $ map (\i -> (licenseId i, i)) $
@@ -200,6 +204,10 @@ stringLookup_3_10 :: Map String LicenseId
200204
stringLookup_3_10 = Map.fromList $ map (\i -> (licenseId i, i)) $
201205
licenseIdList LicenseListVersion_3_10
202206

207+
stringLookup_3_16 :: Map String LicenseId
208+
stringLookup_3_16 = Map.fromList $ map (\i -> (licenseId i, i)) $
209+
licenseIdList LicenseListVersion_3_16
210+
203211
-- | Licenses in all SPDX License lists
204212
bulkOfLicenses :: [LicenseId]
205213
bulkOfLicenses =

0 commit comments

Comments
 (0)