Skip to content

Commit

Permalink
Merge pull request #6662 from phadej/spdx-list-3.8-2020-02-09
Browse files Browse the repository at this point in the history
Add SPDX License List 3.8 (2020-02-09)
  • Loading branch information
phadej authored Apr 6, 2020
2 parents adb1cba + 3bd1d5c commit 79d28ce
Show file tree
Hide file tree
Showing 14 changed files with 5,778 additions and 58 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.10.1 -v --lib-only -s print-config
- name: Validate print-tool-versions
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.8.3 -v --solver-benchmarks -s print-config
- name: Validate print-tool-versions
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.6.5 -v -s print-config
- name: Validate print-tool-versions
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.4.4 -v -s print-config
- name: Validate print-tool-versions
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.2.2 -v -s print-config
- name: Validate print-tool-versions
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.0.2 -v -s print-config
- name: Validate print-tool-versions
Expand Down Expand Up @@ -302,7 +302,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-7.10.3 -v -s print-config
- name: Validate print-tool-versions
Expand Down Expand Up @@ -346,7 +346,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-7.8.4 -v --lib-only -s print-config
- name: Validate print-tool-versions
Expand Down Expand Up @@ -388,7 +388,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-7.6.3 -v --lib-only -s print-config
- name: Validate print-tool-versions
Expand Down Expand Up @@ -432,7 +432,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_REF:temporary-ci-branch
git checkout $GITHUB_SHA
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: Validate print-config
run: sh validate.sh -j 2 -w ghc-8.8.3 -v --lib-only -s print-config
- name: Validate print-tool-versions
Expand Down
43 changes: 34 additions & 9 deletions Cabal/Distribution/SPDX/LicenseExceptionId.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,27 @@ data LicenseExceptionId
| GCC_exception_2_0 -- ^ @GCC-exception-2.0@, GCC Runtime Library exception 2.0
| GCC_exception_3_1 -- ^ @GCC-exception-3.1@, GCC Runtime Library exception 3.1
| Gnu_javamail_exception -- ^ @gnu-javamail-exception@, GNU JavaMail exception
| GPL_CC_1_0 -- ^ @GPL-CC-1.0@, GPL Cooperation Commitment 1.0, SPDX License List 3.6
| GPL_3_0_linking_exception -- ^ @GPL-3.0-linking-exception@, GPL-3.0 Linking Exception, SPDX License List 3.8
| GPL_3_0_linking_source_exception -- ^ @GPL-3.0-linking-source-exception@, GPL-3.0 Linking Exception (with Corresponding Source), SPDX License List 3.8
| GPL_CC_1_0 -- ^ @GPL-CC-1.0@, GPL Cooperation Commitment 1.0, SPDX License List 3.6, SPDX License List 3.8
| I2p_gpl_java_exception -- ^ @i2p-gpl-java-exception@, i2p GPL+Java Exception
| Libtool_exception -- ^ @Libtool-exception@, Libtool Exception
| Linux_syscall_note -- ^ @Linux-syscall-note@, Linux Syscall Note
| LLVM_exception -- ^ @LLVM-exception@, LLVM Exception, SPDX License List 3.2, SPDX License List 3.6
| LLVM_exception -- ^ @LLVM-exception@, LLVM Exception, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.8
| LZMA_exception -- ^ @LZMA-exception@, LZMA exception
| Mif_exception -- ^ @mif-exception@, Macros and Inline Functions Exception
| Nokia_Qt_exception_1_1 -- ^ @Nokia-Qt-exception-1.1@, Nokia Qt LGPL exception 1.1, SPDX License List 3.0, SPDX License List 3.2
| OCaml_LGPL_linking_exception -- ^ @OCaml-LGPL-linking-exception@, OCaml LGPL Linking Exception, SPDX License List 3.6
| OCaml_LGPL_linking_exception -- ^ @OCaml-LGPL-linking-exception@, OCaml LGPL Linking Exception, SPDX License List 3.6, SPDX License List 3.8
| OCCT_exception_1_0 -- ^ @OCCT-exception-1.0@, Open CASCADE Exception 1.0
| OpenJDK_assembly_exception_1_0 -- ^ @OpenJDK-assembly-exception-1.0@, OpenJDK Assembly exception 1.0, SPDX License List 3.2, SPDX License List 3.6
| OpenJDK_assembly_exception_1_0 -- ^ @OpenJDK-assembly-exception-1.0@, OpenJDK Assembly exception 1.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.8
| Openvpn_openssl_exception -- ^ @openvpn-openssl-exception@, OpenVPN OpenSSL Exception
| PS_or_PDF_font_exception_20170817 -- ^ @PS-or-PDF-font-exception-20170817@, PS/PDF font exception (2017-08-17), SPDX License List 3.2, SPDX License List 3.6
| Qt_GPL_exception_1_0 -- ^ @Qt-GPL-exception-1.0@, Qt GPL exception 1.0, SPDX License List 3.2, SPDX License List 3.6
| Qt_LGPL_exception_1_1 -- ^ @Qt-LGPL-exception-1.1@, Qt LGPL exception 1.1, SPDX License List 3.2, SPDX License List 3.6
| PS_or_PDF_font_exception_20170817 -- ^ @PS-or-PDF-font-exception-20170817@, PS/PDF font exception (2017-08-17), SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.8
| Qt_GPL_exception_1_0 -- ^ @Qt-GPL-exception-1.0@, Qt GPL exception 1.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.8
| Qt_LGPL_exception_1_1 -- ^ @Qt-LGPL-exception-1.1@, Qt LGPL exception 1.1, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.8
| Qwt_exception_1_0 -- ^ @Qwt-exception-1.0@, Qwt exception 1.0
| Swift_exception -- ^ @Swift-exception@, Swift Exception, SPDX License List 3.6
| Swift_exception -- ^ @Swift-exception@, Swift Exception, SPDX License List 3.6, SPDX License List 3.8
| U_boot_exception_2_0 -- ^ @u-boot-exception-2.0@, U-Boot exception 2.0
| Universal_FOSS_exception_1_0 -- ^ @Universal-FOSS-exception-1.0@, Universal FOSS Exception, Version 1.0, SPDX License List 3.6
| Universal_FOSS_exception_1_0 -- ^ @Universal-FOSS-exception-1.0@, Universal FOSS Exception, Version 1.0, SPDX License List 3.6, SPDX License List 3.8
| WxWindows_exception_3_1 -- ^ @WxWindows-exception-3.1@, WxWindows Library Exception 3.1
deriving (Eq, Ord, Enum, Bounded, Show, Read, Typeable, Data, Generic)

Expand Down Expand Up @@ -116,6 +118,8 @@ licenseExceptionId Freertos_exception_2_0 = "freertos-exception-2.0"
licenseExceptionId GCC_exception_2_0 = "GCC-exception-2.0"
licenseExceptionId GCC_exception_3_1 = "GCC-exception-3.1"
licenseExceptionId Gnu_javamail_exception = "gnu-javamail-exception"
licenseExceptionId GPL_3_0_linking_exception = "GPL-3.0-linking-exception"
licenseExceptionId GPL_3_0_linking_source_exception = "GPL-3.0-linking-source-exception"
licenseExceptionId GPL_CC_1_0 = "GPL-CC-1.0"
licenseExceptionId I2p_gpl_java_exception = "i2p-gpl-java-exception"
licenseExceptionId Libtool_exception = "Libtool-exception"
Expand Down Expand Up @@ -155,6 +159,8 @@ licenseExceptionName Freertos_exception_2_0 = "FreeRTOS Exception 2.0"
licenseExceptionName GCC_exception_2_0 = "GCC Runtime Library exception 2.0"
licenseExceptionName GCC_exception_3_1 = "GCC Runtime Library exception 3.1"
licenseExceptionName Gnu_javamail_exception = "GNU JavaMail exception"
licenseExceptionName GPL_3_0_linking_exception = "GPL-3.0 Linking Exception"
licenseExceptionName GPL_3_0_linking_source_exception = "GPL-3.0 Linking Exception (with Corresponding Source)"
licenseExceptionName GPL_CC_1_0 = "GPL Cooperation Commitment 1.0"
licenseExceptionName I2p_gpl_java_exception = "i2p GPL+Java Exception"
licenseExceptionName Libtool_exception = "Libtool Exception"
Expand Down Expand Up @@ -206,12 +212,27 @@ licenseExceptionIdList LicenseListVersion_3_6 =
, Universal_FOSS_exception_1_0
]
++ bulkOfLicenses
licenseExceptionIdList LicenseListVersion_3_8 =
[ GPL_3_0_linking_exception
, GPL_3_0_linking_source_exception
, GPL_CC_1_0
, LLVM_exception
, OCaml_LGPL_linking_exception
, OpenJDK_assembly_exception_1_0
, PS_or_PDF_font_exception_20170817
, Qt_GPL_exception_1_0
, Qt_LGPL_exception_1_1
, Swift_exception
, Universal_FOSS_exception_1_0
]
++ bulkOfLicenses

-- | Create a 'LicenseExceptionId' from a 'String'.
mkLicenseExceptionId :: LicenseListVersion -> String -> Maybe LicenseExceptionId
mkLicenseExceptionId LicenseListVersion_3_0 s = Map.lookup s stringLookup_3_0
mkLicenseExceptionId LicenseListVersion_3_2 s = Map.lookup s stringLookup_3_2
mkLicenseExceptionId LicenseListVersion_3_6 s = Map.lookup s stringLookup_3_6
mkLicenseExceptionId LicenseListVersion_3_8 s = Map.lookup s stringLookup_3_8

stringLookup_3_0 :: Map String LicenseExceptionId
stringLookup_3_0 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
Expand All @@ -225,6 +246,10 @@ stringLookup_3_6 :: Map String LicenseExceptionId
stringLookup_3_6 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
licenseExceptionIdList LicenseListVersion_3_6

stringLookup_3_8 :: Map String LicenseExceptionId
stringLookup_3_8 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
licenseExceptionIdList LicenseListVersion_3_8

-- | License exceptions in all SPDX License lists
bulkOfLicenses :: [LicenseExceptionId]
bulkOfLicenses =
Expand Down
Loading

0 comments on commit 79d28ce

Please sign in to comment.