From b32aea32b7d40193b754a64d62126a3bb6a2935b Mon Sep 17 00:00:00 2001
From: Gershom Bazerman <gershom@arista.com>
Date: Tue, 24 Jan 2023 13:59:06 -0500
Subject: [PATCH 001/144] elim warning spam from 8500

(cherry picked from commit ffa912714fda52e97d117b48d016a6fce0d0e95c)
---
 .../src/Distribution/Client/FetchUtils.hs     | 38 ++++++++++---------
 .../Distribution/Client/ProjectPlanning.hs    |  6 +--
 2 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/cabal-install/src/Distribution/Client/FetchUtils.hs b/cabal-install/src/Distribution/Client/FetchUtils.hs
index 963a94c1aec..f14ef418bd2 100644
--- a/cabal-install/src/Distribution/Client/FetchUtils.hs
+++ b/cabal-install/src/Distribution/Client/FetchUtils.hs
@@ -131,25 +131,29 @@ verifyFetchedTarball verbosity repoCtxt repo pkgid =
          case res of
            Left e -> warn verbosity ("Error verifying fetched tarball " ++ file ++ ", will redownload: " ++ show (e :: SomeException)) >> pure False
            Right b -> pure b
-   in handleError $ case repo of
-           -- a secure repo has hashes we can compare against to confirm this is the correct file.
-           RepoSecure{} ->
-             repoContextWithSecureRepo repoCtxt repo $ \repoSecure ->
-                  Sec.withIndex repoSecure $ \callbacks ->
-                    let warnAndFail s = warn verbosity ("Fetched tarball " ++ file ++ " does not match server, will redownload: " ++ s) >> return False
-                    -- the do block in parens is due to dealing with the checked exceptions mechanism.
-                    in (do fileInfo <- Sec.indexLookupFileInfo callbacks pkgid
-                           sz <- Sec.FileLength . fromInteger <$> getFileSize file
-                           if sz /= Sec.fileInfoLength (Sec.trusted fileInfo)
-                             then warnAndFail "file length mismatch"
-                             else do
-                               res <- Sec.compareTrustedFileInfo (Sec.trusted fileInfo) <$> Sec.computeFileInfo (Sec.Path file :: Sec.Path Sec.Absolute)
-                               if res
-                                 then pure True
-                                 else warnAndFail "file hash mismatch")
+   in handleError $ do
+        exists <- doesFileExist file
+        if not exists
+          then return False
+          else case repo of
+            -- a secure repo has hashes we can compare against to confirm this is the correct file.
+                RepoSecure{} ->
+                 repoContextWithSecureRepo repoCtxt repo $ \repoSecure ->
+                   Sec.withIndex repoSecure $ \callbacks ->
+                     let warnAndFail s = warn verbosity ("Fetched tarball " ++ file ++ " does not match server, will redownload: " ++ s) >> return False
+                     -- the do block in parens is due to dealing with the checked exceptions mechanism.
+                     in (do fileInfo <- Sec.indexLookupFileInfo callbacks pkgid
+                            sz <- Sec.FileLength . fromInteger <$> getFileSize file
+                            if sz /= Sec.fileInfoLength (Sec.trusted fileInfo)
+                              then warnAndFail "file length mismatch"
+                              else do
+                                res <- Sec.compareTrustedFileInfo (Sec.trusted fileInfo) <$> Sec.computeFileInfo (Sec.Path file :: Sec.Path Sec.Absolute)
+                                if res
+                                  then pure True
+                                  else warnAndFail "file hash mismatch")
                        `Sec.catchChecked` (\(e :: Sec.InvalidPackageException) -> warnAndFail (show e))
                        `Sec.catchChecked` (\(e :: Sec.VerificationError) -> warnAndFail (show e))
-           _ -> pure True
+                _ -> pure True
 
 -- | Fetch a package if we don't have it already.
 --
diff --git a/cabal-install/src/Distribution/Client/ProjectPlanning.hs b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
index 978af213b1b..4ec141037b7 100644
--- a/cabal-install/src/Distribution/Client/ProjectPlanning.hs
+++ b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
@@ -935,7 +935,7 @@ getPackageSourceHashes verbosity withRepoCtx solverPlan = do
               _            -> Right (pkgid, repo)
           | (pkgid, RepoTarballPackage repo _ _) <- allPkgLocations ]
 
-    (repoTarballPkgsWithMetadata, repoTarballPkgsToRedownload) <- fmap partitionEithers $
+    (repoTarballPkgsWithMetadata, repoTarballPkgsToDownloadWithMeta) <- fmap partitionEithers $
       liftIO $ withRepoCtx $ \repoctx -> forM repoTarballPkgsWithMetadataUnvalidated $
         \x@(pkg, repo) -> verifyFetchedTarball verbosity repoctx repo pkg >>= \b -> case b of
                           True -> return $ Left x
@@ -944,7 +944,7 @@ getPackageSourceHashes verbosity withRepoCtx solverPlan = do
     -- For tarballs from repos that do not have hashes available we now have
     -- to check if the packages were downloaded already.
     --
-    (repoTarballPkgsToDownload',
+    (repoTarballPkgsToDownloadWithNoMeta,
      repoTarballPkgsDownloaded)
       <- fmap partitionEithers $
          liftIO $ sequence
@@ -954,7 +954,7 @@ getPackageSourceHashes verbosity withRepoCtx solverPlan = do
                   Just tarball -> return (Right (pkgid, tarball))
            | (pkgid, repo) <- repoTarballPkgsWithoutMetadata ]
 
-    let repoTarballPkgsToDownload = repoTarballPkgsToRedownload ++ repoTarballPkgsToDownload'
+    let repoTarballPkgsToDownload = repoTarballPkgsToDownloadWithMeta ++ repoTarballPkgsToDownloadWithNoMeta
     (hashesFromRepoMetadata,
      repoTarballPkgsNewlyDownloaded) <-
       -- Avoid having to initialise the repository (ie 'withRepoCtx') if we

From 0dad9e39b1bf48fb69556f548e8349152dd5f247 Mon Sep 17 00:00:00 2001
From: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Date: Wed, 26 Oct 2022 19:09:05 +0200
Subject: [PATCH 002/144] testuite: doctest: move to ghc recommended

(cherry picked from commit ce2c92fcb2d1d7ef92f1d5caba5e4a956ad3ef9a)
---
 .github/workflows/quick-jobs.yml | 4 ++--
 Makefile                         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/quick-jobs.yml b/.github/workflows/quick-jobs.yml
index 2f9d42666fc..7d39d431cb9 100644
--- a/.github/workflows/quick-jobs.yml
+++ b/.github/workflows/quick-jobs.yml
@@ -69,8 +69,8 @@ jobs:
       - name: ghcup
         run: |
           ghcup config set cache true
-          ghcup install ghc 8.10.7
-          ghcup set ghc 8.10.7
+          ghcup install ghc recommended
+          ghcup set ghc recommended
       - name: Update Hackage index
         run: cabal v2-update
       - name: Install doctest
diff --git a/Makefile b/Makefile
index 63654e83167..1ffbec77c66 100644
--- a/Makefile
+++ b/Makefile
@@ -74,7 +74,7 @@ ghcid-cli :
 # doctests (relies on .ghc.environment files)
 
 doctest :
-	doctest --fast Cabal-syntax/src Cabal/src
+	doctest --fast -XHaskell2010 Cabal-syntax/src Cabal/src
 
 # This is not run as part of validate.sh (we need hackage-security, which is tricky to get).
 doctest-cli :

From 9eed20d15991756644b74194fc9e25f765b23f50 Mon Sep 17 00:00:00 2001
From: Mikolaj Konarski <mikolaj@well-typed.com>
Date: Wed, 8 Feb 2023 15:46:25 +0100
Subject: [PATCH 003/144] Hack around CI problems by sudo chown and disabling
 cache for Windows validate (#8739)

* Try to fix ghcup cache in CI via sudo chmod

* Revert "Try to fix ghcup cache in CI via sudo chmod"

This reverts commit 0bb71d10fa763b2f8f3382885d635ad1cfa09752.

* Try not caching store in validate jobs to avoid double package bugs

* Revert "Try not caching store in validate jobs to avoid double package bugs"

This reverts commit b3f378222886ddd754ccccc2a79fa500b78f4998.

* Try not to cache store on Windows in validate jobs

to avoid double directory package bugs.

* Revert "Revert "Try to fix ghcup cache in CI via sudo chmod""

This reverts commit b3a843a861cbddbe8ae9d44b20250d806f331cd3.

* Try sudo only on (new) Linux, where it should be available

* Also change the user

* Document the particular hack snippets in validate.yml

* Add an extra diagnostic ls for ghcup dirs

* Also hack the other affected CI scripts

* Also print the version of ghcup used for debugging

(cherry picked from commit 22dcb3c2709e2ab65e3192bd48e5776e8d366601)
---
 .github/workflows/bootstrap.yml  | 11 +++++++++++
 .github/workflows/quick-jobs.yml | 22 ++++++++++++++++++++++
 .github/workflows/validate.yml   | 15 ++++++++++++++-
 3 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml
index 885b1916bc8..b404cacfb08 100644
--- a/.github/workflows/bootstrap.yml
+++ b/.github/workflows/bootstrap.yml
@@ -35,9 +35,20 @@ jobs:
           restore-keys: bootstrap-${{ runner.os }}-${{ matrix.ghc }}-20221115-
 
       - uses: actions/checkout@v3
+      # See https://github.com/haskell/cabal/pull/8739
+      - name: Sudo chmod to permit ghcup to update its cache
+        run: |
+          if [[ "${{ runner.os }}" == "Linux" ]]; then
+            sudo ls -lah /usr/local/.ghcup/cache
+            sudo mkdir -p /usr/local/.ghcup/cache
+            sudo ls -lah /usr/local/.ghcup/cache
+            sudo chown -R $USER /usr/local/.ghcup
+            sudo chmod -R 777 /usr/local/.ghcup
+          fi
       - name: bootstrap.py
         run: |
           GHC_VERSION=${{ matrix.ghc }}
+          ghcup --version
           ghcup config set cache true
           ghcup install ghc $GHC_VERSION
 
diff --git a/.github/workflows/quick-jobs.yml b/.github/workflows/quick-jobs.yml
index 7d39d431cb9..466ec4d57dc 100644
--- a/.github/workflows/quick-jobs.yml
+++ b/.github/workflows/quick-jobs.yml
@@ -28,8 +28,19 @@ jobs:
         with:
           path: ~/.cabal/store
           key: linux-store-meta
+      # See https://github.com/haskell/cabal/pull/8739
+      - name: Sudo chmod to permit ghcup to update its cache
+        run: |
+          if [[ "${{ runner.os }}" == "Linux" ]]; then
+            sudo ls -lah /usr/local/.ghcup/cache
+            sudo mkdir -p /usr/local/.ghcup/cache
+            sudo ls -lah /usr/local/.ghcup/cache
+            sudo chown -R $USER /usr/local/.ghcup
+            sudo chmod -R 777 /usr/local/.ghcup
+          fi
       - name: ghcup
         run: |
+          ghcup --version
           ghcup config set cache true
           ghcup install ghc recommended
           ghcup set ghc recommended
@@ -66,8 +77,19 @@ jobs:
         with:
           path: ~/.cabal/store
           key: linux-store-doctest
+      # See https://github.com/haskell/cabal/pull/8739
+      - name: Sudo chmod to permit ghcup to update its cache
+        run: |
+          if [[ "${{ runner.os }}" == "Linux" ]]; then
+            sudo ls -lah /usr/local/.ghcup/cache
+            sudo mkdir -p /usr/local/.ghcup/cache
+            sudo ls -lah /usr/local/.ghcup/cache
+            sudo chown -R $USER /usr/local/.ghcup
+            sudo chmod -R 777 /usr/local/.ghcup
+          fi
       - name: ghcup
         run: |
+          ghcup --version
           ghcup config set cache true
           ghcup install ghc recommended
           ghcup set ghc recommended
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 9c9ac2f4a3e..658101b5aec 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -57,6 +57,16 @@ jobs:
 
       - uses: actions/checkout@v3
 
+      # See https://github.com/haskell/cabal/pull/8739
+      - name: Sudo chmod to permit ghcup to update its cache
+        run: |
+          if [[ "${{ runner.os }}" == "Linux" ]]; then
+            sudo ls -lah /usr/local/.ghcup/cache
+            sudo mkdir -p /usr/local/.ghcup/cache
+            sudo ls -lah /usr/local/.ghcup/cache
+            sudo chown -R $USER /usr/local/.ghcup
+            sudo chmod -R 777 /usr/local/.ghcup
+          fi
       - uses: haskell/actions/setup@v2
         id: setup-haskell
         with:
@@ -65,7 +75,10 @@ jobs:
 
       #  See the following link for a breakdown of the following step
       #  https://github.com/haskell/actions/issues/7#issuecomment-745697160
-      - uses: actions/cache@v2
+      #
+      # See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded
+      - if: ${{ runner.os != 'Windows' }}
+        uses: actions/cache@v2
         with:
           # validate.sh uses a special build dir
           path: |

From aac50e97948b30dfdec83bfb99dc920499271058 Mon Sep 17 00:00:00 2001
From: Mikolaj Konarski <mikolaj@well-typed.com>
Date: Wed, 8 Feb 2023 16:16:32 +0100
Subject: [PATCH 004/144] Work around ghcup cache woes also in our tiny CI
 scripts (#8743)

(cherry picked from commit 4756705cce74a2af1dc1b1202a1cc96b95eb6e5e)
---
 .github/workflows/changelogs.yml | 8 ++++++++
 .github/workflows/whitespace.yml | 9 +++++++++
 2 files changed, 17 insertions(+)

diff --git a/.github/workflows/changelogs.yml b/.github/workflows/changelogs.yml
index 9c1e2ef70e8..0ee8da9fda3 100644
--- a/.github/workflows/changelogs.yml
+++ b/.github/workflows/changelogs.yml
@@ -33,6 +33,14 @@ jobs:
         with:
           path: ~/.cabal/store
           key: linux-store-changelogs
+      # See https://github.com/haskell/cabal/pull/8739
+      - name: Sudo chmod to permit ghcup to update its cache
+        run: |
+          if [[ "${{ runner.os }}" == "Linux" ]]; then
+            sudo mkdir -p /usr/local/.ghcup/cache
+            sudo chown -R $USER /usr/local/.ghcup
+            sudo chmod -R 777 /usr/local/.ghcup
+          fi
       - name: ghcup
         run: |
           ghcup config set cache true
diff --git a/.github/workflows/whitespace.yml b/.github/workflows/whitespace.yml
index 0eddc2f7307..1254f7ccc4e 100644
--- a/.github/workflows/whitespace.yml
+++ b/.github/workflows/whitespace.yml
@@ -31,6 +31,15 @@ jobs:
         path: "~/.local/bin"
         key: fix-whitespace-${{ env.fix-whitespace-ver }}
 
+    # See https://github.com/haskell/cabal/pull/8739
+    - name: Sudo chmod to permit ghcup to update its cache
+      run: |
+        if [[ "${{ runner.os }}" == "Linux" ]]; then
+          sudo mkdir -p /usr/local/.ghcup/cache
+          sudo chown -R $USER /usr/local/.ghcup
+          sudo chmod -R 777 /usr/local/.ghcup
+        fi
+
     - uses: haskell/actions/setup@v2
       if: ${{ !steps.cache.outputs.cache-hit }}
       with:

From b0bda36a94efc347fccbc7ef151fbb3e7cefd1ef Mon Sep 17 00:00:00 2001
From: Mikolaj Konarski <mikolaj.konarski@gmail.com>
Date: Thu, 9 Feb 2023 19:58:32 +0100
Subject: [PATCH 005/144] Work around ghcup cache woes also in our dogfooding
 CI scripts

(cherry picked from commit a71437360faa9de62a6165eb80e0167985105509)
---
 .github/workflows/validate.yml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 658101b5aec..317870c0fd1 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -274,6 +274,16 @@ jobs:
     steps:
       - uses: actions/checkout@v3
 
+      # See https://github.com/haskell/cabal/pull/8739
+      - name: Sudo chmod to permit ghcup to update its cache
+        run: |
+          if [[ "${{ runner.os }}" == "Linux" ]]; then
+            sudo ls -lah /usr/local/.ghcup/cache
+            sudo mkdir -p /usr/local/.ghcup/cache
+            sudo ls -lah /usr/local/.ghcup/cache
+            sudo chown -R $USER /usr/local/.ghcup
+            sudo chmod -R 777 /usr/local/.ghcup
+          fi
       - uses: haskell/actions/setup@v2
         id: setup-haskell
         with:

From e98b1b18ac761c13e195850ff8dd602ae09c1244 Mon Sep 17 00:00:00 2001
From: Pierre Le Marre <dev@wismill.eu>
Date: Thu, 9 Feb 2023 10:22:26 +0100
Subject: [PATCH 006/144] Ensure js-sources are used only with JavaScript arch

(cherry picked from commit 87efb24d8d993df676c12822a45dbfae6ada077c)
---
 Cabal/src/Distribution/Simple/GHC.hs      | 14 ++++++++++----
 Cabal/src/Distribution/Simple/Register.hs |  5 ++++-
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/Cabal/src/Distribution/Simple/GHC.hs b/Cabal/src/Distribution/Simple/GHC.hs
index d5d9241a8ed..d8e48adb425 100644
--- a/Cabal/src/Distribution/Simple/GHC.hs
+++ b/Cabal/src/Distribution/Simple/GHC.hs
@@ -523,7 +523,8 @@ buildOrReplLib mReplFlags verbosity numJobs pkg_descr lbi lib clbi = do
       comp = compiler lbi
       ghcVersion = compilerVersion comp
       implInfo  = getImplInfo comp
-      platform@(Platform _hostArch hostOS) = hostPlatform lbi
+      platform@(Platform hostArch hostOS) = hostPlatform lbi
+      hasJsSupport = hostArch == JavaScript
       has_code = not (componentIsIndefinite clbi)
 
   relLibTargetDir <- makeRelativeToCurrentDirectory libTargetDir
@@ -567,11 +568,13 @@ buildOrReplLib mReplFlags verbosity numJobs pkg_descr lbi lib clbi = do
                       , toNubListR (cxxSources libBi)
                       , toNubListR (cmmSources libBi)
                       , toNubListR (asmSources libBi)
-                      , toNubListR (jsSources  libBi)
+                      , if hasJsSupport
                         -- JS files are C-like with GHC's JS backend: they are
                         -- "compiled" into `.o` files (renamed with a header).
                         -- This is a difference from GHCJS, for which we only
                         -- pass the JS files at link time.
+                        then toNubListR (jsSources  libBi)
+                        else mempty
                       ]
       cLikeObjs   = map (`replaceExtension` objExtension) cLikeSources
       baseOpts    = componentGhcOptions verbosity lbi libBi clbi libTargetDir
@@ -730,7 +733,7 @@ buildOrReplLib mReplFlags verbosity numJobs pkg_descr lbi lib clbi = do
       | filename <- cSources libBi]
 
   -- build any JS sources
-  unless (not has_code || null (jsSources libBi)) $ do
+  unless (not has_code || not hasJsSupport || null (jsSources libBi)) $ do
     info verbosity "Building JS Sources..."
     sequence_
       [ do let vanillaJsOpts = Internal.componentJsGhcOptions verbosity implInfo
@@ -2087,7 +2090,10 @@ installLib verbosity lbi targetDir dynlibTargetDir _builtDir pkg lib clbi = do
                    && null (cxxSources (libBuildInfo lib))
                    && null (cmmSources (libBuildInfo lib))
                    && null (asmSources (libBuildInfo lib))
-                   && null (jsSources (libBuildInfo lib))
+                   && (null (jsSources (libBuildInfo lib)) || not hasJsSupport)
+    hasJsSupport = case hostPlatform lbi of
+      Platform JavaScript _ -> True
+      _                     -> False
     has_code = not (componentIsIndefinite clbi)
     whenHasCode = when has_code
     whenVanilla = when (hasLib && withVanillaLib lbi)
diff --git a/Cabal/src/Distribution/Simple/Register.hs b/Cabal/src/Distribution/Simple/Register.hs
index 29b839e261f..c4dc22c7b7a 100644
--- a/Cabal/src/Distribution/Simple/Register.hs
+++ b/Cabal/src/Distribution/Simple/Register.hs
@@ -466,8 +466,11 @@ generalInstalledPackageInfo adjustRelIncDirs pkg abi_hash lib lbi clbi installDi
                              || not (null (asmSources bi))
                              || not (null (cmmSources bi))
                              || not (null (cxxSources bi))
-                             || not (null (jsSources bi)))
+                             || (not (null (jsSources bi)) && hasJsSupport))
                && not (componentIsIndefinite clbi)
+    hasJsSupport = case hostPlatform lbi of
+      Platform JavaScript _ -> True
+      _                     -> False
     libdirsStatic
       | hasLibrary = libdir installDirs : extraLibDirsStaticOrFallback
       | otherwise  =                      extraLibDirsStaticOrFallback

From f97c4bb058f5c6b7bf9c10bdb735426501e11680 Mon Sep 17 00:00:00 2001
From: Pierre Le Marre <dev@wismill.eu>
Date: Thu, 9 Feb 2023 15:35:37 +0100
Subject: [PATCH 007/144] Add test

(cherry picked from commit 4d33ba6875b96b76b619293590eba96e09bc8045)
---
 .../JS/JsSources/{cabal.test.hs => js-arch.test.hs}  |  0
 .../PackageTests/JS/JsSources/jssources.cabal        |  5 ++++-
 .../PackageTests/JS/JsSources/other-arch.out         | 12 ++++++++++++
 .../PackageTests/JS/JsSources/other-arch.test.hs     |  7 +++++++
 cabal-testsuite/PackageTests/JS/JsSources/src/Lib.hs |  3 ++-
 .../PackageTests/JS/JsSources/srcJS/Lib.hs           |  3 +++
 6 files changed, 28 insertions(+), 2 deletions(-)
 rename cabal-testsuite/PackageTests/JS/JsSources/{cabal.test.hs => js-arch.test.hs} (100%)
 create mode 100644 cabal-testsuite/PackageTests/JS/JsSources/other-arch.out
 create mode 100644 cabal-testsuite/PackageTests/JS/JsSources/other-arch.test.hs
 create mode 100644 cabal-testsuite/PackageTests/JS/JsSources/srcJS/Lib.hs

diff --git a/cabal-testsuite/PackageTests/JS/JsSources/cabal.test.hs b/cabal-testsuite/PackageTests/JS/JsSources/js-arch.test.hs
similarity index 100%
rename from cabal-testsuite/PackageTests/JS/JsSources/cabal.test.hs
rename to cabal-testsuite/PackageTests/JS/JsSources/js-arch.test.hs
diff --git a/cabal-testsuite/PackageTests/JS/JsSources/jssources.cabal b/cabal-testsuite/PackageTests/JS/JsSources/jssources.cabal
index 581d8921026..4595a6cfc2b 100644
--- a/cabal-testsuite/PackageTests/JS/JsSources/jssources.cabal
+++ b/cabal-testsuite/PackageTests/JS/JsSources/jssources.cabal
@@ -6,7 +6,10 @@ build-type: Simple
 library
   default-language: Haskell2010
   js-sources: jsbits/lib.js
-  hs-source-dirs: src
+  if arch(JavaScript)
+    hs-source-dirs: srcJS
+  else
+    hs-source-dirs: src
   exposed-modules: Lib
   build-depends: base
 
diff --git a/cabal-testsuite/PackageTests/JS/JsSources/other-arch.out b/cabal-testsuite/PackageTests/JS/JsSources/other-arch.out
new file mode 100644
index 00000000000..9f64e6764c5
--- /dev/null
+++ b/cabal-testsuite/PackageTests/JS/JsSources/other-arch.out
@@ -0,0 +1,12 @@
+# cabal v2-run
+Resolving dependencies...
+Build profile: -w ghc-<GHCVER> -O1
+In order, the following will be built:
+ - jssources-0 (lib) (first run)
+ - jssources-0 (exe:demo) (first run)
+Configuring library for jssources-0..
+Preprocessing library for jssources-0..
+Building library for jssources-0..
+Configuring executable 'demo' for jssources-0..
+Preprocessing executable 'demo' for jssources-0..
+Building executable 'demo' for jssources-0..
diff --git a/cabal-testsuite/PackageTests/JS/JsSources/other-arch.test.hs b/cabal-testsuite/PackageTests/JS/JsSources/other-arch.test.hs
new file mode 100644
index 00000000000..187a9cf73bd
--- /dev/null
+++ b/cabal-testsuite/PackageTests/JS/JsSources/other-arch.test.hs
@@ -0,0 +1,7 @@
+import Test.Cabal.Prelude
+
+main = cabalTest $ do
+    skipIfJavaScript
+    -- Ensure the field `js-sources` does not raise issues
+    res <- cabal' "v2-run" ["demo"]
+    assertOutputContains "Hello Not JS!" res
diff --git a/cabal-testsuite/PackageTests/JS/JsSources/src/Lib.hs b/cabal-testsuite/PackageTests/JS/JsSources/src/Lib.hs
index af628af03ec..7937e6f34ed 100644
--- a/cabal-testsuite/PackageTests/JS/JsSources/src/Lib.hs
+++ b/cabal-testsuite/PackageTests/JS/JsSources/src/Lib.hs
@@ -1,3 +1,4 @@
 module Lib where
 
-foreign import javascript foo :: IO ()
+foo :: IO ()
+foo = putStrLn "Hello Not JS!"
diff --git a/cabal-testsuite/PackageTests/JS/JsSources/srcJS/Lib.hs b/cabal-testsuite/PackageTests/JS/JsSources/srcJS/Lib.hs
new file mode 100644
index 00000000000..af628af03ec
--- /dev/null
+++ b/cabal-testsuite/PackageTests/JS/JsSources/srcJS/Lib.hs
@@ -0,0 +1,3 @@
+module Lib where
+
+foreign import javascript foo :: IO ()

From 7a619e60cc4cf1f099e9278eba002fb6da1dbc16 Mon Sep 17 00:00:00 2001
From: Wismill <dev@wismill.eu>
Date: Sun, 12 Feb 2023 00:35:00 +0100
Subject: [PATCH 008/144] Fix repl discarding --build-depends (#8732)

* Fix repl discarding `build-depends` argument

Previously the function `\f -> L.allCondTrees $ traverseCondTreeC f` was
used to add the dependencies, but manipulating `CondTree` this way does
not update the nested fields `targetBuildDepends` of the tree, only the
conditions. It worked merely by chance if one does not further process
these fields: this explains why options like `--allow-newer` or
`allow-older` were incompatible with `--build-depends`.

Using `L.traverseBuildInfos . L.targetBuildDepends` ensures
`targetBuildDepends` fields and conditions are all updated consistently.

* Add test

* Add changelog

* Cleanup

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit e9b4744a846fcd808a325e288e5486e269f6a52e)
---
 .../Types/GenericPackageDescription.hs        |  4 +---
 .../src/Distribution/Client/CmdRepl.hs        |  9 +++++++--
 .../PackageTests/ReplBuildDepends/Foo.hs      |  4 ++++
 .../ReplBuildDepends/cabal.allow-newer.out    |  2 ++
 .../ReplBuildDepends/cabal.allow-older.out    |  2 ++
 .../ReplBuildDepends/cabal.normal.out         |  2 ++
 .../ReplBuildDepends/cabal.project            |  1 +
 .../ReplBuildDepends/cabal.test.hs            | 19 +++++++++++++++++++
 .../PackageTests/ReplBuildDepends/pkg.cabal   |  7 +++++++
 changelog.d/pr-8732                           | 10 ++++++++++
 10 files changed, 55 insertions(+), 5 deletions(-)
 create mode 100644 cabal-testsuite/PackageTests/ReplBuildDepends/Foo.hs
 create mode 100644 cabal-testsuite/PackageTests/ReplBuildDepends/cabal.allow-newer.out
 create mode 100644 cabal-testsuite/PackageTests/ReplBuildDepends/cabal.allow-older.out
 create mode 100644 cabal-testsuite/PackageTests/ReplBuildDepends/cabal.normal.out
 create mode 100644 cabal-testsuite/PackageTests/ReplBuildDepends/cabal.project
 create mode 100644 cabal-testsuite/PackageTests/ReplBuildDepends/cabal.test.hs
 create mode 100644 cabal-testsuite/PackageTests/ReplBuildDepends/pkg.cabal
 create mode 100644 changelog.d/pr-8732

diff --git a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs
index 24b2c4d0f08..ee8f9d5284b 100644
--- a/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs
+++ b/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs
@@ -1,7 +1,6 @@
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 
 module Distribution.Types.GenericPackageDescription (
@@ -86,7 +85,6 @@ instance L.HasBuildInfos GenericPackageDescription where
             <*> (traverse . L._2 . traverseCondTreeBuildInfo) f x4
             <*> (traverse . L._2 . traverseCondTreeBuildInfo) f x5
             <*> (traverse . L._2 . traverseCondTreeBuildInfo) f x6
-      where
 
 -- We use this traversal to keep [Dependency] field in CondTree up to date.
 traverseCondTreeBuildInfo
@@ -94,7 +92,7 @@ traverseCondTreeBuildInfo
     => LensLike' f (CondTree v [Dependency] comp) L.BuildInfo
 traverseCondTreeBuildInfo g = node where
     mkCondNode :: comp -> [CondBranch v [Dependency] comp] -> CondTree v [Dependency] comp
-    mkCondNode comp branches = CondNode comp (view L.targetBuildDepends comp) branches
+    mkCondNode comp = CondNode comp (view L.targetBuildDepends comp)
 
     node (CondNode comp _ branches) = mkCondNode
         <$> L.buildInfo g comp
diff --git a/cabal-install/src/Distribution/Client/CmdRepl.hs b/cabal-install/src/Distribution/Client/CmdRepl.hs
index be129b042f4..dcf659f036a 100644
--- a/cabal-install/src/Distribution/Client/CmdRepl.hs
+++ b/cabal-install/src/Distribution/Client/CmdRepl.hs
@@ -75,7 +75,7 @@ import Distribution.Types.BuildInfo
 import Distribution.Types.ComponentName
          ( componentNameString )
 import Distribution.Types.CondTree
-         ( CondTree(..), traverseCondTreeC )
+         ( CondTree(..) )
 import Distribution.Types.Dependency
          ( Dependency(..), mainLibSet )
 import Distribution.Types.Library
@@ -338,7 +338,12 @@ addDepsToProjectTarget deps pkgId ctx =
       | packageId pkg /= pkgId = SpecificSourcePackage pkg
       | SourcePackage{..} <- pkg =
         SpecificSourcePackage $ pkg { srcpkgDescription =
-          srcpkgDescription & (\f -> L.allCondTrees $ traverseCondTreeC f)
+          -- New dependencies are added to the original ones found in the
+          -- `targetBuildDepends` field.
+          -- `traverseBuildInfos` is used in order to update _all_ the
+          -- occurrences of the field `targetBuildDepends`. It ensures that
+          -- fields depending on the latter are also consistently updated.
+          srcpkgDescription &  (L.traverseBuildInfos . L.targetBuildDepends)
                             %~ (deps ++)
         }
     addDeps spec = spec
diff --git a/cabal-testsuite/PackageTests/ReplBuildDepends/Foo.hs b/cabal-testsuite/PackageTests/ReplBuildDepends/Foo.hs
new file mode 100644
index 00000000000..8a39fe134cf
--- /dev/null
+++ b/cabal-testsuite/PackageTests/ReplBuildDepends/Foo.hs
@@ -0,0 +1,4 @@
+module Foo where
+
+a :: Int
+a = 42
diff --git a/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.allow-newer.out b/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.allow-newer.out
new file mode 100644
index 00000000000..f7fe5f202cf
--- /dev/null
+++ b/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.allow-newer.out
@@ -0,0 +1,2 @@
+# cabal clean
+# cabal repl
diff --git a/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.allow-older.out b/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.allow-older.out
new file mode 100644
index 00000000000..f7fe5f202cf
--- /dev/null
+++ b/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.allow-older.out
@@ -0,0 +1,2 @@
+# cabal clean
+# cabal repl
diff --git a/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.normal.out b/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.normal.out
new file mode 100644
index 00000000000..f7fe5f202cf
--- /dev/null
+++ b/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.normal.out
@@ -0,0 +1,2 @@
+# cabal clean
+# cabal repl
diff --git a/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.project b/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.project
new file mode 100644
index 00000000000..e6fdbadb439
--- /dev/null
+++ b/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.project
@@ -0,0 +1 @@
+packages: .
diff --git a/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.test.hs b/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.test.hs
new file mode 100644
index 00000000000..e5b63af3dae
--- /dev/null
+++ b/cabal-testsuite/PackageTests/ReplBuildDepends/cabal.test.hs
@@ -0,0 +1,19 @@
+import Test.Cabal.Prelude
+
+-- Test “repl --build-depends”
+main = do
+  testWithByteString "normal" []
+  -- See https://github.com/haskell/cabal/issues/6859
+  testWithByteString "allow-newer" ["--allow-newer"]
+  -- See https://github.com/haskell/cabal/issues/6859
+  testWithByteString "allow-older" ["--allow-older"]
+  where
+  testWithByteString label extraArgs = cabalTest' label $ do
+    cabal' "clean" []
+    res <- cabalWithStdin
+        "repl"
+        ("-v2" : "--build-depends" : "bytestring" : extraArgs)
+        "import qualified Data.ByteString as BS"
+    assertOutputContains "Ok, one module loaded." res
+    -- Ensure we can load ‘bytestring’
+    assertOutputDoesNotContain "Could not load" res
diff --git a/cabal-testsuite/PackageTests/ReplBuildDepends/pkg.cabal b/cabal-testsuite/PackageTests/ReplBuildDepends/pkg.cabal
new file mode 100644
index 00000000000..c6cc87f1117
--- /dev/null
+++ b/cabal-testsuite/PackageTests/ReplBuildDepends/pkg.cabal
@@ -0,0 +1,7 @@
+cabal-version:      2.4
+name:               pkg
+version:            0.1.0.0
+library
+    exposed-modules:  Foo
+    build-depends:    base
+    default-language: Haskell2010
diff --git a/changelog.d/pr-8732 b/changelog.d/pr-8732
new file mode 100644
index 00000000000..2417885d15b
--- /dev/null
+++ b/changelog.d/pr-8732
@@ -0,0 +1,10 @@
+synopsis: Fix repl discarding --build-depends
+packages: cabal-install
+prs: #8732
+issues: #6859 #7081
+
+description: {
+
+- Fix `repl` command discarding `--build-depends` argument when using 
+  `allow-newer` or `allow-older`.
+}
\ No newline at end of file

From cc75891e41cfbd23fa57ffa723a93198037c7fc1 Mon Sep 17 00:00:00 2001
From: Wismill <dev@wismill.eu>
Date: Sun, 12 Feb 2023 09:48:10 +0100
Subject: [PATCH 009/144] cabal-install: check: Whitelist doc file extensions
 (#8747)

* check: Test only doc files with supported extensions

* Cleanup

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit bae536f8fe67ce06b5d8e268cd1cb0d42101c4f1)
---
 Cabal/src/Distribution/PackageDescription/Check.hs   | 12 +++++++-----
 .../ChangeLog/NotExisting/cabal.test.hs              |  2 --
 .../ChangeLog/NotIncluded/.gitignore                 |  2 ++
 .../{V3.0/ChangeLog.md => V1.12/ChangeLog.md~}       |  0
 .../ChangeLog/NotIncluded/V1.12/cabal.test.hs        |  2 --
 .../ChangeLog/NotIncluded/V3.0/CHANGELOG.TXT         |  0
 .../ChangeLog/NotIncluded/V3.0/cabal.out             |  2 +-
 .../ChangeLog/NotIncluded/V3.0/cabal.test.hs         |  2 --
 .../ChangeLog/WrongField/V1.12/cabal.test.hs         |  2 --
 .../ChangeLog/WrongField/V3.0/cabal.test.hs          |  2 --
 10 files changed, 10 insertions(+), 16 deletions(-)
 create mode 100644 cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/.gitignore
 rename cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/{V3.0/ChangeLog.md => V1.12/ChangeLog.md~} (100%)
 create mode 100644 cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/CHANGELOG.TXT

diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs
index f1c528752da..5d11072b354 100644
--- a/Cabal/src/Distribution/PackageDescription/Check.hs
+++ b/Cabal/src/Distribution/PackageDescription/Check.hs
@@ -2545,12 +2545,13 @@ checkGlobFiles verbosity pkg root = do
           )
 
     -- Predicate for desirable documentation file on Hackage server
-    isDesirableExtraDocFile :: [FilePath] -> FilePath -> Bool
-    isDesirableExtraDocFile paths path = map toLower basename `elem` paths
+    isDesirableExtraDocFile :: ([FilePath], [FilePath]) -> FilePath -> Bool
+    isDesirableExtraDocFile (basenames, extensions) path =
+      basename `elem` basenames && ext `elem` extensions
       where
-        (basename, _ext) = splitExtension path
+        (basename, ext) = splitExtension (map toLower path)
 
-    -- Changelog patterns
+    -- Changelog patterns (basenames & extensions)
     -- Source: hackage-server/src/Distribution/Server/Packages/ChangeLog.hs
     desirableChangeLog =
       [ "news"
@@ -2558,6 +2559,7 @@ checkGlobFiles verbosity pkg root = do
       , "change_log"
       , "changes"
       ]
+    desirableChangeLogExtensions = ["", ".txt", ".md", ".markdown", ".rst"]
     -- [TODO] Check readme. Observations:
     --        • Readme is not necessary if package description is good.
     --        • Some readmes exists only for repository browsing.
@@ -2567,7 +2569,7 @@ checkGlobFiles verbosity pkg root = do
     -- -- Readme patterns
     -- -- Source: hackage-server/src/Distribution/Server/Packages/Readme.hs
     -- desirableReadme = ["readme"]
-    desirableDocFiles = desirableChangeLog
+    desirableDocFiles = (desirableChangeLog, desirableChangeLogExtensions)
 
     -- If there's a missing directory in play, since our globs don't
     -- (currently) support disjunction, that will always mean there are no
diff --git a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotExisting/cabal.test.hs b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotExisting/cabal.test.hs
index 28a6cd72ac0..4cb629752f4 100644
--- a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotExisting/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotExisting/cabal.test.hs
@@ -1,7 +1,5 @@
 import Test.Cabal.Prelude
 
-import System.Directory (createDirectoryIfMissing)
-
 -- Omitting ChangeLog.md but not README in extra-doc-files
 main = cabalTest $ do
   cabal "check" []
diff --git a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/.gitignore b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/.gitignore
new file mode 100644
index 00000000000..3e339695267
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/.gitignore
@@ -0,0 +1,2 @@
+# Needed for test, to ensure we test the file extension as well.
+!ChangeLog.md~
diff --git a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/ChangeLog.md b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V1.12/ChangeLog.md~
similarity index 100%
rename from cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/ChangeLog.md
rename to cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V1.12/ChangeLog.md~
diff --git a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V1.12/cabal.test.hs b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V1.12/cabal.test.hs
index 28a6cd72ac0..4cb629752f4 100644
--- a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V1.12/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V1.12/cabal.test.hs
@@ -1,7 +1,5 @@
 import Test.Cabal.Prelude
 
-import System.Directory (createDirectoryIfMissing)
-
 -- Omitting ChangeLog.md but not README in extra-doc-files
 main = cabalTest $ do
   cabal "check" []
diff --git a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/CHANGELOG.TXT b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/CHANGELOG.TXT
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/cabal.out b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/cabal.out
index f97aa4a73f7..d2df818ef58 100644
--- a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/cabal.out
+++ b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/cabal.out
@@ -1,3 +1,3 @@
 # cabal check
 Warning: These warnings may cause trouble when distributing the package:
-Warning: Please consider including the file './ChangeLog.md' in the 'extra-doc-files' section of the .cabal file if it contains useful information for users of the package.
+Warning: Please consider including the file './CHANGELOG.TXT' in the 'extra-doc-files' section of the .cabal file if it contains useful information for users of the package.
diff --git a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/cabal.test.hs b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/cabal.test.hs
index 28a6cd72ac0..4cb629752f4 100644
--- a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/NotIncluded/V3.0/cabal.test.hs
@@ -1,7 +1,5 @@
 import Test.Cabal.Prelude
 
-import System.Directory (createDirectoryIfMissing)
-
 -- Omitting ChangeLog.md but not README in extra-doc-files
 main = cabalTest $ do
   cabal "check" []
diff --git a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/WrongField/V1.12/cabal.test.hs b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/WrongField/V1.12/cabal.test.hs
index 5bb91450c87..b491c58e1a6 100644
--- a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/WrongField/V1.12/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/WrongField/V1.12/cabal.test.hs
@@ -1,7 +1,5 @@
 import Test.Cabal.Prelude
 
-import System.Directory (createDirectoryIfMissing)
-
 -- Included ChangeLog.md but not in extra-doc-files
 main = cabalTest $ do
   cabal "check" []
diff --git a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/WrongField/V3.0/cabal.test.hs b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/WrongField/V3.0/cabal.test.hs
index 5bb91450c87..b491c58e1a6 100644
--- a/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/WrongField/V3.0/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/Check/PackageFiles/MissingExpectedDocFiles/ChangeLog/WrongField/V3.0/cabal.test.hs
@@ -1,7 +1,5 @@
 import Test.Cabal.Prelude
 
-import System.Directory (createDirectoryIfMissing)
-
 -- Included ChangeLog.md but not in extra-doc-files
 main = cabalTest $ do
   cabal "check" []

From 00537e35ba04214c340da786547dfd4f477460ca Mon Sep 17 00:00:00 2001
From: Mikolaj Konarski <mikolaj.konarski@gmail.com>
Date: Wed, 8 Feb 2023 17:08:09 +0100
Subject: [PATCH 010/144] Revert "Fix project-local build flags being ignored."

This reverts commit b547ead58bf09bb838c13f02afb2f1042ad1bc7c
from https://github.com/haskell/cabal/pull/8623.
Unexpected side-effect has been found, so these code
improvements have to be done differently.
The other commit in the PR is a test and it's retained.

(cherry picked from commit 533cbc1e6f1915a1eca240b68b0b2ea281309963)
---
 .../src/Distribution/Client/Configure.hs      |  6 ---
 .../src/Distribution/Client/Install.hs        |  1 -
 .../Distribution/Client/ProjectPlanOutput.hs  |  2 +-
 .../Distribution/Client/ProjectPlanning.hs    | 39 ++-----------------
 .../src/Distribution/Client/SetupWrapper.hs   | 15 ++-----
 cabal-install/tests/IntegrationTests2.hs      |  2 +-
 changelog.d/pr-8623                           |  7 ----
 7 files changed, 8 insertions(+), 64 deletions(-)
 delete mode 100644 changelog.d/pr-8623

diff --git a/cabal-install/src/Distribution/Client/Configure.hs b/cabal-install/src/Distribution/Client/Configure.hs
index 554785ff847..2cbe16096a4 100644
--- a/cabal-install/src/Distribution/Client/Configure.hs
+++ b/cabal-install/src/Distribution/Client/Configure.hs
@@ -154,9 +154,6 @@ configure verbosity packageDBs repoCtxt comp platform progdb
         (fromFlagOrDefault
            (useDistPref defaultSetupScriptOptions)
            (configDistPref configFlags))
-        (fromFlagOrDefault
-            (setupConfigDynamic defaultSetupScriptOptions)
-            (configDynExe configFlags))
         (chooseCabalVersion
            configExFlags
            (flagToMaybe (configCabalVersion configExFlags)))
@@ -170,7 +167,6 @@ configureSetupScript :: PackageDBStack
                      -> Platform
                      -> ProgramDb
                      -> FilePath
-                     -> Bool
                      -> VersionRange
                      -> Maybe Lock
                      -> Bool
@@ -182,7 +178,6 @@ configureSetupScript packageDBs
                      platform
                      progdb
                      distPref
-                     dynExe
                      cabalVersion
                      lock
                      forceExternal
@@ -214,7 +209,6 @@ configureSetupScript packageDBs
     , useDependenciesExclusive = not defaultSetupDeps && isJust explicitSetupDeps
     , useVersionMacros         = not defaultSetupDeps && isJust explicitSetupDeps
     , isInteractive            = False
-    , setupConfigDynamic       = dynExe
     }
   where
     -- When we are compiling a legacy setup script without an explicit
diff --git a/cabal-install/src/Distribution/Client/Install.hs b/cabal-install/src/Distribution/Client/Install.hs
index a53c7ded1aa..2baa8af9e49 100644
--- a/cabal-install/src/Distribution/Client/Install.hs
+++ b/cabal-install/src/Distribution/Client/Install.hs
@@ -1059,7 +1059,6 @@ performInstallations verbosity
         platform
         progdb
         distPref
-        (fromFlagOrDefault (setupConfigDynamic defaultSetupScriptOptions) $ configDynExe configFlags)
         (chooseCabalVersion configExFlags (libVersion miscOptions))
         (Just lock)
         parallelInstall
diff --git a/cabal-install/src/Distribution/Client/ProjectPlanOutput.hs b/cabal-install/src/Distribution/Client/ProjectPlanOutput.hs
index fde7ea8b97a..c9243c310e0 100644
--- a/cabal-install/src/Distribution/Client/ProjectPlanOutput.hs
+++ b/cabal-install/src/Distribution/Client/ProjectPlanOutput.hs
@@ -272,9 +272,9 @@ encodePlanAsJson distDirLayout elaboratedInstallPlan elaboratedSharedConfig =
     comp2str = prettyShow
 
     style2str :: Bool -> BuildStyle -> String
-    style2str _     BuildAndInstall  = "global"
     style2str True  _                = "local"
     style2str False BuildInplaceOnly = "inplace"
+    style2str False BuildAndInstall  = "global"
 
     jdisplay :: Pretty a => a -> J.Value
     jdisplay = J.String . prettyShow
diff --git a/cabal-install/src/Distribution/Client/ProjectPlanning.hs b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
index 4ec141037b7..8d8947ae8a8 100644
--- a/cabal-install/src/Distribution/Client/ProjectPlanning.hs
+++ b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
@@ -672,7 +672,6 @@ rebuildInstallPlan verbosity
                          projectConfigAllPackages,
                          projectConfigLocalPackages,
                          projectConfigSpecificPackage,
-                         projectPackagesNamed,
                          projectConfigBuildOnly
                        }
                        (compiler, platform, progdb) pkgConfigDB
@@ -698,7 +697,6 @@ rebuildInstallPlan verbosity
                 localPackages
                 sourcePackageHashes
                 installDirs
-                projectPackagesNamed
                 projectConfigShared
                 projectConfigAllPackages
                 projectConfigLocalPackages
@@ -1363,7 +1361,6 @@ elaborateInstallPlan
   -> [PackageSpecifier (SourcePackage (PackageLocation loc))]
   -> Map PackageId PackageSourceHash
   -> InstallDirs.InstallDirTemplates
-  -> [PackageVersionConstraint]
   -> ProjectConfigShared
   -> PackageConfig
   -> PackageConfig
@@ -1375,7 +1372,6 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB
                      solverPlan localPackages
                      sourcePackageHashes
                      defaultInstallDirs
-                     extraPackages
                      sharedPackageConfig
                      allPackagesConfig
                      localPackagesConfig
@@ -2046,21 +2042,15 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB
       $ map packageId
       $ SolverInstallPlan.reverseDependencyClosure
           solverPlan
-          (map PlannedId (Set.toList pkgsInplaceToProject))
+          (map PlannedId (Set.toList pkgsLocalToProject))
 
     isLocalToProject :: Package pkg => pkg -> Bool
     isLocalToProject pkg = Set.member (packageId pkg)
                                       pkgsLocalToProject
 
-    pkgsInplaceToProject :: Set PackageId
-    pkgsInplaceToProject =
-        Set.fromList (catMaybes (map shouldBeLocal localPackages))
-        --TODO: localPackages is a misnomer, it's all project packages
-        -- here is where we decide which ones will be local!
-
     pkgsLocalToProject :: Set PackageId
     pkgsLocalToProject =
-        Set.fromList (catMaybes (map (isInLocal extraPackages) localPackages))
+        Set.fromList (catMaybes (map shouldBeLocal localPackages))
         --TODO: localPackages is a misnomer, it's all project packages
         -- here is where we decide which ones will be local!
 
@@ -2129,28 +2119,6 @@ shouldBeLocal (SpecificSourcePackage pkg) = case srcpkgSource pkg of
     LocalUnpackedPackage _ -> Just (packageId pkg)
     _                      -> Nothing
 
--- Used to determine which packages are affected by local package configuration
--- flags like ‘--enable-shared --enable-executable-dynamic --disable-library-vanilla’.
-isInLocal :: [PackageVersionConstraint] -> PackageSpecifier (SourcePackage (PackageLocation loc)) -> Maybe PackageId
-isInLocal _              NamedPackage{}              = Nothing
-isInLocal _extraPackages (SpecificSourcePackage pkg) = case srcpkgSource pkg of
-    LocalUnpackedPackage _ -> Just (packageId pkg)
-    -- LocalTarballPackage is matched here too, because otherwise ‘sdistize’
-    -- produces for ‘localPackages’ in the ‘ProjectBaseContext’ a
-    -- LocalTarballPackage, and ‘shouldBeLocal’ will make flags like
-    -- ‘--disable-library-vanilla’ have no effect for a typical
-    -- ‘cabal install --lib --enable-shared enable-executable-dynamic --disable-library-vanilla’,
-    -- as these flags would apply to local packages, but the sdist would
-    -- erroneously not get categorized as a local package, so the flags would be
-    -- ignored and produce a package with an unchanged hash.
-    LocalTarballPackage  _ -> Just (packageId pkg)
-    -- TODO: the docs say ‘extra-packages’ is implemented in cabal project
-    -- files.  We can fix that here by checking that the version range matches.
-    --RemoteTarballPackage    _ -> _
-    --RepoTarballPackage      _ -> _
-    --RemoteSourceRepoPackage _ -> _
-    _                      -> Nothing
-
 -- | Given a 'ElaboratedPlanPackage', report if it matches a 'ComponentName'.
 matchPlanPkg :: (ComponentName -> Bool) -> ElaboratedPlanPackage -> Bool
 matchPlanPkg p = InstallPlan.foldPlanPackage (p . ipiComponentName) (matchElabPkg p)
@@ -3430,8 +3398,7 @@ setupHsScriptOptions (ReadyPackage elab@ElaboratedConfiguredPackage{..})
       useWin32CleanHack        = False,   --TODO: [required eventually]
       forceExternalSetupMethod = isParallelBuild,
       setupCacheLock           = Just cacheLock,
-      isInteractive            = False,
-      setupConfigDynamic       = elabDynExe
+      isInteractive            = False
     }
 
 
diff --git a/cabal-install/src/Distribution/Client/SetupWrapper.hs b/cabal-install/src/Distribution/Client/SetupWrapper.hs
index 239e1a37908..e4885ed07c6 100644
--- a/cabal-install/src/Distribution/Client/SetupWrapper.hs
+++ b/cabal-install/src/Distribution/Client/SetupWrapper.hs
@@ -71,7 +71,7 @@ import Distribution.Simple.BuildPaths
 import Distribution.Simple.Command
          ( CommandUI(..), commandShowOptions )
 import Distribution.Simple.Program.GHC
-         ( GhcMode(..), GhcDynLinkMode(..), GhcOptions(..), renderGhcOptions )
+         ( GhcMode(..), GhcOptions(..), renderGhcOptions )
 import qualified Distribution.Simple.PackageIndex as PackageIndex
 import Distribution.Simple.PackageIndex (InstalledPackageIndex)
 import qualified Distribution.InstalledPackageInfo as IPI
@@ -249,12 +249,7 @@ data SetupScriptOptions = SetupScriptOptions {
     -- | Is the task we are going to run an interactive foreground task,
     -- or an non-interactive background task? Based on this flag we
     -- decide whether or not to delegate ctrl+c to the spawned task
-    isInteractive            :: Bool,
-
-    -- Also track build output artifact configuration.
-
-    -- | Pass `-dynamic` to `ghc` for dynamic rather than static linking.
-    setupConfigDynamic       :: Bool
+    isInteractive            :: Bool
   }
 
 defaultSetupScriptOptions :: SetupScriptOptions
@@ -277,8 +272,7 @@ defaultSetupScriptOptions = SetupScriptOptions {
     useWin32CleanHack        = False,
     forceExternalSetupMethod = False,
     setupCacheLock           = Nothing,
-    isInteractive            = False,
-    setupConfigDynamic       = False
+    isInteractive            = False
   }
 
 workingDir :: SetupScriptOptions -> FilePath
@@ -846,9 +840,6 @@ getExternalSetupMethod verbosity options pkg bt = do
               -- --ghc-option=-v instead!
               ghcOptVerbosity       = Flag (min verbosity normal)
             , ghcOptMode            = Flag GhcModeMake
-            , ghcOptDynLinkMode     = case setupConfigDynamic options'' of
-                                      True  -> Flag GhcDynamicOnly
-                                      False -> Flag GhcStaticOnly
             , ghcOptInputFiles      = toNubListR [setupHs]
             , ghcOptOutputFile      = Flag setupProgFile
             , ghcOptObjDir          = Flag setupDir
diff --git a/cabal-install/tests/IntegrationTests2.hs b/cabal-install/tests/IntegrationTests2.hs
index 6b81643fe0b..90d272aacae 100644
--- a/cabal-install/tests/IntegrationTests2.hs
+++ b/cabal-install/tests/IntegrationTests2.hs
@@ -1591,7 +1591,7 @@ testProgramOptionsLocal config0 = do
                 (Just [ghcFlag])
                 (getProgArgs localPackages "q")
     assertEqual "p"
-                (Just [ghcFlag])
+                Nothing
                 (getProgArgs localPackages "p")
   where
     testdir = "regression/program-options"
diff --git a/changelog.d/pr-8623 b/changelog.d/pr-8623
deleted file mode 100644
index 29c9c3bb2c5..00000000000
--- a/changelog.d/pr-8623
+++ /dev/null
@@ -1,7 +0,0 @@
-synopsis: Fix project-local flags being ignored
-packages: cabal-install
-prs: #8623
-description: {
-    Fix some cases of configuration flags being dropped, e.g. with `v2-install`
-    and `--enable-shared --enable-executable-dynamic --disable-library-vanilla`.
-}

From 0ef928541ff91526e74cfa605a304d83427fd6ce Mon Sep 17 00:00:00 2001
From: Mikolaj Konarski <mikolaj.konarski@gmail.com>
Date: Wed, 8 Feb 2023 18:16:26 +0100
Subject: [PATCH 011/144] Mark the test we are retaining as expected broken

(cherry picked from commit dbcaa76374d2feec837feda4ca9e9b60d0690666)
---
 .../PackageTests/LinkerOptions/NonignoredConfigs/cabal.test.hs  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cabal-testsuite/PackageTests/LinkerOptions/NonignoredConfigs/cabal.test.hs b/cabal-testsuite/PackageTests/LinkerOptions/NonignoredConfigs/cabal.test.hs
index 9da924366f4..2e8dac23a20 100644
--- a/cabal-testsuite/PackageTests/LinkerOptions/NonignoredConfigs/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/LinkerOptions/NonignoredConfigs/cabal.test.hs
@@ -50,7 +50,7 @@ linkConfigFlags Dynamic =
 lrun :: [Linking]
 lrun = [Static, Dynamic, Static, Dynamic]
 
-main = cabalTest $ do
+main = cabalTest . expectBroken 8744 $ do
     -- Skip if on Windows, since my default Chocolatey Windows setup (and the CI
     -- server setup at the time, presumably) lacks support for dynamic builds
     -- since the base package appears to be static only, lacking e.g. ‘.dyn_o’

From b1b0e3384463251309b2e0518f4df9fe40276d27 Mon Sep 17 00:00:00 2001
From: Gershom Bazerman <gershom@arista.com>
Date: Tue, 14 Feb 2023 20:47:45 -0500
Subject: [PATCH 012/144] don't auto-download in hash validation phase

(cherry picked from commit 54973255e10d993a631cb6a8d906b359a6129c1b)
---
 cabal-install/src/Distribution/Client/FetchUtils.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cabal-install/src/Distribution/Client/FetchUtils.hs b/cabal-install/src/Distribution/Client/FetchUtils.hs
index f14ef418bd2..0a493d493f7 100644
--- a/cabal-install/src/Distribution/Client/FetchUtils.hs
+++ b/cabal-install/src/Distribution/Client/FetchUtils.hs
@@ -134,7 +134,7 @@ verifyFetchedTarball verbosity repoCtxt repo pkgid =
    in handleError $ do
         exists <- doesFileExist file
         if not exists
-          then return False
+          then return True -- if the file does not exist, it vacuously passes validation, since it will be downloaded as necessary with what we will then check is a valid hash.
           else case repo of
             -- a secure repo has hashes we can compare against to confirm this is the correct file.
                 RepoSecure{} ->

From c206d1ef7370550bc5585937d1807e3c03bcab26 Mon Sep 17 00:00:00 2001
From: ffaf1 <fa-ml@ariis.it>
Date: Sun, 19 Feb 2023 20:19:41 +0100
Subject: [PATCH 013/144] =?UTF-8?q?Update=20=C2=A9=20year=20(#8775)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 04665d280076798450c3f9003ae23cfccd760f28)
---
 Cabal-syntax/Cabal-syntax.cabal                 | 2 +-
 Cabal-syntax/LICENSE                            | 2 +-
 Cabal-tests/Cabal-tests.cabal                   | 2 +-
 Cabal-tests/LICENSE                             | 2 +-
 Cabal/Cabal.cabal                               | 2 +-
 Cabal/LICENSE                                   | 2 +-
 LICENSE                                         | 2 +-
 cabal-benchmarks/LICENSE                        | 2 +-
 cabal-benchmarks/cabal-benchmarks.cabal         | 2 +-
 cabal-dev-scripts/LICENSE                       | 2 +-
 cabal-install-solver/LICENSE                    | 2 +-
 cabal-install-solver/cabal-install-solver.cabal | 2 +-
 cabal-install/LICENSE                           | 2 +-
 cabal-install/cabal-install.cabal               | 2 +-
 cabal-testsuite/LICENSE                         | 2 +-
 cabal-testsuite/cabal-testsuite.cabal           | 2 +-
 doc/conf.py                                     | 2 +-
 solver-benchmarks/LICENSE                       | 2 +-
 solver-benchmarks/solver-benchmarks.cabal       | 2 +-
 19 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index b0c72447648..8bc06f8080c 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -1,7 +1,7 @@
 cabal-version: 2.2
 name:          Cabal-syntax
 version:       3.9.0.0
-copyright:     2003-2022, Cabal Development Team (see AUTHORS file)
+copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
 author:        Cabal Development Team <cabal-devel@haskell.org>
diff --git a/Cabal-syntax/LICENSE b/Cabal-syntax/LICENSE
index 0a4969ac826..a3a25c7d9e4 100644
--- a/Cabal-syntax/LICENSE
+++ b/Cabal-syntax/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2022, Cabal Development Team.
+Copyright (c) 2003-2023, Cabal Development Team.
 See the AUTHORS file for the full list of copyright holders.
 
 See */LICENSE for the copyright holders of the subcomponents.
diff --git a/Cabal-tests/Cabal-tests.cabal b/Cabal-tests/Cabal-tests.cabal
index 1f6a9b6d814..2ae09c0928e 100644
--- a/Cabal-tests/Cabal-tests.cabal
+++ b/Cabal-tests/Cabal-tests.cabal
@@ -1,7 +1,7 @@
 cabal-version: 2.2
 name:          Cabal-tests
 version:       3
-copyright:     2003-2022, Cabal Development Team (see AUTHORS file)
+copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
 author:        Cabal Development Team <cabal-devel@haskell.org>
diff --git a/Cabal-tests/LICENSE b/Cabal-tests/LICENSE
index 0a4969ac826..a3a25c7d9e4 100644
--- a/Cabal-tests/LICENSE
+++ b/Cabal-tests/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2022, Cabal Development Team.
+Copyright (c) 2003-2023, Cabal Development Team.
 See the AUTHORS file for the full list of copyright holders.
 
 See */LICENSE for the copyright holders of the subcomponents.
diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index c75d24df967..3ad7d517535 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -1,7 +1,7 @@
 cabal-version: 2.2
 name:          Cabal
 version:       3.9.0.0
-copyright:     2003-2022, Cabal Development Team (see AUTHORS file)
+copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
 author:        Cabal Development Team <cabal-devel@haskell.org>
diff --git a/Cabal/LICENSE b/Cabal/LICENSE
index 0a4969ac826..a3a25c7d9e4 100644
--- a/Cabal/LICENSE
+++ b/Cabal/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2022, Cabal Development Team.
+Copyright (c) 2003-2023, Cabal Development Team.
 See the AUTHORS file for the full list of copyright holders.
 
 See */LICENSE for the copyright holders of the subcomponents.
diff --git a/LICENSE b/LICENSE
index 0a4969ac826..a3a25c7d9e4 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2022, Cabal Development Team.
+Copyright (c) 2003-2023, Cabal Development Team.
 See the AUTHORS file for the full list of copyright holders.
 
 See */LICENSE for the copyright holders of the subcomponents.
diff --git a/cabal-benchmarks/LICENSE b/cabal-benchmarks/LICENSE
index 0a4969ac826..a3a25c7d9e4 100644
--- a/cabal-benchmarks/LICENSE
+++ b/cabal-benchmarks/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2022, Cabal Development Team.
+Copyright (c) 2003-2023, Cabal Development Team.
 See the AUTHORS file for the full list of copyright holders.
 
 See */LICENSE for the copyright holders of the subcomponents.
diff --git a/cabal-benchmarks/cabal-benchmarks.cabal b/cabal-benchmarks/cabal-benchmarks.cabal
index 86d2a2e1456..4e911918321 100644
--- a/cabal-benchmarks/cabal-benchmarks.cabal
+++ b/cabal-benchmarks/cabal-benchmarks.cabal
@@ -1,7 +1,7 @@
 cabal-version:      2.2
 name:               cabal-benchmarks
 version:            3
-copyright:          2003-2022, Cabal Development Team (see AUTHORS file)
+copyright:          2003-2023, Cabal Development Team (see AUTHORS file)
 license:            BSD-3-Clause
 license-file:       LICENSE
 author:             Cabal Development Team <cabal-devel@haskell.org>
diff --git a/cabal-dev-scripts/LICENSE b/cabal-dev-scripts/LICENSE
index 0a4969ac826..a3a25c7d9e4 100644
--- a/cabal-dev-scripts/LICENSE
+++ b/cabal-dev-scripts/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2022, Cabal Development Team.
+Copyright (c) 2003-2023, Cabal Development Team.
 See the AUTHORS file for the full list of copyright holders.
 
 See */LICENSE for the copyright holders of the subcomponents.
diff --git a/cabal-install-solver/LICENSE b/cabal-install-solver/LICENSE
index 0a4969ac826..a3a25c7d9e4 100644
--- a/cabal-install-solver/LICENSE
+++ b/cabal-install-solver/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2022, Cabal Development Team.
+Copyright (c) 2003-2023, Cabal Development Team.
 See the AUTHORS file for the full list of copyright holders.
 
 See */LICENSE for the copyright holders of the subcomponents.
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index 1b03d228a68..28d962ad2e1 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -11,7 +11,7 @@ license:       BSD-3-Clause
 license-file:  LICENSE
 author:        Cabal Development Team (see AUTHORS file)
 maintainer:    Cabal Development Team <cabal-devel@haskell.org>
-copyright:     2003-2022, Cabal Development Team
+copyright:     2003-2023, Cabal Development Team
 category:      Distribution
 build-type:    Simple
 Extra-Source-Files:
diff --git a/cabal-install/LICENSE b/cabal-install/LICENSE
index 0a4969ac826..a3a25c7d9e4 100644
--- a/cabal-install/LICENSE
+++ b/cabal-install/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2022, Cabal Development Team.
+Copyright (c) 2003-2023, Cabal Development Team.
 See the AUTHORS file for the full list of copyright holders.
 
 See */LICENSE for the copyright holders of the subcomponents.
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 747d353276b..15e813494b7 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -13,7 +13,7 @@ License:            BSD-3-Clause
 License-File:       LICENSE
 Author:             Cabal Development Team (see AUTHORS file)
 Maintainer:         Cabal Development Team <cabal-devel@haskell.org>
-Copyright:          2003-2022, Cabal Development Team
+Copyright:          2003-2023, Cabal Development Team
 Category:           Distribution
 Build-type:         Simple
 Extra-Source-Files:
diff --git a/cabal-testsuite/LICENSE b/cabal-testsuite/LICENSE
index 0a4969ac826..a3a25c7d9e4 100644
--- a/cabal-testsuite/LICENSE
+++ b/cabal-testsuite/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2022, Cabal Development Team.
+Copyright (c) 2003-2023, Cabal Development Team.
 See the AUTHORS file for the full list of copyright holders.
 
 See */LICENSE for the copyright holders of the subcomponents.
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index e78435b3ec9..849ca565d6a 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -1,7 +1,7 @@
 cabal-version: 2.2
 name:          cabal-testsuite
 version:       3
-copyright:     2003-2022, Cabal Development Team (see AUTHORS file)
+copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
 author:        Cabal Development Team <cabal-devel@haskell.org>
diff --git a/doc/conf.py b/doc/conf.py
index 80bd6fba554..f540d7191f2 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -39,7 +39,7 @@
 
 # General information about the project.
 project = u'Cabal'
-copyright = u'2003-2022, Cabal Team'
+copyright = u'2003-2023, Cabal Team'
 # N.B. version comes from ghc_config
 release = version  # The full version, including alpha/beta/rc tags.
 
diff --git a/solver-benchmarks/LICENSE b/solver-benchmarks/LICENSE
index 0a4969ac826..a3a25c7d9e4 100644
--- a/solver-benchmarks/LICENSE
+++ b/solver-benchmarks/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2003-2022, Cabal Development Team.
+Copyright (c) 2003-2023, Cabal Development Team.
 See the AUTHORS file for the full list of copyright holders.
 
 See */LICENSE for the copyright holders of the subcomponents.
diff --git a/solver-benchmarks/solver-benchmarks.cabal b/solver-benchmarks/solver-benchmarks.cabal
index a1c974a6cb8..26517503b76 100644
--- a/solver-benchmarks/solver-benchmarks.cabal
+++ b/solver-benchmarks/solver-benchmarks.cabal
@@ -1,7 +1,7 @@
 cabal-version:  2.2
 name:          solver-benchmarks
 version:       3
-copyright:     2003-2022, Cabal Development Team (see AUTHORS file)
+copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
 author:        Cabal Development Team <cabal-devel@haskell.org>

From cd3113bf5d2c869f60f975ee3a55b2abffce6c5b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Wed, 1 Feb 2023 08:11:37 +0100
Subject: [PATCH 014/144] Bump cabal-bootstrap-gen to GHC 9.4.4 ecosystem
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

I updated the dependencies in the .cabal bootstrap file and
sightly adjusted src/Main.hs for the `I.riCabal → I.riCabalHash`
change.

Fixes #8613

(cherry picked from commit 2de1fdc274b3a42739013dcf47092f31d1282c40)
---
 .github/workflows/bootstrap.yml     |  2 +-
 Makefile                            |  2 +-
 bootstrap/cabal-bootstrap-gen.cabal | 18 +++++++-----------
 bootstrap/linux-9.4.4.json          |  1 +
 bootstrap/src/Main.hs               |  8 +++++++-
 5 files changed, 17 insertions(+), 14 deletions(-)
 create mode 100644 bootstrap/linux-9.4.4.json

diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml
index b404cacfb08..4ac3a7f2349 100644
--- a/.github/workflows/bootstrap.yml
+++ b/.github/workflows/bootstrap.yml
@@ -19,7 +19,7 @@ jobs:
     strategy:
       matrix:
         os: [ubuntu-latest]
-        ghc: ["8.6.5", "8.8.4", "8.10.7", "9.0.2", "9.2.3"]
+        ghc: ["8.6.5", "8.8.4", "8.10.7", "9.0.2", "9.2.3", "9.4.4"]
         include:
           - os: macos-latest
             ghc: "9.2.3"
diff --git a/Makefile b/Makefile
index 1ffbec77c66..db5ecccd50b 100644
--- a/Makefile
+++ b/Makefile
@@ -183,7 +183,7 @@ bootstrap-json-%: phony
 	cd bootstrap && cabal v2-run -v0 cabal-bootstrap-gen -- linux-$*.plan.json \
 		| python3 -m json.tool > linux-$*.json
 
-BOOTSTRAP_GHC_VERSIONS := 8.6.5 8.8.4 8.10.7 9.0.2 9.2.3
+BOOTSTRAP_GHC_VERSIONS := 8.6.5 8.8.4 8.10.7 9.0.2 9.2.3 9.4.4
 
 bootstrap-jsons: $(BOOTSTRAP_GHC_VERSIONS:%=bootstrap-json-%)
 
diff --git a/bootstrap/cabal-bootstrap-gen.cabal b/bootstrap/cabal-bootstrap-gen.cabal
index a8e0ad0ad88..70092314108 100644
--- a/bootstrap/cabal-bootstrap-gen.cabal
+++ b/bootstrap/cabal-bootstrap-gen.cabal
@@ -8,18 +8,14 @@ executable cabal-bootstrap-gen
   ghc-options:      -Wall
   main-is:          Main.hs
   build-depends:
-    , aeson                  ^>=1.5.2.0  || ^>=2.0.3.0
-        -- Not yet picked up: (*)        || ^>=2.1.0.0
-    , base                   ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0 || ^>=4.15.0.0 || ^>=4.16.0.0
+    , aeson                  ^>=1.5.2.0  || ^>=2.0.3.0 || ^>=2.1.0.0
+    , base                   ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0 || ^>=4.15.0.0 || ^>=4.16.0.0 || ^>=4.17.0.0
     , bytestring             ^>=0.10.8.2 || ^>=0.11.0.0
-    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0
-        -- Not yet picked up: (*)        || ^>=3.8.1.0
-    , cabal-install-parsers  ^>=0.3.0.1  || ^>=0.4.5
+    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0 || ^>=3.8.1.0
+    , Cabal-syntax           ^>=3.8.1.0
+    , cabal-install-parsers  ^>=0.3.0.1  || ^>=0.4.5 || ^>=0.6
     , cabal-plan             ^>=0.7.0.0
     , containers             ^>=0.6.0.1
-    , text                   ^>=1.2.3.0
-        -- Not yet picked up: (*)        || ^>=2.0.1
+    , text                   ^>=1.2.3.0  || ^>=2.0.1
     , topograph              ^>=1.0.0.1
-    , transformers           ^>=0.5.6.2
-        -- Not yet picked up: (*)        || ^>=0.6.0.4
-        -- (*) as of 2022-08-19
+    , transformers           ^>=0.5.6.2  || ^>=0.6.0.4
diff --git a/bootstrap/linux-9.4.4.json b/bootstrap/linux-9.4.4.json
new file mode 100644
index 00000000000..342772b24c5
--- /dev/null
+++ b/bootstrap/linux-9.4.4.json
@@ -0,0 +1 @@
+{"builtin":[{"package":"rts","version":"1.0.2"},{"package":"ghc-prim","version":"0.9.0"},{"package":"ghc-bignum","version":"1.3"},{"package":"base","version":"4.17.0.0"},{"package":"array","version":"0.5.4.0"},{"package":"deepseq","version":"1.4.8.0"},{"package":"ghc-boot-th","version":"9.4.4"},{"package":"pretty","version":"1.1.3.6"},{"package":"template-haskell","version":"2.19.0.0"},{"package":"bytestring","version":"0.11.3.1"},{"package":"containers","version":"0.6.6"},{"package":"binary","version":"0.8.9.1"},{"package":"filepath","version":"1.4.2.2"},{"package":"time","version":"1.12.2"},{"package":"unix","version":"2.7.3"},{"package":"directory","version":"1.3.7.1"},{"package":"transformers","version":"0.5.6.2"},{"package":"mtl","version":"2.2.2"},{"package":"text","version":"2.0.1"},{"package":"parsec","version":"3.1.15.0"},{"package":"process","version":"1.6.16.0"},{"package":"stm","version":"2.5.1.0"},{"package":"exceptions","version":"0.10.5"}],"dependencies":[{"cabal_sha256":null,"flags":[],"package":"Cabal-syntax","revision":null,"source":"local","src_sha256":null,"version":"3.9.0.0"},{"cabal_sha256":null,"flags":[],"package":"Cabal","revision":null,"source":"local","src_sha256":null,"version":"3.9.0.0"},{"cabal_sha256":"db25c2e17967aa6b6046ab8b1b96ba3f344ca59a62b60fb6113d51ea305a3d8e","flags":["-optimised-mixer"],"package":"splitmix","revision":2,"source":"hackage","src_sha256":"6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa","version":"0.1.0.4"},{"cabal_sha256":"dea1f11e5569332dc6c8efaad1cb301016a5587b6754943a49f9de08ae0e56d9","flags":[],"package":"random","revision":0,"source":"hackage","src_sha256":"3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76","version":"1.2.1.1"},{"cabal_sha256":"02acedd7ac829b52756fe481a1d53294d8f5d42aaa56df560c62c6cec3587a14","flags":["+integer-gmp","-random-initial-seed"],"package":"hashable","revision":0,"source":"hackage","src_sha256":"1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8","version":"1.4.2.0"},{"cabal_sha256":"2b9409023536823233ce3134558565d01b3382e651fa54ac8cb8a99967e023c9","flags":["-bench"],"package":"async","revision":2,"source":"hackage","src_sha256":"484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725","version":"2.2.4"},{"cabal_sha256":"bc14969ea4adfec6eee20264decf4a07c4002b38b2aa802d58d86b1a2cf7b895","flags":["-old-bytestring","-old-time"],"package":"tar","revision":5,"source":"hackage","src_sha256":"b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de","version":"0.5.1.1"},{"cabal_sha256":"e3d78b13db9512aeb106e44a334ab42b7aa48d26c097299084084cb8be5c5568","flags":["-devel"],"package":"network","revision":0,"source":"hackage","src_sha256":"7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85","version":"3.1.2.7"},{"cabal_sha256":"6ca77c4e80b4e4109e30549c269631a9cc295c8fc2431ce4123972a5f80f7bfc","flags":[],"package":"th-compat","revision":0,"source":"hackage","src_sha256":"d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8","version":"0.1.4"},{"cabal_sha256":"1fde59abf5d82a9666b4415bc2b2e9e33f6c1309074fda12d50410c7dbd95f3b","flags":[],"package":"network-uri","revision":0,"source":"hackage","src_sha256":"9c188973126e893250b881f20e8811dca06c223c23402b06f7a1f2e995797228","version":"2.6.4.2"},{"cabal_sha256":"b878d575c470bd1f72d37af6654d924ab2b9489d88de8a71bd74d9d5d726c013","flags":["-conduit10","+network-uri","-warn-as-error","-warp-tests"],"package":"HTTP","revision":1,"source":"hackage","src_sha256":"df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453","version":"4000.4.1"},{"cabal_sha256":"64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a","flags":[],"package":"base16-bytestring","revision":0,"source":"hackage","src_sha256":"1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784","version":"1.0.2.0"},{"cabal_sha256":"50ec0e229255d4c45cbdd568da011311b8887f304b931564886016f4984334d8","flags":[],"package":"base64-bytestring","revision":0,"source":"hackage","src_sha256":"fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9","version":"1.2.1.0"},{"cabal_sha256":"4d33a49cd383d50af090f1b888642d10116e43809f9da6023d9fc6f67d2656ee","flags":[],"package":"edit-distance","revision":1,"source":"hackage","src_sha256":"3e8885ee2f56ad4da940f043ae8f981ee2fe336b5e8e4ba3f7436cff4f526c4a","version":"0.2.2.1"},{"cabal_sha256":null,"flags":["-debug-conflict-sets","-debug-expensive-assertions","-debug-tracetree"],"package":"cabal-install-solver","revision":null,"source":"local","src_sha256":null,"version":"3.9.0.0"},{"cabal_sha256":"facd0c04925ef925ec05243471fd16055229fdf51f64db1a1049de0cc6c6dfc3","flags":["-exe","+use-cbits"],"package":"cryptohash-sha256","revision":1,"source":"hackage","src_sha256":"73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6","version":"0.11.102.1"},{"cabal_sha256":"ccce771562c49a2b29a52046ca68c62179e97e8fbeacdae32ca84a85445e8f42","flags":["-example"],"package":"echo","revision":0,"source":"hackage","src_sha256":"c9fe1bf2904825a65b667251ec644f197b71dc5c209d2d254be5de3d496b0e43","version":"0.1.4"},{"cabal_sha256":"885c9e2410e5d91a08b199897df0867fecedf818216d7329a2d43a512833dd63","flags":["+no-donna","+test-doctests","+test-hlint","+test-properties"],"package":"ed25519","revision":6,"source":"hackage","src_sha256":"d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d","version":"0.0.5.0"},{"cabal_sha256":"efd4c08c4df1ac3f423858a834c0e3b5b4909febda66a901d12a8e1d57bddaa8","flags":["+ofd-locking"],"package":"lukko","revision":3,"source":"hackage","src_sha256":"a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f","version":"0.1.1.3"},{"cabal_sha256":"9adce39e4ca0b7a87d45df0a243134816c57059a08e28cff5469c98ae1f54dfc","flags":["-bundled-c-zlib","-non-blocking-ffi","-pkg-config"],"package":"zlib","revision":1,"source":"hackage","src_sha256":"9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da","version":"0.6.3.0"},{"cabal_sha256":"64fc60f3f4d02047c54956b6976c0e4fc72722891c6875ab10d95359bc00355a","flags":["+base48","+cabal-syntax","+lukko","-mtl21","-old-directory","+use-network-uri"],"package":"hackage-security","revision":0,"source":"hackage","src_sha256":"52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066","version":"0.6.2.3"},{"cabal_sha256":"4ff4425c710cddf440dfbac6cd52310bb6b23e17902390ff71c9fc7eaafc4fcc","flags":[],"package":"regex-base","revision":1,"source":"hackage","src_sha256":"7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1","version":"0.94.0.2"},{"cabal_sha256":"9dbba4b65a3bb6975d9740814be5593c6b2d2d6a0b3febc8ec940edb9a9bbdf4","flags":["-_regex-posix-clib"],"package":"regex-posix","revision":1,"source":"hackage","src_sha256":"c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c","version":"0.96.0.1"},{"cabal_sha256":"61e2d98ff634b8b4b3db467772420c0f9c79c2da9ddf3d2daeb2af2417f2c535","flags":[],"package":"resolv","revision":5,"source":"hackage","src_sha256":"81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671","version":"0.1.2.0"},{"cabal_sha256":"6e9b1b233af80cc0aa17ea858d2641ba146fb11cbcc5970a52649e89d77282e2","flags":[],"package":"safe-exceptions","revision":0,"source":"hackage","src_sha256":"91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf","version":"0.1.7.3"},{"cabal_sha256":null,"flags":["+lukko","+native-dns"],"package":"cabal-install","revision":null,"source":"local","src_sha256":null,"version":"3.9.0.0"}]}
diff --git a/bootstrap/src/Main.hs b/bootstrap/src/Main.hs
index c2898516719..0ca636ea020 100644
--- a/bootstrap/src/Main.hs
+++ b/bootstrap/src/Main.hs
@@ -93,7 +93,7 @@ main2 meta plan = do
                         return
                             ( Hackage
                             , Just $ fromIntegral (I.riRevision relInfo)
-                            , P.sha256FromByteString $ I.getSHA256 $ I.riCabal relInfo
+                            , P.sha256FromByteString $ I.getSHA256 $ getHash relInfo
                             )
 
                     Nothing -> case P.uType unit of
@@ -117,6 +117,12 @@ main2 meta plan = do
         { resBuiltin      = builtin
         , resDependencies = deps
         }
+  where
+#if MIN_VERSION_cabal_install_parsers(0,6,0)
+    getHash = I.riCabalHash
+#else
+    getHash = I.riCabal
+#endif
 
 bfs :: P.PlanJson -> P.Unit -> IO [P.Unit]
 bfs plan unit0 = do

From 964049bb3ff056cb551ac913914b9f41b5844cf2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Thu, 23 Feb 2023 11:16:40 +0100
Subject: [PATCH 015/144] Disallow GHC <8.0 for Cabal{,-syntax} &
 cabal-install-solver (#8794)

* Disallow GHC <8.0

closes #8715

* Add changelog entry

(cherry picked from commit 9e417fa2b76f6b0ce7e3110cb27038d5a6cca6d9)
---
 Cabal-syntax/Cabal-syntax.cabal                 |  2 +-
 Cabal-tests/Cabal-tests.cabal                   |  2 +-
 Cabal/Cabal.cabal                               |  2 +-
 cabal-install-solver/cabal-install-solver.cabal |  2 +-
 cabal-testsuite/cabal-testsuite.cabal           |  2 +-
 changelog.d/pr-8794                             | 10 ++++++++++
 6 files changed, 15 insertions(+), 5 deletions(-)
 create mode 100644 changelog.d/pr-8794

diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index 8bc06f8080c..644d77c8eef 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -29,7 +29,7 @@ library
 
   build-depends:
     array      >= 0.4.0.1  && < 0.6,
-    base       >= 4.6      && < 5,
+    base       >= 4.9      && < 5,
     binary     >= 0.7      && < 0.9,
     bytestring >= 0.10.0.0 && < 0.12,
     containers >= 0.5.0.0  && < 0.7,
diff --git a/Cabal-tests/Cabal-tests.cabal b/Cabal-tests/Cabal-tests.cabal
index 2ae09c0928e..ce49eab8eb4 100644
--- a/Cabal-tests/Cabal-tests.cabal
+++ b/Cabal-tests/Cabal-tests.cabal
@@ -51,7 +51,7 @@ test-suite unit-tests
   build-depends:
       array
     , async               >=2.2.2 && <2.3
-    , base                >=0     && <5
+    , base                >=4.9     && <5
     , binary
     , bytestring
     , Cabal
diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index 3ad7d517535..74ff94ca4c2 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -36,7 +36,7 @@ library
   build-depends:
     Cabal-syntax ^>= 3.9,
     array      >= 0.4.0.1  && < 0.6,
-    base       >= 4.6      && < 5,
+    base       >= 4.9      && < 5,
     bytestring >= 0.10.0.0 && < 0.12,
     containers >= 0.5.0.0  && < 0.7,
     deepseq    >= 1.3.0.1  && < 1.5,
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index 28d962ad2e1..eacf70a2a77 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -121,7 +121,7 @@ library
 
   if flag(debug-conflict-sets)
     cpp-options:   -DDEBUG_CONFLICT_SETS
-    build-depends: base >=4.8
+    build-depends: base >=4.9
 
   if flag(debug-tracetree)
     cpp-options:   -DDEBUG_TRACETREE
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index 849ca565d6a..1d918b6bbdf 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -26,7 +26,7 @@ common shared
   default-language: Haskell2010
 
   build-depends:
-    , base >= 4.6 && <4.18
+    , base >= 4.9 && <4.18
     -- this needs to match the in-tree lib:Cabal version
     , Cabal ^>= 3.9.0.0
     , Cabal-syntax ^>= 3.9.0.0
diff --git a/changelog.d/pr-8794 b/changelog.d/pr-8794
new file mode 100644
index 00000000000..10babd5d420
--- /dev/null
+++ b/changelog.d/pr-8794
@@ -0,0 +1,10 @@
+synopsis: Disallow GHC <8.0 for 
+packages: Cabal Cabal-syntax cabal-install-solver
+prs: #8794
+issues: #8715 #7531
+
+description: {
+
+Disallow GHC <8.0 by restricting the version of base that can be used to at least 4.9
+
+}

From 44a53ddece25e2e4524ebd16f8475203fd290255 Mon Sep 17 00:00:00 2001
From: Mikolaj Konarski <mikolaj.konarski@gmail.com>
Date: Thu, 23 Feb 2023 15:51:50 +0100
Subject: [PATCH 016/144] Bump cabal version numbers and bounds to 3.10 for
 release

---
 Cabal-QuickCheck/Cabal-QuickCheck.cabal                  | 6 +++---
 Cabal-described/Cabal-described.cabal                    | 6 +++---
 Cabal-syntax/Cabal-syntax.cabal                          | 2 +-
 Cabal-syntax/src/Distribution/CabalSpecVersion.hs        | 1 +
 Cabal-tree-diff/Cabal-tree-diff.cabal                    | 6 +++---
 Cabal/Cabal.cabal                                        | 4 ++--
 Cabal/Makefile                                           | 2 +-
 bootstrap/cabal-bootstrap-gen.cabal                      | 4 ++--
 cabal-install-solver/cabal-install-solver.cabal          | 6 +++---
 cabal-install/cabal-install.cabal                        | 8 ++++----
 cabal-install/src/Distribution/Client/ProjectPlanning.hs | 2 ++
 cabal-install/src/Distribution/Client/Version.hs         | 2 +-
 cabal-testsuite/cabal-testsuite.cabal                    | 4 ++--
 doc/conf.py                                              | 2 +-
 solver-benchmarks/solver-benchmarks.cabal                | 2 +-
 15 files changed, 30 insertions(+), 27 deletions(-)

diff --git a/Cabal-QuickCheck/Cabal-QuickCheck.cabal b/Cabal-QuickCheck/Cabal-QuickCheck.cabal
index 2240dca999c..29a9462354c 100644
--- a/Cabal-QuickCheck/Cabal-QuickCheck.cabal
+++ b/Cabal-QuickCheck/Cabal-QuickCheck.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal-QuickCheck
-version:       3.9.0.0
+version:       3.10.1.0
 synopsis:      QuickCheck instances for types in Cabal
 category:      Testing
 description:
@@ -13,8 +13,8 @@ library
   build-depends:
     , base
     , bytestring
-    , Cabal         ^>=3.9.0.0
-    , Cabal-syntax  ^>=3.9.0.0
+    , Cabal         ^>=3.10.0.0
+    , Cabal-syntax  ^>=3.10.0.0
     , QuickCheck    ^>=2.13.2 || ^>=2.14
 
   exposed-modules:
diff --git a/Cabal-described/Cabal-described.cabal b/Cabal-described/Cabal-described.cabal
index 680272a8d2b..7458ee5f7f1 100644
--- a/Cabal-described/Cabal-described.cabal
+++ b/Cabal-described/Cabal-described.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal-described
-version:       3.9.0.0
+version:       3.10.1.0
 synopsis:      Described functionality for types in Cabal
 category:      Testing, Parsec
 description:   Provides rere bindings
@@ -11,8 +11,8 @@ library
   ghc-options:      -Wall
   build-depends:
     , base
-    , Cabal             ^>=3.9.0.0
-    , Cabal-syntax      ^>=3.9.0.0
+    , Cabal             ^>=3.10.0.0
+    , Cabal-syntax      ^>=3.10.0.0
     , containers
     , pretty
     , QuickCheck
diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index 644d77c8eef..d4039a55fb6 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal-syntax
-version:       3.9.0.0
+version:       3.10.1.0
 copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
diff --git a/Cabal-syntax/src/Distribution/CabalSpecVersion.hs b/Cabal-syntax/src/Distribution/CabalSpecVersion.hs
index 142ade373c4..a307bb4b0f3 100644
--- a/Cabal-syntax/src/Distribution/CabalSpecVersion.hs
+++ b/Cabal-syntax/src/Distribution/CabalSpecVersion.hs
@@ -30,6 +30,7 @@ data CabalSpecVersion
     | CabalSpecV3_4
     | CabalSpecV3_6
     | CabalSpecV3_8
+    -- 3.10: no changes
   deriving (Eq, Ord, Show, Read, Enum, Bounded, Typeable, Data, Generic)
 
 instance Binary CabalSpecVersion
diff --git a/Cabal-tree-diff/Cabal-tree-diff.cabal b/Cabal-tree-diff/Cabal-tree-diff.cabal
index 4f27ba20cdd..3d3e8087b3c 100644
--- a/Cabal-tree-diff/Cabal-tree-diff.cabal
+++ b/Cabal-tree-diff/Cabal-tree-diff.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal-tree-diff
-version:       3.9.0.0
+version:       3.10.1.0
 synopsis:      QuickCheck instances for types in Cabal
 category:      Testing
 description:   Provides tree-diff ToExpr instances for some types in Cabal
@@ -11,8 +11,8 @@ library
   ghc-options:      -Wall
   build-depends:
     , base
-    , Cabal-syntax  ^>=3.9.0.0
-    , Cabal         ^>=3.9.0.0
+    , Cabal-syntax  ^>=3.10.0.0
+    , Cabal         ^>=3.10.0.0
     , tree-diff     ^>=0.1 || ^>=0.2
 
   exposed-modules:  Data.TreeDiff.Instances.Cabal
diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index 74ff94ca4c2..bbe963f26d5 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal
-version:       3.9.0.0
+version:       3.10.1.0
 copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
@@ -34,7 +34,7 @@ library
   hs-source-dirs: src
 
   build-depends:
-    Cabal-syntax ^>= 3.9,
+    Cabal-syntax ^>= 3.10,
     array      >= 0.4.0.1  && < 0.6,
     base       >= 4.9      && < 5,
     bytestring >= 0.10.0.0 && < 0.12,
diff --git a/Cabal/Makefile b/Cabal/Makefile
index bf89ffd18d4..8515826802f 100644
--- a/Cabal/Makefile
+++ b/Cabal/Makefile
@@ -1,4 +1,4 @@
-VERSION=3.9.0.0
+VERSION=3.10.1.0
 
 #KIND=devel
 KIND=rc
diff --git a/bootstrap/cabal-bootstrap-gen.cabal b/bootstrap/cabal-bootstrap-gen.cabal
index 70092314108..64c5a098f65 100644
--- a/bootstrap/cabal-bootstrap-gen.cabal
+++ b/bootstrap/cabal-bootstrap-gen.cabal
@@ -11,8 +11,8 @@ executable cabal-bootstrap-gen
     , aeson                  ^>=1.5.2.0  || ^>=2.0.3.0 || ^>=2.1.0.0
     , base                   ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0 || ^>=4.15.0.0 || ^>=4.16.0.0 || ^>=4.17.0.0
     , bytestring             ^>=0.10.8.2 || ^>=0.11.0.0
-    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0 || ^>=3.8.1.0
-    , Cabal-syntax           ^>=3.8.1.0
+    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0 || ^>=3.8.1.0 || ^>=3.10.1.0
+    , Cabal-syntax           ^>=3.8.1.0 || ^>=3.10.1.0
     , cabal-install-parsers  ^>=0.3.0.1  || ^>=0.4.5 || ^>=0.6
     , cabal-plan             ^>=0.7.0.0
     , containers             ^>=0.6.0.1
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index eacf70a2a77..16a0650cbf2 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          cabal-install-solver
-version:       3.9.0.0
+version:       3.10.1.0
 synopsis:      The command-line interface for Cabal and Hackage.
 description:
   The solver component used in cabal-install command-line program
@@ -107,8 +107,8 @@ library
     , array         >=0.4      && <0.6
     , base          >=4.10     && <4.18
     , bytestring    >=0.10.6.0 && <0.12
-    , Cabal         ^>=3.9
-    , Cabal-syntax  ^>=3.9
+    , Cabal         ^>=3.10
+    , Cabal-syntax  ^>=3.10
     , containers    >=0.5.6.2  && <0.7
     , edit-distance ^>= 0.2.2
     , filepath      ^>=1.4.0.0
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 15e813494b7..fed9aad89cd 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -1,7 +1,7 @@
 Cabal-Version:      2.2
 
 Name:               cabal-install
-Version:            3.9.0.0
+Version:            3.10.1.0
 Synopsis:           The command-line interface for Cabal and Hackage.
 Description:
     The \'cabal\' command-line program simplifies the process of managing
@@ -49,13 +49,13 @@ common base-dep
     build-depends: base >=4.10 && <4.18
 
 common cabal-dep
-    build-depends: Cabal ^>=3.9
+    build-depends: Cabal ^>=3.10
 
 common cabal-syntax-dep
-    build-depends: Cabal-syntax ^>=3.9
+    build-depends: Cabal-syntax ^>=3.10
 
 common cabal-install-solver-dep
-    build-depends: cabal-install-solver ^>=3.9
+    build-depends: cabal-install-solver ^>=3.10
 
 library
     import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
diff --git a/cabal-install/src/Distribution/Client/ProjectPlanning.hs b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
index 8d8947ae8a8..16ff6e0d534 100644
--- a/cabal-install/src/Distribution/Client/ProjectPlanning.hs
+++ b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
@@ -1200,6 +1200,7 @@ planPackages verbosity comp platform solver SolverSettings{..}
     -- respective major Cabal version bundled with the respective GHC
     -- release).
     --
+    -- etc.
     -- GHC 9.2   needs  Cabal >= 3.6
     -- GHC 9.0   needs  Cabal >= 3.4
     -- GHC 8.10  needs  Cabal >= 3.2
@@ -1216,6 +1217,7 @@ planPackages verbosity comp platform solver SolverSettings{..}
     -- TODO: long-term, this compatibility matrix should be
     --       stored as a field inside 'Distribution.Compiler.Compiler'
     setupMinCabalVersionConstraint
+      | isGHC, compVer >= mkVersion [9,6]  = mkVersion [3,10]
       | isGHC, compVer >= mkVersion [9,4]  = mkVersion [3,8]
       | isGHC, compVer >= mkVersion [9,2]  = mkVersion [3,6]
       | isGHC, compVer >= mkVersion [9,0]  = mkVersion [3,4]
diff --git a/cabal-install/src/Distribution/Client/Version.hs b/cabal-install/src/Distribution/Client/Version.hs
index 36f10ea3df0..5d434820441 100644
--- a/cabal-install/src/Distribution/Client/Version.hs
+++ b/cabal-install/src/Distribution/Client/Version.hs
@@ -13,4 +13,4 @@ import Distribution.Version
 -- program coverage information generated by HPC, and hence was moved to be a standalone value.
 --
 cabalInstallVersion :: Version
-cabalInstallVersion = mkVersion [3,9]
+cabalInstallVersion = mkVersion [3,10,1,0]
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index 1d918b6bbdf..e3ba1da7cbb 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -28,8 +28,8 @@ common shared
   build-depends:
     , base >= 4.9 && <4.18
     -- this needs to match the in-tree lib:Cabal version
-    , Cabal ^>= 3.9.0.0
-    , Cabal-syntax ^>= 3.9.0.0
+    , Cabal ^>= 3.10.0.0
+    , Cabal-syntax ^>= 3.10.0.0
 
   ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
 
diff --git a/doc/conf.py b/doc/conf.py
index f540d7191f2..ef955125486 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -13,7 +13,7 @@
 sys.path.insert(0, os.path.abspath('.'))
 import cabaldomain
 
-version = "3.9.0.0"
+version = "3.10.1.0"
 
 extensions = [
     'sphinx.ext.extlinks',
diff --git a/solver-benchmarks/solver-benchmarks.cabal b/solver-benchmarks/solver-benchmarks.cabal
index 26517503b76..b64e9d9f846 100644
--- a/solver-benchmarks/solver-benchmarks.cabal
+++ b/solver-benchmarks/solver-benchmarks.cabal
@@ -31,7 +31,7 @@ library
     base,
     bytestring,
     containers,
-    Cabal-syntax ^>= 3.9,
+    Cabal-syntax ^>= 3.10,
     directory,
     filepath,
     optparse-applicative,

From 8315ea7b2da505e68859df575e297f67acd89c92 Mon Sep 17 00:00:00 2001
From: Mikolaj Konarski <mikolaj.konarski@gmail.com>
Date: Thu, 23 Feb 2023 16:50:56 +0100
Subject: [PATCH 017/144] Update boostrap files temporarily, for CI to pass

---
 .github/workflows/bootstrap.yml               |   4 +-
 Makefile                                      |   2 +-
 bootstrap/linux-8.10.7.json                   | 394 ++++++++---------
 bootstrap/linux-8.6.5.json                    | 408 ------------------
 bootstrap/linux-8.8.4.json                    | 408 ------------------
 bootstrap/linux-9.0.2.json                    | 394 ++++++++---------
 .../{linux-9.2.3.json => linux-9.2.6.json}    | 386 +++++++++--------
 bootstrap/linux-9.4.4.json                    | 382 +++++++++++++++-
 8 files changed, 983 insertions(+), 1395 deletions(-)
 delete mode 100644 bootstrap/linux-8.6.5.json
 delete mode 100644 bootstrap/linux-8.8.4.json
 rename bootstrap/{linux-9.2.3.json => linux-9.2.6.json} (80%)

diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml
index 4ac3a7f2349..1165e6a138c 100644
--- a/.github/workflows/bootstrap.yml
+++ b/.github/workflows/bootstrap.yml
@@ -19,10 +19,10 @@ jobs:
     strategy:
       matrix:
         os: [ubuntu-latest]
-        ghc: ["8.6.5", "8.8.4", "8.10.7", "9.0.2", "9.2.3", "9.4.4"]
+        ghc: ["8.10.7", "9.0.2", "9.2.6", "9.4.4"]
         include:
           - os: macos-latest
-            ghc: "9.2.3"
+            ghc: "9.2.6"
     name: Bootstrap ${{ matrix.os }} ghc-${{ matrix.ghc }}
     runs-on: ${{ matrix.os }}
     steps:
diff --git a/Makefile b/Makefile
index db5ecccd50b..85f2063ff7a 100644
--- a/Makefile
+++ b/Makefile
@@ -183,7 +183,7 @@ bootstrap-json-%: phony
 	cd bootstrap && cabal v2-run -v0 cabal-bootstrap-gen -- linux-$*.plan.json \
 		| python3 -m json.tool > linux-$*.json
 
-BOOTSTRAP_GHC_VERSIONS := 8.6.5 8.8.4 8.10.7 9.0.2 9.2.3 9.4.4
+BOOTSTRAP_GHC_VERSIONS := 8.10.7 9.0.2 9.2.6 9.4.4
 
 bootstrap-jsons: $(BOOTSTRAP_GHC_VERSIONS:%=bootstrap-json-%)
 
diff --git a/bootstrap/linux-8.10.7.json b/bootstrap/linux-8.10.7.json
index a27028a1e3b..d60690f2075 100644
--- a/bootstrap/linux-8.10.7.json
+++ b/bootstrap/linux-8.10.7.json
@@ -1,74 +1,158 @@
 {
+    "builtin": [
+        {
+            "package": "rts",
+            "version": "1.0.1"
+        },
+        {
+            "package": "ghc-prim",
+            "version": "0.6.1"
+        },
+        {
+            "package": "integer-gmp",
+            "version": "1.0.3.0"
+        },
+        {
+            "package": "base",
+            "version": "4.14.3.0"
+        },
+        {
+            "package": "array",
+            "version": "0.5.4.0"
+        },
+        {
+            "package": "deepseq",
+            "version": "1.4.4.0"
+        },
+        {
+            "package": "bytestring",
+            "version": "0.10.12.0"
+        },
+        {
+            "package": "containers",
+            "version": "0.6.5.1"
+        },
+        {
+            "package": "binary",
+            "version": "0.8.8.0"
+        },
+        {
+            "package": "filepath",
+            "version": "1.4.2.1"
+        },
+        {
+            "package": "time",
+            "version": "1.9.3"
+        },
+        {
+            "package": "unix",
+            "version": "2.7.2.2"
+        },
+        {
+            "package": "transformers",
+            "version": "0.5.6.2"
+        },
+        {
+            "package": "mtl",
+            "version": "2.2.2"
+        },
+        {
+            "package": "ghc-boot-th",
+            "version": "8.10.7"
+        },
+        {
+            "package": "pretty",
+            "version": "1.1.3.6"
+        },
+        {
+            "package": "template-haskell",
+            "version": "2.16.0.0"
+        },
+        {
+            "package": "text",
+            "version": "1.2.4.1"
+        },
+        {
+            "package": "parsec",
+            "version": "3.1.14.0"
+        },
+        {
+            "package": "stm",
+            "version": "2.5.0.1"
+        },
+        {
+            "package": "exceptions",
+            "version": "0.10.4"
+        }
+    ],
     "dependencies": [
         {
             "cabal_sha256": "1125a0a4be3aafc8da208940f219d4e4df8a0db87d892cc42bb369071855c590",
-            "revision": 0,
-            "src_sha256": "dc2785d6548cec2e80700fab007d3e9467f65d3c58ab3efa21b34d9017cf0efd",
             "flags": [],
             "package": "directory",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "dc2785d6548cec2e80700fab007d3e9467f65d3c58ab3efa21b34d9017cf0efd",
             "version": "1.3.7.1"
         },
         {
             "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
             "flags": [],
             "package": "Cabal-syntax",
+            "revision": null,
             "source": "local",
-            "version": "3.9.0.0"
+            "src_sha256": null,
+            "version": "3.10.1.0"
         },
         {
-            "cabal_sha256": "04df32d9497add5f0b90a27a3eceffa4bad5c2f41d038bd12ed6efc454db3faf",
-            "revision": 0,
-            "src_sha256": "44b31b6cd3129893ac1a007573dedb69dde667fa06ee108526d58f08b1a1f7ab",
+            "cabal_sha256": "49d8a7f372d35363011591b253cae4c8db8b9ec594590448e20b7bed7acaee98",
             "flags": [],
             "package": "process",
+            "revision": 0,
             "source": "hackage",
-            "version": "1.6.15.0"
+            "src_sha256": "4c5c454e0f5c864c79b9fabd850307b26d8ac4037e45a6a39ab87e20b583bf06",
+            "version": "1.6.17.0"
         },
         {
             "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
             "flags": [],
             "package": "Cabal",
+            "revision": null,
             "source": "local",
-            "version": "3.9.0.0"
+            "src_sha256": null,
+            "version": "3.10.1.0"
         },
         {
             "cabal_sha256": "e3d78b13db9512aeb106e44a334ab42b7aa48d26c097299084084cb8be5c5568",
-            "revision": 0,
-            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
             "flags": [
                 "-devel"
             ],
             "package": "network",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
             "version": "3.1.2.7"
         },
         {
-            "cabal_sha256": "f65819f74c6ced42b24d9e5053165508c4b6a18271c8e3229dc93b1dc8f7a5ab",
-            "revision": 1,
-            "src_sha256": "6b5059caf6714f47da92953badf2f556119877e09708c14e206b3ae98b8681c6",
+            "cabal_sha256": "6ca77c4e80b4e4109e30549c269631a9cc295c8fc2431ce4123972a5f80f7bfc",
             "flags": [],
             "package": "th-compat",
+            "revision": 0,
             "source": "hackage",
-            "version": "0.1.3"
+            "src_sha256": "d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8",
+            "version": "0.1.4"
         },
         {
-            "cabal_sha256": "a4765164ed0a2d1668446eb2e03460ce98645fbf083598c690846af79b7de10d",
-            "revision": 0,
-            "src_sha256": "57856db93608a4d419f681b881c9b8d4448800d5a687587dc37e8a9e0b223584",
+            "cabal_sha256": "1fde59abf5d82a9666b4415bc2b2e9e33f6c1309074fda12d50410c7dbd95f3b",
             "flags": [],
             "package": "network-uri",
+            "revision": 0,
             "source": "hackage",
-            "version": "2.6.4.1"
+            "src_sha256": "9c188973126e893250b881f20e8811dca06c223c23402b06f7a1f2e995797228",
+            "version": "2.6.4.2"
         },
         {
-            "cabal_sha256": "16ee1212245c6e7cf0905b039689b55dbe8386a2b450094055e536d30c89ba76",
-            "revision": 0,
-            "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
+            "cabal_sha256": "b878d575c470bd1f72d37af6654d924ab2b9489d88de8a71bd74d9d5d726c013",
             "flags": [
                 "-conduit10",
                 "+network-uri",
@@ -76,105 +160,137 @@
                 "-warp-tests"
             ],
             "package": "HTTP",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
             "version": "4000.4.1"
         },
         {
-            "cabal_sha256": "eb6758d0160d607e0c45dbd6b196f515b9a589fd4f6d2f926929dd5d56282d37",
-            "revision": 0,
-            "src_sha256": "20a21c4b7adb0fd844b25e196241467406a28286b021f9b7a082ab03fa8015eb",
+            "cabal_sha256": "58d5514b688ec037f53b9d60097b9d87f6b3847da68f65124987d67222c3a334",
             "flags": [],
             "package": "base-orphans",
+            "revision": 0,
             "source": "hackage",
-            "version": "0.8.6"
+            "src_sha256": "888fd67f0dbe932778f5b170922ce80d0dcab1680ee98f1d6fcc362f20d9e447",
+            "version": "0.8.7"
         },
         {
-            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
+            "cabal_sha256": "2ef1bd3511e82ba56f7f23cd793dd2da84338a1e7c2cbea5b151417afe3baada",
+            "flags": [],
+            "package": "data-array-byte",
+            "revision": 1,
+            "source": "hackage",
+            "src_sha256": "1bb6eca0b3e02d057fe7f4e14c81ef395216f421ab30fdaa1b18017c9c025600",
+            "version": "0.1.0.1"
+        },
+        {
+            "cabal_sha256": "02acedd7ac829b52756fe481a1d53294d8f5d42aaa56df560c62c6cec3587a14",
+            "flags": [
+                "+integer-gmp",
+                "-random-initial-seed"
+            ],
+            "package": "hashable",
             "revision": 0,
-            "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
+            "source": "hackage",
+            "src_sha256": "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8",
+            "version": "1.4.2.0"
+        },
+        {
+            "cabal_sha256": "2b9409023536823233ce3134558565d01b3382e651fa54ac8cb8a99967e023c9",
+            "flags": [
+                "-bench"
+            ],
+            "package": "async",
+            "revision": 2,
+            "source": "hackage",
+            "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
+            "version": "2.2.4"
+        },
+        {
+            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
             "flags": [],
             "package": "base16-bytestring",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
             "version": "1.0.2.0"
         },
         {
             "cabal_sha256": "50ec0e229255d4c45cbdd568da011311b8887f304b931564886016f4984334d8",
-            "revision": 0,
-            "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
             "flags": [],
             "package": "base64-bytestring",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
             "version": "1.2.1.0"
         },
         {
-            "cabal_sha256": "714a55fd28d3e2533bd5b49e74f604ef8e5d7b06f249c8816f6c54aed431dcf1",
-            "revision": 0,
-            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
+            "cabal_sha256": "db25c2e17967aa6b6046ab8b1b96ba3f344ca59a62b60fb6113d51ea305a3d8e",
             "flags": [
                 "-optimised-mixer"
             ],
             "package": "splitmix",
+            "revision": 2,
             "source": "hackage",
+            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
             "version": "0.1.0.4"
         },
         {
             "cabal_sha256": "dea1f11e5569332dc6c8efaad1cb301016a5587b6754943a49f9de08ae0e56d9",
-            "revision": 0,
-            "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
             "flags": [],
             "package": "random",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
             "version": "1.2.1.1"
         },
         {
             "cabal_sha256": "4d33a49cd383d50af090f1b888642d10116e43809f9da6023d9fc6f67d2656ee",
-            "revision": 1,
-            "src_sha256": "3e8885ee2f56ad4da940f043ae8f981ee2fe336b5e8e4ba3f7436cff4f526c4a",
             "flags": [],
             "package": "edit-distance",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "3e8885ee2f56ad4da940f043ae8f981ee2fe336b5e8e4ba3f7436cff4f526c4a",
             "version": "0.2.2.1"
         },
         {
             "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
             "flags": [
                 "-debug-conflict-sets",
                 "-debug-expensive-assertions",
                 "-debug-tracetree"
             ],
             "package": "cabal-install-solver",
+            "revision": null,
             "source": "local",
-            "version": "3.9.0.0"
+            "src_sha256": null,
+            "version": "3.10.1.0"
         },
         {
-            "cabal_sha256": "ccce771562c49a2b29a52046ca68c62179e97e8fbeacdae32ca84a85445e8f42",
-            "revision": 0,
-            "src_sha256": "c9fe1bf2904825a65b667251ec644f197b71dc5c209d2d254be5de3d496b0e43",
+            "cabal_sha256": "facd0c04925ef925ec05243471fd16055229fdf51f64db1a1049de0cc6c6dfc3",
             "flags": [
-                "-example"
+                "-exe",
+                "+use-cbits"
             ],
-            "package": "echo",
+            "package": "cryptohash-sha256",
+            "revision": 1,
             "source": "hackage",
-            "version": "0.1.4"
+            "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
+            "version": "0.11.102.1"
         },
         {
-            "cabal_sha256": "188d0b5a0491e8b686b32d9b144c9287760ba333d2509bf3f17e3d846fbc2332",
-            "revision": 0,
-            "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
+            "cabal_sha256": "ccce771562c49a2b29a52046ca68c62179e97e8fbeacdae32ca84a85445e8f42",
             "flags": [
-                "-exe",
-                "+use-cbits"
+                "-example"
             ],
-            "package": "cryptohash-sha256",
+            "package": "echo",
+            "revision": 0,
             "source": "hackage",
-            "version": "0.11.102.1"
+            "src_sha256": "c9fe1bf2904825a65b667251ec644f197b71dc5c209d2d254be5de3d496b0e43",
+            "version": "0.1.4"
         },
         {
-            "cabal_sha256": "24ac7b5f3d9fa3c2f70262b329f2a75f24e7fd829f88c189b388efa1bcd67eb2",
-            "revision": 5,
-            "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
+            "cabal_sha256": "885c9e2410e5d91a08b199897df0867fecedf818216d7329a2d43a512833dd63",
             "flags": [
                 "+no-donna",
                 "+test-doctests",
@@ -182,49 +298,49 @@
                 "+test-properties"
             ],
             "package": "ed25519",
+            "revision": 6,
             "source": "hackage",
+            "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
             "version": "0.0.5.0"
         },
         {
-            "cabal_sha256": "c084c043a40632d3cafcac50fb5eeff84d91edb070a54baa94945f1c976f97c0",
-            "revision": 2,
-            "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
+            "cabal_sha256": "efd4c08c4df1ac3f423858a834c0e3b5b4909febda66a901d12a8e1d57bddaa8",
             "flags": [
                 "+ofd-locking"
             ],
             "package": "lukko",
+            "revision": 3,
             "source": "hackage",
+            "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
             "version": "0.1.1.3"
         },
         {
             "cabal_sha256": "bc14969ea4adfec6eee20264decf4a07c4002b38b2aa802d58d86b1a2cf7b895",
-            "revision": 5,
-            "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "flags": [
                 "-old-bytestring",
                 "-old-time"
             ],
             "package": "tar",
+            "revision": 5,
             "source": "hackage",
+            "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "version": "0.5.1.1"
         },
         {
-            "cabal_sha256": "8214a9d37580f17f8b675109578a5dbe6853559eef156e34dc2233f1123ace33",
-            "revision": 0,
-            "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
+            "cabal_sha256": "9adce39e4ca0b7a87d45df0a243134816c57059a08e28cff5469c98ae1f54dfc",
             "flags": [
                 "-bundled-c-zlib",
                 "-non-blocking-ffi",
                 "-pkg-config"
             ],
             "package": "zlib",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
             "version": "0.6.3.0"
         },
         {
-            "cabal_sha256": "1d4b292bd90970f7ef52c72f2ae365f88bd2c6a75627dc34a31d24bc8f53f2e4",
-            "revision": 2,
-            "src_sha256": "bf22cd16dde7d6b7130463f4d7324b64a2964d9ef3f523df97d7cb98544d64a8",
+            "cabal_sha256": "18405474813b37ddfc27778c88c549f444661432224999068417dfab3471281e",
             "flags": [
                 "+base48",
                 "+cabal-syntax",
@@ -234,168 +350,60 @@
                 "+use-network-uri"
             ],
             "package": "hackage-security",
+            "revision": 2,
             "source": "hackage",
-            "version": "0.6.2.1"
-        },
-        {
-            "cabal_sha256": "0cddd0229d1aac305ea0404409c0bbfab81f075817bd74b8b2929eff58333e55",
-            "revision": 0,
-            "src_sha256": "83606edd356d914c075ecd44f6d5fe91a3b186aa0683c8dd8c9a7e8e22a47600",
-            "flags": [
-                "+containers",
-                "+integer-gmp",
-                "-random-initial-seed"
-            ],
-            "package": "hashable",
-            "source": "hackage",
-            "version": "1.4.0.2"
+            "src_sha256": "52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066",
+            "version": "0.6.2.3"
         },
         {
             "cabal_sha256": "4ff4425c710cddf440dfbac6cd52310bb6b23e17902390ff71c9fc7eaafc4fcc",
-            "revision": 1,
-            "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
             "flags": [],
             "package": "regex-base",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
             "version": "0.94.0.2"
         },
         {
             "cabal_sha256": "9dbba4b65a3bb6975d9740814be5593c6b2d2d6a0b3febc8ec940edb9a9bbdf4",
-            "revision": 1,
-            "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
             "flags": [
                 "-_regex-posix-clib"
             ],
             "package": "regex-posix",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
             "version": "0.96.0.1"
         },
         {
-            "cabal_sha256": "2088eb9368b920f80bbe4e3b03c3b8484090208f5c3b31645bd67a9ef7d26db4",
-            "revision": 4,
-            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
+            "cabal_sha256": "61e2d98ff634b8b4b3db467772420c0f9c79c2da9ddf3d2daeb2af2417f2c535",
             "flags": [],
             "package": "resolv",
+            "revision": 5,
             "source": "hackage",
+            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
             "version": "0.1.2.0"
         },
         {
             "cabal_sha256": "6e9b1b233af80cc0aa17ea858d2641ba146fb11cbcc5970a52649e89d77282e2",
-            "revision": 0,
-            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
             "flags": [],
             "package": "safe-exceptions",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
             "version": "0.1.7.3"
         },
-        {
-            "cabal_sha256": "b83dec34a53520de84c6dd3dc7aae45d22409b46eb471c478b98108215a370f0",
-            "revision": 1,
-            "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
-            "flags": [
-                "-bench"
-            ],
-            "package": "async",
-            "source": "hackage",
-            "version": "2.2.4"
-        },
         {
             "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
             "flags": [
                 "+lukko",
                 "+native-dns"
             ],
             "package": "cabal-install",
+            "revision": null,
             "source": "local",
-            "version": "3.9.0.0"
-        }
-    ],
-    "builtin": [
-        {
-            "package": "rts",
-            "version": "1.0.1"
-        },
-        {
-            "package": "ghc-prim",
-            "version": "0.6.1"
-        },
-        {
-            "package": "integer-gmp",
-            "version": "1.0.3.0"
-        },
-        {
-            "package": "base",
-            "version": "4.14.3.0"
-        },
-        {
-            "package": "array",
-            "version": "0.5.4.0"
-        },
-        {
-            "package": "deepseq",
-            "version": "1.4.4.0"
-        },
-        {
-            "package": "bytestring",
-            "version": "0.10.12.0"
-        },
-        {
-            "package": "containers",
-            "version": "0.6.5.1"
-        },
-        {
-            "package": "binary",
-            "version": "0.8.8.0"
-        },
-        {
-            "package": "filepath",
-            "version": "1.4.2.1"
-        },
-        {
-            "package": "time",
-            "version": "1.9.3"
-        },
-        {
-            "package": "unix",
-            "version": "2.7.2.2"
-        },
-        {
-            "package": "transformers",
-            "version": "0.5.6.2"
-        },
-        {
-            "package": "mtl",
-            "version": "2.2.2"
-        },
-        {
-            "package": "ghc-boot-th",
-            "version": "8.10.7"
-        },
-        {
-            "package": "pretty",
-            "version": "1.1.3.6"
-        },
-        {
-            "package": "template-haskell",
-            "version": "2.16.0.0"
-        },
-        {
-            "package": "text",
-            "version": "1.2.4.1"
-        },
-        {
-            "package": "parsec",
-            "version": "3.1.14.0"
-        },
-        {
-            "package": "stm",
-            "version": "2.5.0.1"
-        },
-        {
-            "package": "exceptions",
-            "version": "0.10.4"
+            "src_sha256": null,
+            "version": "3.10.1.0"
         }
     ]
 }
diff --git a/bootstrap/linux-8.6.5.json b/bootstrap/linux-8.6.5.json
deleted file mode 100644
index 4b6d7d16c6f..00000000000
--- a/bootstrap/linux-8.6.5.json
+++ /dev/null
@@ -1,408 +0,0 @@
-{
-    "dependencies": [
-        {
-            "cabal_sha256": "1125a0a4be3aafc8da208940f219d4e4df8a0db87d892cc42bb369071855c590",
-            "revision": 0,
-            "src_sha256": "dc2785d6548cec2e80700fab007d3e9467f65d3c58ab3efa21b34d9017cf0efd",
-            "flags": [],
-            "package": "directory",
-            "source": "hackage",
-            "version": "1.3.7.1"
-        },
-        {
-            "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
-            "flags": [],
-            "package": "Cabal-syntax",
-            "source": "local",
-            "version": "3.9.0.0"
-        },
-        {
-            "cabal_sha256": "04df32d9497add5f0b90a27a3eceffa4bad5c2f41d038bd12ed6efc454db3faf",
-            "revision": 0,
-            "src_sha256": "44b31b6cd3129893ac1a007573dedb69dde667fa06ee108526d58f08b1a1f7ab",
-            "flags": [],
-            "package": "process",
-            "source": "hackage",
-            "version": "1.6.15.0"
-        },
-        {
-            "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
-            "flags": [],
-            "package": "Cabal",
-            "source": "local",
-            "version": "3.9.0.0"
-        },
-        {
-            "cabal_sha256": "e3d78b13db9512aeb106e44a334ab42b7aa48d26c097299084084cb8be5c5568",
-            "revision": 0,
-            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
-            "flags": [
-                "-devel"
-            ],
-            "package": "network",
-            "source": "hackage",
-            "version": "3.1.2.7"
-        },
-        {
-            "cabal_sha256": "f65819f74c6ced42b24d9e5053165508c4b6a18271c8e3229dc93b1dc8f7a5ab",
-            "revision": 1,
-            "src_sha256": "6b5059caf6714f47da92953badf2f556119877e09708c14e206b3ae98b8681c6",
-            "flags": [],
-            "package": "th-compat",
-            "source": "hackage",
-            "version": "0.1.3"
-        },
-        {
-            "cabal_sha256": "a4765164ed0a2d1668446eb2e03460ce98645fbf083598c690846af79b7de10d",
-            "revision": 0,
-            "src_sha256": "57856db93608a4d419f681b881c9b8d4448800d5a687587dc37e8a9e0b223584",
-            "flags": [],
-            "package": "network-uri",
-            "source": "hackage",
-            "version": "2.6.4.1"
-        },
-        {
-            "cabal_sha256": "16ee1212245c6e7cf0905b039689b55dbe8386a2b450094055e536d30c89ba76",
-            "revision": 0,
-            "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
-            "flags": [
-                "-conduit10",
-                "+network-uri",
-                "-warn-as-error",
-                "-warp-tests"
-            ],
-            "package": "HTTP",
-            "source": "hackage",
-            "version": "4000.4.1"
-        },
-        {
-            "cabal_sha256": "eb6758d0160d607e0c45dbd6b196f515b9a589fd4f6d2f926929dd5d56282d37",
-            "revision": 0,
-            "src_sha256": "20a21c4b7adb0fd844b25e196241467406a28286b021f9b7a082ab03fa8015eb",
-            "flags": [],
-            "package": "base-orphans",
-            "source": "hackage",
-            "version": "0.8.6"
-        },
-        {
-            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
-            "revision": 0,
-            "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
-            "flags": [],
-            "package": "base16-bytestring",
-            "source": "hackage",
-            "version": "1.0.2.0"
-        },
-        {
-            "cabal_sha256": "50ec0e229255d4c45cbdd568da011311b8887f304b931564886016f4984334d8",
-            "revision": 0,
-            "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
-            "flags": [],
-            "package": "base64-bytestring",
-            "source": "hackage",
-            "version": "1.2.1.0"
-        },
-        {
-            "cabal_sha256": "714a55fd28d3e2533bd5b49e74f604ef8e5d7b06f249c8816f6c54aed431dcf1",
-            "revision": 0,
-            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
-            "flags": [
-                "-optimised-mixer"
-            ],
-            "package": "splitmix",
-            "source": "hackage",
-            "version": "0.1.0.4"
-        },
-        {
-            "cabal_sha256": "dea1f11e5569332dc6c8efaad1cb301016a5587b6754943a49f9de08ae0e56d9",
-            "revision": 0,
-            "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
-            "flags": [],
-            "package": "random",
-            "source": "hackage",
-            "version": "1.2.1.1"
-        },
-        {
-            "cabal_sha256": "4d33a49cd383d50af090f1b888642d10116e43809f9da6023d9fc6f67d2656ee",
-            "revision": 1,
-            "src_sha256": "3e8885ee2f56ad4da940f043ae8f981ee2fe336b5e8e4ba3f7436cff4f526c4a",
-            "flags": [],
-            "package": "edit-distance",
-            "source": "hackage",
-            "version": "0.2.2.1"
-        },
-        {
-            "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
-            "flags": [
-                "-debug-conflict-sets",
-                "-debug-expensive-assertions",
-                "-debug-tracetree"
-            ],
-            "package": "cabal-install-solver",
-            "source": "local",
-            "version": "3.9.0.0"
-        },
-        {
-            "cabal_sha256": "ccce771562c49a2b29a52046ca68c62179e97e8fbeacdae32ca84a85445e8f42",
-            "revision": 0,
-            "src_sha256": "c9fe1bf2904825a65b667251ec644f197b71dc5c209d2d254be5de3d496b0e43",
-            "flags": [
-                "-example"
-            ],
-            "package": "echo",
-            "source": "hackage",
-            "version": "0.1.4"
-        },
-        {
-            "cabal_sha256": "188d0b5a0491e8b686b32d9b144c9287760ba333d2509bf3f17e3d846fbc2332",
-            "revision": 0,
-            "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
-            "flags": [
-                "-exe",
-                "+use-cbits"
-            ],
-            "package": "cryptohash-sha256",
-            "source": "hackage",
-            "version": "0.11.102.1"
-        },
-        {
-            "cabal_sha256": "24ac7b5f3d9fa3c2f70262b329f2a75f24e7fd829f88c189b388efa1bcd67eb2",
-            "revision": 5,
-            "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
-            "flags": [
-                "+no-donna",
-                "+test-doctests",
-                "+test-hlint",
-                "+test-properties"
-            ],
-            "package": "ed25519",
-            "source": "hackage",
-            "version": "0.0.5.0"
-        },
-        {
-            "cabal_sha256": "c084c043a40632d3cafcac50fb5eeff84d91edb070a54baa94945f1c976f97c0",
-            "revision": 2,
-            "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
-            "flags": [
-                "+ofd-locking"
-            ],
-            "package": "lukko",
-            "source": "hackage",
-            "version": "0.1.1.3"
-        },
-        {
-            "cabal_sha256": "bc14969ea4adfec6eee20264decf4a07c4002b38b2aa802d58d86b1a2cf7b895",
-            "revision": 5,
-            "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
-            "flags": [
-                "-old-bytestring",
-                "-old-time"
-            ],
-            "package": "tar",
-            "source": "hackage",
-            "version": "0.5.1.1"
-        },
-        {
-            "cabal_sha256": "8214a9d37580f17f8b675109578a5dbe6853559eef156e34dc2233f1123ace33",
-            "revision": 0,
-            "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
-            "flags": [
-                "-bundled-c-zlib",
-                "-non-blocking-ffi",
-                "-pkg-config"
-            ],
-            "package": "zlib",
-            "source": "hackage",
-            "version": "0.6.3.0"
-        },
-        {
-            "cabal_sha256": "1d4b292bd90970f7ef52c72f2ae365f88bd2c6a75627dc34a31d24bc8f53f2e4",
-            "revision": 2,
-            "src_sha256": "bf22cd16dde7d6b7130463f4d7324b64a2964d9ef3f523df97d7cb98544d64a8",
-            "flags": [
-                "+base48",
-                "+cabal-syntax",
-                "+lukko",
-                "-mtl21",
-                "-old-directory",
-                "+use-network-uri"
-            ],
-            "package": "hackage-security",
-            "source": "hackage",
-            "version": "0.6.2.1"
-        },
-        {
-            "cabal_sha256": "0cddd0229d1aac305ea0404409c0bbfab81f075817bd74b8b2929eff58333e55",
-            "revision": 0,
-            "src_sha256": "83606edd356d914c075ecd44f6d5fe91a3b186aa0683c8dd8c9a7e8e22a47600",
-            "flags": [
-                "+containers",
-                "+integer-gmp",
-                "-random-initial-seed"
-            ],
-            "package": "hashable",
-            "source": "hackage",
-            "version": "1.4.0.2"
-        },
-        {
-            "cabal_sha256": "4ff4425c710cddf440dfbac6cd52310bb6b23e17902390ff71c9fc7eaafc4fcc",
-            "revision": 1,
-            "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
-            "flags": [],
-            "package": "regex-base",
-            "source": "hackage",
-            "version": "0.94.0.2"
-        },
-        {
-            "cabal_sha256": "9dbba4b65a3bb6975d9740814be5593c6b2d2d6a0b3febc8ec940edb9a9bbdf4",
-            "revision": 1,
-            "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
-            "flags": [
-                "-_regex-posix-clib"
-            ],
-            "package": "regex-posix",
-            "source": "hackage",
-            "version": "0.96.0.1"
-        },
-        {
-            "cabal_sha256": "2088eb9368b920f80bbe4e3b03c3b8484090208f5c3b31645bd67a9ef7d26db4",
-            "revision": 4,
-            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
-            "flags": [],
-            "package": "resolv",
-            "source": "hackage",
-            "version": "0.1.2.0"
-        },
-        {
-            "cabal_sha256": "b2c634a95ba2a68e0df3ae67d006f0dabb02edbe4dc77b321133551e308ca047",
-            "revision": 1,
-            "src_sha256": "66e3c0b4e2d32287621a3faab6b99c7e03b285a07711f335332aec6b4217bf8b",
-            "flags": [
-                "+transformers-0-4"
-            ],
-            "package": "exceptions",
-            "source": "hackage",
-            "version": "0.10.5"
-        },
-        {
-            "cabal_sha256": "6e9b1b233af80cc0aa17ea858d2641ba146fb11cbcc5970a52649e89d77282e2",
-            "revision": 0,
-            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
-            "flags": [],
-            "package": "safe-exceptions",
-            "source": "hackage",
-            "version": "0.1.7.3"
-        },
-        {
-            "cabal_sha256": "b83dec34a53520de84c6dd3dc7aae45d22409b46eb471c478b98108215a370f0",
-            "revision": 1,
-            "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
-            "flags": [
-                "-bench"
-            ],
-            "package": "async",
-            "source": "hackage",
-            "version": "2.2.4"
-        },
-        {
-            "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
-            "flags": [
-                "+lukko",
-                "+native-dns"
-            ],
-            "package": "cabal-install",
-            "source": "local",
-            "version": "3.9.0.0"
-        }
-    ],
-    "builtin": [
-        {
-            "package": "rts",
-            "version": "1.0"
-        },
-        {
-            "package": "ghc-prim",
-            "version": "0.5.3"
-        },
-        {
-            "package": "integer-gmp",
-            "version": "1.0.2.0"
-        },
-        {
-            "package": "base",
-            "version": "4.12.0.0"
-        },
-        {
-            "package": "array",
-            "version": "0.5.3.0"
-        },
-        {
-            "package": "deepseq",
-            "version": "1.4.4.0"
-        },
-        {
-            "package": "bytestring",
-            "version": "0.10.8.2"
-        },
-        {
-            "package": "containers",
-            "version": "0.6.0.1"
-        },
-        {
-            "package": "binary",
-            "version": "0.8.6.0"
-        },
-        {
-            "package": "filepath",
-            "version": "1.4.2.1"
-        },
-        {
-            "package": "time",
-            "version": "1.8.0.2"
-        },
-        {
-            "package": "unix",
-            "version": "2.7.2.2"
-        },
-        {
-            "package": "transformers",
-            "version": "0.5.6.2"
-        },
-        {
-            "package": "mtl",
-            "version": "2.2.2"
-        },
-        {
-            "package": "text",
-            "version": "1.2.3.1"
-        },
-        {
-            "package": "parsec",
-            "version": "3.1.13.0"
-        },
-        {
-            "package": "pretty",
-            "version": "1.1.3.6"
-        },
-        {
-            "package": "ghc-boot-th",
-            "version": "8.6.5"
-        },
-        {
-            "package": "template-haskell",
-            "version": "2.14.0.0"
-        },
-        {
-            "package": "stm",
-            "version": "2.5.0.0"
-        }
-    ]
-}
diff --git a/bootstrap/linux-8.8.4.json b/bootstrap/linux-8.8.4.json
deleted file mode 100644
index c9a6c9c5ea1..00000000000
--- a/bootstrap/linux-8.8.4.json
+++ /dev/null
@@ -1,408 +0,0 @@
-{
-    "dependencies": [
-        {
-            "cabal_sha256": "1125a0a4be3aafc8da208940f219d4e4df8a0db87d892cc42bb369071855c590",
-            "revision": 0,
-            "src_sha256": "dc2785d6548cec2e80700fab007d3e9467f65d3c58ab3efa21b34d9017cf0efd",
-            "flags": [],
-            "package": "directory",
-            "source": "hackage",
-            "version": "1.3.7.1"
-        },
-        {
-            "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
-            "flags": [],
-            "package": "Cabal-syntax",
-            "source": "local",
-            "version": "3.9.0.0"
-        },
-        {
-            "cabal_sha256": "04df32d9497add5f0b90a27a3eceffa4bad5c2f41d038bd12ed6efc454db3faf",
-            "revision": 0,
-            "src_sha256": "44b31b6cd3129893ac1a007573dedb69dde667fa06ee108526d58f08b1a1f7ab",
-            "flags": [],
-            "package": "process",
-            "source": "hackage",
-            "version": "1.6.15.0"
-        },
-        {
-            "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
-            "flags": [],
-            "package": "Cabal",
-            "source": "local",
-            "version": "3.9.0.0"
-        },
-        {
-            "cabal_sha256": "e3d78b13db9512aeb106e44a334ab42b7aa48d26c097299084084cb8be5c5568",
-            "revision": 0,
-            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
-            "flags": [
-                "-devel"
-            ],
-            "package": "network",
-            "source": "hackage",
-            "version": "3.1.2.7"
-        },
-        {
-            "cabal_sha256": "f65819f74c6ced42b24d9e5053165508c4b6a18271c8e3229dc93b1dc8f7a5ab",
-            "revision": 1,
-            "src_sha256": "6b5059caf6714f47da92953badf2f556119877e09708c14e206b3ae98b8681c6",
-            "flags": [],
-            "package": "th-compat",
-            "source": "hackage",
-            "version": "0.1.3"
-        },
-        {
-            "cabal_sha256": "a4765164ed0a2d1668446eb2e03460ce98645fbf083598c690846af79b7de10d",
-            "revision": 0,
-            "src_sha256": "57856db93608a4d419f681b881c9b8d4448800d5a687587dc37e8a9e0b223584",
-            "flags": [],
-            "package": "network-uri",
-            "source": "hackage",
-            "version": "2.6.4.1"
-        },
-        {
-            "cabal_sha256": "16ee1212245c6e7cf0905b039689b55dbe8386a2b450094055e536d30c89ba76",
-            "revision": 0,
-            "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
-            "flags": [
-                "-conduit10",
-                "+network-uri",
-                "-warn-as-error",
-                "-warp-tests"
-            ],
-            "package": "HTTP",
-            "source": "hackage",
-            "version": "4000.4.1"
-        },
-        {
-            "cabal_sha256": "eb6758d0160d607e0c45dbd6b196f515b9a589fd4f6d2f926929dd5d56282d37",
-            "revision": 0,
-            "src_sha256": "20a21c4b7adb0fd844b25e196241467406a28286b021f9b7a082ab03fa8015eb",
-            "flags": [],
-            "package": "base-orphans",
-            "source": "hackage",
-            "version": "0.8.6"
-        },
-        {
-            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
-            "revision": 0,
-            "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
-            "flags": [],
-            "package": "base16-bytestring",
-            "source": "hackage",
-            "version": "1.0.2.0"
-        },
-        {
-            "cabal_sha256": "50ec0e229255d4c45cbdd568da011311b8887f304b931564886016f4984334d8",
-            "revision": 0,
-            "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
-            "flags": [],
-            "package": "base64-bytestring",
-            "source": "hackage",
-            "version": "1.2.1.0"
-        },
-        {
-            "cabal_sha256": "714a55fd28d3e2533bd5b49e74f604ef8e5d7b06f249c8816f6c54aed431dcf1",
-            "revision": 0,
-            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
-            "flags": [
-                "-optimised-mixer"
-            ],
-            "package": "splitmix",
-            "source": "hackage",
-            "version": "0.1.0.4"
-        },
-        {
-            "cabal_sha256": "dea1f11e5569332dc6c8efaad1cb301016a5587b6754943a49f9de08ae0e56d9",
-            "revision": 0,
-            "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
-            "flags": [],
-            "package": "random",
-            "source": "hackage",
-            "version": "1.2.1.1"
-        },
-        {
-            "cabal_sha256": "4d33a49cd383d50af090f1b888642d10116e43809f9da6023d9fc6f67d2656ee",
-            "revision": 1,
-            "src_sha256": "3e8885ee2f56ad4da940f043ae8f981ee2fe336b5e8e4ba3f7436cff4f526c4a",
-            "flags": [],
-            "package": "edit-distance",
-            "source": "hackage",
-            "version": "0.2.2.1"
-        },
-        {
-            "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
-            "flags": [
-                "-debug-conflict-sets",
-                "-debug-expensive-assertions",
-                "-debug-tracetree"
-            ],
-            "package": "cabal-install-solver",
-            "source": "local",
-            "version": "3.9.0.0"
-        },
-        {
-            "cabal_sha256": "ccce771562c49a2b29a52046ca68c62179e97e8fbeacdae32ca84a85445e8f42",
-            "revision": 0,
-            "src_sha256": "c9fe1bf2904825a65b667251ec644f197b71dc5c209d2d254be5de3d496b0e43",
-            "flags": [
-                "-example"
-            ],
-            "package": "echo",
-            "source": "hackage",
-            "version": "0.1.4"
-        },
-        {
-            "cabal_sha256": "188d0b5a0491e8b686b32d9b144c9287760ba333d2509bf3f17e3d846fbc2332",
-            "revision": 0,
-            "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
-            "flags": [
-                "-exe",
-                "+use-cbits"
-            ],
-            "package": "cryptohash-sha256",
-            "source": "hackage",
-            "version": "0.11.102.1"
-        },
-        {
-            "cabal_sha256": "24ac7b5f3d9fa3c2f70262b329f2a75f24e7fd829f88c189b388efa1bcd67eb2",
-            "revision": 5,
-            "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
-            "flags": [
-                "+no-donna",
-                "+test-doctests",
-                "+test-hlint",
-                "+test-properties"
-            ],
-            "package": "ed25519",
-            "source": "hackage",
-            "version": "0.0.5.0"
-        },
-        {
-            "cabal_sha256": "c084c043a40632d3cafcac50fb5eeff84d91edb070a54baa94945f1c976f97c0",
-            "revision": 2,
-            "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
-            "flags": [
-                "+ofd-locking"
-            ],
-            "package": "lukko",
-            "source": "hackage",
-            "version": "0.1.1.3"
-        },
-        {
-            "cabal_sha256": "bc14969ea4adfec6eee20264decf4a07c4002b38b2aa802d58d86b1a2cf7b895",
-            "revision": 5,
-            "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
-            "flags": [
-                "-old-bytestring",
-                "-old-time"
-            ],
-            "package": "tar",
-            "source": "hackage",
-            "version": "0.5.1.1"
-        },
-        {
-            "cabal_sha256": "8214a9d37580f17f8b675109578a5dbe6853559eef156e34dc2233f1123ace33",
-            "revision": 0,
-            "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
-            "flags": [
-                "-bundled-c-zlib",
-                "-non-blocking-ffi",
-                "-pkg-config"
-            ],
-            "package": "zlib",
-            "source": "hackage",
-            "version": "0.6.3.0"
-        },
-        {
-            "cabal_sha256": "1d4b292bd90970f7ef52c72f2ae365f88bd2c6a75627dc34a31d24bc8f53f2e4",
-            "revision": 2,
-            "src_sha256": "bf22cd16dde7d6b7130463f4d7324b64a2964d9ef3f523df97d7cb98544d64a8",
-            "flags": [
-                "+base48",
-                "+cabal-syntax",
-                "+lukko",
-                "-mtl21",
-                "-old-directory",
-                "+use-network-uri"
-            ],
-            "package": "hackage-security",
-            "source": "hackage",
-            "version": "0.6.2.1"
-        },
-        {
-            "cabal_sha256": "0cddd0229d1aac305ea0404409c0bbfab81f075817bd74b8b2929eff58333e55",
-            "revision": 0,
-            "src_sha256": "83606edd356d914c075ecd44f6d5fe91a3b186aa0683c8dd8c9a7e8e22a47600",
-            "flags": [
-                "+containers",
-                "+integer-gmp",
-                "-random-initial-seed"
-            ],
-            "package": "hashable",
-            "source": "hackage",
-            "version": "1.4.0.2"
-        },
-        {
-            "cabal_sha256": "4ff4425c710cddf440dfbac6cd52310bb6b23e17902390ff71c9fc7eaafc4fcc",
-            "revision": 1,
-            "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
-            "flags": [],
-            "package": "regex-base",
-            "source": "hackage",
-            "version": "0.94.0.2"
-        },
-        {
-            "cabal_sha256": "9dbba4b65a3bb6975d9740814be5593c6b2d2d6a0b3febc8ec940edb9a9bbdf4",
-            "revision": 1,
-            "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
-            "flags": [
-                "-_regex-posix-clib"
-            ],
-            "package": "regex-posix",
-            "source": "hackage",
-            "version": "0.96.0.1"
-        },
-        {
-            "cabal_sha256": "2088eb9368b920f80bbe4e3b03c3b8484090208f5c3b31645bd67a9ef7d26db4",
-            "revision": 4,
-            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
-            "flags": [],
-            "package": "resolv",
-            "source": "hackage",
-            "version": "0.1.2.0"
-        },
-        {
-            "cabal_sha256": "b2c634a95ba2a68e0df3ae67d006f0dabb02edbe4dc77b321133551e308ca047",
-            "revision": 1,
-            "src_sha256": "66e3c0b4e2d32287621a3faab6b99c7e03b285a07711f335332aec6b4217bf8b",
-            "flags": [
-                "+transformers-0-4"
-            ],
-            "package": "exceptions",
-            "source": "hackage",
-            "version": "0.10.5"
-        },
-        {
-            "cabal_sha256": "6e9b1b233af80cc0aa17ea858d2641ba146fb11cbcc5970a52649e89d77282e2",
-            "revision": 0,
-            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
-            "flags": [],
-            "package": "safe-exceptions",
-            "source": "hackage",
-            "version": "0.1.7.3"
-        },
-        {
-            "cabal_sha256": "b83dec34a53520de84c6dd3dc7aae45d22409b46eb471c478b98108215a370f0",
-            "revision": 1,
-            "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
-            "flags": [
-                "-bench"
-            ],
-            "package": "async",
-            "source": "hackage",
-            "version": "2.2.4"
-        },
-        {
-            "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
-            "flags": [
-                "+lukko",
-                "+native-dns"
-            ],
-            "package": "cabal-install",
-            "source": "local",
-            "version": "3.9.0.0"
-        }
-    ],
-    "builtin": [
-        {
-            "package": "rts",
-            "version": "1.0"
-        },
-        {
-            "package": "ghc-prim",
-            "version": "0.5.3"
-        },
-        {
-            "package": "integer-gmp",
-            "version": "1.0.2.0"
-        },
-        {
-            "package": "base",
-            "version": "4.13.0.0"
-        },
-        {
-            "package": "array",
-            "version": "0.5.4.0"
-        },
-        {
-            "package": "deepseq",
-            "version": "1.4.4.0"
-        },
-        {
-            "package": "bytestring",
-            "version": "0.10.10.1"
-        },
-        {
-            "package": "containers",
-            "version": "0.6.2.1"
-        },
-        {
-            "package": "binary",
-            "version": "0.8.7.0"
-        },
-        {
-            "package": "filepath",
-            "version": "1.4.2.1"
-        },
-        {
-            "package": "time",
-            "version": "1.9.3"
-        },
-        {
-            "package": "unix",
-            "version": "2.7.2.2"
-        },
-        {
-            "package": "transformers",
-            "version": "0.5.6.2"
-        },
-        {
-            "package": "mtl",
-            "version": "2.2.2"
-        },
-        {
-            "package": "ghc-boot-th",
-            "version": "8.8.4"
-        },
-        {
-            "package": "pretty",
-            "version": "1.1.3.6"
-        },
-        {
-            "package": "template-haskell",
-            "version": "2.15.0.0"
-        },
-        {
-            "package": "text",
-            "version": "1.2.4.0"
-        },
-        {
-            "package": "parsec",
-            "version": "3.1.14.0"
-        },
-        {
-            "package": "stm",
-            "version": "2.5.0.0"
-        }
-    ]
-}
diff --git a/bootstrap/linux-9.0.2.json b/bootstrap/linux-9.0.2.json
index 753984e7016..e0015b5461b 100644
--- a/bootstrap/linux-9.0.2.json
+++ b/bootstrap/linux-9.0.2.json
@@ -1,74 +1,158 @@
 {
+    "builtin": [
+        {
+            "package": "rts",
+            "version": "1.0.2"
+        },
+        {
+            "package": "ghc-prim",
+            "version": "0.7.0"
+        },
+        {
+            "package": "ghc-bignum",
+            "version": "1.1"
+        },
+        {
+            "package": "base",
+            "version": "4.15.1.0"
+        },
+        {
+            "package": "array",
+            "version": "0.5.4.0"
+        },
+        {
+            "package": "deepseq",
+            "version": "1.4.5.0"
+        },
+        {
+            "package": "bytestring",
+            "version": "0.10.12.1"
+        },
+        {
+            "package": "containers",
+            "version": "0.6.4.1"
+        },
+        {
+            "package": "binary",
+            "version": "0.8.8.0"
+        },
+        {
+            "package": "filepath",
+            "version": "1.4.2.1"
+        },
+        {
+            "package": "time",
+            "version": "1.9.3"
+        },
+        {
+            "package": "unix",
+            "version": "2.7.2.2"
+        },
+        {
+            "package": "transformers",
+            "version": "0.5.6.2"
+        },
+        {
+            "package": "mtl",
+            "version": "2.2.2"
+        },
+        {
+            "package": "ghc-boot-th",
+            "version": "9.0.2"
+        },
+        {
+            "package": "pretty",
+            "version": "1.1.3.6"
+        },
+        {
+            "package": "template-haskell",
+            "version": "2.17.0.0"
+        },
+        {
+            "package": "text",
+            "version": "1.2.5.0"
+        },
+        {
+            "package": "parsec",
+            "version": "3.1.14.0"
+        },
+        {
+            "package": "stm",
+            "version": "2.5.0.0"
+        },
+        {
+            "package": "exceptions",
+            "version": "0.10.4"
+        }
+    ],
     "dependencies": [
         {
             "cabal_sha256": "1125a0a4be3aafc8da208940f219d4e4df8a0db87d892cc42bb369071855c590",
-            "revision": 0,
-            "src_sha256": "dc2785d6548cec2e80700fab007d3e9467f65d3c58ab3efa21b34d9017cf0efd",
             "flags": [],
             "package": "directory",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "dc2785d6548cec2e80700fab007d3e9467f65d3c58ab3efa21b34d9017cf0efd",
             "version": "1.3.7.1"
         },
         {
             "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
             "flags": [],
             "package": "Cabal-syntax",
+            "revision": null,
             "source": "local",
-            "version": "3.9.0.0"
+            "src_sha256": null,
+            "version": "3.10.1.0"
         },
         {
-            "cabal_sha256": "04df32d9497add5f0b90a27a3eceffa4bad5c2f41d038bd12ed6efc454db3faf",
-            "revision": 0,
-            "src_sha256": "44b31b6cd3129893ac1a007573dedb69dde667fa06ee108526d58f08b1a1f7ab",
+            "cabal_sha256": "49d8a7f372d35363011591b253cae4c8db8b9ec594590448e20b7bed7acaee98",
             "flags": [],
             "package": "process",
+            "revision": 0,
             "source": "hackage",
-            "version": "1.6.15.0"
+            "src_sha256": "4c5c454e0f5c864c79b9fabd850307b26d8ac4037e45a6a39ab87e20b583bf06",
+            "version": "1.6.17.0"
         },
         {
             "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
             "flags": [],
             "package": "Cabal",
+            "revision": null,
             "source": "local",
-            "version": "3.9.0.0"
+            "src_sha256": null,
+            "version": "3.10.1.0"
         },
         {
             "cabal_sha256": "e3d78b13db9512aeb106e44a334ab42b7aa48d26c097299084084cb8be5c5568",
-            "revision": 0,
-            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
             "flags": [
                 "-devel"
             ],
             "package": "network",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
             "version": "3.1.2.7"
         },
         {
-            "cabal_sha256": "f65819f74c6ced42b24d9e5053165508c4b6a18271c8e3229dc93b1dc8f7a5ab",
-            "revision": 1,
-            "src_sha256": "6b5059caf6714f47da92953badf2f556119877e09708c14e206b3ae98b8681c6",
+            "cabal_sha256": "6ca77c4e80b4e4109e30549c269631a9cc295c8fc2431ce4123972a5f80f7bfc",
             "flags": [],
             "package": "th-compat",
+            "revision": 0,
             "source": "hackage",
-            "version": "0.1.3"
+            "src_sha256": "d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8",
+            "version": "0.1.4"
         },
         {
-            "cabal_sha256": "a4765164ed0a2d1668446eb2e03460ce98645fbf083598c690846af79b7de10d",
-            "revision": 0,
-            "src_sha256": "57856db93608a4d419f681b881c9b8d4448800d5a687587dc37e8a9e0b223584",
+            "cabal_sha256": "1fde59abf5d82a9666b4415bc2b2e9e33f6c1309074fda12d50410c7dbd95f3b",
             "flags": [],
             "package": "network-uri",
+            "revision": 0,
             "source": "hackage",
-            "version": "2.6.4.1"
+            "src_sha256": "9c188973126e893250b881f20e8811dca06c223c23402b06f7a1f2e995797228",
+            "version": "2.6.4.2"
         },
         {
-            "cabal_sha256": "16ee1212245c6e7cf0905b039689b55dbe8386a2b450094055e536d30c89ba76",
-            "revision": 0,
-            "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
+            "cabal_sha256": "b878d575c470bd1f72d37af6654d924ab2b9489d88de8a71bd74d9d5d726c013",
             "flags": [
                 "-conduit10",
                 "+network-uri",
@@ -76,105 +160,137 @@
                 "-warp-tests"
             ],
             "package": "HTTP",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
             "version": "4000.4.1"
         },
         {
-            "cabal_sha256": "eb6758d0160d607e0c45dbd6b196f515b9a589fd4f6d2f926929dd5d56282d37",
-            "revision": 0,
-            "src_sha256": "20a21c4b7adb0fd844b25e196241467406a28286b021f9b7a082ab03fa8015eb",
+            "cabal_sha256": "58d5514b688ec037f53b9d60097b9d87f6b3847da68f65124987d67222c3a334",
             "flags": [],
             "package": "base-orphans",
+            "revision": 0,
             "source": "hackage",
-            "version": "0.8.6"
+            "src_sha256": "888fd67f0dbe932778f5b170922ce80d0dcab1680ee98f1d6fcc362f20d9e447",
+            "version": "0.8.7"
         },
         {
-            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
+            "cabal_sha256": "2ef1bd3511e82ba56f7f23cd793dd2da84338a1e7c2cbea5b151417afe3baada",
+            "flags": [],
+            "package": "data-array-byte",
+            "revision": 1,
+            "source": "hackage",
+            "src_sha256": "1bb6eca0b3e02d057fe7f4e14c81ef395216f421ab30fdaa1b18017c9c025600",
+            "version": "0.1.0.1"
+        },
+        {
+            "cabal_sha256": "02acedd7ac829b52756fe481a1d53294d8f5d42aaa56df560c62c6cec3587a14",
+            "flags": [
+                "+integer-gmp",
+                "-random-initial-seed"
+            ],
+            "package": "hashable",
             "revision": 0,
-            "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
+            "source": "hackage",
+            "src_sha256": "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8",
+            "version": "1.4.2.0"
+        },
+        {
+            "cabal_sha256": "2b9409023536823233ce3134558565d01b3382e651fa54ac8cb8a99967e023c9",
+            "flags": [
+                "-bench"
+            ],
+            "package": "async",
+            "revision": 2,
+            "source": "hackage",
+            "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
+            "version": "2.2.4"
+        },
+        {
+            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
             "flags": [],
             "package": "base16-bytestring",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
             "version": "1.0.2.0"
         },
         {
             "cabal_sha256": "50ec0e229255d4c45cbdd568da011311b8887f304b931564886016f4984334d8",
-            "revision": 0,
-            "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
             "flags": [],
             "package": "base64-bytestring",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
             "version": "1.2.1.0"
         },
         {
-            "cabal_sha256": "714a55fd28d3e2533bd5b49e74f604ef8e5d7b06f249c8816f6c54aed431dcf1",
-            "revision": 0,
-            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
+            "cabal_sha256": "db25c2e17967aa6b6046ab8b1b96ba3f344ca59a62b60fb6113d51ea305a3d8e",
             "flags": [
                 "-optimised-mixer"
             ],
             "package": "splitmix",
+            "revision": 2,
             "source": "hackage",
+            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
             "version": "0.1.0.4"
         },
         {
             "cabal_sha256": "dea1f11e5569332dc6c8efaad1cb301016a5587b6754943a49f9de08ae0e56d9",
-            "revision": 0,
-            "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
             "flags": [],
             "package": "random",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
             "version": "1.2.1.1"
         },
         {
             "cabal_sha256": "4d33a49cd383d50af090f1b888642d10116e43809f9da6023d9fc6f67d2656ee",
-            "revision": 1,
-            "src_sha256": "3e8885ee2f56ad4da940f043ae8f981ee2fe336b5e8e4ba3f7436cff4f526c4a",
             "flags": [],
             "package": "edit-distance",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "3e8885ee2f56ad4da940f043ae8f981ee2fe336b5e8e4ba3f7436cff4f526c4a",
             "version": "0.2.2.1"
         },
         {
             "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
             "flags": [
                 "-debug-conflict-sets",
                 "-debug-expensive-assertions",
                 "-debug-tracetree"
             ],
             "package": "cabal-install-solver",
+            "revision": null,
             "source": "local",
-            "version": "3.9.0.0"
+            "src_sha256": null,
+            "version": "3.10.1.0"
         },
         {
-            "cabal_sha256": "ccce771562c49a2b29a52046ca68c62179e97e8fbeacdae32ca84a85445e8f42",
-            "revision": 0,
-            "src_sha256": "c9fe1bf2904825a65b667251ec644f197b71dc5c209d2d254be5de3d496b0e43",
+            "cabal_sha256": "facd0c04925ef925ec05243471fd16055229fdf51f64db1a1049de0cc6c6dfc3",
             "flags": [
-                "-example"
+                "-exe",
+                "+use-cbits"
             ],
-            "package": "echo",
+            "package": "cryptohash-sha256",
+            "revision": 1,
             "source": "hackage",
-            "version": "0.1.4"
+            "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
+            "version": "0.11.102.1"
         },
         {
-            "cabal_sha256": "188d0b5a0491e8b686b32d9b144c9287760ba333d2509bf3f17e3d846fbc2332",
-            "revision": 0,
-            "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
+            "cabal_sha256": "ccce771562c49a2b29a52046ca68c62179e97e8fbeacdae32ca84a85445e8f42",
             "flags": [
-                "-exe",
-                "+use-cbits"
+                "-example"
             ],
-            "package": "cryptohash-sha256",
+            "package": "echo",
+            "revision": 0,
             "source": "hackage",
-            "version": "0.11.102.1"
+            "src_sha256": "c9fe1bf2904825a65b667251ec644f197b71dc5c209d2d254be5de3d496b0e43",
+            "version": "0.1.4"
         },
         {
-            "cabal_sha256": "24ac7b5f3d9fa3c2f70262b329f2a75f24e7fd829f88c189b388efa1bcd67eb2",
-            "revision": 5,
-            "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
+            "cabal_sha256": "885c9e2410e5d91a08b199897df0867fecedf818216d7329a2d43a512833dd63",
             "flags": [
                 "+no-donna",
                 "+test-doctests",
@@ -182,49 +298,49 @@
                 "+test-properties"
             ],
             "package": "ed25519",
+            "revision": 6,
             "source": "hackage",
+            "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
             "version": "0.0.5.0"
         },
         {
-            "cabal_sha256": "c084c043a40632d3cafcac50fb5eeff84d91edb070a54baa94945f1c976f97c0",
-            "revision": 2,
-            "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
+            "cabal_sha256": "efd4c08c4df1ac3f423858a834c0e3b5b4909febda66a901d12a8e1d57bddaa8",
             "flags": [
                 "+ofd-locking"
             ],
             "package": "lukko",
+            "revision": 3,
             "source": "hackage",
+            "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
             "version": "0.1.1.3"
         },
         {
             "cabal_sha256": "bc14969ea4adfec6eee20264decf4a07c4002b38b2aa802d58d86b1a2cf7b895",
-            "revision": 5,
-            "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "flags": [
                 "-old-bytestring",
                 "-old-time"
             ],
             "package": "tar",
+            "revision": 5,
             "source": "hackage",
+            "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "version": "0.5.1.1"
         },
         {
-            "cabal_sha256": "8214a9d37580f17f8b675109578a5dbe6853559eef156e34dc2233f1123ace33",
-            "revision": 0,
-            "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
+            "cabal_sha256": "9adce39e4ca0b7a87d45df0a243134816c57059a08e28cff5469c98ae1f54dfc",
             "flags": [
                 "-bundled-c-zlib",
                 "-non-blocking-ffi",
                 "-pkg-config"
             ],
             "package": "zlib",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
             "version": "0.6.3.0"
         },
         {
-            "cabal_sha256": "1d4b292bd90970f7ef52c72f2ae365f88bd2c6a75627dc34a31d24bc8f53f2e4",
-            "revision": 2,
-            "src_sha256": "bf22cd16dde7d6b7130463f4d7324b64a2964d9ef3f523df97d7cb98544d64a8",
+            "cabal_sha256": "18405474813b37ddfc27778c88c549f444661432224999068417dfab3471281e",
             "flags": [
                 "+base48",
                 "+cabal-syntax",
@@ -234,168 +350,60 @@
                 "+use-network-uri"
             ],
             "package": "hackage-security",
+            "revision": 2,
             "source": "hackage",
-            "version": "0.6.2.1"
-        },
-        {
-            "cabal_sha256": "0cddd0229d1aac305ea0404409c0bbfab81f075817bd74b8b2929eff58333e55",
-            "revision": 0,
-            "src_sha256": "83606edd356d914c075ecd44f6d5fe91a3b186aa0683c8dd8c9a7e8e22a47600",
-            "flags": [
-                "+containers",
-                "+integer-gmp",
-                "-random-initial-seed"
-            ],
-            "package": "hashable",
-            "source": "hackage",
-            "version": "1.4.0.2"
+            "src_sha256": "52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066",
+            "version": "0.6.2.3"
         },
         {
             "cabal_sha256": "4ff4425c710cddf440dfbac6cd52310bb6b23e17902390ff71c9fc7eaafc4fcc",
-            "revision": 1,
-            "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
             "flags": [],
             "package": "regex-base",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
             "version": "0.94.0.2"
         },
         {
             "cabal_sha256": "9dbba4b65a3bb6975d9740814be5593c6b2d2d6a0b3febc8ec940edb9a9bbdf4",
-            "revision": 1,
-            "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
             "flags": [
                 "-_regex-posix-clib"
             ],
             "package": "regex-posix",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
             "version": "0.96.0.1"
         },
         {
-            "cabal_sha256": "2088eb9368b920f80bbe4e3b03c3b8484090208f5c3b31645bd67a9ef7d26db4",
-            "revision": 4,
-            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
+            "cabal_sha256": "61e2d98ff634b8b4b3db467772420c0f9c79c2da9ddf3d2daeb2af2417f2c535",
             "flags": [],
             "package": "resolv",
+            "revision": 5,
             "source": "hackage",
+            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
             "version": "0.1.2.0"
         },
         {
             "cabal_sha256": "6e9b1b233af80cc0aa17ea858d2641ba146fb11cbcc5970a52649e89d77282e2",
-            "revision": 0,
-            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
             "flags": [],
             "package": "safe-exceptions",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
             "version": "0.1.7.3"
         },
-        {
-            "cabal_sha256": "b83dec34a53520de84c6dd3dc7aae45d22409b46eb471c478b98108215a370f0",
-            "revision": 1,
-            "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
-            "flags": [
-                "-bench"
-            ],
-            "package": "async",
-            "source": "hackage",
-            "version": "2.2.4"
-        },
         {
             "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
             "flags": [
                 "+lukko",
                 "+native-dns"
             ],
             "package": "cabal-install",
+            "revision": null,
             "source": "local",
-            "version": "3.9.0.0"
-        }
-    ],
-    "builtin": [
-        {
-            "package": "rts",
-            "version": "1.0.2"
-        },
-        {
-            "package": "ghc-prim",
-            "version": "0.7.0"
-        },
-        {
-            "package": "ghc-bignum",
-            "version": "1.1"
-        },
-        {
-            "package": "base",
-            "version": "4.15.1.0"
-        },
-        {
-            "package": "array",
-            "version": "0.5.4.0"
-        },
-        {
-            "package": "deepseq",
-            "version": "1.4.5.0"
-        },
-        {
-            "package": "bytestring",
-            "version": "0.10.12.1"
-        },
-        {
-            "package": "containers",
-            "version": "0.6.4.1"
-        },
-        {
-            "package": "binary",
-            "version": "0.8.8.0"
-        },
-        {
-            "package": "filepath",
-            "version": "1.4.2.1"
-        },
-        {
-            "package": "time",
-            "version": "1.9.3"
-        },
-        {
-            "package": "unix",
-            "version": "2.7.2.2"
-        },
-        {
-            "package": "transformers",
-            "version": "0.5.6.2"
-        },
-        {
-            "package": "mtl",
-            "version": "2.2.2"
-        },
-        {
-            "package": "ghc-boot-th",
-            "version": "9.0.2"
-        },
-        {
-            "package": "pretty",
-            "version": "1.1.3.6"
-        },
-        {
-            "package": "template-haskell",
-            "version": "2.17.0.0"
-        },
-        {
-            "package": "text",
-            "version": "1.2.5.0"
-        },
-        {
-            "package": "parsec",
-            "version": "3.1.14.0"
-        },
-        {
-            "package": "stm",
-            "version": "2.5.0.0"
-        },
-        {
-            "package": "exceptions",
-            "version": "0.10.4"
+            "src_sha256": null,
+            "version": "3.10.1.0"
         }
     ]
 }
diff --git a/bootstrap/linux-9.2.3.json b/bootstrap/linux-9.2.6.json
similarity index 80%
rename from bootstrap/linux-9.2.3.json
rename to bootstrap/linux-9.2.6.json
index 98d7d689c1f..c1eab1720e7 100644
--- a/bootstrap/linux-9.2.3.json
+++ b/bootstrap/linux-9.2.6.json
@@ -1,74 +1,158 @@
 {
+    "builtin": [
+        {
+            "package": "rts",
+            "version": "1.0.2"
+        },
+        {
+            "package": "ghc-prim",
+            "version": "0.8.0"
+        },
+        {
+            "package": "ghc-bignum",
+            "version": "1.2"
+        },
+        {
+            "package": "base",
+            "version": "4.16.4.0"
+        },
+        {
+            "package": "array",
+            "version": "0.5.4.0"
+        },
+        {
+            "package": "deepseq",
+            "version": "1.4.6.1"
+        },
+        {
+            "package": "ghc-boot-th",
+            "version": "9.2.6"
+        },
+        {
+            "package": "pretty",
+            "version": "1.1.3.6"
+        },
+        {
+            "package": "template-haskell",
+            "version": "2.18.0.0"
+        },
+        {
+            "package": "bytestring",
+            "version": "0.11.4.0"
+        },
+        {
+            "package": "containers",
+            "version": "0.6.5.1"
+        },
+        {
+            "package": "binary",
+            "version": "0.8.9.0"
+        },
+        {
+            "package": "filepath",
+            "version": "1.4.2.2"
+        },
+        {
+            "package": "time",
+            "version": "1.11.1.1"
+        },
+        {
+            "package": "unix",
+            "version": "2.7.2.2"
+        },
+        {
+            "package": "transformers",
+            "version": "0.5.6.2"
+        },
+        {
+            "package": "mtl",
+            "version": "2.2.2"
+        },
+        {
+            "package": "text",
+            "version": "1.2.5.0"
+        },
+        {
+            "package": "parsec",
+            "version": "3.1.15.0"
+        },
+        {
+            "package": "stm",
+            "version": "2.5.0.2"
+        },
+        {
+            "package": "exceptions",
+            "version": "0.10.4"
+        }
+    ],
     "dependencies": [
         {
             "cabal_sha256": "1125a0a4be3aafc8da208940f219d4e4df8a0db87d892cc42bb369071855c590",
-            "revision": 0,
-            "src_sha256": "dc2785d6548cec2e80700fab007d3e9467f65d3c58ab3efa21b34d9017cf0efd",
             "flags": [],
             "package": "directory",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "dc2785d6548cec2e80700fab007d3e9467f65d3c58ab3efa21b34d9017cf0efd",
             "version": "1.3.7.1"
         },
         {
             "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
             "flags": [],
             "package": "Cabal-syntax",
+            "revision": null,
             "source": "local",
-            "version": "3.9.0.0"
+            "src_sha256": null,
+            "version": "3.10.1.0"
         },
         {
-            "cabal_sha256": "04df32d9497add5f0b90a27a3eceffa4bad5c2f41d038bd12ed6efc454db3faf",
-            "revision": 0,
-            "src_sha256": "44b31b6cd3129893ac1a007573dedb69dde667fa06ee108526d58f08b1a1f7ab",
+            "cabal_sha256": "49d8a7f372d35363011591b253cae4c8db8b9ec594590448e20b7bed7acaee98",
             "flags": [],
             "package": "process",
+            "revision": 0,
             "source": "hackage",
-            "version": "1.6.15.0"
+            "src_sha256": "4c5c454e0f5c864c79b9fabd850307b26d8ac4037e45a6a39ab87e20b583bf06",
+            "version": "1.6.17.0"
         },
         {
             "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
             "flags": [],
             "package": "Cabal",
+            "revision": null,
             "source": "local",
-            "version": "3.9.0.0"
+            "src_sha256": null,
+            "version": "3.10.1.0"
         },
         {
             "cabal_sha256": "e3d78b13db9512aeb106e44a334ab42b7aa48d26c097299084084cb8be5c5568",
-            "revision": 0,
-            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
             "flags": [
                 "-devel"
             ],
             "package": "network",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
             "version": "3.1.2.7"
         },
         {
-            "cabal_sha256": "f65819f74c6ced42b24d9e5053165508c4b6a18271c8e3229dc93b1dc8f7a5ab",
-            "revision": 1,
-            "src_sha256": "6b5059caf6714f47da92953badf2f556119877e09708c14e206b3ae98b8681c6",
+            "cabal_sha256": "6ca77c4e80b4e4109e30549c269631a9cc295c8fc2431ce4123972a5f80f7bfc",
             "flags": [],
             "package": "th-compat",
+            "revision": 0,
             "source": "hackage",
-            "version": "0.1.3"
+            "src_sha256": "d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8",
+            "version": "0.1.4"
         },
         {
-            "cabal_sha256": "a4765164ed0a2d1668446eb2e03460ce98645fbf083598c690846af79b7de10d",
-            "revision": 0,
-            "src_sha256": "57856db93608a4d419f681b881c9b8d4448800d5a687587dc37e8a9e0b223584",
+            "cabal_sha256": "1fde59abf5d82a9666b4415bc2b2e9e33f6c1309074fda12d50410c7dbd95f3b",
             "flags": [],
             "package": "network-uri",
+            "revision": 0,
             "source": "hackage",
-            "version": "2.6.4.1"
+            "src_sha256": "9c188973126e893250b881f20e8811dca06c223c23402b06f7a1f2e995797228",
+            "version": "2.6.4.2"
         },
         {
-            "cabal_sha256": "16ee1212245c6e7cf0905b039689b55dbe8386a2b450094055e536d30c89ba76",
-            "revision": 0,
-            "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
+            "cabal_sha256": "b878d575c470bd1f72d37af6654d924ab2b9489d88de8a71bd74d9d5d726c013",
             "flags": [
                 "-conduit10",
                 "+network-uri",
@@ -76,96 +160,128 @@
                 "-warp-tests"
             ],
             "package": "HTTP",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
             "version": "4000.4.1"
         },
         {
-            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
+            "cabal_sha256": "2ef1bd3511e82ba56f7f23cd793dd2da84338a1e7c2cbea5b151417afe3baada",
+            "flags": [],
+            "package": "data-array-byte",
+            "revision": 1,
+            "source": "hackage",
+            "src_sha256": "1bb6eca0b3e02d057fe7f4e14c81ef395216f421ab30fdaa1b18017c9c025600",
+            "version": "0.1.0.1"
+        },
+        {
+            "cabal_sha256": "02acedd7ac829b52756fe481a1d53294d8f5d42aaa56df560c62c6cec3587a14",
+            "flags": [
+                "+integer-gmp",
+                "-random-initial-seed"
+            ],
+            "package": "hashable",
             "revision": 0,
-            "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
+            "source": "hackage",
+            "src_sha256": "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8",
+            "version": "1.4.2.0"
+        },
+        {
+            "cabal_sha256": "2b9409023536823233ce3134558565d01b3382e651fa54ac8cb8a99967e023c9",
+            "flags": [
+                "-bench"
+            ],
+            "package": "async",
+            "revision": 2,
+            "source": "hackage",
+            "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
+            "version": "2.2.4"
+        },
+        {
+            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
             "flags": [],
             "package": "base16-bytestring",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
             "version": "1.0.2.0"
         },
         {
             "cabal_sha256": "50ec0e229255d4c45cbdd568da011311b8887f304b931564886016f4984334d8",
-            "revision": 0,
-            "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
             "flags": [],
             "package": "base64-bytestring",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
             "version": "1.2.1.0"
         },
         {
-            "cabal_sha256": "714a55fd28d3e2533bd5b49e74f604ef8e5d7b06f249c8816f6c54aed431dcf1",
-            "revision": 0,
-            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
+            "cabal_sha256": "db25c2e17967aa6b6046ab8b1b96ba3f344ca59a62b60fb6113d51ea305a3d8e",
             "flags": [
                 "-optimised-mixer"
             ],
             "package": "splitmix",
+            "revision": 2,
             "source": "hackage",
+            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
             "version": "0.1.0.4"
         },
         {
             "cabal_sha256": "dea1f11e5569332dc6c8efaad1cb301016a5587b6754943a49f9de08ae0e56d9",
-            "revision": 0,
-            "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
             "flags": [],
             "package": "random",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
             "version": "1.2.1.1"
         },
         {
             "cabal_sha256": "4d33a49cd383d50af090f1b888642d10116e43809f9da6023d9fc6f67d2656ee",
-            "revision": 1,
-            "src_sha256": "3e8885ee2f56ad4da940f043ae8f981ee2fe336b5e8e4ba3f7436cff4f526c4a",
             "flags": [],
             "package": "edit-distance",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "3e8885ee2f56ad4da940f043ae8f981ee2fe336b5e8e4ba3f7436cff4f526c4a",
             "version": "0.2.2.1"
         },
         {
             "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
             "flags": [
                 "-debug-conflict-sets",
                 "-debug-expensive-assertions",
                 "-debug-tracetree"
             ],
             "package": "cabal-install-solver",
+            "revision": null,
             "source": "local",
-            "version": "3.9.0.0"
+            "src_sha256": null,
+            "version": "3.10.1.0"
         },
         {
-            "cabal_sha256": "ccce771562c49a2b29a52046ca68c62179e97e8fbeacdae32ca84a85445e8f42",
-            "revision": 0,
-            "src_sha256": "c9fe1bf2904825a65b667251ec644f197b71dc5c209d2d254be5de3d496b0e43",
+            "cabal_sha256": "facd0c04925ef925ec05243471fd16055229fdf51f64db1a1049de0cc6c6dfc3",
             "flags": [
-                "-example"
+                "-exe",
+                "+use-cbits"
             ],
-            "package": "echo",
+            "package": "cryptohash-sha256",
+            "revision": 1,
             "source": "hackage",
-            "version": "0.1.4"
+            "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
+            "version": "0.11.102.1"
         },
         {
-            "cabal_sha256": "188d0b5a0491e8b686b32d9b144c9287760ba333d2509bf3f17e3d846fbc2332",
-            "revision": 0,
-            "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
+            "cabal_sha256": "ccce771562c49a2b29a52046ca68c62179e97e8fbeacdae32ca84a85445e8f42",
             "flags": [
-                "-exe",
-                "+use-cbits"
+                "-example"
             ],
-            "package": "cryptohash-sha256",
+            "package": "echo",
+            "revision": 0,
             "source": "hackage",
-            "version": "0.11.102.1"
+            "src_sha256": "c9fe1bf2904825a65b667251ec644f197b71dc5c209d2d254be5de3d496b0e43",
+            "version": "0.1.4"
         },
         {
-            "cabal_sha256": "24ac7b5f3d9fa3c2f70262b329f2a75f24e7fd829f88c189b388efa1bcd67eb2",
-            "revision": 5,
-            "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
+            "cabal_sha256": "885c9e2410e5d91a08b199897df0867fecedf818216d7329a2d43a512833dd63",
             "flags": [
                 "+no-donna",
                 "+test-doctests",
@@ -173,49 +289,49 @@
                 "+test-properties"
             ],
             "package": "ed25519",
+            "revision": 6,
             "source": "hackage",
+            "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
             "version": "0.0.5.0"
         },
         {
-            "cabal_sha256": "c084c043a40632d3cafcac50fb5eeff84d91edb070a54baa94945f1c976f97c0",
-            "revision": 2,
-            "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
+            "cabal_sha256": "efd4c08c4df1ac3f423858a834c0e3b5b4909febda66a901d12a8e1d57bddaa8",
             "flags": [
                 "+ofd-locking"
             ],
             "package": "lukko",
+            "revision": 3,
             "source": "hackage",
+            "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
             "version": "0.1.1.3"
         },
         {
             "cabal_sha256": "bc14969ea4adfec6eee20264decf4a07c4002b38b2aa802d58d86b1a2cf7b895",
-            "revision": 5,
-            "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "flags": [
                 "-old-bytestring",
                 "-old-time"
             ],
             "package": "tar",
+            "revision": 5,
             "source": "hackage",
+            "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "version": "0.5.1.1"
         },
         {
-            "cabal_sha256": "8214a9d37580f17f8b675109578a5dbe6853559eef156e34dc2233f1123ace33",
-            "revision": 0,
-            "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
+            "cabal_sha256": "9adce39e4ca0b7a87d45df0a243134816c57059a08e28cff5469c98ae1f54dfc",
             "flags": [
                 "-bundled-c-zlib",
                 "-non-blocking-ffi",
                 "-pkg-config"
             ],
             "package": "zlib",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
             "version": "0.6.3.0"
         },
         {
-            "cabal_sha256": "1d4b292bd90970f7ef52c72f2ae365f88bd2c6a75627dc34a31d24bc8f53f2e4",
-            "revision": 2,
-            "src_sha256": "bf22cd16dde7d6b7130463f4d7324b64a2964d9ef3f523df97d7cb98544d64a8",
+            "cabal_sha256": "18405474813b37ddfc27778c88c549f444661432224999068417dfab3471281e",
             "flags": [
                 "+base48",
                 "+cabal-syntax",
@@ -225,168 +341,60 @@
                 "+use-network-uri"
             ],
             "package": "hackage-security",
+            "revision": 2,
             "source": "hackage",
-            "version": "0.6.2.1"
-        },
-        {
-            "cabal_sha256": "0cddd0229d1aac305ea0404409c0bbfab81f075817bd74b8b2929eff58333e55",
-            "revision": 0,
-            "src_sha256": "83606edd356d914c075ecd44f6d5fe91a3b186aa0683c8dd8c9a7e8e22a47600",
-            "flags": [
-                "+containers",
-                "+integer-gmp",
-                "-random-initial-seed"
-            ],
-            "package": "hashable",
-            "source": "hackage",
-            "version": "1.4.0.2"
+            "src_sha256": "52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066",
+            "version": "0.6.2.3"
         },
         {
             "cabal_sha256": "4ff4425c710cddf440dfbac6cd52310bb6b23e17902390ff71c9fc7eaafc4fcc",
-            "revision": 1,
-            "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
             "flags": [],
             "package": "regex-base",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
             "version": "0.94.0.2"
         },
         {
             "cabal_sha256": "9dbba4b65a3bb6975d9740814be5593c6b2d2d6a0b3febc8ec940edb9a9bbdf4",
-            "revision": 1,
-            "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
             "flags": [
                 "-_regex-posix-clib"
             ],
             "package": "regex-posix",
+            "revision": 1,
             "source": "hackage",
+            "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
             "version": "0.96.0.1"
         },
         {
-            "cabal_sha256": "2088eb9368b920f80bbe4e3b03c3b8484090208f5c3b31645bd67a9ef7d26db4",
-            "revision": 4,
-            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
+            "cabal_sha256": "61e2d98ff634b8b4b3db467772420c0f9c79c2da9ddf3d2daeb2af2417f2c535",
             "flags": [],
             "package": "resolv",
+            "revision": 5,
             "source": "hackage",
+            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
             "version": "0.1.2.0"
         },
         {
             "cabal_sha256": "6e9b1b233af80cc0aa17ea858d2641ba146fb11cbcc5970a52649e89d77282e2",
-            "revision": 0,
-            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
             "flags": [],
             "package": "safe-exceptions",
+            "revision": 0,
             "source": "hackage",
+            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
             "version": "0.1.7.3"
         },
-        {
-            "cabal_sha256": "b83dec34a53520de84c6dd3dc7aae45d22409b46eb471c478b98108215a370f0",
-            "revision": 1,
-            "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
-            "flags": [
-                "-bench"
-            ],
-            "package": "async",
-            "source": "hackage",
-            "version": "2.2.4"
-        },
         {
             "cabal_sha256": null,
-            "revision": null,
-            "src_sha256": null,
             "flags": [
                 "+lukko",
                 "+native-dns"
             ],
             "package": "cabal-install",
+            "revision": null,
             "source": "local",
-            "version": "3.9.0.0"
-        }
-    ],
-    "builtin": [
-        {
-            "package": "rts",
-            "version": "1.0.2"
-        },
-        {
-            "package": "ghc-prim",
-            "version": "0.8.0"
-        },
-        {
-            "package": "ghc-bignum",
-            "version": "1.2"
-        },
-        {
-            "package": "base",
-            "version": "4.16.2.0"
-        },
-        {
-            "package": "array",
-            "version": "0.5.4.0"
-        },
-        {
-            "package": "deepseq",
-            "version": "1.4.6.1"
-        },
-        {
-            "package": "ghc-boot-th",
-            "version": "9.2.3"
-        },
-        {
-            "package": "pretty",
-            "version": "1.1.3.6"
-        },
-        {
-            "package": "template-haskell",
-            "version": "2.18.0.0"
-        },
-        {
-            "package": "bytestring",
-            "version": "0.11.3.1"
-        },
-        {
-            "package": "containers",
-            "version": "0.6.5.1"
-        },
-        {
-            "package": "binary",
-            "version": "0.8.9.0"
-        },
-        {
-            "package": "filepath",
-            "version": "1.4.2.2"
-        },
-        {
-            "package": "time",
-            "version": "1.11.1.1"
-        },
-        {
-            "package": "unix",
-            "version": "2.7.2.2"
-        },
-        {
-            "package": "transformers",
-            "version": "0.5.6.2"
-        },
-        {
-            "package": "mtl",
-            "version": "2.2.2"
-        },
-        {
-            "package": "text",
-            "version": "1.2.5.0"
-        },
-        {
-            "package": "parsec",
-            "version": "3.1.15.0"
-        },
-        {
-            "package": "stm",
-            "version": "2.5.0.2"
-        },
-        {
-            "package": "exceptions",
-            "version": "0.10.4"
+            "src_sha256": null,
+            "version": "3.10.1.0"
         }
     ]
 }
diff --git a/bootstrap/linux-9.4.4.json b/bootstrap/linux-9.4.4.json
index 342772b24c5..33c80f8b821 100644
--- a/bootstrap/linux-9.4.4.json
+++ b/bootstrap/linux-9.4.4.json
@@ -1 +1,381 @@
-{"builtin":[{"package":"rts","version":"1.0.2"},{"package":"ghc-prim","version":"0.9.0"},{"package":"ghc-bignum","version":"1.3"},{"package":"base","version":"4.17.0.0"},{"package":"array","version":"0.5.4.0"},{"package":"deepseq","version":"1.4.8.0"},{"package":"ghc-boot-th","version":"9.4.4"},{"package":"pretty","version":"1.1.3.6"},{"package":"template-haskell","version":"2.19.0.0"},{"package":"bytestring","version":"0.11.3.1"},{"package":"containers","version":"0.6.6"},{"package":"binary","version":"0.8.9.1"},{"package":"filepath","version":"1.4.2.2"},{"package":"time","version":"1.12.2"},{"package":"unix","version":"2.7.3"},{"package":"directory","version":"1.3.7.1"},{"package":"transformers","version":"0.5.6.2"},{"package":"mtl","version":"2.2.2"},{"package":"text","version":"2.0.1"},{"package":"parsec","version":"3.1.15.0"},{"package":"process","version":"1.6.16.0"},{"package":"stm","version":"2.5.1.0"},{"package":"exceptions","version":"0.10.5"}],"dependencies":[{"cabal_sha256":null,"flags":[],"package":"Cabal-syntax","revision":null,"source":"local","src_sha256":null,"version":"3.9.0.0"},{"cabal_sha256":null,"flags":[],"package":"Cabal","revision":null,"source":"local","src_sha256":null,"version":"3.9.0.0"},{"cabal_sha256":"db25c2e17967aa6b6046ab8b1b96ba3f344ca59a62b60fb6113d51ea305a3d8e","flags":["-optimised-mixer"],"package":"splitmix","revision":2,"source":"hackage","src_sha256":"6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa","version":"0.1.0.4"},{"cabal_sha256":"dea1f11e5569332dc6c8efaad1cb301016a5587b6754943a49f9de08ae0e56d9","flags":[],"package":"random","revision":0,"source":"hackage","src_sha256":"3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76","version":"1.2.1.1"},{"cabal_sha256":"02acedd7ac829b52756fe481a1d53294d8f5d42aaa56df560c62c6cec3587a14","flags":["+integer-gmp","-random-initial-seed"],"package":"hashable","revision":0,"source":"hackage","src_sha256":"1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8","version":"1.4.2.0"},{"cabal_sha256":"2b9409023536823233ce3134558565d01b3382e651fa54ac8cb8a99967e023c9","flags":["-bench"],"package":"async","revision":2,"source":"hackage","src_sha256":"484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725","version":"2.2.4"},{"cabal_sha256":"bc14969ea4adfec6eee20264decf4a07c4002b38b2aa802d58d86b1a2cf7b895","flags":["-old-bytestring","-old-time"],"package":"tar","revision":5,"source":"hackage","src_sha256":"b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de","version":"0.5.1.1"},{"cabal_sha256":"e3d78b13db9512aeb106e44a334ab42b7aa48d26c097299084084cb8be5c5568","flags":["-devel"],"package":"network","revision":0,"source":"hackage","src_sha256":"7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85","version":"3.1.2.7"},{"cabal_sha256":"6ca77c4e80b4e4109e30549c269631a9cc295c8fc2431ce4123972a5f80f7bfc","flags":[],"package":"th-compat","revision":0,"source":"hackage","src_sha256":"d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8","version":"0.1.4"},{"cabal_sha256":"1fde59abf5d82a9666b4415bc2b2e9e33f6c1309074fda12d50410c7dbd95f3b","flags":[],"package":"network-uri","revision":0,"source":"hackage","src_sha256":"9c188973126e893250b881f20e8811dca06c223c23402b06f7a1f2e995797228","version":"2.6.4.2"},{"cabal_sha256":"b878d575c470bd1f72d37af6654d924ab2b9489d88de8a71bd74d9d5d726c013","flags":["-conduit10","+network-uri","-warn-as-error","-warp-tests"],"package":"HTTP","revision":1,"source":"hackage","src_sha256":"df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453","version":"4000.4.1"},{"cabal_sha256":"64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a","flags":[],"package":"base16-bytestring","revision":0,"source":"hackage","src_sha256":"1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784","version":"1.0.2.0"},{"cabal_sha256":"50ec0e229255d4c45cbdd568da011311b8887f304b931564886016f4984334d8","flags":[],"package":"base64-bytestring","revision":0,"source":"hackage","src_sha256":"fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9","version":"1.2.1.0"},{"cabal_sha256":"4d33a49cd383d50af090f1b888642d10116e43809f9da6023d9fc6f67d2656ee","flags":[],"package":"edit-distance","revision":1,"source":"hackage","src_sha256":"3e8885ee2f56ad4da940f043ae8f981ee2fe336b5e8e4ba3f7436cff4f526c4a","version":"0.2.2.1"},{"cabal_sha256":null,"flags":["-debug-conflict-sets","-debug-expensive-assertions","-debug-tracetree"],"package":"cabal-install-solver","revision":null,"source":"local","src_sha256":null,"version":"3.9.0.0"},{"cabal_sha256":"facd0c04925ef925ec05243471fd16055229fdf51f64db1a1049de0cc6c6dfc3","flags":["-exe","+use-cbits"],"package":"cryptohash-sha256","revision":1,"source":"hackage","src_sha256":"73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6","version":"0.11.102.1"},{"cabal_sha256":"ccce771562c49a2b29a52046ca68c62179e97e8fbeacdae32ca84a85445e8f42","flags":["-example"],"package":"echo","revision":0,"source":"hackage","src_sha256":"c9fe1bf2904825a65b667251ec644f197b71dc5c209d2d254be5de3d496b0e43","version":"0.1.4"},{"cabal_sha256":"885c9e2410e5d91a08b199897df0867fecedf818216d7329a2d43a512833dd63","flags":["+no-donna","+test-doctests","+test-hlint","+test-properties"],"package":"ed25519","revision":6,"source":"hackage","src_sha256":"d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d","version":"0.0.5.0"},{"cabal_sha256":"efd4c08c4df1ac3f423858a834c0e3b5b4909febda66a901d12a8e1d57bddaa8","flags":["+ofd-locking"],"package":"lukko","revision":3,"source":"hackage","src_sha256":"a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f","version":"0.1.1.3"},{"cabal_sha256":"9adce39e4ca0b7a87d45df0a243134816c57059a08e28cff5469c98ae1f54dfc","flags":["-bundled-c-zlib","-non-blocking-ffi","-pkg-config"],"package":"zlib","revision":1,"source":"hackage","src_sha256":"9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da","version":"0.6.3.0"},{"cabal_sha256":"64fc60f3f4d02047c54956b6976c0e4fc72722891c6875ab10d95359bc00355a","flags":["+base48","+cabal-syntax","+lukko","-mtl21","-old-directory","+use-network-uri"],"package":"hackage-security","revision":0,"source":"hackage","src_sha256":"52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066","version":"0.6.2.3"},{"cabal_sha256":"4ff4425c710cddf440dfbac6cd52310bb6b23e17902390ff71c9fc7eaafc4fcc","flags":[],"package":"regex-base","revision":1,"source":"hackage","src_sha256":"7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1","version":"0.94.0.2"},{"cabal_sha256":"9dbba4b65a3bb6975d9740814be5593c6b2d2d6a0b3febc8ec940edb9a9bbdf4","flags":["-_regex-posix-clib"],"package":"regex-posix","revision":1,"source":"hackage","src_sha256":"c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c","version":"0.96.0.1"},{"cabal_sha256":"61e2d98ff634b8b4b3db467772420c0f9c79c2da9ddf3d2daeb2af2417f2c535","flags":[],"package":"resolv","revision":5,"source":"hackage","src_sha256":"81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671","version":"0.1.2.0"},{"cabal_sha256":"6e9b1b233af80cc0aa17ea858d2641ba146fb11cbcc5970a52649e89d77282e2","flags":[],"package":"safe-exceptions","revision":0,"source":"hackage","src_sha256":"91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf","version":"0.1.7.3"},{"cabal_sha256":null,"flags":["+lukko","+native-dns"],"package":"cabal-install","revision":null,"source":"local","src_sha256":null,"version":"3.9.0.0"}]}
+{
+    "builtin": [
+        {
+            "package": "rts",
+            "version": "1.0.2"
+        },
+        {
+            "package": "ghc-prim",
+            "version": "0.9.0"
+        },
+        {
+            "package": "ghc-bignum",
+            "version": "1.3"
+        },
+        {
+            "package": "base",
+            "version": "4.17.0.0"
+        },
+        {
+            "package": "array",
+            "version": "0.5.4.0"
+        },
+        {
+            "package": "deepseq",
+            "version": "1.4.8.0"
+        },
+        {
+            "package": "ghc-boot-th",
+            "version": "9.4.4"
+        },
+        {
+            "package": "pretty",
+            "version": "1.1.3.6"
+        },
+        {
+            "package": "template-haskell",
+            "version": "2.19.0.0"
+        },
+        {
+            "package": "bytestring",
+            "version": "0.11.3.1"
+        },
+        {
+            "package": "containers",
+            "version": "0.6.6"
+        },
+        {
+            "package": "binary",
+            "version": "0.8.9.1"
+        },
+        {
+            "package": "filepath",
+            "version": "1.4.2.2"
+        },
+        {
+            "package": "time",
+            "version": "1.12.2"
+        },
+        {
+            "package": "unix",
+            "version": "2.7.3"
+        },
+        {
+            "package": "directory",
+            "version": "1.3.7.1"
+        },
+        {
+            "package": "transformers",
+            "version": "0.5.6.2"
+        },
+        {
+            "package": "mtl",
+            "version": "2.2.2"
+        },
+        {
+            "package": "text",
+            "version": "2.0.1"
+        },
+        {
+            "package": "parsec",
+            "version": "3.1.15.0"
+        },
+        {
+            "package": "process",
+            "version": "1.6.16.0"
+        },
+        {
+            "package": "stm",
+            "version": "2.5.1.0"
+        },
+        {
+            "package": "exceptions",
+            "version": "0.10.5"
+        }
+    ],
+    "dependencies": [
+        {
+            "cabal_sha256": null,
+            "flags": [],
+            "package": "Cabal-syntax",
+            "revision": null,
+            "source": "local",
+            "src_sha256": null,
+            "version": "3.10.1.0"
+        },
+        {
+            "cabal_sha256": null,
+            "flags": [],
+            "package": "Cabal",
+            "revision": null,
+            "source": "local",
+            "src_sha256": null,
+            "version": "3.10.1.0"
+        },
+        {
+            "cabal_sha256": "e3d78b13db9512aeb106e44a334ab42b7aa48d26c097299084084cb8be5c5568",
+            "flags": [
+                "-devel"
+            ],
+            "package": "network",
+            "revision": 0,
+            "source": "hackage",
+            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
+            "version": "3.1.2.7"
+        },
+        {
+            "cabal_sha256": "6ca77c4e80b4e4109e30549c269631a9cc295c8fc2431ce4123972a5f80f7bfc",
+            "flags": [],
+            "package": "th-compat",
+            "revision": 0,
+            "source": "hackage",
+            "src_sha256": "d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8",
+            "version": "0.1.4"
+        },
+        {
+            "cabal_sha256": "1fde59abf5d82a9666b4415bc2b2e9e33f6c1309074fda12d50410c7dbd95f3b",
+            "flags": [],
+            "package": "network-uri",
+            "revision": 0,
+            "source": "hackage",
+            "src_sha256": "9c188973126e893250b881f20e8811dca06c223c23402b06f7a1f2e995797228",
+            "version": "2.6.4.2"
+        },
+        {
+            "cabal_sha256": "b878d575c470bd1f72d37af6654d924ab2b9489d88de8a71bd74d9d5d726c013",
+            "flags": [
+                "-conduit10",
+                "+network-uri",
+                "-warn-as-error",
+                "-warp-tests"
+            ],
+            "package": "HTTP",
+            "revision": 1,
+            "source": "hackage",
+            "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
+            "version": "4000.4.1"
+        },
+        {
+            "cabal_sha256": "02acedd7ac829b52756fe481a1d53294d8f5d42aaa56df560c62c6cec3587a14",
+            "flags": [
+                "+integer-gmp",
+                "-random-initial-seed"
+            ],
+            "package": "hashable",
+            "revision": 0,
+            "source": "hackage",
+            "src_sha256": "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8",
+            "version": "1.4.2.0"
+        },
+        {
+            "cabal_sha256": "2b9409023536823233ce3134558565d01b3382e651fa54ac8cb8a99967e023c9",
+            "flags": [
+                "-bench"
+            ],
+            "package": "async",
+            "revision": 2,
+            "source": "hackage",
+            "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
+            "version": "2.2.4"
+        },
+        {
+            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
+            "flags": [],
+            "package": "base16-bytestring",
+            "revision": 0,
+            "source": "hackage",
+            "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
+            "version": "1.0.2.0"
+        },
+        {
+            "cabal_sha256": "50ec0e229255d4c45cbdd568da011311b8887f304b931564886016f4984334d8",
+            "flags": [],
+            "package": "base64-bytestring",
+            "revision": 0,
+            "source": "hackage",
+            "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
+            "version": "1.2.1.0"
+        },
+        {
+            "cabal_sha256": "db25c2e17967aa6b6046ab8b1b96ba3f344ca59a62b60fb6113d51ea305a3d8e",
+            "flags": [
+                "-optimised-mixer"
+            ],
+            "package": "splitmix",
+            "revision": 2,
+            "source": "hackage",
+            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
+            "version": "0.1.0.4"
+        },
+        {
+            "cabal_sha256": "dea1f11e5569332dc6c8efaad1cb301016a5587b6754943a49f9de08ae0e56d9",
+            "flags": [],
+            "package": "random",
+            "revision": 0,
+            "source": "hackage",
+            "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
+            "version": "1.2.1.1"
+        },
+        {
+            "cabal_sha256": "4d33a49cd383d50af090f1b888642d10116e43809f9da6023d9fc6f67d2656ee",
+            "flags": [],
+            "package": "edit-distance",
+            "revision": 1,
+            "source": "hackage",
+            "src_sha256": "3e8885ee2f56ad4da940f043ae8f981ee2fe336b5e8e4ba3f7436cff4f526c4a",
+            "version": "0.2.2.1"
+        },
+        {
+            "cabal_sha256": null,
+            "flags": [
+                "-debug-conflict-sets",
+                "-debug-expensive-assertions",
+                "-debug-tracetree"
+            ],
+            "package": "cabal-install-solver",
+            "revision": null,
+            "source": "local",
+            "src_sha256": null,
+            "version": "3.10.1.0"
+        },
+        {
+            "cabal_sha256": "facd0c04925ef925ec05243471fd16055229fdf51f64db1a1049de0cc6c6dfc3",
+            "flags": [
+                "-exe",
+                "+use-cbits"
+            ],
+            "package": "cryptohash-sha256",
+            "revision": 1,
+            "source": "hackage",
+            "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
+            "version": "0.11.102.1"
+        },
+        {
+            "cabal_sha256": "ccce771562c49a2b29a52046ca68c62179e97e8fbeacdae32ca84a85445e8f42",
+            "flags": [
+                "-example"
+            ],
+            "package": "echo",
+            "revision": 0,
+            "source": "hackage",
+            "src_sha256": "c9fe1bf2904825a65b667251ec644f197b71dc5c209d2d254be5de3d496b0e43",
+            "version": "0.1.4"
+        },
+        {
+            "cabal_sha256": "885c9e2410e5d91a08b199897df0867fecedf818216d7329a2d43a512833dd63",
+            "flags": [
+                "+no-donna",
+                "+test-doctests",
+                "+test-hlint",
+                "+test-properties"
+            ],
+            "package": "ed25519",
+            "revision": 6,
+            "source": "hackage",
+            "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
+            "version": "0.0.5.0"
+        },
+        {
+            "cabal_sha256": "efd4c08c4df1ac3f423858a834c0e3b5b4909febda66a901d12a8e1d57bddaa8",
+            "flags": [
+                "+ofd-locking"
+            ],
+            "package": "lukko",
+            "revision": 3,
+            "source": "hackage",
+            "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
+            "version": "0.1.1.3"
+        },
+        {
+            "cabal_sha256": "bc14969ea4adfec6eee20264decf4a07c4002b38b2aa802d58d86b1a2cf7b895",
+            "flags": [
+                "-old-bytestring",
+                "-old-time"
+            ],
+            "package": "tar",
+            "revision": 5,
+            "source": "hackage",
+            "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
+            "version": "0.5.1.1"
+        },
+        {
+            "cabal_sha256": "9adce39e4ca0b7a87d45df0a243134816c57059a08e28cff5469c98ae1f54dfc",
+            "flags": [
+                "-bundled-c-zlib",
+                "-non-blocking-ffi",
+                "-pkg-config"
+            ],
+            "package": "zlib",
+            "revision": 1,
+            "source": "hackage",
+            "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
+            "version": "0.6.3.0"
+        },
+        {
+            "cabal_sha256": "18405474813b37ddfc27778c88c549f444661432224999068417dfab3471281e",
+            "flags": [
+                "+base48",
+                "+cabal-syntax",
+                "+lukko",
+                "-mtl21",
+                "-old-directory",
+                "+use-network-uri"
+            ],
+            "package": "hackage-security",
+            "revision": 2,
+            "source": "hackage",
+            "src_sha256": "52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066",
+            "version": "0.6.2.3"
+        },
+        {
+            "cabal_sha256": "4ff4425c710cddf440dfbac6cd52310bb6b23e17902390ff71c9fc7eaafc4fcc",
+            "flags": [],
+            "package": "regex-base",
+            "revision": 1,
+            "source": "hackage",
+            "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
+            "version": "0.94.0.2"
+        },
+        {
+            "cabal_sha256": "9dbba4b65a3bb6975d9740814be5593c6b2d2d6a0b3febc8ec940edb9a9bbdf4",
+            "flags": [
+                "-_regex-posix-clib"
+            ],
+            "package": "regex-posix",
+            "revision": 1,
+            "source": "hackage",
+            "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
+            "version": "0.96.0.1"
+        },
+        {
+            "cabal_sha256": "61e2d98ff634b8b4b3db467772420c0f9c79c2da9ddf3d2daeb2af2417f2c535",
+            "flags": [],
+            "package": "resolv",
+            "revision": 5,
+            "source": "hackage",
+            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
+            "version": "0.1.2.0"
+        },
+        {
+            "cabal_sha256": "6e9b1b233af80cc0aa17ea858d2641ba146fb11cbcc5970a52649e89d77282e2",
+            "flags": [],
+            "package": "safe-exceptions",
+            "revision": 0,
+            "source": "hackage",
+            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
+            "version": "0.1.7.3"
+        },
+        {
+            "cabal_sha256": null,
+            "flags": [
+                "+lukko",
+                "+native-dns"
+            ],
+            "package": "cabal-install",
+            "revision": null,
+            "source": "local",
+            "src_sha256": null,
+            "version": "3.10.1.0"
+        }
+    ]
+}

From 6149c6401037b6c1f23766158b19d1fb4953950f Mon Sep 17 00:00:00 2001
From: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Date: Sat, 4 Feb 2023 19:25:36 +0100
Subject: [PATCH 018/144] doctests: switch to the preffered method of calling
 the tool

which is `cabal repl --with-ghc=doctest`. This not only catches up with
the current upstream recommendations, but also simplifies the usage:
before this change calling doctest required you to set up an environment
with QuickCheck available (we used to do it via cabal-env). The new
method takes care of it automatically.

Also add some docs to fix #8147

(cherry picked from commit 822d1a739edb4c101977dfab427ecc48004da29a)
---
 .github/workflows/quick-jobs.yml | 21 ++++-----------------
 Makefile                         | 18 +++++++++++++++---
 cabal-testsuite/README.md        | 22 ++++++++++++++++++++++
 3 files changed, 41 insertions(+), 20 deletions(-)

diff --git a/.github/workflows/quick-jobs.yml b/.github/workflows/quick-jobs.yml
index 466ec4d57dc..633c9842fe8 100644
--- a/.github/workflows/quick-jobs.yml
+++ b/.github/workflows/quick-jobs.yml
@@ -65,14 +65,6 @@ jobs:
       - name: Set PATH
         run: |
           echo "$HOME/.cabal/bin" >> $GITHUB_PATH
-      - name: Install cabal-env
-        run: |
-          mkdir -p $HOME/.cabal/bin
-          curl -sL https://github.com/phadej/cabal-extras/releases/download/preview-20191225/cabal-env-snapshot-20191225-x86_64-linux.xz > cabal-env.xz
-          echo "1b567d529c5f627fd8c956e57ae8f0d9f11ee66d6db34b7fb0cb1c370b4edf01  cabal-env.xz" | sha256sum -c -
-          xz -d < cabal-env.xz > $HOME/.cabal/bin/cabal-env
-          rm -f cabal-env.xz
-          chmod a+x $HOME/.cabal/bin/cabal-env
       - uses: actions/cache@v1
         with:
           path: ~/.cabal/store
@@ -91,17 +83,12 @@ jobs:
         run: |
           ghcup --version
           ghcup config set cache true
-          ghcup install ghc recommended
-          ghcup set ghc recommended
+          ghcup install ghc --set recommended
+          ghcup install cabal --set latest
       - name: Update Hackage index
         run: cabal v2-update
-      - name: Install doctest
-        run: cabal v2-install doctest
-      - name: Install libraries
-        run: |
-          cabal-env --transitive QuickCheck
-          cabal-env array bytestring containers deepseq directory filepath pretty process time binary unix text parsec mtl
-          cat $HOME/.ghc/*/environments/default
       - uses: actions/checkout@v3
+      - name: Install doctest
+        run: make doctest-install
       - name: Doctest
         run: make doctest
diff --git a/Makefile b/Makefile
index 85f2063ff7a..bac0d30a4aa 100644
--- a/Makefile
+++ b/Makefile
@@ -71,15 +71,27 @@ ghcid-lib :
 ghcid-cli :
 	ghcid -c 'cabal v2-repl cabal-install'
 
-# doctests (relies on .ghc.environment files)
-
+# Artem, 2023-02-03, https://github.com/haskell/cabal/issues/8504
+# The new and prefered way to call the doctest tool (as of now) is based on cabal repl --with-ghc=doctest.
+# The call below reflects the current documentation of the doctest tool except one caveat,
+# which is https://github.com/haskell/cabal/issues/6859, i.e. we have to hide allow-newer in our project
+# file from cabal/doctest. This is easy: we just select a project file with no allow-newer (e.g. cabal.project.libonly).
+#
+# TODO: Cabal-described should be added here but its doctests currently broken, see:
+#       https://github.com/haskell/cabal/issues/8734
+#       Just as well, cabal-install(-solver) doctests (the target below) bitrotted and need some care.
 doctest :
-	doctest --fast -XHaskell2010 Cabal-syntax/src Cabal/src
+	cabal repl --with-ghc=doctest --build-depends=QuickCheck --build-depends=template-haskell --repl-options="-w" --project-file="cabal.project.validate" Cabal-syntax
+	cabal repl --with-ghc=doctest --build-depends=QuickCheck --build-depends=template-haskell --repl-options="-w" --project-file="cabal.project.validate" Cabal
+
 
 # This is not run as part of validate.sh (we need hackage-security, which is tricky to get).
 doctest-cli :
 	doctest -D__DOCTEST__ --fast cabal-install/src cabal-install-solver/src cabal-install-solver/src-assertion
 
+doctest-install:
+	cabal install doctest --overwrite-policy=always --ignore-project
+
 # tests
 
 check-tests :
diff --git a/cabal-testsuite/README.md b/cabal-testsuite/README.md
index 4b6643eec56..0bf85b760c1 100644
--- a/cabal-testsuite/README.md
+++ b/cabal-testsuite/README.md
@@ -25,6 +25,28 @@ There are a few useful flags:
   the autodetection doesn't work correctly (which may be the
   case for old versions of GHC.)
 
+doctests
+========
+
+You need to install the doctest tool. Make sure it's compiled with your current
+GHC, and don't forget to reinstall it every time you switch GHC version:
+
+``` shellsession
+cabal install doctest --overwrite-policy=always --ignore-project
+```
+
+After that you can run doctests for a component of your choice via the following command:
+
+``` shellsession
+cabal repl --with-ghc=doctest --build-depends=QuickCheck --build-depends=template-haskell --repl-options="-w" --project-file="cabal.project.validate" Cabal-syntax
+```
+
+In this example we have run doctests in `Cabal-syntax`. Notice, that some
+components have broken doctests
+([#8734](https://github.com/haskell/cabal/issues/8734));
+our CI currently checks that `Cabal-syntax` and `Cabal` doctests pass via
+`make doctest-install && make doctest` (you can use this make-based workflow too).
+
 How to write
 ------------
 

From faa0be3128feb241fe9325615f2e9daa1ff5f903 Mon Sep 17 00:00:00 2001
From: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Date: Sat, 11 Feb 2023 20:32:34 -0500
Subject: [PATCH 019/144] GHC 9.6 compatibility

- -XTypeInType is deprecated
- skip failing JS test on Windows
  Cf. https://github.com/haskell/cabal/pull/8754#issuecomment-1435535763
- deal with lift2A in Prelude since base-4.18 (GHC 9.6)
- disable everfailing Backpack tests

(cherry picked from commit 87ac120385665d819580dd0ace80570c111a3e7b)
(cherry picked from commit 8f08602cf63ecd32f90769df3f437b9164044beb)
---
 Cabal-syntax/src/Distribution/Utils/Structured.hs             | 1 -
 cabal-install/src/Distribution/Client/VCS.hs                  | 4 ++++
 .../PackageTests/Backpack/Includes2/setup-external.test.hs    | 2 +-
 .../Backpack/Includes2/setup-per-component.test.hs            | 2 +-
 .../PackageTests/Backpack/Includes3/setup-external-ok.test.hs | 2 +-
 cabal-testsuite/PackageTests/JS/JsSources/js-arch.test.hs     | 1 +
 6 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Cabal-syntax/src/Distribution/Utils/Structured.hs b/Cabal-syntax/src/Distribution/Utils/Structured.hs
index 5327ed6a427..ca3147710c8 100644
--- a/Cabal-syntax/src/Distribution/Utils/Structured.hs
+++ b/Cabal-syntax/src/Distribution/Utils/Structured.hs
@@ -7,7 +7,6 @@
 {-# LANGUAGE TypeFamilies        #-}
 {-# LANGUAGE TypeOperators       #-}
 {-# LANGUAGE PatternSynonyms     #-}
-{-# LANGUAGE TypeInType          #-}
 -- |
 --
 -- Copyright: (c) 2019 Oleg Grenrus
diff --git a/cabal-install/src/Distribution/Client/VCS.hs b/cabal-install/src/Distribution/Client/VCS.hs
index 8b0a95462da..aca3f4b109f 100644
--- a/cabal-install/src/Distribution/Client/VCS.hs
+++ b/cabal-install/src/Distribution/Client/VCS.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE LambdaCase #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE NamedFieldPuns, RecordWildCards, RankNTypes #-}
@@ -53,8 +54,11 @@ import Distribution.Version
          ( mkVersion )
 import qualified Distribution.PackageDescription as PD
 
+#if !MIN_VERSION_base(4,18,0)
 import Control.Applicative
          ( liftA2 )
+#endif
+
 import Control.Exception
          ( throw, try )
 import Control.Monad.Trans
diff --git a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.test.hs b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.test.hs
index fb6843f5a52..3e4577aecfa 100644
--- a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.test.hs
+++ b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.test.hs
@@ -1,7 +1,7 @@
 import Test.Cabal.Prelude
 main = setupAndCabalTest $ do
   skipUnlessGhcVersion ">= 8.1"
-  ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.*"
+  ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.* || == 9.6.*"
   expectBrokenIf ghc 7987 $ do
     withPackageDb $ do
       withDirectory "mylib" $ setup_install_with_docs ["--ipid", "mylib-0.1.0.0"]
diff --git a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs
index 1f01eff1efa..5196d404f65 100644
--- a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs
+++ b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs
@@ -2,7 +2,7 @@ import Test.Cabal.Prelude
 main = setupTest $ do
   -- No cabal test because per-component is broken with it
   skipUnlessGhcVersion ">= 8.1"
-  ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.*"
+  ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.* || == 9.6.*"
   expectBrokenIf ghc 7987 $
     withPackageDb $ do
       let setup_install' args = setup_install_with_docs (["--cabal-file", "Includes2.cabal"] ++ args)
diff --git a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.test.hs b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.test.hs
index bea7f9a089d..d7ae9a1921d 100644
--- a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.test.hs
+++ b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.test.hs
@@ -3,7 +3,7 @@ import Data.List
 import qualified Data.Char as Char
 main = setupAndCabalTest $ do
   skipUnlessGhcVersion ">= 8.1"
-  ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.*"
+  ghc <- isGhcVersion "== 9.0.2 || == 9.2.* || == 9.4.* || == 9.6.*"
   expectBrokenIf ghc 7987 $
     withPackageDb $ do
       containers_id <- getIPID "containers"
diff --git a/cabal-testsuite/PackageTests/JS/JsSources/js-arch.test.hs b/cabal-testsuite/PackageTests/JS/JsSources/js-arch.test.hs
index 612c9829cde..1fed749bdb8 100644
--- a/cabal-testsuite/PackageTests/JS/JsSources/js-arch.test.hs
+++ b/cabal-testsuite/PackageTests/JS/JsSources/js-arch.test.hs
@@ -3,6 +3,7 @@ import Test.Cabal.Prelude
 main = setupAndCabalTest $ do
     skipUnlessGhcVersion ">= 9.6"
     skipUnlessJavaScript
+    skipIfWindows
 
     res <- cabal' "v2-run" ["demo"]
     assertOutputContains "Hello JS!" res

From 50c4240cecceca66a5d9ebe09c23f8e52a9e2fbe Mon Sep 17 00:00:00 2001
From: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Date: Wed, 22 Feb 2023 13:59:49 -0500
Subject: [PATCH 020/144] CI: update actions/cache to v3

(cherry picked from commit 91393b4cc2fcaa29449b4c4c668e453aec6da68c)
(cherry picked from commit eb2b8b8793d4f40a0c3750d9f082433c4349fea5)
---
 .github/workflows/changelogs.yml | 2 +-
 .github/workflows/quick-jobs.yml | 4 ++--
 .github/workflows/validate.yml   | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/changelogs.yml b/.github/workflows/changelogs.yml
index 0ee8da9fda3..425e5117188 100644
--- a/.github/workflows/changelogs.yml
+++ b/.github/workflows/changelogs.yml
@@ -29,7 +29,7 @@ jobs:
         # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
         run: |
           echo "$HOME/.cabal/bin" >> $GITHUB_PATH
-      - uses: actions/cache@v1
+      - uses: actions/cache@v3
         with:
           path: ~/.cabal/store
           key: linux-store-changelogs
diff --git a/.github/workflows/quick-jobs.yml b/.github/workflows/quick-jobs.yml
index 633c9842fe8..c36db9bd689 100644
--- a/.github/workflows/quick-jobs.yml
+++ b/.github/workflows/quick-jobs.yml
@@ -24,7 +24,7 @@ jobs:
         # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
         run: |
           echo "$HOME/.cabal/bin" >> $GITHUB_PATH
-      - uses: actions/cache@v1
+      - uses: actions/cache@v3
         with:
           path: ~/.cabal/store
           key: linux-store-meta
@@ -65,7 +65,7 @@ jobs:
       - name: Set PATH
         run: |
           echo "$HOME/.cabal/bin" >> $GITHUB_PATH
-      - uses: actions/cache@v1
+      - uses: actions/cache@v3
         with:
           path: ~/.cabal/store
           key: linux-store-doctest
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 317870c0fd1..96e28f298dc 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -78,7 +78,7 @@ jobs:
       #
       # See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded
       - if: ${{ runner.os != 'Windows' }}
-        uses: actions/cache@v2
+        uses: actions/cache@v3
         with:
           # validate.sh uses a special build dir
           path: |
@@ -234,7 +234,7 @@ jobs:
       # As we are reusing the cached build dir from the previous step
       # the generated artifacts are available here,
       # including the cabal executable and the test suite
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: |
             ${{ steps.setup-haskell.outputs.cabal-store }}

From 4acdf8a50c5bfdbea4e6cebd5ec8e6e9d5e4e8e1 Mon Sep 17 00:00:00 2001
From: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Date: Wed, 22 Feb 2023 14:01:08 -0500
Subject: [PATCH 021/144] CI: add validation against GHC pre-release
 (currently: 9.6alpha3)

Had to block lib/cli-suite tests on Windows, see discussion starting here:

- https://github.com/haskell/cabal/pull/8754#issuecomment-1435025848

(cherry picked from commit 9e9a8658b245aa4baf8983bbeab656a6e4692213)
(cherry picked from commit 8dc322116554e577a4a8f05364f110a46bccd747)
---
 .github/workflows/validate.yml | 128 +++++++++++++++++++++++++++++++++
 1 file changed, 128 insertions(+)

diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 96e28f298dc..48f10d09e91 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -187,6 +187,134 @@ jobs:
         if: matrix.cli != 'false'
         run: sh validate.sh $FLAGS -s cli-suite
 
+  # The job below is a copy-paste of validate with the necessary tweaks
+  # to make all work with an upcoming GHC. Those tweaks include:
+  # - ghcup needs the prerelease channel activated
+  # - allow-newer for base libraries and Cabal* libraries
+  # - (sometimes) disabling some parts on Windows because it's hard to figure
+  #   out why they fail
+  validate-prerelease:
+    name: Validate ${{ matrix.os }} ghc-prerelease
+    runs-on: ${{ matrix.os }}
+    outputs:
+      GHC_FOR_RELEASE: ${{ format('["{0}"]', env.GHC_FOR_RELEASE) }}
+    strategy:
+      matrix:
+        os: ["ubuntu-20.04", "macos-latest", "windows-latest"]
+
+    steps:
+
+      - uses: actions/checkout@v3
+
+      # See https://github.com/haskell/cabal/pull/8739
+      - name: Sudo chmod to permit ghcup to update its cache
+        run: |
+          if [[ "${{ runner.os }}" == "Linux" ]]; then
+            sudo ls -lah /usr/local/.ghcup/cache
+            sudo mkdir -p /usr/local/.ghcup/cache
+            sudo ls -lah /usr/local/.ghcup/cache
+            sudo chown -R $USER /usr/local/.ghcup
+            sudo chmod -R 777 /usr/local/.ghcup
+          fi
+
+      - name: ghcup
+        run: |
+          ghcup --version
+          ghcup config set cache true
+          ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml
+          ghcup install ghc --set 9.6.0.20230210
+          ghcup install cabal --set latest
+          ghc --version
+          cabal update
+
+      #  See the following link for a breakdown of the following step
+      #  https://github.com/haskell/actions/issues/7#issuecomment-745697160
+      #
+      # See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded
+      - if: ${{ runner.os != 'Windows' }}
+        uses: actions/cache@v3
+        with:
+          # validate.sh uses a special build dir
+          path: |
+            ${{ steps.setup-haskell.outputs.cabal-store }}
+            dist-*
+          key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
+          restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419-
+
+      - name: Work around git problem https://bugs.launchpad.net/ubuntu/+source/git/+bug/1993586 (cabal PR #8546)
+        run: |
+          git config --global protocol.file.allow always
+
+      # The '+exe' constraint below is important, otherwise cabal-install
+      # might decide to build the library but not the executable which is
+      # what we need.
+      - name: Install cabal-plan
+        run: |
+          cd $(mktemp -d)
+          cabal install cabal-plan --constraint='cabal-plan +exe' --allow-newer
+          echo "$HOME/.cabal/bin" >> $GITHUB_PATH
+
+      # The tool is not essential to the rest of the test suite. If
+      # hackage-repo-tool is not present, any test that requires it will
+      # be skipped.
+      # We want to keep this in the loop but we don't want to fail if
+      # hackage-repo-tool breaks or fails to support a newer GHC version.
+      - name: Install hackage-repo-tool
+        continue-on-error: true
+        run: |
+          cd $(mktemp -d)
+          cabal install hackage-repo-tool
+
+      # Needed by cabal-testsuite/PackageTests/Configure/setup.test.hs
+      - name: Install Autotools
+        if: runner.os == 'macOS'
+        run: |
+          brew install automake
+
+      - name: Allow newer boot libraries
+        run: |
+          echo "allow-newer: base, template-haskell, ghc-prim, Cabal-syntax, Cabal-described, Cabal, cabal-install-solver, cabal-install" >> cabal.project.validate
+
+      - name: Set validate inputs
+        run: |
+          FLAGS="${{ env.COMMON_FLAGS }}"
+          if [[ "${{ matrix.cli }}" == "false" ]]; then
+            FLAGS="$FLAGS --lib-only"
+          fi
+          echo "FLAGS=$FLAGS" >> $GITHUB_ENV
+
+      - name: Validate print-config
+        run: sh validate.sh $FLAGS -s print-config
+
+      - name: Validate print-tool-versions
+        run: sh validate.sh $FLAGS -s print-tool-versions
+
+      - name: Validate build
+        run: sh validate.sh $FLAGS -s build
+
+      - name: Validate lib-tests
+        env:
+          # `rawSystemStdInOut reports text decoding errors`
+          # test does not find ghc without the full path in windows
+          GHCPATH: ${{ steps.setup-haskell.outputs.ghc-exe }}
+        run: sh validate.sh $FLAGS -s lib-tests
+
+      - name: Validate lib-suite
+        # see https://github.com/haskell/cabal/pull/8754#issuecomment-1435025848
+        # for discussion about the trouble on Windows
+        if: ${{ runner.os != 'Windows' }}
+        run: sh validate.sh $FLAGS -s lib-suite
+
+      - name: Validate cli-tests
+        if: matrix.cli != 'false'
+        run: sh validate.sh $FLAGS -s cli-tests
+
+      - name: Validate cli-suite
+        # see https://github.com/haskell/cabal/pull/8754#issuecomment-1435025848
+        # for discussion about the trouble on Windows
+        if: ( runner.os != 'Windows' ) && ( matrix.cli != 'false' )
+        run: sh validate.sh $FLAGS -s cli-suite
+
   validate-old-ghcs:
     name: Validate old ghcs ${{ matrix.extra-ghc }}
     runs-on: ubuntu-20.04

From e72a225b82bfa1c23fabfae31f62da965c424a25 Mon Sep 17 00:00:00 2001
From: Patrick Dougherty <patrick.doc@ameritech.net>
Date: Fri, 24 Feb 2023 14:03:11 -0600
Subject: [PATCH 022/144] Apply command line flags to install packages (#8637)
 (#8779)

* Apply command line flags to install packages (#8637)

* remove expectBroken on NonIgnoredConfigs test

---------

Co-authored-by: gbaz <gershomb@gmail.com>
(cherry picked from commit 76670ebddeb0a914d816f4420c511c1bc1f044eb)
---
 .../src/Distribution/Client/CmdInstall.hs     | 23 +++++++++++++++----
 .../NonignoredConfigs/cabal.test.hs           |  2 +-
 changelog.d/issue-8637                        | 13 +++++++++++
 3 files changed, 32 insertions(+), 6 deletions(-)
 create mode 100644 changelog.d/issue-8637

diff --git a/cabal-install/src/Distribution/Client/CmdInstall.hs b/cabal-install/src/Distribution/Client/CmdInstall.hs
index cd1254b5fe1..94a4737a24d 100644
--- a/cabal-install/src/Distribution/Client/CmdInstall.hs
+++ b/cabal-install/src/Distribution/Client/CmdInstall.hs
@@ -39,7 +39,7 @@ import Distribution.Client.Types
          , SourcePackageDb(..) )
 import qualified Distribution.Client.InstallPlan as InstallPlan
 import Distribution.Package
-         ( Package(..), PackageName, unPackageName )
+         ( Package(..), PackageName, mkPackageName, unPackageName )
 import Distribution.Types.PackageId
          ( PackageIdentifier(..) )
 import Distribution.Client.ProjectConfig
@@ -53,6 +53,7 @@ import Distribution.Client.ProjectFlags (ProjectFlags (..))
 import Distribution.Client.ProjectConfig.Types
          ( ProjectConfig(..), ProjectConfigShared(..)
          , ProjectConfigBuildOnly(..), PackageConfig(..)
+         , MapMappend(..)
          , getMapLast, getMapMappend, projectConfigLogsDir
          , projectConfigStoreDir, projectConfigBuildOnly
          , projectConfigConfigFile )
@@ -430,12 +431,24 @@ installAction flags@NixStyleFlags { extraFlags = clientInstallFlags', .. } targe
     configFlags' = disableTestsBenchsByDefault configFlags
     verbosity = fromFlagOrDefault normal (configVerbosity configFlags')
     ignoreProject = flagIgnoreProject projectFlags
-    cliConfig = commandLineFlagsToProjectConfig
-                  globalFlags
-                  flags { configFlags = configFlags' }
-                  clientInstallFlags'
+    baseCliConfig = commandLineFlagsToProjectConfig
+                        globalFlags
+                        flags { configFlags = configFlags' }
+                        clientInstallFlags'
+    cliConfig = addLocalConfigToTargets baseCliConfig targetStrings
     globalConfigFlag = projectConfigConfigFile (projectConfigShared cliConfig)
 
+-- | Treat all direct targets of install command as local packages: #8637
+addLocalConfigToTargets :: ProjectConfig -> [String] -> ProjectConfig
+addLocalConfigToTargets config targetStrings
+    = config {
+        projectConfigSpecificPackage = projectConfigSpecificPackage config
+                                       <> MapMappend (Map.fromList targetPackageConfigs)
+    }
+  where
+    localConfig = projectConfigLocalPackages config
+    targetPackageConfigs = map (\x -> (mkPackageName x, localConfig)) targetStrings
+
 -- | Verify that invalid config options were not passed to the install command.
 --
 -- If an invalid configuration is found the command will @die'@.
diff --git a/cabal-testsuite/PackageTests/LinkerOptions/NonignoredConfigs/cabal.test.hs b/cabal-testsuite/PackageTests/LinkerOptions/NonignoredConfigs/cabal.test.hs
index 2e8dac23a20..9da924366f4 100644
--- a/cabal-testsuite/PackageTests/LinkerOptions/NonignoredConfigs/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/LinkerOptions/NonignoredConfigs/cabal.test.hs
@@ -50,7 +50,7 @@ linkConfigFlags Dynamic =
 lrun :: [Linking]
 lrun = [Static, Dynamic, Static, Dynamic]
 
-main = cabalTest . expectBroken 8744 $ do
+main = cabalTest $ do
     -- Skip if on Windows, since my default Chocolatey Windows setup (and the CI
     -- server setup at the time, presumably) lacks support for dynamic builds
     -- since the base package appears to be static only, lacking e.g. ‘.dyn_o’
diff --git a/changelog.d/issue-8637 b/changelog.d/issue-8637
new file mode 100644
index 00000000000..b584e187761
--- /dev/null
+++ b/changelog.d/issue-8637
@@ -0,0 +1,13 @@
+synopsis: Apply command line flags to install packages
+packages: cabal-install
+prs: #8779
+issues: #8637
+
+description: {
+
+- Command line flags usually only apply to "local" packages (packages specified
+  in the cabal.project). This change causes the v2-install command to ignore
+  that distinction to better match the expected behavior for packages specified
+  directly in the command.
+
+}

From f7b791c369b1b45310b2193aac3a6ff16e500166 Mon Sep 17 00:00:00 2001
From: Andreas Abel <andreas.abel@ifi.lmu.de>
Date: Mon, 20 Feb 2023 22:29:34 +0100
Subject: [PATCH 023/144] Doc: rm `-none` from constraint section, make
 `installed` prominent

- `PACKAGE -none` as already been removed in 3.4 as valid constraint.
(I guess this is now flag syntax.)

- Important constraint `installed` was just buried in an example, I made
it stand out more in a bullet point.
Same for `source`, even though this is an exotic constraint.

- Highlight constraint `installed` in connection with `allow-newer`.

- Group `test` and `bench` constraint with the `+/-FLAG` constraints.

Fixup: Apply concrete suggestions from code review

Fixes suggested by @ulysses4ever, thanks@

Co-authored-by: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
(cherry picked from commit d9452a455b61d7375badd330b43079d87f8573be)
---
 doc/setup-commands.rst | 48 +++++++++++++++++++++++-------------------
 1 file changed, 26 insertions(+), 22 deletions(-)

diff --git a/doc/setup-commands.rst b/doc/setup-commands.rst
index 12af7db7fd6..988d431e693 100644
--- a/doc/setup-commands.rst
+++ b/doc/setup-commands.rst
@@ -880,37 +880,29 @@ Miscellaneous options
 .. option:: --constraint=constraint
 
     Restrict solutions involving a package to given version
-    bounds, flag settings, and other properties. For example, to
-    consider only install plans that use version 2.1 of ``bar``
-    or do not use ``bar`` at all, write:
+    bounds, flag settings, and other properties.
+
+    The following considers only install plans where ``bar``,
+    if used, is restricted to version 2.1:
 
     ::
 
         $ cabal install --constraint="bar == 2.1"
 
-    Version bounds have the same syntax as :pkg-field:`build-depends`.
-    As a special case, the following prevents ``bar`` from being
-    used at all:
+    The following prevents ``bar`` from being used at all:
 
     ::
 
-        # Note: this is just syntax sugar for '> 1 && < 1', and is
-        # supported by build-depends.
-        $ cabal install --constraint="bar -none"
-
-    You can also specify flag assignments:
+        $ cabal install --constraint="bar <0"
 
-    ::
-
-        # Require bar to be installed with the foo flag turned on and
-        # the baz flag turned off.
-        $ cabal install --constraint="bar +foo -baz"
+    Version bounds have the same syntax as :pkg-field:`build-depends`.
+    Yet extra pseudo version bounds are available here in addition:
 
-    To specify multiple constraints, you may pass the
-    ``constraint`` option multiple times.
+      - ``installed`` to fix a package to the already installed version.
+        Often useful for GHC-supplied packages in combination with :cfg-field:`allow-newer`,
+        e.g., ``--allow-newer='*:base' --constraint='base installed'``.
 
-    There are also some more specialized constraints, which most people
-    don't generally need:
+      - ``source`` to fix a package to the local source copy.
 
     ::
 
@@ -924,9 +916,21 @@ Miscellaneous options
         # specify this.)
         $ cabal install --constraint="bar source"
 
+    Further, we can specify flag assignments with ``+FLAG`` and ``-FLAG``
+    or enable test (``test``) and benchmark (``bench``) suites:
+
+    ::
+
+        # Require bar to be installed with the foo flag turned on and
+        # the baz flag turned off.
+        $ cabal install --constraint="bar +foo -baz"
+
         # Require that bar have test suites and benchmarks enabled.
         $ cabal install --constraint="bar test" --constraint="bar bench"
 
+    To specify multiple constraints, you may pass the
+    ``constraint`` option multiple times.
+
     By default, constraints only apply to build dependencies
     (:pkg-field:`build-depends`), build dependencies of build
     dependencies, and so on. Constraints normally do not apply to
@@ -934,8 +938,8 @@ Miscellaneous options
     (:pkg-field:`custom-setup:setup-depends`) nor do they apply to build tools
     (:pkg-field:`build-tool-depends`) or the dependencies of build
     tools. To explicitly apply a constraint to a setup or build
-    tool dependency, you can add a qualifier to the constraint as
-    follows:
+    tool dependency, you can add a qualifier ``setup`` or ``any``
+    to the constraint as follows:
 
     ::
 

From d677e2b3b032623d7f4bc6710301af55f843c44d Mon Sep 17 00:00:00 2001
From: Andreas Abel <andreas.abel@ifi.lmu.de>
Date: Mon, 20 Feb 2023 22:02:33 +0100
Subject: [PATCH 024/144] Build user's guide: bump to Python 3.10

(cherry picked from commit 3b6e0f21b43e98d3af13a50b222bc0522566da16)
---
 .github/workflows/users-guide.yml | 2 +-
 doc/Makefile                      | 1 +
 doc/requirements.txt              | 8 ++------
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/users-guide.yml b/.github/workflows/users-guide.yml
index 5b56c25266b..cd8137fbc38 100644
--- a/.github/workflows/users-guide.yml
+++ b/.github/workflows/users-guide.yml
@@ -46,7 +46,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: [3.7]
+        python-version: ['3.10']
 
     steps:
     - uses: actions/checkout@v3
diff --git a/doc/Makefile b/doc/Makefile
index 4e12ab8e87a..5ef45877223 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -23,6 +23,7 @@ build-and-check-requirements: requirements.txt check-requirements
 # See https://modelpredict.com/wht-requirements-txt-is-not-enough
 requirements.txt: requirements.in
 	. ../.python-sphinx-virtualenv/bin/activate \
+	  && pip install --upgrade pip \
 	  && pip install pip-tools \
 	  && pip-compile requirements.in
 
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 256b6bf407d..1d5425badf5 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -1,6 +1,6 @@
 #
-# This file is autogenerated by pip-compile with python 3.9
-# To update, run:
+# This file is autogenerated by pip-compile with Python 3.10
+# by the following command:
 #
 #    pip-compile requirements.in
 #
@@ -21,8 +21,6 @@ idna==2.10
     # via requests
 imagesize==1.2.0
     # via sphinx
-importlib-metadata==4.11.4
-    # via sphinx
 jinja2==2.11.3
     # via sphinx
 jsonpointer==2.1
@@ -72,5 +70,3 @@ sphinxnotes-strike==1.1
     # via -r requirements.in
 urllib3==1.26.7
     # via requests
-zipp==3.8.0
-    # via importlib-metadata

From 2ae57c49896a180afd94d40b67d394a9ee8079d9 Mon Sep 17 00:00:00 2001
From: Andreas Abel <andreas.abel@ifi.lmu.de>
Date: Fri, 24 Feb 2023 19:03:47 +0100
Subject: [PATCH 025/144] Bump Sphinx to 5.3.0 and force certifi >= 2022.12.7

For the moment, readthedocs.org does not support Sphinx 6.

(cherry picked from commit 4da86b0c7becbff132c85d6d94993c7791269651)
---
 doc/requirements.in  |  6 ++++--
 doc/requirements.txt | 29 +++++++++++++++++------------
 2 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/doc/requirements.in b/doc/requirements.in
index 3638f36e09a..df0b2f34d80 100644
--- a/doc/requirements.in
+++ b/doc/requirements.in
@@ -1,6 +1,8 @@
-sphinx >= 5
-sphinx_rtd_theme >= 1
+sphinx == 5.3.0
+sphinx_rtd_theme >= 1.2
 sphinx-jsonschema
 sphinxnotes-strike
 # Pygments>=2.7.4 suggested by CVE-2021-20270 CVE-2021-27291
 Pygments >= 2.7.4
+# Suggested by dependabot in https://github.com/haskell/cabal/pull/8807
+certifi >= 2022.12.7
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 1d5425badf5..d65e0d37e15 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -8,33 +8,33 @@ alabaster==0.7.12
     # via sphinx
 babel==2.9.1
     # via sphinx
-certifi==2021.10.8
-    # via requests
+certifi==2022.12.7
+    # via
+    #   -r requirements.in
+    #   requests
 charset-normalizer==2.0.7
     # via requests
-docutils==0.17.1
+docutils==0.18.1
     # via
     #   sphinx
     #   sphinx-jsonschema
     #   sphinx-rtd-theme
 idna==2.10
     # via requests
-imagesize==1.2.0
+imagesize==1.4.1
     # via sphinx
-jinja2==2.11.3
+jinja2==3.1.2
     # via sphinx
 jsonpointer==2.1
     # via sphinx-jsonschema
-markupsafe==1.1.1
+markupsafe==2.1.2
     # via jinja2
-packaging==20.9
+packaging==23.0
     # via sphinx
-pygments==2.10.0
+pygments==2.14.0
     # via
     #   -r requirements.in
     #   sphinx
-pyparsing==2.4.7
-    # via packaging
 pytz==2021.3
     # via babel
 pyyaml==5.4.1
@@ -45,14 +45,14 @@ requests==2.26.0
     #   sphinx-jsonschema
 snowballstemmer==2.1.0
     # via sphinx
-sphinx==5.0.1
+sphinx==5.3.0
     # via
     #   -r requirements.in
     #   sphinx-rtd-theme
     #   sphinxnotes-strike
 sphinx-jsonschema==1.16.11
     # via -r requirements.in
-sphinx-rtd-theme==1.0.0
+sphinx-rtd-theme==1.2.0
     # via -r requirements.in
 sphinxcontrib-applehelp==1.0.2
     # via sphinx
@@ -60,6 +60,8 @@ sphinxcontrib-devhelp==1.0.2
     # via sphinx
 sphinxcontrib-htmlhelp==2.0.0
     # via sphinx
+sphinxcontrib-jquery==2.0.0
+    # via sphinx-rtd-theme
 sphinxcontrib-jsmath==1.0.1
     # via sphinx
 sphinxcontrib-qthelp==1.0.3
@@ -70,3 +72,6 @@ sphinxnotes-strike==1.1
     # via -r requirements.in
 urllib3==1.26.7
     # via requests
+
+# The following packages are considered to be unsafe in a requirements file:
+# setuptools

From 65f13c74166529bfe50dbb52aa4c4274882a3b65 Mon Sep 17 00:00:00 2001
From: Andreas Abel <andreas.abel@ifi.lmu.de>
Date: Sat, 25 Feb 2023 01:51:45 +0100
Subject: [PATCH 026/144] Fix #8756: doc: `extra-source-files` are tracked by
 `cabal build` (#8765)

Changing a file from `extra-source-files` causes `cabal build` to
reevaluate the build plan, judging from the following behavior.

```console
$ cabal build
...

$ cabal build
Up to date

  # Make a change to any of the extra-source-files, e.g. Foo.txt

$ cabal build
...
In order, the following would be built (use -v for more details):
 - ... (lib) (file Foo.txt changed)
...
```

One notes here that the 3rd `cabal build` does not just output "Up to date".

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit fdcf77b2e6d70a665ef4c2fc0c08bd850ab8114b)
---
 doc/cabal-package.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/cabal-package.rst b/doc/cabal-package.rst
index c25290419bc..2eadd56bd50 100644
--- a/doc/cabal-package.rst
+++ b/doc/cabal-package.rst
@@ -774,9 +774,9 @@ describe the package as a whole:
 
 .. pkg-field:: extra-source-files: filename list
 
-    A list of additional files to be included in source distributions
-    built with :ref:`setup-sdist`. As with :pkg-field:`data-files` it can use
-    a limited form of ``*`` wildcards in file names.
+    A list of additional files to be included in source distributions built with :ref:`setup-sdist`.
+    As with :pkg-field:`data-files` it can use a limited form of ``*`` wildcards in file names.
+    Files listed here are tracked by ``cabal build``; changes in these files cause (partial) rebuilds.
 
 .. pkg-field:: extra-doc-files: filename list
     :since: 1.18

From d186bc2e676c8cb66b8cd9911f4fc2ae400713d3 Mon Sep 17 00:00:00 2001
From: Bryan Richter <bryan@haskell.foundation>
Date: Thu, 2 Mar 2023 15:22:40 +0200
Subject: [PATCH 027/144] Update GitLab CI (#8818)

* Bump ci-images pin

* Combine Debian 10 and 11 in a matrix job

* Add most of the GHC 9.6.1 platforms that fit on the x86_64 runners

* Add centos7

Extends the "configure" logic in .gitlab/ci.sh :(

* Remove platforms unsupported by GHC 9.6.1 or Cabal 3.8.1

* Remove aarch64-linux-deb10

GHCUp fails to run on aarch64-linux-deb10 due to a glibc mismatch.

aarch64-linux-deb11 would work, but there is no GHC release for that
version yet.

* Reset GitLab CI verbosity

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 0ea1001301427a0911f38679763f7617acef28f7)
---
 .gitlab-ci.yml | 79 ++++++++++----------------------------------------
 .gitlab/ci.sh  |  9 ++++--
 2 files changed, 21 insertions(+), 67 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 751ee16f019..752e918417b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,11 +1,9 @@
 stages:
   - build
 
-# Used for ci setup in the gitlab mirror of the project:
-# https://gitlab.haskell.org/haskell/haskell-language-server/-/pipelines
 variables:
   # Commit of ghc/ci-images repository from which to pull Docker images
-  DOCKER_REV: "9e4c540d9e4972a36291dfdf81f079f37d748890"
+  DOCKER_REV: "572353e0644044fe3a5465bba4342a9a0b0eb60e"
 
   GHC_VERSION: 9.2.3
   CABAL_INSTALL_VERSION: 3.6.2.0
@@ -28,46 +26,25 @@ workflow:
     paths:
       - out/*
 
-build-aarch64-linux-deb10:
-  extends: .build
-  tags:
-    - aarch64-linux
-  image: "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb10:$DOCKER_REV"
-  variables:
-    TARBALL_ARCHIVE_SUFFIX: aarch64-linux-deb10
-    TARBALL_EXT: tar.xz
-    ADD_CABAL_ARGS: ""
-
-build-armv7-linux-deb10:
-  extends: .build
-  tags:
-    - armv7-linux
-  image: "registry.gitlab.haskell.org/ghc/ci-images/armv7-linux-deb10:$DOCKER_REV"
-  variables:
-    TARBALL_ARCHIVE_SUFFIX: armv7-linux-deb1
-    TARBALL_EXT: tar.xz
-    ADD_CABAL_ARGS: ""
-    # temp, because 3.6.2.0 is broken
-    CABAL_INSTALL_VERSION: 3.4.0.0
-  retry: 2
-
 build-x86_64-linux:
   extends: .build
+  parallel:
+    matrix:
+      - PLATFORM:
+        - i386-linux-deb9
+        - x86_64-linux-centos7
+        - x86_64-linux-deb9
+        - x86_64-linux-fedora33
+        - x86_64-linux-rocky8
+        - x86_64-linux-ubuntu18_04
+        - x86_64-linux-ubuntu20_04
+        - x86_64-linux-deb10
+        - x86_64-linux-deb11
   tags:
     - x86_64-linux
-  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:$DOCKER_REV"
+  image: "registry.gitlab.haskell.org/ghc/ci-images/$PLATFORM:$DOCKER_REV"
   variables:
-    TARBALL_ARCHIVE_SUFFIX: x86_64-linux-deb10
-    TARBALL_EXT: tar.xz
-    ADD_CABAL_ARGS: "--enable-split-sections"
-
-build-x86_64-linux-deb11:
-  extends: .build
-  tags:
-    - x86_64-linux
-  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb11:$DOCKER_REV"
-  variables:
-    TARBALL_ARCHIVE_SUFFIX: x86_64-linux-deb11
+    TARBALL_ARCHIVE_SUFFIX: $PLATFORM
     TARBALL_EXT: tar.xz
     ADD_CABAL_ARGS: "--enable-split-sections"
 
@@ -84,32 +61,6 @@ build-x86_64-linux-alpine:
     TARBALL_EXT: tar.xz
     ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"
 
-build-i386-linux-alpine:
-  extends: .build
-  tags:
-    - x86_64-linux
-  image: "i386/alpine:3.12"
-  before_script:
-    # for GHC
-    - apk add --no-cache bash curl gcc g++ binutils binutils-gold bsd-compat-headers gmp-dev ncurses-dev libffi-dev make xz tar perl
-    # for cabal build
-    - apk add --no-cache zlib zlib-dev zlib-static
-  variables:
-    TARBALL_ARCHIVE_SUFFIX: i386-linux-alpine
-    TARBALL_EXT: tar.xz
-    ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"
-    # temp, because 3.6.2.0 is broken
-    CABAL_INSTALL_VERSION: 3.4.0.0
-
-build-x86_64-freebsd12:
-  extends: .build
-  tags:
-    - x86_64-freebsd12
-  variables:
-    TARBALL_ARCHIVE_SUFFIX: x86_64-freebsd12
-    TARBALL_EXT: tar.xz
-    ADD_CABAL_ARGS: "--enable-split-sections"
-
 build-x86_64-darwin:
   extends: .build
   tags:
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 95d43664cb9..b0a68079586 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 
-set -Eeuxo pipefail
+set -Eeuo pipefail
 
 source "$CI_PROJECT_DIR/.gitlab/common.sh"
 
@@ -26,7 +26,6 @@ export PATH="$GHCUP_BINDIR:$PATH"
 export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
 export BOOTSTRAP_HASKELL_GHC_VERSION=$GHC_VERSION
 export BOOTSTRAP_HASKELL_CABAL_VERSION=$CABAL_INSTALL_VERSION
-export BOOTSTRAP_HASKELL_VERBOSE=1
 export BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=yes
 
 # for some reason the subshell doesn't pick up the arm64 environment on darwin
@@ -48,7 +47,11 @@ case "$(uname -s)" in
 esac
 
 # https://github.com/haskell/cabal/issues/7313#issuecomment-811851884
-if [ "$(getconf LONG_BIT)" == "32" ] ; then
+# and
+# https://github.com/haskellari/lukko/issues/17
+#
+# $PLATFORM comes from CI.
+if [ "$(getconf LONG_BIT)" = "32" -o "${PLATFORM:=xxx}" = "x86_64-linux-centos7" ] ; then
     echo 'constraints: lukko -ofd-locking' >> cabal.project.release.local
 fi
 

From d2aeedf823801e5febae192810daef3d19c28647 Mon Sep 17 00:00:00 2001
From: Mikolaj Konarski <mikolaj.konarski@gmail.com>
Date: Mon, 6 Mar 2023 14:30:20 +0100
Subject: [PATCH 028/144] Add 3.10.1.0 changelogs and remove the used up tiny
 changlog files

---
 Cabal/ChangeLog.md                      |   3 +
 cabal-install/changelog                 |   3 +
 changelog.d/issue-1954                  |   4 -
 changelog.d/issue-4255                  |   4 -
 changelog.d/issue-4994                  |   4 -
 changelog.d/issue-7462                  |   4 -
 changelog.d/issue-8189                  |  11 --
 changelog.d/issue-8351                  |  11 --
 changelog.d/issue-8405                  |  14 --
 changelog.d/issue-8452                  |   8 -
 changelog.d/issue-8487                  |  12 --
 changelog.d/issue-8489                  |  11 --
 changelog.d/issue-8564                  |   5 -
 changelog.d/issue-8637                  |  13 --
 changelog.d/issue-8646                  |  10 --
 changelog.d/pr-7386                     |  32 ----
 changelog.d/pr-7794                     |   4 -
 changelog.d/pr-8162                     |  17 --
 changelog.d/pr-8220                     |  12 --
 changelog.d/pr-8237                     |   3 -
 changelog.d/pr-8240                     |  10 --
 changelog.d/pr-8261                     |   9 -
 changelog.d/pr-8281                     |   4 -
 changelog.d/pr-8309                     |   4 -
 changelog.d/pr-8311                     |   4 -
 changelog.d/pr-8339                     |   4 -
 changelog.d/pr-8358                     |  10 --
 changelog.d/pr-8368                     |  10 --
 changelog.d/pr-8414                     |  11 --
 changelog.d/pr-8432                     |  15 --
 changelog.d/pr-8441                     |  10 --
 changelog.d/pr-8493                     |  11 --
 changelog.d/pr-8496                     |  10 --
 changelog.d/pr-8498                     |  11 --
 changelog.d/pr-8499                     |   7 -
 changelog.d/pr-8500                     |  10 --
 changelog.d/pr-8506                     |   7 -
 changelog.d/pr-8510                     |   8 -
 changelog.d/pr-8528                     |  11 --
 changelog.d/pr-8534                     |  10 --
 changelog.d/pr-8556                     |  11 --
 changelog.d/pr-8561                     |   9 -
 changelog.d/pr-8582                     |   8 -
 changelog.d/pr-8607                     |  13 --
 changelog.d/pr-8633                     |   7 -
 changelog.d/pr-8636                     |   8 -
 changelog.d/pr-8640                     |  10 --
 changelog.d/pr-8647                     |  13 --
 changelog.d/pr-8648                     |  12 --
 changelog.d/pr-8657                     |  13 --
 changelog.d/pr-8663                     |  19 ---
 changelog.d/pr-8686                     |  11 --
 changelog.d/pr-8732                     |  10 --
 changelog.d/pr-8794                     |  10 --
 release-notes/Cabal-3.10.1.0.md         | 145 ++++++++++++++++
 release-notes/cabal-install-3.10.1.0.md | 213 ++++++++++++++++++++++++
 56 files changed, 364 insertions(+), 509 deletions(-)
 delete mode 100644 changelog.d/issue-1954
 delete mode 100644 changelog.d/issue-4255
 delete mode 100644 changelog.d/issue-4994
 delete mode 100644 changelog.d/issue-7462
 delete mode 100644 changelog.d/issue-8189
 delete mode 100644 changelog.d/issue-8351
 delete mode 100644 changelog.d/issue-8405
 delete mode 100644 changelog.d/issue-8452
 delete mode 100644 changelog.d/issue-8487
 delete mode 100644 changelog.d/issue-8489
 delete mode 100644 changelog.d/issue-8564
 delete mode 100644 changelog.d/issue-8637
 delete mode 100644 changelog.d/issue-8646
 delete mode 100644 changelog.d/pr-7386
 delete mode 100644 changelog.d/pr-7794
 delete mode 100644 changelog.d/pr-8162
 delete mode 100644 changelog.d/pr-8220
 delete mode 100644 changelog.d/pr-8237
 delete mode 100644 changelog.d/pr-8240
 delete mode 100644 changelog.d/pr-8261
 delete mode 100644 changelog.d/pr-8281
 delete mode 100644 changelog.d/pr-8309
 delete mode 100644 changelog.d/pr-8311
 delete mode 100644 changelog.d/pr-8339
 delete mode 100644 changelog.d/pr-8358
 delete mode 100644 changelog.d/pr-8368
 delete mode 100644 changelog.d/pr-8414
 delete mode 100644 changelog.d/pr-8432
 delete mode 100644 changelog.d/pr-8441
 delete mode 100644 changelog.d/pr-8493
 delete mode 100644 changelog.d/pr-8496
 delete mode 100644 changelog.d/pr-8498
 delete mode 100644 changelog.d/pr-8499
 delete mode 100644 changelog.d/pr-8500
 delete mode 100644 changelog.d/pr-8506
 delete mode 100644 changelog.d/pr-8510
 delete mode 100644 changelog.d/pr-8528
 delete mode 100644 changelog.d/pr-8534
 delete mode 100644 changelog.d/pr-8556
 delete mode 100644 changelog.d/pr-8561
 delete mode 100644 changelog.d/pr-8582
 delete mode 100644 changelog.d/pr-8607
 delete mode 100644 changelog.d/pr-8633
 delete mode 100644 changelog.d/pr-8636
 delete mode 100644 changelog.d/pr-8640
 delete mode 100644 changelog.d/pr-8647
 delete mode 100644 changelog.d/pr-8648
 delete mode 100644 changelog.d/pr-8657
 delete mode 100644 changelog.d/pr-8663
 delete mode 100644 changelog.d/pr-8686
 delete mode 100644 changelog.d/pr-8732
 delete mode 100644 changelog.d/pr-8794
 create mode 100644 release-notes/Cabal-3.10.1.0.md
 create mode 100644 release-notes/cabal-install-3.10.1.0.md

diff --git a/Cabal/ChangeLog.md b/Cabal/ChangeLog.md
index 2797caf4872..573337d81da 100644
--- a/Cabal/ChangeLog.md
+++ b/Cabal/ChangeLog.md
@@ -1,3 +1,6 @@
+# 3.10.1.0 [Mikolaj Konarski](mailto:mikolaj@well-typed.com) March 2023
+* See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.1.0.md
+
 # 3.8.1.0 [Mikolaj Konarski](mailto:mikolaj@well-typed.com) August 2022
   * See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.8.1.0.md
 
diff --git a/cabal-install/changelog b/cabal-install/changelog
index dc75160a186..063241f57c2 100644
--- a/cabal-install/changelog
+++ b/cabal-install/changelog
@@ -1,5 +1,8 @@
 -*-change-log-*-
 
+3.10.1.0 Mikolaj Konarski <mikolaj@well-typed.com> March 2023
+	* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.10.1.0.md
+
 3.8.1.0 Mikolaj Konarski <mikolaj@well-typed.com> August 2022
 	* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.8.1.0.md
 
diff --git a/changelog.d/issue-1954 b/changelog.d/issue-1954
deleted file mode 100644
index 49650160579..00000000000
--- a/changelog.d/issue-1954
+++ /dev/null
@@ -1,4 +0,0 @@
-synopsis: Add `cabal get --only-package-description`
-packages: cabal-install
-prs: #1977 #5162 #8263
-issues: #1954
diff --git a/changelog.d/issue-4255 b/changelog.d/issue-4255
deleted file mode 100644
index b1a5f199660..00000000000
--- a/changelog.d/issue-4255
+++ /dev/null
@@ -1,4 +0,0 @@
-synopsis: Avoid spurious warnings from -with-rtsopts
-packages: Cabal
-issues: #4255
-prs: #8183
diff --git a/changelog.d/issue-4994 b/changelog.d/issue-4994
deleted file mode 100644
index e5b829599d3..00000000000
--- a/changelog.d/issue-4994
+++ /dev/null
@@ -1,4 +0,0 @@
-synopsis: Do not print "up to date" for commands unless running "cabal build"
-packages: Cabal
-issues: #4994
-prs: #8569
diff --git a/changelog.d/issue-7462 b/changelog.d/issue-7462
deleted file mode 100644
index e12d63d793f..00000000000
--- a/changelog.d/issue-7462
+++ /dev/null
@@ -1,4 +0,0 @@
-synopsis: `cabal haddock` now implies `--enable-documentation`
-packages: cabal-install
-issues: #7462
-prs: #8259
diff --git a/changelog.d/issue-8189 b/changelog.d/issue-8189
deleted file mode 100644
index 0d7372e2db7..00000000000
--- a/changelog.d/issue-8189
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: Pretty-print run targets on failure
-packages: cabal-install
-prs: #8234
-issues: #8189
-
-description: {
-
-- Targets of the `run` command are pretty-printed when failing due to multiple targets. 
-- Duplicate targets are removed in the output.
-
-}
\ No newline at end of file
diff --git a/changelog.d/issue-8351 b/changelog.d/issue-8351
deleted file mode 100644
index 59101a589fc..00000000000
--- a/changelog.d/issue-8351
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: Expose BuildFlags and ClientHaddockFlags
-packages: cabal-install
-prs: #8353
-issues: #8351
-
-description: {
-
-Some types are present in public functions in cabal-install, but they are not exported.
-This PR fix it for BuildFlags and ClientHaddockFlags.
-
-}
\ No newline at end of file
diff --git a/changelog.d/issue-8405 b/changelog.d/issue-8405
deleted file mode 100644
index 5ed2759fec9..00000000000
--- a/changelog.d/issue-8405
+++ /dev/null
@@ -1,14 +0,0 @@
-synopsis: `cabal man` handles $PAGER containing arguments now
-packages: cabal-install
-prs: #8353
-issues: #8405
-
-description: {
-
-Things like `PAGER="less -FX" cabal man` work now.
-
-There's a slight change in the default behavior. We still use `less -R` as the default,
-but if the user passes `PAGER=less`, we won't add -R to that, unlike before. This is
-reasonable, as the user should be able to set the variable as they see fit.
-
-}
diff --git a/changelog.d/issue-8452 b/changelog.d/issue-8452
deleted file mode 100644
index 4cc4baa39e4..00000000000
--- a/changelog.d/issue-8452
+++ /dev/null
@@ -1,8 +0,0 @@
-synopsis: Fix issue with "nix" config option
-packages: cabal-install
-prs: #8522
-issues: #8452
-
-description: {
-    Nix option in config file was broken with #8054, this should fix it.
-}
\ No newline at end of file
diff --git a/changelog.d/issue-8487 b/changelog.d/issue-8487
deleted file mode 100644
index 432c74d81d6..00000000000
--- a/changelog.d/issue-8487
+++ /dev/null
@@ -1,12 +0,0 @@
-synopsis: "Build profile" message now reflects optimization level set in global config
-packages: cabal-install
-prs: #8488
-issues: #8487
-
-description: {
-
-Imagine you have `optimization: 2` in your `~/.cabal/config`, and you call `cabal build`
-in a project that doesn't have optimization level explicitly set in its project file.
-You will still see 'Build profile: -w ghc-<VER> -O1'. This is incorrect and was fixed
-in this patch: now you'll see '-O2'.
-}
diff --git a/changelog.d/issue-8489 b/changelog.d/issue-8489
deleted file mode 100644
index 32f4c25ff8d..00000000000
--- a/changelog.d/issue-8489
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: `ghc`, `ghc-boot`, `ghci` packages should be non-upgradable
-packages: cabal-install
-prs: #8501
-issues: #8489
-
-description: {
-
-- Changed both `Distribution.Client.Dependency`'s `dontUpgradeNonUpgradeablePackages`
-  and `Distribution.Solver.Modular.Solver`'s `nonInstallable` to be in sync.
-
-}
\ No newline at end of file
diff --git a/changelog.d/issue-8564 b/changelog.d/issue-8564
deleted file mode 100644
index b6882027f06..00000000000
--- a/changelog.d/issue-8564
+++ /dev/null
@@ -1,5 +0,0 @@
-synopsis: The `configure` script of `build-type: configure` packages now has access to the flag assignment of the package being built via the `CABAL_FLAGS` and `CABAL_FLAG_<flag>` environment variables
-packages: Cabal
-prs: #8565
-issues: #8564
-
diff --git a/changelog.d/issue-8637 b/changelog.d/issue-8637
deleted file mode 100644
index b584e187761..00000000000
--- a/changelog.d/issue-8637
+++ /dev/null
@@ -1,13 +0,0 @@
-synopsis: Apply command line flags to install packages
-packages: cabal-install
-prs: #8779
-issues: #8637
-
-description: {
-
-- Command line flags usually only apply to "local" packages (packages specified
-  in the cabal.project). This change causes the v2-install command to ignore
-  that distinction to better match the expected behavior for packages specified
-  directly in the command.
-
-}
diff --git a/changelog.d/issue-8646 b/changelog.d/issue-8646
deleted file mode 100644
index 6025a712a70..00000000000
--- a/changelog.d/issue-8646
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: Remove "'-main-is' is not portable" check
-packages: Cabal
-prs: #8651
-issues: #8646
-
-description: {
-
-'cabal check' no longer complains about '-main-is' flag in 'ghc-options'
-
-}
diff --git a/changelog.d/pr-7386 b/changelog.d/pr-7386
deleted file mode 100644
index 36c81b21e65..00000000000
--- a/changelog.d/pr-7386
+++ /dev/null
@@ -1,32 +0,0 @@
-synopsis: Switch to using XDG directories
-prs: #7386
-issues: #680
-significance: significant
-
-description: {
-
-Cabal/cabal-install now uses the XDG Base Directory Specification to
-store configuration, caches, and the store.  Specifically,
-`$XDG_CONFIG_HOME/cabal` stores the configuration file,
-`$XDG_CACHE_HOME/cabal` stores downloaded packages and similar, and
-`$XDG_STATE_HOME/cabal` mainly contains the store of compiled
-packages.  Further, `cabal install will put executables in
-`~/.local/bin` by default.
-
-The `dist`/`dist-newstyle` directories are not affected.
-
-On Windows, these XDG paths are mapped to other (hopefully)
-appropriate locations.  See the Cabal User Guide for information.
-
-If the `CABAL_DIR` environment variable is set, the indicated
-directory will be used to store all Cabal-related files, as in
-previous versions.
-
-Backwards compatibility: If `~/.cabal` already exists, this will be
-interpreted as `CABAL_DIR=~/.cabal`.  This means that upgrading on an
-existing system already using cabal-install should not cause any
-change in behaviour.  An existing system can be migrated by deleting
-`~/.cabal` (possibly copying `~/.cabal/config` to
-`~/.config/cabal/config` first).
-
-}
diff --git a/changelog.d/pr-7794 b/changelog.d/pr-7794
deleted file mode 100644
index 744707b1255..00000000000
--- a/changelog.d/pr-7794
+++ /dev/null
@@ -1,4 +0,0 @@
-synopsis: Include extra-lib-dirs-static into PackageHash
-packages: cabal-install
-prs: #7794
-issues: #6935
\ No newline at end of file
diff --git a/changelog.d/pr-8162 b/changelog.d/pr-8162
deleted file mode 100644
index de63109cb99..00000000000
--- a/changelog.d/pr-8162
+++ /dev/null
@@ -1,17 +0,0 @@
-synopsis: Added haddock-project command
-packages: cabal-install
-prs: #8162
-issues: #7669
-description: {
-
-The `haddock-project` command can be used to build documentation of multiple
-packages.  By passing `--local` option the directory will be self contained,
-by passing `--hackage` links to dependencies will link to `hackage`.  Both
-`--local` and `--hackage` options imply `--quickfix`, `--gen-index`,
-`--gen-contents`, and `--hyperlinked-source`.
-
-Building self contained directory is the default, unless `--hackage` or
-`--html-location`.
-
-The PR #8162 also fixes the `--with-haddock` option.
-}
diff --git a/changelog.d/pr-8220 b/changelog.d/pr-8220
deleted file mode 100644
index 4df5b0ca56c..00000000000
--- a/changelog.d/pr-8220
+++ /dev/null
@@ -1,12 +0,0 @@
-synopsis: Fix generation of Path_ modules with relocatable
-packages: Cabal
-prs: #8220
-issues: #8219
-description: {
-
-The generation of the functions `minusFileName` and `splitFileName`
-are now in the same conditional block as their call,
-preventing generation of inconsistent Paths_ files
-where those functions are used but not defined.
-
-}
diff --git a/changelog.d/pr-8237 b/changelog.d/pr-8237
deleted file mode 100644
index e4e6f4fae66..00000000000
--- a/changelog.d/pr-8237
+++ /dev/null
@@ -1,3 +0,0 @@
-synopsis: Document `cabal check` in the user guide
-packages: cabal-install
-prs: #8237
diff --git a/changelog.d/pr-8240 b/changelog.d/pr-8240
deleted file mode 100644
index 51722217aea..00000000000
--- a/changelog.d/pr-8240
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: Print a warning when assertions are enabled
-packages: cabal-install
-prs: #8240
-issues: #4377
-
-description: {
-
-- Now cabal-install executable will print a warning if assertions are enabled
-
-}
diff --git a/changelog.d/pr-8261 b/changelog.d/pr-8261
deleted file mode 100644
index 55be68e49a0..00000000000
--- a/changelog.d/pr-8261
+++ /dev/null
@@ -1,9 +0,0 @@
-synopsis: Implement --prefer-oldest
-packages: cabal-install
-prs: #8261
-
-description: {
-
-- Implement `--prefer-oldest` flag for Cabal solver, which tries to find a build plan with the oldest versions possible. This is useful to establish lower bounds.
-
-}
diff --git a/changelog.d/pr-8281 b/changelog.d/pr-8281
deleted file mode 100644
index 9e62a5c9ea6..00000000000
--- a/changelog.d/pr-8281
+++ /dev/null
@@ -1,4 +0,0 @@
-synopsis: Relax language selection parsing in `cabal init`
-packages: Cabal-syntax
-prs: #8281
-issues: #8278
diff --git a/changelog.d/pr-8309 b/changelog.d/pr-8309
deleted file mode 100644
index cbbd417b8ec..00000000000
--- a/changelog.d/pr-8309
+++ /dev/null
@@ -1,4 +0,0 @@
-synopsis: Add documentation for cabal-install commands: user-config,
-report, list, init, fetch, info, upload, get.
-prs: #8309
-issues: #8308 #7884 #7978
diff --git a/changelog.d/pr-8311 b/changelog.d/pr-8311
deleted file mode 100644
index 87f72a47a44..00000000000
--- a/changelog.d/pr-8311
+++ /dev/null
@@ -1,4 +0,0 @@
-synopsis: Export pretty printer `ppPackageCheck` from
-Distribution.PackageDescription.Check
-packages: Cabal
-prs: #8311
diff --git a/changelog.d/pr-8339 b/changelog.d/pr-8339
deleted file mode 100644
index 1e602c1e985..00000000000
--- a/changelog.d/pr-8339
+++ /dev/null
@@ -1,4 +0,0 @@
-synopsis: Add check for upper bound on any dependency in cabal check
-report, list, init, fetch, info, upload, get.
-prs: #8339
-issues: #8291
diff --git a/changelog.d/pr-8358 b/changelog.d/pr-8358
deleted file mode 100644
index ef1afa7e3b9..00000000000
--- a/changelog.d/pr-8358
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: Update and sdist now only check for compiler when project file has conditionals
-packages: cabal-install
-prs: #8358 #8627
-issues: #8352 #8550 #8589
-
-description: {
-
-- Cabal update and sdist will not require a ghc in path unless the project has conditionals that require it
-
-}
diff --git a/changelog.d/pr-8368 b/changelog.d/pr-8368
deleted file mode 100644
index cf74efb48d7..00000000000
--- a/changelog.d/pr-8368
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: Allow offline bootstrapping of cabal-install
-prs: #8368
-packages: cabal-install
-
-description: {
-
-- The bootstrap script for cabal-install now supports fetching the sources of the dependencies in a separate step.
-  One can then copy over the resulting archive and perform offline bootstrapping of cabal-install.
-
-}
\ No newline at end of file
diff --git a/changelog.d/pr-8414 b/changelog.d/pr-8414
deleted file mode 100644
index b046cea70e0..00000000000
--- a/changelog.d/pr-8414
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: Pass some haddock flags to dependencies
-packages: cabal-install
-prs: #8414
-issues: #8104 #395
-
-description: {
-
-- Pass "--haddock-hoogle", "--haddock-html", "--haddock-internal", "--haddock-quickjump", "--haddock-hyperlinked-source"
-  to all the dependencies if they are specified as command line args
-
-}
diff --git a/changelog.d/pr-8432 b/changelog.d/pr-8432
deleted file mode 100644
index 2ac22987260..00000000000
--- a/changelog.d/pr-8432
+++ /dev/null
@@ -1,15 +0,0 @@
-synopsis: Remove warning on option -threaded when building libraries
-packages: Cabal
-prs: #8432
-issues: #8431 #774
-
-description: {
-
-- Accompanied by option `-flink-rts`, option `-threaded` defines the flavour of
-  the ghc RTS library the built library will be linked against. Note that bare
-  ghc does not warn when option `-threaded` is used for building a library
-  either.
-- Note that the changes require modification of the regression check for issue
-  #774 which can be regarded as a proper test for this PR.
-
-}
diff --git a/changelog.d/pr-8441 b/changelog.d/pr-8441
deleted file mode 100644
index 39e8feac2c5..00000000000
--- a/changelog.d/pr-8441
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: Add warning about expensive globs
-packages: Cabal
-prs: #8441
-issues: #5311
-description: {
-
-- Now cabal check will emit a warning when package uses 
-recursive globs starting at root of the project
-
-}
diff --git a/changelog.d/pr-8493 b/changelog.d/pr-8493
deleted file mode 100644
index 27344116e27..00000000000
--- a/changelog.d/pr-8493
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: Add language extensions DeepSubsumption and TypeData
-packages: Cabal-syntax
-prs: #8493
-significance: significant
-
-description: {
-
-- adds support for the DeepSubsumption language extension (GHC proposal #511)
-- adds support for the TypeData language extension (GHC proposal #106)
-
-}
diff --git a/changelog.d/pr-8496 b/changelog.d/pr-8496
deleted file mode 100644
index d35a68d867e..00000000000
--- a/changelog.d/pr-8496
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: build pkgconfig db individually when bulk fails
-packages: cabal-install cabal-install-solver
-prs: #8496
-issues: #8494
-
-description: {
-
-- When pkg-config fails to get versions for all packages in bulk, falls back to querying one-by-one.
-
-}
diff --git a/changelog.d/pr-8498 b/changelog.d/pr-8498
deleted file mode 100644
index b285ef0210b..00000000000
--- a/changelog.d/pr-8498
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: improve install target handling logic regarding of project files
-packages: cabal-install
-issues: #8352 #8094
-prs: #8498
-
-description: {
-
-- fixes an issue where cabal install pkg-x.y.z fails unless --ignore-project is given
-- fixes an issue where cabal install --ignore-project crashes when project file is present
-
-}
diff --git a/changelog.d/pr-8499 b/changelog.d/pr-8499
deleted file mode 100644
index f909fbf18fd..00000000000
--- a/changelog.d/pr-8499
+++ /dev/null
@@ -1,7 +0,0 @@
-synopsis: orders extra stanzas
-packages: Cabal
-prs: #8499
-issues: #8458
-description: {
-    Ensure that extra-src-dirs, extra sources, and extra other modules all are added using ordNub rather than incidentally alphabetized.
-}
diff --git a/changelog.d/pr-8500 b/changelog.d/pr-8500
deleted file mode 100644
index a443764e90f..00000000000
--- a/changelog.d/pr-8500
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: Redownload pkgs when source hash verification fails
-packages: cabal-install
-prs: #8500
-issues: #7541
-
-description: {
-
-- Cabal-install will verify source hashes on cached downloads against the current index, and redownload on mismatch. (Which can occur with e.g. head.hackage)
-
-}
diff --git a/changelog.d/pr-8506 b/changelog.d/pr-8506
deleted file mode 100644
index 445f2320e69..00000000000
--- a/changelog.d/pr-8506
+++ /dev/null
@@ -1,7 +0,0 @@
-synopsis: prepend rather than append extra prog path
-packages: Cabal
-prs: #8506
-issues: #6304
-description: {
-    Prepends the extra-prog-path to the system path rather than appending, to allow binaries in the extra path to override defaults.
-}
diff --git a/changelog.d/pr-8510 b/changelog.d/pr-8510
deleted file mode 100644
index 2c29db01ab1..00000000000
--- a/changelog.d/pr-8510
+++ /dev/null
@@ -1,8 +0,0 @@
-synopsis: don't send non-extant extra-lib-dirs to ghc
-packages: Cabal
-prs: #8510
-issues: #6492
-
-description: {
-If an extra-libs-dir does not exist, it does not get sent to ghc, which can error on windows.
-}
diff --git a/changelog.d/pr-8528 b/changelog.d/pr-8528
deleted file mode 100644
index d11da20adbe..00000000000
--- a/changelog.d/pr-8528
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: Add support for ghc-9.4s -fprof-late flag.
-packages: Cabal cabal-install
-prs: #8528
-
-description: {
-
-- This adds the new late-toplevel profiling-detail option which enables `-fprof-late` based automatic cost centre annotations for ghcs which support it.
-
-}
-
-
diff --git a/changelog.d/pr-8534 b/changelog.d/pr-8534
deleted file mode 100644
index 2e654063ca6..00000000000
--- a/changelog.d/pr-8534
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: Add PackageInfo_ module
-packages: Cabal
-prs: #8534
-significance: significant
-
-description: {
-
-- Add PackageInfo_ module to embed portable package-related informations (issue #3909)
-
-}
diff --git a/changelog.d/pr-8556 b/changelog.d/pr-8556
deleted file mode 100644
index bb4e7894427..00000000000
--- a/changelog.d/pr-8556
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: Add installDirs (datadir, etc) to v2-build and remove them from v2-install
-packages: cabal-install
-prs: #8556
-significance: significant
-
-description: {
-
-- Passes through --prefix --datadir and other installdir arguments properly in v2-build, allowing its use in perparing somewhat more relocatable compilation targets (no worse than v1-build).
-- Removes these flags (which never worked) from v2-install
-
-}
diff --git a/changelog.d/pr-8561 b/changelog.d/pr-8561
deleted file mode 100644
index f860867228c..00000000000
--- a/changelog.d/pr-8561
+++ /dev/null
@@ -1,9 +0,0 @@
-synopsis: cabal init -i should sanitize package name guessed from the directory name
-packages: cabal-install
-prs: #8561
-issues: #8404
-description: {
-    If the current directory name has any non-alphanumeric symbol in its name, the symbol will be replaced with a dash. Also, will make sure that the resulting package name starts with a letter.
-
-    This worked for cabal init -n already, and this PR only moves code around so that cabal init -i also benefits from this logic.
-}
diff --git a/changelog.d/pr-8582 b/changelog.d/pr-8582
deleted file mode 100644
index 01889700ea9..00000000000
--- a/changelog.d/pr-8582
+++ /dev/null
@@ -1,8 +0,0 @@
-synopsis: Improve mutually recursive unit identifier error message
-packages: Cabal
-prs: #8582
-description: {
-Improves the error message in case of mutually recursive unit identifiers
-by specifying the name of the identifier, the name of the signature, and a suggestion
-to check the 'build-depends:' section.
-}
diff --git a/changelog.d/pr-8607 b/changelog.d/pr-8607
deleted file mode 100644
index 8490646121f..00000000000
--- a/changelog.d/pr-8607
+++ /dev/null
@@ -1,13 +0,0 @@
-synopsis: No global packages auto written to env files, allow --force-reinstalls
-packages: cabal-install
-issues: #6165 #5559
-prs: #8607
-significance: significant
-
-description: {
-
-- When v2-install runs on a library, it does not pin global packages in the env file, only those directly necessary for the library.
-
--- Further, it now fails if there is a reinstall in the plan, and suggests the --force-reinstalls flag, which also now works, cleaning out previous entries from the env file for any target which is reinstalled.
-
-}
diff --git a/changelog.d/pr-8633 b/changelog.d/pr-8633
deleted file mode 100644
index 2aafda9a837..00000000000
--- a/changelog.d/pr-8633
+++ /dev/null
@@ -1,7 +0,0 @@
-synopsis: Specify default exe extension on wasm32 to be .wasm
-packages: Cabal
-prs: #8633
-issues:
-description: {
-  Specify default exe extension on wasm32 to be .wasm, following the convention in other WebAssembly toolchains.
-}
diff --git a/changelog.d/pr-8636 b/changelog.d/pr-8636
deleted file mode 100644
index 863104601e1..00000000000
--- a/changelog.d/pr-8636
+++ /dev/null
@@ -1,8 +0,0 @@
-synopsis: Support `js-sources` with GHC, not only with GHCJS
-prs: #8636
-description: {
-
-- Take into account js-sources when building library components with GHC
-- Missing support for js-sources in executable components is tracked in #8639
-
-}
diff --git a/changelog.d/pr-8640 b/changelog.d/pr-8640
deleted file mode 100644
index 2ea80c8dc32..00000000000
--- a/changelog.d/pr-8640
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: Fix extra-source-file rebuild tracking when run in a multi-package project
-packages: cabal-install
-issues: #8632 #8634
-prs: #8640
-
-description: {
-
-- Fixes an issue where glob expansion of extra-source-files for rebuild tracking purposes was not occuring correctly when run in a multi-package setting (i.e. when the globs needed to be expanded relative to something other than ".").
-
-}
diff --git a/changelog.d/pr-8647 b/changelog.d/pr-8647
deleted file mode 100644
index 341e492b7f0..00000000000
--- a/changelog.d/pr-8647
+++ /dev/null
@@ -1,13 +0,0 @@
-synopsis: No up-front warning that assertions are on for special commands (help, version, numeric-version)
-packages: cabal-install
-prs: #8647
-issues: #8645
-
-description: {
-
-- When compiled with ghc option `-fno-ignore-assert`, `cabal-install` will issue a generic warning that assertions are on.
-  This warning will no longer be emitted for special modes of operation like `cabal --numeric-version`, `--version` and help,
-  and also not if `cabal` could not parse its command line.
-  Further, the warning now goes to `stderr` rather than `stdout`.
-
-}
diff --git a/changelog.d/pr-8648 b/changelog.d/pr-8648
deleted file mode 100644
index 7a4e47931e8..00000000000
--- a/changelog.d/pr-8648
+++ /dev/null
@@ -1,12 +0,0 @@
-synopsis: Tiny refactor of how Cabal handles configure scripts
-packages: Cabal
-prs: #8648
-
-description: {
-None of this is visible downstream
-
-- Remove needless parameter on one private function.
-
-- Move another internal function (and ones that only it uses from the same module) to new private module.
-
-}
diff --git a/changelog.d/pr-8657 b/changelog.d/pr-8657
deleted file mode 100644
index 752d79ca135..00000000000
--- a/changelog.d/pr-8657
+++ /dev/null
@@ -1,13 +0,0 @@
-synopsis: Warn if expected files are omitted from extra-doc-files
-packages: Cabal
-prs: #8657
-issues: #3964
-
-description: {
-
-- Emit a warning if there exist a “changelog” file at the root of the
-  package which is not included in any field.
-- Emit a warning if a “changelog” file at the root of the package is included 
-  in a field different from “extra-doc-files” (Cabal spec >= 1.18) or 
-  “extra-source-files” (spec < 1.18).
-}
\ No newline at end of file
diff --git a/changelog.d/pr-8663 b/changelog.d/pr-8663
deleted file mode 100644
index f70b312fb2b..00000000000
--- a/changelog.d/pr-8663
+++ /dev/null
@@ -1,19 +0,0 @@
-synopsis:  Fix and improve list parser of cabal init cli
-packages: cabal-install
-prs: #8663
-issues: #8659
-
-description: {
-Occurrences of 'Flag [a]' seem to behave in an unexpected way. The monoid
-instance of 'Flag' is right associative and discard the value on the
-left, but we want to merge the contents of 'Flag'.
-
-Permits:
-- cabal init -d base -d vector -d containers
-
-Fixes for all Flag '[a]' the cli parser in cabal init. Adds cli parser tests.
-
-Adds the feature to specify a comma-separated list of dependencies:
-- cabal init -d base,vector,containers
-
-}
diff --git a/changelog.d/pr-8686 b/changelog.d/pr-8686
deleted file mode 100644
index 4db79be2d6b..00000000000
--- a/changelog.d/pr-8686
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: Fix resolution of imports by relative paths in cabal.project
-packages: cabal-install
-prs: #8686
-
-description: {
-
-Fix bug where cabal tries to resolve imports by relative paths against
-the directory cabal executable was invoked in rather than directory of
-cabal.project file that does the import.
-
-}
diff --git a/changelog.d/pr-8732 b/changelog.d/pr-8732
deleted file mode 100644
index 2417885d15b..00000000000
--- a/changelog.d/pr-8732
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: Fix repl discarding --build-depends
-packages: cabal-install
-prs: #8732
-issues: #6859 #7081
-
-description: {
-
-- Fix `repl` command discarding `--build-depends` argument when using 
-  `allow-newer` or `allow-older`.
-}
\ No newline at end of file
diff --git a/changelog.d/pr-8794 b/changelog.d/pr-8794
deleted file mode 100644
index 10babd5d420..00000000000
--- a/changelog.d/pr-8794
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: Disallow GHC <8.0 for 
-packages: Cabal Cabal-syntax cabal-install-solver
-prs: #8794
-issues: #8715 #7531
-
-description: {
-
-Disallow GHC <8.0 by restricting the version of base that can be used to at least 4.9
-
-}
diff --git a/release-notes/Cabal-3.10.1.0.md b/release-notes/Cabal-3.10.1.0.md
new file mode 100644
index 00000000000..02824484dae
--- /dev/null
+++ b/release-notes/Cabal-3.10.1.0.md
@@ -0,0 +1,145 @@
+Cabal and Cabal-syntax 3.10.1.0 changelog and release notes
+---
+
+Release 3.10.1.0 of cabal now sets the `--enable-documentation` option by default
+when running `cabal haddock` (https://github.com/haskell/cabal/issues/7462).
+If the new default does not fit your workflow, pass an explicit `--disable-documentation`
+option or consider (helping to implement) the other workarounds proposed
+in https://github.com/haskell/cabal/issues/8725.
+
+This version of cabal introduces support for JS cross-compilation (https://github.com/haskell/cabal/pull/8636).
+We've seen related Windows segfaults on CI, so please kindly report if you can reproduce either
+cabal or GHC segfaults when cross-compiling for JS or compiling normally but with any files
+listed in the `js-sources` field of a .cabal file.
+
+This release of cabal also fixes a lot of bugs in cabal 3.8.1.0 and not all of the fixes
+are listed here.
+
+
+### Significant changes
+
+- Add support for the XDG Base Directory Specification [#680](https://github.com/haskell/cabal/issues/680) [#7386](https://github.com/haskell/cabal/pull/7386)
+
+  Cabal/cabal-install now uses the XDG Base Directory Specification to
+  store configuration, caches, and the store.  Specifically,
+  `$XDG_CONFIG_HOME/cabal` stores the configuration file,
+  `$XDG_CACHE_HOME/cabal` stores downloaded packages and similar, and
+  `$XDG_STATE_HOME/cabal` mainly contains the store of compiled
+  packages.  Further, `cabal install` will put executables in
+  `~/.local/bin` by default.
+
+  The `dist`/`dist-newstyle` directories are not affected.
+
+  On Windows, these XDG paths are mapped to other (hopefully)
+  appropriate locations.  See the Cabal User Guide for information.
+
+  If the `CABAL_DIR` environment variable is set, the indicated
+  directory will be used to store all Cabal-related files, as in
+  previous versions.
+
+  **Backwards compatibility**: If `~/.cabal` already exists, this will be
+  interpreted as `CABAL_DIR=~/.cabal`.  This means that upgrading on an
+  existing system already using cabal-install should not cause any
+  change in behaviour.  An existing system can be migrated by deleting
+  `~/.cabal` (possibly copying `~/.cabal/config` to
+  `~/.config/cabal/config` first).
+
+- Add `PackageInfo_` module [#8534](https://github.com/haskell/cabal/pull/8534)
+
+  - Add `PackageInfo_` module to embed portable package-related informations (issue #3909)
+
+- *Cabal-syntax* Add language extensions `DeepSubsumption` and `TypeData` [#8493](https://github.com/haskell/cabal/pull/8493)
+
+  - adds support for the `DeepSubsumption` language extension ([GHC proposal #511](https://github.com/ghc-proposals/ghc-proposals/pull/511))
+  - adds support for the `TypeData` language extension ([GHC proposal #106](https://github.com/ghc-proposals/ghc-proposals/pull/106))
+
+- Add support for GHC 9.4+ `-fprof-late` flag. [#8528](https://github.com/haskell/cabal/pull/8528)
+
+- This adds the new `late-toplevel` (and its alias `late`) profiling-detail option which enables `-fprof-late`-based automatic cost centre annotations for GHCs that support it ([earliest is GHC 9.4.1](https://downloads.haskell.org/ghc/9.4.1/docs/users_guide/profiling.html#ghc-flag--fprof-late)).
+
+
+### Other changes
+
+- Remove "'-main-is' is not portable" check [#8646](https://github.com/haskell/cabal/issues/8646) [#8651](https://github.com/haskell/cabal/pull/8651)
+
+  `cabal check` no longer complains about `-main-is` flag in `ghc-options`
+
+- Fix generation of Path_ modules with relocatable [#8219](https://github.com/haskell/cabal/issues/8219) [#8220](https://github.com/haskell/cabal/pull/8220)
+
+  The generation of the functions `minusFileName` and `splitFileName`
+  are now in the same conditional block as their call,
+  preventing generation of inconsistent Paths_ files
+  where those functions are used but not defined.
+
+- Remove warning on option -threaded when building libraries [#774](https://github.com/haskell/cabal/issues/774) [#8431](https://github.com/haskell/cabal/issues/8431) [#8432](https://github.com/haskell/cabal/pull/8432)
+
+  - Accompanied by option `-flink-rts`, option `-threaded` defines the flavour of
+    the ghc RTS library the built library will be linked against. Note that bare
+    ghc does not warn when option `-threaded` is used for building a library
+    either.
+  - Note that the changes require modification of the regression check for issue
+    #774 which can be regarded as a proper test for this PR.
+
+- Add warning about expensive globs [#5311](https://github.com/haskell/cabal/issues/5311) [#8441](https://github.com/haskell/cabal/pull/8441)
+
+  - Now cabal check will emit a warning when package uses
+  recursive globs starting at root of the project
+
+- Order `extra*` stanzas [#8458](https://github.com/haskell/cabal/issues/8458) [#8499](https://github.com/haskell/cabal/pull/8499)
+
+  Ensure that `extra-src-dirs`, extra sources, and extra other modules all are added using `ordNub` rather than incidentally alphabetized.
+
+- Prepend rather than append `extra-prog-path` [#6304](https://github.com/haskell/cabal/issues/6304) [#8506](https://github.com/haskell/cabal/pull/8506)
+
+  Prepends the `extra-prog-path` to the system path rather than appending, to allow binaries in the extra path to override defaults.
+
+- don't send non-extant `extra-lib-dirs` to GHC [#6492](https://github.com/haskell/cabal/issues/6492) [#8510](https://github.com/haskell/cabal/pull/8510)
+
+  If an extra-libs-dir does not exist, it does not get sent to ghc, which can error on windows.
+
+- Improve mutually recursive unit identifier error message [#8582](https://github.com/haskell/cabal/pull/8582)
+
+  Improves the error message in case of mutually recursive unit identifiers
+  by specifying the name of the identifier, the name of the signature, and a suggestion
+  to check the 'build-depends:' section.
+
+- Specify default exe extension on wasm32 to be .wasm [#8633](https://github.com/haskell/cabal/pull/8633)
+
+  Specify default exe extension on wasm32 to be .wasm, following the convention in other WebAssembly toolchains.
+
+- Support `js-sources` with GHC, not only with GHCJS [#8636](https://github.com/haskell/cabal/pull/8636)
+
+  - Take into account js-sources when building library components with GHC
+  - Missing support for js-sources in executable components is tracked in #8639
+
+- Tiny refactor of how Cabal handles configure scripts [#8648](https://github.com/haskell/cabal/pull/8648)
+
+  None of this is visible downstream
+
+  - Remove needless parameter on one private function.
+
+  - Move another internal function (and ones that only it uses from the same module) to new private module.
+
+- Warn if expected files are omitted from extra-doc-files [#3964](https://github.com/haskell/cabal/issues/3964) [#8657](https://github.com/haskell/cabal/pull/8657)
+
+  - Emit a warning if there exist a “changelog” file at the root of the
+    package which is not included in any field.
+  - Emit a warning if a “changelog” file at the root of the package is included
+    in a field different from “extra-doc-files” (Cabal spec >= 1.18) or
+    “extra-source-files” (spec < 1.18).
+
+- Disallow GHC <8.0 for  [#7531](https://github.com/haskell/cabal/issues/7531) [#8715](https://github.com/haskell/cabal/issues/8715) [#8794](https://github.com/haskell/cabal/pull/8794)
+
+  Disallow GHC <8.0 by restricting the version of base that can be used to at least 4.9
+
+- Avoid spurious warnings from -with-rtsopts [#4255](https://github.com/haskell/cabal/issues/4255) [#8183](https://github.com/haskell/cabal/pull/8183)
+
+- Do not print "up to date" for commands unless running "cabal build" [#4994](https://github.com/haskell/cabal/issues/4994) [#8569](https://github.com/haskell/cabal/pull/8569)
+
+- The `configure` script of `build-type: configure` packages now has access to the flag assignment of the package being built via the `CABAL_FLAGS` and `CABAL_FLAG_<flag>` environment variables [#8564](https://github.com/haskell/cabal/issues/8564) [#8565](https://github.com/haskell/cabal/pull/8565)
+
+- Export pretty printer `ppPackageCheck` from [#8311](https://github.com/haskell/cabal/pull/8311)
+
+- Add check for upper bound on any dependency in `cabal check` [#8291](https://github.com/haskell/cabal/issues/8291) [#8339](https://github.com/haskell/cabal/pull/8339)
+
+- *Cabal-syntax* Relax language selection parsing in `cabal init` [#8278](https://github.com/haskell/cabal/issues/8278) [#8281](https://github.com/haskell/cabal/pull/8281)
diff --git a/release-notes/cabal-install-3.10.1.0.md b/release-notes/cabal-install-3.10.1.0.md
new file mode 100644
index 00000000000..88cae108891
--- /dev/null
+++ b/release-notes/cabal-install-3.10.1.0.md
@@ -0,0 +1,213 @@
+cabal-install and cabal-install-solver 3.10.1.0 changelog and release notes
+---
+
+Release 3.10.1.0 of cabal now sets the `--enable-documentation` option by default
+when running `cabal haddock` (https://github.com/haskell/cabal/issues/7462).
+If the new default does not fit your workflow, pass an explicit `--disable-documentation`
+option or consider (helping to implement) the other workarounds proposed
+in https://github.com/haskell/cabal/issues/8725.
+
+This version of cabal introduces support for JS cross-compilation (https://github.com/haskell/cabal/pull/8636).
+We've seen related Windows segfaults on CI, so please kindly report if you can reproduce either
+cabal or GHC segfaults when cross-compiling for JS or compiling normally but with any files
+listed in the `js-sources` field of a .cabal file.
+
+This release of cabal also fixes a lot of bugs in cabal 3.8.1.0 and not all of the fixes
+are listed here.
+
+
+### Significant changes
+
+- `Cabal-3.10.1.0` is used, which brings [its own set of changes](./Cabal-3.10.1.0.md),
+  many of which are significant. The Cabal and Cabal-syntax changes that touch
+  the cabal-install or cabal-install-solver codebases are pasted here again in full.
+
+- Add support for the XDG Base Directory Specification [#680](https://github.com/haskell/cabal/issues/680) [#7386](https://github.com/haskell/cabal/pull/7386)
+
+  Cabal/cabal-install now uses the XDG Base Directory Specification to
+  store configuration, caches, and the store.  Specifically,
+  `$XDG_CONFIG_HOME/cabal` stores the configuration file,
+  `$XDG_CACHE_HOME/cabal` stores downloaded packages and similar, and
+  `$XDG_STATE_HOME/cabal` mainly contains the store of compiled
+  packages.  Further, `cabal install` will put executables in
+  `~/.local/bin` by default.
+
+  The `dist`/`dist-newstyle` directories are not affected.
+
+  On Windows, these XDG paths are mapped to other (hopefully)
+  appropriate locations.  See the Cabal User Guide for information.
+
+  If the `CABAL_DIR` environment variable is set, the indicated
+  directory will be used to store all Cabal-related files, as in
+  previous versions.
+
+  **Backwards compatibility**: If `~/.cabal` already exists, this will be
+  interpreted as `CABAL_DIR=~/.cabal`.  This means that upgrading on an
+  existing system already using cabal-install should not cause any
+  change in behaviour.  An existing system can be migrated by deleting
+  `~/.cabal` (possibly copying `~/.cabal/config` to
+  `~/.config/cabal/config` first).
+
+- Add `installDirs` (`datadir`, etc) to v2-build and remove them from v2-install [#8556](https://github.com/haskell/cabal/pull/8556)
+
+  - Passes through `--prefix`, `--datadir` and other `installdir`-arguments properly in v2-build, allowing its use in preparing somewhat more relocatable compilation targets (no worse than v1-build).
+  - Removes these flags (which never worked) from v2-install
+
+- No global packages auto written to environment files, allow `--force-reinstalls` [#5559](https://github.com/haskell/cabal/issues/5559) [#6165](https://github.com/haskell/cabal/issues/6165) [#8607](https://github.com/haskell/cabal/pull/8607)
+
+  - When v2-install runs on a library, it does not pin global packages in the env file, only those directly necessary for the library.
+
+- Add support for GHC 9.4+ `-fprof-late` flag [#8528](https://github.com/haskell/cabal/pull/8528)
+
+  - This adds the new `late-toplevel` (and its alias `late`) profiling-detail option which enables `-fprof-late`-based automatic cost centre annotations for GHCs that support it ([earliest is GHC 9.4.1](https://downloads.haskell.org/ghc/9.4.1/docs/users_guide/profiling.html#ghc-flag--fprof-late)).
+
+- Added `haddock-project` command [#7669](https://github.com/haskell/cabal/issues/7669) [#8162](https://github.com/haskell/cabal/pull/8162)
+
+  The `haddock-project` command can be used to build documentation of multiple
+  packages.  By passing `--local` option the directory will be self contained,
+  by passing `--hackage` links to dependencies will link to `hackage`.  Both
+  `--local` and `--hackage` options imply `--quickfix`, `--gen-index`,
+  `--gen-contents`, and `--hyperlinked-source`.
+
+  Building self contained directory is the default, unless `--hackage` or
+  `--html-location`.
+
+  The PR #8162 also fixes the `--with-haddock` option.
+
+
+### Other changes
+
+- Pretty-print run targets on failure [#8189](https://github.com/haskell/cabal/issues/8189) [#8234](https://github.com/haskell/cabal/pull/8234)
+
+  - Targets of the `run` command are pretty-printed when failing due to multiple targets.
+  - Duplicate targets are removed in the output.
+
+- Expose `BuildFlags` and `ClientHaddockFlags` [#8351](https://github.com/haskell/cabal/issues/8351) [#8353](https://github.com/haskell/cabal/pull/8353)
+
+  Some types are present in public functions in cabal-install, but they are not exported.
+  This PR fix it for BuildFlags and ClientHaddockFlags.
+
+- `cabal man` handles `$PAGER` containing arguments now [#8405](https://github.com/haskell/cabal/issues/8405) [#8353](https://github.com/haskell/cabal/pull/8353)
+
+  Things like `PAGER="less -FX" cabal man` work now.
+
+  There's a slight change in the default behavior. We still use `less -R` as the default,
+  but if the user passes `PAGER=less`, we won't add -R to that, unlike before. This is
+  reasonable, as the user should be able to set the variable as they see fit.
+
+- Fix issue with "nix" config option [#8452](https://github.com/haskell/cabal/issues/8452) [#8522](https://github.com/haskell/cabal/pull/8522)
+
+  Nix option in config file was broken with [#8054](https://github.com/haskell/cabal/pull/8054), this should fix it.
+
+- "Build profile" message now reflects optimization level set in global config [#8487](https://github.com/haskell/cabal/issues/8487) [#8488](https://github.com/haskell/cabal/pull/8488)
+
+  Imagine you have `optimization: 2` in your `~/.cabal/config`, and you call `cabal build`
+  in a project that doesn't have optimization level explicitly set in its project file.
+  You will still see 'Build profile: -w ghc-<VER> -O1'. This is incorrect and was fixed
+  in this patch: now you'll see '-O2'.
+
+- `ghc`, `ghc-boot`, `ghci` packages should be non-upgradable [#8489](https://github.com/haskell/cabal/issues/8489) [#8501](https://github.com/haskell/cabal/pull/8501)
+
+  - Changed both `Distribution.Client.Dependency`'s `dontUpgradeNonUpgradeablePackages`
+    and `Distribution.Solver.Modular.Solver`'s `nonInstallable` to be in sync.
+
+- Apply command line flags to install packages [#8637](https://github.com/haskell/cabal/issues/8637) [#8779](https://github.com/haskell/cabal/pull/8779)
+
+  - Command line flags usually only apply to "local" packages (packages specified
+    in the cabal.project). This change causes the v2-install command to ignore
+    that distinction to better match the expected behavior for packages specified
+    directly in the command.
+
+- Print a warning when assertions are enabled [#4377](https://github.com/haskell/cabal/issues/4377) [#8240](https://github.com/haskell/cabal/pull/8240)
+
+  - Now cabal-install executable will print a warning if assertions are enabled
+
+- Implement `--prefer-oldest` [#8261](https://github.com/haskell/cabal/pull/8261)
+
+  - The new flag makes Cabal solver try to find a build plan with the oldest versions possible. This is useful to establish lower bounds.
+
+- Update and sdist now only check for compiler when project file has conditionals [#8352](https://github.com/haskell/cabal/issues/8352) [#8550](https://github.com/haskell/cabal/issues/8550) [#8589](https://github.com/haskell/cabal/issues/8589) [#8358](https://github.com/haskell/cabal/pull/8358) [#8627](https://github.com/haskell/cabal/pull/8627)
+
+  - Cabal update and sdist will not require a ghc in path unless the project has conditionals that require it
+
+- Allow offline bootstrapping of cabal-install [#8368](https://github.com/haskell/cabal/pull/8368)
+
+  - The bootstrap script for cabal-install now supports fetching the sources of the dependencies in a separate step.
+    One can then copy over the resulting archive and perform offline bootstrapping of cabal-install.
+
+- Pass some haddock flags to dependencies [#395](https://github.com/haskell/cabal/issues/395) [#8104](https://github.com/haskell/cabal/issues/8104) [#8414](https://github.com/haskell/cabal/pull/8414)
+
+  - Pass `--haddock-hoogle`, `--haddock-html`, `--haddock-internal`, `--haddock-quickjump`, `--haddock-hyperlinked-source`
+    to all the dependencies if they are specified as command line args
+
+- build pkgconfig db individually when bulk fails [#8494](https://github.com/haskell/cabal/issues/8494) [#8496](https://github.com/haskell/cabal/pull/8496)
+
+  - When pkg-config fails to get versions for all packages in bulk, falls back to querying one-by-one.
+
+- improve install target handling logic regarding of project files [#8094](https://github.com/haskell/cabal/issues/8094) [#8352](https://github.com/haskell/cabal/issues/8352) [#8498](https://github.com/haskell/cabal/pull/8498)
+
+  - fixes an issue where `cabal install pkg-x.y.z` fails unless `--ignore-project` is given
+  - fixes an issue where `cabal install --ignore-project` crashes when a project file is present
+
+- Redownload packages when source hash verification fails [#7541](https://github.com/haskell/cabal/issues/7541) [#8500](https://github.com/haskell/cabal/pull/8500)
+
+  - Cabal-install will verify source hashes on cached downloads against the current index, and redownload on mismatch. (Which can occur with e.g. head.hackage)
+
+- `cabal init -i` should sanitize package name guessed from the directory name [#8404](https://github.com/haskell/cabal/issues/8404) [#8561](https://github.com/haskell/cabal/pull/8561)
+
+  If the current directory name has any non-alphanumeric symbols in its name, the symbols will be replaced with a dash. Also, will make sure that the resulting package name starts with a letter.
+
+  This worked for cabal init -n already, and this PR only moves code around so that cabal init -i also benefits from this logic.
+
+- Support `js-sources` with GHC, not only with GHCJS [#8636](https://github.com/haskell/cabal/pull/8636)
+
+  - Take into account `js-sources` when building library components with GHC
+  - Missing support for `js-sources` in executable components is tracked in #8639
+
+- Fix `extra-source-file` rebuild tracking when run in a multi-package project [#8632](https://github.com/haskell/cabal/issues/8632) [#8634](https://github.com/haskell/cabal/issues/8634) [#8640](https://github.com/haskell/cabal/pull/8640)
+
+  - Fixes an issue where glob expansion of `extra-source-files` for rebuild tracking purposes was not occurring correctly when run in a multi-package setting (i.e. when the globs needed to be expanded relative to something other than ".").
+
+- No up-front warning that assertions are on for special commands (help, version, numeric-version) [#8645](https://github.com/haskell/cabal/issues/8645) [#8647](https://github.com/haskell/cabal/pull/8647)
+
+  - When compiled with ghc option `-fno-ignore-assert`, `cabal-install` will issue a generic warning that assertions are on.
+    This warning will no longer be emitted for special modes of operation like `cabal --numeric-version`, `--version` and help,
+    and also not if `cabal` could not parse its command line.
+    Further, the warning now goes to `stderr` rather than `stdout`.
+
+- Fix and improve list parser for `cabal init` arguments [#8659](https://github.com/haskell/cabal/issues/8659) [#8663](https://github.com/haskell/cabal/pull/8663)
+
+  Occurrences of 'Flag [a]' seem to behave in an unexpected way. The monoid
+  instance of 'Flag' is right associative and discard the value on the
+  left, but we want to merge the contents of 'Flag'.
+
+  Permits:
+  - `cabal init -d base -d vector -d containers`
+
+  Fixes for all Flag '[a]' the cli parser in cabal init. Adds cli parser tests.
+
+  Adds the feature to specify a comma-separated list of dependencies:
+  - `cabal init -d base,vector,containers`
+
+- Fix resolution of imports by relative paths in cabal.project [#8686](https://github.com/haskell/cabal/pull/8686)
+
+  Fix bug where cabal tries to resolve imports by relative paths against
+  the directory cabal executable was invoked in rather than directory of
+  cabal.project file that does the import.
+
+- Fix `cabal repl` discarding `--build-depends` [#6859](https://github.com/haskell/cabal/issues/6859) [#7081](https://github.com/haskell/cabal/issues/7081) [#8732](https://github.com/haskell/cabal/pull/8732)
+
+  - Fix `repl` command discarding `--build-depends` argument when using
+    `allow-newer` or `allow-older`.
+
+- Add `cabal get --only-package-description` [#1954](https://github.com/haskell/cabal/issues/1954) [#1977](https://github.com/haskell/cabal/pull/1977) [#5162](https://github.com/haskell/cabal/pull/5162) [#8263](https://github.com/haskell/cabal/pull/8263)
+
+- `cabal haddock` now implies `--enable-documentation` [#7462](https://github.com/haskell/cabal/issues/7462) [#8259](https://github.com/haskell/cabal/pull/8259)
+
+- Include `extra-lib-dirs-static` into `PackageHash` [#6935](https://github.com/haskell/cabal/issues/6935) [#7794](https://github.com/haskell/cabal/pull/7794)
+
+- Document `cabal check` in the user guide [#8237](https://github.com/haskell/cabal/pull/8237)
+
+- Add documentation (or stubs) for cabal-install commands: `fetch`, `get`, `info`, `init`, `list`, `report`, `unpack`, `upload`, `user-config` [#7884](https://github.com/haskell/cabal/issues/7884) [#7978](https://github.com/haskell/cabal/issues/7978) [#8308](https://github.com/haskell/cabal/issues/8308) [#8309](https://github.com/haskell/cabal/pull/8309)
+
+- Add check for upper bound on any dependency in `cabal check` [#8291](https://github.com/haskell/cabal/issues/8291) [#8339](https://github.com/haskell/cabal/pull/8339)

From eb0b028c83329b66cbbd6e6450d7e68c2ff04acf Mon Sep 17 00:00:00 2001
From: Bryan Richter <bryan@haskell.foundation>
Date: Thu, 9 Mar 2023 11:37:20 +0200
Subject: [PATCH 029/144] Stabilize use of brew

Use a specific release instead of HEAD.

(cherry picked from commit 6db1410b123d97e9544e03600ee391c6ce493c13)
---
 .gitlab-ci.yml  |  2 ++
 .gitlab/brew.sh | 13 ++++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 752e918417b..0dc0a46726d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -94,6 +94,8 @@ build-aarch64-darwin:
     TARBALL_ARCHIVE_SUFFIX: aarch64-darwin
     TARBALL_EXT: tar.xz
     ADD_CABAL_ARGS: ""
+    # Update periodically.
+    BREW_VERSION: 4.0.5
   artifacts:
     expire_in: 2 week
     paths:
diff --git a/.gitlab/brew.sh b/.gitlab/brew.sh
index de769632e6f..405a4ed4979 100644
--- a/.gitlab/brew.sh
+++ b/.gitlab/brew.sh
@@ -1,10 +1,17 @@
 #!/usr/bin/env bash
 
-set -Eeuxo pipefail
+set -Eeuo pipefail
 
 # Install brew locally in the project dir. Packages will also be installed here.
-[ -e "$CI_PROJECT_DIR/.brew" ] || git clone --depth=1 https://github.com/Homebrew/brew $CI_PROJECT_DIR/.brew
-export PATH="$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
+# FIXME: Use brew in supported way. See
+# https://docs.brew.sh/Installation#untar-anywhere-unsupported
+brew_dir="${CI_PROJECT_DIR}/.brew"
+# Temporarily? ensure there's no caching accidentally happening.
+rm -fr "${brew_dir}"
+mkdir -p "${brew_dir}"
+curl -L "https://github.com/Homebrew/brew/archive/refs/tags/${BREW_VERSION}.tar.gz" | tar xz --strip 1 -C "${brew_dir}"
+
+export PATH="${brew_dir}/bin:${brew_dir}/sbin:$PATH"
 
 # make sure to not pollute the machine with temp files etc
 mkdir -p $CI_PROJECT_DIR/.brew_cache

From 4e7f673805f9f3d727e550eab3857c7b063d1b65 Mon Sep 17 00:00:00 2001
From: Bryan Richter <bryan@haskell.foundation>
Date: Thu, 9 Mar 2023 13:01:08 +0200
Subject: [PATCH 030/144] Cache brew and the things it installs

(cherry picked from commit 85253ddcc345bea729308bf30bbc8ce79b179caa)
---
 .gitlab-ci.yml  | 3 +++
 .gitlab/brew.sh | 9 +++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0dc0a46726d..3df905884ae 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -100,6 +100,9 @@ build-aarch64-darwin:
     expire_in: 2 week
     paths:
       - out/*
+  cache:
+    paths:
+      - .brew
 
 build-x86_64-windows:
   extends: .build
diff --git a/.gitlab/brew.sh b/.gitlab/brew.sh
index 405a4ed4979..a7bc6024124 100644
--- a/.gitlab/brew.sh
+++ b/.gitlab/brew.sh
@@ -6,10 +6,11 @@ set -Eeuo pipefail
 # FIXME: Use brew in supported way. See
 # https://docs.brew.sh/Installation#untar-anywhere-unsupported
 brew_dir="${CI_PROJECT_DIR}/.brew"
-# Temporarily? ensure there's no caching accidentally happening.
-rm -fr "${brew_dir}"
-mkdir -p "${brew_dir}"
-curl -L "https://github.com/Homebrew/brew/archive/refs/tags/${BREW_VERSION}.tar.gz" | tar xz --strip 1 -C "${brew_dir}"
+
+if [ ! -e "${brew_dir}" ]; then
+    mkdir -p "${brew_dir}"
+    curl -L "https://github.com/Homebrew/brew/archive/refs/tags/${BREW_VERSION}.tar.gz" | tar xz --strip 1 -C "${brew_dir}"
+fi
 
 export PATH="${brew_dir}/bin:${brew_dir}/sbin:$PATH"
 

From 59229c2ae79697879b13c935d48c32742d27f786 Mon Sep 17 00:00:00 2001
From: Bryan Richter <bryan@haskell.foundation>
Date: Tue, 14 Mar 2023 12:55:25 +0200
Subject: [PATCH 031/144] Split PLATFORM into ARCH and OS

(cherry picked from commit 7cfc9146bf8e694da397679a723338dc93c33c3b)
---
 .gitlab-ci.yml | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3df905884ae..ab459fd6e7c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,20 +30,26 @@ build-x86_64-linux:
   extends: .build
   parallel:
     matrix:
-      - PLATFORM:
-        - i386-linux-deb9
-        - x86_64-linux-centos7
-        - x86_64-linux-deb9
-        - x86_64-linux-fedora33
-        - x86_64-linux-rocky8
-        - x86_64-linux-ubuntu18_04
-        - x86_64-linux-ubuntu20_04
-        - x86_64-linux-deb10
-        - x86_64-linux-deb11
+      - ARCH: i386
+        TAG: x86_64-linux
+        OS:
+          - deb9
+      - ARCH: x86_64
+        TAG: x86_64-linux
+        OS:
+          - centos7
+          - deb9
+          - fedora33
+          - rocky8
+          - ubuntu18_04
+          - ubuntu20_04
+          - deb10
+          - deb11
   tags:
-    - x86_64-linux
+    - $TAG
   image: "registry.gitlab.haskell.org/ghc/ci-images/$PLATFORM:$DOCKER_REV"
   variables:
+    PLATFORM: "${ARCH}-linux-${OS}"
     TARBALL_ARCHIVE_SUFFIX: $PLATFORM
     TARBALL_EXT: tar.xz
     ADD_CABAL_ARGS: "--enable-split-sections"

From 7dfcdd818e1d4ba635ff84b963bef19f40521fc2 Mon Sep 17 00:00:00 2001
From: Bryan Richter <bryan@haskell.foundation>
Date: Tue, 14 Mar 2023 12:57:00 +0200
Subject: [PATCH 032/144] Add aarch64-linux jobs

(cherry picked from commit e35caf73445dcdf5bc62dcd661006f3c2f672563)
---
 .gitlab-ci.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ab459fd6e7c..d5c3496d719 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -45,6 +45,11 @@ build-x86_64-linux:
           - ubuntu20_04
           - deb10
           - deb11
+      - ARCH: aarch64
+        TAG: aarch64-linux
+        OS:
+          - deb10
+          - deb11
   tags:
     - $TAG
   image: "registry.gitlab.haskell.org/ghc/ci-images/$PLATFORM:$DOCKER_REV"

From 3c67da291c45b9d53006a19e051e759d56d071f0 Mon Sep 17 00:00:00 2001
From: Bryan Richter <bryan@haskell.foundation>
Date: Tue, 14 Mar 2023 13:05:46 +0200
Subject: [PATCH 033/144] Improve name of Linux matrix build

It is no longer just x86_64.

(cherry picked from commit a4693f835df170394256fb61eec454af6e4a09ef)
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d5c3496d719..b9718af9e77 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,7 +26,7 @@ workflow:
     paths:
       - out/*
 
-build-x86_64-linux:
+build-linux:
   extends: .build
   parallel:
     matrix:

From 8c3c34be5746295d18e3d28b35abe0f118f3d495 Mon Sep 17 00:00:00 2001
From: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Date: Tue, 14 Mar 2023 14:56:46 -0400
Subject: [PATCH 034/144] CI: disable prerelease validation

(cherry picked from commit e2dc1ea4f6b8bc10ece291b5b2f8e18fe21765f4)
---
 .github/workflows/validate.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 48f10d09e91..29380501a5c 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -194,6 +194,9 @@ jobs:
   # - (sometimes) disabling some parts on Windows because it's hard to figure
   #   out why they fail
   validate-prerelease:
+    # TODO: reenable when the next GHC prerelease appears
+    if: false
+
     name: Validate ${{ matrix.os }} ghc-prerelease
     runs-on: ${{ matrix.os }}
     outputs:

From 7c74d6ed9f799947f87f41fb934c66b15d4ce357 Mon Sep 17 00:00:00 2001
From: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Date: Mon, 17 Apr 2023 15:21:30 -0400
Subject: [PATCH 035/144] docs: cabal repl fresh-up

(cherry picked from commit 387a19e81fa2fa2cd59fa36a98fc7390797014b1)
---
 doc/cabal-commands.rst | 84 +++++++++++++++++++++++++++---------------
 1 file changed, 54 insertions(+), 30 deletions(-)

diff --git a/doc/cabal-commands.rst b/doc/cabal-commands.rst
index 0ea968b0f5d..c1dbaa780bc 100644
--- a/doc/cabal-commands.rst
+++ b/doc/cabal-commands.rst
@@ -791,51 +791,75 @@ it may invoke the configuration step (see ``cabal configure``).
 cabal repl
 ^^^^^^^^^^
 
-``cabal repl TARGET`` loads all of the modules of the target into
-GHCi as interpreted bytecode. In addition to ``cabal build``'s flags,
-it additionally takes the ``--repl-options`` and ``--repl-no-load`` flags.
-
-To avoid ``ghci`` specific flags from triggering unneeded global rebuilds these
-flags are now stripped from the internal configuration. As a result
-``--ghc-options`` will no longer (reliably) work to pass flags to ``ghci`` (or
-other repls). Instead, you should use the new ``--repl-options`` flag to
-specify these options to the invoked repl. (This flag also works on ``cabal
-repl`` and ``Setup repl`` on sufficiently new versions of Cabal.)
-
-The ``repl-no-load`` flag disables the loading of target modules at startup.
+``cabal repl TARGET [FLAGS]``
+opens an interactive session for the target component within the project and
+loads all of the modules of the target into GHCi as interpreted bytecode.
+The available targets are the same as for the ``build`` command: individual components
+within packages in the project, including libraries, executables, test-suites
+and benchmarks (see `the build section <#cabal-build>`__ for the target syntax).
+Local packages can also be specified, in which case the library
+component in the package will be used, or the (first listed) executable in the
+package if there is no library. Dependencies are built or rebuilt as necessary.
 
 Currently, it is not supported to pass multiple targets to ``repl``
 (``repl`` will just successively open a separate GHCi session for
 each target.)
 
-It also provides a way to experiment with libraries without needing to download
-them manually or to install them globally.
-
-This command opens a REPL with the current default target loaded, and a version
-of the ``vector`` package matching that specification exposed.
+Examples:
 
 ::
 
-    $ cabal repl --build-depends "vector >= 0.12 && < 0.13"
+    $ cabal repl                # default component in the package in the current directory
+    $ cabal repl pkgname        # default component in the package named 'pkgname'
+    $ cabal repl ./pkgfoo       # default component in the package in the ./pkgfoo directory
+    $ cabal repl cname          # component named 'cname'
+    $ cabal repl pkgname:cname  # component 'cname' in the package 'pkgname'
 
-Both of these commands do the same thing as the above, but only exposes ``base``,
-``vector``, and the ``vector`` package's transitive dependencies even if the user
-is in a project context.
+Configuration flags can be specified on the command line and these extend the project
+configuration from the 'cabal.project', 'cabal.project.local' and other files.
 
-::
+.. option:: --repl-options
 
-    $ cabal repl --ignore-project --build-depends "vector >= 0.12 && < 0.13"
-    $ cabal repl --project='' --build-depends "vector >= 0.12 && < 0.13"
+    To avoid ``ghci``-specific flags from triggering unneeded global rebuilds, these
+    flags are stripped from the internal configuration. As a result,
+    ``--ghc-options`` will no longer (reliably) work to pass flags to ``ghci`` (or
+    other REPLs). Instead, you should use the ``--repl-options`` flag to
+    specify these options to the invoked REPL.
 
-This command would add ``vector``, but not (for example) ``primitive``, because
-it only includes the packages specified on the command line (and ``base``, which
-cannot be excluded for technical reasons).
+.. option:: --repl-no-load
 
-::
+    Disables the loading of target modules at startup.
+
+.. option:: -b, --build-depends
+
+    A way to experiment with libraries without needing to download
+    them manually or to install them globally.
+
+    This command opens a REPL with the current default target loaded, and a version
+    of the ``vector`` package matching that specification exposed.
+
+    ::
+
+        $ cabal repl --build-depends "vector >= 0.12 && < 0.13"
+
+    Both of these commands do the same thing as the above, but only expose ``base``,
+    ``vector``, and the ``vector`` package's transitive dependencies even if the user
+    is in a project context.
+
+    ::
+
+        $ cabal repl --ignore-project --build-depends "vector >= 0.12 && < 0.13"
+        $ cabal repl --project='' --build-depends "vector >= 0.12 && < 0.13"
+
+    This command would add ``vector``, but not (for example) ``primitive``, because
+    it only includes the packages specified on the command line (and ``base``, which
+    cannot be excluded for technical reasons).
+
+    ::
 
-    $ cabal repl --build-depends vector --no-transitive-deps
+        $ cabal repl --build-depends vector --no-transitive-deps
 
-``repl`` can open scripts by passing the path to the script as the target.
+``cabal repl`` can open scripts by passing the path to the script as the target.
 
 ::
 

From 022f4a7515777fd37d63b81fc23b09812d0f33f6 Mon Sep 17 00:00:00 2001
From: Sylvain Henry <sylvain@haskus.fr>
Date: Tue, 4 Apr 2023 09:32:49 +0200
Subject: [PATCH 036/144] Regenerate Lexer.hs with latest Alex (fix #8892)

Regenerate Lexer.hs with Alex 3.2.7.2 to fix issue ##8892 (out-of-bound
access due to https://github.com/haskell/alex/pull/223).

(cherry picked from commit ca7a8e2872338fd3beb2c1f3f7dce8de6efcb5e7)
---
 .github/workflows/quick-jobs.yml              |   2 +-
 Cabal-syntax/src/Distribution/Fields/Lexer.hs | 303 ++++++++++++------
 changelog.d/issue-8892                        |  11 +
 3 files changed, 210 insertions(+), 106 deletions(-)
 create mode 100644 changelog.d/issue-8892

diff --git a/.github/workflows/quick-jobs.yml b/.github/workflows/quick-jobs.yml
index c36db9bd689..d309cc97c09 100644
--- a/.github/workflows/quick-jobs.yml
+++ b/.github/workflows/quick-jobs.yml
@@ -47,7 +47,7 @@ jobs:
       - name: Update Hackage index
         run: cabal v2-update
       - name: Install alex
-        run: cabal v2-install alex --constraint='alex ==3.2.6'
+        run: cabal v2-install alex --constraint='alex ==3.2.7.3'
       - uses: actions/checkout@v3
       - name: Regenerate files
         run: |
diff --git a/Cabal-syntax/src/Distribution/Fields/Lexer.hs b/Cabal-syntax/src/Distribution/Fields/Lexer.hs
index 63388b36ad4..926bda89fe9 100644
--- a/Cabal-syntax/src/Distribution/Fields/Lexer.hs
+++ b/Cabal-syntax/src/Distribution/Fields/Lexer.hs
@@ -1,7 +1,7 @@
 {-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-missing-signatures #-}
-{-# LANGUAGE CPP,MagicHash #-}
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE MagicHash #-}
 {-# LINE 1 "templates/Lexer.x" #-}
-
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Distribution.Fields.Lexer
@@ -52,7 +52,6 @@ import qualified Data.Text   as T
 import qualified Data.Text.Encoding as T
 import qualified Data.Text.Encoding.Error as T
 #endif
-
 #if __GLASGOW_HASKELL__ >= 603
 #include "ghcconfig.h"
 #elif defined(__GLASGOW_HASKELL__)
@@ -73,106 +72,107 @@ alex_tab_size :: Int
 alex_tab_size = 8
 alex_base :: AlexAddr
 alex_base = AlexA#
-  "\x12\xff\xff\xff\xf9\xff\xff\xff\xfb\xff\xff\xff\x01\x00\x00\x00\x2f\x00\x00\x00\x50\x00\x00\x00\xd0\x00\x00\x00\x48\xff\xff\xff\xdc\xff\xff\xff\x51\xff\xff\xff\x6d\xff\xff\xff\x6f\xff\xff\xff\x50\x01\x00\x00\x74\x01\x00\x00\x70\xff\xff\xff\x68\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\xa3\x01\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x00\x00\xd1\x01\x00\x00\xfb\x01\x00\x00\x7b\x02\x00\x00\xfb\x02\x00\x00\x00\x00\x00\x00\x7b\x03\x00\x00\x7d\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x00\x00\x00\x6d\x00\x00\x00\x6b\x00\x00\x00\xfc\x03\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x6f\x00\x00\x00\x1c\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00\x00\x00"#
+  "\x12\xff\xff\xff\xf9\xff\xff\xff\xfb\xff\xff\xff\x01\x00\x00\x00\x2f\x00\x00\x00\x50\x00\x00\x00\xd0\x00\x00\x00\x50\x01\x00\x00\xd0\x01\x00\x00\x50\x02\x00\x00\x81\x00\x00\x00\xfe\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x69\xff\xff\xff\x03\x00\x00\x00\x09\x00\x00\x00\xf8\x00\x00\x00\xe2\xff\xff\xff\xd0\x02\x00\x00\x71\xff\xff\xff\x0b\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x5f\xff\xff\xff\x5d\xff\xff\xff\x00\x00\x00\x00\xf0\x02\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x03\x00\x00\x6a\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x66\x03\x00\x00\x98\x00\x00\x00\x80\xff\xff\xff\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x03\x00\x00\x00\x00\x00\x00\xef\x03\x00\x00\x13\x04\x00\x00"#
 
 alex_table :: AlexAddr
 alex_table = AlexA#
-  "\x00\x00\x09\x00\x0f\x00\x11\x00\x02\x00\x11\x00\x12\x00\x00\x00\x12\x00\x13\x00\x03\x00\x11\x00\x07\x00\x10\x00\x12\x00\x25\x00\x14\x00\x11\x00\x10\x00\x11\x00\x14\x00\x11\x00\x12\x00\x23\x00\x12\x00\x0f\x00\x28\x00\x02\x00\x2e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x08\x00\x10\x00\x00\x00\x14\x00\x00\x00\x00\x00\x08\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2a\x00\x2e\x00\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x26\x00\x28\x00\xff\xff\xff\xff\x29\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x26\x00\x0f\x00\x11\x00\x17\x00\x26\x00\x12\x00\x25\x00\x11\x00\x2a\x00\x00\x00\x12\x00\x00\x00\x15\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x17\x00\x26\x00\x00\x00\x25\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x2d\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x0e\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\x23\x00\xff\xff\xff\xff\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x00\x1e\x00\x0d\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x00\x00\x1f\x00\x1f\x00\x1e\x00\x1e\x00\x1e\x00\x19\x00\x1a\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x1f\x00\x1e\x00\x1f\x00\x1e\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x00\x1e\x00\x22\x00\x1e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x1d\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x0c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1e\x00\xff\xff\x1e\x00\x1e\x00\x1e\x00\x1e\x00\xff\xff\xff\xff\xff\xff\x1e\x00\x1e\x00\x1e\x00\x18\x00\x1a\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x1e\x00\xff\xff\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x1e\x00\xff\xff\x1e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1e\x00\xff\xff\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x00\x00\xff\xff\xff\xff\x1e\x00\x1e\x00\x1e\x00\x1a\x00\x1a\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x1e\x00\xff\xff\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x1e\x00\xff\xff\x1e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x1c\x00\x1e\x00\x00\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x1e\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\xff\xff\x1e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
+  "\x00\x00\x18\x00\x11\x00\x17\x00\x02\x00\x17\x00\x16\x00\x0b\x00\x16\x00\x0f\x00\x03\x00\x17\x00\x0f\x00\x17\x00\x16\x00\x13\x00\x16\x00\x15\x00\x10\x00\x17\x00\x15\x00\x17\x00\x16\x00\x17\x00\x16\x00\x11\x00\x19\x00\x02\x00\x1a\x00\x1c\x00\x0b\x00\x22\x00\x10\x00\x03\x00\x27\x00\x0f\x00\x00\x00\x00\x00\x12\x00\x00\x00\x12\x00\x10\x00\x00\x00\x15\x00\x00\x00\x00\x00\x12\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\x1c\x00\xff\xff\xff\xff\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x25\x00\x22\x00\xff\xff\xff\xff\x23\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x25\x00\x00\x00\x00\x00\x21\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x00\x00\x00\x0c\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x25\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x1e\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x00\x00\x00\x00\x14\x00\x00\x00\x26\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x26\x00\x00\x00\x14\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x00\x27\x00\xff\xff\xff\xff\x28\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x00\x2d\x00\x1b\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x00\x00\x2c\x00\x2c\x00\x2d\x00\x2d\x00\x2d\x00\x08\x00\x09\x00\x2d\x00\xff\xff\x11\x00\x17\x00\x00\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x2c\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x2d\x00\x29\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\xff\xff\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x00\x00\xff\xff\xff\xff\x2d\x00\x2d\x00\x2d\x00\x0a\x00\x09\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x2d\x00\xff\xff\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x2d\x00\xff\xff\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\xff\xff\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x00\x00\xff\xff\xff\xff\x2d\x00\x2d\x00\x2d\x00\x09\x00\x09\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x2d\x00\xff\xff\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x2d\x00\xff\xff\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x2e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x2d\x00\xff\xff\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x00\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x00\x00\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x2e\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x2f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
 
 alex_check :: AlexAddr
 alex_check = AlexA#
-  "\xff\xff\xef\x00\x09\x00\x0a\x00\x09\x00\x0a\x00\x0d\x00\xbf\x00\x0d\x00\x2d\x00\x09\x00\x0a\x00\xbb\x00\xa0\x00\x0d\x00\xa0\x00\xa0\x00\x0a\x00\x09\x00\x0a\x00\x09\x00\x0a\x00\x0d\x00\x0a\x00\x0d\x00\x20\x00\x0a\x00\x20\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\xff\xff\x2d\x00\x20\x00\xff\xff\x20\x00\xff\xff\xff\xff\x2d\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x09\x00\x0a\x00\x09\x00\x09\x00\x0d\x00\x09\x00\x0a\x00\x09\x00\xff\xff\x0d\x00\xff\xff\x7b\x00\xff\xff\x7d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x20\x00\x20\x00\xff\xff\x20\x00\xff\xff\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7d\x00\xff\xff\x7f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc2\x00\xff\xff\xc2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc2\x00\xff\xff\xc2\x00\xff\xff\x7f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc2\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xc2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\x22\x00\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x5c\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\x00\x5c\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\x7f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x7f\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\x22\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\x5c\x00\xff\xff\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\x7f\x00\x7e\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7d\x00\xff\xff\x7f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
+  "\xff\xff\xef\x00\x09\x00\x0a\x00\x09\x00\x0a\x00\x0d\x00\x09\x00\x0d\x00\xa0\x00\x09\x00\x0a\x00\x09\x00\x0a\x00\x0d\x00\x2d\x00\x0d\x00\xa0\x00\x09\x00\x0a\x00\x09\x00\x0a\x00\x0d\x00\x0a\x00\x0d\x00\x20\x00\xbb\x00\x20\x00\xbf\x00\x0a\x00\x20\x00\x0a\x00\xa0\x00\x20\x00\x0a\x00\x20\x00\xff\xff\xff\xff\x2d\x00\xff\xff\x2d\x00\x20\x00\xff\xff\x20\x00\xff\xff\xff\xff\x2d\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7d\x00\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x20\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7d\x00\xff\xff\x7f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\xff\xff\xc2\x00\xff\xff\xc2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc2\x00\xff\xff\xc2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc2\x00\xff\xff\xc2\x00\xff\xff\x7f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x7f\x00\x09\x00\x0a\x00\xff\xff\xff\xff\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\x22\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\xff\xff\x7f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x7f\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7b\x00\xff\xff\x7d\x00\x21\x00\x7f\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\xff\xff\x7e\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\x22\x00\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\x22\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
 
 alex_deflt :: AlexAddr
 alex_deflt = AlexA#
-  "\xff\xff\xff\xff\xff\xff\xff\xff\x2b\x00\x27\x00\x1b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\x18\x00\x1b\x00\x1b\x00\x1b\x00\xff\xff\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\x2b\x00\xff\xff\xff\xff\xff\xff\xff\xff"#
+  "\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\x24\x00\x07\x00\x07\x00\x07\x00\x07\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\xff\xff\xff\xff\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x00\x1b\x00"#
 
-alex_accept = listArray (0 :: Int, 47)
-  [ AlexAcc 29
+alex_accept = listArray (0 :: Int, 48)
+  [ AlexAcc 30
+  , AlexAcc 29
   , AlexAcc 28
   , AlexAcc 27
-  , AlexAcc 26
-  , AlexAccNone
-  , AlexAccNone
-  , AlexAccNone
-  , AlexAccNone
-  , AlexAccNone
-  , AlexAccNone
-  , AlexAccNone
-  , AlexAccNone
-  , AlexAccNone
-  , AlexAccNone
   , AlexAccNone
   , AlexAccNone
   , AlexAccNone
+  , AlexAcc 26
   , AlexAcc 25
   , AlexAcc 24
   , AlexAccSkip
+  , AlexAccSkip
   , AlexAcc 23
   , AlexAcc 22
+  , AlexAccNone
   , AlexAcc 21
-  , AlexAccSkip
-  , AlexAccSkip
   , AlexAcc 20
+  , AlexAccNone
+  , AlexAccNone
+  , AlexAccSkip
+  , AlexAccNone
+  , AlexAccNone
   , AlexAcc 19
   , AlexAcc 18
+  , AlexAccNone
+  , AlexAccNone
   , AlexAcc 17
+  , AlexAccNone
   , AlexAcc 16
   , AlexAcc 15
   , AlexAcc 14
   , AlexAcc 13
   , AlexAcc 12
+  , AlexAccSkip
   , AlexAcc 11
   , AlexAcc 10
   , AlexAcc 9
-  , AlexAcc 8
   , AlexAccSkip
+  , AlexAccNone
+  , AlexAcc 8
   , AlexAcc 7
   , AlexAcc 6
   , AlexAcc 5
-  , AlexAccSkip
   , AlexAcc 4
   , AlexAcc 3
   , AlexAcc 2
   , AlexAcc 1
   , AlexAcc 0
+  , AlexAccNone
   ]
 
-alex_actions = array (0 :: Int, 30)
-  [ (29,alex_action_0)
-  , (28,alex_action_20)
-  , (27,alex_action_16)
-  , (26,alex_action_3)
-  , (25,alex_action_1)
-  , (24,alex_action_1)
-  , (23,alex_action_3)
+alex_actions = array (0 :: Int, 31)
+  [ (30,alex_action_0)
+  , (29,alex_action_20)
+  , (28,alex_action_16)
+  , (27,alex_action_3)
+  , (26,alex_action_8)
+  , (25,alex_action_8)
+  , (24,alex_action_8)
+  , (23,alex_action_5)
   , (22,alex_action_4)
-  , (21,alex_action_5)
-  , (20,alex_action_8)
-  , (19,alex_action_8)
-  , (18,alex_action_8)
-  , (17,alex_action_9)
-  , (16,alex_action_9)
-  , (15,alex_action_10)
-  , (14,alex_action_11)
-  , (13,alex_action_12)
-  , (12,alex_action_13)
-  , (11,alex_action_14)
-  , (10,alex_action_15)
-  , (9,alex_action_15)
-  , (8,alex_action_16)
-  , (7,alex_action_18)
-  , (6,alex_action_19)
-  , (5,alex_action_19)
-  , (4,alex_action_22)
-  , (3,alex_action_23)
-  , (2,alex_action_24)
-  , (1,alex_action_25)
-  , (0,alex_action_25)
+  , (21,alex_action_3)
+  , (20,alex_action_16)
+  , (19,alex_action_1)
+  , (18,alex_action_1)
+  , (17,alex_action_0)
+  , (16,alex_action_25)
+  , (15,alex_action_25)
+  , (14,alex_action_24)
+  , (13,alex_action_23)
+  , (12,alex_action_22)
+  , (11,alex_action_19)
+  , (10,alex_action_19)
+  , (9,alex_action_18)
+  , (8,alex_action_15)
+  , (7,alex_action_15)
+  , (6,alex_action_14)
+  , (5,alex_action_13)
+  , (4,alex_action_12)
+  , (3,alex_action_11)
+  , (2,alex_action_10)
+  , (1,alex_action_9)
+  , (0,alex_action_9)
   ]
 
 {-# LINE 151 "templates/Lexer.x" #-}
-
 -- | Tokens of outer cabal file structure. Field values are treated opaquely.
 data Token = TokSym   !ByteString       -- ^ Haskell-like identifier, number or operator
            | TokStr   !ByteString       -- ^ String in quotes
@@ -313,40 +313,42 @@ bol_section = 3
 in_field_braces = 4
 in_field_layout = 5
 in_section = 6
-alex_action_0 =  \_ len _ -> do
+alex_action_0 = \_ len _ -> do
               when (len /= 0) $ addWarning LexWarningBOM
               setStartCode bol_section
               lexToken
-         
-alex_action_1 =  \_pos len inp -> checkWhitespace len inp >> adjustPos retPos >> lexToken 
-alex_action_3 =  \pos len inp -> checkLeadingWhitespace len inp >>
+alex_action_1 = \_pos len inp -> checkWhitespace len inp >> adjustPos retPos >> lexToken
+alex_action_3 = \pos len inp -> checkLeadingWhitespace len inp >>
                                      if B.length inp == len
                                        then return (L pos EOF)
                                        else setStartCode in_section
-                                         >> return (L pos (Indent len)) 
-alex_action_4 =  tok  OpenBrace 
-alex_action_5 =  tok  CloseBrace 
-alex_action_8 =  toki TokSym 
-alex_action_9 =  \pos len inp -> return $! L pos (TokStr (B.take (len - 2) (B.tail inp))) 
-alex_action_10 =  toki TokOther 
-alex_action_11 =  toki TokOther 
-alex_action_12 =  tok  Colon 
-alex_action_13 =  tok  OpenBrace 
-alex_action_14 =  tok  CloseBrace 
-alex_action_15 =  \_ _ _ -> adjustPos retPos >> setStartCode bol_section >> lexToken 
-alex_action_16 =  \pos len inp -> checkLeadingWhitespace len inp >>= \len' ->
+                                         >> return (L pos (Indent len))
+alex_action_4 = tok  OpenBrace
+alex_action_5 = tok  CloseBrace
+alex_action_8 = toki TokSym
+alex_action_9 = \pos len inp -> return $! L pos (TokStr (B.take (len - 2) (B.tail inp)))
+alex_action_10 = toki TokOther
+alex_action_11 = toki TokOther
+alex_action_12 = tok  Colon
+alex_action_13 = tok  OpenBrace
+alex_action_14 = tok  CloseBrace
+alex_action_15 = \_ _ _ -> adjustPos retPos >> setStartCode bol_section >> lexToken
+alex_action_16 = \pos len inp -> checkLeadingWhitespace len inp >>= \len' ->
                                   if B.length inp == len
                                     then return (L pos EOF)
                                     else setStartCode in_field_layout
-                                      >> return (L pos (Indent len')) 
-alex_action_18 =  toki TokFieldLine 
-alex_action_19 =  \_ _ _ -> adjustPos retPos >> setStartCode bol_field_layout >> lexToken 
-alex_action_20 =  \_ _ _ -> setStartCode in_field_braces >> lexToken 
-alex_action_22 =  toki TokFieldLine 
-alex_action_23 =  tok  OpenBrace  
-alex_action_24 =  tok  CloseBrace 
-alex_action_25 =  \_ _ _ -> adjustPos retPos >> setStartCode bol_field_braces >> lexToken 
-{-# LINE 1 "templates/GenericTemplate.hs" #-}
+                                      >> return (L pos (Indent len'))
+alex_action_18 = toki TokFieldLine
+alex_action_19 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_layout >> lexToken
+alex_action_20 = \_ _ _ -> setStartCode in_field_braces >> lexToken
+alex_action_22 = toki TokFieldLine
+alex_action_23 = tok  OpenBrace
+alex_action_24 = tok  CloseBrace
+alex_action_25 = \_ _ _ -> adjustPos retPos >> setStartCode bol_field_braces >> lexToken
+
+#define ALEX_GHC 1
+#define ALEX_LATIN1 1
+#define ALEX_NOPRED 1
 -- -----------------------------------------------------------------------------
 -- ALEX TEMPLATE
 --
@@ -356,15 +358,37 @@ alex_action_25 =  \_ _ _ -> adjustPos retPos >> setStartCode bol_field_braces >>
 -- -----------------------------------------------------------------------------
 -- INTERNALS and main scanner engine
 
+#ifdef ALEX_GHC
+#  define ILIT(n) n#
+#  define IBOX(n) (I# (n))
+#  define FAST_INT Int#
 -- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.
-#if __GLASGOW_HASKELL__ > 706
-#define GTE(n,m) (tagToEnum# (n >=# m))
-#define EQ(n,m) (tagToEnum# (n ==# m))
+#  if __GLASGOW_HASKELL__ > 706
+#    define GTE(n,m) (tagToEnum# (n >=# m))
+#    define EQ(n,m) (tagToEnum# (n ==# m))
+#  else
+#    define GTE(n,m) (n >=# m)
+#    define EQ(n,m) (n ==# m)
+#  endif
+#  define PLUS(n,m) (n +# m)
+#  define MINUS(n,m) (n -# m)
+#  define TIMES(n,m) (n *# m)
+#  define NEGATE(n) (negateInt# (n))
+#  define IF_GHC(x) (x)
 #else
-#define GTE(n,m) (n >=# m)
-#define EQ(n,m) (n ==# m)
+#  define ILIT(n) (n)
+#  define IBOX(n) (n)
+#  define FAST_INT Int
+#  define GTE(n,m) (n >= m)
+#  define EQ(n,m) (n == m)
+#  define PLUS(n,m) (n + m)
+#  define MINUS(n,m) (n - m)
+#  define TIMES(n,m) (n * m)
+#  define NEGATE(n) (negate (n))
+#  define IF_GHC(x)
 #endif
 
+#ifdef ALEX_GHC
 data AlexAddr = AlexA# Addr#
 -- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.
 #if __GLASGOW_HASKELL__ < 503
@@ -387,7 +411,11 @@ alexIndexInt16OffAddr (AlexA# arr) off =
 #endif
     (indexInt16OffAddr# arr off)
 #endif
+#else
+alexIndexInt16OffAddr arr off = arr ! off
+#endif
 
+#ifdef ALEX_GHC
 {-# INLINE alexIndexInt32OffAddr #-}
 alexIndexInt32OffAddr :: AlexAddr -> Int# -> Int#
 alexIndexInt32OffAddr (AlexA# arr) off =
@@ -408,6 +436,11 @@ alexIndexInt32OffAddr (AlexA# arr) off =
 #endif
     (indexInt32OffAddr# arr off)
 #endif
+#else
+alexIndexInt32OffAddr arr off = arr ! off
+#endif
+
+#ifdef ALEX_GHC
 
 #if __GLASGOW_HASKELL__ < 503
 quickIndex arr i = arr ! i
@@ -415,6 +448,9 @@ quickIndex arr i = arr ! i
 -- GHC >= 503, unsafeAt is available from Data.Array.Base.
 quickIndex = unsafeAt
 #endif
+#else
+quickIndex arr i = arr ! i
+#endif
 
 -- -----------------------------------------------------------------------------
 -- Main lexing routines
@@ -426,26 +462,34 @@ data AlexReturn a
   | AlexToken  !AlexInput !Int a
 
 -- alexScan :: AlexInput -> StartCode -> AlexReturn a
-alexScan input__ (I# (sc))
-  = alexScanUser undefined input__ (I# (sc))
+alexScan input__ IBOX(sc)
+  = alexScanUser undefined input__ IBOX(sc)
 
-alexScanUser user__ input__ (I# (sc))
-  = case alex_scan_tkn user__ input__ 0# input__ sc AlexNone of
+alexScanUser user__ input__ IBOX(sc)
+  = case alex_scan_tkn user__ input__ ILIT(0) input__ sc AlexNone of
   (AlexNone, input__') ->
     case alexGetByte input__ of
       Nothing ->
-
+#ifdef ALEX_DEBUG
+                                   trace ("End of input.") $
+#endif
                                    AlexEOF
       Just _ ->
-
+#ifdef ALEX_DEBUG
+                                   trace ("Error.") $
+#endif
                                    AlexError input__'
 
   (AlexLastSkip input__'' len, _) ->
-
+#ifdef ALEX_DEBUG
+    trace ("Skipping.") $
+#endif
     AlexSkip input__'' len
 
   (AlexLastAcc k input__''' len, _) ->
-
+#ifdef ALEX_DEBUG
+    trace ("Accept.") $
+#endif
     AlexToken input__''' len (alex_actions ! k)
 
 -- Push the input through the DFA, remembering the most recent accepting
@@ -454,35 +498,56 @@ alexScanUser user__ input__ (I# (sc))
 alex_scan_tkn user__ orig_input len input__ s last_acc =
   input__ `seq` -- strict in the input
   let
-  new_acc = (check_accs (alex_accept `quickIndex` (I# (s))))
+  new_acc = (check_accs (alex_accept `quickIndex` IBOX(s)))
   in
   new_acc `seq`
   case alexGetByte input__ of
      Nothing -> (new_acc, input__)
      Just (c, new_input) ->
-
-      case fromIntegral c of { (I# (ord_c)) ->
+#ifdef ALEX_DEBUG
+      trace ("State: " ++ show IBOX(s) ++ ", char: " ++ show c) $
+#endif
+      case fromIntegral c of { IBOX(ord_c) ->
         let
                 base   = alexIndexInt32OffAddr alex_base s
-                offset = (base +# ord_c)
-                check  = alexIndexInt16OffAddr alex_check offset
+                offset = PLUS(base,ord_c)
 
-                new_s = if GTE(offset,0#) && EQ(check,ord_c)
+                new_s = if GTE(offset,ILIT(0))
+                          && let check  = alexIndexInt16OffAddr alex_check offset
+                             in  EQ(check,ord_c)
                           then alexIndexInt16OffAddr alex_table offset
                           else alexIndexInt16OffAddr alex_deflt s
         in
         case new_s of
-            -1# -> (new_acc, input__)
+            ILIT(-1) -> (new_acc, input__)
                 -- on an error, we want to keep the input *before* the
                 -- character that failed, not after.
-            _ -> alex_scan_tkn user__ orig_input (if c < 0x80 || c >= 0xC0 then (len +# 1#) else len)
-                                                -- note that the length is increased ONLY if this is the 1st byte in a char encoding)
-                        new_input new_s new_acc
+            _ -> alex_scan_tkn user__ orig_input
+#ifdef ALEX_LATIN1
+                   PLUS(len,ILIT(1))
+                   -- issue 119: in the latin1 encoding, *each* byte is one character
+#else
+                   (if c < 0x80 || c >= 0xC0 then PLUS(len,ILIT(1)) else len)
+                   -- note that the length is increased ONLY if this is the 1st byte in a char encoding)
+#endif
+                   new_input new_s new_acc
       }
   where
         check_accs (AlexAccNone) = last_acc
-        check_accs (AlexAcc a  ) = AlexLastAcc a input__ (I# (len))
-        check_accs (AlexAccSkip) = AlexLastSkip  input__ (I# (len))
+        check_accs (AlexAcc a  ) = AlexLastAcc a input__ IBOX(len)
+        check_accs (AlexAccSkip) = AlexLastSkip  input__ IBOX(len)
+#ifndef ALEX_NOPRED
+        check_accs (AlexAccPred a predx rest)
+           | predx user__ orig_input IBOX(len) input__
+           = AlexLastAcc a input__ IBOX(len)
+           | otherwise
+           = check_accs rest
+        check_accs (AlexAccSkipPred predx rest)
+           | predx user__ orig_input IBOX(len) input__
+           = AlexLastSkip input__ IBOX(len)
+           | otherwise
+           = check_accs rest
+#endif
 
 data AlexLastAcc
   = AlexNone
@@ -493,4 +558,32 @@ data AlexAcc user
   = AlexAccNone
   | AlexAcc Int
   | AlexAccSkip
+#ifndef ALEX_NOPRED
+  | AlexAccPred Int (AlexAccPred user) (AlexAcc user)
+  | AlexAccSkipPred (AlexAccPred user) (AlexAcc user)
+
+type AlexAccPred user = user -> AlexInput -> Int -> AlexInput -> Bool
 
+-- -----------------------------------------------------------------------------
+-- Predicates on a rule
+
+alexAndPred p1 p2 user__ in1 len in2
+  = p1 user__ in1 len in2 && p2 user__ in1 len in2
+
+--alexPrevCharIsPred :: Char -> AlexAccPred _
+alexPrevCharIs c _ input__ _ _ = c == alexInputPrevChar input__
+
+alexPrevCharMatches f _ input__ _ _ = f (alexInputPrevChar input__)
+
+--alexPrevCharIsOneOfPred :: Array Char Bool -> AlexAccPred _
+alexPrevCharIsOneOf arr _ input__ _ _ = arr ! alexInputPrevChar input__
+
+--alexRightContext :: Int -> AlexAccPred _
+alexRightContext IBOX(sc) user__ _ _ input__ =
+     case alex_scan_tkn user__ input__ ILIT(0) input__ sc AlexNone of
+          (AlexNone, _) -> False
+          _ -> True
+        -- TODO: there's no need to find the longest
+        -- match when checking the right context, just
+        -- the first match will do.
+#endif
diff --git a/changelog.d/issue-8892 b/changelog.d/issue-8892
new file mode 100644
index 00000000000..4e08b86494c
--- /dev/null
+++ b/changelog.d/issue-8892
@@ -0,0 +1,11 @@
+synopsis: Regenerate Lexer.hs to avoid out-of-bound array access due to a bug in Alex
+packages: Cabal-syntax
+prs: #8896
+issues: #8892
+
+description: {
+
+- Regenerate Cabal-syntax's Lexer.hs with Alex 3.2.7.3 which includes a fix for
+  an out-of-bound array access (only noticeable with GHC's JavaScript backend).
+
+}

From 3103b87e558ad02b53fce972eb08be49fec1f3dd Mon Sep 17 00:00:00 2001
From: Sylvain Henry <sylvain@haskus.fr>
Date: Mon, 17 Apr 2023 14:08:14 +0200
Subject: [PATCH 037/144] Lexer: report indentation warnings at column 1

We use a Latin1 generated parser with Alex, but we also parses Unicode
BOM, unbreakable spaces, etc. In recent Alex, the reported column isn't
expressed in Unicode chars anymore but in bytes/ASCII chars (probably
due to
https://github.com/haskell/alex/commit/ae525e34edf017544e8ef4457d7e57cf2081dcf9
but I haven't checked), which broke our tests (see
https://github.com/haskell/cabal/pull/8896).

To work around this we report indentation warnings at token start position,
instead of token end position (i.e. always 1). Otherwise position makes
no sense anymore for the user.

(cherry picked from commit 5f72880e7bdc7571d5f9bff160bf91e479a0725e)
---
 Cabal-syntax/src/Distribution/Fields/Lexer.hs | 26 +++++++++----------
 .../src/Distribution/Fields/LexerMonad.hs     |  6 +++++
 .../ParserTests/regressions/Octree-0.5.format |  2 +-
 .../regressions/monad-param.format            |  2 +-
 .../regressions/th-lift-instances.format      |  2 +-
 .../Check/PackageFiles/BOM/cabal.out          |  2 +-
 templates/Lexer.x                             | 26 +++++++++----------
 7 files changed, 36 insertions(+), 30 deletions(-)

diff --git a/Cabal-syntax/src/Distribution/Fields/Lexer.hs b/Cabal-syntax/src/Distribution/Fields/Lexer.hs
index 926bda89fe9..3d6e97763ec 100644
--- a/Cabal-syntax/src/Distribution/Fields/Lexer.hs
+++ b/Cabal-syntax/src/Distribution/Fields/Lexer.hs
@@ -195,17 +195,17 @@ toki t pos  len  input = return $! L pos (t (B.take len input))
 tok :: Token -> Position -> Int -> ByteString -> Lex LToken
 tok  t pos _len _input = return $! L pos t
 
-checkLeadingWhitespace :: Int -> ByteString -> Lex Int
-checkLeadingWhitespace len bs
+checkLeadingWhitespace :: Position -> Int -> ByteString -> Lex Int
+checkLeadingWhitespace pos len bs
     | B.any (== 9) (B.take len bs) = do
-        addWarning LexWarningTab
-        checkWhitespace len bs
-    | otherwise = checkWhitespace len bs
+        addWarningAt pos LexWarningTab
+        checkWhitespace pos len bs
+    | otherwise = checkWhitespace pos len bs
 
-checkWhitespace :: Int -> ByteString -> Lex Int
-checkWhitespace len bs
+checkWhitespace :: Position -> Int -> ByteString -> Lex Int
+checkWhitespace pos len bs
     | B.any (== 194) (B.take len bs) = do
-        addWarning LexWarningNBSP
+        addWarningAt pos LexWarningNBSP
         return $ len - B.count 194 (B.take len bs)
     | otherwise = return len
 
@@ -313,12 +313,12 @@ bol_section = 3
 in_field_braces = 4
 in_field_layout = 5
 in_section = 6
-alex_action_0 = \_ len _ -> do
-              when (len /= 0) $ addWarning LexWarningBOM
+alex_action_0 = \pos len _ -> do
+              when (len /= 0) $ addWarningAt pos LexWarningBOM
               setStartCode bol_section
               lexToken
-alex_action_1 = \_pos len inp -> checkWhitespace len inp >> adjustPos retPos >> lexToken
-alex_action_3 = \pos len inp -> checkLeadingWhitespace len inp >>
+alex_action_1 = \pos len inp -> checkWhitespace pos len inp >> adjustPos retPos >> lexToken
+alex_action_3 = \pos len inp -> checkLeadingWhitespace pos len inp >>
                                      if B.length inp == len
                                        then return (L pos EOF)
                                        else setStartCode in_section
@@ -333,7 +333,7 @@ alex_action_12 = tok  Colon
 alex_action_13 = tok  OpenBrace
 alex_action_14 = tok  CloseBrace
 alex_action_15 = \_ _ _ -> adjustPos retPos >> setStartCode bol_section >> lexToken
-alex_action_16 = \pos len inp -> checkLeadingWhitespace len inp >>= \len' ->
+alex_action_16 = \pos len inp -> checkLeadingWhitespace pos len inp >>= \len' ->
                                   if B.length inp == len
                                     then return (L pos EOF)
                                     else setStartCode in_field_layout
diff --git a/Cabal-syntax/src/Distribution/Fields/LexerMonad.hs b/Cabal-syntax/src/Distribution/Fields/LexerMonad.hs
index 3c11fac92a4..ac414c18e31 100644
--- a/Cabal-syntax/src/Distribution/Fields/LexerMonad.hs
+++ b/Cabal-syntax/src/Distribution/Fields/LexerMonad.hs
@@ -27,6 +27,7 @@ module Distribution.Fields.LexerMonad (
     LexWarning(..),
     LexWarningType(..),
     addWarning,
+    addWarningAt,
     toPWarnings,
 
   ) where
@@ -153,3 +154,8 @@ setStartCode c = Lex $ \s -> LexResult s{ curCode = c } ()
 addWarning :: LexWarningType -> Lex ()
 addWarning wt = Lex $ \s@LexState{ curPos = pos, warnings = ws  } ->
     LexResult s{ warnings = LexWarning wt pos : ws } ()
+
+-- | Add warning at specific position
+addWarningAt :: Position -> LexWarningType -> Lex ()
+addWarningAt pos wt = Lex $ \s@LexState{ warnings = ws  } ->
+    LexResult s{ warnings = LexWarning wt pos : ws } ()
diff --git a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.format b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.format
index 432c3bba9a4..7d72803f0a5 100644
--- a/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.format
+++ b/Cabal-tests/tests/ParserTests/regressions/Octree-0.5.format
@@ -1,4 +1,4 @@
-Octree-0.5.cabal:39:3: Non breaking spaces at 39:3, 41:3, 43:3
+Octree-0.5.cabal:39:1: Non breaking spaces at 39:1, 41:1, 43:1
 cabal-version: >=1.8
 name:          Octree
 version:       0.5
diff --git a/Cabal-tests/tests/ParserTests/regressions/monad-param.format b/Cabal-tests/tests/ParserTests/regressions/monad-param.format
index 5c0ba1b819c..360a94bc825 100644
--- a/Cabal-tests/tests/ParserTests/regressions/monad-param.format
+++ b/Cabal-tests/tests/ParserTests/regressions/monad-param.format
@@ -1,4 +1,4 @@
-monad-param.cabal:19:3: Tabs used as indentation at 19:3, 20:3
+monad-param.cabal:19:1: Tabs used as indentation at 19:1, 20:1
 name:         monad-param
 version:      0.0.1
 license:      BSD3
diff --git a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.format b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.format
index df2f77dd729..8fe7579952d 100644
--- a/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.format
+++ b/Cabal-tests/tests/ParserTests/regressions/th-lift-instances.format
@@ -1,4 +1,4 @@
-th-lift-instances.cabal:15:9: Tabs used as indentation at 15:9
+th-lift-instances.cabal:15:1: Tabs used as indentation at 15:1
 cabal-version:      >=1.10
 name:               th-lift-instances
 version:            0.1.4
diff --git a/cabal-testsuite/PackageTests/Check/PackageFiles/BOM/cabal.out b/cabal-testsuite/PackageTests/Check/PackageFiles/BOM/cabal.out
index 8d2ce00a951..696de1ec938 100644
--- a/cabal-testsuite/PackageTests/Check/PackageFiles/BOM/cabal.out
+++ b/cabal-testsuite/PackageTests/Check/PackageFiles/BOM/cabal.out
@@ -1,6 +1,6 @@
 # cabal check
 Warning: These warnings may cause trouble when distributing the package:
-Warning: pkg.cabal:1:2: Byte-order mark found at the beginning of the file
+Warning: pkg.cabal:1:1: Byte-order mark found at the beginning of the file
 Warning: The following errors will cause portability problems on other environments:
 Warning: ./pkg.cabal starts with an Unicode byte order mark (BOM). This may cause problems with older cabal versions.
 Warning: Hackage would reject this package.
diff --git a/templates/Lexer.x b/templates/Lexer.x
index b9f2d833082..a10045e137e 100644
--- a/templates/Lexer.x
+++ b/templates/Lexer.x
@@ -83,22 +83,22 @@ $instresc        = $printable
 tokens :-
 
 <0> {
-  @bom?  { \_ len _ -> do
-              when (len /= 0) $ addWarning LexWarningBOM
+  @bom?  { \pos len _ -> do
+              when (len /= 0) $ addWarningAt pos LexWarningBOM
               setStartCode bol_section
               lexToken
          }
 }
 
 <bol_section, bol_field_layout, bol_field_braces> {
-  @nbspspacetab* @nl         { \_pos len inp -> checkWhitespace len inp >> adjustPos retPos >> lexToken }
+  @nbspspacetab* @nl         { \pos len inp -> checkWhitespace pos len inp >> adjustPos retPos >> lexToken }
   -- no @nl here to allow for comments on last line of the file with no trailing \n
   $spacetab* "--" $comment*  ;  -- TODO: check the lack of @nl works here
                                 -- including counting line numbers
 }
 
 <bol_section> {
-  @nbspspacetab*   { \pos len inp -> checkLeadingWhitespace len inp >>
+  @nbspspacetab*   { \pos len inp -> checkLeadingWhitespace pos len inp >>
                                      if B.length inp == len
                                        then return (L pos EOF)
                                        else setStartCode in_section
@@ -123,7 +123,7 @@ tokens :-
 }
 
 <bol_field_layout> {
-  @nbspspacetab* { \pos len inp -> checkLeadingWhitespace len inp >>= \len' ->
+  @nbspspacetab* { \pos len inp -> checkLeadingWhitespace pos len inp >>= \len' ->
                                   if B.length inp == len
                                     then return (L pos EOF)
                                     else setStartCode in_field_layout
@@ -172,17 +172,17 @@ toki t pos  len  input = return $! L pos (t (B.take len input))
 tok :: Token -> Position -> Int -> ByteString -> Lex LToken
 tok  t pos _len _input = return $! L pos t
 
-checkLeadingWhitespace :: Int -> ByteString -> Lex Int
-checkLeadingWhitespace len bs
+checkLeadingWhitespace :: Position -> Int -> ByteString -> Lex Int
+checkLeadingWhitespace pos len bs
     | B.any (== 9) (B.take len bs) = do
-        addWarning LexWarningTab
-        checkWhitespace len bs
-    | otherwise = checkWhitespace len bs
+        addWarningAt pos LexWarningTab
+        checkWhitespace pos len bs
+    | otherwise = checkWhitespace pos len bs
 
-checkWhitespace :: Int -> ByteString -> Lex Int
-checkWhitespace len bs
+checkWhitespace :: Position -> Int -> ByteString -> Lex Int
+checkWhitespace pos len bs
     | B.any (== 194) (B.take len bs) = do
-        addWarning LexWarningNBSP
+        addWarningAt pos LexWarningNBSP
         return $ len - B.count 194 (B.take len bs)
     | otherwise = return len
 

From 8e71243d9a188b4974273ed2f394e4fab58dc7d8 Mon Sep 17 00:00:00 2001
From: gbaz <gershomb@gmail.com>
Date: Sun, 7 May 2023 19:49:23 -0400
Subject: [PATCH 038/144] add base to cabal install --lib default env file
 (#8903)

* add base to cabal install --lib default env file

* check packagedb stack exists

* fix validdb filtering -- move later, test for a dir

* Update CmdInstall.hs

* changelog

* fix comment

---------

Co-authored-by: Gershom Bazerman <gershom@arista.com>
(cherry picked from commit 10de4e5bf9d2eb5fe66383aa43de829f08bc801e)
---
 .../src/Distribution/Client/CmdInstall.hs     | 31 +++++++++++++++----
 changelog.d/pr-8903                           |  9 ++++++
 2 files changed, 34 insertions(+), 6 deletions(-)
 create mode 100644 changelog.d/pr-8903

diff --git a/cabal-install/src/Distribution/Client/CmdInstall.hs b/cabal-install/src/Distribution/Client/CmdInstall.hs
index 94a4737a24d..8cf8c57ccf8 100644
--- a/cabal-install/src/Distribution/Client/CmdInstall.hs
+++ b/cabal-install/src/Distribution/Client/CmdInstall.hs
@@ -106,7 +106,7 @@ import Distribution.Simple.Configure
          ( configCompilerEx )
 import Distribution.Simple.Compiler
          ( Compiler(..), CompilerId(..), CompilerFlavor(..)
-         , PackageDBStack )
+         , PackageDBStack, PackageDB(..) )
 import Distribution.Simple.GHC
          ( ghcPlatformAndVersionString, getGhcAppDir
          , GhcImplInfo(..), getImplInfo
@@ -123,11 +123,13 @@ import Distribution.Verbosity
 import Distribution.Simple.Utils
          ( wrapText, die', notice, warn
          , withTempDirectory, createDirectoryIfMissingVerbose
-         , ordNub )
+         , ordNub, safeHead )
 import Distribution.Utils.Generic
          ( writeFileAtomic )
 
 import qualified Data.ByteString.Lazy.Char8 as BS
+import Data.Ord
+         ( Down(..) )
 import qualified Data.Map as Map
 import qualified Data.Set as S
 import qualified Data.List.NonEmpty as NE
@@ -424,7 +426,7 @@ installAction flags@NixStyleFlags { extraFlags = clientInstallFlags', .. } targe
     unless dryRun $
       if installLibs
       then installLibraries verbosity
-           buildCtx compiler packageDbs envFile nonGlobalEnvEntries'
+           buildCtx installedIndex compiler packageDbs envFile nonGlobalEnvEntries'
       else installExes verbosity
            baseCtx buildCtx platform compiler configFlags clientInstallFlags
   where
@@ -687,20 +689,31 @@ installExes verbosity baseCtx buildCtx platform compiler
 installLibraries
   :: Verbosity
   -> ProjectBuildContext
+  -> PI.PackageIndex InstalledPackageInfo
   -> Compiler
   -> PackageDBStack
   -> FilePath -- ^ Environment file
   -> [GhcEnvironmentFileEntry]
   -> IO ()
-installLibraries verbosity buildCtx compiler
-                 packageDbs envFile envEntries = do
+installLibraries verbosity buildCtx installedIndex compiler
+                 packageDbs' envFile envEntries = do
   if supportsPkgEnvFiles $ getImplInfo compiler
     then do
+      let validDb (SpecificPackageDB fp) = doesPathExist fp
+          validDb _ = pure True
+      -- if a user "installs" a global package and no existing cabal db exists, none will be created.
+      -- this ensures we don't add the "phantom" path to the file.
+      packageDbs <- filterM validDb packageDbs'
       let
+        getLatest = (=<<) (maybeToList . safeHead . snd) . take 1 . sortBy (comparing (Down . fst))
+                  . PI.lookupPackageName installedIndex
+        globalLatest = concat (getLatest <$> globalPackages)
+        globalEntries = GhcEnvFilePackageId . installedUnitId <$> globalLatest
         baseEntries =
           GhcEnvFileClearPackageDbStack : fmap GhcEnvFilePackageDb packageDbs
         pkgEntries = ordNub $
-             envEntries
+             globalEntries
+          ++ envEntries
           ++ entriesForLibraryComponents (targetsMap buildCtx)
         contents' = renderGhcEnvironmentFile (baseEntries ++ pkgEntries)
       createDirectoryIfMissing True (takeDirectory envFile)
@@ -711,6 +724,12 @@ installLibraries verbosity buildCtx compiler
         ++ "so only executables will be available. (Library installation is "
         ++ "supported on GHC 8.0+ only)"
 
+-- See ticket #8894. This is safe to include any nonreinstallable boot pkg,
+-- but the particular package users will always expect to be in scope without specific installation
+-- is base, so that they can access prelude, regardles of if they specifically asked for it.
+globalPackages :: [PackageName]
+globalPackages = mkPackageName <$> [ "base" ]
+
 warnIfNoExes :: Verbosity -> ProjectBuildContext -> IO ()
 warnIfNoExes verbosity buildCtx =
   when noExes $
diff --git a/changelog.d/pr-8903 b/changelog.d/pr-8903
new file mode 100644
index 00000000000..67b1bdb19ce
--- /dev/null
+++ b/changelog.d/pr-8903
@@ -0,0 +1,9 @@
+synopsis: add base to cabal install --lib default env file
+packages: cabal-install
+prs: #8903
+
+description: {
+
+This adds base by default to the env file created by `cabal install --lib`. Further it ensures that packagedbs have been created before adding them to the env file.
+
+}

From dd429ff8e0759c67e8e5cb269812acba412669c1 Mon Sep 17 00:00:00 2001
From: Colton Clemmer <coltonclemmerdev@gmail.com>
Date: Thu, 18 May 2023 11:03:43 -0500
Subject: [PATCH 039/144] Fix default Nix configuration option in generated
 ~/.cabal/config file (#8878)

* default to commented line for nix config

* Fix whitespace

* Remove vscode folder

* Remove default config file for test

* Remove test generated file

* Add changelog

* Add test for default config values

* Remove config file

* Remove parsing file

* Add config file back for tests

* Remove reference to default config to try to get the new test to pass

* Rewrite test to be more verbose WIP

* Stop testing for values and only test for whether it is commented or not

* Fill out rest of tests WIP

* Clean up

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 9bf415a2d38b5e88c0ec71a839fc2003a99b6f74)
---
 .../src/Distribution/Client/Config.hs         |   3 +-
 .../src/Distribution/Client/Setup.hs          |   2 +-
 cabal-install/tests/IntegrationTests2.hs      | 233 ++++++++++++++++-
 .../{nix-config => config}/default-config     |  37 ++-
 changelog.d/pr-8878                           |   9 +
 tests/IntegrationTests2/config/default-config | 246 ++++++++++++++++++
 .../nix-config/default-config                 | 246 ++++++++++++++++++
 7 files changed, 761 insertions(+), 15 deletions(-)
 rename cabal-install/tests/IntegrationTests2/{nix-config => config}/default-config (88%)
 create mode 100644 changelog.d/pr-8878
 create mode 100644 tests/IntegrationTests2/config/default-config
 create mode 100644 tests/IntegrationTests2/nix-config/default-config

diff --git a/cabal-install/src/Distribution/Client/Config.hs b/cabal-install/src/Distribution/Client/Config.hs
index 023d6a6fdbc..b7416345510 100644
--- a/cabal-install/src/Distribution/Client/Config.hs
+++ b/cabal-install/src/Distribution/Client/Config.hs
@@ -900,7 +900,8 @@ commentSavedConfig = do
   globalInstallDirs <- defaultInstallDirs defaultCompiler False True
   let conf0 = mempty {
         savedGlobalFlags       = defaultGlobalFlags {
-            globalRemoteRepos = toNubList [defaultRemoteRepo]
+            globalRemoteRepos = toNubList [defaultRemoteRepo],
+            globalNix         = mempty
             },
         savedInitFlags       = mempty {
             IT.interactive     = toFlag False,
diff --git a/cabal-install/src/Distribution/Client/Setup.hs b/cabal-install/src/Distribution/Client/Setup.hs
index 6db91d9cf98..3ea80c6df23 100644
--- a/cabal-install/src/Distribution/Client/Setup.hs
+++ b/cabal-install/src/Distribution/Client/Setup.hs
@@ -369,7 +369,7 @@ globalCommand commands = CommandUI {
           optArg' "(True or False)" (maybeToFlag . (readMaybe =<<)) (\case
             Flag True -> [Just "enable"]
             Flag False -> [Just "disable"]
-            NoFlag -> [Just "disable"]) "" ["nix"]
+            NoFlag -> []) "" ["nix"] -- Must be empty because we need to return PP.empty from viewAsFieldDescr
             "Nix integration: run commands through nix-shell if a 'shell.nix' file exists (default is False)",
           noArg (Flag True) [] ["enable-nix"]
           "Enable Nix integration: run commands through nix-shell if a 'shell.nix' file exists",
diff --git a/cabal-install/tests/IntegrationTests2.hs b/cabal-install/tests/IntegrationTests2.hs
index 90d272aacae..f94373b60d1 100644
--- a/cabal-install/tests/IntegrationTests2.hs
+++ b/cabal-install/tests/IntegrationTests2.hs
@@ -50,7 +50,7 @@ import Distribution.PackageDescription
 import Distribution.InstalledPackageInfo (InstalledPackageInfo)
 import Distribution.Simple.Setup (toFlag, HaddockFlags(..), defaultHaddockFlags)
 import Distribution.Client.Setup (globalCommand)
-import Distribution.Client.Config (loadConfig, SavedConfig(savedGlobalFlags))
+import Distribution.Client.Config (loadConfig, SavedConfig(savedGlobalFlags), createDefaultConfigFile)
 import Distribution.Simple.Compiler
 import Distribution.Simple.Command
 import qualified Distribution.Simple.Flag as Flag
@@ -62,6 +62,8 @@ import Distribution.Utils.Path
 
 import qualified Data.Map as Map
 import qualified Data.Set as Set
+import Data.List (isInfixOf)
+
 import Control.Monad
 import Control.Concurrent (threadDelay)
 import Control.Exception hiding (assert)
@@ -73,6 +75,7 @@ import Test.Tasty
 import Test.Tasty.HUnit
 import Test.Tasty.Options
 import Data.Tagged (Tagged(..))
+import qualified Data.List as L
 
 import qualified Data.ByteString as BS
 import Distribution.Client.GlobalFlags (GlobalFlags, globalNix)
@@ -149,6 +152,7 @@ tests config =
   , testGroup "Flag tests" $
     [
       testCase "Test Nix Flag" testNixFlags,
+      testCase "Test Config options for commented options" testConfigOptionComments,
       testCase "Test Ignore Project Flag" testIgnoreProjectFlag
     ]
   ]
@@ -1958,13 +1962,12 @@ testNixFlags = do
   Nothing @=? (fromFlag . globalNix . fromJust $ nixDefaultFlags)
 
   -- Config file options
-  defaultConfig <- loadConfig verbosity (Flag (basedir </> "nix-config/default-config"))
   trueConfig <- loadConfig verbosity (Flag (basedir </> "nix-config/nix-true"))
   falseConfig <- loadConfig verbosity (Flag (basedir </> "nix-config/nix-false"))
 
-  Nothing @=? (fromFlag . globalNix . savedGlobalFlags $ defaultConfig)
   Just True @=? (fromFlag . globalNix . savedGlobalFlags $ trueConfig)
   Just False @=? (fromFlag . globalNix . savedGlobalFlags $ falseConfig)
+
   where
     fromFlag :: Flag Bool -> Maybe Bool
     fromFlag (Flag x) = Just x
@@ -1973,6 +1976,230 @@ testNixFlags = do
     getFlags cui (CommandReadyToGo (mkflags, _)) = Just . mkflags . commandDefaultFlags $ cui
     getFlags _ _ = Nothing
 
+-- Tests whether config options are commented or not
+testConfigOptionComments :: Assertion
+testConfigOptionComments = do
+  _ <- createDefaultConfigFile verbosity [] (basedir </> "config/default-config")
+  defaultConfigFile <- readFile (basedir </> "config/default-config")
+
+  "  url" @=? findLineWith False "url" defaultConfigFile
+  "  -- secure" @=? findLineWith True "secure" defaultConfigFile
+  "  -- root-keys" @=? findLineWith True "root-keys" defaultConfigFile
+  "  -- key-threshold" @=? findLineWith True "key-threshold" defaultConfigFile
+
+  "-- ignore-expiry" @=? findLineWith True "ignore-expiry" defaultConfigFile
+  "-- http-transport" @=? findLineWith True "http-transport" defaultConfigFile
+  "-- nix" @=? findLineWith True "nix" defaultConfigFile
+  "-- store-dir" @=? findLineWith True "store-dir" defaultConfigFile
+  "-- active-repositories" @=? findLineWith True "active-repositories" defaultConfigFile
+  "-- local-no-index-repo" @=? findLineWith True "local-no-index-repo" defaultConfigFile
+  "remote-repo-cache"  @=? findLineWith False "remote-repo-cache" defaultConfigFile
+  "-- logs-dir"  @=? findLineWith True "logs-dir" defaultConfigFile
+  "-- default-user-config" @=? findLineWith True "default-user-config" defaultConfigFile
+  "-- verbose" @=? findLineWith True "verbose" defaultConfigFile
+  "-- compiler" @=? findLineWith True "compiler" defaultConfigFile
+  "-- cabal-file" @=? findLineWith True "cabal-file" defaultConfigFile
+  "-- with-compiler" @=? findLineWith True "with-compiler" defaultConfigFile
+  "-- with-hc-pkg" @=? findLineWith True "with-hc-pkg" defaultConfigFile
+  "-- program-prefix" @=? findLineWith True "program-prefix" defaultConfigFile
+  "-- program-suffix" @=? findLineWith True "program-suffix" defaultConfigFile
+  "-- library-vanilla" @=? findLineWith True "library-vanilla" defaultConfigFile
+  "-- library-profiling" @=? findLineWith True "library-profiling" defaultConfigFile
+  "-- shared" @=? findLineWith True "shared" defaultConfigFile
+  "-- static" @=? findLineWith True "static" defaultConfigFile
+  "-- executable-dynamic" @=? findLineWith True "executable-dynamic" defaultConfigFile
+  "-- executable-static" @=? findLineWith True "executable-static" defaultConfigFile
+  "-- profiling" @=? findLineWith True "profiling" defaultConfigFile
+  "-- executable-profiling" @=? findLineWith True "executable-profiling" defaultConfigFile
+  "-- profiling-detail" @=? findLineWith True "profiling-detail" defaultConfigFile
+  "-- library-profiling-detail" @=? findLineWith True "library-profiling-detail" defaultConfigFile
+  "-- optimization" @=? findLineWith True "optimization" defaultConfigFile
+  "-- debug-info" @=? findLineWith True "debug-info" defaultConfigFile
+  "-- build-info" @=? findLineWith True "build-info" defaultConfigFile
+  "-- library-for-ghci" @=? findLineWith True "library-for-ghci" defaultConfigFile
+  "-- split-sections" @=? findLineWith True "split-sections" defaultConfigFile
+  "-- split-objs" @=? findLineWith True "split-objs" defaultConfigFile
+  "-- executable-stripping" @=? findLineWith True "executable-stripping" defaultConfigFile
+  "-- library-stripping" @=? findLineWith True "library-stripping" defaultConfigFile
+  "-- configure-option" @=? findLineWith True "configure-option" defaultConfigFile
+  "-- user-install"  @=? findLineWith True "user-install" defaultConfigFile
+  "-- package-db"  @=? findLineWith True "package-db" defaultConfigFile
+  "-- flags" @=? findLineWith True "flags" defaultConfigFile
+  "-- extra-include-dirs" @=? findLineWith True "extra-include-dirs" defaultConfigFile
+  "-- deterministic" @=? findLineWith True "deterministic" defaultConfigFile
+  "-- cid" @=? findLineWith True "cid" defaultConfigFile
+  "-- extra-lib-dirs" @=? findLineWith True "extra-lib-dirs" defaultConfigFile
+  "-- extra-lib-dirs-static" @=? findLineWith True "extra-lib-dirs-static" defaultConfigFile
+  "-- extra-framework-dirs" @=? findLineWith True "extra-framework-dirs" defaultConfigFile
+  "extra-prog-path"  @=? findLineWith False "extra-prog-path" defaultConfigFile
+  "-- instantiate-with" @=? findLineWith True "instantiate-with" defaultConfigFile
+  "-- tests" @=? findLineWith True "tests" defaultConfigFile
+  "-- coverage" @=? findLineWith True "coverage" defaultConfigFile
+  "-- library-coverage" @=? findLineWith True "library-coverage" defaultConfigFile
+  "-- exact-configuration" @=? findLineWith True "exact-configuration" defaultConfigFile
+  "-- benchmarks" @=? findLineWith True "benchmarks" defaultConfigFile
+  "-- relocatable"  @=? findLineWith True "relocatable" defaultConfigFile
+  "-- response-files" @=? findLineWith True "response-files" defaultConfigFile
+  "-- allow-depending-on-private-libs" @=? findLineWith True "allow-depending-on-private-libs" defaultConfigFile
+  "-- cabal-lib-version" @=? findLineWith True "cabal-lib-version" defaultConfigFile
+  "-- append" @=? findLineWith True "append" defaultConfigFile
+  "-- backup" @=? findLineWith True "backup" defaultConfigFile
+  "-- constraint" @=? findLineWith True "constraint" defaultConfigFile
+  "-- preference" @=? findLineWith True "preference" defaultConfigFile
+  "-- solver"  @=? findLineWith True "solver" defaultConfigFile
+  "-- allow-older"  @=? findLineWith True "allow-older" defaultConfigFile
+  "-- allow-newer"  @=? findLineWith True "allow-newer" defaultConfigFile
+  "-- write-ghc-environment-files" @=? findLineWith True "write-ghc-environment-files" defaultConfigFile
+  "-- documentation"  @=? findLineWith True "documentation" defaultConfigFile
+  "-- doc-index-file"  @=? findLineWith True "doc-index-file" defaultConfigFile
+  "-- only-download"  @=? findLineWith True "only-download" defaultConfigFile
+  "-- target-package-db" @=? findLineWith True "target-package-db" defaultConfigFile
+  "-- max-backjumps"  @=? findLineWith True "max-backjumps" defaultConfigFile
+  "-- reorder-goals"  @=? findLineWith True "reorder-goals" defaultConfigFile
+  "-- count-conflicts"  @=? findLineWith True "count-conflicts" defaultConfigFile
+  "-- fine-grained-conflicts"  @=? findLineWith True "fine-grained-conflicts" defaultConfigFile
+  "-- minimize-conflict-set"  @=? findLineWith True "minimize-conflict-set" defaultConfigFile
+  "-- independent-goals"  @=? findLineWith True "independent-goals" defaultConfigFile
+  "-- prefer-oldest"  @=? findLineWith True "prefer-oldest" defaultConfigFile
+  "-- shadow-installed-packages"  @=? findLineWith True "shadow-installed-packages" defaultConfigFile
+  "-- strong-flags"  @=? findLineWith True "strong-flags" defaultConfigFile
+  "-- allow-boot-library-installs"  @=? findLineWith True "allow-boot-library-installs" defaultConfigFile
+  "-- reject-unconstrained-dependencies"  @=? findLineWith True "reject-unconstrained-dependencies" defaultConfigFile
+  "-- reinstall"  @=? findLineWith True "reinstall" defaultConfigFile
+  "-- avoid-reinstalls"  @=? findLineWith True "avoid-reinstalls" defaultConfigFile
+  "-- force-reinstalls"  @=? findLineWith True "force-reinstalls" defaultConfigFile
+  "-- upgrade-dependencies"  @=? findLineWith True "upgrade-dependencies" defaultConfigFile
+  "-- index-state" @=? findLineWith True "index-state" defaultConfigFile
+  "-- root-cmd" @=? findLineWith True "root-cmd" defaultConfigFile
+  "-- symlink-bindir" @=? findLineWith True "symlink-bindir" defaultConfigFile
+  "build-summary"  @=? findLineWith False "build-summary" defaultConfigFile
+  "-- build-log" @=? findLineWith True "build-log" defaultConfigFile
+  "remote-build-reporting"  @=? findLineWith False "remote-build-reporting" defaultConfigFile
+  "-- report-planning-failure"  @=? findLineWith True "report-planning-failure" defaultConfigFile
+  "-- per-component"  @=? findLineWith True "per-component" defaultConfigFile
+  "-- run-tests" @=? findLineWith True "run-tests" defaultConfigFile
+  "jobs"  @=? findLineWith False "jobs" defaultConfigFile
+  "-- keep-going"  @=? findLineWith True "keep-going" defaultConfigFile
+  "-- offline"  @=? findLineWith True "offline" defaultConfigFile
+  "-- lib" @=? findLineWith True "lib" defaultConfigFile
+  "-- package-env" @=? findLineWith True "package-env" defaultConfigFile
+  "-- overwrite-policy" @=? findLineWith True "overwrite-policy" defaultConfigFile
+  "-- install-method" @=? findLineWith True "install-method" defaultConfigFile
+  "installdir"  @=? findLineWith False "installdir" defaultConfigFile
+  "-- username" @=? findLineWith True "username" defaultConfigFile
+  "-- password" @=? findLineWith True "password" defaultConfigFile
+  "-- password-command" @=? findLineWith True "password-command" defaultConfigFile
+  "-- builddir" @=? findLineWith True "builddir" defaultConfigFile
+
+  "  -- keep-temp-files" @=? findLineWith True "keep-temp-files" defaultConfigFile
+  "  -- hoogle" @=? findLineWith True "hoogle" defaultConfigFile
+  "  -- html" @=? findLineWith True "html" defaultConfigFile
+  "  -- html-location" @=? findLineWith True "html-location" defaultConfigFile
+  "  -- executables" @=? findLineWith True "executables" defaultConfigFile
+  "  -- foreign-libraries" @=? findLineWith True "foreign-libraries" defaultConfigFile
+  "  -- all" @=? findLineWith True "all" defaultConfigFile
+  "  -- internal" @=? findLineWith True "internal" defaultConfigFile
+  "  -- css" @=? findLineWith True "css" defaultConfigFile
+  "  -- hyperlink-source" @=? findLineWith True "hyperlink-source" defaultConfigFile
+  "  -- quickjump" @=? findLineWith True "quickjump" defaultConfigFile
+  "  -- hscolour-css" @=? findLineWith True "hscolour-css" defaultConfigFile
+  "  -- contents-location" @=? findLineWith True "contents-location" defaultConfigFile
+  "  -- index-location" @=? findLineWith True "index-location" defaultConfigFile
+  "  -- base-url" @=? findLineWith True "base-url" defaultConfigFile
+  "  -- output-dir" @=? findLineWith True "output-dir" defaultConfigFile
+
+  "  -- interactive" @=? findLineWith True "interactive" defaultConfigFile
+  "  -- quiet" @=? findLineWith True "quiet" defaultConfigFile
+  "  -- no-comments" @=? findLineWith True "no-comments" defaultConfigFile
+  "  -- minimal" @=? findLineWith True "minimal" defaultConfigFile
+  "  -- cabal-version" @=? findLineWith True "cabal-version" defaultConfigFile
+  "  -- license" @=? findLineWith True "license" defaultConfigFile
+  "  -- extra-doc-file" @=? findLineWith True "extra-doc-file" defaultConfigFile
+  "  -- test-dir" @=? findLineWith True "test-dir" defaultConfigFile
+  "  -- simple" @=? findLineWith True "simple" defaultConfigFile
+  "  -- language" @=? findLineWith True "language" defaultConfigFile
+  "  -- application-dir" @=? findLineWith True "application-dir" defaultConfigFile
+  "  -- source-dir" @=? findLineWith True "source-dir" defaultConfigFile
+
+  "  -- prefix"  @=? findLineWith True "prefix" defaultConfigFile
+  "  -- bindir"@=? findLineWith True "bindir" defaultConfigFile
+  "  -- libdir" @=? findLineWith True "libdir" defaultConfigFile
+  "  -- libsubdir" @=? findLineWith True "libsubdir" defaultConfigFile
+  "  -- dynlibdir" @=? findLineWith True "dynlibdir" defaultConfigFile
+  "  -- libexecdir" @=? findLineWith True "libexecdir" defaultConfigFile
+  "  -- libexecsubdir" @=? findLineWith True "libexecsubdir" defaultConfigFile
+  "  -- datadir" @=? findLineWith True "datadir" defaultConfigFile
+  "  -- datasubdir" @=? findLineWith True "datasubdir" defaultConfigFile
+  "  -- docdir" @=? findLineWith True "docdir" defaultConfigFile
+  "  -- htmldir" @=? findLineWith True "htmldir" defaultConfigFile
+  "  -- haddockdir" @=? findLineWith True "haddockdir" defaultConfigFile
+  "  -- sysconfdir" @=? findLineWith True "sysconfdir" defaultConfigFile
+
+  "  -- alex-location" @=? findLineWith True "alex-location" defaultConfigFile
+  "  -- ar-location" @=? findLineWith True "ar-location" defaultConfigFile
+  "  -- c2hs-location" @=? findLineWith True "c2hs-location" defaultConfigFile
+  "  -- cpphs-location" @=? findLineWith True "cpphs-location" defaultConfigFile
+  "  -- doctest-location" @=? findLineWith True "doctest-location" defaultConfigFile
+  "  -- gcc-location" @=? findLineWith True "gcc-location" defaultConfigFile
+  "  -- ghc-location" @=? findLineWith True "ghc-location" defaultConfigFile
+  "  -- ghc-pkg-location" @=? findLineWith True "ghc-pkg-location" defaultConfigFile
+  "  -- ghcjs-location" @=? findLineWith True "ghcjs-location" defaultConfigFile
+  "  -- ghcjs-pkg-location" @=? findLineWith True "ghcjs-pkg-location" defaultConfigFile
+  "  -- greencard-location" @=? findLineWith True "greencard-location" defaultConfigFile
+  "  -- haddock-location" @=? findLineWith True "haddock-location" defaultConfigFile
+  "  -- happy-location" @=? findLineWith True "happy-location" defaultConfigFile
+  "  -- haskell-suite-location" @=? findLineWith True "haskell-suite-location" defaultConfigFile
+  "  -- haskell-suite-pkg-location" @=? findLineWith True "haskell-suite-pkg-location" defaultConfigFile
+  "  -- hmake-location" @=? findLineWith True "hmake-location" defaultConfigFile
+  "  -- hpc-location" @=? findLineWith True "hpc-location" defaultConfigFile
+  "  -- hscolour-location" @=? findLineWith True "hscolour-location" defaultConfigFile
+  "  -- jhc-location" @=? findLineWith True "jhc-location" defaultConfigFile
+  "  -- ld-location" @=? findLineWith True "ld-location" defaultConfigFile
+  "  -- pkg-config-location" @=? findLineWith True "pkg-config-location" defaultConfigFile
+  "  -- runghc-location" @=? findLineWith True "runghc-location" defaultConfigFile
+  "  -- strip-location" @=? findLineWith True "strip-location" defaultConfigFile
+  "  -- tar-location" @=? findLineWith True "tar-location" defaultConfigFile
+  "  -- uhc-location" @=? findLineWith True "uhc-location" defaultConfigFile
+
+  "  -- alex-options" @=? findLineWith True "alex-options" defaultConfigFile
+  "  -- ar-options" @=? findLineWith True "ar-options" defaultConfigFile
+  "  -- c2hs-options" @=? findLineWith True "c2hs-options" defaultConfigFile
+  "  -- cpphs-options" @=? findLineWith True "cpphs-options" defaultConfigFile
+  "  -- doctest-options" @=? findLineWith True "doctest-options" defaultConfigFile
+  "  -- gcc-options" @=? findLineWith True "gcc-options" defaultConfigFile
+  "  -- ghc-options" @=? findLineWith True "ghc-options" defaultConfigFile
+  "  -- ghc-pkg-options" @=? findLineWith True "ghc-pkg-options" defaultConfigFile
+  "  -- ghcjs-options" @=? findLineWith True "ghcjs-options" defaultConfigFile
+  "  -- ghcjs-pkg-options" @=? findLineWith True "ghcjs-pkg-options" defaultConfigFile
+  "  -- greencard-options" @=? findLineWith True "greencard-options" defaultConfigFile
+  "  -- haddock-options" @=? findLineWith True "haddock-options" defaultConfigFile
+  "  -- happy-options" @=? findLineWith True "happy-options" defaultConfigFile
+  "  -- haskell-suite-options" @=? findLineWith True "haskell-suite-options" defaultConfigFile
+  "  -- haskell-suite-pkg-options" @=? findLineWith True "haskell-suite-pkg-options" defaultConfigFile
+  "  -- hmake-options" @=? findLineWith True "hmake-options" defaultConfigFile
+  "  -- hpc-options" @=? findLineWith True "hpc-options" defaultConfigFile
+  "  -- hsc2hs-options" @=? findLineWith True "hsc2hs-options" defaultConfigFile
+  "  -- hscolour-options" @=? findLineWith True "hscolour-options" defaultConfigFile
+  "  -- jhc-options" @=? findLineWith True "jhc-options" defaultConfigFile
+  "  -- ld-options" @=? findLineWith True "ld-options" defaultConfigFile
+  "  -- pkg-config-options" @=? findLineWith True "pkg-config-options" defaultConfigFile
+  "  -- runghc-options" @=? findLineWith True "runghc-options" defaultConfigFile
+  "  -- strip-options" @=? findLineWith True "strip-options" defaultConfigFile
+  "  -- tar-options" @=? findLineWith True "tar-options" defaultConfigFile
+  "  -- uhc-options" @=? findLineWith True "uhc-options" defaultConfigFile
+  where
+    -- | Find lines containing a target string.
+    findLineWith :: Bool -> String -> String -> String
+    findLineWith isComment target text
+      | not . null $ findLinesWith isComment target text = removeCommentValue . L.head $ findLinesWith isComment target text
+      | otherwise  = ""
+    findLinesWith :: Bool -> String -> String -> [String]
+    findLinesWith isComment target
+      | isComment = filter (isInfixOf (" " ++ target ++ ":")) . lines
+      | otherwise = filter (isInfixOf (target ++ ":")) . lines
+    removeCommentValue :: String -> String
+    removeCommentValue = takeWhile (/= ':')
+
 testIgnoreProjectFlag :: Assertion
 testIgnoreProjectFlag = do
   -- Coverage flag should be false globally by default (~/.cabal folder)
diff --git a/cabal-install/tests/IntegrationTests2/nix-config/default-config b/cabal-install/tests/IntegrationTests2/config/default-config
similarity index 88%
rename from cabal-install/tests/IntegrationTests2/nix-config/default-config
rename to cabal-install/tests/IntegrationTests2/config/default-config
index 342121f7092..8e3aa02742c 100644
--- a/cabal-install/tests/IntegrationTests2/nix-config/default-config
+++ b/cabal-install/tests/IntegrationTests2/config/default-config
@@ -9,8 +9,8 @@
 --
 -- This config file was generated using the following versions
 -- of Cabal and cabal-install:
--- Cabal library version: 3.6.2.0
--- cabal-install version: 3.6.2.0
+-- Cabal library version: 3.11.0.0
+-- cabal-install version: 3.11
 
 
 repository hackage.haskell.org
@@ -19,15 +19,15 @@ repository hackage.haskell.org
   -- root-keys:
   -- key-threshold: 3
 
--- default-user-config:
 -- ignore-expiry: False
 -- http-transport:
--- nix: False
--- local-no-index-repo:
-
---debug-info: 1
+-- nix:
 -- store-dir:
 -- active-repositories:
+-- local-no-index-repo:
+remote-repo-cache: /home/colton/.cabal/packages
+-- logs-dir: /home/colton/.cabal/logs
+-- default-user-config:
 -- verbose: 1
 -- compiler: ghc
 -- cabal-file:
@@ -47,6 +47,7 @@ repository hackage.haskell.org
 -- library-profiling-detail:
 -- optimization: True
 -- debug-info: False
+-- build-info:
 -- library-for-ghci:
 -- split-sections: False
 -- split-objs: False
@@ -60,7 +61,9 @@ repository hackage.haskell.org
 -- deterministic:
 -- cid:
 -- extra-lib-dirs:
+-- extra-lib-dirs-static:
 -- extra-framework-dirs:
+extra-prog-path: /home/colton/.cabal/bin
 -- instantiate-with:
 -- tests: False
 -- coverage: False
@@ -71,6 +74,8 @@ repository hackage.haskell.org
 -- response-files:
 -- allow-depending-on-private-libs:
 -- cabal-lib-version:
+-- append:
+-- backup:
 -- constraint:
 -- preference:
 -- solver: modular
@@ -87,6 +92,7 @@ repository hackage.haskell.org
 -- fine-grained-conflicts: True
 -- minimize-conflict-set: False
 -- independent-goals: False
+-- prefer-oldest: False
 -- shadow-installed-packages: False
 -- strong-flags: False
 -- allow-boot-library-installs: False
@@ -98,11 +104,11 @@ repository hackage.haskell.org
 -- index-state:
 -- root-cmd:
 -- symlink-bindir:
+build-summary: /home/colton/.cabal/logs/build.log
 -- build-log:
 remote-build-reporting: none
 -- report-planning-failure: False
 -- per-component: True
--- one-shot: False
 -- run-tests:
 jobs: $ncpus
 -- keep-going: False
@@ -111,6 +117,7 @@ jobs: $ncpus
 -- package-env:
 -- overwrite-policy:
 -- install-method:
+installdir: /home/colton/.cabal/bin
 -- username:
 -- password:
 -- password-command:
@@ -132,18 +139,28 @@ haddock
   -- quickjump: False
   -- hscolour-css:
   -- contents-location:
+  -- index-location:
+  -- base-url:
+  -- lib:
+  -- output-dir:
 
 init
   -- interactive: False
-  -- cabal-version: 2.4
+  -- quiet: False
+  -- no-comments: False
+  -- minimal: False
+  -- cabal-version: 3.0
   -- license:
+  -- extra-doc-file:
   -- tests:
   -- test-dir:
+  -- simple: False
   -- language: Haskell2010
   -- application-dir: app
   -- source-dir: src
 
 install-dirs user
+  -- prefix: /home/colton/.cabal
   -- bindir: $prefix/bin
   -- libdir: $prefix/lib
   -- libsubdir: $abi/$libname
@@ -226,4 +243,4 @@ program-default-options
   -- runghc-options:
   -- strip-options:
   -- tar-options:
-  -- uhc-options:
\ No newline at end of file
+  -- uhc-options:
diff --git a/changelog.d/pr-8878 b/changelog.d/pr-8878
new file mode 100644
index 00000000000..af3dcce15de
--- /dev/null
+++ b/changelog.d/pr-8878
@@ -0,0 +1,9 @@
+synopsis: Fix default Nix configuration option in generated ~/.cabal/config file
+packages: cabal-install
+prs: #8878
+
+description: {
+
+Fixes the default for ~/.cabal/config file. The nix option should now be commented out by default.
+
+}
diff --git a/tests/IntegrationTests2/config/default-config b/tests/IntegrationTests2/config/default-config
new file mode 100644
index 00000000000..8e3aa02742c
--- /dev/null
+++ b/tests/IntegrationTests2/config/default-config
@@ -0,0 +1,246 @@
+-- This is the configuration file for the 'cabal' command line tool.
+--
+-- The available configuration options are listed below.
+-- Some of them have default values listed.
+--
+-- Lines (like this one) beginning with '--' are comments.
+-- Be careful with spaces and indentation because they are
+-- used to indicate layout for nested sections.
+--
+-- This config file was generated using the following versions
+-- of Cabal and cabal-install:
+-- Cabal library version: 3.11.0.0
+-- cabal-install version: 3.11
+
+
+repository hackage.haskell.org
+  url: http://hackage.haskell.org/
+  -- secure: True
+  -- root-keys:
+  -- key-threshold: 3
+
+-- ignore-expiry: False
+-- http-transport:
+-- nix:
+-- store-dir:
+-- active-repositories:
+-- local-no-index-repo:
+remote-repo-cache: /home/colton/.cabal/packages
+-- logs-dir: /home/colton/.cabal/logs
+-- default-user-config:
+-- verbose: 1
+-- compiler: ghc
+-- cabal-file:
+-- with-compiler:
+-- with-hc-pkg:
+-- program-prefix: 
+-- program-suffix: 
+-- library-vanilla: True
+-- library-profiling:
+-- shared:
+-- static:
+-- executable-dynamic: False
+-- executable-static: False
+-- profiling:
+-- executable-profiling:
+-- profiling-detail:
+-- library-profiling-detail:
+-- optimization: True
+-- debug-info: False
+-- build-info:
+-- library-for-ghci:
+-- split-sections: False
+-- split-objs: False
+-- executable-stripping:
+-- library-stripping:
+-- configure-option:
+-- user-install: True
+-- package-db:
+-- flags:
+-- extra-include-dirs:
+-- deterministic:
+-- cid:
+-- extra-lib-dirs:
+-- extra-lib-dirs-static:
+-- extra-framework-dirs:
+extra-prog-path: /home/colton/.cabal/bin
+-- instantiate-with:
+-- tests: False
+-- coverage: False
+-- library-coverage:
+-- exact-configuration: False
+-- benchmarks: False
+-- relocatable: False
+-- response-files:
+-- allow-depending-on-private-libs:
+-- cabal-lib-version:
+-- append:
+-- backup:
+-- constraint:
+-- preference:
+-- solver: modular
+-- allow-older: False
+-- allow-newer: False
+-- write-ghc-environment-files:
+-- documentation: False
+-- doc-index-file: $datadir/doc/$arch-$os-$compiler/index.html
+-- only-download: False
+-- target-package-db:
+-- max-backjumps: 4000
+-- reorder-goals: False
+-- count-conflicts: True
+-- fine-grained-conflicts: True
+-- minimize-conflict-set: False
+-- independent-goals: False
+-- prefer-oldest: False
+-- shadow-installed-packages: False
+-- strong-flags: False
+-- allow-boot-library-installs: False
+-- reject-unconstrained-dependencies: none
+-- reinstall: False
+-- avoid-reinstalls: False
+-- force-reinstalls: False
+-- upgrade-dependencies: False
+-- index-state:
+-- root-cmd:
+-- symlink-bindir:
+build-summary: /home/colton/.cabal/logs/build.log
+-- build-log:
+remote-build-reporting: none
+-- report-planning-failure: False
+-- per-component: True
+-- run-tests:
+jobs: $ncpus
+-- keep-going: False
+-- offline: False
+-- lib: False
+-- package-env:
+-- overwrite-policy:
+-- install-method:
+installdir: /home/colton/.cabal/bin
+-- username:
+-- password:
+-- password-command:
+-- builddir:
+
+haddock
+  -- keep-temp-files: False
+  -- hoogle: False
+  -- html: False
+  -- html-location:
+  -- executables: False
+  -- tests: False
+  -- benchmarks: False
+  -- foreign-libraries: False
+  -- all:
+  -- internal: False
+  -- css:
+  -- hyperlink-source: False
+  -- quickjump: False
+  -- hscolour-css:
+  -- contents-location:
+  -- index-location:
+  -- base-url:
+  -- lib:
+  -- output-dir:
+
+init
+  -- interactive: False
+  -- quiet: False
+  -- no-comments: False
+  -- minimal: False
+  -- cabal-version: 3.0
+  -- license:
+  -- extra-doc-file:
+  -- tests:
+  -- test-dir:
+  -- simple: False
+  -- language: Haskell2010
+  -- application-dir: app
+  -- source-dir: src
+
+install-dirs user
+  -- prefix: /home/colton/.cabal
+  -- bindir: $prefix/bin
+  -- libdir: $prefix/lib
+  -- libsubdir: $abi/$libname
+  -- dynlibdir: $libdir/$abi
+  -- libexecdir: $prefix/libexec
+  -- libexecsubdir: $abi/$pkgid
+  -- datadir: $prefix/share
+  -- datasubdir: $abi/$pkgid
+  -- docdir: $datadir/doc/$abi/$pkgid
+  -- htmldir: $docdir/html
+  -- haddockdir: $htmldir
+  -- sysconfdir: $prefix/etc
+
+install-dirs global
+  -- prefix: /usr/local
+  -- bindir: $prefix/bin
+  -- libdir: $prefix/lib
+  -- libsubdir: $abi/$libname
+  -- dynlibdir: $libdir/$abi
+  -- libexecdir: $prefix/libexec
+  -- libexecsubdir: $abi/$pkgid
+  -- datadir: $prefix/share
+  -- datasubdir: $abi/$pkgid
+  -- docdir: $datadir/doc/$abi/$pkgid
+  -- htmldir: $docdir/html
+  -- haddockdir: $htmldir
+  -- sysconfdir: $prefix/etc
+
+program-locations
+  -- alex-location:
+  -- ar-location:
+  -- c2hs-location:
+  -- cpphs-location:
+  -- doctest-location:
+  -- gcc-location:
+  -- ghc-location:
+  -- ghc-pkg-location:
+  -- ghcjs-location:
+  -- ghcjs-pkg-location:
+  -- greencard-location:
+  -- haddock-location:
+  -- happy-location:
+  -- haskell-suite-location:
+  -- haskell-suite-pkg-location:
+  -- hmake-location:
+  -- hpc-location:
+  -- hsc2hs-location:
+  -- hscolour-location:
+  -- jhc-location:
+  -- ld-location:
+  -- pkg-config-location:
+  -- runghc-location:
+  -- strip-location:
+  -- tar-location:
+  -- uhc-location:
+
+program-default-options
+  -- alex-options:
+  -- ar-options:
+  -- c2hs-options:
+  -- cpphs-options:
+  -- doctest-options:
+  -- gcc-options:
+  -- ghc-options:
+  -- ghc-pkg-options:
+  -- ghcjs-options:
+  -- ghcjs-pkg-options:
+  -- greencard-options:
+  -- haddock-options:
+  -- happy-options:
+  -- haskell-suite-options:
+  -- haskell-suite-pkg-options:
+  -- hmake-options:
+  -- hpc-options:
+  -- hsc2hs-options:
+  -- hscolour-options:
+  -- jhc-options:
+  -- ld-options:
+  -- pkg-config-options:
+  -- runghc-options:
+  -- strip-options:
+  -- tar-options:
+  -- uhc-options:
diff --git a/tests/IntegrationTests2/nix-config/default-config b/tests/IntegrationTests2/nix-config/default-config
new file mode 100644
index 00000000000..8e3aa02742c
--- /dev/null
+++ b/tests/IntegrationTests2/nix-config/default-config
@@ -0,0 +1,246 @@
+-- This is the configuration file for the 'cabal' command line tool.
+--
+-- The available configuration options are listed below.
+-- Some of them have default values listed.
+--
+-- Lines (like this one) beginning with '--' are comments.
+-- Be careful with spaces and indentation because they are
+-- used to indicate layout for nested sections.
+--
+-- This config file was generated using the following versions
+-- of Cabal and cabal-install:
+-- Cabal library version: 3.11.0.0
+-- cabal-install version: 3.11
+
+
+repository hackage.haskell.org
+  url: http://hackage.haskell.org/
+  -- secure: True
+  -- root-keys:
+  -- key-threshold: 3
+
+-- ignore-expiry: False
+-- http-transport:
+-- nix:
+-- store-dir:
+-- active-repositories:
+-- local-no-index-repo:
+remote-repo-cache: /home/colton/.cabal/packages
+-- logs-dir: /home/colton/.cabal/logs
+-- default-user-config:
+-- verbose: 1
+-- compiler: ghc
+-- cabal-file:
+-- with-compiler:
+-- with-hc-pkg:
+-- program-prefix: 
+-- program-suffix: 
+-- library-vanilla: True
+-- library-profiling:
+-- shared:
+-- static:
+-- executable-dynamic: False
+-- executable-static: False
+-- profiling:
+-- executable-profiling:
+-- profiling-detail:
+-- library-profiling-detail:
+-- optimization: True
+-- debug-info: False
+-- build-info:
+-- library-for-ghci:
+-- split-sections: False
+-- split-objs: False
+-- executable-stripping:
+-- library-stripping:
+-- configure-option:
+-- user-install: True
+-- package-db:
+-- flags:
+-- extra-include-dirs:
+-- deterministic:
+-- cid:
+-- extra-lib-dirs:
+-- extra-lib-dirs-static:
+-- extra-framework-dirs:
+extra-prog-path: /home/colton/.cabal/bin
+-- instantiate-with:
+-- tests: False
+-- coverage: False
+-- library-coverage:
+-- exact-configuration: False
+-- benchmarks: False
+-- relocatable: False
+-- response-files:
+-- allow-depending-on-private-libs:
+-- cabal-lib-version:
+-- append:
+-- backup:
+-- constraint:
+-- preference:
+-- solver: modular
+-- allow-older: False
+-- allow-newer: False
+-- write-ghc-environment-files:
+-- documentation: False
+-- doc-index-file: $datadir/doc/$arch-$os-$compiler/index.html
+-- only-download: False
+-- target-package-db:
+-- max-backjumps: 4000
+-- reorder-goals: False
+-- count-conflicts: True
+-- fine-grained-conflicts: True
+-- minimize-conflict-set: False
+-- independent-goals: False
+-- prefer-oldest: False
+-- shadow-installed-packages: False
+-- strong-flags: False
+-- allow-boot-library-installs: False
+-- reject-unconstrained-dependencies: none
+-- reinstall: False
+-- avoid-reinstalls: False
+-- force-reinstalls: False
+-- upgrade-dependencies: False
+-- index-state:
+-- root-cmd:
+-- symlink-bindir:
+build-summary: /home/colton/.cabal/logs/build.log
+-- build-log:
+remote-build-reporting: none
+-- report-planning-failure: False
+-- per-component: True
+-- run-tests:
+jobs: $ncpus
+-- keep-going: False
+-- offline: False
+-- lib: False
+-- package-env:
+-- overwrite-policy:
+-- install-method:
+installdir: /home/colton/.cabal/bin
+-- username:
+-- password:
+-- password-command:
+-- builddir:
+
+haddock
+  -- keep-temp-files: False
+  -- hoogle: False
+  -- html: False
+  -- html-location:
+  -- executables: False
+  -- tests: False
+  -- benchmarks: False
+  -- foreign-libraries: False
+  -- all:
+  -- internal: False
+  -- css:
+  -- hyperlink-source: False
+  -- quickjump: False
+  -- hscolour-css:
+  -- contents-location:
+  -- index-location:
+  -- base-url:
+  -- lib:
+  -- output-dir:
+
+init
+  -- interactive: False
+  -- quiet: False
+  -- no-comments: False
+  -- minimal: False
+  -- cabal-version: 3.0
+  -- license:
+  -- extra-doc-file:
+  -- tests:
+  -- test-dir:
+  -- simple: False
+  -- language: Haskell2010
+  -- application-dir: app
+  -- source-dir: src
+
+install-dirs user
+  -- prefix: /home/colton/.cabal
+  -- bindir: $prefix/bin
+  -- libdir: $prefix/lib
+  -- libsubdir: $abi/$libname
+  -- dynlibdir: $libdir/$abi
+  -- libexecdir: $prefix/libexec
+  -- libexecsubdir: $abi/$pkgid
+  -- datadir: $prefix/share
+  -- datasubdir: $abi/$pkgid
+  -- docdir: $datadir/doc/$abi/$pkgid
+  -- htmldir: $docdir/html
+  -- haddockdir: $htmldir
+  -- sysconfdir: $prefix/etc
+
+install-dirs global
+  -- prefix: /usr/local
+  -- bindir: $prefix/bin
+  -- libdir: $prefix/lib
+  -- libsubdir: $abi/$libname
+  -- dynlibdir: $libdir/$abi
+  -- libexecdir: $prefix/libexec
+  -- libexecsubdir: $abi/$pkgid
+  -- datadir: $prefix/share
+  -- datasubdir: $abi/$pkgid
+  -- docdir: $datadir/doc/$abi/$pkgid
+  -- htmldir: $docdir/html
+  -- haddockdir: $htmldir
+  -- sysconfdir: $prefix/etc
+
+program-locations
+  -- alex-location:
+  -- ar-location:
+  -- c2hs-location:
+  -- cpphs-location:
+  -- doctest-location:
+  -- gcc-location:
+  -- ghc-location:
+  -- ghc-pkg-location:
+  -- ghcjs-location:
+  -- ghcjs-pkg-location:
+  -- greencard-location:
+  -- haddock-location:
+  -- happy-location:
+  -- haskell-suite-location:
+  -- haskell-suite-pkg-location:
+  -- hmake-location:
+  -- hpc-location:
+  -- hsc2hs-location:
+  -- hscolour-location:
+  -- jhc-location:
+  -- ld-location:
+  -- pkg-config-location:
+  -- runghc-location:
+  -- strip-location:
+  -- tar-location:
+  -- uhc-location:
+
+program-default-options
+  -- alex-options:
+  -- ar-options:
+  -- c2hs-options:
+  -- cpphs-options:
+  -- doctest-options:
+  -- gcc-options:
+  -- ghc-options:
+  -- ghc-pkg-options:
+  -- ghcjs-options:
+  -- ghcjs-pkg-options:
+  -- greencard-options:
+  -- haddock-options:
+  -- happy-options:
+  -- haskell-suite-options:
+  -- haskell-suite-pkg-options:
+  -- hmake-options:
+  -- hpc-options:
+  -- hsc2hs-options:
+  -- hscolour-options:
+  -- jhc-options:
+  -- ld-options:
+  -- pkg-config-options:
+  -- runghc-options:
+  -- strip-options:
+  -- tar-options:
+  -- uhc-options:

From 1799728c2a4a00a9150d747eb000ada4a493c19f Mon Sep 17 00:00:00 2001
From: Colton Clemmer <coltonclemmerdev@gmail.com>
Date: Thu, 18 May 2023 15:02:13 -0500
Subject: [PATCH 040/144] Instead of giving empty string on error, give the
 whole file

---
 cabal-install/tests/IntegrationTests2.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cabal-install/tests/IntegrationTests2.hs b/cabal-install/tests/IntegrationTests2.hs
index f94373b60d1..d242a62f7d0 100644
--- a/cabal-install/tests/IntegrationTests2.hs
+++ b/cabal-install/tests/IntegrationTests2.hs
@@ -2192,7 +2192,7 @@ testConfigOptionComments = do
     findLineWith :: Bool -> String -> String -> String
     findLineWith isComment target text
       | not . null $ findLinesWith isComment target text = removeCommentValue . L.head $ findLinesWith isComment target text
-      | otherwise  = ""
+      | otherwise  = text
     findLinesWith :: Bool -> String -> String -> [String]
     findLinesWith isComment target
       | isComment = filter (isInfixOf (" " ++ target ++ ":")) . lines

From f59feb73512fdca5b4ead56eab38c33e92921f2d Mon Sep 17 00:00:00 2001
From: Colton Clemmer <coltonclemmerdev@gmail.com>
Date: Thu, 18 May 2023 16:24:55 -0500
Subject: [PATCH 041/144] Remove options associated with #8839

---
 cabal-install/tests/IntegrationTests2.hs | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/cabal-install/tests/IntegrationTests2.hs b/cabal-install/tests/IntegrationTests2.hs
index d242a62f7d0..d94b9117093 100644
--- a/cabal-install/tests/IntegrationTests2.hs
+++ b/cabal-install/tests/IntegrationTests2.hs
@@ -2109,14 +2109,10 @@ testConfigOptionComments = do
   "  -- output-dir" @=? findLineWith True "output-dir" defaultConfigFile
 
   "  -- interactive" @=? findLineWith True "interactive" defaultConfigFile
-  "  -- quiet" @=? findLineWith True "quiet" defaultConfigFile
-  "  -- no-comments" @=? findLineWith True "no-comments" defaultConfigFile
-  "  -- minimal" @=? findLineWith True "minimal" defaultConfigFile
   "  -- cabal-version" @=? findLineWith True "cabal-version" defaultConfigFile
   "  -- license" @=? findLineWith True "license" defaultConfigFile
   "  -- extra-doc-file" @=? findLineWith True "extra-doc-file" defaultConfigFile
   "  -- test-dir" @=? findLineWith True "test-dir" defaultConfigFile
-  "  -- simple" @=? findLineWith True "simple" defaultConfigFile
   "  -- language" @=? findLineWith True "language" defaultConfigFile
   "  -- application-dir" @=? findLineWith True "application-dir" defaultConfigFile
   "  -- source-dir" @=? findLineWith True "source-dir" defaultConfigFile

From b26a1bf5986abc17b5d09dcd271d2469726f216e Mon Sep 17 00:00:00 2001
From: Colton Clemmer <coltonclemmerdev@gmail.com>
Date: Thu, 18 May 2023 16:27:02 -0500
Subject: [PATCH 042/144] Remove option associated with #8788

---
 cabal-install/tests/IntegrationTests2.hs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/cabal-install/tests/IntegrationTests2.hs b/cabal-install/tests/IntegrationTests2.hs
index d94b9117093..f2fdf2ea3df 100644
--- a/cabal-install/tests/IntegrationTests2.hs
+++ b/cabal-install/tests/IntegrationTests2.hs
@@ -2106,7 +2106,6 @@ testConfigOptionComments = do
   "  -- contents-location" @=? findLineWith True "contents-location" defaultConfigFile
   "  -- index-location" @=? findLineWith True "index-location" defaultConfigFile
   "  -- base-url" @=? findLineWith True "base-url" defaultConfigFile
-  "  -- output-dir" @=? findLineWith True "output-dir" defaultConfigFile
 
   "  -- interactive" @=? findLineWith True "interactive" defaultConfigFile
   "  -- cabal-version" @=? findLineWith True "cabal-version" defaultConfigFile

From ef8b2ec18df4b888519b06361a8d411a5f351f9d Mon Sep 17 00:00:00 2001
From: Troels Henriksen <athas@sigkill.dk>
Date: Wed, 24 May 2023 21:51:54 +0200
Subject: [PATCH 043/144] Ignore ~/.cabal if $XDG_CONFIG_HOME/cabal/config
 exists. (#8877)

* Ignore ~/.cabal if $XDG_CONFIG_HOME/cabal/config exists.

* Also document this.

* Slightly fewer warnings.

* Use verbosity flag.

* Better text.

* Oops

(cherry picked from commit 784d13b95bd6f9f9d1bf5b1c09ce18a8498d6944)
---
 .../src/Distribution/Client/Config.hs         | 39 ++++++++++++++-----
 changelog.d/issue-8577                        | 13 +++++++
 doc/config.rst                                |  7 ++--
 3 files changed, 46 insertions(+), 13 deletions(-)
 create mode 100644 changelog.d/issue-8577

diff --git a/cabal-install/src/Distribution/Client/Config.hs b/cabal-install/src/Distribution/Client/Config.hs
index b7416345510..d06a3ccf8ad 100644
--- a/cabal-install/src/Distribution/Client/Config.hs
+++ b/cabal-install/src/Distribution/Client/Config.hs
@@ -133,7 +133,7 @@ import Text.PrettyPrint
 import Text.PrettyPrint.HughesPJ
          ( text, Doc )
 import System.Directory
-         ( createDirectoryIfMissing, getHomeDirectory, getXdgDirectory, XdgDirectory(XdgCache, XdgConfig, XdgState), renameFile, getAppUserDataDirectory, doesDirectoryExist )
+         ( createDirectoryIfMissing, getHomeDirectory, getXdgDirectory, XdgDirectory(XdgCache, XdgConfig, XdgState), renameFile, getAppUserDataDirectory, doesDirectoryExist, doesFileExist )
 import Network.URI
          ( URI(..), URIAuth(..), parseURI )
 import System.FilePath
@@ -590,12 +590,28 @@ initialSavedConfig = do
     }
   }
 
--- | If @CABAL\_DIR@ is set or @~/.cabal@ exists, return that
--- directory.  Otherwise returns Nothing.  If this function returns
--- Nothing, then it implies that we are not using a single directory
--- for everything, but instead use XDG paths.  Fundamentally, this
--- function is used to implement transparent backwards compatibility
--- with pre-XDG versions of cabal-install.
+-- | Issue a warning if both @$XDG_CONFIG_HOME/cabal/config@ and
+-- @~/.cabal@ exists.
+warnOnTwoConfigs :: Verbosity -> IO ()
+warnOnTwoConfigs verbosity = do
+  defaultDir <- getAppUserDataDirectory "cabal"
+  dotCabalExists <- doesDirectoryExist defaultDir
+  xdgCfg <- getXdgDirectory XdgConfig ("cabal" </> "config")
+  xdgCfgExists <- doesFileExist xdgCfg
+  when (dotCabalExists && xdgCfgExists) $
+    warn verbosity $
+    "Both " <> defaultDir <>
+    " and " <> xdgCfg <>
+    " exist - ignoring the former.\n" <>
+    "It is advisable to remove one of them. In that case, we will use the remaining one by default (unless '$CABAL_DIR' is explicitly set)."
+
+-- | If @CABAL\_DIR@ is set, return @Just@ its value. Otherwise, if
+-- @~/.cabal@ exists and @$XDG_CONFIG_HOME/cabal/config@ does not
+-- exist, return @Just "~/.cabal"@.  Otherwise, return @Nothing@.  If
+-- this function returns Nothing, then it implies that we are not
+-- using a single directory for everything, but instead use XDG paths.
+-- Fundamentally, this function is used to implement transparent
+-- backwards compatibility with pre-XDG versions of cabal-install.
 maybeGetCabalDir :: IO (Maybe FilePath)
 maybeGetCabalDir = do
   mDir <- lookupEnv "CABAL_DIR"
@@ -604,9 +620,11 @@ maybeGetCabalDir = do
     Nothing -> do
       defaultDir <- getAppUserDataDirectory "cabal"
       dotCabalExists <- doesDirectoryExist defaultDir
-      return $ if dotCabalExists
-               then Just defaultDir
-               else Nothing
+      xdgCfg <- getXdgDirectory XdgConfig ("cabal" </> "config")
+      xdgCfgExists <- doesFileExist xdgCfg
+      if dotCabalExists && not xdgCfgExists
+        then return $ Just defaultDir
+        else return Nothing
 
 -- | The default behaviour of cabal-install is to use the XDG
 -- directory standard.  However, if @CABAL_DIR@ is set, we instead use
@@ -759,6 +777,7 @@ defaultHackageRemoteRepoKeyThreshold = 3
 --
 loadConfig :: Verbosity -> Flag FilePath -> IO SavedConfig
 loadConfig verbosity configFileFlag = do
+  warnOnTwoConfigs verbosity
   config <- loadRawConfig verbosity configFileFlag
   extendToEffectiveConfig config
 
diff --git a/changelog.d/issue-8577 b/changelog.d/issue-8577
new file mode 100644
index 00000000000..b7890c261ba
--- /dev/null
+++ b/changelog.d/issue-8577
@@ -0,0 +1,13 @@
+synopsis: Existence of $XDG_CONFIG_HOME/cabal/config now overrides existence of $HOME/.cabal
+packages: cabal-install
+issues: #8577
+
+description: {
+
+To avoid pre-XDG backwards compatibility from triggering due to other
+tools accidentally creating a $HOME/.cabal directory, the presence of
+$XDG_CONFIG_HOME/cabal/config now disables pre-XDG backwards
+compatibility.  Presumably $XDG_CONFIG_HOME/cabal/config will never be
+created by accident.
+
+}
diff --git a/doc/config.rst b/doc/config.rst
index 34d0fcf35d5..d7717ca95a8 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -61,9 +61,10 @@ Various environment variables affect ``cabal-install``.
    .. note::
 
        For backwards compatibility, if the directory ``~/.cabal`` on
-       Unix or ``%APPDATA%\cabal`` on Windows exist and ``CABAL_DIR``
-       is unset, ``cabal-install`` will behave as if ``CABAL_DIR`` was
-       set to point at this directory.
+       Unix or ``%APPDATA%\cabal`` on Windows exists, and
+       ``$XDG_CONFIG_HOME/cabal/config`` does not exist, and
+       ``CABAL_DIR`` is unset, ``cabal-install`` will behave as if
+       ``CABAL_DIR`` was set to point at this directory.
 
 ``CABAL_BUILDDIR``
 

From cb3fe498d786936a677de254a0f15f2fedcfc447 Mon Sep 17 00:00:00 2001
From: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Date: Wed, 24 May 2023 11:06:32 -0400
Subject: [PATCH 044/144] Put back docs for code-generators (fix #8887)

(cherry picked from commit 0d68e9838e2ebf931f6e1f1d30a7cdce35e9b6d0)
---
 doc/cabal-package.rst | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/doc/cabal-package.rst b/doc/cabal-package.rst
index 2eadd56bd50..8b1c4fa515f 100644
--- a/doc/cabal-package.rst
+++ b/doc/cabal-package.rst
@@ -1256,6 +1256,25 @@ the :pkg-field:`test-module` field.
 
     The module exporting the ``tests`` symbol.
 
+.. pkg-field:: code-generators
+
+    An optional list of preprocessors which can generate new modules
+    for use in the test-suite.
+
+ A list of executabes (possibly brought into scope by
+ :pkg-field:`build-tool-depends`) that are run after all other
+ preprocessors. These executables are invoked as so: ``exe-name
+ TARGETDIR [SOURCEDIRS] -- [GHCOPTIONS]``. The arguments are, in order a target dir for
+ output, a sequence of all source directories with source files of
+ local lib components that the given test stanza dependens on, and
+ following a double dash, all options cabal would pass to ghc for a
+ build. They are expected to output a newline-seperated list of
+ generated modules which have been written to the targetdir
+ (excepting, if written, the main module). This can
+ be used for driving doctests and other discover-style tests generated
+ from source code.
+
+
 Example: Package using ``exitcode-stdio-1.0`` interface
 """""""""""""""""""""""""""""""""""""""""""""""""""""""
 

From 21a68a3b719d31928f1a5a3ba0fc1b2fde9dbcea Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen@redhat.com>
Date: Mon, 22 May 2023 17:47:51 +0800
Subject: [PATCH 045/144] allow building with ghc-9.6

---
 Cabal-tests/Cabal-tests.cabal                   | 4 ++--
 Cabal-tree-diff/Cabal-tree-diff.cabal           | 2 +-
 cabal-install-solver/cabal-install-solver.cabal | 4 ++--
 cabal-install/cabal-install.cabal               | 2 +-
 cabal-testsuite/cabal-testsuite.cabal           | 4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Cabal-tests/Cabal-tests.cabal b/Cabal-tests/Cabal-tests.cabal
index ce49eab8eb4..bb42abc7fc7 100644
--- a/Cabal-tests/Cabal-tests.cabal
+++ b/Cabal-tests/Cabal-tests.cabal
@@ -95,7 +95,7 @@ test-suite parser-tests
     , tasty-golden      >=2.3.1.1 && <2.4
     , tasty-hunit
     , tasty-quickcheck
-    , tree-diff         >=0.1     && <0.3
+    , tree-diff         >=0.1     && <0.4
 
   ghc-options:      -Wall
   default-language: Haskell2010
@@ -161,7 +161,7 @@ test-suite hackage-tests
     , optparse-applicative  >=0.13.2.0 && <0.17
     , stm                   >=2.4.5.0  && <2.6
     , tar                   >=0.5.0.3  && <0.6
-    , tree-diff             >=0.1      && <0.3
+    , tree-diff             >=0.1      && <0.4
 
   ghc-options:        -Wall -rtsopts -threaded
   default-extensions: CPP
diff --git a/Cabal-tree-diff/Cabal-tree-diff.cabal b/Cabal-tree-diff/Cabal-tree-diff.cabal
index 3d3e8087b3c..d9e823426c7 100644
--- a/Cabal-tree-diff/Cabal-tree-diff.cabal
+++ b/Cabal-tree-diff/Cabal-tree-diff.cabal
@@ -13,7 +13,7 @@ library
     , base
     , Cabal-syntax  ^>=3.10.0.0
     , Cabal         ^>=3.10.0.0
-    , tree-diff     ^>=0.1 || ^>=0.2
+    , tree-diff     ^>=0.1 || ^>=0.2 || ^>=0.3
 
   exposed-modules:  Data.TreeDiff.Instances.Cabal
   other-modules:
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index 16a0650cbf2..30d14db08ef 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -105,7 +105,7 @@ library
 
   build-depends:
     , array         >=0.4      && <0.6
-    , base          >=4.10     && <4.18
+    , base          >=4.10     && <4.19
     , bytestring    >=0.10.6.0 && <0.12
     , Cabal         ^>=3.10
     , Cabal-syntax  ^>=3.10
@@ -138,7 +138,7 @@ Test-Suite unit-tests
      UnitTests.Distribution.Solver.Modular.MessageUtils
 
    build-depends:
-     , base        >= 4.10  && <4.18
+     , base        >= 4.10  && <4.19
      , Cabal
      , Cabal-syntax
      , cabal-install-solver
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index fed9aad89cd..79ef0b0e7b6 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -46,7 +46,7 @@ common warnings
       ghc-options: -Wunused-packages
 
 common base-dep
-    build-depends: base >=4.10 && <4.18
+    build-depends: base >=4.10 && <4.19
 
 common cabal-dep
     build-depends: Cabal ^>=3.10
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index e3ba1da7cbb..d1d43b32898 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -26,7 +26,7 @@ common shared
   default-language: Haskell2010
 
   build-depends:
-    , base >= 4.9 && <4.18
+    , base >= 4.9 && <4.19
     -- this needs to match the in-tree lib:Cabal version
     , Cabal ^>= 3.10.0.0
     , Cabal-syntax ^>= 3.10.0.0
@@ -80,7 +80,7 @@ library
 
   if !os(windows)
     build-depends:
-      , unix                ^>= 2.6.0.0 || ^>= 2.7.0.0
+      , unix                ^>= 2.6.0.0 || ^>= 2.7.0.0 || ^>= 2.8.0.0
   else
     build-depends:
       , Win32

From 6baf1e4e7b2c40529355c8f000dbf23595e8caae Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Mon, 29 May 2023 21:40:22 -0400
Subject: [PATCH 046/144] Shorten script-builds paths (backport #8898) (#8970)

Co-authored-by: Mel Zuser <mel@mzero.dev>
Co-authored-by: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
---
 .../Distribution/PackageDescription/Check.hs  |   6 +-
 cabal-install/cabal-install.cabal             |   1 +
 .../src/Distribution/Client/CmdListBin.hs     |   8 +-
 .../src/Distribution/Client/CmdRun.hs         |  64 +++++-----
 .../src/Distribution/Client/HashValue.hs      |   5 +
 .../src/Distribution/Client/ProjectConfig.hs  |  10 ++
 .../src/Distribution/Client/ScriptUtils.hs    | 119 +++++++++++++-----
 .../PackageTests/ListBin/Script/cabal.out     |   4 +-
 .../NewBuild/CmdBuild/Script/cabal.out        |   6 +-
 .../NewBuild/CmdBuild/Script/cabal.test.hs    |   3 -
 .../CmdBuild/ScriptBuildRepl/cabal.out        |   8 +-
 .../CmdBuild/ScriptBuildRun/cabal.out         |   8 +-
 .../NewBuild/CmdBuild/ScriptRerun/cabal.out   |   6 +-
 .../CmdBuild/ScriptRerun/cabal.test.hs        |   3 -
 .../NewBuild/CmdClean/Keep/cabal.out          |  12 +-
 .../NewBuild/CmdClean/Keep/cabal.test.hs      |   3 -
 .../NewBuild/CmdClean/Orphan/cabal.out        |  12 +-
 .../NewBuild/CmdClean/Orphan/cabal.test.hs    |   3 -
 .../NewBuild/CmdClean/Script/cabal.out        |   6 +-
 .../NewBuild/CmdClean/Script/cabal.test.hs    |   3 -
 .../NewBuild/CmdRepl/Script/cabal.out         |   4 +-
 .../NewBuild/CmdRepl/ScriptRerun/cabal.out    |   6 +-
 .../NewBuild/CmdRun/Script/cabal.out          |   6 +-
 .../NewBuild/CmdRun/Script/cabal.test.hs      |   3 -
 .../NewBuild/CmdRun/ScriptLiterate/cabal.out  |   6 +-
 .../CmdRun/ScriptNoExtension/cabal.out        |   6 +-
 .../NewBuild/CmdRun/ScriptRerun/cabal.out     |   6 +-
 .../NewBuild/CmdRun/ScriptRerun/cabal.test.hs |   3 -
 .../CmdRun/ScriptWithProjectBlock/cabal.out   |   6 +-
 cabal-testsuite/cabal-testsuite.cabal         |   2 +-
 cabal-testsuite/src/Test/Cabal/Prelude.hs     |   5 +-
 changelog.d/issue-8841                        |  15 +++
 32 files changed, 223 insertions(+), 135 deletions(-)
 create mode 100644 changelog.d/issue-8841

diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs
index 5d11072b354..93f465e5074 100644
--- a/Cabal/src/Distribution/PackageDescription/Check.hs
+++ b/Cabal/src/Distribution/PackageDescription/Check.hs
@@ -1385,7 +1385,7 @@ checkGhcOptions fieldName getOptions pkg =
   , checkFlags ["-prof"] $
       PackageBuildWarning (OptProf fieldName)
 
-  , checkFlags ["-o"] $
+  , unlessScript . checkFlags ["-o"] $
       PackageBuildWarning (OptO fieldName)
 
   , checkFlags ["-hide-package"] $
@@ -1478,6 +1478,10 @@ checkGhcOptions fieldName getOptions pkg =
     checkFlags :: [String] -> PackageCheck -> Maybe PackageCheck
     checkFlags flags = check (any (`elem` flags) all_ghc_options)
 
+    unlessScript :: Maybe PackageCheck -> Maybe PackageCheck
+    unlessScript pc | packageId pkg == fakePackageId = Nothing
+                    | otherwise                      = pc
+
     checkTestAndBenchmarkFlags :: [String] -> PackageCheck -> Maybe PackageCheck
     checkTestAndBenchmarkFlags flags = check (any (`elem` flags) test_and_benchmark_ghc_options)
 
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 79ef0b0e7b6..1a00c905232 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -204,6 +204,7 @@ library
         async      >= 2.0      && < 2.3,
         array      >= 0.4      && < 0.6,
         base16-bytestring >= 0.1.1 && < 1.1.0.0,
+        base64-bytestring >= 1.0 && < 1.3,
         binary     >= 0.7.3    && < 0.9,
         bytestring >= 0.10.6.0 && < 0.12,
         containers >= 0.5.6.2  && < 0.7,
diff --git a/cabal-install/src/Distribution/Client/CmdListBin.hs b/cabal-install/src/Distribution/Client/CmdListBin.hs
index 27674300849..8993e18e2de 100644
--- a/cabal-install/src/Distribution/Client/CmdListBin.hs
+++ b/cabal-install/src/Distribution/Client/CmdListBin.hs
@@ -28,7 +28,9 @@ import Distribution.Client.NixStyleOptions
 import Distribution.Client.ProjectOrchestration
 import Distribution.Client.ProjectPlanning.Types
 import Distribution.Client.ScriptUtils
-       (AcceptNoTargets(..), TargetContext(..), updateContextAndWriteProjectFile, withContextAndSelectors)
+       ( AcceptNoTargets(..), TargetContext(..)
+       , updateContextAndWriteProjectFile, withContextAndSelectors
+       , movedExePath )
 import Distribution.Client.Setup                 (GlobalFlags (..))
 import Distribution.Client.TargetProblem         (TargetProblem (..))
 import Distribution.Simple.BuildPaths            (dllExtension, exeExtension)
@@ -170,7 +172,7 @@ listbinAction flags@NixStyleFlags{..} args globalFlags = do
 
         bin_file c = case c of
             CD.ComponentExe s
-               | s == selectedComponent -> [bin_file' s]
+               | s == selectedComponent -> [moved_bin_file s]
             CD.ComponentTest s
                | s == selectedComponent -> [bin_file' s]
             CD.ComponentBench s
@@ -194,6 +196,8 @@ listbinAction flags@NixStyleFlags{..} args globalFlags = do
             then dist_dir </> "build" </> prettyShow s </> ("lib" ++ prettyShow s) <.> dllExtension plat
             else InstallDirs.bindir (elabInstallDirs elab) </> ("lib" ++ prettyShow s) <.> dllExtension plat
 
+        moved_bin_file s = fromMaybe (bin_file' s) (movedExePath selectedComponent distDirLayout elaboratedSharedConfig elab)
+
 -------------------------------------------------------------------------------
 -- Target Problem: the very similar to CmdRun
 -------------------------------------------------------------------------------
diff --git a/cabal-install/src/Distribution/Client/CmdRun.hs b/cabal-install/src/Distribution/Client/CmdRun.hs
index 64241fd8bbc..85a50eec389 100644
--- a/cabal-install/src/Distribution/Client/CmdRun.hs
+++ b/cabal-install/src/Distribution/Client/CmdRun.hs
@@ -22,48 +22,50 @@ module Distribution.Client.CmdRun (
 import Prelude ()
 import Distribution.Client.Compat.Prelude hiding (toList)
 
-import Distribution.Client.ProjectOrchestration
 import Distribution.Client.CmdErrorMessages
          ( renderTargetSelector, showTargetSelector,
            renderTargetProblem,
            renderTargetProblemNoTargets, plural, targetSelectorPluralPkgs,
            targetSelectorFilter, renderListCommaAnd,
            renderListPretty )
-import Distribution.Client.TargetProblem
-         ( TargetProblem (..) )
-
-import Distribution.Client.NixStyleOptions
-         ( NixStyleFlags (..), nixStyleOptions, defaultNixStyleFlags )
-import Distribution.Client.Setup
-         ( GlobalFlags(..), ConfigFlags(..) )
 import Distribution.Client.GlobalFlags
          ( defaultGlobalFlags )
-import Distribution.Simple.Flag
-         ( fromFlagOrDefault )
-import Distribution.Simple.Command
-         ( CommandUI(..), usageAlternatives )
-import Distribution.Types.ComponentName
-         ( componentNameRaw )
-import Distribution.Verbosity
-         ( normal, silent )
-import Distribution.Simple.Utils
-         ( wrapText, die', info, notice, safeHead )
+import Distribution.Client.InstallPlan
+         ( toList, foldPlanPackage )
+import Distribution.Client.NixStyleOptions
+         ( NixStyleFlags (..), nixStyleOptions, defaultNixStyleFlags )
+import Distribution.Client.ProjectOrchestration
 import Distribution.Client.ProjectPlanning
          ( ElaboratedConfiguredPackage(..)
          , ElaboratedInstallPlan, binDirectoryFor )
 import Distribution.Client.ProjectPlanning.Types
          ( dataDirsEnvironmentForPlan )
-import Distribution.Client.InstallPlan
-         ( toList, foldPlanPackage )
-import Distribution.Types.UnqualComponentName
-         ( UnqualComponentName, unUnqualComponentName )
+import Distribution.Client.ScriptUtils
+         ( AcceptNoTargets(..), TargetContext(..)
+         , updateContextAndWriteProjectFile, withContextAndSelectors
+         , movedExePath )
+import Distribution.Client.Setup
+         ( GlobalFlags(..), ConfigFlags(..) )
+import Distribution.Client.TargetProblem
+         ( TargetProblem (..) )
+import Distribution.Simple.Command
+         ( CommandUI(..), usageAlternatives )
+import Distribution.Simple.Flag
+         ( fromFlagOrDefault )
 import Distribution.Simple.Program.Run
          ( runProgramInvocation, ProgramInvocation(..),
            emptyProgramInvocation )
+import Distribution.Simple.Utils
+         ( wrapText, die', info, notice, safeHead )
+import Distribution.Types.ComponentName
+         ( componentNameRaw )
 import Distribution.Types.UnitId
          ( UnitId )
-import Distribution.Client.ScriptUtils
-         ( AcceptNoTargets(..), withContextAndSelectors, updateContextAndWriteProjectFile, TargetContext(..) )
+
+import Distribution.Types.UnqualComponentName
+         ( UnqualComponentName, unUnqualComponentName )
+import Distribution.Verbosity
+         ( normal, silent )
 
 import Data.List (group)
 import qualified Data.Set as Set
@@ -216,11 +218,15 @@ runAction flags@NixStyleFlags {..} targetAndArgs globalFlags
         ++ exeName
         ++ ":\n"
         ++ unlines (fmap (\p -> " - in package " ++ prettyShow (elabUnitId p)) elabPkgs)
-    let exePath = binDirectoryFor (distDirLayout baseCtx)
-                                  (elaboratedShared buildCtx)
-                                  pkg
-                                  exeName
-               </> exeName
+
+    let defaultExePath = binDirectoryFor
+                            (distDirLayout baseCtx)
+                            (elaboratedShared buildCtx)
+                             pkg
+                             exeName
+                       </> exeName
+        exePath = fromMaybe defaultExePath (movedExePath selectedComponent (distDirLayout baseCtx) (elaboratedShared buildCtx) pkg)
+
     let dryRun = buildSettingDryRun (buildSettings baseCtx)
               || buildSettingOnlyDownload (buildSettings baseCtx)
 
diff --git a/cabal-install/src/Distribution/Client/HashValue.hs b/cabal-install/src/Distribution/Client/HashValue.hs
index 67117b231cc..86281a309ff 100644
--- a/cabal-install/src/Distribution/Client/HashValue.hs
+++ b/cabal-install/src/Distribution/Client/HashValue.hs
@@ -6,6 +6,7 @@ module Distribution.Client.HashValue (
     hashValue,
     truncateHash,
     showHashValue,
+    showHashValueBase64,
     readFileHashValue,
     hashFromTUF,
     ) where
@@ -17,6 +18,7 @@ import qualified Hackage.Security.Client as Sec
 
 import qualified Crypto.Hash.SHA256         as SHA256
 import qualified Data.ByteString.Base16     as Base16
+import qualified Data.ByteString.Base64     as Base64
 import qualified Data.ByteString.Char8      as BS
 import qualified Data.ByteString.Lazy.Char8 as LBS
 
@@ -55,6 +57,9 @@ hashValue = HashValue . SHA256.hashlazy
 showHashValue :: HashValue -> String
 showHashValue (HashValue digest) = BS.unpack (Base16.encode digest)
 
+showHashValueBase64 :: HashValue -> String
+showHashValueBase64 (HashValue digest) = BS.unpack (Base64.encode digest)
+
 -- | Hash the content of a file. Uses SHA256.
 --
 readFileHashValue :: FilePath -> IO HashValue
diff --git a/cabal-install/src/Distribution/Client/ProjectConfig.hs b/cabal-install/src/Distribution/Client/ProjectConfig.hs
index 83184d5902c..91c12552c99 100644
--- a/cabal-install/src/Distribution/Client/ProjectConfig.hs
+++ b/cabal-install/src/Distribution/Client/ProjectConfig.hs
@@ -31,6 +31,7 @@ module Distribution.Client.ProjectConfig (
     readProjectLocalFreezeConfig,
     reportParseResult,
     showProjectConfig,
+    withGlobalConfig,
     withProjectOrGlobalConfig,
     writeProjectLocalExtraConfig,
     writeProjectLocalFreezeConfig,
@@ -462,6 +463,15 @@ renderBadProjectRoot :: BadProjectRoot -> String
 renderBadProjectRoot (BadProjectRootExplicitFile projectFile) =
     "The given project file '" ++ projectFile ++ "' does not exist."
 
+withGlobalConfig
+    :: Verbosity                  -- ^ verbosity
+    -> Flag FilePath              -- ^ @--cabal-config@
+    -> (ProjectConfig -> IO a)    -- ^ with global
+    -> IO a
+withGlobalConfig verbosity gcf with = do
+    globalConfig <- runRebuild "" $ readGlobalConfig verbosity gcf
+    with globalConfig
+
 withProjectOrGlobalConfig
     :: Verbosity                  -- ^ verbosity
     -> Flag Bool                  -- ^ whether to ignore local project (--ignore-project flag)
diff --git a/cabal-install/src/Distribution/Client/ScriptUtils.hs b/cabal-install/src/Distribution/Client/ScriptUtils.hs
index db377c8f10a..ce64c8a5ef6 100644
--- a/cabal-install/src/Distribution/Client/ScriptUtils.hs
+++ b/cabal-install/src/Distribution/Client/ScriptUtils.hs
@@ -9,7 +9,8 @@ module Distribution.Client.ScriptUtils (
     getScriptHash, getScriptCacheDirectory, ensureScriptCacheDirectory,
     withContextAndSelectors, AcceptNoTargets(..), TargetContext(..),
     updateContextAndWriteProjectFile, updateContextAndWriteProjectFile',
-    fakeProjectSourcePackage, lSrcpkgDescription
+    fakeProjectSourcePackage, lSrcpkgDescription,
+    movedExePath
   ) where
 
 import Prelude ()
@@ -24,22 +25,24 @@ import Distribution.Client.ProjectOrchestration
 import Distribution.Client.Config
     ( defaultScriptBuildsDir )
 import Distribution.Client.DistDirLayout
-    ( DistDirLayout(..) )
+    ( DistDirLayout(..), DistDirParams(..) )
 import Distribution.Client.HashValue
-    ( hashValue, showHashValue )
+    ( hashValue, showHashValueBase64 )
 import Distribution.Client.HttpUtils
          ( HttpTransport, configureTransport )
 import Distribution.Client.NixStyleOptions
     ( NixStyleFlags (..) )
 import Distribution.Client.ProjectConfig
-    ( ProjectConfig(..), ProjectConfigShared(..)
-    , reportParseResult, withProjectOrGlobalConfig
+    ( ProjectConfig(..), ProjectConfigShared(..), PackageConfig(..)
+    , reportParseResult, withGlobalConfig, withProjectOrGlobalConfig
     , projectConfigHttpTransport )
 import Distribution.Client.ProjectConfig.Legacy
     ( ProjectConfigSkeleton
     , parseProjectSkeleton, instantiateProjectConfigSkeletonFetchingCompiler )
 import Distribution.Client.ProjectFlags
     ( flagIgnoreProject )
+import Distribution.Client.ProjectPlanning
+    ( ElaboratedSharedConfig(..), ElaboratedConfiguredPackage(..) )
 import Distribution.Client.RebuildMonad
     ( runRebuild )
 import Distribution.Client.Setup
@@ -48,6 +51,8 @@ import Distribution.Client.TargetSelector
     ( TargetSelectorProblem(..), TargetString(..) )
 import Distribution.Client.Types
     ( PackageLocation(..), PackageSpecifier(..), UnresolvedSourcePackage )
+import Distribution.Compiler
+    ( CompilerId(..), perCompilerFlavorToList )
 import Distribution.FieldGrammar
     ( parseFieldGrammar, takeFields )
 import Distribution.Fields
@@ -67,7 +72,7 @@ import Distribution.Simple.PackageDescription
 import Distribution.Simple.Setup
     ( Flag(..) )
 import Distribution.Simple.Compiler
-    ( compilerInfo )
+    ( Compiler(..), OptimisationLevel(..), compilerInfo )
 import Distribution.Simple.Utils
     ( createDirectoryIfMissingVerbose, createTempDirectory, die', handleDoesNotExist, readUTF8File, warn, writeUTF8File )
 import qualified Distribution.SPDX.License as SPDX
@@ -77,6 +82,8 @@ import Distribution.System
     ( Platform(..) )
 import Distribution.Types.BuildInfo
     ( BuildInfo(..) )
+import Distribution.Types.ComponentId
+    ( mkComponentId )
 import Distribution.Types.CondTree
     ( CondTree(..) )
 import Distribution.Types.Executable
@@ -87,6 +94,10 @@ import Distribution.Types.PackageDescription
     ( PackageDescription(..), emptyPackageDescription )
 import Distribution.Types.PackageName.Magic
     ( fakePackageCabalFileName, fakePackageId )
+import Distribution.Types.UnitId
+    ( newSimpleUnitId )
+import Distribution.Types.UnqualComponentName
+    ( UnqualComponentName )
 import Distribution.Utils.NubList
     ( fromNubList )
 import Distribution.Client.ProjectPlanning
@@ -106,7 +117,7 @@ import qualified Data.Set as S
 import System.Directory
     ( canonicalizePath, doesFileExist, getTemporaryDirectory, removeDirectoryRecursive )
 import System.FilePath
-    ( (</>), takeFileName )
+    ( (</>), makeRelative, takeDirectory, takeFileName )
 import qualified Text.Parsec as P
 
 -- A note on multi-module script support #6787:
@@ -125,7 +136,12 @@ import qualified Text.Parsec as P
 -- Two hashes will be the same as long as the absolute paths
 -- are the same.
 getScriptHash :: FilePath -> IO String
-getScriptHash script = showHashValue . hashValue . fromString <$> canonicalizePath script
+getScriptHash script
+  -- Base64 is shorter than Base16, which helps avoid long path issues on windows
+  -- but it can contain /'s which aren't valid in file paths so replace them with
+  -- %'s. 26 chars / 130 bits is enough to practically avoid collisions.
+  = map (\c -> if c == '/' then '%' else c) . take 26
+  . showHashValueBase64 . hashValue . fromString <$> canonicalizePath script
 
 -- | Get the directory for caching a script build.
 --
@@ -177,7 +193,7 @@ withContextAndSelectors
   -> IO b
 withContextAndSelectors noTargets kind flags@NixStyleFlags {..} targetStrings globalFlags cmd act
   = withTemporaryTempDirectory $ \mkTmpDir -> do
-    (tc, ctx) <- withProjectOrGlobalConfig verbosity ignoreProject globalConfigFlag with (without mkTmpDir)
+    (tc, ctx) <- withProjectOrGlobalConfig verbosity ignoreProject globalConfigFlag withProject (withoutProject mkTmpDir)
 
     (tc', ctx', sels) <- case targetStrings of
       -- Only script targets may contain spaces and or end with ':'.
@@ -209,19 +225,25 @@ withContextAndSelectors noTargets kind flags@NixStyleFlags {..} targetStrings gl
     globalConfigFlag = projectConfigConfigFile (projectConfigShared cliConfig)
     defaultTarget = [TargetPackage TargetExplicitNamed [fakePackageId] Nothing]
 
-    with = do
+    withProject = do
       ctx <- establishProjectBaseContext verbosity cliConfig cmd
       return (ProjectContext, ctx)
-    without mkDir globalConfig = do
-      distDirLayout <- establishDummyDistDirLayout verbosity (globalConfig <> cliConfig) =<< mkDir
+    withoutProject mkTmpDir globalConfig = do
+      distDirLayout <- establishDummyDistDirLayout verbosity (globalConfig <> cliConfig) =<< mkTmpDir
       ctx <- establishDummyProjectBaseContext verbosity (globalConfig <> cliConfig) distDirLayout [] cmd
       return (GlobalContext, ctx)
+
+    scriptBaseCtx script globalConfig = do
+      let noDistDir = mempty { projectConfigShared = mempty { projectConfigDistDir = Flag "" } }
+      let cfg = noDistDir <> globalConfig <> cliConfig
+      rootDir <- ensureScriptCacheDirectory verbosity script
+      distDirLayout <- establishDummyDistDirLayout verbosity cfg rootDir
+      establishDummyProjectBaseContext verbosity cfg distDirLayout [] cmd
+
     scriptOrError script err = do
       exists <- doesFileExist script
       if exists then do
-        -- In the script case we always want a dummy context even when ignoreProject is False
-        let mkCacheDir = ensureScriptCacheDirectory verbosity script
-        (_, ctx) <- withProjectOrGlobalConfig verbosity (Flag True) globalConfigFlag with (without mkCacheDir)
+        ctx <- withGlobalConfig verbosity globalConfigFlag (scriptBaseCtx script)
 
         let projectRoot = distProjectRootDirectory $ distDirLayout ctx
         writeFile (projectRoot </> "scriptlocation") =<< canonicalizePath script
@@ -236,14 +258,22 @@ withContextAndSelectors noTargets kind flags@NixStyleFlags {..} targetStrings gl
 
         projectCfgSkeleton <- readProjectBlockFromScript verbosity httpTransport (distDirLayout ctx) (takeFileName script) scriptContents
 
-        let fetchCompiler = do
-               (compiler, Platform arch os, _) <- runRebuild (distProjectRootDirectory . distDirLayout $ ctx) $ configureCompiler verbosity (distDirLayout ctx) ((fst $ ignoreConditions projectCfgSkeleton) <> projectConfig ctx)
-               pure (os, arch, compilerInfo compiler)
+        createDirectoryIfMissingVerbose verbosity True (distProjectCacheDirectory $ distDirLayout ctx)
+        (compiler, platform@(Platform arch os), _) <- runRebuild projectRoot $ configureCompiler verbosity (distDirLayout ctx) (fst (ignoreConditions projectCfgSkeleton) <> projectConfig ctx)
+
+        projectCfg <- instantiateProjectConfigSkeletonFetchingCompiler (pure (os, arch, compilerInfo compiler)) mempty projectCfgSkeleton
+
+        let ctx' = ctx & lProjectConfig %~ (<> projectCfg)
 
-        projectCfg <- instantiateProjectConfigSkeletonFetchingCompiler fetchCompiler mempty projectCfgSkeleton
+            build_dir = distBuildDirectory (distDirLayout ctx') $ (scriptDistDirParams script) ctx' compiler platform
+            exePath = build_dir </> "bin" </> scriptExeFileName script
+            exePathRel = makeRelative projectRoot exePath
+
+            executable' = executable & L.buildInfo . L.defaultLanguage %~ maybe (Just Haskell2010) Just
+                                     & L.buildInfo . L.options %~ fmap (setExePath exePathRel)
+
+        createDirectoryIfMissingVerbose verbosity True (takeDirectory exePath)
 
-        let executable' = executable & L.buildInfo . L.defaultLanguage %~ maybe (Just Haskell2010) Just
-            ctx'        = ctx & lProjectConfig %~ (<> projectCfg)
         return (ScriptContext script executable', ctx', defaultTarget)
       else reportTargetSelectorProblems verbosity err
 
@@ -260,6 +290,36 @@ withTemporaryTempDirectory act = newEmptyMVar >>= \m -> bracket (getMkTmp m) (rm
       return tmpDir
     rmTmp m _ = tryTakeMVar m >>= maybe (return ()) (handleDoesNotExist () . removeDirectoryRecursive)
 
+scriptComponenetName :: IsString s => FilePath -> s
+scriptComponenetName scriptPath = fromString cname
+  where
+    cname = "script-" ++ map censor (takeFileName scriptPath)
+    censor c | c `S.member` ccNamecore = c
+             | otherwise               = '_'
+
+scriptExeFileName :: FilePath -> FilePath
+scriptExeFileName scriptPath = "cabal-script-" ++ takeFileName scriptPath
+
+scriptDistDirParams :: FilePath -> ProjectBaseContext -> Compiler -> Platform -> DistDirParams
+scriptDistDirParams scriptPath ctx compiler platform = DistDirParams
+  { distParamUnitId         = newSimpleUnitId cid
+  , distParamPackageId      = fakePackageId
+  , distParamComponentId    = cid
+  , distParamComponentName  = Just $ CExeName cn
+  , distParamCompilerId     = compilerId compiler
+  , distParamPlatform       = platform
+  , distParamOptimization   = fromFlagOrDefault NormalOptimisation optimization
+  }
+  where
+      cn = scriptComponenetName scriptPath
+      cid = mkComponentId $ prettyShow fakePackageId <> "-inplace-" <> prettyShow cn
+      optimization = (packageConfigOptimization . projectConfigLocalPackages . projectConfig) ctx
+
+setExePath :: FilePath -> [String] -> [String]
+setExePath exePath options
+  | "-o" `notElem` options = "-o" : exePath : options
+  | otherwise              = options
+
 -- | Add the 'SourcePackage' to the context and use it to write a .cabal file.
 updateContextAndWriteProjectFile' :: ProjectBaseContext -> SourcePackage (PackageLocation (Maybe FilePath)) -> IO ProjectBaseContext
 updateContextAndWriteProjectFile' ctx srcPkg = do
@@ -284,15 +344,9 @@ updateContextAndWriteProjectFile ctx scriptPath scriptExecutable = do
 
   absScript <- canonicalizePath scriptPath
   let
-    -- Replace characters which aren't allowed in the executable component name with '_'
-    -- Prefix with "cabal-script-" to make it clear to end users that the name may be mangled
-    scriptExeName = "cabal-script-" ++ map censor (takeFileName scriptPath)
-    censor c | c `S.member` ccNamecore = c
-             | otherwise               = '_'
-
     sourcePackage = fakeProjectSourcePackage projectRoot
       & lSrcpkgDescription . L.condExecutables
-      .~ [(fromString scriptExeName, CondNode executable (targetBuildDepends $ buildInfo executable) [])]
+      .~ [(scriptComponenetName scriptPath, CondNode executable (targetBuildDepends $ buildInfo executable) [])]
     executable = scriptExecutable
       & L.modulePath .~ absScript
 
@@ -395,6 +449,15 @@ fakeProjectSourcePackage projectRoot = sourcePackage
       , licenseRaw = Left SPDX.NONE
       }
 
+-- | Find the path of an exe that has been relocated with a "-o" option
+movedExePath :: UnqualComponentName -> DistDirLayout -> ElaboratedSharedConfig -> ElaboratedConfiguredPackage -> Maybe FilePath
+movedExePath selectedComponent distDirLayout elabShared elabConfigured = do
+  exe <- find ((== selectedComponent) . exeName) . executables $ elabPkgDescription elabConfigured
+  let CompilerId flavor _ = (compilerId . pkgConfigCompiler) elabShared
+  opts <- lookup flavor (perCompilerFlavorToList . options $ buildInfo exe)
+  let projectRoot = distProjectRootDirectory distDirLayout
+  fmap (projectRoot </>) . lookup "-o" $ reverse (zip opts (drop 1 opts))
+
 -- Lenses
 -- | A lens for the 'srcpkgDescription' field of 'SourcePackage'
 lSrcpkgDescription :: Lens' (SourcePackage loc) GenericPackageDescription
diff --git a/cabal-testsuite/PackageTests/ListBin/Script/cabal.out b/cabal-testsuite/PackageTests/ListBin/Script/cabal.out
index dcb26e397f1..63d1cab2c01 100644
--- a/cabal-testsuite/PackageTests/ListBin/Script/cabal.out
+++ b/cabal-testsuite/PackageTests/ListBin/Script/cabal.out
@@ -2,5 +2,5 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
-<ROOT>/cabal.dist/work/./dist/build/<ARCH>/ghc-<GHCVER>/fake-package-0/x/cabal-script-script.hs/build/cabal-script-script.hs/cabal-script-script.hs
+ - fake-package-0 (exe:script-script.hs) (first run)
+<ROOT>/cabal.dist/work/./dist/build/<ARCH>/ghc-<GHCVER>/fake-package-0/x/script-script.hs/bin/cabal-script-script.hs
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.out
index 0c647f80d90..282562011fa 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.out
@@ -2,6 +2,6 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
-Configuring executable 'cabal-script-script.hs' for fake-package-0..
-Building executable 'cabal-script-script.hs' for fake-package-0..
+ - fake-package-0 (exe:script-script.hs) (first run)
+Configuring executable 'script-script.hs' for fake-package-0..
+Building executable 'script-script.hs' for fake-package-0..
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.test.hs
index 7e4c31a6af7..db31636dc42 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/Script/cabal.test.hs
@@ -1,9 +1,6 @@
 import Test.Cabal.Prelude
 
 main = cabalTest . void $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     cabal' "v2-build" ["script.hs"]
 
     env      <- getTestEnv
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRepl/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRepl/cabal.out
index 71653f09844..e492d1b1f88 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRepl/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRepl/cabal.out
@@ -2,10 +2,10 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
-Configuring executable 'cabal-script-script.hs' for fake-package-0..
-Building executable 'cabal-script-script.hs' for fake-package-0..
+ - fake-package-0 (exe:script-script.hs) (first run)
+Configuring executable 'script-script.hs' for fake-package-0..
+Building executable 'script-script.hs' for fake-package-0..
 # cabal v2-repl
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (ephemeral targets)
+ - fake-package-0 (exe:script-script.hs) (ephemeral targets)
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRun/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRun/cabal.out
index 208af7b3a0b..097822b36ab 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRun/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRun/cabal.out
@@ -2,7 +2,7 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
-Configuring executable 'cabal-script-script.hs' for fake-package-0..
-Building executable 'cabal-script-script.hs' for fake-package-0..
-# cabal v2-run
\ No newline at end of file
+ - fake-package-0 (exe:script-script.hs) (first run)
+Configuring executable 'script-script.hs' for fake-package-0..
+Building executable 'script-script.hs' for fake-package-0..
+# cabal v2-run
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.out
index ff6bbcc5c6e..680900c3692 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.out
@@ -2,8 +2,8 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
-Configuring executable 'cabal-script-script.hs' for fake-package-0..
-Building executable 'cabal-script-script.hs' for fake-package-0..
+ - fake-package-0 (exe:script-script.hs) (first run)
+Configuring executable 'script-script.hs' for fake-package-0..
+Building executable 'script-script.hs' for fake-package-0..
 # cabal v2-build
 Up to date
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.test.hs
index 863d7706ab2..18c1becba42 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptRerun/cabal.test.hs
@@ -1,8 +1,5 @@
 import Test.Cabal.Prelude
 
 main = cabalTest . void $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     cabal' "v2-build" ["script.hs"]
     cabal' "v2-build" ["script.hs"]
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Keep/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Keep/cabal.out
index 634c825fcf9..9e0eab19a2b 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Keep/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Keep/cabal.out
@@ -2,14 +2,14 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
-Configuring executable 'cabal-script-script.hs' for fake-package-0..
-Building executable 'cabal-script-script.hs' for fake-package-0..
+ - fake-package-0 (exe:script-script.hs) (first run)
+Configuring executable 'script-script.hs' for fake-package-0..
+Building executable 'script-script.hs' for fake-package-0..
 # cabal v2-build
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script2.hs) (first run)
-Configuring executable 'cabal-script-script2.hs' for fake-package-0..
-Building executable 'cabal-script-script2.hs' for fake-package-0..
+ - fake-package-0 (exe:script-script2.hs) (first run)
+Configuring executable 'script-script2.hs' for fake-package-0..
+Building executable 'script-script2.hs' for fake-package-0..
 # cabal v2-clean
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Keep/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Keep/cabal.test.hs
index f54bf5a4bcf..8063d229034 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Keep/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Keep/cabal.test.hs
@@ -2,9 +2,6 @@ import Test.Cabal.Prelude
 import System.Directory (copyFile, removeFile)
 
 main = cabalTest . void $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     env <- getTestEnv
     let td = testCurrentDir env
 
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.out
index 634c825fcf9..9e0eab19a2b 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.out
@@ -2,14 +2,14 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
-Configuring executable 'cabal-script-script.hs' for fake-package-0..
-Building executable 'cabal-script-script.hs' for fake-package-0..
+ - fake-package-0 (exe:script-script.hs) (first run)
+Configuring executable 'script-script.hs' for fake-package-0..
+Building executable 'script-script.hs' for fake-package-0..
 # cabal v2-build
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script2.hs) (first run)
-Configuring executable 'cabal-script-script2.hs' for fake-package-0..
-Building executable 'cabal-script-script2.hs' for fake-package-0..
+ - fake-package-0 (exe:script-script2.hs) (first run)
+Configuring executable 'script-script2.hs' for fake-package-0..
+Building executable 'script-script2.hs' for fake-package-0..
 # cabal v2-clean
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.test.hs
index 0eac6291ff2..39ba5185e94 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.test.hs
@@ -2,9 +2,6 @@ import Test.Cabal.Prelude
 import System.Directory (copyFile, removeFile)
 
 main = cabalTest . void $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     env <- getTestEnv
     let td = testCurrentDir env
 
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.out
index 9075c0f276a..becc8985243 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.out
@@ -2,7 +2,7 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
-Configuring executable 'cabal-script-script.hs' for fake-package-0..
-Building executable 'cabal-script-script.hs' for fake-package-0..
+ - fake-package-0 (exe:script-script.hs) (first run)
+Configuring executable 'script-script.hs' for fake-package-0..
+Building executable 'script-script.hs' for fake-package-0..
 # cabal v2-clean
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.test.hs
index aa0fc3e9d2f..d3870ce1520 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdClean/Script/cabal.test.hs
@@ -1,9 +1,6 @@
 import Test.Cabal.Prelude
 
 main = cabalTest . void $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     cabal' "v2-build" ["script.hs"]
     cabal' "v2-clean" ["script.hs"]
 
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRepl/Script/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdRepl/Script/cabal.out
index cba93d1cfd8..369c11213fd 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdRepl/Script/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdRepl/Script/cabal.out
@@ -2,5 +2,5 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
-Configuring executable 'cabal-script-script.hs' for fake-package-0..
+ - fake-package-0 (exe:script-script.hs) (first run)
+Configuring executable 'script-script.hs' for fake-package-0..
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRepl/ScriptRerun/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdRepl/ScriptRerun/cabal.out
index 135f9694e0e..eb2e5aed262 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdRepl/ScriptRerun/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdRepl/ScriptRerun/cabal.out
@@ -2,9 +2,9 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
-Configuring executable 'cabal-script-script.hs' for fake-package-0..
+ - fake-package-0 (exe:script-script.hs) (first run)
+Configuring executable 'script-script.hs' for fake-package-0..
 # cabal v2-repl
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
+ - fake-package-0 (exe:script-script.hs) (first run)
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.out
index 0cc95e6299f..5379babf9c4 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.out
@@ -2,6 +2,6 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
-Configuring executable 'cabal-script-script.hs' for fake-package-0..
-Building executable 'cabal-script-script.hs' for fake-package-0..
+ - fake-package-0 (exe:script-script.hs) (first run)
+Configuring executable 'script-script.hs' for fake-package-0..
+Building executable 'script-script.hs' for fake-package-0..
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs
index e145dc9d863..045c88117d7 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/Script/cabal.test.hs
@@ -1,9 +1,6 @@
 import Test.Cabal.Prelude
 
 main = cabalTest $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     res <- cabal' "v2-run" ["script.hs"]
     assertOutputContains "Hello World" res
 
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.out
index 7520d95a5a0..d0c7fb13eb4 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.out
@@ -2,6 +2,6 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.lhs) (first run)
-Configuring executable 'cabal-script-script.lhs' for fake-package-0..
-Building executable 'cabal-script-script.lhs' for fake-package-0..
+ - fake-package-0 (exe:script-script.lhs) (first run)
+Configuring executable 'script-script.lhs' for fake-package-0..
+Building executable 'script-script.lhs' for fake-package-0..
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.out
index e0e127886ed..0a3810d6240 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.out
@@ -2,6 +2,6 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-with_sp) (first run)
-Configuring executable 'cabal-script-with_sp' for fake-package-0..
-Building executable 'cabal-script-with_sp' for fake-package-0..
+ - fake-package-0 (exe:script-with_sp) (first run)
+Configuring executable 'script-with_sp' for fake-package-0..
+Building executable 'script-with_sp' for fake-package-0..
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.out
index 5384fa3bbe5..412392689bd 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.out
@@ -2,7 +2,7 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O1
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-script.hs) (first run)
-Configuring executable 'cabal-script-script.hs' for fake-package-0..
-Building executable 'cabal-script-script.hs' for fake-package-0..
+ - fake-package-0 (exe:script-script.hs) (first run)
+Configuring executable 'script-script.hs' for fake-package-0..
+Building executable 'script-script.hs' for fake-package-0..
 # cabal v2-run
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.test.hs
index 3092a6ea57b..7df7f1451bc 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptRerun/cabal.test.hs
@@ -1,8 +1,5 @@
 import Test.Cabal.Prelude
 
 main = cabalTest . void $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     cabal' "v2-run" ["script.hs"]
     cabal' "v2-run" ["script.hs"]
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.out b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.out
index ec27da9398e..24962dc65ab 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.out
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.out
@@ -2,6 +2,6 @@
 Resolving dependencies...
 Build profile: -w ghc-<GHCVER> -O2
 In order, the following will be built:
- - fake-package-0 (exe:cabal-script-s.hs) (first run)
-Configuring executable 'cabal-script-s.hs' for fake-package-0..
-Building executable 'cabal-script-s.hs' for fake-package-0..
+ - fake-package-0 (exe:script-s.hs) (first run)
+Configuring executable 'script-s.hs' for fake-package-0..
+Building executable 'script-s.hs' for fake-package-0..
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index d1d43b32898..095a51b54cc 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -60,7 +60,7 @@ library
     , aeson                 ^>= 1.4.2.0 || ^>=1.5.0.0 || ^>= 2.0.0.0 || ^>= 2.1.0.0
     , async                 ^>= 2.2.1
     , attoparsec            ^>= 0.13.2.2 || ^>=0.14.1
-    , base16-bytestring     ^>= 0.1.1.6 || ^>= 1.0.0.0
+    , base64-bytestring     ^>= 1.0.0.0 || ^>= 1.1.0.0 || ^>= 1.2.0.0
     , bytestring            ^>= 0.10.0.2 || ^>= 0.11.0.0
     , containers            ^>= 0.5.0.0 || ^>= 0.6.0.1
     , cryptohash-sha256     ^>= 0.11.101.0
diff --git a/cabal-testsuite/src/Test/Cabal/Prelude.hs b/cabal-testsuite/src/Test/Cabal/Prelude.hs
index 4ad7b68d116..fd6992d258d 100644
--- a/cabal-testsuite/src/Test/Cabal/Prelude.hs
+++ b/cabal-testsuite/src/Test/Cabal/Prelude.hs
@@ -52,7 +52,7 @@ import Control.Monad (unless, when, void, forM_, liftM2, liftM4)
 import Control.Monad.Trans.Reader (withReaderT, runReaderT)
 import Control.Monad.IO.Class (MonadIO (..))
 import qualified Crypto.Hash.SHA256 as SHA256
-import qualified Data.ByteString.Base16 as Base16
+import qualified Data.ByteString.Base64 as Base64
 import qualified Data.ByteString.Char8 as C
 import Data.List (isInfixOf, stripPrefix, isPrefixOf, intercalate)
 import Data.List.NonEmpty (NonEmpty (..))
@@ -841,7 +841,8 @@ getScriptCacheDirectory :: FilePath -> TestM FilePath
 getScriptCacheDirectory script = do
     cabalDir <- testCabalDir `fmap` getTestEnv
     hashinput <- liftIO $ canonicalizePath script
-    let hash = C.unpack . Base16.encode . SHA256.hash . C.pack $ hashinput
+    let hash = map (\c -> if c == '/' then '%' else c) . take 26
+             . C.unpack . Base64.encode . SHA256.hash . C.pack $ hashinput
     return $ cabalDir </> "script-builds" </> hash
 
 ------------------------------------------------------------------------
diff --git a/changelog.d/issue-8841 b/changelog.d/issue-8841
new file mode 100644
index 00000000000..b0bc13c1bc2
--- /dev/null
+++ b/changelog.d/issue-8841
@@ -0,0 +1,15 @@
+synopsis: Shorten script-builds paths
+packages: Cabal cabal-install
+prs: #8898
+issues: #8841
+
+description: {
+
+- Use Base64 hash truncated to 26 chars for script-build cache directories.
+- Use the cache directory as the dist directory.
+- Use script-<your-sanitized-script-name> as the component name instead of cabal-script-<...>.
+- Use cabal-script-<your-actual-script-name> for the executable name.
+- This change is incompatible with previous cabal versions in terms of cache location,
+  you should manually remove your old caches once you no longer need them.
+
+}

From ad8279ffbba92423f5b1b55f4fc46902c331c177 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= <hecate+github@glitchbra.in>
Date: Mon, 12 Jun 2023 15:34:41 +0200
Subject: [PATCH 047/144] Do not check PVP on internal targets (#9004)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Internal targets: test-suites or benchmarks.
See #8361 for rationale.

Note that this patch is quite ugly (duplicating allBuildInfo, using
list comprehensions, etc.) but we don’t care as everything will be
overwritten by a much more sensible reimplementation in #8427.
---
 .../Distribution/PackageDescription/Check.hs  | 13 +++++++++++-
 .../PackageVersionsNoCheck/cabal.out          |  2 ++
 .../PackageVersionsNoCheck/cabal.test.hs      |  5 +++++
 .../PackageVersionsNoCheck/pkg.cabal          | 20 +++++++++++++++++++
 changelog.d/pr-9004                           | 11 ++++++++++
 5 files changed, 50 insertions(+), 1 deletion(-)
 create mode 100644 cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsNoCheck/cabal.out
 create mode 100644 cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsNoCheck/cabal.test.hs
 create mode 100644 cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsNoCheck/pkg.cabal
 create mode 100644 changelog.d/pr-9004

diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs
index 93f465e5074..48959622e5f 100644
--- a/Cabal/src/Distribution/PackageDescription/Check.hs
+++ b/Cabal/src/Distribution/PackageDescription/Check.hs
@@ -70,6 +70,7 @@ import System.FilePath
 
 import qualified Data.ByteString.Lazy      as BS
 import qualified Data.Map                  as Map
+import qualified Control.Monad as CM
 import qualified Distribution.Compat.DList as DList
 import qualified Distribution.SPDX         as SPDX
 import qualified System.Directory          as System
@@ -1899,7 +1900,7 @@ checkPackageVersions pkg =
     baseErrors
   where
     baseErrors = PackageDistInexcusable BaseNoUpperBounds <$ bases
-    deps = toDependencyVersionsMap allBuildDepends pkg
+    deps = toDependencyVersionsMap allNonInternalBuildDepends pkg
     -- base gets special treatment (it's more critical)
     (bases, others) = partition (("base" ==) . unPackageName) $
       [ name
@@ -1907,6 +1908,16 @@ checkPackageVersions pkg =
       , not (hasUpperBound vr)
       ]
 
+    -- Get the combined build-depends entries of all components.
+    allNonInternalBuildDepends :: PackageDescription -> [Dependency]
+    allNonInternalBuildDepends = targetBuildDepends CM.<=< allNonInternalBuildInfo
+
+    allNonInternalBuildInfo :: PackageDescription -> [BuildInfo]
+    allNonInternalBuildInfo pkg_descr =
+      [bi | lib <- allLibraries pkg_descr, let bi = libBuildInfo lib]
+        ++ [bi | flib <- foreignLibs pkg_descr, let bi = foreignLibBuildInfo flib]
+        ++ [bi | exe <- executables pkg_descr, let bi = buildInfo exe]
+
 checkConditionals :: GenericPackageDescription -> [PackageCheck]
 checkConditionals pkg =
   catMaybes [
diff --git a/cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsNoCheck/cabal.out b/cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsNoCheck/cabal.out
new file mode 100644
index 00000000000..37aa169b416
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsNoCheck/cabal.out
@@ -0,0 +1,2 @@
+# cabal check
+No errors or warnings could be found in the package.
diff --git a/cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsNoCheck/cabal.test.hs b/cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsNoCheck/cabal.test.hs
new file mode 100644
index 00000000000..70228e5a4a7
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsNoCheck/cabal.test.hs
@@ -0,0 +1,5 @@
+import Test.Cabal.Prelude
+
+-- Internal targets (tests, benchmarks) should not be checked.
+main = cabalTest $
+  cabal "check" []
diff --git a/cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsNoCheck/pkg.cabal b/cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsNoCheck/pkg.cabal
new file mode 100644
index 00000000000..b7f6f6ac75b
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Check/NonConfCheck/PackageVersionsNoCheck/pkg.cabal
@@ -0,0 +1,20 @@
+cabal-version: 3.0
+name: pkg
+synopsis: synopsis
+description: description
+version: 0
+category: example
+maintainer: none@example.com
+license: GPL-3.0-or-later
+
+library
+  exposed-modules: Foo
+  default-language: Haskell2010
+  build-depends: base == 2.2.*
+
+test-suite test
+  type: exitcode-stdio-1.0
+  main-is: Test.hs
+  default-language: Haskell2010
+  build-depends: base == 2.2.*,
+                 criterion
diff --git a/changelog.d/pr-9004 b/changelog.d/pr-9004
new file mode 100644
index 00000000000..6ff90746475
--- /dev/null
+++ b/changelog.d/pr-9004
@@ -0,0 +1,11 @@
+synopsis: Do not check PVP on internal targets
+packages: cabal-install
+prs: #9004
+issues: #8361
+
+description: {
+
+- `cabal check` will not check for dependencies upper bounds in internal
+  targets (i.e. test-suites and benchmarks)
+
+}

From 584fc876756d427e04647bc6cf6a34aed99af7f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= <hecate+github@glitchbra.in>
Date: Mon, 12 Jun 2023 18:07:36 +0200
Subject: [PATCH 048/144] Fix import and style

---
 Cabal/src/Distribution/PackageDescription/Check.hs         | 2 +-
 cabal-install/cabal-install.cabal                          | 2 +-
 .../UnitTests/Distribution/Client/ArbitraryInstances.hs    | 7 +------
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs
index 48959622e5f..4c14a6999b3 100644
--- a/Cabal/src/Distribution/PackageDescription/Check.hs
+++ b/Cabal/src/Distribution/PackageDescription/Check.hs
@@ -70,7 +70,7 @@ import System.FilePath
 
 import qualified Data.ByteString.Lazy      as BS
 import qualified Data.Map                  as Map
-import qualified Control.Monad as CM
+import qualified Control.Monad             as CM
 import qualified Distribution.Compat.DList as DList
 import qualified Distribution.SPDX         as SPDX
 import qualified System.Directory          as System
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 1a00c905232..ef3449ba40f 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -336,7 +336,7 @@ test-suite unit-tests
           tasty-quickcheck,
           tasty-hunit >= 0.10,
           tree-diff,
-          QuickCheck >= 2.14 && <2.15
+          QuickCheck >= 2.14.3 && <2.15
 
 
 -- Tests to run with a limited stack and heap size
diff --git a/cabal-install/tests/UnitTests/Distribution/Client/ArbitraryInstances.hs b/cabal-install/tests/UnitTests/Distribution/Client/ArbitraryInstances.hs
index 3a26ca2e560..84c9cfa44e1 100644
--- a/cabal-install/tests/UnitTests/Distribution/Client/ArbitraryInstances.hs
+++ b/cabal-install/tests/UnitTests/Distribution/Client/ArbitraryInstances.hs
@@ -44,7 +44,7 @@ import Distribution.Solver.Types.PackageConstraint       (PackageProperty (..))
 import Data.Coerce                      (Coercible, coerce)
 import Network.URI                      (URI (..), URIAuth (..), isUnreserved)
 import Test.QuickCheck
-import Test.QuickCheck.GenericArbitrary
+import Test.QuickCheck.GenericArbitrary (genericArbitrary)
 import Test.QuickCheck.Instances.Cabal ()
 
 -- note: there are plenty of instances defined in ProjectConfig test file.
@@ -107,11 +107,6 @@ arbitraryURIPort =
 -- cabal-install (and Cabal) types
 -------------------------------------------------------------------------------
 
-shrinkBoundedEnum :: (Eq a, Enum a, Bounded a) => a -> [a]
-shrinkBoundedEnum x
-    | x == minBound = []
-    | otherwise     = [pred x]
-
 adjustSize :: (Int -> Int) -> Gen a -> Gen a
 adjustSize adjust gen = sized (\n -> resize (adjust n) gen)
 

From f9339e74350eebb9f115b456d27ab22d69bb23c8 Mon Sep 17 00:00:00 2001
From: Josh Meredith <joshmeredith2008@gmail.com>
Date: Fri, 2 Jun 2023 11:25:23 +1000
Subject: [PATCH 049/144] =?UTF-8?q?Revert=20workaround=20to=20filter=20Jav?=
 =?UTF-8?q?aScriptFFI=20out=20on=20GHC=20versions=20where=20G=E2=80=A6=20(?=
 =?UTF-8?q?#8979)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Revert workaround to filter JavaScriptFFI out on GHC versions where GHC issue 11214 is fixed.

* Lint

* Lint

* Update version range to reflect the fix being included in GHC 9.8

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 8c9a71e67bc431f001f1d959439868ac526d435b)

# Conflicts:
#	Cabal/src/Distribution/Simple/GHC.hs
---
 Cabal/src/Distribution/Simple/GHC.hs | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Cabal/src/Distribution/Simple/GHC.hs b/Cabal/src/Distribution/Simple/GHC.hs
index d8e48adb425..a861af7dcc9 100644
--- a/Cabal/src/Distribution/Simple/GHC.hs
+++ b/Cabal/src/Distribution/Simple/GHC.hs
@@ -185,10 +185,20 @@ configure verbosity hcPath hcPkgPath conf0 = do
 
   ghcInfo <- Internal.getGhcInfo verbosity implInfo ghcProg
   let ghcInfoMap = Map.fromList ghcInfo
+<<<<<<< HEAD
       extensions = -- workaround https://gitlab.haskell.org/ghc/ghc/-/issues/11214
                    filterExt JavaScriptFFI $
                    -- see 'filterExtTH' comment below
                    filterExtTH $ extensions0
+=======
+      filterJS = if ghcVersion < mkVersion [9, 8] then filterExt JavaScriptFFI else id
+      extensions =
+        -- workaround https://gitlab.haskell.org/ghc/ghc/-/issues/11214
+        filterJS $
+          -- see 'filterExtTH' comment below
+          filterExtTH $
+            extensions0
+>>>>>>> 8c9a71e67 (Revert workaround to filter JavaScriptFFI out on GHC versions where G… (#8979))
 
       -- starting with GHC 8.0, `TemplateHaskell` will be omitted from
       -- `--supported-extensions` when it's not available.

From bbed869eb809d620b77ddcc495f9cf0a94e7392c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Sat, 17 Jun 2023 15:12:41 +0200
Subject: [PATCH 050/144] fix conflict

---
 Cabal/src/Distribution/Simple/GHC.hs | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/Cabal/src/Distribution/Simple/GHC.hs b/Cabal/src/Distribution/Simple/GHC.hs
index a861af7dcc9..2ef352f300b 100644
--- a/Cabal/src/Distribution/Simple/GHC.hs
+++ b/Cabal/src/Distribution/Simple/GHC.hs
@@ -185,12 +185,6 @@ configure verbosity hcPath hcPkgPath conf0 = do
 
   ghcInfo <- Internal.getGhcInfo verbosity implInfo ghcProg
   let ghcInfoMap = Map.fromList ghcInfo
-<<<<<<< HEAD
-      extensions = -- workaround https://gitlab.haskell.org/ghc/ghc/-/issues/11214
-                   filterExt JavaScriptFFI $
-                   -- see 'filterExtTH' comment below
-                   filterExtTH $ extensions0
-=======
       filterJS = if ghcVersion < mkVersion [9, 8] then filterExt JavaScriptFFI else id
       extensions =
         -- workaround https://gitlab.haskell.org/ghc/ghc/-/issues/11214
@@ -198,7 +192,6 @@ configure verbosity hcPath hcPkgPath conf0 = do
           -- see 'filterExtTH' comment below
           filterExtTH $
             extensions0
->>>>>>> 8c9a71e67 (Revert workaround to filter JavaScriptFFI out on GHC versions where G… (#8979))
 
       -- starting with GHC 8.0, `TemplateHaskell` will be omitted from
       -- `--supported-extensions` when it's not available.

From 0466138ab32635e54d2284de29d382ccc5c0d650 Mon Sep 17 00:00:00 2001
From: Simon Hengel <sol@typeful.net>
Date: Tue, 21 Feb 2023 18:15:17 +0700
Subject: [PATCH 051/144] Add `Distribution.Client.Main`

This makes it easier to integrate `cabal-install` into other tools.

(cherry picked from commit b54cf399f4841bdfdde4241da3d2cee5fbf9de43)
---
 cabal-install/cabal-install.cabal                   |  9 ++++-----
 cabal-install/driver/Main.hs                        | 11 +++++++++++
 .../{main => src/Distribution/Client}/Main.hs       | 13 ++++++++-----
 3 files changed, 23 insertions(+), 10 deletions(-)
 create mode 100644 cabal-install/driver/Main.hs
 rename cabal-install/{main => src/Distribution/Client}/Main.hs (99%)

diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index ef3449ba40f..9d1bfb23362 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -140,6 +140,7 @@ library
         Distribution.Client.InstallSymlink
         Distribution.Client.JobControl
         Distribution.Client.List
+        Distribution.Client.Main
         Distribution.Client.Manpage
         Distribution.Client.ManpageFlags
         Distribution.Client.Nix
@@ -253,9 +254,9 @@ library
 
 
 executable cabal
-    import: warnings, base-dep, cabal-dep, cabal-syntax-dep
+    import: warnings, base-dep
     main-is: Main.hs
-    hs-source-dirs: main
+    hs-source-dirs: driver
     default-language: Haskell2010
 
     ghc-options: -rtsopts -threaded
@@ -265,9 +266,7 @@ executable cabal
         extra-libraries: bsd
 
     build-depends:
-        cabal-install,
-        directory,
-        filepath
+        cabal-install
 
 -- Small, fast running tests.
 --
diff --git a/cabal-install/driver/Main.hs b/cabal-install/driver/Main.hs
new file mode 100644
index 00000000000..56898bd8be2
--- /dev/null
+++ b/cabal-install/driver/Main.hs
@@ -0,0 +1,11 @@
+module Main (main) where
+
+import Prelude ()
+import Distribution.Client.Compat.Prelude
+
+import System.Environment (getArgs)
+
+import qualified Distribution.Client.Main as Client
+
+main :: IO ()
+main = getArgs >>= Client.main
diff --git a/cabal-install/main/Main.hs b/cabal-install/src/Distribution/Client/Main.hs
similarity index 99%
rename from cabal-install/main/Main.hs
rename to cabal-install/src/Distribution/Client/Main.hs
index 324fd88d8ad..889fa634390 100644
--- a/cabal-install/main/Main.hs
+++ b/cabal-install/src/Distribution/Client/Main.hs
@@ -13,9 +13,11 @@
 -- Portability :  portable
 --
 -- Entry point to the default cabal-install front-end.
+--
+-- @since 3.10.0.0
 -----------------------------------------------------------------------------
 
-module Main (main) where
+module Distribution.Client.Main (main) where
 
 import Distribution.Client.Setup
          ( GlobalFlags(..), globalCommand, withRepoContext
@@ -160,7 +162,7 @@ import Distribution.Version
          ( Version, mkVersion, orLaterVersion )
 
 import Distribution.Compat.ResponseFile
-import System.Environment       (getArgs, getProgName)
+import System.Environment       (getProgName)
 import System.FilePath          ( dropExtension, splitExtension
                                 , takeExtension, (</>), (<.>) )
 import System.IO                ( BufferMode(LineBuffering), hSetBuffering
@@ -173,8 +175,8 @@ import Control.Exception        (AssertionFailed, assert, try)
 
 -- | Entry point
 --
-main :: IO ()
-main = do
+main :: [String] -> IO ()
+main args = do
   installTerminationHandler
   -- Enable line buffering so that we can get fast feedback even when piped.
   -- This is especially important for CI and build systems.
@@ -185,7 +187,8 @@ main = do
   -- when writing to stderr and stdout.
   relaxEncodingErrors stdout
   relaxEncodingErrors stderr
-  (args0, args1) <- break (== "--") <$> getArgs
+  let (args0, args1) = break (== "--") args
+
   mainWorker =<< (++ args1) <$> expandResponse args0
 
 -- | Check whether assertions are enabled and print a warning in that case.

From 199852e3fc10e9987abfa87f7260ddfc46c7eb96 Mon Sep 17 00:00:00 2001
From: Simon Hengel <sol@typeful.net>
Date: Fri, 24 Feb 2023 15:07:09 +0700
Subject: [PATCH 052/144] Renamed cabal-install/driver/Main.hs to
 cabal-install/main/Main.hs

(cherry picked from commit c61e20667dce7cb3a4191f8f045fac54eabc5dc3)
---
 cabal-install/cabal-install.cabal      | 2 +-
 cabal-install/{driver => main}/Main.hs | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename cabal-install/{driver => main}/Main.hs (100%)

diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 9d1bfb23362..c9f7f98223d 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -256,7 +256,7 @@ library
 executable cabal
     import: warnings, base-dep
     main-is: Main.hs
-    hs-source-dirs: driver
+    hs-source-dirs: main
     default-language: Haskell2010
 
     ghc-options: -rtsopts -threaded
diff --git a/cabal-install/driver/Main.hs b/cabal-install/main/Main.hs
similarity index 100%
rename from cabal-install/driver/Main.hs
rename to cabal-install/main/Main.hs

From 9f9c84a4709999a70f605465908e22d8fbec7616 Mon Sep 17 00:00:00 2001
From: BasLaa <baslaarakker@gmail.com>
Date: Sun, 12 Feb 2023 11:34:48 +0100
Subject: [PATCH 053/144] Return empty default when git fails

Add maybe in guess functions

Adjust type in NonInteractive

Change unit tests

Fix whitespace

Abstract guessing and remove comments

Simplify guess functions

Return default for cabal init author and name when git fails

(cherry picked from commit 5073063ddd1056b07f0c4acc0a33b090ea5122ca)
---
 .../Client/Init/Interactive/Command.hs        | 11 +++++------
 .../Client/Init/NonInteractive/Command.hs     | 10 ++++++----
 .../Client/Init/NonInteractive/Heuristics.hs  | 19 ++++++++++++-------
 .../Distribution/Client/Init/FileCreators.hs  |  4 +++-
 .../Client/Init/NonInteractive.hs             |  9 +++++++--
 5 files changed, 33 insertions(+), 20 deletions(-)

diff --git a/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs b/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs
index ca63d80ad37..046f7dd8084 100644
--- a/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs
+++ b/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs
@@ -356,14 +356,10 @@ licensePrompt flags = getLicense flags $ do
       else fmap prettyShow knownLicenses
 
 authorPrompt :: Interactive m => InitFlags -> m String
-authorPrompt flags = getAuthor flags $ do
-    name <- guessAuthorName
-    promptStr "Author name" (DefaultPrompt name)
+authorPrompt flags = getAuthor flags $ guessAuthorName >>= promptOrDefault "Author name"
 
 emailPrompt :: Interactive m => InitFlags -> m String
-emailPrompt flags = getEmail flags $ do
-    email' <- guessAuthorEmail
-    promptStr "Maintainer email" (DefaultPrompt email')
+emailPrompt flags = getEmail flags $ guessAuthorEmail >>= promptOrDefault "Maintainer email"
 
 homepagePrompt :: Interactive m => InitFlags -> m String
 homepagePrompt flags = getHomepage flags $
@@ -468,3 +464,6 @@ srcDirsPrompt flags = getSrcDirs flags $ do
       True
 
     return [dir]
+
+promptOrDefault :: Interactive m => String -> Maybe String -> m String
+promptOrDefault s = maybe (promptStr s MandatoryPrompt)  (promptStr s . DefaultPrompt)
diff --git a/cabal-install/src/Distribution/Client/Init/NonInteractive/Command.hs b/cabal-install/src/Distribution/Client/Init/NonInteractive/Command.hs
index 6f382f5807d..1e81728cdad 100644
--- a/cabal-install/src/Distribution/Client/Init/NonInteractive/Command.hs
+++ b/cabal-install/src/Distribution/Client/Init/NonInteractive/Command.hs
@@ -274,14 +274,16 @@ licenseHeuristics :: Interactive m => InitFlags -> m SpecLicense
 licenseHeuristics flags = getLicense flags $ guessLicense flags
 
 -- | The author's name. Prompt, or try to guess from an existing
---   darcs repo.
+--   git repo.
 authorHeuristics :: Interactive m => InitFlags -> m String
-authorHeuristics flags = getAuthor flags guessAuthorEmail
+authorHeuristics flags = guessAuthorEmail >>=
+  maybe (getAuthor flags $ return "") (getAuthor flags . return)
 
 -- | The author's email. Prompt, or try to guess from an existing
---   darcs repo.
+--   git repo.
 emailHeuristics :: Interactive m => InitFlags -> m String
-emailHeuristics flags = getEmail flags guessAuthorName
+emailHeuristics flags = guessAuthorName >>=
+  maybe (getEmail flags $ return "") (getEmail flags . return)
 
 -- | Prompt for a homepage URL for the package.
 homepageHeuristics :: Interactive m => InitFlags -> m String
diff --git a/cabal-install/src/Distribution/Client/Init/NonInteractive/Heuristics.hs b/cabal-install/src/Distribution/Client/Init/NonInteractive/Heuristics.hs
index ad947ec7ed2..04c49279871 100644
--- a/cabal-install/src/Distribution/Client/Init/NonInteractive/Heuristics.hs
+++ b/cabal-install/src/Distribution/Client/Init/NonInteractive/Heuristics.hs
@@ -151,18 +151,23 @@ guessSourceDirectories flags = do
     True  -> ["src"]
 
 -- | Guess author and email using git configuration options.
-guessAuthorName :: Interactive m => m String
+guessAuthorName :: Interactive m => m (Maybe String)
 guessAuthorName = guessGitInfo "user.name"
 
-guessAuthorEmail :: Interactive m => m String
+guessAuthorEmail :: Interactive m => m (Maybe String)
 guessAuthorEmail = guessGitInfo "user.email"
 
-guessGitInfo :: Interactive m => String -> m String
+guessGitInfo :: Interactive m => String -> m (Maybe String)
 guessGitInfo target = do
-  info <- readProcessWithExitCode "git" ["config", "--local", target] ""
-  if null $ snd' info
-    then trim . snd' <$> readProcessWithExitCode "git" ["config", "--global", target] ""
-    else return . trim $ snd' info
+  localInfo <- readProcessWithExitCode "git" ["config", "--local", target] ""
+  if null $ snd' localInfo
+    then do
+      globalInfo <- readProcessWithExitCode "git" ["config", "--global", target] ""
+      case fst' globalInfo of
+        ExitSuccess -> return $  Just (trim $ snd' globalInfo)
+        _           -> return Nothing
+    else return $  Just (trim $ snd' localInfo)
 
   where
+    fst' (x, _, _) = x
     snd' (_, x, _) = x
diff --git a/cabal-install/tests/UnitTests/Distribution/Client/Init/FileCreators.hs b/cabal-install/tests/UnitTests/Distribution/Client/Init/FileCreators.hs
index cbc3623ec76..2c0ab936669 100644
--- a/cabal-install/tests/UnitTests/Distribution/Client/Init/FileCreators.hs
+++ b/cabal-install/tests/UnitTests/Distribution/Client/Init/FileCreators.hs
@@ -44,7 +44,9 @@ tests _v _initFlags comp pkgIx srcDb =
               }
             inputs =
               -- createProject stuff
-              [ "True"
+              [ "Foobar"
+              , "foobar@qux.com"
+              , "True"
               , "[\"quxTest/Main.hs\"]"
               -- writeProject stuff
               -- writeLicense
diff --git a/cabal-install/tests/UnitTests/Distribution/Client/Init/NonInteractive.hs b/cabal-install/tests/UnitTests/Distribution/Client/Init/NonInteractive.hs
index 3466ac0eb0e..d63e8110549 100644
--- a/cabal-install/tests/UnitTests/Distribution/Client/Init/NonInteractive.hs
+++ b/cabal-install/tests/UnitTests/Distribution/Client/Init/NonInteractive.hs
@@ -73,7 +73,9 @@ driverFunctionTest pkgIx srcDb comp = testGroup "createProject"
               , dependencies = Flag []
               }
             inputs = NEL.fromList
-              [ "True"
+              ["Foobar"
+              , "foobar@qux.com"
+              , "True"
               , "[\"quxTest/Main.hs\"]"
               ]
 
@@ -149,8 +151,11 @@ driverFunctionTest pkgIx srcDb comp = testGroup "createProject"
               , dependencies = Flag []
               }
             inputs = NEL.fromList
+
+              [ "Foobar"
+              , "foobar@qux.com"
               -- extra sources
-              [ "[\"CHANGELOG.md\"]"
+              , "[\"CHANGELOG.md\"]"
               -- lib other modules
               , "False"
               -- exe other modules

From 84d01039df20217ef7a337a6855944bde07ee127 Mon Sep 17 00:00:00 2001
From: BasLaa <baslaarakker@gmail.com>
Date: Wed, 1 Mar 2023 09:49:35 +0100
Subject: [PATCH 054/144] Fix switched name and email guess

(cherry picked from commit d85bf80057ec9a835a534bf20d55bfbf11b7acbc)
---
 .../Distribution/Client/Init/NonInteractive/Command.hs    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cabal-install/src/Distribution/Client/Init/NonInteractive/Command.hs b/cabal-install/src/Distribution/Client/Init/NonInteractive/Command.hs
index 1e81728cdad..bc317247dfe 100644
--- a/cabal-install/src/Distribution/Client/Init/NonInteractive/Command.hs
+++ b/cabal-install/src/Distribution/Client/Init/NonInteractive/Command.hs
@@ -276,14 +276,14 @@ licenseHeuristics flags = getLicense flags $ guessLicense flags
 -- | The author's name. Prompt, or try to guess from an existing
 --   git repo.
 authorHeuristics :: Interactive m => InitFlags -> m String
-authorHeuristics flags = guessAuthorEmail >>=
-  maybe (getAuthor flags $ return "") (getAuthor flags . return)
+authorHeuristics flags = guessAuthorName >>=
+  maybe (getAuthor flags $ return "Unknown") (getAuthor flags . return)
 
 -- | The author's email. Prompt, or try to guess from an existing
 --   git repo.
 emailHeuristics :: Interactive m => InitFlags -> m String
-emailHeuristics flags = guessAuthorName >>=
-  maybe (getEmail flags $ return "") (getEmail flags . return)
+emailHeuristics flags = guessAuthorEmail >>=
+  maybe (getEmail flags $ return "Unknown") (getEmail flags . return)
 
 -- | Prompt for a homepage URL for the package.
 homepageHeuristics :: Interactive m => InitFlags -> m String

From 7cd58a5ed862abcabadaa32589d39916da576728 Mon Sep 17 00:00:00 2001
From: gbaz <gershomb@gmail.com>
Date: Fri, 19 May 2023 15:07:34 -0400
Subject: [PATCH 055/144] use with compiler flags in key of cached project
 config (#8819)

* use with compiler flags in key of cached project config

* changelog

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 9610438a6ba17a63ac7ae8aad7dae222733e51ad)
---
 .../Distribution/Client/ProjectPlanning.hs    | 23 ++++++++++---------
 changelog.d/pr-8819                           |  9 ++++++++
 2 files changed, 21 insertions(+), 11 deletions(-)
 create mode 100644 changelog.d/pr-8819

diff --git a/cabal-install/src/Distribution/Client/ProjectPlanning.hs b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
index 16ff6e0d534..05fbf69909e 100644
--- a/cabal-install/src/Distribution/Client/ProjectPlanning.hs
+++ b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
@@ -321,9 +321,17 @@ rebuildProjectConfig verbosity
                      }
                      cliConfig = do
 
+    progsearchpath <- liftIO $ getSystemSearchPath
+
+    let fileMonitorProjectConfig = newFileMonitor (distProjectCacheFile "config")
+
     fileMonitorProjectConfigKey <- do
       configPath <- getConfigFilePath projectConfigConfigFile
-      return (configPath, distProjectFile "")
+      return (configPath, distProjectFile "",
+                        (projectConfigHcFlavor, projectConfigHcPath, projectConfigHcPkg),
+                        progsearchpath,
+                        packageConfigProgramPaths,
+                        packageConfigProgramPathExtra)
 
     (projectConfig, localPackages) <-
       runRebuild distProjectRootDirectory
@@ -354,18 +362,11 @@ rebuildProjectConfig verbosity
 
   where
 
-    ProjectConfigShared { projectConfigConfigFile } =
-      projectConfigShared cliConfig
-
-    ProjectConfigShared { projectConfigIgnoreProject } =
+    ProjectConfigShared { projectConfigHcFlavor, projectConfigHcPath, projectConfigHcPkg, projectConfigIgnoreProject, projectConfigConfigFile } =
       projectConfigShared cliConfig
 
-    fileMonitorProjectConfig ::
-      FileMonitor
-        (FilePath, FilePath)
-        (ProjectConfig, [PackageSpecifier UnresolvedSourcePackage])
-    fileMonitorProjectConfig =
-      newFileMonitor (distProjectCacheFile "config")
+    PackageConfig { packageConfigProgramPaths, packageConfigProgramPathExtra } =
+      projectConfigLocalPackages cliConfig
 
     -- Read the cabal.project (or implicit config) and combine it with
     -- arguments from the command line
diff --git a/changelog.d/pr-8819 b/changelog.d/pr-8819
new file mode 100644
index 00000000000..1398a2ca648
--- /dev/null
+++ b/changelog.d/pr-8819
@@ -0,0 +1,9 @@
+synopsis: Use compiler flags for caching project config
+packages: cabal-install
+prs: #8819
+
+description: {
+
+This ensures that cached project configs with conditionals re-execute the conditional logic when the compiler changes.
+
+}

From c97e4878810b6c18004814b76657d1580e90af67 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Tue, 20 Jun 2023 10:59:10 +0200
Subject: [PATCH 056/144] Update SPDX license Ids & exceptions to 3.20 (#9028)

---
 .../Distribution/SPDX/LicenseExceptionId.hs   |   85 +-
 .../src/Distribution/SPDX/LicenseId.hs        |  564 +-
 .../Distribution/SPDX/LicenseListVersion.hs   |    3 +-
 Makefile                                      |    6 +-
 cabal-dev-scripts/cabal-dev-scripts.cabal     |    4 +-
 cabal-dev-scripts/src/GenSPDX.hs              |    1 +
 cabal-dev-scripts/src/GenSPDXExc.hs           |    1 +
 cabal-dev-scripts/src/GenUtils.hs             |   19 +-
 changelog.d/pr-9028                           |    7 +
 fix-whitespace.yaml                           |    1 +
 license-list-data/exceptions-3.20.json        |  558 ++
 license-list-data/licenses-3.20.json          | 6744 +++++++++++++++++
 templates/SPDX.LicenseExceptionId.template.hs |   11 +-
 templates/SPDX.LicenseId.template.hs          |   10 +-
 14 files changed, 7868 insertions(+), 146 deletions(-)
 create mode 100644 changelog.d/pr-9028
 create mode 100644 license-list-data/exceptions-3.20.json
 create mode 100644 license-list-data/licenses-3.20.json

diff --git a/Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs b/Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs
index b25a9e69341..ddb98a5845a 100644
--- a/Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs
+++ b/Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs
@@ -29,11 +29,12 @@ import qualified Text.PrettyPrint as Disp
 -- LicenseExceptionId
 -------------------------------------------------------------------------------
 
--- | SPDX License Exceptions identifiers list v3.16
+-- | SPDX License Exceptions identifiers list v3.20
 data LicenseExceptionId
     = DS389_exception -- ^ @389-exception@, 389 Directory Server Exception
     | Autoconf_exception_2_0 -- ^ @Autoconf-exception-2.0@, Autoconf exception 2.0
     | Autoconf_exception_3_0 -- ^ @Autoconf-exception-3.0@, Autoconf exception 3.0
+    | Autoconf_exception_generic -- ^ @Autoconf-exception-generic@, Autoconf generic exception, SPDX License List 3.20
     | Bison_exception_2_2 -- ^ @Bison-exception-2.2@, Bison exception 2.2
     | Bootloader_exception -- ^ @Bootloader-exception@, Bootloader Distribution Exception
     | Classpath_exception_2_0 -- ^ @Classpath-exception-2.0@, Classpath exception 2.0
@@ -46,32 +47,39 @@ data LicenseExceptionId
     | Freertos_exception_2_0 -- ^ @freertos-exception-2.0@, FreeRTOS Exception 2.0
     | 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
+    | GNAT_exception -- ^ @GNAT-exception@, GNAT exception, SPDX License List 3.20
     | Gnu_javamail_exception -- ^ @gnu-javamail-exception@, GNU JavaMail exception
-    | GPL_3_0_linking_exception -- ^ @GPL-3.0-linking-exception@, GPL-3.0 Linking Exception, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | GPL_3_0_linking_source_exception -- ^ @GPL-3.0-linking-source-exception@, GPL-3.0 Linking Exception (with Corresponding Source), SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | GPL_CC_1_0 -- ^ @GPL-CC-1.0@, GPL Cooperation Commitment 1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | GPL_3_0_linking_exception -- ^ @GPL-3.0-linking-exception@, GPL-3.0 Linking Exception, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GPL_3_0_linking_source_exception -- ^ @GPL-3.0-linking-source-exception@, GPL-3.0 Linking Exception (with Corresponding Source), SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GPL_CC_1_0 -- ^ @GPL-CC-1.0@, GPL Cooperation Commitment 1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GStreamer_exception_2005 -- ^ @GStreamer-exception-2005@, GStreamer Exception (2005), SPDX License List 3.20
+    | GStreamer_exception_2008 -- ^ @GStreamer-exception-2008@, GStreamer Exception (2008), SPDX License List 3.20
     | I2p_gpl_java_exception -- ^ @i2p-gpl-java-exception@, i2p GPL+Java Exception
-    | LGPL_3_0_linking_exception -- ^ @LGPL-3.0-linking-exception@, LGPL-3.0 Linking Exception, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | KiCad_libraries_exception -- ^ @KiCad-libraries-exception@, KiCad Libraries Exception, SPDX License List 3.20
+    | LGPL_3_0_linking_exception -- ^ @LGPL-3.0-linking-exception@, LGPL-3.0 Linking Exception, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | 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, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | LLVM_exception -- ^ @LLVM-exception@, LLVM Exception, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | 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, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | OCaml_LGPL_linking_exception -- ^ @OCaml-LGPL-linking-exception@, OCaml LGPL Linking Exception, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | 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, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | 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.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | 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, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | 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.9, SPDX License List 3.10, SPDX License List 3.16
-    | 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.9, SPDX License List 3.10, SPDX License List 3.16
+    | 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.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | QPL_1_0_INRIA_2004_exception -- ^ @QPL-1.0-INRIA-2004-exception@, INRIA QPL 1.0 2004 variant exception, SPDX License List 3.20
+    | 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.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | 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.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | Qwt_exception_1_0 -- ^ @Qwt-exception-1.0@, Qwt exception 1.0
-    | SHL_2_0 -- ^ @SHL-2.0@, Solderpad Hardware License v2.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | SHL_2_1 -- ^ @SHL-2.1@, Solderpad Hardware License v2.1, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | Swift_exception -- ^ @Swift-exception@, Swift Exception, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | SHL_2_0 -- ^ @SHL-2.0@, Solderpad Hardware License v2.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | SHL_2_1 -- ^ @SHL-2.1@, Solderpad Hardware License v2.1, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | SWI_exception -- ^ @SWI-exception@, SWI exception, SPDX License List 3.20
+    | Swift_exception -- ^ @Swift-exception@, Swift Exception, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | 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, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | 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.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | WxWindows_exception_3_1 -- ^ @WxWindows-exception-3.1@, WxWindows Library Exception 3.1
+    | X11vnc_openssl_exception -- ^ @x11vnc-openssl-exception@, x11vnc OpenSSL Exception, SPDX License List 3.20
   deriving (Eq, Ord, Enum, Bounded, Show, Read, Typeable, Data, Generic)
 
 instance Binary LicenseExceptionId where
@@ -108,6 +116,7 @@ licenseExceptionId :: LicenseExceptionId -> String
 licenseExceptionId DS389_exception = "389-exception"
 licenseExceptionId Autoconf_exception_2_0 = "Autoconf-exception-2.0"
 licenseExceptionId Autoconf_exception_3_0 = "Autoconf-exception-3.0"
+licenseExceptionId Autoconf_exception_generic = "Autoconf-exception-generic"
 licenseExceptionId Bison_exception_2_2 = "Bison-exception-2.2"
 licenseExceptionId Bootloader_exception = "Bootloader-exception"
 licenseExceptionId Classpath_exception_2_0 = "Classpath-exception-2.0"
@@ -120,11 +129,15 @@ licenseExceptionId Font_exception_2_0 = "Font-exception-2.0"
 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 GNAT_exception = "GNAT-exception"
 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 GStreamer_exception_2005 = "GStreamer-exception-2005"
+licenseExceptionId GStreamer_exception_2008 = "GStreamer-exception-2008"
 licenseExceptionId I2p_gpl_java_exception = "i2p-gpl-java-exception"
+licenseExceptionId KiCad_libraries_exception = "KiCad-libraries-exception"
 licenseExceptionId LGPL_3_0_linking_exception = "LGPL-3.0-linking-exception"
 licenseExceptionId Libtool_exception = "Libtool-exception"
 licenseExceptionId Linux_syscall_note = "Linux-syscall-note"
@@ -137,21 +150,25 @@ licenseExceptionId OCCT_exception_1_0 = "OCCT-exception-1.0"
 licenseExceptionId OpenJDK_assembly_exception_1_0 = "OpenJDK-assembly-exception-1.0"
 licenseExceptionId Openvpn_openssl_exception = "openvpn-openssl-exception"
 licenseExceptionId PS_or_PDF_font_exception_20170817 = "PS-or-PDF-font-exception-20170817"
+licenseExceptionId QPL_1_0_INRIA_2004_exception = "QPL-1.0-INRIA-2004-exception"
 licenseExceptionId Qt_GPL_exception_1_0 = "Qt-GPL-exception-1.0"
 licenseExceptionId Qt_LGPL_exception_1_1 = "Qt-LGPL-exception-1.1"
 licenseExceptionId Qwt_exception_1_0 = "Qwt-exception-1.0"
 licenseExceptionId SHL_2_0 = "SHL-2.0"
 licenseExceptionId SHL_2_1 = "SHL-2.1"
+licenseExceptionId SWI_exception = "SWI-exception"
 licenseExceptionId Swift_exception = "Swift-exception"
 licenseExceptionId U_boot_exception_2_0 = "u-boot-exception-2.0"
 licenseExceptionId Universal_FOSS_exception_1_0 = "Universal-FOSS-exception-1.0"
 licenseExceptionId WxWindows_exception_3_1 = "WxWindows-exception-3.1"
+licenseExceptionId X11vnc_openssl_exception = "x11vnc-openssl-exception"
 
 -- | License name, e.g. @"GNU General Public License v2.0 only"@
 licenseExceptionName :: LicenseExceptionId -> String
 licenseExceptionName DS389_exception = "389 Directory Server Exception"
 licenseExceptionName Autoconf_exception_2_0 = "Autoconf exception 2.0"
 licenseExceptionName Autoconf_exception_3_0 = "Autoconf exception 3.0"
+licenseExceptionName Autoconf_exception_generic = "Autoconf generic exception"
 licenseExceptionName Bison_exception_2_2 = "Bison exception 2.2"
 licenseExceptionName Bootloader_exception = "Bootloader Distribution Exception"
 licenseExceptionName Classpath_exception_2_0 = "Classpath exception 2.0"
@@ -164,11 +181,15 @@ licenseExceptionName Font_exception_2_0 = "Font exception 2.0"
 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 GNAT_exception = "GNAT exception"
 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 GStreamer_exception_2005 = "GStreamer Exception (2005)"
+licenseExceptionName GStreamer_exception_2008 = "GStreamer Exception (2008)"
 licenseExceptionName I2p_gpl_java_exception = "i2p GPL+Java Exception"
+licenseExceptionName KiCad_libraries_exception = "KiCad Libraries Exception"
 licenseExceptionName LGPL_3_0_linking_exception = "LGPL-3.0 Linking Exception"
 licenseExceptionName Libtool_exception = "Libtool Exception"
 licenseExceptionName Linux_syscall_note = "Linux Syscall Note"
@@ -181,15 +202,18 @@ licenseExceptionName OCCT_exception_1_0 = "Open CASCADE Exception 1.0"
 licenseExceptionName OpenJDK_assembly_exception_1_0 = "OpenJDK Assembly exception 1.0"
 licenseExceptionName Openvpn_openssl_exception = "OpenVPN OpenSSL Exception"
 licenseExceptionName PS_or_PDF_font_exception_20170817 = "PS/PDF font exception (2017-08-17)"
+licenseExceptionName QPL_1_0_INRIA_2004_exception = "INRIA QPL 1.0 2004 variant exception"
 licenseExceptionName Qt_GPL_exception_1_0 = "Qt GPL exception 1.0"
 licenseExceptionName Qt_LGPL_exception_1_1 = "Qt LGPL exception 1.1"
 licenseExceptionName Qwt_exception_1_0 = "Qwt exception 1.0"
 licenseExceptionName SHL_2_0 = "Solderpad Hardware License v2.0"
 licenseExceptionName SHL_2_1 = "Solderpad Hardware License v2.1"
+licenseExceptionName SWI_exception = "SWI exception"
 licenseExceptionName Swift_exception = "Swift Exception"
 licenseExceptionName U_boot_exception_2_0 = "U-Boot exception 2.0"
 licenseExceptionName Universal_FOSS_exception_1_0 = "Universal FOSS Exception, Version 1.0"
 licenseExceptionName WxWindows_exception_3_1 = "WxWindows Library Exception 3.1"
+licenseExceptionName X11vnc_openssl_exception = "x11vnc OpenSSL Exception"
 
 -------------------------------------------------------------------------------
 -- Creation
@@ -273,6 +297,32 @@ licenseExceptionIdList LicenseListVersion_3_16 =
     ]
     ++ bulkOfLicenses
 
+licenseExceptionIdList LicenseListVersion_3_20 =
+    [ Autoconf_exception_generic
+    , GNAT_exception
+    , GPL_3_0_linking_exception
+    , GPL_3_0_linking_source_exception
+    , GPL_CC_1_0
+    , GStreamer_exception_2005
+    , GStreamer_exception_2008
+    , KiCad_libraries_exception
+    , LGPL_3_0_linking_exception
+    , LLVM_exception
+    , OCaml_LGPL_linking_exception
+    , OpenJDK_assembly_exception_1_0
+    , PS_or_PDF_font_exception_20170817
+    , QPL_1_0_INRIA_2004_exception
+    , Qt_GPL_exception_1_0
+    , Qt_LGPL_exception_1_1
+    , SHL_2_0
+    , SHL_2_1
+    , SWI_exception
+    , Swift_exception
+    , Universal_FOSS_exception_1_0
+    , X11vnc_openssl_exception
+    ]
+    ++ bulkOfLicenses
+
 -- | Create a 'LicenseExceptionId' from a 'String'.
 mkLicenseExceptionId :: LicenseListVersion -> String -> Maybe LicenseExceptionId
 mkLicenseExceptionId LicenseListVersion_3_0  s = Map.lookup s stringLookup_3_0
@@ -281,6 +331,7 @@ mkLicenseExceptionId LicenseListVersion_3_6  s = Map.lookup s stringLookup_3_6
 mkLicenseExceptionId LicenseListVersion_3_9  s = Map.lookup s stringLookup_3_9
 mkLicenseExceptionId LicenseListVersion_3_10 s = Map.lookup s stringLookup_3_10
 mkLicenseExceptionId LicenseListVersion_3_16 s = Map.lookup s stringLookup_3_16
+mkLicenseExceptionId LicenseListVersion_3_20 s = Map.lookup s stringLookup_3_20
 
 stringLookup_3_0 :: Map String LicenseExceptionId
 stringLookup_3_0 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
@@ -306,6 +357,10 @@ stringLookup_3_16 :: Map String LicenseExceptionId
 stringLookup_3_16 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
     licenseExceptionIdList LicenseListVersion_3_16
 
+stringLookup_3_20 :: Map String LicenseExceptionId
+stringLookup_3_20 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
+    licenseExceptionIdList LicenseListVersion_3_20
+
 --  | License exceptions in all SPDX License lists
 bulkOfLicenses :: [LicenseExceptionId]
 bulkOfLicenses =
diff --git a/Cabal-syntax/src/Distribution/SPDX/LicenseId.hs b/Cabal-syntax/src/Distribution/SPDX/LicenseId.hs
index 6d5361ba366..67d580906a2 100644
--- a/Cabal-syntax/src/Distribution/SPDX/LicenseId.hs
+++ b/Cabal-syntax/src/Distribution/SPDX/LicenseId.hs
@@ -32,11 +32,12 @@ import qualified Text.PrettyPrint as Disp
 -- LicenseId
 -------------------------------------------------------------------------------
 
--- | SPDX License identifiers list v3.16
+-- | SPDX License identifiers list v3.20
 data LicenseId
     = NullBSD -- ^ @0BSD@, BSD Zero Clause License
     | AAL -- ^ @AAL@, Attribution Assurance License
     | Abstyles -- ^ @Abstyles@, Abstyles License
+    | AdaCore_doc -- ^ @AdaCore-doc@, AdaCore Doc License, SPDX License List 3.20
     | Adobe_2006 -- ^ @Adobe-2006@, Adobe Systems Incorporated Source Code License Agreement
     | Adobe_Glyph -- ^ @Adobe-Glyph@, Adobe Glyph List License
     | ADSL -- ^ @ADSL@, Amazon Digital Services License
@@ -47,122 +48,133 @@ data LicenseId
     | AFL_3_0 -- ^ @AFL-3.0@, Academic Free License v3.0
     | Afmparse -- ^ @Afmparse@, Afmparse License
     | AGPL_1_0 -- ^ @AGPL-1.0@, Affero General Public License v1.0, SPDX License List 3.0
-    | AGPL_1_0_only -- ^ @AGPL-1.0-only@, Affero General Public License v1.0 only, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | AGPL_1_0_or_later -- ^ @AGPL-1.0-or-later@, Affero General Public License v1.0 or later, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | AGPL_1_0_only -- ^ @AGPL-1.0-only@, Affero General Public License v1.0 only, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | AGPL_1_0_or_later -- ^ @AGPL-1.0-or-later@, Affero General Public License v1.0 or later, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | AGPL_3_0_only -- ^ @AGPL-3.0-only@, GNU Affero General Public License v3.0 only
     | AGPL_3_0_or_later -- ^ @AGPL-3.0-or-later@, GNU Affero General Public License v3.0 or later
     | Aladdin -- ^ @Aladdin@, Aladdin Free Public License
     | AMDPLPA -- ^ @AMDPLPA@, AMD's plpa_map.c License
     | AML -- ^ @AML@, Apple MIT License
     | AMPAS -- ^ @AMPAS@, Academy of Motion Picture Arts and Sciences BSD
-    | ANTLR_PD_fallback -- ^ @ANTLR-PD-fallback@, ANTLR Software Rights Notice with license fallback, SPDX License List 3.16
+    | ANTLR_PD_fallback -- ^ @ANTLR-PD-fallback@, ANTLR Software Rights Notice with license fallback, SPDX License List 3.16, SPDX License List 3.20
     | ANTLR_PD -- ^ @ANTLR-PD@, ANTLR Software Rights Notice
     | Apache_1_0 -- ^ @Apache-1.0@, Apache License 1.0
     | Apache_1_1 -- ^ @Apache-1.1@, Apache License 1.1
     | Apache_2_0 -- ^ @Apache-2.0@, Apache License 2.0
     | APAFML -- ^ @APAFML@, Adobe Postscript AFM License
     | APL_1_0 -- ^ @APL-1.0@, Adaptive Public License 1.0
-    | App_s2p -- ^ @App-s2p@, App::s2p License, SPDX License List 3.16
+    | App_s2p -- ^ @App-s2p@, App::s2p License, SPDX License List 3.16, SPDX License List 3.20
     | APSL_1_0 -- ^ @APSL-1.0@, Apple Public Source License 1.0
     | APSL_1_1 -- ^ @APSL-1.1@, Apple Public Source License 1.1
     | APSL_1_2 -- ^ @APSL-1.2@, Apple Public Source License 1.2
     | APSL_2_0 -- ^ @APSL-2.0@, Apple Public Source License 2.0
+    | Arphic_1999 -- ^ @Arphic-1999@, Arphic Public License, SPDX License List 3.20
     | Artistic_1_0_cl8 -- ^ @Artistic-1.0-cl8@, Artistic License 1.0 w/clause 8
     | Artistic_1_0_Perl -- ^ @Artistic-1.0-Perl@, Artistic License 1.0 (Perl)
     | Artistic_1_0 -- ^ @Artistic-1.0@, Artistic License 1.0
     | Artistic_2_0 -- ^ @Artistic-2.0@, Artistic License 2.0
+    | Baekmuk -- ^ @Baekmuk@, Baekmuk License, SPDX License List 3.20
     | Bahyph -- ^ @Bahyph@, Bahyph License
     | Barr -- ^ @Barr@, Barr License
     | Beerware -- ^ @Beerware@, Beerware License
+    | Bitstream_Charter -- ^ @Bitstream-Charter@, Bitstream Charter Font License, SPDX License List 3.20
+    | Bitstream_Vera -- ^ @Bitstream-Vera@, Bitstream Vera Font License, SPDX License List 3.20
     | BitTorrent_1_0 -- ^ @BitTorrent-1.0@, BitTorrent Open Source License v1.0
     | BitTorrent_1_1 -- ^ @BitTorrent-1.1@, BitTorrent Open Source License v1.1
-    | Blessing -- ^ @blessing@, SQLite Blessing, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | BlueOak_1_0_0 -- ^ @BlueOak-1.0.0@, Blue Oak Model License 1.0.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | Blessing -- ^ @blessing@, SQLite Blessing, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | BlueOak_1_0_0 -- ^ @BlueOak-1.0.0@, Blue Oak Model License 1.0.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | Borceux -- ^ @Borceux@, Borceux license
+    | Brian_Gladman_3_Clause -- ^ @Brian-Gladman-3-Clause@, Brian Gladman 3-Clause License, SPDX License List 3.20
     | BSD_1_Clause -- ^ @BSD-1-Clause@, BSD 1-Clause License
     | BSD_2_Clause_FreeBSD -- ^ @BSD-2-Clause-FreeBSD@, BSD 2-Clause FreeBSD License, SPDX License List 3.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9
     | BSD_2_Clause_NetBSD -- ^ @BSD-2-Clause-NetBSD@, BSD 2-Clause NetBSD License, SPDX License List 3.0, SPDX License List 3.2, SPDX License List 3.6
     | BSD_2_Clause_Patent -- ^ @BSD-2-Clause-Patent@, BSD-2-Clause Plus Patent License
-    | BSD_2_Clause_Views -- ^ @BSD-2-Clause-Views@, BSD 2-Clause with views sentence, SPDX License List 3.10, SPDX License List 3.16
+    | BSD_2_Clause_Views -- ^ @BSD-2-Clause-Views@, BSD 2-Clause with views sentence, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | BSD_2_Clause -- ^ @BSD-2-Clause@, BSD 2-Clause "Simplified" License
     | BSD_3_Clause_Attribution -- ^ @BSD-3-Clause-Attribution@, BSD with attribution
     | BSD_3_Clause_Clear -- ^ @BSD-3-Clause-Clear@, BSD 3-Clause Clear License
     | BSD_3_Clause_LBNL -- ^ @BSD-3-Clause-LBNL@, Lawrence Berkeley National Labs BSD variant license
-    | BSD_3_Clause_Modification -- ^ @BSD-3-Clause-Modification@, BSD 3-Clause Modification, SPDX License List 3.16
-    | BSD_3_Clause_No_Military_License -- ^ @BSD-3-Clause-No-Military-License@, BSD 3-Clause No Military License, SPDX License List 3.16
+    | BSD_3_Clause_Modification -- ^ @BSD-3-Clause-Modification@, BSD 3-Clause Modification, SPDX License List 3.16, SPDX License List 3.20
+    | BSD_3_Clause_No_Military_License -- ^ @BSD-3-Clause-No-Military-License@, BSD 3-Clause No Military License, SPDX License List 3.16, SPDX License List 3.20
     | BSD_3_Clause_No_Nuclear_License_2014 -- ^ @BSD-3-Clause-No-Nuclear-License-2014@, BSD 3-Clause No Nuclear License 2014
     | BSD_3_Clause_No_Nuclear_License -- ^ @BSD-3-Clause-No-Nuclear-License@, BSD 3-Clause No Nuclear License
     | BSD_3_Clause_No_Nuclear_Warranty -- ^ @BSD-3-Clause-No-Nuclear-Warranty@, BSD 3-Clause No Nuclear Warranty
-    | BSD_3_Clause_Open_MPI -- ^ @BSD-3-Clause-Open-MPI@, BSD 3-Clause Open MPI variant, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | BSD_3_Clause_Open_MPI -- ^ @BSD-3-Clause-Open-MPI@, BSD 3-Clause Open MPI variant, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | BSD_3_Clause -- ^ @BSD-3-Clause@, BSD 3-Clause "New" or "Revised" License
-    | BSD_4_Clause_Shortened -- ^ @BSD-4-Clause-Shortened@, BSD 4 Clause Shortened, SPDX License List 3.16
+    | BSD_4_Clause_Shortened -- ^ @BSD-4-Clause-Shortened@, BSD 4 Clause Shortened, SPDX License List 3.16, SPDX License List 3.20
     | BSD_4_Clause_UC -- ^ @BSD-4-Clause-UC@, BSD-4-Clause (University of California-Specific)
     | BSD_4_Clause -- ^ @BSD-4-Clause@, BSD 4-Clause "Original" or "Old" License
+    | BSD_4_3RENO -- ^ @BSD-4.3RENO@, BSD 4.3 RENO License, SPDX License List 3.20
+    | BSD_4_3TAHOE -- ^ @BSD-4.3TAHOE@, BSD 4.3 TAHOE License, SPDX License List 3.20
+    | BSD_Advertising_Acknowledgement -- ^ @BSD-Advertising-Acknowledgement@, BSD Advertising Acknowledgement License, SPDX License List 3.20
+    | BSD_Attribution_HPND_disclaimer -- ^ @BSD-Attribution-HPND-disclaimer@, BSD with Attribution and HPND disclaimer, SPDX License List 3.20
     | BSD_Protection -- ^ @BSD-Protection@, BSD Protection License
     | BSD_Source_Code -- ^ @BSD-Source-Code@, BSD Source Code Attribution
     | BSL_1_0 -- ^ @BSL-1.0@, Boost Software License 1.0
     | Bzip2_1_0_5 -- ^ @bzip2-1.0.5@, bzip2 and libbzip2 License v1.0.5, SPDX License List 3.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10
-    | BUSL_1_1 -- ^ @BUSL-1.1@, Business Source License 1.1, SPDX License List 3.16
+    | BUSL_1_1 -- ^ @BUSL-1.1@, Business Source License 1.1, SPDX License List 3.16, SPDX License List 3.20
     | Bzip2_1_0_6 -- ^ @bzip2-1.0.6@, bzip2 and libbzip2 License v1.0.6
-    | C_UDA_1_0 -- ^ @C-UDA-1.0@, Computational Use of Data Agreement v1.0, SPDX License List 3.16
-    | CAL_1_0_Combined_Work_Exception -- ^ @CAL-1.0-Combined-Work-Exception@, Cryptographic Autonomy License 1.0 (Combined Work Exception), SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | CAL_1_0 -- ^ @CAL-1.0@, Cryptographic Autonomy License 1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | C_UDA_1_0 -- ^ @C-UDA-1.0@, Computational Use of Data Agreement v1.0, SPDX License List 3.16, SPDX License List 3.20
+    | CAL_1_0_Combined_Work_Exception -- ^ @CAL-1.0-Combined-Work-Exception@, Cryptographic Autonomy License 1.0 (Combined Work Exception), SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | CAL_1_0 -- ^ @CAL-1.0@, Cryptographic Autonomy License 1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | Caldera -- ^ @Caldera@, Caldera License
     | CATOSL_1_1 -- ^ @CATOSL-1.1@, Computer Associates Trusted Open Source License 1.1
     | CC_BY_1_0 -- ^ @CC-BY-1.0@, Creative Commons Attribution 1.0 Generic
     | CC_BY_2_0 -- ^ @CC-BY-2.0@, Creative Commons Attribution 2.0 Generic
-    | CC_BY_2_5_AU -- ^ @CC-BY-2.5-AU@, Creative Commons Attribution 2.5 Australia, SPDX License List 3.16
+    | CC_BY_2_5_AU -- ^ @CC-BY-2.5-AU@, Creative Commons Attribution 2.5 Australia, SPDX License List 3.16, SPDX License List 3.20
     | CC_BY_2_5 -- ^ @CC-BY-2.5@, Creative Commons Attribution 2.5 Generic
-    | CC_BY_3_0_AT -- ^ @CC-BY-3.0-AT@, Creative Commons Attribution 3.0 Austria, SPDX License List 3.10, SPDX License List 3.16
-    | CC_BY_3_0_DE -- ^ @CC-BY-3.0-DE@, Creative Commons Attribution 3.0 Germany, SPDX License List 3.16
-    | CC_BY_3_0_NL -- ^ @CC-BY-3.0-NL@, Creative Commons Attribution 3.0 Netherlands, SPDX License List 3.16
-    | CC_BY_3_0_US -- ^ @CC-BY-3.0-US@, Creative Commons Attribution 3.0 United States, SPDX License List 3.16
+    | CC_BY_3_0_AT -- ^ @CC-BY-3.0-AT@, Creative Commons Attribution 3.0 Austria, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_3_0_DE -- ^ @CC-BY-3.0-DE@, Creative Commons Attribution 3.0 Germany, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_3_0_IGO -- ^ @CC-BY-3.0-IGO@, Creative Commons Attribution 3.0 IGO, SPDX License List 3.20
+    | CC_BY_3_0_NL -- ^ @CC-BY-3.0-NL@, Creative Commons Attribution 3.0 Netherlands, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_3_0_US -- ^ @CC-BY-3.0-US@, Creative Commons Attribution 3.0 United States, SPDX License List 3.16, SPDX License List 3.20
     | CC_BY_3_0 -- ^ @CC-BY-3.0@, Creative Commons Attribution 3.0 Unported
     | CC_BY_4_0 -- ^ @CC-BY-4.0@, Creative Commons Attribution 4.0 International
     | CC_BY_NC_1_0 -- ^ @CC-BY-NC-1.0@, Creative Commons Attribution Non Commercial 1.0 Generic
     | CC_BY_NC_2_0 -- ^ @CC-BY-NC-2.0@, Creative Commons Attribution Non Commercial 2.0 Generic
     | CC_BY_NC_2_5 -- ^ @CC-BY-NC-2.5@, Creative Commons Attribution Non Commercial 2.5 Generic
-    | CC_BY_NC_3_0_DE -- ^ @CC-BY-NC-3.0-DE@, Creative Commons Attribution Non Commercial 3.0 Germany, SPDX License List 3.16
+    | CC_BY_NC_3_0_DE -- ^ @CC-BY-NC-3.0-DE@, Creative Commons Attribution Non Commercial 3.0 Germany, SPDX License List 3.16, SPDX License List 3.20
     | CC_BY_NC_3_0 -- ^ @CC-BY-NC-3.0@, Creative Commons Attribution Non Commercial 3.0 Unported
     | CC_BY_NC_4_0 -- ^ @CC-BY-NC-4.0@, Creative Commons Attribution Non Commercial 4.0 International
     | CC_BY_NC_ND_1_0 -- ^ @CC-BY-NC-ND-1.0@, Creative Commons Attribution Non Commercial No Derivatives 1.0 Generic
     | CC_BY_NC_ND_2_0 -- ^ @CC-BY-NC-ND-2.0@, Creative Commons Attribution Non Commercial No Derivatives 2.0 Generic
     | CC_BY_NC_ND_2_5 -- ^ @CC-BY-NC-ND-2.5@, Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic
-    | CC_BY_NC_ND_3_0_DE -- ^ @CC-BY-NC-ND-3.0-DE@, Creative Commons Attribution Non Commercial No Derivatives 3.0 Germany, SPDX License List 3.16
-    | CC_BY_NC_ND_3_0_IGO -- ^ @CC-BY-NC-ND-3.0-IGO@, Creative Commons Attribution Non Commercial No Derivatives 3.0 IGO, SPDX License List 3.10, SPDX License List 3.16
+    | CC_BY_NC_ND_3_0_DE -- ^ @CC-BY-NC-ND-3.0-DE@, Creative Commons Attribution Non Commercial No Derivatives 3.0 Germany, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_NC_ND_3_0_IGO -- ^ @CC-BY-NC-ND-3.0-IGO@, Creative Commons Attribution Non Commercial No Derivatives 3.0 IGO, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | CC_BY_NC_ND_3_0 -- ^ @CC-BY-NC-ND-3.0@, Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported
     | CC_BY_NC_ND_4_0 -- ^ @CC-BY-NC-ND-4.0@, Creative Commons Attribution Non Commercial No Derivatives 4.0 International
     | CC_BY_NC_SA_1_0 -- ^ @CC-BY-NC-SA-1.0@, Creative Commons Attribution Non Commercial Share Alike 1.0 Generic
-    | CC_BY_NC_SA_2_0_FR -- ^ @CC-BY-NC-SA-2.0-FR@, Creative Commons Attribution-NonCommercial-ShareAlike 2.0 France, SPDX License List 3.16
-    | CC_BY_NC_SA_2_0_UK -- ^ @CC-BY-NC-SA-2.0-UK@, Creative Commons Attribution Non Commercial Share Alike 2.0 England and Wales, SPDX License List 3.16
+    | CC_BY_NC_SA_2_0_DE -- ^ @CC-BY-NC-SA-2.0-DE@, Creative Commons Attribution Non Commercial Share Alike 2.0 Germany, SPDX License List 3.20
+    | CC_BY_NC_SA_2_0_FR -- ^ @CC-BY-NC-SA-2.0-FR@, Creative Commons Attribution-NonCommercial-ShareAlike 2.0 France, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_NC_SA_2_0_UK -- ^ @CC-BY-NC-SA-2.0-UK@, Creative Commons Attribution Non Commercial Share Alike 2.0 England and Wales, SPDX License List 3.16, SPDX License List 3.20
     | CC_BY_NC_SA_2_0 -- ^ @CC-BY-NC-SA-2.0@, Creative Commons Attribution Non Commercial Share Alike 2.0 Generic
     | CC_BY_NC_SA_2_5 -- ^ @CC-BY-NC-SA-2.5@, Creative Commons Attribution Non Commercial Share Alike 2.5 Generic
-    | CC_BY_NC_SA_3_0_DE -- ^ @CC-BY-NC-SA-3.0-DE@, Creative Commons Attribution Non Commercial Share Alike 3.0 Germany, SPDX License List 3.16
-    | CC_BY_NC_SA_3_0_IGO -- ^ @CC-BY-NC-SA-3.0-IGO@, Creative Commons Attribution Non Commercial Share Alike 3.0 IGO, SPDX License List 3.16
+    | CC_BY_NC_SA_3_0_DE -- ^ @CC-BY-NC-SA-3.0-DE@, Creative Commons Attribution Non Commercial Share Alike 3.0 Germany, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_NC_SA_3_0_IGO -- ^ @CC-BY-NC-SA-3.0-IGO@, Creative Commons Attribution Non Commercial Share Alike 3.0 IGO, SPDX License List 3.16, SPDX License List 3.20
     | CC_BY_NC_SA_3_0 -- ^ @CC-BY-NC-SA-3.0@, Creative Commons Attribution Non Commercial Share Alike 3.0 Unported
     | CC_BY_NC_SA_4_0 -- ^ @CC-BY-NC-SA-4.0@, Creative Commons Attribution Non Commercial Share Alike 4.0 International
     | CC_BY_ND_1_0 -- ^ @CC-BY-ND-1.0@, Creative Commons Attribution No Derivatives 1.0 Generic
     | CC_BY_ND_2_0 -- ^ @CC-BY-ND-2.0@, Creative Commons Attribution No Derivatives 2.0 Generic
     | CC_BY_ND_2_5 -- ^ @CC-BY-ND-2.5@, Creative Commons Attribution No Derivatives 2.5 Generic
-    | CC_BY_ND_3_0_DE -- ^ @CC-BY-ND-3.0-DE@, Creative Commons Attribution No Derivatives 3.0 Germany, SPDX License List 3.16
+    | CC_BY_ND_3_0_DE -- ^ @CC-BY-ND-3.0-DE@, Creative Commons Attribution No Derivatives 3.0 Germany, SPDX License List 3.16, SPDX License List 3.20
     | CC_BY_ND_3_0 -- ^ @CC-BY-ND-3.0@, Creative Commons Attribution No Derivatives 3.0 Unported
     | CC_BY_ND_4_0 -- ^ @CC-BY-ND-4.0@, Creative Commons Attribution No Derivatives 4.0 International
     | CC_BY_SA_1_0 -- ^ @CC-BY-SA-1.0@, Creative Commons Attribution Share Alike 1.0 Generic
-    | CC_BY_SA_2_0_UK -- ^ @CC-BY-SA-2.0-UK@, Creative Commons Attribution Share Alike 2.0 England and Wales, SPDX License List 3.16
+    | CC_BY_SA_2_0_UK -- ^ @CC-BY-SA-2.0-UK@, Creative Commons Attribution Share Alike 2.0 England and Wales, SPDX License List 3.16, SPDX License List 3.20
     | CC_BY_SA_2_0 -- ^ @CC-BY-SA-2.0@, Creative Commons Attribution Share Alike 2.0 Generic
-    | CC_BY_SA_2_1_JP -- ^ @CC-BY-SA-2.1-JP@, Creative Commons Attribution Share Alike 2.1 Japan, SPDX License List 3.16
+    | CC_BY_SA_2_1_JP -- ^ @CC-BY-SA-2.1-JP@, Creative Commons Attribution Share Alike 2.1 Japan, SPDX License List 3.16, SPDX License List 3.20
     | CC_BY_SA_2_5 -- ^ @CC-BY-SA-2.5@, Creative Commons Attribution Share Alike 2.5 Generic
-    | CC_BY_SA_3_0_AT -- ^ @CC-BY-SA-3.0-AT@, Creative Commons Attribution Share Alike 3.0 Austria, SPDX License List 3.10, SPDX License List 3.16
-    | CC_BY_SA_3_0_DE -- ^ @CC-BY-SA-3.0-DE@, Creative Commons Attribution Share Alike 3.0 Germany, SPDX License List 3.16
+    | CC_BY_SA_3_0_AT -- ^ @CC-BY-SA-3.0-AT@, Creative Commons Attribution Share Alike 3.0 Austria, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_SA_3_0_DE -- ^ @CC-BY-SA-3.0-DE@, Creative Commons Attribution Share Alike 3.0 Germany, SPDX License List 3.16, SPDX License List 3.20
     | CC_BY_SA_3_0 -- ^ @CC-BY-SA-3.0@, Creative Commons Attribution Share Alike 3.0 Unported
     | CC_BY_SA_4_0 -- ^ @CC-BY-SA-4.0@, Creative Commons Attribution Share Alike 4.0 International
-    | CC_PDDC -- ^ @CC-PDDC@, Creative Commons Public Domain Dedication and Certification, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | CC_PDDC -- ^ @CC-PDDC@, Creative Commons Public Domain Dedication and Certification, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | CC0_1_0 -- ^ @CC0-1.0@, Creative Commons Zero v1.0 Universal
     | CDDL_1_0 -- ^ @CDDL-1.0@, Common Development and Distribution License 1.0
     | CDDL_1_1 -- ^ @CDDL-1.1@, Common Development and Distribution License 1.1
-    | CDL_1_0 -- ^ @CDL-1.0@, Common Documentation License 1.0, SPDX License List 3.16
+    | CDL_1_0 -- ^ @CDL-1.0@, Common Documentation License 1.0, SPDX License List 3.16, SPDX License List 3.20
     | CDLA_Permissive_1_0 -- ^ @CDLA-Permissive-1.0@, Community Data License Agreement Permissive 1.0
-    | CDLA_Permissive_2_0 -- ^ @CDLA-Permissive-2.0@, Community Data License Agreement Permissive 2.0, SPDX License List 3.16
+    | CDLA_Permissive_2_0 -- ^ @CDLA-Permissive-2.0@, Community Data License Agreement Permissive 2.0, SPDX License List 3.16, SPDX License List 3.20
     | CDLA_Sharing_1_0 -- ^ @CDLA-Sharing-1.0@, Community Data License Agreement Sharing 1.0
     | CECILL_1_0 -- ^ @CECILL-1.0@, CeCILL Free Software License Agreement v1.0
     | CECILL_1_1 -- ^ @CECILL-1.1@, CeCILL Free Software License Agreement v1.1
@@ -170,20 +182,25 @@ data LicenseId
     | CECILL_2_1 -- ^ @CECILL-2.1@, CeCILL Free Software License Agreement v2.1
     | CECILL_B -- ^ @CECILL-B@, CeCILL-B Free Software License Agreement
     | CECILL_C -- ^ @CECILL-C@, CeCILL-C Free Software License Agreement
-    | CERN_OHL_1_1 -- ^ @CERN-OHL-1.1@, CERN Open Hardware Licence v1.1, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | CERN_OHL_1_2 -- ^ @CERN-OHL-1.2@, CERN Open Hardware Licence v1.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | CERN_OHL_P_2_0 -- ^ @CERN-OHL-P-2.0@, CERN Open Hardware Licence Version 2 - Permissive, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | CERN_OHL_S_2_0 -- ^ @CERN-OHL-S-2.0@, CERN Open Hardware Licence Version 2 - Strongly Reciprocal, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | CERN_OHL_W_2_0 -- ^ @CERN-OHL-W-2.0@, CERN Open Hardware Licence Version 2 - Weakly Reciprocal, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | CERN_OHL_1_1 -- ^ @CERN-OHL-1.1@, CERN Open Hardware Licence v1.1, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | CERN_OHL_1_2 -- ^ @CERN-OHL-1.2@, CERN Open Hardware Licence v1.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | CERN_OHL_P_2_0 -- ^ @CERN-OHL-P-2.0@, CERN Open Hardware Licence Version 2 - Permissive, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | CERN_OHL_S_2_0 -- ^ @CERN-OHL-S-2.0@, CERN Open Hardware Licence Version 2 - Strongly Reciprocal, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | CERN_OHL_W_2_0 -- ^ @CERN-OHL-W-2.0@, CERN Open Hardware Licence Version 2 - Weakly Reciprocal, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | CFITSIO -- ^ @CFITSIO@, CFITSIO License, SPDX License List 3.20
+    | Checkmk -- ^ @checkmk@, Checkmk License, SPDX License List 3.20
     | ClArtistic -- ^ @ClArtistic@, Clarified Artistic License
+    | Clips -- ^ @Clips@, Clips License, SPDX License List 3.20
+    | CMU_Mach -- ^ @CMU-Mach@, CMU Mach License, SPDX License List 3.20
     | CNRI_Jython -- ^ @CNRI-Jython@, CNRI Jython License
     | CNRI_Python_GPL_Compatible -- ^ @CNRI-Python-GPL-Compatible@, CNRI Python Open Source GPL Compatible License Agreement
     | CNRI_Python -- ^ @CNRI-Python@, CNRI Python License
-    | COIL_1_0 -- ^ @COIL-1.0@, Copyfree Open Innovation License, SPDX License List 3.16
-    | Community_Spec_1_0 -- ^ @Community-Spec-1.0@, Community Specification License 1.0, SPDX License List 3.16
+    | COIL_1_0 -- ^ @COIL-1.0@, Copyfree Open Innovation License, SPDX License List 3.16, SPDX License List 3.20
+    | Community_Spec_1_0 -- ^ @Community-Spec-1.0@, Community Specification License 1.0, SPDX License List 3.16, SPDX License List 3.20
     | Condor_1_1 -- ^ @Condor-1.1@, Condor Public License v1.1
-    | Copyleft_next_0_3_0 -- ^ @copyleft-next-0.3.0@, copyleft-next 0.3.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | Copyleft_next_0_3_1 -- ^ @copyleft-next-0.3.1@, copyleft-next 0.3.1, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | Copyleft_next_0_3_0 -- ^ @copyleft-next-0.3.0@, copyleft-next 0.3.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | Copyleft_next_0_3_1 -- ^ @copyleft-next-0.3.1@, copyleft-next 0.3.1, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | Cornell_Lossless_JPEG -- ^ @Cornell-Lossless-JPEG@, Cornell Lossless JPEG License, SPDX License List 3.20
     | CPAL_1_0 -- ^ @CPAL-1.0@, Common Public Attribution License 1.0
     | CPL_1_0 -- ^ @CPL-1.0@, Common Public License 1.0
     | CPOL_1_02 -- ^ @CPOL-1.02@, Code Project Open License 1.02
@@ -194,10 +211,10 @@ data LicenseId
     | Curl -- ^ @curl@, curl License
     | D_FSL_1_0 -- ^ @D-FSL-1.0@, Deutsche Freie Software Lizenz
     | Diffmark -- ^ @diffmark@, diffmark license
-    | DL_DE_BY_2_0 -- ^ @DL-DE-BY-2.0@, Data licence Germany – attribution – version 2.0, SPDX License List 3.16
+    | DL_DE_BY_2_0 -- ^ @DL-DE-BY-2.0@, Data licence Germany – attribution – version 2.0, SPDX License List 3.16, SPDX License List 3.20
     | DOC -- ^ @DOC@, DOC License
     | Dotseqn -- ^ @Dotseqn@, Dotseqn License
-    | DRL_1_0 -- ^ @DRL-1.0@, Detection Rule License 1.0, SPDX License List 3.16
+    | DRL_1_0 -- ^ @DRL-1.0@, Detection Rule License 1.0, SPDX License List 3.16, SPDX License List 3.20
     | DSDP -- ^ @DSDP@, DSDP License
     | Dvipdfm -- ^ @dvipdfm@, dvipdfm License
     | ECL_1_0 -- ^ @ECL-1.0@, Educational Community License v1.0
@@ -205,51 +222,52 @@ data LicenseId
     | EFL_1_0 -- ^ @EFL-1.0@, Eiffel Forum License v1.0
     | EFL_2_0 -- ^ @EFL-2.0@, Eiffel Forum License v2.0
     | EGenix -- ^ @eGenix@, eGenix.com Public License 1.1.0
-    | Elastic_2_0 -- ^ @Elastic-2.0@, Elastic License 2.0, SPDX License List 3.16
+    | Elastic_2_0 -- ^ @Elastic-2.0@, Elastic License 2.0, SPDX License List 3.16, SPDX License List 3.20
     | Entessa -- ^ @Entessa@, Entessa Public License v1.0
-    | EPICS -- ^ @EPICS@, EPICS Open License, SPDX License List 3.10, SPDX License List 3.16
+    | EPICS -- ^ @EPICS@, EPICS Open License, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | EPL_1_0 -- ^ @EPL-1.0@, Eclipse Public License 1.0
     | EPL_2_0 -- ^ @EPL-2.0@, Eclipse Public License 2.0
     | ErlPL_1_1 -- ^ @ErlPL-1.1@, Erlang Public License v1.1
-    | Etalab_2_0 -- ^ @etalab-2.0@, Etalab Open License 2.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | Etalab_2_0 -- ^ @etalab-2.0@, Etalab Open License 2.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | EUDatagrid -- ^ @EUDatagrid@, EU DataGrid Software License
     | EUPL_1_0 -- ^ @EUPL-1.0@, European Union Public License 1.0
     | EUPL_1_1 -- ^ @EUPL-1.1@, European Union Public License 1.1
     | EUPL_1_2 -- ^ @EUPL-1.2@, European Union Public License 1.2
     | Eurosym -- ^ @Eurosym@, Eurosym License
     | Fair -- ^ @Fair@, Fair License
-    | FDK_AAC -- ^ @FDK-AAC@, Fraunhofer FDK AAC Codec Library, SPDX License List 3.16
+    | FDK_AAC -- ^ @FDK-AAC@, Fraunhofer FDK AAC Codec Library, SPDX License List 3.16, SPDX License List 3.20
     | Frameworx_1_0 -- ^ @Frameworx-1.0@, Frameworx Open License 1.0
-    | FreeBSD_DOC -- ^ @FreeBSD-DOC@, FreeBSD Documentation License, SPDX License List 3.16
+    | FreeBSD_DOC -- ^ @FreeBSD-DOC@, FreeBSD Documentation License, SPDX License List 3.16, SPDX License List 3.20
     | FreeImage -- ^ @FreeImage@, FreeImage Public License v1.0
     | FSFAP -- ^ @FSFAP@, FSF All Permissive License
+    | FSFULLRWD -- ^ @FSFULLRWD@, FSF Unlimited License (With License Retention    and Warranty Disclaimer), SPDX License List 3.20
     | FSFULLR -- ^ @FSFULLR@, FSF Unlimited License (with License Retention)
     | FSFUL -- ^ @FSFUL@, FSF Unlimited License
     | FTL -- ^ @FTL@, Freetype Project License
-    | GD -- ^ @GD@, GD License, SPDX License List 3.16
-    | GFDL_1_1_invariants_only -- ^ @GFDL-1.1-invariants-only@, GNU Free Documentation License v1.1 only - invariants, SPDX License List 3.10, SPDX License List 3.16
-    | GFDL_1_1_invariants_or_later -- ^ @GFDL-1.1-invariants-or-later@, GNU Free Documentation License v1.1 or later - invariants, SPDX License List 3.10, SPDX License List 3.16
-    | GFDL_1_1_no_invariants_only -- ^ @GFDL-1.1-no-invariants-only@, GNU Free Documentation License v1.1 only - no invariants, SPDX License List 3.10, SPDX License List 3.16
-    | GFDL_1_1_no_invariants_or_later -- ^ @GFDL-1.1-no-invariants-or-later@, GNU Free Documentation License v1.1 or later - no invariants, SPDX License List 3.10, SPDX License List 3.16
+    | GD -- ^ @GD@, GD License, SPDX License List 3.16, SPDX License List 3.20
+    | GFDL_1_1_invariants_only -- ^ @GFDL-1.1-invariants-only@, GNU Free Documentation License v1.1 only - invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GFDL_1_1_invariants_or_later -- ^ @GFDL-1.1-invariants-or-later@, GNU Free Documentation License v1.1 or later - invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GFDL_1_1_no_invariants_only -- ^ @GFDL-1.1-no-invariants-only@, GNU Free Documentation License v1.1 only - no invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GFDL_1_1_no_invariants_or_later -- ^ @GFDL-1.1-no-invariants-or-later@, GNU Free Documentation License v1.1 or later - no invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | GFDL_1_1_only -- ^ @GFDL-1.1-only@, GNU Free Documentation License v1.1 only
     | GFDL_1_1_or_later -- ^ @GFDL-1.1-or-later@, GNU Free Documentation License v1.1 or later
-    | GFDL_1_2_invariants_only -- ^ @GFDL-1.2-invariants-only@, GNU Free Documentation License v1.2 only - invariants, SPDX License List 3.10, SPDX License List 3.16
-    | GFDL_1_2_invariants_or_later -- ^ @GFDL-1.2-invariants-or-later@, GNU Free Documentation License v1.2 or later - invariants, SPDX License List 3.10, SPDX License List 3.16
-    | GFDL_1_2_no_invariants_only -- ^ @GFDL-1.2-no-invariants-only@, GNU Free Documentation License v1.2 only - no invariants, SPDX License List 3.10, SPDX License List 3.16
-    | GFDL_1_2_no_invariants_or_later -- ^ @GFDL-1.2-no-invariants-or-later@, GNU Free Documentation License v1.2 or later - no invariants, SPDX License List 3.10, SPDX License List 3.16
+    | GFDL_1_2_invariants_only -- ^ @GFDL-1.2-invariants-only@, GNU Free Documentation License v1.2 only - invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GFDL_1_2_invariants_or_later -- ^ @GFDL-1.2-invariants-or-later@, GNU Free Documentation License v1.2 or later - invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GFDL_1_2_no_invariants_only -- ^ @GFDL-1.2-no-invariants-only@, GNU Free Documentation License v1.2 only - no invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GFDL_1_2_no_invariants_or_later -- ^ @GFDL-1.2-no-invariants-or-later@, GNU Free Documentation License v1.2 or later - no invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | GFDL_1_2_only -- ^ @GFDL-1.2-only@, GNU Free Documentation License v1.2 only
     | GFDL_1_2_or_later -- ^ @GFDL-1.2-or-later@, GNU Free Documentation License v1.2 or later
-    | GFDL_1_3_invariants_only -- ^ @GFDL-1.3-invariants-only@, GNU Free Documentation License v1.3 only - invariants, SPDX License List 3.10, SPDX License List 3.16
-    | GFDL_1_3_invariants_or_later -- ^ @GFDL-1.3-invariants-or-later@, GNU Free Documentation License v1.3 or later - invariants, SPDX License List 3.10, SPDX License List 3.16
-    | GFDL_1_3_no_invariants_only -- ^ @GFDL-1.3-no-invariants-only@, GNU Free Documentation License v1.3 only - no invariants, SPDX License List 3.10, SPDX License List 3.16
-    | GFDL_1_3_no_invariants_or_later -- ^ @GFDL-1.3-no-invariants-or-later@, GNU Free Documentation License v1.3 or later - no invariants, SPDX License List 3.10, SPDX License List 3.16
+    | GFDL_1_3_invariants_only -- ^ @GFDL-1.3-invariants-only@, GNU Free Documentation License v1.3 only - invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GFDL_1_3_invariants_or_later -- ^ @GFDL-1.3-invariants-or-later@, GNU Free Documentation License v1.3 or later - invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GFDL_1_3_no_invariants_only -- ^ @GFDL-1.3-no-invariants-only@, GNU Free Documentation License v1.3 only - no invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GFDL_1_3_no_invariants_or_later -- ^ @GFDL-1.3-no-invariants-or-later@, GNU Free Documentation License v1.3 or later - no invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | GFDL_1_3_only -- ^ @GFDL-1.3-only@, GNU Free Documentation License v1.3 only
     | GFDL_1_3_or_later -- ^ @GFDL-1.3-or-later@, GNU Free Documentation License v1.3 or later
     | Giftware -- ^ @Giftware@, Giftware License
     | GL2PS -- ^ @GL2PS@, GL2PS License
     | Glide -- ^ @Glide@, 3dfx Glide License
     | Glulxe -- ^ @Glulxe@, Glulxe License
-    | GLWTPL -- ^ @GLWTPL@, Good Luck With That Public License, SPDX License List 3.10, SPDX License List 3.16
+    | GLWTPL -- ^ @GLWTPL@, Good Luck With That Public License, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | Gnuplot -- ^ @gnuplot@, gnuplot License
     | GPL_1_0_only -- ^ @GPL-1.0-only@, GNU General Public License v1.0 only
     | GPL_1_0_or_later -- ^ @GPL-1.0-or-later@, GNU General Public License v1.0 or later
@@ -257,14 +275,21 @@ data LicenseId
     | GPL_2_0_or_later -- ^ @GPL-2.0-or-later@, GNU General Public License v2.0 or later
     | GPL_3_0_only -- ^ @GPL-3.0-only@, GNU General Public License v3.0 only
     | GPL_3_0_or_later -- ^ @GPL-3.0-or-later@, GNU General Public License v3.0 or later
+    | Graphics_Gems -- ^ @Graphics-Gems@, Graphics Gems License, SPDX License List 3.20
     | GSOAP_1_3b -- ^ @gSOAP-1.3b@, gSOAP Public License v1.3b
     | HaskellReport -- ^ @HaskellReport@, Haskell Language Report License
-    | Hippocratic_2_1 -- ^ @Hippocratic-2.1@, Hippocratic License 2.1, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | HPND_sell_variant -- ^ @HPND-sell-variant@, Historical Permission Notice and Disclaimer - sell variant, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | Hippocratic_2_1 -- ^ @Hippocratic-2.1@, Hippocratic License 2.1, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | HP_1986 -- ^ @HP-1986@, Hewlett-Packard 1986 License, SPDX License List 3.20
+    | HPND_export_US -- ^ @HPND-export-US@, HPND with US Government export control warning, SPDX License List 3.20
+    | HPND_Markus_Kuhn -- ^ @HPND-Markus-Kuhn@, Historical Permission Notice and Disclaimer - Markus Kuhn variant, SPDX License List 3.20
+    | HPND_sell_variant_MIT_disclaimer -- ^ @HPND-sell-variant-MIT-disclaimer@, HPND sell variant with MIT disclaimer, SPDX License List 3.20
+    | HPND_sell_variant -- ^ @HPND-sell-variant@, Historical Permission Notice and Disclaimer - sell variant, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | HPND -- ^ @HPND@, Historical Permission Notice and Disclaimer
-    | HTMLTIDY -- ^ @HTMLTIDY@, HTML Tidy License, SPDX License List 3.16
+    | HTMLTIDY -- ^ @HTMLTIDY@, HTML Tidy License, SPDX License List 3.16, SPDX License List 3.20
     | IBM_pibs -- ^ @IBM-pibs@, IBM PowerPC Initialization and Boot Software
     | ICU -- ^ @ICU@, ICU License
+    | IEC_Code_Components_EULA -- ^ @IEC-Code-Components-EULA@, IEC    Code Components End-user licence agreement, SPDX License List 3.20
+    | IJG_short -- ^ @IJG-short@, Independent JPEG Group License - short, SPDX License List 3.20
     | IJG -- ^ @IJG@, Independent JPEG Group License
     | ImageMagick -- ^ @ImageMagick@, ImageMagick License
     | IMatix -- ^ @iMatix@, iMatix Standard Function Library Agreement
@@ -276,10 +301,13 @@ data LicenseId
     | IPA -- ^ @IPA@, IPA Font License
     | IPL_1_0 -- ^ @IPL-1.0@, IBM Public License v1.0
     | ISC -- ^ @ISC@, ISC License
-    | Jam -- ^ @Jam@, Jam License, SPDX License List 3.16
+    | Jam -- ^ @Jam@, Jam License, SPDX License List 3.16, SPDX License List 3.20
     | JasPer_2_0 -- ^ @JasPer-2.0@, JasPer License
-    | JPNIC -- ^ @JPNIC@, Japan Network Information Center License, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | JPL_image -- ^ @JPL-image@, JPL Image Use Policy, SPDX License List 3.20
+    | JPNIC -- ^ @JPNIC@, Japan Network Information Center License, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | JSON -- ^ @JSON@, JSON License
+    | Kazlib -- ^ @Kazlib@, Kazlib License, SPDX License List 3.20
+    | Knuth_CTAN -- ^ @Knuth-CTAN@, Knuth CTAN License, SPDX License List 3.20
     | LAL_1_2 -- ^ @LAL-1.2@, Licence Art Libre 1.2
     | LAL_1_3 -- ^ @LAL-1.3@, Licence Art Libre 1.3
     | Latex2e -- ^ @Latex2e@, Latex2e License
@@ -291,15 +319,17 @@ data LicenseId
     | LGPL_3_0_only -- ^ @LGPL-3.0-only@, GNU Lesser General Public License v3.0 only
     | LGPL_3_0_or_later -- ^ @LGPL-3.0-or-later@, GNU Lesser General Public License v3.0 or later
     | LGPLLR -- ^ @LGPLLR@, Lesser General Public License For Linguistic Resources
-    | Libpng_2_0 -- ^ @libpng-2.0@, PNG Reference Library version 2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | Libpng_2_0 -- ^ @libpng-2.0@, PNG Reference Library version 2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | Libpng -- ^ @Libpng@, libpng License
-    | Libselinux_1_0 -- ^ @libselinux-1.0@, libselinux public domain notice, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | Libselinux_1_0 -- ^ @libselinux-1.0@, libselinux public domain notice, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | Libtiff -- ^ @libtiff@, libtiff License
+    | Libutil_David_Nugent -- ^ @libutil-David-Nugent@, libutil David Nugent License, SPDX License List 3.20
     | LiLiQ_P_1_1 -- ^ @LiLiQ-P-1.1@, Licence Libre du Québec – Permissive version 1.1
     | LiLiQ_R_1_1 -- ^ @LiLiQ-R-1.1@, Licence Libre du Québec – Réciprocité version 1.1
     | LiLiQ_Rplus_1_1 -- ^ @LiLiQ-Rplus-1.1@, Licence Libre du Québec – Réciprocité forte version 1.1
-    | Linux_man_pages_copyleft -- ^ @Linux-man-pages-copyleft@, Linux man-pages Copyleft, SPDX License List 3.16
-    | Linux_OpenIB -- ^ @Linux-OpenIB@, Linux Kernel Variant of OpenIB.org license, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | Linux_man_pages_copyleft -- ^ @Linux-man-pages-copyleft@, Linux man-pages Copyleft, SPDX License List 3.16, SPDX License List 3.20
+    | Linux_OpenIB -- ^ @Linux-OpenIB@, Linux Kernel Variant of OpenIB.org license, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | LOOP -- ^ @LOOP@, Common Lisp LOOP License, SPDX License List 3.20
     | LPL_1_02 -- ^ @LPL-1.02@, Lucent Public License v1.02
     | LPL_1_0 -- ^ @LPL-1.0@, Lucent Public License Version 1.0
     | LPPL_1_0 -- ^ @LPPL-1.0@, LaTeX Project Public License v1.0
@@ -307,44 +337,53 @@ data LicenseId
     | LPPL_1_2 -- ^ @LPPL-1.2@, LaTeX Project Public License v1.2
     | LPPL_1_3a -- ^ @LPPL-1.3a@, LaTeX Project Public License v1.3a
     | LPPL_1_3c -- ^ @LPPL-1.3c@, LaTeX Project Public License v1.3c
+    | LZMA_SDK_9_11_to_9_20 -- ^ @LZMA-SDK-9.11-to-9.20@, LZMA SDK License (versions 9.11 to 9.20), SPDX License List 3.20
+    | LZMA_SDK_9_22 -- ^ @LZMA-SDK-9.22@, LZMA SDK License (versions 9.22 and beyond), SPDX License List 3.20
     | MakeIndex -- ^ @MakeIndex@, MakeIndex License
+    | Martin_Birgmeier -- ^ @Martin-Birgmeier@, Martin Birgmeier License, SPDX License List 3.20
+    | Minpack -- ^ @Minpack@, Minpack License, SPDX License List 3.20
     | MirOS -- ^ @MirOS@, The MirOS Licence
-    | MIT_0 -- ^ @MIT-0@, MIT No Attribution, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | MIT_0 -- ^ @MIT-0@, MIT No Attribution, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | MIT_advertising -- ^ @MIT-advertising@, Enlightenment License (e16)
     | MIT_CMU -- ^ @MIT-CMU@, CMU License
     | MIT_enna -- ^ @MIT-enna@, enna License
     | MIT_feh -- ^ @MIT-feh@, feh License
-    | MIT_Modern_Variant -- ^ @MIT-Modern-Variant@, MIT License Modern Variant, SPDX License List 3.16
-    | MIT_open_group -- ^ @MIT-open-group@, MIT Open Group variant, SPDX License List 3.16
+    | MIT_Modern_Variant -- ^ @MIT-Modern-Variant@, MIT License Modern Variant, SPDX License List 3.16, SPDX License List 3.20
+    | MIT_open_group -- ^ @MIT-open-group@, MIT Open Group variant, SPDX License List 3.16, SPDX License List 3.20
+    | MIT_Wu -- ^ @MIT-Wu@, MIT Tom Wu Variant, SPDX License List 3.20
     | MITNFA -- ^ @MITNFA@, MIT +no-false-attribs license
     | MIT -- ^ @MIT@, MIT License
     | Motosoto -- ^ @Motosoto@, Motosoto License
+    | Mpi_permissive -- ^ @mpi-permissive@, mpi Permissive License, SPDX License List 3.20
     | Mpich2 -- ^ @mpich2@, mpich2 License
     | MPL_1_0 -- ^ @MPL-1.0@, Mozilla Public License 1.0
     | MPL_1_1 -- ^ @MPL-1.1@, Mozilla Public License 1.1
     | MPL_2_0_no_copyleft_exception -- ^ @MPL-2.0-no-copyleft-exception@, Mozilla Public License 2.0 (no copyleft exception)
     | MPL_2_0 -- ^ @MPL-2.0@, Mozilla Public License 2.0
+    | Mplus -- ^ @mplus@, mplus Font License, SPDX License List 3.20
+    | MS_LPL -- ^ @MS-LPL@, Microsoft Limited Public License, SPDX License List 3.20
     | MS_PL -- ^ @MS-PL@, Microsoft Public License
     | MS_RL -- ^ @MS-RL@, Microsoft Reciprocal License
     | MTLL -- ^ @MTLL@, Matrix Template Library License
-    | MulanPSL_1_0 -- ^ @MulanPSL-1.0@, Mulan Permissive Software License, Version 1, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | MulanPSL_2_0 -- ^ @MulanPSL-2.0@, Mulan Permissive Software License, Version 2, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | MulanPSL_1_0 -- ^ @MulanPSL-1.0@, Mulan Permissive Software License, Version 1, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | MulanPSL_2_0 -- ^ @MulanPSL-2.0@, Mulan Permissive Software License, Version 2, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | Multics -- ^ @Multics@, Multics License
     | Mup -- ^ @Mup@, Mup License
-    | NAIST_2003 -- ^ @NAIST-2003@, Nara Institute of Science and Technology License (2003), SPDX License List 3.16
+    | NAIST_2003 -- ^ @NAIST-2003@, Nara Institute of Science and Technology License (2003), SPDX License List 3.16, SPDX License List 3.20
     | NASA_1_3 -- ^ @NASA-1.3@, NASA Open Source Agreement 1.3
     | Naumen -- ^ @Naumen@, Naumen Public License
     | NBPL_1_0 -- ^ @NBPL-1.0@, Net Boolean Public License v1
-    | NCGL_UK_2_0 -- ^ @NCGL-UK-2.0@, Non-Commercial Government Licence, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | NCGL_UK_2_0 -- ^ @NCGL-UK-2.0@, Non-Commercial Government Licence, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | NCSA -- ^ @NCSA@, University of Illinois/NCSA Open Source License
     | Net_SNMP -- ^ @Net-SNMP@, Net-SNMP License
     | NetCDF -- ^ @NetCDF@, NetCDF license
     | Newsletr -- ^ @Newsletr@, Newsletr License
     | NGPL -- ^ @NGPL@, Nethack General Public License
-    | NIST_PD_fallback -- ^ @NIST-PD-fallback@, NIST Public Domain Notice with license fallback, SPDX License List 3.10, SPDX License List 3.16
-    | NIST_PD -- ^ @NIST-PD@, NIST Public Domain Notice, SPDX License List 3.10, SPDX License List 3.16
+    | NICTA_1_0 -- ^ @NICTA-1.0@, NICTA Public Software License, Version 1.0, SPDX License List 3.20
+    | NIST_PD_fallback -- ^ @NIST-PD-fallback@, NIST Public Domain Notice with license fallback, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | NIST_PD -- ^ @NIST-PD@, NIST Public Domain Notice, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | NLOD_1_0 -- ^ @NLOD-1.0@, Norwegian Licence for Open Government Data (NLOD) 1.0
-    | NLOD_2_0 -- ^ @NLOD-2.0@, Norwegian Licence for Open Government Data (NLOD) 2.0, SPDX License List 3.16
+    | NLOD_2_0 -- ^ @NLOD-2.0@, Norwegian Licence for Open Government Data (NLOD) 2.0, SPDX License List 3.16, SPDX License List 3.20
     | NLPL -- ^ @NLPL@, No Limit Public License
     | Nokia -- ^ @Nokia@, Nokia Open Source License
     | NOSL -- ^ @NOSL@, Netizen Open Source License
@@ -353,25 +392,26 @@ data LicenseId
     | NPL_1_1 -- ^ @NPL-1.1@, Netscape Public License v1.1
     | NPOSL_3_0 -- ^ @NPOSL-3.0@, Non-Profit Open Software License 3.0
     | NRL -- ^ @NRL@, NRL License
-    | NTP_0 -- ^ @NTP-0@, NTP No Attribution, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | NTP_0 -- ^ @NTP-0@, NTP No Attribution, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | NTP -- ^ @NTP@, NTP License
-    | O_UDA_1_0 -- ^ @O-UDA-1.0@, Open Use of Data Agreement v1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | O_UDA_1_0 -- ^ @O-UDA-1.0@, Open Use of Data Agreement v1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | OCCT_PL -- ^ @OCCT-PL@, Open CASCADE Technology Public License
     | OCLC_2_0 -- ^ @OCLC-2.0@, OCLC Research Public License 2.0
     | ODbL_1_0 -- ^ @ODbL-1.0@, Open Data Commons Open Database License v1.0
-    | ODC_By_1_0 -- ^ @ODC-By-1.0@, Open Data Commons Attribution License v1.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | OFL_1_0_no_RFN -- ^ @OFL-1.0-no-RFN@, SIL Open Font License 1.0 with no Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | OFL_1_0_RFN -- ^ @OFL-1.0-RFN@, SIL Open Font License 1.0 with Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | ODC_By_1_0 -- ^ @ODC-By-1.0@, Open Data Commons Attribution License v1.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | OFFIS -- ^ @OFFIS@, OFFIS License, SPDX License List 3.20
+    | OFL_1_0_no_RFN -- ^ @OFL-1.0-no-RFN@, SIL Open Font License 1.0 with no Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | OFL_1_0_RFN -- ^ @OFL-1.0-RFN@, SIL Open Font License 1.0 with Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | OFL_1_0 -- ^ @OFL-1.0@, SIL Open Font License 1.0
-    | OFL_1_1_no_RFN -- ^ @OFL-1.1-no-RFN@, SIL Open Font License 1.1 with no Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | OFL_1_1_RFN -- ^ @OFL-1.1-RFN@, SIL Open Font License 1.1 with Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | OFL_1_1_no_RFN -- ^ @OFL-1.1-no-RFN@, SIL Open Font License 1.1 with no Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | OFL_1_1_RFN -- ^ @OFL-1.1-RFN@, SIL Open Font License 1.1 with Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | OFL_1_1 -- ^ @OFL-1.1@, SIL Open Font License 1.1
-    | OGC_1_0 -- ^ @OGC-1.0@, OGC Software License, Version 1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | OGDL_Taiwan_1_0 -- ^ @OGDL-Taiwan-1.0@, Taiwan Open Government Data License, version 1.0, SPDX License List 3.16
-    | OGL_Canada_2_0 -- ^ @OGL-Canada-2.0@, Open Government Licence - Canada, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | OGL_UK_1_0 -- ^ @OGL-UK-1.0@, Open Government Licence v1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | OGL_UK_2_0 -- ^ @OGL-UK-2.0@, Open Government Licence v2.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | OGL_UK_3_0 -- ^ @OGL-UK-3.0@, Open Government Licence v3.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | OGC_1_0 -- ^ @OGC-1.0@, OGC Software License, Version 1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | OGDL_Taiwan_1_0 -- ^ @OGDL-Taiwan-1.0@, Taiwan Open Government Data License, version 1.0, SPDX License List 3.16, SPDX License List 3.20
+    | OGL_Canada_2_0 -- ^ @OGL-Canada-2.0@, Open Government Licence - Canada, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | OGL_UK_1_0 -- ^ @OGL-UK-1.0@, Open Government Licence v1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | OGL_UK_2_0 -- ^ @OGL-UK-2.0@, Open Government Licence v2.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | OGL_UK_3_0 -- ^ @OGL-UK-3.0@, Open Government Licence v3.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | OGTSL -- ^ @OGTSL@, Open Group Test Suite License
     | OLDAP_1_1 -- ^ @OLDAP-1.1@, Open LDAP Public License v1.1
     | OLDAP_1_2 -- ^ @OLDAP-1.2@, Open LDAP Public License v1.2
@@ -390,29 +430,32 @@ data LicenseId
     | OLDAP_2_7 -- ^ @OLDAP-2.7@, Open LDAP Public License v2.7
     | OLDAP_2_8 -- ^ @OLDAP-2.8@, Open LDAP Public License v2.8
     | OML -- ^ @OML@, Open Market License
+    | OpenPBS_2_3 -- ^ @OpenPBS-2.3@, OpenPBS v2.3 Software License, SPDX License List 3.20
     | OpenSSL -- ^ @OpenSSL@, OpenSSL License
     | OPL_1_0 -- ^ @OPL-1.0@, Open Public License v1.0
-    | OPUBL_1_0 -- ^ @OPUBL-1.0@, Open Publication License v1.0, SPDX License List 3.16
+    | OPUBL_1_0 -- ^ @OPUBL-1.0@, Open Publication License v1.0, SPDX License List 3.16, SPDX License List 3.20
     | OSET_PL_2_1 -- ^ @OSET-PL-2.1@, OSET Public License version 2.1
     | OSL_1_0 -- ^ @OSL-1.0@, Open Software License 1.0
     | OSL_1_1 -- ^ @OSL-1.1@, Open Software License 1.1
     | OSL_2_0 -- ^ @OSL-2.0@, Open Software License 2.0
     | OSL_2_1 -- ^ @OSL-2.1@, Open Software License 2.1
     | OSL_3_0 -- ^ @OSL-3.0@, Open Software License 3.0
-    | Parity_6_0_0 -- ^ @Parity-6.0.0@, The Parity Public License 6.0.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | Parity_7_0_0 -- ^ @Parity-7.0.0@, The Parity Public License 7.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | Parity_6_0_0 -- ^ @Parity-6.0.0@, The Parity Public License 6.0.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | Parity_7_0_0 -- ^ @Parity-7.0.0@, The Parity Public License 7.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | PDDL_1_0 -- ^ @PDDL-1.0@, Open Data Commons Public Domain Dedication & License 1.0
     | PHP_3_01 -- ^ @PHP-3.01@, PHP License v3.01
     | PHP_3_0 -- ^ @PHP-3.0@, PHP License v3.0
     | Plexus -- ^ @Plexus@, Plexus Classworlds License
-    | PolyForm_Noncommercial_1_0_0 -- ^ @PolyForm-Noncommercial-1.0.0@, PolyForm Noncommercial License 1.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | PolyForm_Small_Business_1_0_0 -- ^ @PolyForm-Small-Business-1.0.0@, PolyForm Small Business License 1.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | PolyForm_Noncommercial_1_0_0 -- ^ @PolyForm-Noncommercial-1.0.0@, PolyForm Noncommercial License 1.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | PolyForm_Small_Business_1_0_0 -- ^ @PolyForm-Small-Business-1.0.0@, PolyForm Small Business License 1.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | PostgreSQL -- ^ @PostgreSQL@, PostgreSQL License
-    | PSF_2_0 -- ^ @PSF-2.0@, Python Software Foundation License 2.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | PSF_2_0 -- ^ @PSF-2.0@, Python Software Foundation License 2.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | Psfrag -- ^ @psfrag@, psfrag License
     | Psutils -- ^ @psutils@, psutils License
+    | Python_2_0_1 -- ^ @Python-2.0.1@, Python License 2.0.1, SPDX License List 3.20
     | Python_2_0 -- ^ @Python-2.0@, Python License 2.0
     | Qhull -- ^ @Qhull@, Qhull License
+    | QPL_1_0_INRIA_2004 -- ^ @QPL-1.0-INRIA-2004@, Q Public License 1.0 - INRIA 2004 variant, SPDX License List 3.20
     | QPL_1_0 -- ^ @QPL-1.0@, Q Public License 1.0
     | Rdisc -- ^ @Rdisc@, Rdisc License
     | RHeCos_1_1 -- ^ @RHeCos-1.1@, Red Hat eCos Public License v1.1
@@ -425,14 +468,14 @@ data LicenseId
     | SAX_PD -- ^ @SAX-PD@, Sax Public Domain Notice
     | Saxpath -- ^ @Saxpath@, Saxpath License
     | SCEA -- ^ @SCEA@, SCEA Shared Source License
-    | SchemeReport -- ^ @SchemeReport@, Scheme Language Report License, SPDX License List 3.16
-    | Sendmail_8_23 -- ^ @Sendmail-8.23@, Sendmail License 8.23, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | SchemeReport -- ^ @SchemeReport@, Scheme Language Report License, SPDX License List 3.16, SPDX License List 3.20
+    | Sendmail_8_23 -- ^ @Sendmail-8.23@, Sendmail License 8.23, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | Sendmail -- ^ @Sendmail@, Sendmail License
     | SGI_B_1_0 -- ^ @SGI-B-1.0@, SGI Free Software License B v1.0
     | SGI_B_1_1 -- ^ @SGI-B-1.1@, SGI Free Software License B v1.1
     | SGI_B_2_0 -- ^ @SGI-B-2.0@, SGI Free Software License B v2.0
-    | SHL_0_51 -- ^ @SHL-0.51@, Solderpad Hardware License, Version 0.51, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | SHL_0_5 -- ^ @SHL-0.5@, Solderpad Hardware License v0.5, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | SHL_0_51 -- ^ @SHL-0.51@, Solderpad Hardware License, Version 0.51, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | SHL_0_5 -- ^ @SHL-0.5@, Solderpad Hardware License v0.5, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | SimPL_2_0 -- ^ @SimPL-2.0@, Simple Public License 2.0
     | SISSL_1_2 -- ^ @SISSL-1.2@, Sun Industry Standards Source License v1.2
     | SISSL -- ^ @SISSL@, Sun Industry Standards Source License v1.1
@@ -440,24 +483,31 @@ data LicenseId
     | SMLNJ -- ^ @SMLNJ@, Standard ML of New Jersey License
     | SMPPL -- ^ @SMPPL@, Secure Messaging Protocol Public License
     | SNIA -- ^ @SNIA@, SNIA Public License 1.1
+    | Snprintf -- ^ @snprintf@, snprintf License, SPDX License List 3.20
     | Spencer_86 -- ^ @Spencer-86@, Spencer License 86
     | Spencer_94 -- ^ @Spencer-94@, Spencer License 94
     | Spencer_99 -- ^ @Spencer-99@, Spencer License 99
     | SPL_1_0 -- ^ @SPL-1.0@, Sun Public License v1.0
-    | SSH_OpenSSH -- ^ @SSH-OpenSSH@, SSH OpenSSH license, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | SSH_short -- ^ @SSH-short@, SSH short notice, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | SSPL_1_0 -- ^ @SSPL-1.0@, Server Side Public License, v 1, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | SSH_OpenSSH -- ^ @SSH-OpenSSH@, SSH OpenSSH license, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | SSH_short -- ^ @SSH-short@, SSH short notice, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | SSPL_1_0 -- ^ @SSPL-1.0@, Server Side Public License, v 1, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | SugarCRM_1_1_3 -- ^ @SugarCRM-1.1.3@, SugarCRM Public License v1.1.3
+    | SunPro -- ^ @SunPro@, SunPro License, SPDX License List 3.20
     | SWL -- ^ @SWL@, Scheme Widget Library (SWL) Software License Agreement
-    | TAPR_OHL_1_0 -- ^ @TAPR-OHL-1.0@, TAPR Open Hardware License v1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | Symlinks -- ^ @Symlinks@, Symlinks License, SPDX License List 3.20
+    | TAPR_OHL_1_0 -- ^ @TAPR-OHL-1.0@, TAPR Open Hardware License v1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | TCL -- ^ @TCL@, TCL/TK License
     | TCP_wrappers -- ^ @TCP-wrappers@, TCP Wrappers License
     | TMate -- ^ @TMate@, TMate Open Source License
     | TORQUE_1_1 -- ^ @TORQUE-1.1@, TORQUE v2.5+ Software License v1.1
     | TOSL -- ^ @TOSL@, Trusster Open Source License
-    | TU_Berlin_1_0 -- ^ @TU-Berlin-1.0@, Technische Universitaet Berlin License 1.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | TU_Berlin_2_0 -- ^ @TU-Berlin-2.0@, Technische Universitaet Berlin License 2.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
-    | UCL_1_0 -- ^ @UCL-1.0@, Upstream Compatibility License v1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | TPDL -- ^ @TPDL@, Time::ParseDate License, SPDX License List 3.20
+    | TPL_1_0 -- ^ @TPL-1.0@, THOR Public License 1.0, SPDX License List 3.20
+    | TTWL -- ^ @TTWL@, Text-Tabs+Wrap License, SPDX License List 3.20
+    | TU_Berlin_1_0 -- ^ @TU-Berlin-1.0@, Technische Universitaet Berlin License 1.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | TU_Berlin_2_0 -- ^ @TU-Berlin-2.0@, Technische Universitaet Berlin License 2.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | UCAR -- ^ @UCAR@, UCAR License, SPDX License List 3.20
+    | UCL_1_0 -- ^ @UCL-1.0@, Upstream Compatibility License v1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
     | Unicode_DFS_2015 -- ^ @Unicode-DFS-2015@, Unicode License Agreement - Data Files and Software (2015)
     | Unicode_DFS_2016 -- ^ @Unicode-DFS-2016@, Unicode License Agreement - Data Files and Software (2016)
     | Unicode_TOU -- ^ @Unicode-TOU@, Unicode Terms of Use
@@ -469,14 +519,16 @@ data LicenseId
     | W3C_19980720 -- ^ @W3C-19980720@, W3C Software Notice and License (1998-07-20)
     | W3C_20150513 -- ^ @W3C-20150513@, W3C Software Notice and Document License (2015-05-13)
     | W3C -- ^ @W3C@, W3C Software Notice and License (2002-12-31)
+    | W3m -- ^ @w3m@, w3m License, SPDX License List 3.20
     | Watcom_1_0 -- ^ @Watcom-1.0@, Sybase Open Watcom Public License 1.0
     | Wsuipa -- ^ @Wsuipa@, Wsuipa License
     | WTFPL -- ^ @WTFPL@, Do What The F*ck You Want To Public License
-    | X11_distribute_modifications_variant -- ^ @X11-distribute-modifications-variant@, X11 License Distribution Modification Variant, SPDX License List 3.16
+    | X11_distribute_modifications_variant -- ^ @X11-distribute-modifications-variant@, X11 License Distribution Modification Variant, SPDX License List 3.16, SPDX License List 3.20
     | X11 -- ^ @X11@, X11 License
     | Xerox -- ^ @Xerox@, Xerox License
     | XFree86_1_1 -- ^ @XFree86-1.1@, XFree86 License 1.1
     | Xinetd -- ^ @xinetd@, xinetd License
+    | Xlock -- ^ @xlock@, xlock License, SPDX License List 3.20
     | Xnet -- ^ @Xnet@, X.Net License
     | Xpp -- ^ @xpp@, XPP License
     | XSkat -- ^ @XSkat@, XSkat License
@@ -576,6 +628,7 @@ licenseId :: LicenseId -> String
 licenseId NullBSD = "0BSD"
 licenseId AAL = "AAL"
 licenseId Abstyles = "Abstyles"
+licenseId AdaCore_doc = "AdaCore-doc"
 licenseId Adobe_2006 = "Adobe-2006"
 licenseId Adobe_Glyph = "Adobe-Glyph"
 licenseId ADSL = "ADSL"
@@ -606,18 +659,23 @@ licenseId APSL_1_0 = "APSL-1.0"
 licenseId APSL_1_1 = "APSL-1.1"
 licenseId APSL_1_2 = "APSL-1.2"
 licenseId APSL_2_0 = "APSL-2.0"
+licenseId Arphic_1999 = "Arphic-1999"
 licenseId Artistic_1_0_cl8 = "Artistic-1.0-cl8"
 licenseId Artistic_1_0_Perl = "Artistic-1.0-Perl"
 licenseId Artistic_1_0 = "Artistic-1.0"
 licenseId Artistic_2_0 = "Artistic-2.0"
+licenseId Baekmuk = "Baekmuk"
 licenseId Bahyph = "Bahyph"
 licenseId Barr = "Barr"
 licenseId Beerware = "Beerware"
+licenseId Bitstream_Charter = "Bitstream-Charter"
+licenseId Bitstream_Vera = "Bitstream-Vera"
 licenseId BitTorrent_1_0 = "BitTorrent-1.0"
 licenseId BitTorrent_1_1 = "BitTorrent-1.1"
 licenseId Blessing = "blessing"
 licenseId BlueOak_1_0_0 = "BlueOak-1.0.0"
 licenseId Borceux = "Borceux"
+licenseId Brian_Gladman_3_Clause = "Brian-Gladman-3-Clause"
 licenseId BSD_1_Clause = "BSD-1-Clause"
 licenseId BSD_2_Clause_FreeBSD = "BSD-2-Clause-FreeBSD"
 licenseId BSD_2_Clause_NetBSD = "BSD-2-Clause-NetBSD"
@@ -637,6 +695,10 @@ licenseId BSD_3_Clause = "BSD-3-Clause"
 licenseId BSD_4_Clause_Shortened = "BSD-4-Clause-Shortened"
 licenseId BSD_4_Clause_UC = "BSD-4-Clause-UC"
 licenseId BSD_4_Clause = "BSD-4-Clause"
+licenseId BSD_4_3RENO = "BSD-4.3RENO"
+licenseId BSD_4_3TAHOE = "BSD-4.3TAHOE"
+licenseId BSD_Advertising_Acknowledgement = "BSD-Advertising-Acknowledgement"
+licenseId BSD_Attribution_HPND_disclaimer = "BSD-Attribution-HPND-disclaimer"
 licenseId BSD_Protection = "BSD-Protection"
 licenseId BSD_Source_Code = "BSD-Source-Code"
 licenseId BSL_1_0 = "BSL-1.0"
@@ -654,6 +716,7 @@ licenseId CC_BY_2_5_AU = "CC-BY-2.5-AU"
 licenseId CC_BY_2_5 = "CC-BY-2.5"
 licenseId CC_BY_3_0_AT = "CC-BY-3.0-AT"
 licenseId CC_BY_3_0_DE = "CC-BY-3.0-DE"
+licenseId CC_BY_3_0_IGO = "CC-BY-3.0-IGO"
 licenseId CC_BY_3_0_NL = "CC-BY-3.0-NL"
 licenseId CC_BY_3_0_US = "CC-BY-3.0-US"
 licenseId CC_BY_3_0 = "CC-BY-3.0"
@@ -672,6 +735,7 @@ licenseId CC_BY_NC_ND_3_0_IGO = "CC-BY-NC-ND-3.0-IGO"
 licenseId CC_BY_NC_ND_3_0 = "CC-BY-NC-ND-3.0"
 licenseId CC_BY_NC_ND_4_0 = "CC-BY-NC-ND-4.0"
 licenseId CC_BY_NC_SA_1_0 = "CC-BY-NC-SA-1.0"
+licenseId CC_BY_NC_SA_2_0_DE = "CC-BY-NC-SA-2.0-DE"
 licenseId CC_BY_NC_SA_2_0_FR = "CC-BY-NC-SA-2.0-FR"
 licenseId CC_BY_NC_SA_2_0_UK = "CC-BY-NC-SA-2.0-UK"
 licenseId CC_BY_NC_SA_2_0 = "CC-BY-NC-SA-2.0"
@@ -714,7 +778,11 @@ licenseId CERN_OHL_1_2 = "CERN-OHL-1.2"
 licenseId CERN_OHL_P_2_0 = "CERN-OHL-P-2.0"
 licenseId CERN_OHL_S_2_0 = "CERN-OHL-S-2.0"
 licenseId CERN_OHL_W_2_0 = "CERN-OHL-W-2.0"
+licenseId CFITSIO = "CFITSIO"
+licenseId Checkmk = "checkmk"
 licenseId ClArtistic = "ClArtistic"
+licenseId Clips = "Clips"
+licenseId CMU_Mach = "CMU-Mach"
 licenseId CNRI_Jython = "CNRI-Jython"
 licenseId CNRI_Python_GPL_Compatible = "CNRI-Python-GPL-Compatible"
 licenseId CNRI_Python = "CNRI-Python"
@@ -723,6 +791,7 @@ licenseId Community_Spec_1_0 = "Community-Spec-1.0"
 licenseId Condor_1_1 = "Condor-1.1"
 licenseId Copyleft_next_0_3_0 = "copyleft-next-0.3.0"
 licenseId Copyleft_next_0_3_1 = "copyleft-next-0.3.1"
+licenseId Cornell_Lossless_JPEG = "Cornell-Lossless-JPEG"
 licenseId CPAL_1_0 = "CPAL-1.0"
 licenseId CPL_1_0 = "CPL-1.0"
 licenseId CPOL_1_02 = "CPOL-1.02"
@@ -762,6 +831,7 @@ licenseId Frameworx_1_0 = "Frameworx-1.0"
 licenseId FreeBSD_DOC = "FreeBSD-DOC"
 licenseId FreeImage = "FreeImage"
 licenseId FSFAP = "FSFAP"
+licenseId FSFULLRWD = "FSFULLRWD"
 licenseId FSFULLR = "FSFULLR"
 licenseId FSFUL = "FSFUL"
 licenseId FTL = "FTL"
@@ -796,14 +866,21 @@ licenseId GPL_2_0_only = "GPL-2.0-only"
 licenseId GPL_2_0_or_later = "GPL-2.0-or-later"
 licenseId GPL_3_0_only = "GPL-3.0-only"
 licenseId GPL_3_0_or_later = "GPL-3.0-or-later"
+licenseId Graphics_Gems = "Graphics-Gems"
 licenseId GSOAP_1_3b = "gSOAP-1.3b"
 licenseId HaskellReport = "HaskellReport"
 licenseId Hippocratic_2_1 = "Hippocratic-2.1"
+licenseId HP_1986 = "HP-1986"
+licenseId HPND_export_US = "HPND-export-US"
+licenseId HPND_Markus_Kuhn = "HPND-Markus-Kuhn"
+licenseId HPND_sell_variant_MIT_disclaimer = "HPND-sell-variant-MIT-disclaimer"
 licenseId HPND_sell_variant = "HPND-sell-variant"
 licenseId HPND = "HPND"
 licenseId HTMLTIDY = "HTMLTIDY"
 licenseId IBM_pibs = "IBM-pibs"
 licenseId ICU = "ICU"
+licenseId IEC_Code_Components_EULA = "IEC-Code-Components-EULA"
+licenseId IJG_short = "IJG-short"
 licenseId IJG = "IJG"
 licenseId ImageMagick = "ImageMagick"
 licenseId IMatix = "iMatix"
@@ -817,8 +894,11 @@ licenseId IPL_1_0 = "IPL-1.0"
 licenseId ISC = "ISC"
 licenseId Jam = "Jam"
 licenseId JasPer_2_0 = "JasPer-2.0"
+licenseId JPL_image = "JPL-image"
 licenseId JPNIC = "JPNIC"
 licenseId JSON = "JSON"
+licenseId Kazlib = "Kazlib"
+licenseId Knuth_CTAN = "Knuth-CTAN"
 licenseId LAL_1_2 = "LAL-1.2"
 licenseId LAL_1_3 = "LAL-1.3"
 licenseId Latex2e = "Latex2e"
@@ -834,11 +914,13 @@ licenseId Libpng_2_0 = "libpng-2.0"
 licenseId Libpng = "Libpng"
 licenseId Libselinux_1_0 = "libselinux-1.0"
 licenseId Libtiff = "libtiff"
+licenseId Libutil_David_Nugent = "libutil-David-Nugent"
 licenseId LiLiQ_P_1_1 = "LiLiQ-P-1.1"
 licenseId LiLiQ_R_1_1 = "LiLiQ-R-1.1"
 licenseId LiLiQ_Rplus_1_1 = "LiLiQ-Rplus-1.1"
 licenseId Linux_man_pages_copyleft = "Linux-man-pages-copyleft"
 licenseId Linux_OpenIB = "Linux-OpenIB"
+licenseId LOOP = "LOOP"
 licenseId LPL_1_02 = "LPL-1.02"
 licenseId LPL_1_0 = "LPL-1.0"
 licenseId LPPL_1_0 = "LPPL-1.0"
@@ -846,7 +928,11 @@ licenseId LPPL_1_1 = "LPPL-1.1"
 licenseId LPPL_1_2 = "LPPL-1.2"
 licenseId LPPL_1_3a = "LPPL-1.3a"
 licenseId LPPL_1_3c = "LPPL-1.3c"
+licenseId LZMA_SDK_9_11_to_9_20 = "LZMA-SDK-9.11-to-9.20"
+licenseId LZMA_SDK_9_22 = "LZMA-SDK-9.22"
 licenseId MakeIndex = "MakeIndex"
+licenseId Martin_Birgmeier = "Martin-Birgmeier"
+licenseId Minpack = "Minpack"
 licenseId MirOS = "MirOS"
 licenseId MIT_0 = "MIT-0"
 licenseId MIT_advertising = "MIT-advertising"
@@ -855,14 +941,18 @@ licenseId MIT_enna = "MIT-enna"
 licenseId MIT_feh = "MIT-feh"
 licenseId MIT_Modern_Variant = "MIT-Modern-Variant"
 licenseId MIT_open_group = "MIT-open-group"
+licenseId MIT_Wu = "MIT-Wu"
 licenseId MITNFA = "MITNFA"
 licenseId MIT = "MIT"
 licenseId Motosoto = "Motosoto"
+licenseId Mpi_permissive = "mpi-permissive"
 licenseId Mpich2 = "mpich2"
 licenseId MPL_1_0 = "MPL-1.0"
 licenseId MPL_1_1 = "MPL-1.1"
 licenseId MPL_2_0_no_copyleft_exception = "MPL-2.0-no-copyleft-exception"
 licenseId MPL_2_0 = "MPL-2.0"
+licenseId Mplus = "mplus"
+licenseId MS_LPL = "MS-LPL"
 licenseId MS_PL = "MS-PL"
 licenseId MS_RL = "MS-RL"
 licenseId MTLL = "MTLL"
@@ -880,6 +970,7 @@ licenseId Net_SNMP = "Net-SNMP"
 licenseId NetCDF = "NetCDF"
 licenseId Newsletr = "Newsletr"
 licenseId NGPL = "NGPL"
+licenseId NICTA_1_0 = "NICTA-1.0"
 licenseId NIST_PD_fallback = "NIST-PD-fallback"
 licenseId NIST_PD = "NIST-PD"
 licenseId NLOD_1_0 = "NLOD-1.0"
@@ -899,6 +990,7 @@ licenseId OCCT_PL = "OCCT-PL"
 licenseId OCLC_2_0 = "OCLC-2.0"
 licenseId ODbL_1_0 = "ODbL-1.0"
 licenseId ODC_By_1_0 = "ODC-By-1.0"
+licenseId OFFIS = "OFFIS"
 licenseId OFL_1_0_no_RFN = "OFL-1.0-no-RFN"
 licenseId OFL_1_0_RFN = "OFL-1.0-RFN"
 licenseId OFL_1_0 = "OFL-1.0"
@@ -929,6 +1021,7 @@ licenseId OLDAP_2_6 = "OLDAP-2.6"
 licenseId OLDAP_2_7 = "OLDAP-2.7"
 licenseId OLDAP_2_8 = "OLDAP-2.8"
 licenseId OML = "OML"
+licenseId OpenPBS_2_3 = "OpenPBS-2.3"
 licenseId OpenSSL = "OpenSSL"
 licenseId OPL_1_0 = "OPL-1.0"
 licenseId OPUBL_1_0 = "OPUBL-1.0"
@@ -950,8 +1043,10 @@ licenseId PostgreSQL = "PostgreSQL"
 licenseId PSF_2_0 = "PSF-2.0"
 licenseId Psfrag = "psfrag"
 licenseId Psutils = "psutils"
+licenseId Python_2_0_1 = "Python-2.0.1"
 licenseId Python_2_0 = "Python-2.0"
 licenseId Qhull = "Qhull"
+licenseId QPL_1_0_INRIA_2004 = "QPL-1.0-INRIA-2004"
 licenseId QPL_1_0 = "QPL-1.0"
 licenseId Rdisc = "Rdisc"
 licenseId RHeCos_1_1 = "RHeCos-1.1"
@@ -979,6 +1074,7 @@ licenseId Sleepycat = "Sleepycat"
 licenseId SMLNJ = "SMLNJ"
 licenseId SMPPL = "SMPPL"
 licenseId SNIA = "SNIA"
+licenseId Snprintf = "snprintf"
 licenseId Spencer_86 = "Spencer-86"
 licenseId Spencer_94 = "Spencer-94"
 licenseId Spencer_99 = "Spencer-99"
@@ -987,15 +1083,21 @@ licenseId SSH_OpenSSH = "SSH-OpenSSH"
 licenseId SSH_short = "SSH-short"
 licenseId SSPL_1_0 = "SSPL-1.0"
 licenseId SugarCRM_1_1_3 = "SugarCRM-1.1.3"
+licenseId SunPro = "SunPro"
 licenseId SWL = "SWL"
+licenseId Symlinks = "Symlinks"
 licenseId TAPR_OHL_1_0 = "TAPR-OHL-1.0"
 licenseId TCL = "TCL"
 licenseId TCP_wrappers = "TCP-wrappers"
 licenseId TMate = "TMate"
 licenseId TORQUE_1_1 = "TORQUE-1.1"
 licenseId TOSL = "TOSL"
+licenseId TPDL = "TPDL"
+licenseId TPL_1_0 = "TPL-1.0"
+licenseId TTWL = "TTWL"
 licenseId TU_Berlin_1_0 = "TU-Berlin-1.0"
 licenseId TU_Berlin_2_0 = "TU-Berlin-2.0"
+licenseId UCAR = "UCAR"
 licenseId UCL_1_0 = "UCL-1.0"
 licenseId Unicode_DFS_2015 = "Unicode-DFS-2015"
 licenseId Unicode_DFS_2016 = "Unicode-DFS-2016"
@@ -1008,6 +1110,7 @@ licenseId VSL_1_0 = "VSL-1.0"
 licenseId W3C_19980720 = "W3C-19980720"
 licenseId W3C_20150513 = "W3C-20150513"
 licenseId W3C = "W3C"
+licenseId W3m = "w3m"
 licenseId Watcom_1_0 = "Watcom-1.0"
 licenseId Wsuipa = "Wsuipa"
 licenseId WTFPL = "WTFPL"
@@ -1016,6 +1119,7 @@ licenseId X11 = "X11"
 licenseId Xerox = "Xerox"
 licenseId XFree86_1_1 = "XFree86-1.1"
 licenseId Xinetd = "xinetd"
+licenseId Xlock = "xlock"
 licenseId Xnet = "Xnet"
 licenseId Xpp = "xpp"
 licenseId XSkat = "XSkat"
@@ -1036,6 +1140,7 @@ licenseName :: LicenseId -> String
 licenseName NullBSD = "BSD Zero Clause License"
 licenseName AAL = "Attribution Assurance License"
 licenseName Abstyles = "Abstyles License"
+licenseName AdaCore_doc = "AdaCore Doc License"
 licenseName Adobe_2006 = "Adobe Systems Incorporated Source Code License Agreement"
 licenseName Adobe_Glyph = "Adobe Glyph List License"
 licenseName ADSL = "Amazon Digital Services License"
@@ -1066,18 +1171,23 @@ licenseName APSL_1_0 = "Apple Public Source License 1.0"
 licenseName APSL_1_1 = "Apple Public Source License 1.1"
 licenseName APSL_1_2 = "Apple Public Source License 1.2"
 licenseName APSL_2_0 = "Apple Public Source License 2.0"
+licenseName Arphic_1999 = "Arphic Public License"
 licenseName Artistic_1_0_cl8 = "Artistic License 1.0 w/clause 8"
 licenseName Artistic_1_0_Perl = "Artistic License 1.0 (Perl)"
 licenseName Artistic_1_0 = "Artistic License 1.0"
 licenseName Artistic_2_0 = "Artistic License 2.0"
+licenseName Baekmuk = "Baekmuk License"
 licenseName Bahyph = "Bahyph License"
 licenseName Barr = "Barr License"
 licenseName Beerware = "Beerware License"
+licenseName Bitstream_Charter = "Bitstream Charter Font License"
+licenseName Bitstream_Vera = "Bitstream Vera Font License"
 licenseName BitTorrent_1_0 = "BitTorrent Open Source License v1.0"
 licenseName BitTorrent_1_1 = "BitTorrent Open Source License v1.1"
 licenseName Blessing = "SQLite Blessing"
 licenseName BlueOak_1_0_0 = "Blue Oak Model License 1.0.0"
 licenseName Borceux = "Borceux license"
+licenseName Brian_Gladman_3_Clause = "Brian Gladman 3-Clause License"
 licenseName BSD_1_Clause = "BSD 1-Clause License"
 licenseName BSD_2_Clause_FreeBSD = "BSD 2-Clause FreeBSD License"
 licenseName BSD_2_Clause_NetBSD = "BSD 2-Clause NetBSD License"
@@ -1097,6 +1207,10 @@ licenseName BSD_3_Clause = "BSD 3-Clause \"New\" or \"Revised\" License"
 licenseName BSD_4_Clause_Shortened = "BSD 4 Clause Shortened"
 licenseName BSD_4_Clause_UC = "BSD-4-Clause (University of California-Specific)"
 licenseName BSD_4_Clause = "BSD 4-Clause \"Original\" or \"Old\" License"
+licenseName BSD_4_3RENO = "BSD 4.3 RENO License"
+licenseName BSD_4_3TAHOE = "BSD 4.3 TAHOE License"
+licenseName BSD_Advertising_Acknowledgement = "BSD Advertising Acknowledgement License"
+licenseName BSD_Attribution_HPND_disclaimer = "BSD with Attribution and HPND disclaimer"
 licenseName BSD_Protection = "BSD Protection License"
 licenseName BSD_Source_Code = "BSD Source Code Attribution"
 licenseName BSL_1_0 = "Boost Software License 1.0"
@@ -1114,6 +1228,7 @@ licenseName CC_BY_2_5_AU = "Creative Commons Attribution 2.5 Australia"
 licenseName CC_BY_2_5 = "Creative Commons Attribution 2.5 Generic"
 licenseName CC_BY_3_0_AT = "Creative Commons Attribution 3.0 Austria"
 licenseName CC_BY_3_0_DE = "Creative Commons Attribution 3.0 Germany"
+licenseName CC_BY_3_0_IGO = "Creative Commons Attribution 3.0 IGO"
 licenseName CC_BY_3_0_NL = "Creative Commons Attribution 3.0 Netherlands"
 licenseName CC_BY_3_0_US = "Creative Commons Attribution 3.0 United States"
 licenseName CC_BY_3_0 = "Creative Commons Attribution 3.0 Unported"
@@ -1132,6 +1247,7 @@ licenseName CC_BY_NC_ND_3_0_IGO = "Creative Commons Attribution Non Commercial N
 licenseName CC_BY_NC_ND_3_0 = "Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported"
 licenseName CC_BY_NC_ND_4_0 = "Creative Commons Attribution Non Commercial No Derivatives 4.0 International"
 licenseName CC_BY_NC_SA_1_0 = "Creative Commons Attribution Non Commercial Share Alike 1.0 Generic"
+licenseName CC_BY_NC_SA_2_0_DE = "Creative Commons Attribution Non Commercial Share Alike 2.0 Germany"
 licenseName CC_BY_NC_SA_2_0_FR = "Creative Commons Attribution-NonCommercial-ShareAlike 2.0 France"
 licenseName CC_BY_NC_SA_2_0_UK = "Creative Commons Attribution Non Commercial Share Alike 2.0 England and Wales"
 licenseName CC_BY_NC_SA_2_0 = "Creative Commons Attribution Non Commercial Share Alike 2.0 Generic"
@@ -1174,7 +1290,11 @@ licenseName CERN_OHL_1_2 = "CERN Open Hardware Licence v1.2"
 licenseName CERN_OHL_P_2_0 = "CERN Open Hardware Licence Version 2 - Permissive"
 licenseName CERN_OHL_S_2_0 = "CERN Open Hardware Licence Version 2 - Strongly Reciprocal"
 licenseName CERN_OHL_W_2_0 = "CERN Open Hardware Licence Version 2 - Weakly Reciprocal"
+licenseName CFITSIO = "CFITSIO License"
+licenseName Checkmk = "Checkmk License"
 licenseName ClArtistic = "Clarified Artistic License"
+licenseName Clips = "Clips License"
+licenseName CMU_Mach = "CMU Mach License"
 licenseName CNRI_Jython = "CNRI Jython License"
 licenseName CNRI_Python_GPL_Compatible = "CNRI Python Open Source GPL Compatible License Agreement"
 licenseName CNRI_Python = "CNRI Python License"
@@ -1183,6 +1303,7 @@ licenseName Community_Spec_1_0 = "Community Specification License 1.0"
 licenseName Condor_1_1 = "Condor Public License v1.1"
 licenseName Copyleft_next_0_3_0 = "copyleft-next 0.3.0"
 licenseName Copyleft_next_0_3_1 = "copyleft-next 0.3.1"
+licenseName Cornell_Lossless_JPEG = "Cornell Lossless JPEG License"
 licenseName CPAL_1_0 = "Common Public Attribution License 1.0"
 licenseName CPL_1_0 = "Common Public License 1.0"
 licenseName CPOL_1_02 = "Code Project Open License 1.02"
@@ -1222,6 +1343,7 @@ licenseName Frameworx_1_0 = "Frameworx Open License 1.0"
 licenseName FreeBSD_DOC = "FreeBSD Documentation License"
 licenseName FreeImage = "FreeImage Public License v1.0"
 licenseName FSFAP = "FSF All Permissive License"
+licenseName FSFULLRWD = "FSF Unlimited License (With License Retention    and Warranty Disclaimer)"
 licenseName FSFULLR = "FSF Unlimited License (with License Retention)"
 licenseName FSFUL = "FSF Unlimited License"
 licenseName FTL = "Freetype Project License"
@@ -1256,14 +1378,21 @@ licenseName GPL_2_0_only = "GNU General Public License v2.0 only"
 licenseName GPL_2_0_or_later = "GNU General Public License v2.0 or later"
 licenseName GPL_3_0_only = "GNU General Public License v3.0 only"
 licenseName GPL_3_0_or_later = "GNU General Public License v3.0 or later"
+licenseName Graphics_Gems = "Graphics Gems License"
 licenseName GSOAP_1_3b = "gSOAP Public License v1.3b"
 licenseName HaskellReport = "Haskell Language Report License"
 licenseName Hippocratic_2_1 = "Hippocratic License 2.1"
+licenseName HP_1986 = "Hewlett-Packard 1986 License"
+licenseName HPND_export_US = "HPND with US Government export control warning"
+licenseName HPND_Markus_Kuhn = "Historical Permission Notice and Disclaimer - Markus Kuhn variant"
+licenseName HPND_sell_variant_MIT_disclaimer = "HPND sell variant with MIT disclaimer"
 licenseName HPND_sell_variant = "Historical Permission Notice and Disclaimer - sell variant"
 licenseName HPND = "Historical Permission Notice and Disclaimer"
 licenseName HTMLTIDY = "HTML Tidy License"
 licenseName IBM_pibs = "IBM PowerPC Initialization and Boot Software"
 licenseName ICU = "ICU License"
+licenseName IEC_Code_Components_EULA = "IEC    Code Components End-user licence agreement"
+licenseName IJG_short = "Independent JPEG Group License - short"
 licenseName IJG = "Independent JPEG Group License"
 licenseName ImageMagick = "ImageMagick License"
 licenseName IMatix = "iMatix Standard Function Library Agreement"
@@ -1277,8 +1406,11 @@ licenseName IPL_1_0 = "IBM Public License v1.0"
 licenseName ISC = "ISC License"
 licenseName Jam = "Jam License"
 licenseName JasPer_2_0 = "JasPer License"
+licenseName JPL_image = "JPL Image Use Policy"
 licenseName JPNIC = "Japan Network Information Center License"
 licenseName JSON = "JSON License"
+licenseName Kazlib = "Kazlib License"
+licenseName Knuth_CTAN = "Knuth CTAN License"
 licenseName LAL_1_2 = "Licence Art Libre 1.2"
 licenseName LAL_1_3 = "Licence Art Libre 1.3"
 licenseName Latex2e = "Latex2e License"
@@ -1294,11 +1426,13 @@ licenseName Libpng_2_0 = "PNG Reference Library version 2"
 licenseName Libpng = "libpng License"
 licenseName Libselinux_1_0 = "libselinux public domain notice"
 licenseName Libtiff = "libtiff License"
+licenseName Libutil_David_Nugent = "libutil David Nugent License"
 licenseName LiLiQ_P_1_1 = "Licence Libre du Qu\233bec \8211 Permissive version 1.1"
 licenseName LiLiQ_R_1_1 = "Licence Libre du Qu\233bec \8211 R\233ciprocit\233 version 1.1"
 licenseName LiLiQ_Rplus_1_1 = "Licence Libre du Qu\233bec \8211 R\233ciprocit\233 forte version 1.1"
 licenseName Linux_man_pages_copyleft = "Linux man-pages Copyleft"
 licenseName Linux_OpenIB = "Linux Kernel Variant of OpenIB.org license"
+licenseName LOOP = "Common Lisp LOOP License"
 licenseName LPL_1_02 = "Lucent Public License v1.02"
 licenseName LPL_1_0 = "Lucent Public License Version 1.0"
 licenseName LPPL_1_0 = "LaTeX Project Public License v1.0"
@@ -1306,7 +1440,11 @@ licenseName LPPL_1_1 = "LaTeX Project Public License v1.1"
 licenseName LPPL_1_2 = "LaTeX Project Public License v1.2"
 licenseName LPPL_1_3a = "LaTeX Project Public License v1.3a"
 licenseName LPPL_1_3c = "LaTeX Project Public License v1.3c"
+licenseName LZMA_SDK_9_11_to_9_20 = "LZMA SDK License (versions 9.11 to 9.20)"
+licenseName LZMA_SDK_9_22 = "LZMA SDK License (versions 9.22 and beyond)"
 licenseName MakeIndex = "MakeIndex License"
+licenseName Martin_Birgmeier = "Martin Birgmeier License"
+licenseName Minpack = "Minpack License"
 licenseName MirOS = "The MirOS Licence"
 licenseName MIT_0 = "MIT No Attribution"
 licenseName MIT_advertising = "Enlightenment License (e16)"
@@ -1315,14 +1453,18 @@ licenseName MIT_enna = "enna License"
 licenseName MIT_feh = "feh License"
 licenseName MIT_Modern_Variant = "MIT License Modern Variant"
 licenseName MIT_open_group = "MIT Open Group variant"
+licenseName MIT_Wu = "MIT Tom Wu Variant"
 licenseName MITNFA = "MIT +no-false-attribs license"
 licenseName MIT = "MIT License"
 licenseName Motosoto = "Motosoto License"
+licenseName Mpi_permissive = "mpi Permissive License"
 licenseName Mpich2 = "mpich2 License"
 licenseName MPL_1_0 = "Mozilla Public License 1.0"
 licenseName MPL_1_1 = "Mozilla Public License 1.1"
 licenseName MPL_2_0_no_copyleft_exception = "Mozilla Public License 2.0 (no copyleft exception)"
 licenseName MPL_2_0 = "Mozilla Public License 2.0"
+licenseName Mplus = "mplus Font License"
+licenseName MS_LPL = "Microsoft Limited Public License"
 licenseName MS_PL = "Microsoft Public License"
 licenseName MS_RL = "Microsoft Reciprocal License"
 licenseName MTLL = "Matrix Template Library License"
@@ -1340,6 +1482,7 @@ licenseName Net_SNMP = "Net-SNMP License"
 licenseName NetCDF = "NetCDF license"
 licenseName Newsletr = "Newsletr License"
 licenseName NGPL = "Nethack General Public License"
+licenseName NICTA_1_0 = "NICTA Public Software License, Version 1.0"
 licenseName NIST_PD_fallback = "NIST Public Domain Notice with license fallback"
 licenseName NIST_PD = "NIST Public Domain Notice"
 licenseName NLOD_1_0 = "Norwegian Licence for Open Government Data (NLOD) 1.0"
@@ -1359,6 +1502,7 @@ licenseName OCCT_PL = "Open CASCADE Technology Public License"
 licenseName OCLC_2_0 = "OCLC Research Public License 2.0"
 licenseName ODbL_1_0 = "Open Data Commons Open Database License v1.0"
 licenseName ODC_By_1_0 = "Open Data Commons Attribution License v1.0"
+licenseName OFFIS = "OFFIS License"
 licenseName OFL_1_0_no_RFN = "SIL Open Font License 1.0 with no Reserved Font Name"
 licenseName OFL_1_0_RFN = "SIL Open Font License 1.0 with Reserved Font Name"
 licenseName OFL_1_0 = "SIL Open Font License 1.0"
@@ -1389,6 +1533,7 @@ licenseName OLDAP_2_6 = "Open LDAP Public License v2.6"
 licenseName OLDAP_2_7 = "Open LDAP Public License v2.7"
 licenseName OLDAP_2_8 = "Open LDAP Public License v2.8"
 licenseName OML = "Open Market License"
+licenseName OpenPBS_2_3 = "OpenPBS v2.3 Software License"
 licenseName OpenSSL = "OpenSSL License"
 licenseName OPL_1_0 = "Open Public License v1.0"
 licenseName OPUBL_1_0 = "Open Publication License v1.0"
@@ -1410,8 +1555,10 @@ licenseName PostgreSQL = "PostgreSQL License"
 licenseName PSF_2_0 = "Python Software Foundation License 2.0"
 licenseName Psfrag = "psfrag License"
 licenseName Psutils = "psutils License"
+licenseName Python_2_0_1 = "Python License 2.0.1"
 licenseName Python_2_0 = "Python License 2.0"
 licenseName Qhull = "Qhull License"
+licenseName QPL_1_0_INRIA_2004 = "Q Public License 1.0 - INRIA 2004 variant"
 licenseName QPL_1_0 = "Q Public License 1.0"
 licenseName Rdisc = "Rdisc License"
 licenseName RHeCos_1_1 = "Red Hat eCos Public License v1.1"
@@ -1439,6 +1586,7 @@ licenseName Sleepycat = "Sleepycat License"
 licenseName SMLNJ = "Standard ML of New Jersey License"
 licenseName SMPPL = "Secure Messaging Protocol Public License"
 licenseName SNIA = "SNIA Public License 1.1"
+licenseName Snprintf = "snprintf License"
 licenseName Spencer_86 = "Spencer License 86"
 licenseName Spencer_94 = "Spencer License 94"
 licenseName Spencer_99 = "Spencer License 99"
@@ -1447,15 +1595,21 @@ licenseName SSH_OpenSSH = "SSH OpenSSH license"
 licenseName SSH_short = "SSH short notice"
 licenseName SSPL_1_0 = "Server Side Public License, v 1"
 licenseName SugarCRM_1_1_3 = "SugarCRM Public License v1.1.3"
+licenseName SunPro = "SunPro License"
 licenseName SWL = "Scheme Widget Library (SWL) Software License Agreement"
+licenseName Symlinks = "Symlinks License"
 licenseName TAPR_OHL_1_0 = "TAPR Open Hardware License v1.0"
 licenseName TCL = "TCL/TK License"
 licenseName TCP_wrappers = "TCP Wrappers License"
 licenseName TMate = "TMate Open Source License"
 licenseName TORQUE_1_1 = "TORQUE v2.5+ Software License v1.1"
 licenseName TOSL = "Trusster Open Source License"
+licenseName TPDL = "Time::ParseDate License"
+licenseName TPL_1_0 = "THOR Public License 1.0"
+licenseName TTWL = "Text-Tabs+Wrap License"
 licenseName TU_Berlin_1_0 = "Technische Universitaet Berlin License 1.0"
 licenseName TU_Berlin_2_0 = "Technische Universitaet Berlin License 2.0"
+licenseName UCAR = "UCAR License"
 licenseName UCL_1_0 = "Upstream Compatibility License v1.0"
 licenseName Unicode_DFS_2015 = "Unicode License Agreement - Data Files and Software (2015)"
 licenseName Unicode_DFS_2016 = "Unicode License Agreement - Data Files and Software (2016)"
@@ -1468,6 +1622,7 @@ licenseName VSL_1_0 = "Vovida Software License v1.0"
 licenseName W3C_19980720 = "W3C Software Notice and License (1998-07-20)"
 licenseName W3C_20150513 = "W3C Software Notice and Document License (2015-05-13)"
 licenseName W3C = "W3C Software Notice and License (2002-12-31)"
+licenseName W3m = "w3m License"
 licenseName Watcom_1_0 = "Sybase Open Watcom Public License 1.0"
 licenseName Wsuipa = "Wsuipa License"
 licenseName WTFPL = "Do What The F*ck You Want To Public License"
@@ -1476,6 +1631,7 @@ licenseName X11 = "X11 License"
 licenseName Xerox = "Xerox License"
 licenseName XFree86_1_1 = "XFree86 License 1.1"
 licenseName Xinetd = "xinetd License"
+licenseName Xlock = "xlock License"
 licenseName Xnet = "X.Net License"
 licenseName Xpp = "XPP License"
 licenseName XSkat = "XSkat License"
@@ -1554,6 +1710,7 @@ licenseIsOsiApproved Intel = True
 licenseIsOsiApproved IPA = True
 licenseIsOsiApproved IPL_1_0 = True
 licenseIsOsiApproved ISC = True
+licenseIsOsiApproved Jam = True
 licenseIsOsiApproved LGPL_2_0_only = True
 licenseIsOsiApproved LGPL_2_0_or_later = True
 licenseIsOsiApproved LGPL_2_1_only = True
@@ -2054,6 +2211,176 @@ licenseIdList LicenseListVersion_3_16 =
     , X11_distribute_modifications_variant
     ]
     ++ bulkOfLicenses
+licenseIdList LicenseListVersion_3_20 =
+    [ AdaCore_doc
+    , AGPL_1_0_only
+    , AGPL_1_0_or_later
+    , ANTLR_PD_fallback
+    , App_s2p
+    , Arphic_1999
+    , Baekmuk
+    , Bitstream_Charter
+    , Bitstream_Vera
+    , Blessing
+    , BlueOak_1_0_0
+    , Brian_Gladman_3_Clause
+    , BSD_2_Clause_Views
+    , BSD_3_Clause_Modification
+    , BSD_3_Clause_No_Military_License
+    , BSD_3_Clause_Open_MPI
+    , BSD_4_Clause_Shortened
+    , BSD_4_3RENO
+    , BSD_4_3TAHOE
+    , BSD_Advertising_Acknowledgement
+    , BSD_Attribution_HPND_disclaimer
+    , BUSL_1_1
+    , C_UDA_1_0
+    , CAL_1_0_Combined_Work_Exception
+    , CAL_1_0
+    , CC_BY_2_5_AU
+    , CC_BY_3_0_AT
+    , CC_BY_3_0_DE
+    , CC_BY_3_0_IGO
+    , CC_BY_3_0_NL
+    , CC_BY_3_0_US
+    , CC_BY_NC_3_0_DE
+    , CC_BY_NC_ND_3_0_DE
+    , CC_BY_NC_ND_3_0_IGO
+    , CC_BY_NC_SA_2_0_DE
+    , CC_BY_NC_SA_2_0_FR
+    , CC_BY_NC_SA_2_0_UK
+    , CC_BY_NC_SA_3_0_DE
+    , CC_BY_NC_SA_3_0_IGO
+    , CC_BY_ND_3_0_DE
+    , CC_BY_SA_2_0_UK
+    , CC_BY_SA_2_1_JP
+    , CC_BY_SA_3_0_AT
+    , CC_BY_SA_3_0_DE
+    , CC_PDDC
+    , CDL_1_0
+    , CDLA_Permissive_2_0
+    , CERN_OHL_1_1
+    , CERN_OHL_1_2
+    , CERN_OHL_P_2_0
+    , CERN_OHL_S_2_0
+    , CERN_OHL_W_2_0
+    , CFITSIO
+    , Checkmk
+    , Clips
+    , CMU_Mach
+    , COIL_1_0
+    , Community_Spec_1_0
+    , Copyleft_next_0_3_0
+    , Copyleft_next_0_3_1
+    , Cornell_Lossless_JPEG
+    , DL_DE_BY_2_0
+    , DRL_1_0
+    , Elastic_2_0
+    , EPICS
+    , Etalab_2_0
+    , FDK_AAC
+    , FreeBSD_DOC
+    , FSFULLRWD
+    , GD
+    , GFDL_1_1_invariants_only
+    , GFDL_1_1_invariants_or_later
+    , GFDL_1_1_no_invariants_only
+    , GFDL_1_1_no_invariants_or_later
+    , GFDL_1_2_invariants_only
+    , GFDL_1_2_invariants_or_later
+    , GFDL_1_2_no_invariants_only
+    , GFDL_1_2_no_invariants_or_later
+    , GFDL_1_3_invariants_only
+    , GFDL_1_3_invariants_or_later
+    , GFDL_1_3_no_invariants_only
+    , GFDL_1_3_no_invariants_or_later
+    , GLWTPL
+    , Graphics_Gems
+    , Hippocratic_2_1
+    , HP_1986
+    , HPND_export_US
+    , HPND_Markus_Kuhn
+    , HPND_sell_variant_MIT_disclaimer
+    , HPND_sell_variant
+    , HTMLTIDY
+    , IEC_Code_Components_EULA
+    , IJG_short
+    , Jam
+    , JPL_image
+    , JPNIC
+    , Kazlib
+    , Knuth_CTAN
+    , Libpng_2_0
+    , Libselinux_1_0
+    , Libutil_David_Nugent
+    , Linux_man_pages_copyleft
+    , Linux_OpenIB
+    , LOOP
+    , LZMA_SDK_9_11_to_9_20
+    , LZMA_SDK_9_22
+    , Martin_Birgmeier
+    , Minpack
+    , MIT_0
+    , MIT_Modern_Variant
+    , MIT_open_group
+    , MIT_Wu
+    , Mpi_permissive
+    , Mplus
+    , MS_LPL
+    , MulanPSL_1_0
+    , MulanPSL_2_0
+    , NAIST_2003
+    , NCGL_UK_2_0
+    , NICTA_1_0
+    , NIST_PD_fallback
+    , NIST_PD
+    , NLOD_2_0
+    , NTP_0
+    , O_UDA_1_0
+    , ODC_By_1_0
+    , OFFIS
+    , OFL_1_0_no_RFN
+    , OFL_1_0_RFN
+    , OFL_1_1_no_RFN
+    , OFL_1_1_RFN
+    , OGC_1_0
+    , OGDL_Taiwan_1_0
+    , OGL_Canada_2_0
+    , OGL_UK_1_0
+    , OGL_UK_2_0
+    , OGL_UK_3_0
+    , OpenPBS_2_3
+    , OPUBL_1_0
+    , Parity_6_0_0
+    , Parity_7_0_0
+    , PolyForm_Noncommercial_1_0_0
+    , PolyForm_Small_Business_1_0_0
+    , PSF_2_0
+    , Python_2_0_1
+    , QPL_1_0_INRIA_2004
+    , SchemeReport
+    , Sendmail_8_23
+    , SHL_0_51
+    , SHL_0_5
+    , Snprintf
+    , SSH_OpenSSH
+    , SSH_short
+    , SSPL_1_0
+    , SunPro
+    , Symlinks
+    , TAPR_OHL_1_0
+    , TPDL
+    , TPL_1_0
+    , TTWL
+    , TU_Berlin_1_0
+    , TU_Berlin_2_0
+    , UCAR
+    , UCL_1_0
+    , W3m
+    , X11_distribute_modifications_variant
+    , Xlock
+    ]
+    ++ bulkOfLicenses
 
 -- | Create a 'LicenseId' from a 'String'.
 mkLicenseId :: LicenseListVersion -> String -> Maybe LicenseId
@@ -2063,6 +2390,7 @@ mkLicenseId LicenseListVersion_3_6  s = Map.lookup s stringLookup_3_6
 mkLicenseId LicenseListVersion_3_9  s = Map.lookup s stringLookup_3_9
 mkLicenseId LicenseListVersion_3_10 s = Map.lookup s stringLookup_3_10
 mkLicenseId LicenseListVersion_3_16 s = Map.lookup s stringLookup_3_16
+mkLicenseId LicenseListVersion_3_20 s = Map.lookup s stringLookup_3_20
 
 stringLookup_3_0 :: Map String LicenseId
 stringLookup_3_0 = Map.fromList $ map (\i -> (licenseId i, i)) $
@@ -2088,6 +2416,10 @@ stringLookup_3_16 :: Map String LicenseId
 stringLookup_3_16 = Map.fromList $ map (\i -> (licenseId i, i)) $
     licenseIdList LicenseListVersion_3_16
 
+stringLookup_3_20 :: Map String LicenseId
+stringLookup_3_20 = Map.fromList $ map (\i -> (licenseId i, i)) $
+    licenseIdList LicenseListVersion_3_20
+
 --  | Licenses in all SPDX License lists
 bulkOfLicenses :: [LicenseId]
 bulkOfLicenses =
diff --git a/Cabal-syntax/src/Distribution/SPDX/LicenseListVersion.hs b/Cabal-syntax/src/Distribution/SPDX/LicenseListVersion.hs
index 467405a0b59..f6a403f13c2 100644
--- a/Cabal-syntax/src/Distribution/SPDX/LicenseListVersion.hs
+++ b/Cabal-syntax/src/Distribution/SPDX/LicenseListVersion.hs
@@ -13,10 +13,11 @@ data LicenseListVersion
     | LicenseListVersion_3_9
     | LicenseListVersion_3_10
     | LicenseListVersion_3_16
+    | LicenseListVersion_3_20
   deriving (Eq, Ord, Show, Enum, Bounded)
 
 cabalSpecVersionToSPDXListVersion :: CabalSpecVersion -> LicenseListVersion
-cabalSpecVersionToSPDXListVersion CabalSpecV3_8 = LicenseListVersion_3_16
+cabalSpecVersionToSPDXListVersion CabalSpecV3_8 = LicenseListVersion_3_20
 cabalSpecVersionToSPDXListVersion CabalSpecV3_6 = LicenseListVersion_3_10
 cabalSpecVersionToSPDXListVersion CabalSpecV3_4 = LicenseListVersion_3_9
 cabalSpecVersionToSPDXListVersion CabalSpecV3_0 = LicenseListVersion_3_6
diff --git a/Makefile b/Makefile
index bac0d30a4aa..192f0696eb2 100644
--- a/Makefile
+++ b/Makefile
@@ -32,12 +32,12 @@ SPDX_EXCEPTION_HS:=Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs
 
 spdx : $(SPDX_LICENSE_HS) $(SPDX_EXCEPTION_HS)
 
-SPDX_LICENSE_VERSIONS:=3.0 3.2 3.6 3.9 3.10 3.16
+SPDX_LICENSE_VERSIONS:=3.0 3.2 3.6 3.9 3.10 3.16 3.20
 
-$(SPDX_LICENSE_HS) : templates/SPDX.LicenseId.template.hs cabal-dev-scripts/src/GenUtils.hs cabal-dev-scripts/src/GenSPDX.hs license-list-data/licenses-3.0.json license-list-data/licenses-3.2.json
+$(SPDX_LICENSE_HS) : templates/SPDX.LicenseId.template.hs cabal-dev-scripts/src/GenUtils.hs cabal-dev-scripts/src/GenSPDX.hs license-list-data/licenses-3.20.json license-list-data/licenses-3.20.json
 	cabal v2-run --builddir=dist-newstyle-meta --project-file=cabal.project.meta gen-spdx -- templates/SPDX.LicenseId.template.hs $(SPDX_LICENSE_VERSIONS:%=license-list-data/licenses-%.json) $(SPDX_LICENSE_HS)
 
-$(SPDX_EXCEPTION_HS) : templates/SPDX.LicenseExceptionId.template.hs cabal-dev-scripts/src/GenUtils.hs cabal-dev-scripts/src/GenSPDXExc.hs license-list-data/exceptions-3.0.json license-list-data/exceptions-3.2.json
+$(SPDX_EXCEPTION_HS) : templates/SPDX.LicenseExceptionId.template.hs cabal-dev-scripts/src/GenUtils.hs cabal-dev-scripts/src/GenSPDXExc.hs license-list-data/exceptions-3.20.json license-list-data/exceptions-3.20.json
 	cabal v2-run --builddir=dist-newstyle-meta --project-file=cabal.project.meta gen-spdx-exc -- templates/SPDX.LicenseExceptionId.template.hs $(SPDX_LICENSE_VERSIONS:%=license-list-data/exceptions-%.json) $(SPDX_EXCEPTION_HS)
 
 # source generation: templates
diff --git a/cabal-dev-scripts/cabal-dev-scripts.cabal b/cabal-dev-scripts/cabal-dev-scripts.cabal
index dcf40f84371..24e160eaa92 100644
--- a/cabal-dev-scripts/cabal-dev-scripts.cabal
+++ b/cabal-dev-scripts/cabal-dev-scripts.cabal
@@ -18,7 +18,7 @@ executable gen-spdx
   ghc-options:      -Wall
   build-depends:
     , aeson                 ^>=1.4.1.0 || ^>=1.5.2.0 || ^>=2.1.1.0
-    , base                  >=4.10     && <4.17
+    , base                  >=4.10     && <4.19
     , bytestring
     , containers
     , Diff                  ^>=0.4
@@ -35,7 +35,7 @@ executable gen-spdx-exc
   ghc-options:      -Wall
   build-depends:
     , aeson                 ^>=1.4.1.0 || ^>=1.5.2.0 || ^>=2.1.1.0
-    , base                  >=4.10     && <4.17
+    , base                  >=4.10     && <4.19
     , bytestring
     , containers
     , Diff                  ^>=0.4
diff --git a/cabal-dev-scripts/src/GenSPDX.hs b/cabal-dev-scripts/src/GenSPDX.hs
index 288a0643a9c..53518d9f77f 100644
--- a/cabal-dev-scripts/src/GenSPDX.hs
+++ b/cabal-dev-scripts/src/GenSPDX.hs
@@ -36,6 +36,7 @@ main = generate =<< O.execParser opts where
         <*> licenses "3.9"
         <*> licenses "3.10"
         <*> licenses "3.16"
+        <*> licenses "3.20"
 
     template = O.strArgument $ mconcat
         [ O.metavar "SPDX.LicenseId.template.hs"
diff --git a/cabal-dev-scripts/src/GenSPDXExc.hs b/cabal-dev-scripts/src/GenSPDXExc.hs
index c0fa0f3861d..c4d972bb4ad 100644
--- a/cabal-dev-scripts/src/GenSPDXExc.hs
+++ b/cabal-dev-scripts/src/GenSPDXExc.hs
@@ -35,6 +35,7 @@ main = generate =<< O.execParser opts where
         <*> licenses "3.9"
         <*> licenses "3.10"
         <*> licenses "3.16"
+        <*> licenses "3.20"
 
     template = O.strArgument $ mconcat
         [ O.metavar "SPDX.LicenseExceptionId.template.hs"
diff --git a/cabal-dev-scripts/src/GenUtils.hs b/cabal-dev-scripts/src/GenUtils.hs
index 41834ef517a..f9c096bc884 100644
--- a/cabal-dev-scripts/src/GenUtils.hs
+++ b/cabal-dev-scripts/src/GenUtils.hs
@@ -32,12 +32,14 @@ data SPDXLicenseListVersion
     | SPDXLicenseListVersion_3_9
     | SPDXLicenseListVersion_3_10
     | SPDXLicenseListVersion_3_16
+    | SPDXLicenseListVersion_3_20
   deriving (Eq, Ord, Show, Enum, Bounded)
 
 allVers :: Set.Set SPDXLicenseListVersion
 allVers =  Set.fromList [minBound .. maxBound]
 
 prettyVer :: SPDXLicenseListVersion -> Text
+prettyVer SPDXLicenseListVersion_3_20 = "SPDX License List 3.20"
 prettyVer SPDXLicenseListVersion_3_16 = "SPDX License List 3.16"
 prettyVer SPDXLicenseListVersion_3_10 = "SPDX License List 3.10"
 prettyVer SPDXLicenseListVersion_3_9  = "SPDX License List 3.9"
@@ -46,6 +48,7 @@ prettyVer SPDXLicenseListVersion_3_2  = "SPDX License List 3.2"
 prettyVer SPDXLicenseListVersion_3_0  = "SPDX License List 3.0"
 
 suffixVer :: SPDXLicenseListVersion -> String
+suffixVer SPDXLicenseListVersion_3_20 = "_3_20"
 suffixVer SPDXLicenseListVersion_3_16 = "_3_16"
 suffixVer SPDXLicenseListVersion_3_10 = "_3_10"
 suffixVer SPDXLicenseListVersion_3_9  = "_3_9"
@@ -57,7 +60,7 @@ suffixVer SPDXLicenseListVersion_3_0  = "_3_0"
 -- Per version
 -------------------------------------------------------------------------------
 
-data PerV a = PerV a a a a a a
+data PerV a = PerV a a a a a a a
   deriving (Show, Functor, Foldable, Traversable)
 
 class Functor f => Representable i f | f -> i where
@@ -65,12 +68,13 @@ class Functor f => Representable i f | f -> i where
     tabulate :: (i -> a) -> f a
 
 instance Representable SPDXLicenseListVersion PerV where
-    index SPDXLicenseListVersion_3_0  (PerV x _ _ _ _ _) = x
-    index SPDXLicenseListVersion_3_2  (PerV _ x _ _ _ _) = x
-    index SPDXLicenseListVersion_3_6  (PerV _ _ x _ _ _) = x
-    index SPDXLicenseListVersion_3_9  (PerV _ _ _ x _ _) = x
-    index SPDXLicenseListVersion_3_10 (PerV _ _ _ _ x _) = x
-    index SPDXLicenseListVersion_3_16 (PerV _ _ _ _ _ x) = x
+    index SPDXLicenseListVersion_3_0  (PerV x _ _ _ _ _ _) = x
+    index SPDXLicenseListVersion_3_2  (PerV _ x _ _ _ _ _) = x
+    index SPDXLicenseListVersion_3_6  (PerV _ _ x _ _ _ _) = x
+    index SPDXLicenseListVersion_3_9  (PerV _ _ _ x _ _ _) = x
+    index SPDXLicenseListVersion_3_10 (PerV _ _ _ _ x _ _) = x
+    index SPDXLicenseListVersion_3_16 (PerV _ _ _ _ _ x _) = x
+    index SPDXLicenseListVersion_3_20 (PerV _ _ _ _ _ _ x) = x
 
     tabulate f = PerV
         (f SPDXLicenseListVersion_3_0)
@@ -79,6 +83,7 @@ instance Representable SPDXLicenseListVersion PerV where
         (f SPDXLicenseListVersion_3_9)
         (f SPDXLicenseListVersion_3_10)
         (f SPDXLicenseListVersion_3_16)
+        (f SPDXLicenseListVersion_3_20)
 
 -------------------------------------------------------------------------------
 -- Sorting
diff --git a/changelog.d/pr-9028 b/changelog.d/pr-9028
new file mode 100644
index 00000000000..6a781f360d5
--- /dev/null
+++ b/changelog.d/pr-9028
@@ -0,0 +1,7 @@
+synopsis: Update SPDX license Ids & exceptions to 3.20
+packages: cabal-syntax
+prs: #9028
+
+description: {
+  Integrate the SPDX License Ids & Exceptions index v3.20
+}
diff --git a/fix-whitespace.yaml b/fix-whitespace.yaml
index d96e84188b1..1fa91e57c83 100644
--- a/fix-whitespace.yaml
+++ b/fix-whitespace.yaml
@@ -32,6 +32,7 @@ excluded-dirs:
   - .python-sphinx-virtualenv
   - .stack-work
   - .vscode
+  - license-list-data
 
 # Every matched filename is included unless it is matched by excluded-files.
 included-files:
diff --git a/license-list-data/exceptions-3.20.json b/license-list-data/exceptions-3.20.json
new file mode 100644
index 00000000000..28dde08c49d
--- /dev/null
+++ b/license-list-data/exceptions-3.20.json
@@ -0,0 +1,558 @@
+{
+  "licenseListVersion": "3.20",
+  "exceptions": [
+    {
+      "reference": "./389-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./389-exception.html",
+      "referenceNumber": 35,
+      "name": "389 Directory Server Exception",
+      "licenseExceptionId": "389-exception",
+      "seeAlso": [
+        "http://directory.fedoraproject.org/wiki/GPL_Exception_License_Text",
+        "https://web.archive.org/web/20080828121337/http://directory.fedoraproject.org/wiki/GPL_Exception_License_Text"
+      ]
+    },
+    {
+      "reference": "./Autoconf-exception-2.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Autoconf-exception-2.0.html",
+      "referenceNumber": 9,
+      "name": "Autoconf exception 2.0",
+      "licenseExceptionId": "Autoconf-exception-2.0",
+      "seeAlso": [
+        "http://ac-archive.sourceforge.net/doc/copyright.html",
+        "http://ftp.gnu.org/gnu/autoconf/autoconf-2.59.tar.gz"
+      ]
+    },
+    {
+      "reference": "./Autoconf-exception-3.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Autoconf-exception-3.0.html",
+      "referenceNumber": 8,
+      "name": "Autoconf exception 3.0",
+      "licenseExceptionId": "Autoconf-exception-3.0",
+      "seeAlso": [
+        "http://www.gnu.org/licenses/autoconf-exception-3.0.html"
+      ]
+    },
+    {
+      "reference": "./Autoconf-exception-generic.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Autoconf-exception-generic.html",
+      "referenceNumber": 39,
+      "name": "Autoconf generic exception",
+      "licenseExceptionId": "Autoconf-exception-generic",
+      "seeAlso": [
+        "https://launchpad.net/ubuntu/precise/+source/xmltooling/+copyright",
+        "https://tracker.debian.org/media/packages/s/sipwitch/copyright-1.9.15-3",
+        "https://opensource.apple.com/source/launchd/launchd-258.1/launchd/compile.auto.html"
+      ]
+    },
+    {
+      "reference": "./Bison-exception-2.2.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Bison-exception-2.2.html",
+      "referenceNumber": 37,
+      "name": "Bison exception 2.2",
+      "licenseExceptionId": "Bison-exception-2.2",
+      "seeAlso": [
+        "http://git.savannah.gnu.org/cgit/bison.git/tree/data/yacc.c?id\u003d193d7c7054ba7197b0789e14965b739162319b5e#n141"
+      ]
+    },
+    {
+      "reference": "./Bootloader-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Bootloader-exception.html",
+      "referenceNumber": 20,
+      "name": "Bootloader Distribution Exception",
+      "licenseExceptionId": "Bootloader-exception",
+      "seeAlso": [
+        "https://github.com/pyinstaller/pyinstaller/blob/develop/COPYING.txt"
+      ]
+    },
+    {
+      "reference": "./Classpath-exception-2.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Classpath-exception-2.0.html",
+      "referenceNumber": 36,
+      "name": "Classpath exception 2.0",
+      "licenseExceptionId": "Classpath-exception-2.0",
+      "seeAlso": [
+        "http://www.gnu.org/software/classpath/license.html",
+        "https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception"
+      ]
+    },
+    {
+      "reference": "./CLISP-exception-2.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./CLISP-exception-2.0.html",
+      "referenceNumber": 5,
+      "name": "CLISP exception 2.0",
+      "licenseExceptionId": "CLISP-exception-2.0",
+      "seeAlso": [
+        "http://sourceforge.net/p/clisp/clisp/ci/default/tree/COPYRIGHT"
+      ]
+    },
+    {
+      "reference": "./DigiRule-FOSS-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./DigiRule-FOSS-exception.html",
+      "referenceNumber": 34,
+      "name": "DigiRule FOSS License Exception",
+      "licenseExceptionId": "DigiRule-FOSS-exception",
+      "seeAlso": [
+        "http://www.digirulesolutions.com/drupal/foss"
+      ]
+    },
+    {
+      "reference": "./eCos-exception-2.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./eCos-exception-2.0.html",
+      "referenceNumber": 31,
+      "name": "eCos exception 2.0",
+      "licenseExceptionId": "eCos-exception-2.0",
+      "seeAlso": [
+        "http://ecos.sourceware.org/license-overview.html"
+      ]
+    },
+    {
+      "reference": "./Fawkes-Runtime-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Fawkes-Runtime-exception.html",
+      "referenceNumber": 22,
+      "name": "Fawkes Runtime Exception",
+      "licenseExceptionId": "Fawkes-Runtime-exception",
+      "seeAlso": [
+        "http://www.fawkesrobotics.org/about/license/"
+      ]
+    },
+    {
+      "reference": "./FLTK-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./FLTK-exception.html",
+      "referenceNumber": 42,
+      "name": "FLTK exception",
+      "licenseExceptionId": "FLTK-exception",
+      "seeAlso": [
+        "http://www.fltk.org/COPYING.php"
+      ]
+    },
+    {
+      "reference": "./Font-exception-2.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Font-exception-2.0.html",
+      "referenceNumber": 29,
+      "name": "Font exception 2.0",
+      "licenseExceptionId": "Font-exception-2.0",
+      "seeAlso": [
+        "http://www.gnu.org/licenses/gpl-faq.html#FontException"
+      ]
+    },
+    {
+      "reference": "./freertos-exception-2.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./freertos-exception-2.0.html",
+      "referenceNumber": 25,
+      "name": "FreeRTOS Exception 2.0",
+      "licenseExceptionId": "freertos-exception-2.0",
+      "seeAlso": [
+        "https://web.archive.org/web/20060809182744/http://www.freertos.org/a00114.html"
+      ]
+    },
+    {
+      "reference": "./GCC-exception-2.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./GCC-exception-2.0.html",
+      "referenceNumber": 24,
+      "name": "GCC Runtime Library exception 2.0",
+      "licenseExceptionId": "GCC-exception-2.0",
+      "seeAlso": [
+        "https://gcc.gnu.org/git/?p\u003dgcc.git;a\u003dblob;f\u003dgcc/libgcc1.c;h\u003d762f5143fc6eed57b6797c82710f3538aa52b40b;hb\u003dcb143a3ce4fb417c68f5fa2691a1b1b1053dfba9#l10"
+      ]
+    },
+    {
+      "reference": "./GCC-exception-3.1.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./GCC-exception-3.1.html",
+      "referenceNumber": 11,
+      "name": "GCC Runtime Library exception 3.1",
+      "licenseExceptionId": "GCC-exception-3.1",
+      "seeAlso": [
+        "http://www.gnu.org/licenses/gcc-exception-3.1.html"
+      ]
+    },
+    {
+      "reference": "./GNAT-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./GNAT-exception.html",
+      "referenceNumber": 16,
+      "name": "GNAT exception",
+      "licenseExceptionId": "GNAT-exception",
+      "seeAlso": [
+        "https://github.com/AdaCore/florist/blob/master/libsrc/posix-configurable_file_limits.adb"
+      ]
+    },
+    {
+      "reference": "./gnu-javamail-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./gnu-javamail-exception.html",
+      "referenceNumber": 26,
+      "name": "GNU JavaMail exception",
+      "licenseExceptionId": "gnu-javamail-exception",
+      "seeAlso": [
+        "http://www.gnu.org/software/classpathx/javamail/javamail.html"
+      ]
+    },
+    {
+      "reference": "./GPL-3.0-linking-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./GPL-3.0-linking-exception.html",
+      "referenceNumber": 6,
+      "name": "GPL-3.0 Linking Exception",
+      "licenseExceptionId": "GPL-3.0-linking-exception",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs"
+      ]
+    },
+    {
+      "reference": "./GPL-3.0-linking-source-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./GPL-3.0-linking-source-exception.html",
+      "referenceNumber": 32,
+      "name": "GPL-3.0 Linking Exception (with Corresponding Source)",
+      "licenseExceptionId": "GPL-3.0-linking-source-exception",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs",
+        "https://github.com/mirror/wget/blob/master/src/http.c#L20"
+      ]
+    },
+    {
+      "reference": "./GPL-CC-1.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./GPL-CC-1.0.html",
+      "referenceNumber": 41,
+      "name": "GPL Cooperation Commitment 1.0",
+      "licenseExceptionId": "GPL-CC-1.0",
+      "seeAlso": [
+        "https://github.com/gplcc/gplcc/blob/master/Project/COMMITMENT",
+        "https://gplcc.github.io/gplcc/Project/README-PROJECT.html"
+      ]
+    },
+    {
+      "reference": "./GStreamer-exception-2005.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./GStreamer-exception-2005.html",
+      "referenceNumber": 33,
+      "name": "GStreamer Exception (2005)",
+      "licenseExceptionId": "GStreamer-exception-2005",
+      "seeAlso": [
+        "https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/licensing.html?gi-language\u003dc#licensing-of-applications-using-gstreamer"
+      ]
+    },
+    {
+      "reference": "./GStreamer-exception-2008.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./GStreamer-exception-2008.html",
+      "referenceNumber": 27,
+      "name": "GStreamer Exception (2008)",
+      "licenseExceptionId": "GStreamer-exception-2008",
+      "seeAlso": [
+        "https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/licensing.html?gi-language\u003dc#licensing-of-applications-using-gstreamer"
+      ]
+    },
+    {
+      "reference": "./i2p-gpl-java-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./i2p-gpl-java-exception.html",
+      "referenceNumber": 2,
+      "name": "i2p GPL+Java Exception",
+      "licenseExceptionId": "i2p-gpl-java-exception",
+      "seeAlso": [
+        "http://geti2p.net/en/get-involved/develop/licenses#java_exception"
+      ]
+    },
+    {
+      "reference": "./KiCad-libraries-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./KiCad-libraries-exception.html",
+      "referenceNumber": 47,
+      "name": "KiCad Libraries Exception",
+      "licenseExceptionId": "KiCad-libraries-exception",
+      "seeAlso": [
+        "https://www.kicad.org/libraries/license/"
+      ]
+    },
+    {
+      "reference": "./LGPL-3.0-linking-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./LGPL-3.0-linking-exception.html",
+      "referenceNumber": 7,
+      "name": "LGPL-3.0 Linking Exception",
+      "licenseExceptionId": "LGPL-3.0-linking-exception",
+      "seeAlso": [
+        "https://raw.githubusercontent.com/go-xmlpath/xmlpath/v2/LICENSE",
+        "https://github.com/goamz/goamz/blob/master/LICENSE",
+        "https://github.com/juju/errors/blob/master/LICENSE"
+      ]
+    },
+    {
+      "reference": "./Libtool-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Libtool-exception.html",
+      "referenceNumber": 38,
+      "name": "Libtool Exception",
+      "licenseExceptionId": "Libtool-exception",
+      "seeAlso": [
+        "http://git.savannah.gnu.org/cgit/libtool.git/tree/m4/libtool.m4"
+      ]
+    },
+    {
+      "reference": "./Linux-syscall-note.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Linux-syscall-note.html",
+      "referenceNumber": 15,
+      "name": "Linux Syscall Note",
+      "licenseExceptionId": "Linux-syscall-note",
+      "seeAlso": [
+        "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/COPYING"
+      ]
+    },
+    {
+      "reference": "./LLVM-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./LLVM-exception.html",
+      "referenceNumber": 17,
+      "name": "LLVM Exception",
+      "licenseExceptionId": "LLVM-exception",
+      "seeAlso": [
+        "http://llvm.org/foundation/relicensing/LICENSE.txt"
+      ]
+    },
+    {
+      "reference": "./LZMA-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./LZMA-exception.html",
+      "referenceNumber": 10,
+      "name": "LZMA exception",
+      "licenseExceptionId": "LZMA-exception",
+      "seeAlso": [
+        "http://nsis.sourceforge.net/Docs/AppendixI.html#I.6"
+      ]
+    },
+    {
+      "reference": "./mif-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./mif-exception.html",
+      "referenceNumber": 49,
+      "name": "Macros and Inline Functions Exception",
+      "licenseExceptionId": "mif-exception",
+      "seeAlso": [
+        "http://www.scs.stanford.edu/histar/src/lib/cppsup/exception",
+        "http://dev.bertos.org/doxygen/",
+        "https://www.threadingbuildingblocks.org/licensing"
+      ]
+    },
+    {
+      "reference": "./Nokia-Qt-exception-1.1.json",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "./Nokia-Qt-exception-1.1.html",
+      "referenceNumber": 23,
+      "name": "Nokia Qt LGPL exception 1.1",
+      "licenseExceptionId": "Nokia-Qt-exception-1.1",
+      "seeAlso": [
+        "https://www.keepassx.org/dev/projects/keepassx/repository/revisions/b8dfb9cc4d5133e0f09cd7533d15a4f1c19a40f2/entry/LICENSE.NOKIA-LGPL-EXCEPTION"
+      ]
+    },
+    {
+      "reference": "./OCaml-LGPL-linking-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./OCaml-LGPL-linking-exception.html",
+      "referenceNumber": 28,
+      "name": "OCaml LGPL Linking Exception",
+      "licenseExceptionId": "OCaml-LGPL-linking-exception",
+      "seeAlso": [
+        "https://caml.inria.fr/ocaml/license.en.html"
+      ]
+    },
+    {
+      "reference": "./OCCT-exception-1.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./OCCT-exception-1.0.html",
+      "referenceNumber": 43,
+      "name": "Open CASCADE Exception 1.0",
+      "licenseExceptionId": "OCCT-exception-1.0",
+      "seeAlso": [
+        "http://www.opencascade.com/content/licensing"
+      ]
+    },
+    {
+      "reference": "./OpenJDK-assembly-exception-1.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./OpenJDK-assembly-exception-1.0.html",
+      "referenceNumber": 44,
+      "name": "OpenJDK Assembly exception 1.0",
+      "licenseExceptionId": "OpenJDK-assembly-exception-1.0",
+      "seeAlso": [
+        "http://openjdk.java.net/legal/assembly-exception.html"
+      ]
+    },
+    {
+      "reference": "./openvpn-openssl-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./openvpn-openssl-exception.html",
+      "referenceNumber": 13,
+      "name": "OpenVPN OpenSSL Exception",
+      "licenseExceptionId": "openvpn-openssl-exception",
+      "seeAlso": [
+        "http://openvpn.net/index.php/license.html"
+      ]
+    },
+    {
+      "reference": "./PS-or-PDF-font-exception-20170817.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./PS-or-PDF-font-exception-20170817.html",
+      "referenceNumber": 18,
+      "name": "PS/PDF font exception (2017-08-17)",
+      "licenseExceptionId": "PS-or-PDF-font-exception-20170817",
+      "seeAlso": [
+        "https://github.com/ArtifexSoftware/urw-base35-fonts/blob/65962e27febc3883a17e651cdb23e783668c996f/LICENSE"
+      ]
+    },
+    {
+      "reference": "./QPL-1.0-INRIA-2004-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./QPL-1.0-INRIA-2004-exception.html",
+      "referenceNumber": 12,
+      "name": "INRIA QPL 1.0 2004 variant exception",
+      "licenseExceptionId": "QPL-1.0-INRIA-2004-exception",
+      "seeAlso": [
+        "https://git.frama-c.com/pub/frama-c/-/blob/master/licenses/Q_MODIFIED_LICENSE",
+        "https://github.com/maranget/hevea/blob/master/LICENSE"
+      ]
+    },
+    {
+      "reference": "./Qt-GPL-exception-1.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Qt-GPL-exception-1.0.html",
+      "referenceNumber": 46,
+      "name": "Qt GPL exception 1.0",
+      "licenseExceptionId": "Qt-GPL-exception-1.0",
+      "seeAlso": [
+        "http://code.qt.io/cgit/qt/qtbase.git/tree/LICENSE.GPL3-EXCEPT"
+      ]
+    },
+    {
+      "reference": "./Qt-LGPL-exception-1.1.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Qt-LGPL-exception-1.1.html",
+      "referenceNumber": 45,
+      "name": "Qt LGPL exception 1.1",
+      "licenseExceptionId": "Qt-LGPL-exception-1.1",
+      "seeAlso": [
+        "http://code.qt.io/cgit/qt/qtbase.git/tree/LGPL_EXCEPTION.txt"
+      ]
+    },
+    {
+      "reference": "./Qwt-exception-1.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Qwt-exception-1.0.html",
+      "referenceNumber": 30,
+      "name": "Qwt exception 1.0",
+      "licenseExceptionId": "Qwt-exception-1.0",
+      "seeAlso": [
+        "http://qwt.sourceforge.net/qwtlicense.html"
+      ]
+    },
+    {
+      "reference": "./SHL-2.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./SHL-2.0.html",
+      "referenceNumber": 19,
+      "name": "Solderpad Hardware License v2.0",
+      "licenseExceptionId": "SHL-2.0",
+      "seeAlso": [
+        "https://solderpad.org/licenses/SHL-2.0/"
+      ]
+    },
+    {
+      "reference": "./SHL-2.1.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./SHL-2.1.html",
+      "referenceNumber": 21,
+      "name": "Solderpad Hardware License v2.1",
+      "licenseExceptionId": "SHL-2.1",
+      "seeAlso": [
+        "https://solderpad.org/licenses/SHL-2.1/"
+      ]
+    },
+    {
+      "reference": "./SWI-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./SWI-exception.html",
+      "referenceNumber": 4,
+      "name": "SWI exception",
+      "licenseExceptionId": "SWI-exception",
+      "seeAlso": [
+        "https://github.com/SWI-Prolog/packages-clpqr/blob/bfa80b9270274f0800120d5b8e6fef42ac2dc6a5/clpqr/class.pl"
+      ]
+    },
+    {
+      "reference": "./Swift-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Swift-exception.html",
+      "referenceNumber": 3,
+      "name": "Swift Exception",
+      "licenseExceptionId": "Swift-exception",
+      "seeAlso": [
+        "https://swift.org/LICENSE.txt",
+        "https://github.com/apple/swift-package-manager/blob/7ab2275f447a5eb37497ed63a9340f8a6d1e488b/LICENSE.txt#L205"
+      ]
+    },
+    {
+      "reference": "./u-boot-exception-2.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./u-boot-exception-2.0.html",
+      "referenceNumber": 14,
+      "name": "U-Boot exception 2.0",
+      "licenseExceptionId": "u-boot-exception-2.0",
+      "seeAlso": [
+        "http://git.denx.de/?p\u003du-boot.git;a\u003dblob;f\u003dLicenses/Exceptions"
+      ]
+    },
+    {
+      "reference": "./Universal-FOSS-exception-1.0.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./Universal-FOSS-exception-1.0.html",
+      "referenceNumber": 40,
+      "name": "Universal FOSS Exception, Version 1.0",
+      "licenseExceptionId": "Universal-FOSS-exception-1.0",
+      "seeAlso": [
+        "https://oss.oracle.com/licenses/universal-foss-exception/"
+      ]
+    },
+    {
+      "reference": "./WxWindows-exception-3.1.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./WxWindows-exception-3.1.html",
+      "referenceNumber": 1,
+      "name": "WxWindows Library Exception 3.1",
+      "licenseExceptionId": "WxWindows-exception-3.1",
+      "seeAlso": [
+        "http://www.opensource.org/licenses/WXwindows"
+      ]
+    },
+    {
+      "reference": "./x11vnc-openssl-exception.json",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "./x11vnc-openssl-exception.html",
+      "referenceNumber": 48,
+      "name": "x11vnc OpenSSL Exception",
+      "licenseExceptionId": "x11vnc-openssl-exception",
+      "seeAlso": [
+        "https://github.com/LibVNC/x11vnc/blob/master/src/8to24.c#L22"
+      ]
+    }
+  ],
+  "releaseDate": "2023-02-17"
+}
\ No newline at end of file
diff --git a/license-list-data/licenses-3.20.json b/license-list-data/licenses-3.20.json
new file mode 100644
index 00000000000..f0f96fd7b92
--- /dev/null
+++ b/license-list-data/licenses-3.20.json
@@ -0,0 +1,6744 @@
+{
+  "licenseListVersion": "3.20",
+  "licenses": [
+    {
+      "reference": "https://spdx.org/licenses/0BSD.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/0BSD.json",
+      "referenceNumber": 372,
+      "name": "BSD Zero Clause License",
+      "licenseId": "0BSD",
+      "seeAlso": [
+        "http://landley.net/toybox/license.html",
+        "https://opensource.org/licenses/0BSD"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/AAL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AAL.json",
+      "referenceNumber": 275,
+      "name": "Attribution Assurance License",
+      "licenseId": "AAL",
+      "seeAlso": [
+        "https://opensource.org/licenses/attribution"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Abstyles.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Abstyles.json",
+      "referenceNumber": 347,
+      "name": "Abstyles License",
+      "licenseId": "Abstyles",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Abstyles"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/AdaCore-doc.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AdaCore-doc.json",
+      "referenceNumber": 496,
+      "name": "AdaCore Doc License",
+      "licenseId": "AdaCore-doc",
+      "seeAlso": [
+        "https://github.com/AdaCore/xmlada/blob/master/docs/index.rst",
+        "https://github.com/AdaCore/gnatcoll-core/blob/master/docs/index.rst",
+        "https://github.com/AdaCore/gnatcoll-db/blob/master/docs/index.rst"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Adobe-2006.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Adobe-2006.json",
+      "referenceNumber": 104,
+      "name": "Adobe Systems Incorporated Source Code License Agreement",
+      "licenseId": "Adobe-2006",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/AdobeLicense"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Adobe-Glyph.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Adobe-Glyph.json",
+      "referenceNumber": 432,
+      "name": "Adobe Glyph List License",
+      "licenseId": "Adobe-Glyph",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/MIT#AdobeGlyph"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/ADSL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ADSL.json",
+      "referenceNumber": 200,
+      "name": "Amazon Digital Services License",
+      "licenseId": "ADSL",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/AmazonDigitalServicesLicense"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/AFL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AFL-1.1.json",
+      "referenceNumber": 71,
+      "name": "Academic Free License v1.1",
+      "licenseId": "AFL-1.1",
+      "seeAlso": [
+        "http://opensource.linux-mirror.org/licenses/afl-1.1.txt",
+        "http://wayback.archive.org/web/20021004124254/http://www.opensource.org/licenses/academic.php"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/AFL-1.2.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AFL-1.2.json",
+      "referenceNumber": 70,
+      "name": "Academic Free License v1.2",
+      "licenseId": "AFL-1.2",
+      "seeAlso": [
+        "http://opensource.linux-mirror.org/licenses/afl-1.2.txt",
+        "http://wayback.archive.org/web/20021204204652/http://www.opensource.org/licenses/academic.php"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/AFL-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AFL-2.0.json",
+      "referenceNumber": 237,
+      "name": "Academic Free License v2.0",
+      "licenseId": "AFL-2.0",
+      "seeAlso": [
+        "http://wayback.archive.org/web/20060924134533/http://www.opensource.org/licenses/afl-2.0.txt"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/AFL-2.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AFL-2.1.json",
+      "referenceNumber": 197,
+      "name": "Academic Free License v2.1",
+      "licenseId": "AFL-2.1",
+      "seeAlso": [
+        "http://opensource.linux-mirror.org/licenses/afl-2.1.txt"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/AFL-3.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AFL-3.0.json",
+      "referenceNumber": 47,
+      "name": "Academic Free License v3.0",
+      "licenseId": "AFL-3.0",
+      "seeAlso": [
+        "http://www.rosenlaw.com/AFL3.0.htm",
+        "https://opensource.org/licenses/afl-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Afmparse.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Afmparse.json",
+      "referenceNumber": 99,
+      "name": "Afmparse License",
+      "licenseId": "Afmparse",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Afmparse"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/AGPL-1.0.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/AGPL-1.0.json",
+      "referenceNumber": 63,
+      "name": "Affero General Public License v1.0",
+      "licenseId": "AGPL-1.0",
+      "seeAlso": [
+        "http://www.affero.org/oagpl.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/AGPL-1.0-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AGPL-1.0-only.json",
+      "referenceNumber": 185,
+      "name": "Affero General Public License v1.0 only",
+      "licenseId": "AGPL-1.0-only",
+      "seeAlso": [
+        "http://www.affero.org/oagpl.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/AGPL-1.0-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AGPL-1.0-or-later.json",
+      "referenceNumber": 370,
+      "name": "Affero General Public License v1.0 or later",
+      "licenseId": "AGPL-1.0-or-later",
+      "seeAlso": [
+        "http://www.affero.org/oagpl.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/AGPL-3.0.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/AGPL-3.0.json",
+      "referenceNumber": 54,
+      "name": "GNU Affero General Public License v3.0",
+      "licenseId": "AGPL-3.0",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/agpl.txt",
+        "https://opensource.org/licenses/AGPL-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/AGPL-3.0-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AGPL-3.0-only.json",
+      "referenceNumber": 504,
+      "name": "GNU Affero General Public License v3.0 only",
+      "licenseId": "AGPL-3.0-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/agpl.txt",
+        "https://opensource.org/licenses/AGPL-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/AGPL-3.0-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AGPL-3.0-or-later.json",
+      "referenceNumber": 295,
+      "name": "GNU Affero General Public License v3.0 or later",
+      "licenseId": "AGPL-3.0-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/agpl.txt",
+        "https://opensource.org/licenses/AGPL-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Aladdin.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Aladdin.json",
+      "referenceNumber": 473,
+      "name": "Aladdin Free Public License",
+      "licenseId": "Aladdin",
+      "seeAlso": [
+        "http://pages.cs.wisc.edu/~ghost/doc/AFPL/6.01/Public.htm"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/AMDPLPA.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AMDPLPA.json",
+      "referenceNumber": 435,
+      "name": "AMD\u0027s plpa_map.c License",
+      "licenseId": "AMDPLPA",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/AMD_plpa_map_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/AML.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AML.json",
+      "referenceNumber": 460,
+      "name": "Apple MIT License",
+      "licenseId": "AML",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Apple_MIT_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/AMPAS.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/AMPAS.json",
+      "referenceNumber": 234,
+      "name": "Academy of Motion Picture Arts and Sciences BSD",
+      "licenseId": "AMPAS",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/BSD#AMPASBSD"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/ANTLR-PD.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ANTLR-PD.json",
+      "referenceNumber": 182,
+      "name": "ANTLR Software Rights Notice",
+      "licenseId": "ANTLR-PD",
+      "seeAlso": [
+        "http://www.antlr2.org/license.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/ANTLR-PD-fallback.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ANTLR-PD-fallback.json",
+      "referenceNumber": 364,
+      "name": "ANTLR Software Rights Notice with license fallback",
+      "licenseId": "ANTLR-PD-fallback",
+      "seeAlso": [
+        "http://www.antlr2.org/license.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Apache-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Apache-1.0.json",
+      "referenceNumber": 525,
+      "name": "Apache License 1.0",
+      "licenseId": "Apache-1.0",
+      "seeAlso": [
+        "http://www.apache.org/licenses/LICENSE-1.0"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Apache-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Apache-1.1.json",
+      "referenceNumber": 332,
+      "name": "Apache License 1.1",
+      "licenseId": "Apache-1.1",
+      "seeAlso": [
+        "http://apache.org/licenses/LICENSE-1.1",
+        "https://opensource.org/licenses/Apache-1.1"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Apache-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Apache-2.0.json",
+      "referenceNumber": 72,
+      "name": "Apache License 2.0",
+      "licenseId": "Apache-2.0",
+      "seeAlso": [
+        "https://www.apache.org/licenses/LICENSE-2.0",
+        "https://opensource.org/licenses/Apache-2.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/APAFML.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/APAFML.json",
+      "referenceNumber": 122,
+      "name": "Adobe Postscript AFM License",
+      "licenseId": "APAFML",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/AdobePostscriptAFM"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/APL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/APL-1.0.json",
+      "referenceNumber": 270,
+      "name": "Adaptive Public License 1.0",
+      "licenseId": "APL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/APL-1.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/App-s2p.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/App-s2p.json",
+      "referenceNumber": 108,
+      "name": "App::s2p License",
+      "licenseId": "App-s2p",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/App-s2p"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/APSL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/APSL-1.0.json",
+      "referenceNumber": 439,
+      "name": "Apple Public Source License 1.0",
+      "licenseId": "APSL-1.0",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Apple_Public_Source_License_1.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/APSL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/APSL-1.1.json",
+      "referenceNumber": 292,
+      "name": "Apple Public Source License 1.1",
+      "licenseId": "APSL-1.1",
+      "seeAlso": [
+        "http://www.opensource.apple.com/source/IOSerialFamily/IOSerialFamily-7/APPLE_LICENSE"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/APSL-1.2.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/APSL-1.2.json",
+      "referenceNumber": 209,
+      "name": "Apple Public Source License 1.2",
+      "licenseId": "APSL-1.2",
+      "seeAlso": [
+        "http://www.samurajdata.se/opensource/mirror/licenses/apsl.php"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/APSL-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/APSL-2.0.json",
+      "referenceNumber": 251,
+      "name": "Apple Public Source License 2.0",
+      "licenseId": "APSL-2.0",
+      "seeAlso": [
+        "http://www.opensource.apple.com/license/apsl/"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Arphic-1999.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Arphic-1999.json",
+      "referenceNumber": 290,
+      "name": "Arphic Public License",
+      "licenseId": "Arphic-1999",
+      "seeAlso": [
+        "http://ftp.gnu.org/gnu/non-gnu/chinese-fonts-truetype/LICENSE"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Artistic-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Artistic-1.0.json",
+      "referenceNumber": 422,
+      "name": "Artistic License 1.0",
+      "licenseId": "Artistic-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/Artistic-1.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Artistic-1.0-cl8.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Artistic-1.0-cl8.json",
+      "referenceNumber": 267,
+      "name": "Artistic License 1.0 w/clause 8",
+      "licenseId": "Artistic-1.0-cl8",
+      "seeAlso": [
+        "https://opensource.org/licenses/Artistic-1.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Artistic-1.0-Perl.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Artistic-1.0-Perl.json",
+      "referenceNumber": 530,
+      "name": "Artistic License 1.0 (Perl)",
+      "licenseId": "Artistic-1.0-Perl",
+      "seeAlso": [
+        "http://dev.perl.org/licenses/artistic.html"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Artistic-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Artistic-2.0.json",
+      "referenceNumber": 468,
+      "name": "Artistic License 2.0",
+      "licenseId": "Artistic-2.0",
+      "seeAlso": [
+        "http://www.perlfoundation.org/artistic_license_2_0",
+        "https://www.perlfoundation.org/artistic-license-20.html",
+        "https://opensource.org/licenses/artistic-license-2.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Baekmuk.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Baekmuk.json",
+      "referenceNumber": 503,
+      "name": "Baekmuk License",
+      "licenseId": "Baekmuk",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing:Baekmuk?rd\u003dLicensing/Baekmuk"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Bahyph.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Bahyph.json",
+      "referenceNumber": 244,
+      "name": "Bahyph License",
+      "licenseId": "Bahyph",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Bahyph"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Barr.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Barr.json",
+      "referenceNumber": 217,
+      "name": "Barr License",
+      "licenseId": "Barr",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Barr"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Beerware.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Beerware.json",
+      "referenceNumber": 414,
+      "name": "Beerware License",
+      "licenseId": "Beerware",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Beerware",
+        "https://people.freebsd.org/~phk/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Bitstream-Charter.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Bitstream-Charter.json",
+      "referenceNumber": 148,
+      "name": "Bitstream Charter Font License",
+      "licenseId": "Bitstream-Charter",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Charter#License_Text",
+        "https://raw.githubusercontent.com/blackhole89/notekit/master/data/fonts/Charter%20license.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Bitstream-Vera.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Bitstream-Vera.json",
+      "referenceNumber": 354,
+      "name": "Bitstream Vera Font License",
+      "licenseId": "Bitstream-Vera",
+      "seeAlso": [
+        "https://web.archive.org/web/20080207013128/http://www.gnome.org/fonts/",
+        "https://docubrain.com/sites/default/files/licenses/bitstream-vera.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BitTorrent-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BitTorrent-1.0.json",
+      "referenceNumber": 219,
+      "name": "BitTorrent Open Source License v1.0",
+      "licenseId": "BitTorrent-1.0",
+      "seeAlso": [
+        "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/licenses/BitTorrent?r1\u003d1.1\u0026r2\u003d1.1.1.1\u0026diff_format\u003ds"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BitTorrent-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BitTorrent-1.1.json",
+      "referenceNumber": 176,
+      "name": "BitTorrent Open Source License v1.1",
+      "licenseId": "BitTorrent-1.1",
+      "seeAlso": [
+        "http://directory.fsf.org/wiki/License:BitTorrentOSL1.1"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/blessing.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/blessing.json",
+      "referenceNumber": 404,
+      "name": "SQLite Blessing",
+      "licenseId": "blessing",
+      "seeAlso": [
+        "https://www.sqlite.org/src/artifact/e33a4df7e32d742a?ln\u003d4-9",
+        "https://sqlite.org/src/artifact/df5091916dbb40e6"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BlueOak-1.0.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BlueOak-1.0.0.json",
+      "referenceNumber": 428,
+      "name": "Blue Oak Model License 1.0.0",
+      "licenseId": "BlueOak-1.0.0",
+      "seeAlso": [
+        "https://blueoakcouncil.org/license/1.0.0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Borceux.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Borceux.json",
+      "referenceNumber": 81,
+      "name": "Borceux license",
+      "licenseId": "Borceux",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Borceux"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Brian-Gladman-3-Clause.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Brian-Gladman-3-Clause.json",
+      "referenceNumber": 220,
+      "name": "Brian Gladman 3-Clause License",
+      "licenseId": "Brian-Gladman-3-Clause",
+      "seeAlso": [
+        "https://github.com/SWI-Prolog/packages-clib/blob/master/sha1/brg_endian.h"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-1-Clause.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-1-Clause.json",
+      "referenceNumber": 517,
+      "name": "BSD 1-Clause License",
+      "licenseId": "BSD-1-Clause",
+      "seeAlso": [
+        "https://svnweb.freebsd.org/base/head/include/ifaddrs.h?revision\u003d326823"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-2-Clause.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause.json",
+      "referenceNumber": 167,
+      "name": "BSD 2-Clause \"Simplified\" License",
+      "licenseId": "BSD-2-Clause",
+      "seeAlso": [
+        "https://opensource.org/licenses/BSD-2-Clause"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-2-Clause-FreeBSD.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-FreeBSD.json",
+      "referenceNumber": 489,
+      "name": "BSD 2-Clause FreeBSD License",
+      "licenseId": "BSD-2-Clause-FreeBSD",
+      "seeAlso": [
+        "http://www.freebsd.org/copyright/freebsd-license.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-2-Clause-NetBSD.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-NetBSD.json",
+      "referenceNumber": 114,
+      "name": "BSD 2-Clause NetBSD License",
+      "licenseId": "BSD-2-Clause-NetBSD",
+      "seeAlso": [
+        "http://www.netbsd.org/about/redistribution.html#default"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-2-Clause-Patent.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-Patent.json",
+      "referenceNumber": 352,
+      "name": "BSD-2-Clause Plus Patent License",
+      "licenseId": "BSD-2-Clause-Patent",
+      "seeAlso": [
+        "https://opensource.org/licenses/BSDplusPatent"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-2-Clause-Views.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-Views.json",
+      "referenceNumber": 531,
+      "name": "BSD 2-Clause with views sentence",
+      "licenseId": "BSD-2-Clause-Views",
+      "seeAlso": [
+        "http://www.freebsd.org/copyright/freebsd-license.html",
+        "https://people.freebsd.org/~ivoras/wine/patch-wine-nvidia.sh",
+        "https://github.com/protegeproject/protege/blob/master/license.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-3-Clause.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause.json",
+      "referenceNumber": 491,
+      "name": "BSD 3-Clause \"New\" or \"Revised\" License",
+      "licenseId": "BSD-3-Clause",
+      "seeAlso": [
+        "https://opensource.org/licenses/BSD-3-Clause",
+        "https://www.eclipse.org/org/documents/edl-v10.php"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-3-Clause-Attribution.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Attribution.json",
+      "referenceNumber": 318,
+      "name": "BSD with attribution",
+      "licenseId": "BSD-3-Clause-Attribution",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/BSD_with_Attribution"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-3-Clause-Clear.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Clear.json",
+      "referenceNumber": 522,
+      "name": "BSD 3-Clause Clear License",
+      "licenseId": "BSD-3-Clause-Clear",
+      "seeAlso": [
+        "http://labs.metacarta.com/license-explanation.html#license"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-3-Clause-LBNL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-LBNL.json",
+      "referenceNumber": 375,
+      "name": "Lawrence Berkeley National Labs BSD variant license",
+      "licenseId": "BSD-3-Clause-LBNL",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/LBNLBSD"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-3-Clause-Modification.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Modification.json",
+      "referenceNumber": 527,
+      "name": "BSD 3-Clause Modification",
+      "licenseId": "BSD-3-Clause-Modification",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing:BSD#Modification_Variant"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-3-Clause-No-Military-License.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-No-Military-License.json",
+      "referenceNumber": 227,
+      "name": "BSD 3-Clause No Military License",
+      "licenseId": "BSD-3-Clause-No-Military-License",
+      "seeAlso": [
+        "https://gitlab.syncad.com/hive/dhive/-/blob/master/LICENSE",
+        "https://github.com/greymass/swift-eosio/blob/master/LICENSE"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License.json",
+      "referenceNumber": 260,
+      "name": "BSD 3-Clause No Nuclear License",
+      "licenseId": "BSD-3-Clause-No-Nuclear-License",
+      "seeAlso": [
+        "http://download.oracle.com/otn-pub/java/licenses/bsd.txt?AuthParam\u003d1467140197_43d516ce1776bd08a58235a7785be1cc"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License-2014.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License-2014.json",
+      "referenceNumber": 94,
+      "name": "BSD 3-Clause No Nuclear License 2014",
+      "licenseId": "BSD-3-Clause-No-Nuclear-License-2014",
+      "seeAlso": [
+        "https://java.net/projects/javaeetutorial/pages/BerkeleyLicense"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-Warranty.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-Warranty.json",
+      "referenceNumber": 10,
+      "name": "BSD 3-Clause No Nuclear Warranty",
+      "licenseId": "BSD-3-Clause-No-Nuclear-Warranty",
+      "seeAlso": [
+        "https://jogamp.org/git/?p\u003dgluegen.git;a\u003dblob_plain;f\u003dLICENSE.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-3-Clause-Open-MPI.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Open-MPI.json",
+      "referenceNumber": 345,
+      "name": "BSD 3-Clause Open MPI variant",
+      "licenseId": "BSD-3-Clause-Open-MPI",
+      "seeAlso": [
+        "https://www.open-mpi.org/community/license.php",
+        "http://www.netlib.org/lapack/LICENSE.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-4-Clause.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-4-Clause.json",
+      "referenceNumber": 453,
+      "name": "BSD 4-Clause \"Original\" or \"Old\" License",
+      "licenseId": "BSD-4-Clause",
+      "seeAlso": [
+        "http://directory.fsf.org/wiki/License:BSD_4Clause"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-4-Clause-Shortened.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-4-Clause-Shortened.json",
+      "referenceNumber": 477,
+      "name": "BSD 4 Clause Shortened",
+      "licenseId": "BSD-4-Clause-Shortened",
+      "seeAlso": [
+        "https://metadata.ftp-master.debian.org/changelogs//main/a/arpwatch/arpwatch_2.1a15-7_copyright"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-4-Clause-UC.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-4-Clause-UC.json",
+      "referenceNumber": 188,
+      "name": "BSD-4-Clause (University of California-Specific)",
+      "licenseId": "BSD-4-Clause-UC",
+      "seeAlso": [
+        "http://www.freebsd.org/copyright/license.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-4.3RENO.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-4.3RENO.json",
+      "referenceNumber": 131,
+      "name": "BSD 4.3 RENO License",
+      "licenseId": "BSD-4.3RENO",
+      "seeAlso": [
+        "https://sourceware.org/git/?p\u003dbinutils-gdb.git;a\u003dblob;f\u003dlibiberty/strcasecmp.c;h\u003d131d81c2ce7881fa48c363dc5bf5fb302c61ce0b;hb\u003dHEAD"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-4.3TAHOE.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-4.3TAHOE.json",
+      "referenceNumber": 41,
+      "name": "BSD 4.3 TAHOE License",
+      "licenseId": "BSD-4.3TAHOE",
+      "seeAlso": [
+        "https://github.com/389ds/389-ds-base/blob/main/ldap/include/sysexits-compat.h#L15"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-Advertising-Acknowledgement.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-Advertising-Acknowledgement.json",
+      "referenceNumber": 373,
+      "name": "BSD Advertising Acknowledgement License",
+      "licenseId": "BSD-Advertising-Acknowledgement",
+      "seeAlso": [
+        "https://github.com/python-excel/xlrd/blob/master/LICENSE#L33"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-Attribution-HPND-disclaimer.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-Attribution-HPND-disclaimer.json",
+      "referenceNumber": 83,
+      "name": "BSD with Attribution and HPND disclaimer",
+      "licenseId": "BSD-Attribution-HPND-disclaimer",
+      "seeAlso": [
+        "https://github.com/cyrusimap/cyrus-sasl/blob/master/COPYING"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-Protection.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-Protection.json",
+      "referenceNumber": 461,
+      "name": "BSD Protection License",
+      "licenseId": "BSD-Protection",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/BSD_Protection_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSD-Source-Code.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSD-Source-Code.json",
+      "referenceNumber": 90,
+      "name": "BSD Source Code Attribution",
+      "licenseId": "BSD-Source-Code",
+      "seeAlso": [
+        "https://github.com/robbiehanson/CocoaHTTPServer/blob/master/LICENSE.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/BSL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BSL-1.0.json",
+      "referenceNumber": 262,
+      "name": "Boost Software License 1.0",
+      "licenseId": "BSL-1.0",
+      "seeAlso": [
+        "http://www.boost.org/LICENSE_1_0.txt",
+        "https://opensource.org/licenses/BSL-1.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/BUSL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/BUSL-1.1.json",
+      "referenceNumber": 378,
+      "name": "Business Source License 1.1",
+      "licenseId": "BUSL-1.1",
+      "seeAlso": [
+        "https://mariadb.com/bsl11/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/bzip2-1.0.5.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/bzip2-1.0.5.json",
+      "referenceNumber": 76,
+      "name": "bzip2 and libbzip2 License v1.0.5",
+      "licenseId": "bzip2-1.0.5",
+      "seeAlso": [
+        "https://sourceware.org/bzip2/1.0.5/bzip2-manual-1.0.5.html",
+        "http://bzip.org/1.0.5/bzip2-manual-1.0.5.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/bzip2-1.0.6.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/bzip2-1.0.6.json",
+      "referenceNumber": 296,
+      "name": "bzip2 and libbzip2 License v1.0.6",
+      "licenseId": "bzip2-1.0.6",
+      "seeAlso": [
+        "https://sourceware.org/git/?p\u003dbzip2.git;a\u003dblob;f\u003dLICENSE;hb\u003dbzip2-1.0.6",
+        "http://bzip.org/1.0.5/bzip2-manual-1.0.5.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/C-UDA-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/C-UDA-1.0.json",
+      "referenceNumber": 310,
+      "name": "Computational Use of Data Agreement v1.0",
+      "licenseId": "C-UDA-1.0",
+      "seeAlso": [
+        "https://github.com/microsoft/Computational-Use-of-Data-Agreement/blob/master/C-UDA-1.0.md",
+        "https://cdla.dev/computational-use-of-data-agreement-v1-0/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CAL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CAL-1.0.json",
+      "referenceNumber": 56,
+      "name": "Cryptographic Autonomy License 1.0",
+      "licenseId": "CAL-1.0",
+      "seeAlso": [
+        "http://cryptographicautonomylicense.com/license-text.html",
+        "https://opensource.org/licenses/CAL-1.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CAL-1.0-Combined-Work-Exception.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CAL-1.0-Combined-Work-Exception.json",
+      "referenceNumber": 180,
+      "name": "Cryptographic Autonomy License 1.0 (Combined Work Exception)",
+      "licenseId": "CAL-1.0-Combined-Work-Exception",
+      "seeAlso": [
+        "http://cryptographicautonomylicense.com/license-text.html",
+        "https://opensource.org/licenses/CAL-1.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Caldera.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Caldera.json",
+      "referenceNumber": 168,
+      "name": "Caldera License",
+      "licenseId": "Caldera",
+      "seeAlso": [
+        "http://www.lemis.com/grog/UNIX/ancient-source-all.pdf"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CATOSL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CATOSL-1.1.json",
+      "referenceNumber": 413,
+      "name": "Computer Associates Trusted Open Source License 1.1",
+      "licenseId": "CATOSL-1.1",
+      "seeAlso": [
+        "https://opensource.org/licenses/CATOSL-1.1"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-1.0.json",
+      "referenceNumber": 359,
+      "name": "Creative Commons Attribution 1.0 Generic",
+      "licenseId": "CC-BY-1.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by/1.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-2.0.json",
+      "referenceNumber": 450,
+      "name": "Creative Commons Attribution 2.0 Generic",
+      "licenseId": "CC-BY-2.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by/2.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-2.5.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-2.5.json",
+      "referenceNumber": 331,
+      "name": "Creative Commons Attribution 2.5 Generic",
+      "licenseId": "CC-BY-2.5",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by/2.5/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-2.5-AU.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-2.5-AU.json",
+      "referenceNumber": 291,
+      "name": "Creative Commons Attribution 2.5 Australia",
+      "licenseId": "CC-BY-2.5-AU",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by/2.5/au/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-3.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0.json",
+      "referenceNumber": 341,
+      "name": "Creative Commons Attribution 3.0 Unported",
+      "licenseId": "CC-BY-3.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by/3.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-3.0-AT.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-AT.json",
+      "referenceNumber": 14,
+      "name": "Creative Commons Attribution 3.0 Austria",
+      "licenseId": "CC-BY-3.0-AT",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by/3.0/at/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-3.0-DE.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-DE.json",
+      "referenceNumber": 28,
+      "name": "Creative Commons Attribution 3.0 Germany",
+      "licenseId": "CC-BY-3.0-DE",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by/3.0/de/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-3.0-IGO.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-IGO.json",
+      "referenceNumber": 488,
+      "name": "Creative Commons Attribution 3.0 IGO",
+      "licenseId": "CC-BY-3.0-IGO",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by/3.0/igo/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-3.0-NL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-NL.json",
+      "referenceNumber": 514,
+      "name": "Creative Commons Attribution 3.0 Netherlands",
+      "licenseId": "CC-BY-3.0-NL",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by/3.0/nl/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-3.0-US.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-US.json",
+      "referenceNumber": 133,
+      "name": "Creative Commons Attribution 3.0 United States",
+      "licenseId": "CC-BY-3.0-US",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by/3.0/us/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-4.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-4.0.json",
+      "referenceNumber": 159,
+      "name": "Creative Commons Attribution 4.0 International",
+      "licenseId": "CC-BY-4.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by/4.0/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-1.0.json",
+      "referenceNumber": 48,
+      "name": "Creative Commons Attribution Non Commercial 1.0 Generic",
+      "licenseId": "CC-BY-NC-1.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc/1.0/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-2.0.json",
+      "referenceNumber": 311,
+      "name": "Creative Commons Attribution Non Commercial 2.0 Generic",
+      "licenseId": "CC-BY-NC-2.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc/2.0/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-2.5.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-2.5.json",
+      "referenceNumber": 456,
+      "name": "Creative Commons Attribution Non Commercial 2.5 Generic",
+      "licenseId": "CC-BY-NC-2.5",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc/2.5/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-3.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-3.0.json",
+      "referenceNumber": 510,
+      "name": "Creative Commons Attribution Non Commercial 3.0 Unported",
+      "licenseId": "CC-BY-NC-3.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc/3.0/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-3.0-DE.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-3.0-DE.json",
+      "referenceNumber": 300,
+      "name": "Creative Commons Attribution Non Commercial 3.0 Germany",
+      "licenseId": "CC-BY-NC-3.0-DE",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc/3.0/de/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-4.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-4.0.json",
+      "referenceNumber": 284,
+      "name": "Creative Commons Attribution Non Commercial 4.0 International",
+      "licenseId": "CC-BY-NC-4.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc/4.0/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-1.0.json",
+      "referenceNumber": 433,
+      "name": "Creative Commons Attribution Non Commercial No Derivatives 1.0 Generic",
+      "licenseId": "CC-BY-NC-ND-1.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nd-nc/1.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-2.0.json",
+      "referenceNumber": 374,
+      "name": "Creative Commons Attribution Non Commercial No Derivatives 2.0 Generic",
+      "licenseId": "CC-BY-NC-ND-2.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-nd/2.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-2.5.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-2.5.json",
+      "referenceNumber": 7,
+      "name": "Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic",
+      "licenseId": "CC-BY-NC-ND-2.5",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-nd/2.5/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-3.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-3.0.json",
+      "referenceNumber": 448,
+      "name": "Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported",
+      "licenseId": "CC-BY-NC-ND-3.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-3.0-DE.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-3.0-DE.json",
+      "referenceNumber": 121,
+      "name": "Creative Commons Attribution Non Commercial No Derivatives 3.0 Germany",
+      "licenseId": "CC-BY-NC-ND-3.0-DE",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-nd/3.0/de/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-3.0-IGO.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-3.0-IGO.json",
+      "referenceNumber": 484,
+      "name": "Creative Commons Attribution Non Commercial No Derivatives 3.0 IGO",
+      "licenseId": "CC-BY-NC-ND-3.0-IGO",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-nd/3.0/igo/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-4.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-4.0.json",
+      "referenceNumber": 518,
+      "name": "Creative Commons Attribution Non Commercial No Derivatives 4.0 International",
+      "licenseId": "CC-BY-NC-ND-4.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-1.0.json",
+      "referenceNumber": 319,
+      "name": "Creative Commons Attribution Non Commercial Share Alike 1.0 Generic",
+      "licenseId": "CC-BY-NC-SA-1.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-sa/1.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.0.json",
+      "referenceNumber": 440,
+      "name": "Creative Commons Attribution Non Commercial Share Alike 2.0 Generic",
+      "licenseId": "CC-BY-NC-SA-2.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-sa/2.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-DE.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-DE.json",
+      "referenceNumber": 170,
+      "name": "Creative Commons Attribution Non Commercial Share Alike 2.0 Germany",
+      "licenseId": "CC-BY-NC-SA-2.0-DE",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-sa/2.0/de/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-FR.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-FR.json",
+      "referenceNumber": 82,
+      "name": "Creative Commons Attribution-NonCommercial-ShareAlike 2.0 France",
+      "licenseId": "CC-BY-NC-SA-2.0-FR",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-sa/2.0/fr/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-UK.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-UK.json",
+      "referenceNumber": 492,
+      "name": "Creative Commons Attribution Non Commercial Share Alike 2.0 England and Wales",
+      "licenseId": "CC-BY-NC-SA-2.0-UK",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-sa/2.0/uk/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.5.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.5.json",
+      "referenceNumber": 342,
+      "name": "Creative Commons Attribution Non Commercial Share Alike 2.5 Generic",
+      "licenseId": "CC-BY-NC-SA-2.5",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-sa/2.5/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-3.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-3.0.json",
+      "referenceNumber": 326,
+      "name": "Creative Commons Attribution Non Commercial Share Alike 3.0 Unported",
+      "licenseId": "CC-BY-NC-SA-3.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-3.0-DE.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-3.0-DE.json",
+      "referenceNumber": 335,
+      "name": "Creative Commons Attribution Non Commercial Share Alike 3.0 Germany",
+      "licenseId": "CC-BY-NC-SA-3.0-DE",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-sa/3.0/de/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-3.0-IGO.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-3.0-IGO.json",
+      "referenceNumber": 268,
+      "name": "Creative Commons Attribution Non Commercial Share Alike 3.0 IGO",
+      "licenseId": "CC-BY-NC-SA-3.0-IGO",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-sa/3.0/igo/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-4.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-4.0.json",
+      "referenceNumber": 395,
+      "name": "Creative Commons Attribution Non Commercial Share Alike 4.0 International",
+      "licenseId": "CC-BY-NC-SA-4.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-ND-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-1.0.json",
+      "referenceNumber": 411,
+      "name": "Creative Commons Attribution No Derivatives 1.0 Generic",
+      "licenseId": "CC-BY-ND-1.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nd/1.0/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-ND-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-2.0.json",
+      "referenceNumber": 101,
+      "name": "Creative Commons Attribution No Derivatives 2.0 Generic",
+      "licenseId": "CC-BY-ND-2.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nd/2.0/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-ND-2.5.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-2.5.json",
+      "referenceNumber": 329,
+      "name": "Creative Commons Attribution No Derivatives 2.5 Generic",
+      "licenseId": "CC-BY-ND-2.5",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nd/2.5/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-ND-3.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-3.0.json",
+      "referenceNumber": 277,
+      "name": "Creative Commons Attribution No Derivatives 3.0 Unported",
+      "licenseId": "CC-BY-ND-3.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nd/3.0/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-ND-3.0-DE.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-3.0-DE.json",
+      "referenceNumber": 98,
+      "name": "Creative Commons Attribution No Derivatives 3.0 Germany",
+      "licenseId": "CC-BY-ND-3.0-DE",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nd/3.0/de/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-ND-4.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-4.0.json",
+      "referenceNumber": 222,
+      "name": "Creative Commons Attribution No Derivatives 4.0 International",
+      "licenseId": "CC-BY-ND-4.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-nd/4.0/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-SA-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-1.0.json",
+      "referenceNumber": 407,
+      "name": "Creative Commons Attribution Share Alike 1.0 Generic",
+      "licenseId": "CC-BY-SA-1.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-sa/1.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-SA-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-2.0.json",
+      "referenceNumber": 280,
+      "name": "Creative Commons Attribution Share Alike 2.0 Generic",
+      "licenseId": "CC-BY-SA-2.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-sa/2.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-SA-2.0-UK.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-2.0-UK.json",
+      "referenceNumber": 57,
+      "name": "Creative Commons Attribution Share Alike 2.0 England and Wales",
+      "licenseId": "CC-BY-SA-2.0-UK",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-sa/2.0/uk/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-SA-2.1-JP.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-2.1-JP.json",
+      "referenceNumber": 130,
+      "name": "Creative Commons Attribution Share Alike 2.1 Japan",
+      "licenseId": "CC-BY-SA-2.1-JP",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-sa/2.1/jp/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-SA-2.5.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-2.5.json",
+      "referenceNumber": 241,
+      "name": "Creative Commons Attribution Share Alike 2.5 Generic",
+      "licenseId": "CC-BY-SA-2.5",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-sa/2.5/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-SA-3.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-3.0.json",
+      "referenceNumber": 208,
+      "name": "Creative Commons Attribution Share Alike 3.0 Unported",
+      "licenseId": "CC-BY-SA-3.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-sa/3.0/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-SA-3.0-AT.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-3.0-AT.json",
+      "referenceNumber": 210,
+      "name": "Creative Commons Attribution Share Alike 3.0 Austria",
+      "licenseId": "CC-BY-SA-3.0-AT",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-sa/3.0/at/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-SA-3.0-DE.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-3.0-DE.json",
+      "referenceNumber": 513,
+      "name": "Creative Commons Attribution Share Alike 3.0 Germany",
+      "licenseId": "CC-BY-SA-3.0-DE",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-sa/3.0/de/legalcode"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-BY-SA-4.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-4.0.json",
+      "referenceNumber": 154,
+      "name": "Creative Commons Attribution Share Alike 4.0 International",
+      "licenseId": "CC-BY-SA-4.0",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/by-sa/4.0/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC-PDDC.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC-PDDC.json",
+      "referenceNumber": 238,
+      "name": "Creative Commons Public Domain Dedication and Certification",
+      "licenseId": "CC-PDDC",
+      "seeAlso": [
+        "https://creativecommons.org/licenses/publicdomain/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CC0-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CC0-1.0.json",
+      "referenceNumber": 189,
+      "name": "Creative Commons Zero v1.0 Universal",
+      "licenseId": "CC0-1.0",
+      "seeAlso": [
+        "https://creativecommons.org/publicdomain/zero/1.0/legalcode"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CDDL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CDDL-1.0.json",
+      "referenceNumber": 437,
+      "name": "Common Development and Distribution License 1.0",
+      "licenseId": "CDDL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/cddl1"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CDDL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CDDL-1.1.json",
+      "referenceNumber": 39,
+      "name": "Common Development and Distribution License 1.1",
+      "licenseId": "CDDL-1.1",
+      "seeAlso": [
+        "http://glassfish.java.net/public/CDDL+GPL_1_1.html",
+        "https://javaee.github.io/glassfish/LICENSE"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CDL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CDL-1.0.json",
+      "referenceNumber": 171,
+      "name": "Common Documentation License 1.0",
+      "licenseId": "CDL-1.0",
+      "seeAlso": [
+        "http://www.opensource.apple.com/cdl/",
+        "https://fedoraproject.org/wiki/Licensing/Common_Documentation_License",
+        "https://www.gnu.org/licenses/license-list.html#ACDL"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CDLA-Permissive-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CDLA-Permissive-1.0.json",
+      "referenceNumber": 307,
+      "name": "Community Data License Agreement Permissive 1.0",
+      "licenseId": "CDLA-Permissive-1.0",
+      "seeAlso": [
+        "https://cdla.io/permissive-1-0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CDLA-Permissive-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CDLA-Permissive-2.0.json",
+      "referenceNumber": 25,
+      "name": "Community Data License Agreement Permissive 2.0",
+      "licenseId": "CDLA-Permissive-2.0",
+      "seeAlso": [
+        "https://cdla.dev/permissive-2-0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CDLA-Sharing-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CDLA-Sharing-1.0.json",
+      "referenceNumber": 506,
+      "name": "Community Data License Agreement Sharing 1.0",
+      "licenseId": "CDLA-Sharing-1.0",
+      "seeAlso": [
+        "https://cdla.io/sharing-1-0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CECILL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CECILL-1.0.json",
+      "referenceNumber": 459,
+      "name": "CeCILL Free Software License Agreement v1.0",
+      "licenseId": "CECILL-1.0",
+      "seeAlso": [
+        "http://www.cecill.info/licences/Licence_CeCILL_V1-fr.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CECILL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CECILL-1.1.json",
+      "referenceNumber": 179,
+      "name": "CeCILL Free Software License Agreement v1.1",
+      "licenseId": "CECILL-1.1",
+      "seeAlso": [
+        "http://www.cecill.info/licences/Licence_CeCILL_V1.1-US.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CECILL-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CECILL-2.0.json",
+      "referenceNumber": 87,
+      "name": "CeCILL Free Software License Agreement v2.0",
+      "licenseId": "CECILL-2.0",
+      "seeAlso": [
+        "http://www.cecill.info/licences/Licence_CeCILL_V2-en.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CECILL-2.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CECILL-2.1.json",
+      "referenceNumber": 511,
+      "name": "CeCILL Free Software License Agreement v2.1",
+      "licenseId": "CECILL-2.1",
+      "seeAlso": [
+        "http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.html"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CECILL-B.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CECILL-B.json",
+      "referenceNumber": 346,
+      "name": "CeCILL-B Free Software License Agreement",
+      "licenseId": "CECILL-B",
+      "seeAlso": [
+        "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CECILL-C.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CECILL-C.json",
+      "referenceNumber": 49,
+      "name": "CeCILL-C Free Software License Agreement",
+      "licenseId": "CECILL-C",
+      "seeAlso": [
+        "http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CERN-OHL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CERN-OHL-1.1.json",
+      "referenceNumber": 107,
+      "name": "CERN Open Hardware Licence v1.1",
+      "licenseId": "CERN-OHL-1.1",
+      "seeAlso": [
+        "https://www.ohwr.org/project/licenses/wikis/cern-ohl-v1.1"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CERN-OHL-1.2.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CERN-OHL-1.2.json",
+      "referenceNumber": 336,
+      "name": "CERN Open Hardware Licence v1.2",
+      "licenseId": "CERN-OHL-1.2",
+      "seeAlso": [
+        "https://www.ohwr.org/project/licenses/wikis/cern-ohl-v1.2"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CERN-OHL-P-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CERN-OHL-P-2.0.json",
+      "referenceNumber": 294,
+      "name": "CERN Open Hardware Licence Version 2 - Permissive",
+      "licenseId": "CERN-OHL-P-2.0",
+      "seeAlso": [
+        "https://www.ohwr.org/project/cernohl/wikis/Documents/CERN-OHL-version-2"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CERN-OHL-S-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CERN-OHL-S-2.0.json",
+      "referenceNumber": 128,
+      "name": "CERN Open Hardware Licence Version 2 - Strongly Reciprocal",
+      "licenseId": "CERN-OHL-S-2.0",
+      "seeAlso": [
+        "https://www.ohwr.org/project/cernohl/wikis/Documents/CERN-OHL-version-2"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CERN-OHL-W-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CERN-OHL-W-2.0.json",
+      "referenceNumber": 254,
+      "name": "CERN Open Hardware Licence Version 2 - Weakly Reciprocal",
+      "licenseId": "CERN-OHL-W-2.0",
+      "seeAlso": [
+        "https://www.ohwr.org/project/cernohl/wikis/Documents/CERN-OHL-version-2"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CFITSIO.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CFITSIO.json",
+      "referenceNumber": 415,
+      "name": "CFITSIO License",
+      "licenseId": "CFITSIO",
+      "seeAlso": [
+        "https://heasarc.gsfc.nasa.gov/docs/software/fitsio/c/f_user/node9.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/checkmk.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/checkmk.json",
+      "referenceNumber": 115,
+      "name": "Checkmk License",
+      "licenseId": "checkmk",
+      "seeAlso": [
+        "https://github.com/libcheck/check/blob/master/checkmk/checkmk.in"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/ClArtistic.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ClArtistic.json",
+      "referenceNumber": 231,
+      "name": "Clarified Artistic License",
+      "licenseId": "ClArtistic",
+      "seeAlso": [
+        "http://gianluca.dellavedova.org/2011/01/03/clarified-artistic-license/",
+        "http://www.ncftp.com/ncftp/doc/LICENSE.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Clips.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Clips.json",
+      "referenceNumber": 381,
+      "name": "Clips License",
+      "licenseId": "Clips",
+      "seeAlso": [
+        "https://github.com/DrItanium/maya/blob/master/LICENSE.CLIPS"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CMU-Mach.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CMU-Mach.json",
+      "referenceNumber": 132,
+      "name": "CMU Mach License",
+      "licenseId": "CMU-Mach",
+      "seeAlso": [
+        "https://www.cs.cmu.edu/~410/licenses.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CNRI-Jython.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CNRI-Jython.json",
+      "referenceNumber": 320,
+      "name": "CNRI Jython License",
+      "licenseId": "CNRI-Jython",
+      "seeAlso": [
+        "http://www.jython.org/license.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CNRI-Python.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CNRI-Python.json",
+      "referenceNumber": 399,
+      "name": "CNRI Python License",
+      "licenseId": "CNRI-Python",
+      "seeAlso": [
+        "https://opensource.org/licenses/CNRI-Python"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CNRI-Python-GPL-Compatible.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CNRI-Python-GPL-Compatible.json",
+      "referenceNumber": 358,
+      "name": "CNRI Python Open Source GPL Compatible License Agreement",
+      "licenseId": "CNRI-Python-GPL-Compatible",
+      "seeAlso": [
+        "http://www.python.org/download/releases/1.6.1/download_win/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/COIL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/COIL-1.0.json",
+      "referenceNumber": 365,
+      "name": "Copyfree Open Innovation License",
+      "licenseId": "COIL-1.0",
+      "seeAlso": [
+        "https://coil.apotheon.org/plaintext/01.0.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Community-Spec-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Community-Spec-1.0.json",
+      "referenceNumber": 263,
+      "name": "Community Specification License 1.0",
+      "licenseId": "Community-Spec-1.0",
+      "seeAlso": [
+        "https://github.com/CommunitySpecification/1.0/blob/master/1._Community_Specification_License-v1.md"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Condor-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Condor-1.1.json",
+      "referenceNumber": 261,
+      "name": "Condor Public License v1.1",
+      "licenseId": "Condor-1.1",
+      "seeAlso": [
+        "http://research.cs.wisc.edu/condor/license.html#condor",
+        "http://web.archive.org/web/20111123062036/http://research.cs.wisc.edu/condor/license.html#condor"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/copyleft-next-0.3.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/copyleft-next-0.3.0.json",
+      "referenceNumber": 405,
+      "name": "copyleft-next 0.3.0",
+      "licenseId": "copyleft-next-0.3.0",
+      "seeAlso": [
+        "https://github.com/copyleft-next/copyleft-next/blob/master/Releases/copyleft-next-0.3.0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/copyleft-next-0.3.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/copyleft-next-0.3.1.json",
+      "referenceNumber": 458,
+      "name": "copyleft-next 0.3.1",
+      "licenseId": "copyleft-next-0.3.1",
+      "seeAlso": [
+        "https://github.com/copyleft-next/copyleft-next/blob/master/Releases/copyleft-next-0.3.1"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Cornell-Lossless-JPEG.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Cornell-Lossless-JPEG.json",
+      "referenceNumber": 396,
+      "name": "Cornell Lossless JPEG License",
+      "licenseId": "Cornell-Lossless-JPEG",
+      "seeAlso": [
+        "https://android.googlesource.com/platform/external/dng_sdk/+/refs/heads/master/source/dng_lossless_jpeg.cpp#16",
+        "https://www.mssl.ucl.ac.uk/~mcrw/src/20050920/proto.h",
+        "https://gitlab.freedesktop.org/libopenraw/libopenraw/blob/master/lib/ljpegdecompressor.cpp#L32"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CPAL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CPAL-1.0.json",
+      "referenceNumber": 299,
+      "name": "Common Public Attribution License 1.0",
+      "licenseId": "CPAL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/CPAL-1.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CPL-1.0.json",
+      "referenceNumber": 166,
+      "name": "Common Public License 1.0",
+      "licenseId": "CPL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/CPL-1.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/CPOL-1.02.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CPOL-1.02.json",
+      "referenceNumber": 471,
+      "name": "Code Project Open License 1.02",
+      "licenseId": "CPOL-1.02",
+      "seeAlso": [
+        "http://www.codeproject.com/info/cpol10.aspx"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Crossword.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Crossword.json",
+      "referenceNumber": 138,
+      "name": "Crossword License",
+      "licenseId": "Crossword",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Crossword"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CrystalStacker.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CrystalStacker.json",
+      "referenceNumber": 193,
+      "name": "CrystalStacker License",
+      "licenseId": "CrystalStacker",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing:CrystalStacker?rd\u003dLicensing/CrystalStacker"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/CUA-OPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/CUA-OPL-1.0.json",
+      "referenceNumber": 13,
+      "name": "CUA Office Public License v1.0",
+      "licenseId": "CUA-OPL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/CUA-OPL-1.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Cube.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Cube.json",
+      "referenceNumber": 29,
+      "name": "Cube License",
+      "licenseId": "Cube",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Cube"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/curl.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/curl.json",
+      "referenceNumber": 163,
+      "name": "curl License",
+      "licenseId": "curl",
+      "seeAlso": [
+        "https://github.com/bagder/curl/blob/master/COPYING"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/D-FSL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/D-FSL-1.0.json",
+      "referenceNumber": 253,
+      "name": "Deutsche Freie Software Lizenz",
+      "licenseId": "D-FSL-1.0",
+      "seeAlso": [
+        "http://www.dipp.nrw.de/d-fsl/lizenzen/",
+        "http://www.dipp.nrw.de/d-fsl/index_html/lizenzen/de/D-FSL-1_0_de.txt",
+        "http://www.dipp.nrw.de/d-fsl/index_html/lizenzen/en/D-FSL-1_0_en.txt",
+        "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl",
+        "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl/deutsche-freie-software-lizenz",
+        "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl/german-free-software-license",
+        "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl/D-FSL-1_0_de.txt/at_download/file",
+        "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl/D-FSL-1_0_en.txt/at_download/file"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/diffmark.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/diffmark.json",
+      "referenceNumber": 37,
+      "name": "diffmark license",
+      "licenseId": "diffmark",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/diffmark"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/DL-DE-BY-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/DL-DE-BY-2.0.json",
+      "referenceNumber": 385,
+      "name": "Data licence Germany – attribution – version 2.0",
+      "licenseId": "DL-DE-BY-2.0",
+      "seeAlso": [
+        "https://www.govdata.de/dl-de/by-2-0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/DOC.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/DOC.json",
+      "referenceNumber": 421,
+      "name": "DOC License",
+      "licenseId": "DOC",
+      "seeAlso": [
+        "http://www.cs.wustl.edu/~schmidt/ACE-copying.html",
+        "https://www.dre.vanderbilt.edu/~schmidt/ACE-copying.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Dotseqn.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Dotseqn.json",
+      "referenceNumber": 59,
+      "name": "Dotseqn License",
+      "licenseId": "Dotseqn",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Dotseqn"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/DRL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/DRL-1.0.json",
+      "referenceNumber": 264,
+      "name": "Detection Rule License 1.0",
+      "licenseId": "DRL-1.0",
+      "seeAlso": [
+        "https://github.com/Neo23x0/sigma/blob/master/LICENSE.Detection.Rules.md"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/DSDP.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/DSDP.json",
+      "referenceNumber": 46,
+      "name": "DSDP License",
+      "licenseId": "DSDP",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/DSDP"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/dvipdfm.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/dvipdfm.json",
+      "referenceNumber": 136,
+      "name": "dvipdfm License",
+      "licenseId": "dvipdfm",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/dvipdfm"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/ECL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ECL-1.0.json",
+      "referenceNumber": 151,
+      "name": "Educational Community License v1.0",
+      "licenseId": "ECL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/ECL-1.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/ECL-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ECL-2.0.json",
+      "referenceNumber": 216,
+      "name": "Educational Community License v2.0",
+      "licenseId": "ECL-2.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/ECL-2.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/eCos-2.0.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/eCos-2.0.json",
+      "referenceNumber": 224,
+      "name": "eCos license version 2.0",
+      "licenseId": "eCos-2.0",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/ecos-license.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/EFL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/EFL-1.0.json",
+      "referenceNumber": 388,
+      "name": "Eiffel Forum License v1.0",
+      "licenseId": "EFL-1.0",
+      "seeAlso": [
+        "http://www.eiffel-nice.org/license/forum.txt",
+        "https://opensource.org/licenses/EFL-1.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/EFL-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/EFL-2.0.json",
+      "referenceNumber": 283,
+      "name": "Eiffel Forum License v2.0",
+      "licenseId": "EFL-2.0",
+      "seeAlso": [
+        "http://www.eiffel-nice.org/license/eiffel-forum-license-2.html",
+        "https://opensource.org/licenses/EFL-2.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/eGenix.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/eGenix.json",
+      "referenceNumber": 403,
+      "name": "eGenix.com Public License 1.1.0",
+      "licenseId": "eGenix",
+      "seeAlso": [
+        "http://www.egenix.com/products/eGenix.com-Public-License-1.1.0.pdf",
+        "https://fedoraproject.org/wiki/Licensing/eGenix.com_Public_License_1.1.0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Elastic-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Elastic-2.0.json",
+      "referenceNumber": 149,
+      "name": "Elastic License 2.0",
+      "licenseId": "Elastic-2.0",
+      "seeAlso": [
+        "https://www.elastic.co/licensing/elastic-license",
+        "https://github.com/elastic/elasticsearch/blob/master/licenses/ELASTIC-LICENSE-2.0.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Entessa.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Entessa.json",
+      "referenceNumber": 337,
+      "name": "Entessa Public License v1.0",
+      "licenseId": "Entessa",
+      "seeAlso": [
+        "https://opensource.org/licenses/Entessa"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/EPICS.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/EPICS.json",
+      "referenceNumber": 252,
+      "name": "EPICS Open License",
+      "licenseId": "EPICS",
+      "seeAlso": [
+        "https://epics.anl.gov/license/open.php"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/EPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/EPL-1.0.json",
+      "referenceNumber": 457,
+      "name": "Eclipse Public License 1.0",
+      "licenseId": "EPL-1.0",
+      "seeAlso": [
+        "http://www.eclipse.org/legal/epl-v10.html",
+        "https://opensource.org/licenses/EPL-1.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/EPL-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/EPL-2.0.json",
+      "referenceNumber": 105,
+      "name": "Eclipse Public License 2.0",
+      "licenseId": "EPL-2.0",
+      "seeAlso": [
+        "https://www.eclipse.org/legal/epl-2.0",
+        "https://www.opensource.org/licenses/EPL-2.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/ErlPL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ErlPL-1.1.json",
+      "referenceNumber": 126,
+      "name": "Erlang Public License v1.1",
+      "licenseId": "ErlPL-1.1",
+      "seeAlso": [
+        "http://www.erlang.org/EPLICENSE"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/etalab-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/etalab-2.0.json",
+      "referenceNumber": 157,
+      "name": "Etalab Open License 2.0",
+      "licenseId": "etalab-2.0",
+      "seeAlso": [
+        "https://github.com/DISIC/politique-de-contribution-open-source/blob/master/LICENSE.pdf",
+        "https://raw.githubusercontent.com/DISIC/politique-de-contribution-open-source/master/LICENSE"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/EUDatagrid.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/EUDatagrid.json",
+      "referenceNumber": 33,
+      "name": "EU DataGrid Software License",
+      "licenseId": "EUDatagrid",
+      "seeAlso": [
+        "http://eu-datagrid.web.cern.ch/eu-datagrid/license.html",
+        "https://opensource.org/licenses/EUDatagrid"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/EUPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/EUPL-1.0.json",
+      "referenceNumber": 494,
+      "name": "European Union Public License 1.0",
+      "licenseId": "EUPL-1.0",
+      "seeAlso": [
+        "http://ec.europa.eu/idabc/en/document/7330.html",
+        "http://ec.europa.eu/idabc/servlets/Doc027f.pdf?id\u003d31096"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/EUPL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/EUPL-1.1.json",
+      "referenceNumber": 526,
+      "name": "European Union Public License 1.1",
+      "licenseId": "EUPL-1.1",
+      "seeAlso": [
+        "https://joinup.ec.europa.eu/software/page/eupl/licence-eupl",
+        "https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/eupl1.1.-licence-en_0.pdf",
+        "https://opensource.org/licenses/EUPL-1.1"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/EUPL-1.2.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/EUPL-1.2.json",
+      "referenceNumber": 420,
+      "name": "European Union Public License 1.2",
+      "licenseId": "EUPL-1.2",
+      "seeAlso": [
+        "https://joinup.ec.europa.eu/page/eupl-text-11-12",
+        "https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/eupl_v1.2_en.pdf",
+        "https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt",
+        "https://joinup.ec.europa.eu/sites/default/files/inline-files/EUPL%20v1_2%20EN(1).txt",
+        "http://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri\u003dCELEX:32017D0863",
+        "https://opensource.org/licenses/EUPL-1.2"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Eurosym.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Eurosym.json",
+      "referenceNumber": 509,
+      "name": "Eurosym License",
+      "licenseId": "Eurosym",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Eurosym"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Fair.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Fair.json",
+      "referenceNumber": 306,
+      "name": "Fair License",
+      "licenseId": "Fair",
+      "seeAlso": [
+        "http://fairlicense.org/",
+        "https://opensource.org/licenses/Fair"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/FDK-AAC.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/FDK-AAC.json",
+      "referenceNumber": 95,
+      "name": "Fraunhofer FDK AAC Codec Library",
+      "licenseId": "FDK-AAC",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/FDK-AAC",
+        "https://directory.fsf.org/wiki/License:Fdk"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Frameworx-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Frameworx-1.0.json",
+      "referenceNumber": 317,
+      "name": "Frameworx Open License 1.0",
+      "licenseId": "Frameworx-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/Frameworx-1.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/FreeBSD-DOC.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/FreeBSD-DOC.json",
+      "referenceNumber": 516,
+      "name": "FreeBSD Documentation License",
+      "licenseId": "FreeBSD-DOC",
+      "seeAlso": [
+        "https://www.freebsd.org/copyright/freebsd-doc-license/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/FreeImage.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/FreeImage.json",
+      "referenceNumber": 196,
+      "name": "FreeImage Public License v1.0",
+      "licenseId": "FreeImage",
+      "seeAlso": [
+        "http://freeimage.sourceforge.net/freeimage-license.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/FSFAP.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/FSFAP.json",
+      "referenceNumber": 349,
+      "name": "FSF All Permissive License",
+      "licenseId": "FSFAP",
+      "seeAlso": [
+        "https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/FSFUL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/FSFUL.json",
+      "referenceNumber": 229,
+      "name": "FSF Unlimited License",
+      "licenseId": "FSFUL",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/FSF_Unlimited_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/FSFULLR.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/FSFULLR.json",
+      "referenceNumber": 68,
+      "name": "FSF Unlimited License (with License Retention)",
+      "licenseId": "FSFULLR",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/FSF_Unlimited_License#License_Retention_Variant"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/FSFULLRWD.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/FSFULLRWD.json",
+      "referenceNumber": 8,
+      "name": "FSF Unlimited License (With License Retention    and Warranty Disclaimer)",
+      "licenseId": "FSFULLRWD",
+      "seeAlso": [
+        "https://lists.gnu.org/archive/html/autoconf/2012-04/msg00061.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/FTL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/FTL.json",
+      "referenceNumber": 339,
+      "name": "Freetype Project License",
+      "licenseId": "FTL",
+      "seeAlso": [
+        "http://freetype.fis.uniroma2.it/FTL.TXT",
+        "http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT",
+        "http://gitlab.freedesktop.org/freetype/freetype/-/raw/master/docs/FTL.TXT"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GD.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GD.json",
+      "referenceNumber": 454,
+      "name": "GD License",
+      "licenseId": "GD",
+      "seeAlso": [
+        "https://libgd.github.io/manuals/2.3.0/files/license-txt.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.1.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1.json",
+      "referenceNumber": 91,
+      "name": "GNU Free Documentation License v1.1",
+      "licenseId": "GFDL-1.1",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.1-invariants-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-invariants-only.json",
+      "referenceNumber": 250,
+      "name": "GNU Free Documentation License v1.1 only - invariants",
+      "licenseId": "GFDL-1.1-invariants-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.1-invariants-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-invariants-or-later.json",
+      "referenceNumber": 174,
+      "name": "GNU Free Documentation License v1.1 or later - invariants",
+      "licenseId": "GFDL-1.1-invariants-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.1-no-invariants-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-no-invariants-only.json",
+      "referenceNumber": 482,
+      "name": "GNU Free Documentation License v1.1 only - no invariants",
+      "licenseId": "GFDL-1.1-no-invariants-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.1-no-invariants-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-no-invariants-or-later.json",
+      "referenceNumber": 293,
+      "name": "GNU Free Documentation License v1.1 or later - no invariants",
+      "licenseId": "GFDL-1.1-no-invariants-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.1-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-only.json",
+      "referenceNumber": 137,
+      "name": "GNU Free Documentation License v1.1 only",
+      "licenseId": "GFDL-1.1-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.1-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-or-later.json",
+      "referenceNumber": 369,
+      "name": "GNU Free Documentation License v1.1 or later",
+      "licenseId": "GFDL-1.1-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.2.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2.json",
+      "referenceNumber": 5,
+      "name": "GNU Free Documentation License v1.2",
+      "licenseId": "GFDL-1.2",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.2-invariants-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-invariants-only.json",
+      "referenceNumber": 314,
+      "name": "GNU Free Documentation License v1.2 only - invariants",
+      "licenseId": "GFDL-1.2-invariants-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.2-invariants-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-invariants-or-later.json",
+      "referenceNumber": 281,
+      "name": "GNU Free Documentation License v1.2 or later - invariants",
+      "licenseId": "GFDL-1.2-invariants-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.2-no-invariants-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-no-invariants-only.json",
+      "referenceNumber": 469,
+      "name": "GNU Free Documentation License v1.2 only - no invariants",
+      "licenseId": "GFDL-1.2-no-invariants-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.2-no-invariants-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-no-invariants-or-later.json",
+      "referenceNumber": 393,
+      "name": "GNU Free Documentation License v1.2 or later - no invariants",
+      "licenseId": "GFDL-1.2-no-invariants-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.2-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-only.json",
+      "referenceNumber": 124,
+      "name": "GNU Free Documentation License v1.2 only",
+      "licenseId": "GFDL-1.2-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.2-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-or-later.json",
+      "referenceNumber": 147,
+      "name": "GNU Free Documentation License v1.2 or later",
+      "licenseId": "GFDL-1.2-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.3.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3.json",
+      "referenceNumber": 15,
+      "name": "GNU Free Documentation License v1.3",
+      "licenseId": "GFDL-1.3",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/fdl-1.3.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.3-invariants-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-invariants-only.json",
+      "referenceNumber": 427,
+      "name": "GNU Free Documentation License v1.3 only - invariants",
+      "licenseId": "GFDL-1.3-invariants-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/fdl-1.3.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.3-invariants-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-invariants-or-later.json",
+      "referenceNumber": 287,
+      "name": "GNU Free Documentation License v1.3 or later - invariants",
+      "licenseId": "GFDL-1.3-invariants-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/fdl-1.3.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.3-no-invariants-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-no-invariants-only.json",
+      "referenceNumber": 425,
+      "name": "GNU Free Documentation License v1.3 only - no invariants",
+      "licenseId": "GFDL-1.3-no-invariants-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/fdl-1.3.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.3-no-invariants-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-no-invariants-or-later.json",
+      "referenceNumber": 64,
+      "name": "GNU Free Documentation License v1.3 or later - no invariants",
+      "licenseId": "GFDL-1.3-no-invariants-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/fdl-1.3.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.3-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-only.json",
+      "referenceNumber": 16,
+      "name": "GNU Free Documentation License v1.3 only",
+      "licenseId": "GFDL-1.3-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/fdl-1.3.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GFDL-1.3-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-or-later.json",
+      "referenceNumber": 444,
+      "name": "GNU Free Documentation License v1.3 or later",
+      "licenseId": "GFDL-1.3-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/fdl-1.3.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Giftware.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Giftware.json",
+      "referenceNumber": 135,
+      "name": "Giftware License",
+      "licenseId": "Giftware",
+      "seeAlso": [
+        "http://liballeg.org/license.html#allegro-4-the-giftware-license"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GL2PS.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GL2PS.json",
+      "referenceNumber": 325,
+      "name": "GL2PS License",
+      "licenseId": "GL2PS",
+      "seeAlso": [
+        "http://www.geuz.org/gl2ps/COPYING.GL2PS"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Glide.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Glide.json",
+      "referenceNumber": 434,
+      "name": "3dfx Glide License",
+      "licenseId": "Glide",
+      "seeAlso": [
+        "http://www.users.on.net/~triforce/glidexp/COPYING.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Glulxe.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Glulxe.json",
+      "referenceNumber": 246,
+      "name": "Glulxe License",
+      "licenseId": "Glulxe",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Glulxe"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GLWTPL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GLWTPL.json",
+      "referenceNumber": 74,
+      "name": "Good Luck With That Public License",
+      "licenseId": "GLWTPL",
+      "seeAlso": [
+        "https://github.com/me-shaon/GLWTPL/commit/da5f6bc734095efbacb442c0b31e33a65b9d6e85"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/gnuplot.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/gnuplot.json",
+      "referenceNumber": 36,
+      "name": "gnuplot License",
+      "licenseId": "gnuplot",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Gnuplot"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-1.0.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-1.0.json",
+      "referenceNumber": 483,
+      "name": "GNU General Public License v1.0 only",
+      "licenseId": "GPL-1.0",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-1.0+.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-1.0+.json",
+      "referenceNumber": 499,
+      "name": "GNU General Public License v1.0 or later",
+      "licenseId": "GPL-1.0+",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-1.0-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GPL-1.0-only.json",
+      "referenceNumber": 387,
+      "name": "GNU General Public License v1.0 only",
+      "licenseId": "GPL-1.0-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-1.0-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GPL-1.0-or-later.json",
+      "referenceNumber": 96,
+      "name": "GNU General Public License v1.0 or later",
+      "licenseId": "GPL-1.0-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-2.0.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-2.0.json",
+      "referenceNumber": 316,
+      "name": "GNU General Public License v2.0 only",
+      "licenseId": "GPL-2.0",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html",
+        "https://opensource.org/licenses/GPL-2.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-2.0+.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-2.0+.json",
+      "referenceNumber": 218,
+      "name": "GNU General Public License v2.0 or later",
+      "licenseId": "GPL-2.0+",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html",
+        "https://opensource.org/licenses/GPL-2.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-2.0-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-only.json",
+      "referenceNumber": 175,
+      "name": "GNU General Public License v2.0 only",
+      "licenseId": "GPL-2.0-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html",
+        "https://opensource.org/licenses/GPL-2.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-2.0-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-or-later.json",
+      "referenceNumber": 183,
+      "name": "GNU General Public License v2.0 or later",
+      "licenseId": "GPL-2.0-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html",
+        "https://opensource.org/licenses/GPL-2.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-2.0-with-autoconf-exception.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-autoconf-exception.json",
+      "referenceNumber": 327,
+      "name": "GNU General Public License v2.0 w/Autoconf exception",
+      "licenseId": "GPL-2.0-with-autoconf-exception",
+      "seeAlso": [
+        "http://ac-archive.sourceforge.net/doc/copyright.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-2.0-with-bison-exception.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-bison-exception.json",
+      "referenceNumber": 42,
+      "name": "GNU General Public License v2.0 w/Bison exception",
+      "licenseId": "GPL-2.0-with-bison-exception",
+      "seeAlso": [
+        "http://git.savannah.gnu.org/cgit/bison.git/tree/data/yacc.c?id\u003d193d7c7054ba7197b0789e14965b739162319b5e#n141"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-2.0-with-classpath-exception.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-classpath-exception.json",
+      "referenceNumber": 309,
+      "name": "GNU General Public License v2.0 w/Classpath exception",
+      "licenseId": "GPL-2.0-with-classpath-exception",
+      "seeAlso": [
+        "https://www.gnu.org/software/classpath/license.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-2.0-with-font-exception.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-font-exception.json",
+      "referenceNumber": 236,
+      "name": "GNU General Public License v2.0 w/Font exception",
+      "licenseId": "GPL-2.0-with-font-exception",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/gpl-faq.html#FontException"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-2.0-with-GCC-exception.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-GCC-exception.json",
+      "referenceNumber": 177,
+      "name": "GNU General Public License v2.0 w/GCC Runtime Library exception",
+      "licenseId": "GPL-2.0-with-GCC-exception",
+      "seeAlso": [
+        "https://gcc.gnu.org/git/?p\u003dgcc.git;a\u003dblob;f\u003dgcc/libgcc1.c;h\u003d762f5143fc6eed57b6797c82710f3538aa52b40b;hb\u003dcb143a3ce4fb417c68f5fa2691a1b1b1053dfba9#l10"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-3.0.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-3.0.json",
+      "referenceNumber": 479,
+      "name": "GNU General Public License v3.0 only",
+      "licenseId": "GPL-3.0",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/gpl-3.0-standalone.html",
+        "https://opensource.org/licenses/GPL-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-3.0+.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-3.0+.json",
+      "referenceNumber": 110,
+      "name": "GNU General Public License v3.0 or later",
+      "licenseId": "GPL-3.0+",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/gpl-3.0-standalone.html",
+        "https://opensource.org/licenses/GPL-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-3.0-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GPL-3.0-only.json",
+      "referenceNumber": 312,
+      "name": "GNU General Public License v3.0 only",
+      "licenseId": "GPL-3.0-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/gpl-3.0-standalone.html",
+        "https://opensource.org/licenses/GPL-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-3.0-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/GPL-3.0-or-later.json",
+      "referenceNumber": 338,
+      "name": "GNU General Public License v3.0 or later",
+      "licenseId": "GPL-3.0-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/gpl-3.0-standalone.html",
+        "https://opensource.org/licenses/GPL-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-3.0-with-autoconf-exception.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-3.0-with-autoconf-exception.json",
+      "referenceNumber": 442,
+      "name": "GNU General Public License v3.0 w/Autoconf exception",
+      "licenseId": "GPL-3.0-with-autoconf-exception",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/autoconf-exception-3.0.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/GPL-3.0-with-GCC-exception.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/GPL-3.0-with-GCC-exception.json",
+      "referenceNumber": 363,
+      "name": "GNU General Public License v3.0 w/GCC Runtime Library exception",
+      "licenseId": "GPL-3.0-with-GCC-exception",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/gcc-exception-3.1.html"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Graphics-Gems.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Graphics-Gems.json",
+      "referenceNumber": 26,
+      "name": "Graphics Gems License",
+      "licenseId": "Graphics-Gems",
+      "seeAlso": [
+        "https://github.com/erich666/GraphicsGems/blob/master/LICENSE.md"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/gSOAP-1.3b.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/gSOAP-1.3b.json",
+      "referenceNumber": 532,
+      "name": "gSOAP Public License v1.3b",
+      "licenseId": "gSOAP-1.3b",
+      "seeAlso": [
+        "http://www.cs.fsu.edu/~engelen/license.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/HaskellReport.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/HaskellReport.json",
+      "referenceNumber": 350,
+      "name": "Haskell Language Report License",
+      "licenseId": "HaskellReport",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Haskell_Language_Report_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Hippocratic-2.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Hippocratic-2.1.json",
+      "referenceNumber": 165,
+      "name": "Hippocratic License 2.1",
+      "licenseId": "Hippocratic-2.1",
+      "seeAlso": [
+        "https://firstdonoharm.dev/version/2/1/license.html",
+        "https://github.com/EthicalSource/hippocratic-license/blob/58c0e646d64ff6fbee275bfe2b9492f914e3ab2a/LICENSE.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/HP-1986.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/HP-1986.json",
+      "referenceNumber": 119,
+      "name": "Hewlett-Packard 1986 License",
+      "licenseId": "HP-1986",
+      "seeAlso": [
+        "https://sourceware.org/git/?p\u003dnewlib-cygwin.git;a\u003dblob;f\u003dnewlib/libc/machine/hppa/memchr.S;h\u003d1cca3e5e8867aa4bffef1f75a5c1bba25c0c441e;hb\u003dHEAD#l2"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/HPND.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/HPND.json",
+      "referenceNumber": 502,
+      "name": "Historical Permission Notice and Disclaimer",
+      "licenseId": "HPND",
+      "seeAlso": [
+        "https://opensource.org/licenses/HPND"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/HPND-export-US.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/HPND-export-US.json",
+      "referenceNumber": 382,
+      "name": "HPND with US Government export control warning",
+      "licenseId": "HPND-export-US",
+      "seeAlso": [
+        "https://www.kermitproject.org/ck90.html#source"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/HPND-Markus-Kuhn.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/HPND-Markus-Kuhn.json",
+      "referenceNumber": 67,
+      "name": "Historical Permission Notice and Disclaimer - Markus Kuhn variant",
+      "licenseId": "HPND-Markus-Kuhn",
+      "seeAlso": [
+        "https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c",
+        "https://sourceware.org/git/?p\u003dbinutils-gdb.git;a\u003dblob;f\u003dreadline/readline/support/wcwidth.c;h\u003d0f5ec995796f4813abbcf4972aec0378ab74722a;hb\u003dHEAD#l55"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/HPND-sell-variant.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/HPND-sell-variant.json",
+      "referenceNumber": 328,
+      "name": "Historical Permission Notice and Disclaimer - sell variant",
+      "licenseId": "HPND-sell-variant",
+      "seeAlso": [
+        "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/sunrpc/auth_gss/gss_generic_token.c?h\u003dv4.19"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/HPND-sell-variant-MIT-disclaimer.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/HPND-sell-variant-MIT-disclaimer.json",
+      "referenceNumber": 288,
+      "name": "HPND sell variant with MIT disclaimer",
+      "licenseId": "HPND-sell-variant-MIT-disclaimer",
+      "seeAlso": [
+        "https://github.com/sigmavirus24/x11-ssh-askpass/blob/master/README"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/HTMLTIDY.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/HTMLTIDY.json",
+      "referenceNumber": 386,
+      "name": "HTML Tidy License",
+      "licenseId": "HTMLTIDY",
+      "seeAlso": [
+        "https://github.com/htacg/tidy-html5/blob/next/README/LICENSE.md"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/IBM-pibs.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/IBM-pibs.json",
+      "referenceNumber": 255,
+      "name": "IBM PowerPC Initialization and Boot Software",
+      "licenseId": "IBM-pibs",
+      "seeAlso": [
+        "http://git.denx.de/?p\u003du-boot.git;a\u003dblob;f\u003darch/powerpc/cpu/ppc4xx/miiphy.c;h\u003d297155fdafa064b955e53e9832de93bfb0cfb85b;hb\u003d9fab4bf4cc077c21e43941866f3f2c196f28670d"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/ICU.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ICU.json",
+      "referenceNumber": 242,
+      "name": "ICU License",
+      "licenseId": "ICU",
+      "seeAlso": [
+        "http://source.icu-project.org/repos/icu/icu/trunk/license.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/IEC-Code-Components-EULA.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/IEC-Code-Components-EULA.json",
+      "referenceNumber": 205,
+      "name": "IEC    Code Components End-user licence agreement",
+      "licenseId": "IEC-Code-Components-EULA",
+      "seeAlso": [
+        "https://www.iec.ch/webstore/custserv/pdf/CC-EULA.pdf",
+        "https://www.iec.ch/CCv1",
+        "https://www.iec.ch/copyright"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/IJG.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/IJG.json",
+      "referenceNumber": 184,
+      "name": "Independent JPEG Group License",
+      "licenseId": "IJG",
+      "seeAlso": [
+        "http://dev.w3.org/cvsweb/Amaya/libjpeg/Attic/README?rev\u003d1.2"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/IJG-short.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/IJG-short.json",
+      "referenceNumber": 431,
+      "name": "Independent JPEG Group License - short",
+      "licenseId": "IJG-short",
+      "seeAlso": [
+        "https://sourceforge.net/p/xmedcon/code/ci/master/tree/libs/ljpg/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/ImageMagick.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ImageMagick.json",
+      "referenceNumber": 211,
+      "name": "ImageMagick License",
+      "licenseId": "ImageMagick",
+      "seeAlso": [
+        "http://www.imagemagick.org/script/license.php"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/iMatix.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/iMatix.json",
+      "referenceNumber": 258,
+      "name": "iMatix Standard Function Library Agreement",
+      "licenseId": "iMatix",
+      "seeAlso": [
+        "http://legacy.imatix.com/html/sfl/sfl4.htm#license"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Imlib2.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Imlib2.json",
+      "referenceNumber": 423,
+      "name": "Imlib2 License",
+      "licenseId": "Imlib2",
+      "seeAlso": [
+        "http://trac.enlightenment.org/e/browser/trunk/imlib2/COPYING",
+        "https://git.enlightenment.org/legacy/imlib2.git/tree/COPYING"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Info-ZIP.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Info-ZIP.json",
+      "referenceNumber": 225,
+      "name": "Info-ZIP License",
+      "licenseId": "Info-ZIP",
+      "seeAlso": [
+        "http://www.info-zip.org/license.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Intel.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Intel.json",
+      "referenceNumber": 271,
+      "name": "Intel Open Source License",
+      "licenseId": "Intel",
+      "seeAlso": [
+        "https://opensource.org/licenses/Intel"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Intel-ACPI.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Intel-ACPI.json",
+      "referenceNumber": 144,
+      "name": "Intel ACPI Software License Agreement",
+      "licenseId": "Intel-ACPI",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Intel_ACPI_Software_License_Agreement"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Interbase-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Interbase-1.0.json",
+      "referenceNumber": 520,
+      "name": "Interbase Public License v1.0",
+      "licenseId": "Interbase-1.0",
+      "seeAlso": [
+        "https://web.archive.org/web/20060319014854/http://info.borland.com/devsupport/interbase/opensource/IPL.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/IPA.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/IPA.json",
+      "referenceNumber": 213,
+      "name": "IPA Font License",
+      "licenseId": "IPA",
+      "seeAlso": [
+        "https://opensource.org/licenses/IPA"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/IPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/IPL-1.0.json",
+      "referenceNumber": 178,
+      "name": "IBM Public License v1.0",
+      "licenseId": "IPL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/IPL-1.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/ISC.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ISC.json",
+      "referenceNumber": 228,
+      "name": "ISC License",
+      "licenseId": "ISC",
+      "seeAlso": [
+        "https://www.isc.org/licenses/",
+        "https://www.isc.org/downloads/software-support-policy/isc-license/",
+        "https://opensource.org/licenses/ISC"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Jam.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Jam.json",
+      "referenceNumber": 206,
+      "name": "Jam License",
+      "licenseId": "Jam",
+      "seeAlso": [
+        "https://www.boost.org/doc/libs/1_35_0/doc/html/jam.html",
+        "https://web.archive.org/web/20160330173339/https://swarm.workshop.perforce.com/files/guest/perforce_software/jam/src/README"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/JasPer-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/JasPer-2.0.json",
+      "referenceNumber": 243,
+      "name": "JasPer License",
+      "licenseId": "JasPer-2.0",
+      "seeAlso": [
+        "http://www.ece.uvic.ca/~mdadams/jasper/LICENSE"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/JPL-image.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/JPL-image.json",
+      "referenceNumber": 282,
+      "name": "JPL Image Use Policy",
+      "licenseId": "JPL-image",
+      "seeAlso": [
+        "https://www.jpl.nasa.gov/jpl-image-use-policy"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/JPNIC.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/JPNIC.json",
+      "referenceNumber": 330,
+      "name": "Japan Network Information Center License",
+      "licenseId": "JPNIC",
+      "seeAlso": [
+        "https://gitlab.isc.org/isc-projects/bind9/blob/master/COPYRIGHT#L366"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/JSON.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/JSON.json",
+      "referenceNumber": 441,
+      "name": "JSON License",
+      "licenseId": "JSON",
+      "seeAlso": [
+        "http://www.json.org/license.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Kazlib.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Kazlib.json",
+      "referenceNumber": 470,
+      "name": "Kazlib License",
+      "licenseId": "Kazlib",
+      "seeAlso": [
+        "http://git.savannah.gnu.org/cgit/kazlib.git/tree/except.c?id\u003d0062df360c2d17d57f6af19b0e444c51feb99036"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Knuth-CTAN.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Knuth-CTAN.json",
+      "referenceNumber": 344,
+      "name": "Knuth CTAN License",
+      "licenseId": "Knuth-CTAN",
+      "seeAlso": [
+        "https://ctan.org/license/knuth"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/LAL-1.2.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LAL-1.2.json",
+      "referenceNumber": 356,
+      "name": "Licence Art Libre 1.2",
+      "licenseId": "LAL-1.2",
+      "seeAlso": [
+        "http://artlibre.org/licence/lal/licence-art-libre-12/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/LAL-1.3.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LAL-1.3.json",
+      "referenceNumber": 66,
+      "name": "Licence Art Libre 1.3",
+      "licenseId": "LAL-1.3",
+      "seeAlso": [
+        "https://artlibre.org/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Latex2e.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Latex2e.json",
+      "referenceNumber": 371,
+      "name": "Latex2e License",
+      "licenseId": "Latex2e",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Latex2e"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Leptonica.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Leptonica.json",
+      "referenceNumber": 2,
+      "name": "Leptonica License",
+      "licenseId": "Leptonica",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Leptonica"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPL-2.0.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/LGPL-2.0.json",
+      "referenceNumber": 139,
+      "name": "GNU Library General Public License v2 only",
+      "licenseId": "LGPL-2.0",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPL-2.0+.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/LGPL-2.0+.json",
+      "referenceNumber": 447,
+      "name": "GNU Library General Public License v2 or later",
+      "licenseId": "LGPL-2.0+",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPL-2.0-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LGPL-2.0-only.json",
+      "referenceNumber": 465,
+      "name": "GNU Library General Public License v2 only",
+      "licenseId": "LGPL-2.0-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPL-2.0-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LGPL-2.0-or-later.json",
+      "referenceNumber": 145,
+      "name": "GNU Library General Public License v2 or later",
+      "licenseId": "LGPL-2.0-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPL-2.1.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/LGPL-2.1.json",
+      "referenceNumber": 529,
+      "name": "GNU Lesser General Public License v2.1 only",
+      "licenseId": "LGPL-2.1",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html",
+        "https://opensource.org/licenses/LGPL-2.1"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPL-2.1+.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/LGPL-2.1+.json",
+      "referenceNumber": 187,
+      "name": "GNU Lesser General Public License v2.1 or later",
+      "licenseId": "LGPL-2.1+",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html",
+        "https://opensource.org/licenses/LGPL-2.1"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPL-2.1-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LGPL-2.1-only.json",
+      "referenceNumber": 357,
+      "name": "GNU Lesser General Public License v2.1 only",
+      "licenseId": "LGPL-2.1-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html",
+        "https://opensource.org/licenses/LGPL-2.1"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPL-2.1-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LGPL-2.1-or-later.json",
+      "referenceNumber": 156,
+      "name": "GNU Lesser General Public License v2.1 or later",
+      "licenseId": "LGPL-2.1-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html",
+        "https://opensource.org/licenses/LGPL-2.1"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPL-3.0.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/LGPL-3.0.json",
+      "referenceNumber": 528,
+      "name": "GNU Lesser General Public License v3.0 only",
+      "licenseId": "LGPL-3.0",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/lgpl-3.0-standalone.html",
+        "https://www.gnu.org/licenses/lgpl+gpl-3.0.txt",
+        "https://opensource.org/licenses/LGPL-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPL-3.0+.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/LGPL-3.0+.json",
+      "referenceNumber": 455,
+      "name": "GNU Lesser General Public License v3.0 or later",
+      "licenseId": "LGPL-3.0+",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/lgpl-3.0-standalone.html",
+        "https://www.gnu.org/licenses/lgpl+gpl-3.0.txt",
+        "https://opensource.org/licenses/LGPL-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPL-3.0-only.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LGPL-3.0-only.json",
+      "referenceNumber": 276,
+      "name": "GNU Lesser General Public License v3.0 only",
+      "licenseId": "LGPL-3.0-only",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/lgpl-3.0-standalone.html",
+        "https://www.gnu.org/licenses/lgpl+gpl-3.0.txt",
+        "https://opensource.org/licenses/LGPL-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPL-3.0-or-later.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LGPL-3.0-or-later.json",
+      "referenceNumber": 150,
+      "name": "GNU Lesser General Public License v3.0 or later",
+      "licenseId": "LGPL-3.0-or-later",
+      "seeAlso": [
+        "https://www.gnu.org/licenses/lgpl-3.0-standalone.html",
+        "https://www.gnu.org/licenses/lgpl+gpl-3.0.txt",
+        "https://opensource.org/licenses/LGPL-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LGPLLR.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LGPLLR.json",
+      "referenceNumber": 235,
+      "name": "Lesser General Public License For Linguistic Resources",
+      "licenseId": "LGPLLR",
+      "seeAlso": [
+        "http://www-igm.univ-mlv.fr/~unitex/lgpllr.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Libpng.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Libpng.json",
+      "referenceNumber": 113,
+      "name": "libpng License",
+      "licenseId": "Libpng",
+      "seeAlso": [
+        "http://www.libpng.org/pub/png/src/libpng-LICENSE.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/libpng-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/libpng-2.0.json",
+      "referenceNumber": 308,
+      "name": "PNG Reference Library version 2",
+      "licenseId": "libpng-2.0",
+      "seeAlso": [
+        "http://www.libpng.org/pub/png/src/libpng-LICENSE.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/libselinux-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/libselinux-1.0.json",
+      "referenceNumber": 390,
+      "name": "libselinux public domain notice",
+      "licenseId": "libselinux-1.0",
+      "seeAlso": [
+        "https://github.com/SELinuxProject/selinux/blob/master/libselinux/LICENSE"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/libtiff.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/libtiff.json",
+      "referenceNumber": 493,
+      "name": "libtiff License",
+      "licenseId": "libtiff",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/libtiff"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/libutil-David-Nugent.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/libutil-David-Nugent.json",
+      "referenceNumber": 377,
+      "name": "libutil David Nugent License",
+      "licenseId": "libutil-David-Nugent",
+      "seeAlso": [
+        "http://web.mit.edu/freebsd/head/lib/libutil/login_ok.3",
+        "https://cgit.freedesktop.org/libbsd/tree/man/setproctitle.3bsd"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/LiLiQ-P-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LiLiQ-P-1.1.json",
+      "referenceNumber": 379,
+      "name": "Licence Libre du Québec – Permissive version 1.1",
+      "licenseId": "LiLiQ-P-1.1",
+      "seeAlso": [
+        "https://forge.gouv.qc.ca/licence/fr/liliq-v1-1/",
+        "http://opensource.org/licenses/LiLiQ-P-1.1"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LiLiQ-R-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LiLiQ-R-1.1.json",
+      "referenceNumber": 21,
+      "name": "Licence Libre du Québec – Réciprocité version 1.1",
+      "licenseId": "LiLiQ-R-1.1",
+      "seeAlso": [
+        "https://www.forge.gouv.qc.ca/participez/licence-logicielle/licence-libre-du-quebec-liliq-en-francais/licence-libre-du-quebec-reciprocite-liliq-r-v1-1/",
+        "http://opensource.org/licenses/LiLiQ-R-1.1"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LiLiQ-Rplus-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LiLiQ-Rplus-1.1.json",
+      "referenceNumber": 257,
+      "name": "Licence Libre du Québec – Réciprocité forte version 1.1",
+      "licenseId": "LiLiQ-Rplus-1.1",
+      "seeAlso": [
+        "https://www.forge.gouv.qc.ca/participez/licence-logicielle/licence-libre-du-quebec-liliq-en-francais/licence-libre-du-quebec-reciprocite-forte-liliq-r-v1-1/",
+        "http://opensource.org/licenses/LiLiQ-Rplus-1.1"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Linux-man-pages-copyleft.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Linux-man-pages-copyleft.json",
+      "referenceNumber": 53,
+      "name": "Linux man-pages Copyleft",
+      "licenseId": "Linux-man-pages-copyleft",
+      "seeAlso": [
+        "https://www.kernel.org/doc/man-pages/licenses.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Linux-OpenIB.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Linux-OpenIB.json",
+      "referenceNumber": 61,
+      "name": "Linux Kernel Variant of OpenIB.org license",
+      "licenseId": "Linux-OpenIB",
+      "seeAlso": [
+        "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/infiniband/core/sa.h"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/LOOP.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LOOP.json",
+      "referenceNumber": 89,
+      "name": "Common Lisp LOOP License",
+      "licenseId": "LOOP",
+      "seeAlso": [
+        "https://gitlab.com/embeddable-common-lisp/ecl/-/blob/develop/src/lsp/loop.lsp",
+        "http://git.savannah.gnu.org/cgit/gcl.git/tree/gcl/lsp/gcl_loop.lsp?h\u003dVersion_2_6_13pre",
+        "https://sourceforge.net/p/sbcl/sbcl/ci/master/tree/src/code/loop.lisp",
+        "https://github.com/cl-adams/adams/blob/master/LICENSE.md",
+        "https://github.com/blakemcbride/eclipse-lisp/blob/master/lisp/loop.lisp",
+        "https://gitlab.common-lisp.net/cmucl/cmucl/-/blob/master/src/code/loop.lisp"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/LPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LPL-1.0.json",
+      "referenceNumber": 245,
+      "name": "Lucent Public License Version 1.0",
+      "licenseId": "LPL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/LPL-1.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LPL-1.02.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LPL-1.02.json",
+      "referenceNumber": 78,
+      "name": "Lucent Public License v1.02",
+      "licenseId": "LPL-1.02",
+      "seeAlso": [
+        "http://plan9.bell-labs.com/plan9/license.html",
+        "https://opensource.org/licenses/LPL-1.02"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LPPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LPPL-1.0.json",
+      "referenceNumber": 478,
+      "name": "LaTeX Project Public License v1.0",
+      "licenseId": "LPPL-1.0",
+      "seeAlso": [
+        "http://www.latex-project.org/lppl/lppl-1-0.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/LPPL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LPPL-1.1.json",
+      "referenceNumber": 519,
+      "name": "LaTeX Project Public License v1.1",
+      "licenseId": "LPPL-1.1",
+      "seeAlso": [
+        "http://www.latex-project.org/lppl/lppl-1-1.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/LPPL-1.2.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LPPL-1.2.json",
+      "referenceNumber": 495,
+      "name": "LaTeX Project Public License v1.2",
+      "licenseId": "LPPL-1.2",
+      "seeAlso": [
+        "http://www.latex-project.org/lppl/lppl-1-2.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LPPL-1.3a.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LPPL-1.3a.json",
+      "referenceNumber": 127,
+      "name": "LaTeX Project Public License v1.3a",
+      "licenseId": "LPPL-1.3a",
+      "seeAlso": [
+        "http://www.latex-project.org/lppl/lppl-1-3a.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LPPL-1.3c.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LPPL-1.3c.json",
+      "referenceNumber": 19,
+      "name": "LaTeX Project Public License v1.3c",
+      "licenseId": "LPPL-1.3c",
+      "seeAlso": [
+        "http://www.latex-project.org/lppl/lppl-1-3c.txt",
+        "https://opensource.org/licenses/LPPL-1.3c"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/LZMA-SDK-9.11-to-9.20.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LZMA-SDK-9.11-to-9.20.json",
+      "referenceNumber": 191,
+      "name": "LZMA SDK License (versions 9.11 to 9.20)",
+      "licenseId": "LZMA-SDK-9.11-to-9.20",
+      "seeAlso": [
+        "https://www.7-zip.org/sdk.html",
+        "https://sourceforge.net/projects/sevenzip/files/LZMA%20SDK/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/LZMA-SDK-9.22.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/LZMA-SDK-9.22.json",
+      "referenceNumber": 436,
+      "name": "LZMA SDK License (versions 9.22 and beyond)",
+      "licenseId": "LZMA-SDK-9.22",
+      "seeAlso": [
+        "https://www.7-zip.org/sdk.html",
+        "https://sourceforge.net/projects/sevenzip/files/LZMA%20SDK/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MakeIndex.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MakeIndex.json",
+      "referenceNumber": 464,
+      "name": "MakeIndex License",
+      "licenseId": "MakeIndex",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/MakeIndex"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Martin-Birgmeier.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Martin-Birgmeier.json",
+      "referenceNumber": 521,
+      "name": "Martin Birgmeier License",
+      "licenseId": "Martin-Birgmeier",
+      "seeAlso": [
+        "https://github.com/Perl/perl5/blob/blead/util.c#L6136"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Minpack.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Minpack.json",
+      "referenceNumber": 533,
+      "name": "Minpack License",
+      "licenseId": "Minpack",
+      "seeAlso": [
+        "http://www.netlib.org/minpack/disclaimer",
+        "https://gitlab.com/libeigen/eigen/-/blob/master/COPYING.MINPACK"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MirOS.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MirOS.json",
+      "referenceNumber": 323,
+      "name": "The MirOS Licence",
+      "licenseId": "MirOS",
+      "seeAlso": [
+        "https://opensource.org/licenses/MirOS"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/MIT.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MIT.json",
+      "referenceNumber": 129,
+      "name": "MIT License",
+      "licenseId": "MIT",
+      "seeAlso": [
+        "https://opensource.org/licenses/MIT"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/MIT-0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MIT-0.json",
+      "referenceNumber": 31,
+      "name": "MIT No Attribution",
+      "licenseId": "MIT-0",
+      "seeAlso": [
+        "https://github.com/aws/mit-0",
+        "https://romanrm.net/mit-zero",
+        "https://github.com/awsdocs/aws-cloud9-user-guide/blob/master/LICENSE-SAMPLECODE"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/MIT-advertising.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MIT-advertising.json",
+      "referenceNumber": 429,
+      "name": "Enlightenment License (e16)",
+      "licenseId": "MIT-advertising",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/MIT_With_Advertising"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MIT-CMU.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MIT-CMU.json",
+      "referenceNumber": 103,
+      "name": "CMU License",
+      "licenseId": "MIT-CMU",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing:MIT?rd\u003dLicensing/MIT#CMU_Style",
+        "https://github.com/python-pillow/Pillow/blob/fffb426092c8db24a5f4b6df243a8a3c01fb63cd/LICENSE"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MIT-enna.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MIT-enna.json",
+      "referenceNumber": 467,
+      "name": "enna License",
+      "licenseId": "MIT-enna",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/MIT#enna"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MIT-feh.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MIT-feh.json",
+      "referenceNumber": 100,
+      "name": "feh License",
+      "licenseId": "MIT-feh",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/MIT#feh"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MIT-Modern-Variant.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MIT-Modern-Variant.json",
+      "referenceNumber": 215,
+      "name": "MIT License Modern Variant",
+      "licenseId": "MIT-Modern-Variant",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing:MIT#Modern_Variants",
+        "https://ptolemy.berkeley.edu/copyright.htm",
+        "https://pirlwww.lpl.arizona.edu/resources/guide/software/PerlTk/Tixlic.html"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/MIT-open-group.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MIT-open-group.json",
+      "referenceNumber": 368,
+      "name": "MIT Open Group variant",
+      "licenseId": "MIT-open-group",
+      "seeAlso": [
+        "https://gitlab.freedesktop.org/xorg/app/iceauth/-/blob/master/COPYING",
+        "https://gitlab.freedesktop.org/xorg/app/xvinfo/-/blob/master/COPYING",
+        "https://gitlab.freedesktop.org/xorg/app/xsetroot/-/blob/master/COPYING",
+        "https://gitlab.freedesktop.org/xorg/app/xauth/-/blob/master/COPYING"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MIT-Wu.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MIT-Wu.json",
+      "referenceNumber": 366,
+      "name": "MIT Tom Wu Variant",
+      "licenseId": "MIT-Wu",
+      "seeAlso": [
+        "https://github.com/chromium/octane/blob/master/crypto.js"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MITNFA.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MITNFA.json",
+      "referenceNumber": 367,
+      "name": "MIT +no-false-attribs license",
+      "licenseId": "MITNFA",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/MITNFA"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Motosoto.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Motosoto.json",
+      "referenceNumber": 406,
+      "name": "Motosoto License",
+      "licenseId": "Motosoto",
+      "seeAlso": [
+        "https://opensource.org/licenses/Motosoto"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/mpi-permissive.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/mpi-permissive.json",
+      "referenceNumber": 12,
+      "name": "mpi Permissive License",
+      "licenseId": "mpi-permissive",
+      "seeAlso": [
+        "https://sources.debian.org/src/openmpi/4.1.0-10/ompi/debuggers/msgq_interface.h/?hl\u003d19#L19"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/mpich2.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/mpich2.json",
+      "referenceNumber": 524,
+      "name": "mpich2 License",
+      "licenseId": "mpich2",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/MIT"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MPL-1.0.json",
+      "referenceNumber": 380,
+      "name": "Mozilla Public License 1.0",
+      "licenseId": "MPL-1.0",
+      "seeAlso": [
+        "http://www.mozilla.org/MPL/MPL-1.0.html",
+        "https://opensource.org/licenses/MPL-1.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/MPL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MPL-1.1.json",
+      "referenceNumber": 376,
+      "name": "Mozilla Public License 1.1",
+      "licenseId": "MPL-1.1",
+      "seeAlso": [
+        "http://www.mozilla.org/MPL/MPL-1.1.html",
+        "https://opensource.org/licenses/MPL-1.1"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/MPL-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MPL-2.0.json",
+      "referenceNumber": 190,
+      "name": "Mozilla Public License 2.0",
+      "licenseId": "MPL-2.0",
+      "seeAlso": [
+        "https://www.mozilla.org/MPL/2.0/",
+        "https://opensource.org/licenses/MPL-2.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/MPL-2.0-no-copyleft-exception.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MPL-2.0-no-copyleft-exception.json",
+      "referenceNumber": 194,
+      "name": "Mozilla Public License 2.0 (no copyleft exception)",
+      "licenseId": "MPL-2.0-no-copyleft-exception",
+      "seeAlso": [
+        "https://www.mozilla.org/MPL/2.0/",
+        "https://opensource.org/licenses/MPL-2.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/mplus.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/mplus.json",
+      "referenceNumber": 446,
+      "name": "mplus Font License",
+      "licenseId": "mplus",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing:Mplus?rd\u003dLicensing/mplus"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MS-LPL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MS-LPL.json",
+      "referenceNumber": 172,
+      "name": "Microsoft Limited Public License",
+      "licenseId": "MS-LPL",
+      "seeAlso": [
+        "https://www.openhub.net/licenses/mslpl",
+        "https://github.com/gabegundy/atlserver/blob/master/License.txt",
+        "https://en.wikipedia.org/wiki/Shared_Source_Initiative#Microsoft_Limited_Public_License_(Ms-LPL)"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MS-PL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MS-PL.json",
+      "referenceNumber": 417,
+      "name": "Microsoft Public License",
+      "licenseId": "MS-PL",
+      "seeAlso": [
+        "http://www.microsoft.com/opensource/licenses.mspx",
+        "https://opensource.org/licenses/MS-PL"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/MS-RL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MS-RL.json",
+      "referenceNumber": 438,
+      "name": "Microsoft Reciprocal License",
+      "licenseId": "MS-RL",
+      "seeAlso": [
+        "http://www.microsoft.com/opensource/licenses.mspx",
+        "https://opensource.org/licenses/MS-RL"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/MTLL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MTLL.json",
+      "referenceNumber": 30,
+      "name": "Matrix Template Library License",
+      "licenseId": "MTLL",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Matrix_Template_Library_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MulanPSL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MulanPSL-1.0.json",
+      "referenceNumber": 475,
+      "name": "Mulan Permissive Software License, Version 1",
+      "licenseId": "MulanPSL-1.0",
+      "seeAlso": [
+        "https://license.coscl.org.cn/MulanPSL/",
+        "https://github.com/yuwenlong/longphp/blob/25dfb70cc2a466dc4bb55ba30901cbce08d164b5/LICENSE"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/MulanPSL-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/MulanPSL-2.0.json",
+      "referenceNumber": 92,
+      "name": "Mulan Permissive Software License, Version 2",
+      "licenseId": "MulanPSL-2.0",
+      "seeAlso": [
+        "https://license.coscl.org.cn/MulanPSL2/"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Multics.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Multics.json",
+      "referenceNumber": 498,
+      "name": "Multics License",
+      "licenseId": "Multics",
+      "seeAlso": [
+        "https://opensource.org/licenses/Multics"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Mup.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Mup.json",
+      "referenceNumber": 80,
+      "name": "Mup License",
+      "licenseId": "Mup",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Mup"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NAIST-2003.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NAIST-2003.json",
+      "referenceNumber": 173,
+      "name": "Nara Institute of Science and Technology License (2003)",
+      "licenseId": "NAIST-2003",
+      "seeAlso": [
+        "https://enterprise.dejacode.com/licenses/public/naist-2003/#license-text",
+        "https://github.com/nodejs/node/blob/4a19cc8947b1bba2b2d27816ec3d0edf9b28e503/LICENSE#L343"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NASA-1.3.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NASA-1.3.json",
+      "referenceNumber": 111,
+      "name": "NASA Open Source Agreement 1.3",
+      "licenseId": "NASA-1.3",
+      "seeAlso": [
+        "http://ti.arc.nasa.gov/opensource/nosa/",
+        "https://opensource.org/licenses/NASA-1.3"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Naumen.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Naumen.json",
+      "referenceNumber": 419,
+      "name": "Naumen Public License",
+      "licenseId": "Naumen",
+      "seeAlso": [
+        "https://opensource.org/licenses/Naumen"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/NBPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NBPL-1.0.json",
+      "referenceNumber": 198,
+      "name": "Net Boolean Public License v1",
+      "licenseId": "NBPL-1.0",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d37b4b3f6cc4bf34e1d3dec61e69914b9819d8894"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NCGL-UK-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NCGL-UK-2.0.json",
+      "referenceNumber": 140,
+      "name": "Non-Commercial Government Licence",
+      "licenseId": "NCGL-UK-2.0",
+      "seeAlso": [
+        "http://www.nationalarchives.gov.uk/doc/non-commercial-government-licence/version/2/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NCSA.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NCSA.json",
+      "referenceNumber": 18,
+      "name": "University of Illinois/NCSA Open Source License",
+      "licenseId": "NCSA",
+      "seeAlso": [
+        "http://otm.illinois.edu/uiuc_openSource",
+        "https://opensource.org/licenses/NCSA"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Net-SNMP.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Net-SNMP.json",
+      "referenceNumber": 65,
+      "name": "Net-SNMP License",
+      "licenseId": "Net-SNMP",
+      "seeAlso": [
+        "http://net-snmp.sourceforge.net/about/license.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NetCDF.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NetCDF.json",
+      "referenceNumber": 472,
+      "name": "NetCDF license",
+      "licenseId": "NetCDF",
+      "seeAlso": [
+        "http://www.unidata.ucar.edu/software/netcdf/copyright.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Newsletr.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Newsletr.json",
+      "referenceNumber": 212,
+      "name": "Newsletr License",
+      "licenseId": "Newsletr",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Newsletr"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NGPL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NGPL.json",
+      "referenceNumber": 52,
+      "name": "Nethack General Public License",
+      "licenseId": "NGPL",
+      "seeAlso": [
+        "https://opensource.org/licenses/NGPL"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/NICTA-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NICTA-1.0.json",
+      "referenceNumber": 397,
+      "name": "NICTA Public Software License, Version 1.0",
+      "licenseId": "NICTA-1.0",
+      "seeAlso": [
+        "https://opensource.apple.com/source/mDNSResponder/mDNSResponder-320.10/mDNSPosix/nss_ReadMe.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NIST-PD.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NIST-PD.json",
+      "referenceNumber": 278,
+      "name": "NIST Public Domain Notice",
+      "licenseId": "NIST-PD",
+      "seeAlso": [
+        "https://github.com/tcheneau/simpleRPL/blob/e645e69e38dd4e3ccfeceb2db8cba05b7c2e0cd3/LICENSE.txt",
+        "https://github.com/tcheneau/Routing/blob/f09f46fcfe636107f22f2c98348188a65a135d98/README.md"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NIST-PD-fallback.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NIST-PD-fallback.json",
+      "referenceNumber": 353,
+      "name": "NIST Public Domain Notice with license fallback",
+      "licenseId": "NIST-PD-fallback",
+      "seeAlso": [
+        "https://github.com/usnistgov/jsip/blob/59700e6926cbe96c5cdae897d9a7d2656b42abe3/LICENSE",
+        "https://github.com/usnistgov/fipy/blob/86aaa5c2ba2c6f1be19593c5986071cf6568cc34/LICENSE.rst"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NLOD-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NLOD-1.0.json",
+      "referenceNumber": 199,
+      "name": "Norwegian Licence for Open Government Data (NLOD) 1.0",
+      "licenseId": "NLOD-1.0",
+      "seeAlso": [
+        "http://data.norge.no/nlod/en/1.0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NLOD-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NLOD-2.0.json",
+      "referenceNumber": 143,
+      "name": "Norwegian Licence for Open Government Data (NLOD) 2.0",
+      "licenseId": "NLOD-2.0",
+      "seeAlso": [
+        "http://data.norge.no/nlod/en/2.0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NLPL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NLPL.json",
+      "referenceNumber": 274,
+      "name": "No Limit Public License",
+      "licenseId": "NLPL",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/NLPL"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Nokia.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Nokia.json",
+      "referenceNumber": 45,
+      "name": "Nokia Open Source License",
+      "licenseId": "Nokia",
+      "seeAlso": [
+        "https://opensource.org/licenses/nokia"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/NOSL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NOSL.json",
+      "referenceNumber": 302,
+      "name": "Netizen Open Source License",
+      "licenseId": "NOSL",
+      "seeAlso": [
+        "http://bits.netizen.com.au/licenses/NOSL/nosl.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Noweb.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Noweb.json",
+      "referenceNumber": 508,
+      "name": "Noweb License",
+      "licenseId": "Noweb",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Noweb"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NPL-1.0.json",
+      "referenceNumber": 141,
+      "name": "Netscape Public License v1.0",
+      "licenseId": "NPL-1.0",
+      "seeAlso": [
+        "http://www.mozilla.org/MPL/NPL/1.0/"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/NPL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NPL-1.1.json",
+      "referenceNumber": 410,
+      "name": "Netscape Public License v1.1",
+      "licenseId": "NPL-1.1",
+      "seeAlso": [
+        "http://www.mozilla.org/MPL/NPL/1.1/"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/NPOSL-3.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NPOSL-3.0.json",
+      "referenceNumber": 535,
+      "name": "Non-Profit Open Software License 3.0",
+      "licenseId": "NPOSL-3.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/NOSL3.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/NRL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NRL.json",
+      "referenceNumber": 265,
+      "name": "NRL License",
+      "licenseId": "NRL",
+      "seeAlso": [
+        "http://web.mit.edu/network/isakmp/nrllicense.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/NTP.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NTP.json",
+      "referenceNumber": 233,
+      "name": "NTP License",
+      "licenseId": "NTP",
+      "seeAlso": [
+        "https://opensource.org/licenses/NTP"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/NTP-0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/NTP-0.json",
+      "referenceNumber": 232,
+      "name": "NTP No Attribution",
+      "licenseId": "NTP-0",
+      "seeAlso": [
+        "https://github.com/tytso/e2fsprogs/blob/master/lib/et/et_name.c"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Nunit.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/Nunit.json",
+      "referenceNumber": 505,
+      "name": "Nunit License",
+      "licenseId": "Nunit",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Nunit"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/O-UDA-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/O-UDA-1.0.json",
+      "referenceNumber": 24,
+      "name": "Open Use of Data Agreement v1.0",
+      "licenseId": "O-UDA-1.0",
+      "seeAlso": [
+        "https://github.com/microsoft/Open-Use-of-Data-Agreement/blob/v1.0/O-UDA-1.0.md",
+        "https://cdla.dev/open-use-of-data-agreement-v1-0/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OCCT-PL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OCCT-PL.json",
+      "referenceNumber": 298,
+      "name": "Open CASCADE Technology Public License",
+      "licenseId": "OCCT-PL",
+      "seeAlso": [
+        "http://www.opencascade.com/content/occt-public-license"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OCLC-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OCLC-2.0.json",
+      "referenceNumber": 343,
+      "name": "OCLC Research Public License 2.0",
+      "licenseId": "OCLC-2.0",
+      "seeAlso": [
+        "http://www.oclc.org/research/activities/software/license/v2final.htm",
+        "https://opensource.org/licenses/OCLC-2.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/ODbL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ODbL-1.0.json",
+      "referenceNumber": 106,
+      "name": "Open Data Commons Open Database License v1.0",
+      "licenseId": "ODbL-1.0",
+      "seeAlso": [
+        "http://www.opendatacommons.org/licenses/odbl/1.0/",
+        "https://opendatacommons.org/licenses/odbl/1-0/"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/ODC-By-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ODC-By-1.0.json",
+      "referenceNumber": 155,
+      "name": "Open Data Commons Attribution License v1.0",
+      "licenseId": "ODC-By-1.0",
+      "seeAlso": [
+        "https://opendatacommons.org/licenses/by/1.0/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OFFIS.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OFFIS.json",
+      "referenceNumber": 43,
+      "name": "OFFIS License",
+      "licenseId": "OFFIS",
+      "seeAlso": [
+        "https://sourceforge.net/p/xmedcon/code/ci/master/tree/libs/dicom/README"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OFL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OFL-1.0.json",
+      "referenceNumber": 77,
+      "name": "SIL Open Font License 1.0",
+      "licenseId": "OFL-1.0",
+      "seeAlso": [
+        "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL10_web"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OFL-1.0-no-RFN.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OFL-1.0-no-RFN.json",
+      "referenceNumber": 204,
+      "name": "SIL Open Font License 1.0 with no Reserved Font Name",
+      "licenseId": "OFL-1.0-no-RFN",
+      "seeAlso": [
+        "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL10_web"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OFL-1.0-RFN.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OFL-1.0-RFN.json",
+      "referenceNumber": 476,
+      "name": "SIL Open Font License 1.0 with Reserved Font Name",
+      "licenseId": "OFL-1.0-RFN",
+      "seeAlso": [
+        "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL10_web"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OFL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OFL-1.1.json",
+      "referenceNumber": 79,
+      "name": "SIL Open Font License 1.1",
+      "licenseId": "OFL-1.1",
+      "seeAlso": [
+        "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL_web",
+        "https://opensource.org/licenses/OFL-1.1"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OFL-1.1-no-RFN.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OFL-1.1-no-RFN.json",
+      "referenceNumber": 38,
+      "name": "SIL Open Font License 1.1 with no Reserved Font Name",
+      "licenseId": "OFL-1.1-no-RFN",
+      "seeAlso": [
+        "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL_web",
+        "https://opensource.org/licenses/OFL-1.1"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OFL-1.1-RFN.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OFL-1.1-RFN.json",
+      "referenceNumber": 44,
+      "name": "SIL Open Font License 1.1 with Reserved Font Name",
+      "licenseId": "OFL-1.1-RFN",
+      "seeAlso": [
+        "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL_web",
+        "https://opensource.org/licenses/OFL-1.1"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OGC-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OGC-1.0.json",
+      "referenceNumber": 334,
+      "name": "OGC Software License, Version 1.0",
+      "licenseId": "OGC-1.0",
+      "seeAlso": [
+        "https://www.ogc.org/ogc/software/1.0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OGDL-Taiwan-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OGDL-Taiwan-1.0.json",
+      "referenceNumber": 23,
+      "name": "Taiwan Open Government Data License, version 1.0",
+      "licenseId": "OGDL-Taiwan-1.0",
+      "seeAlso": [
+        "https://data.gov.tw/license"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OGL-Canada-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OGL-Canada-2.0.json",
+      "referenceNumber": 355,
+      "name": "Open Government Licence - Canada",
+      "licenseId": "OGL-Canada-2.0",
+      "seeAlso": [
+        "https://open.canada.ca/en/open-government-licence-canada"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OGL-UK-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OGL-UK-1.0.json",
+      "referenceNumber": 84,
+      "name": "Open Government Licence v1.0",
+      "licenseId": "OGL-UK-1.0",
+      "seeAlso": [
+        "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/1/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OGL-UK-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OGL-UK-2.0.json",
+      "referenceNumber": 424,
+      "name": "Open Government Licence v2.0",
+      "licenseId": "OGL-UK-2.0",
+      "seeAlso": [
+        "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/2/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OGL-UK-3.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OGL-UK-3.0.json",
+      "referenceNumber": 507,
+      "name": "Open Government Licence v3.0",
+      "licenseId": "OGL-UK-3.0",
+      "seeAlso": [
+        "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OGTSL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OGTSL.json",
+      "referenceNumber": 324,
+      "name": "Open Group Test Suite License",
+      "licenseId": "OGTSL",
+      "seeAlso": [
+        "http://www.opengroup.org/testing/downloads/The_Open_Group_TSL.txt",
+        "https://opensource.org/licenses/OGTSL"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-1.1.json",
+      "referenceNumber": 384,
+      "name": "Open LDAP Public License v1.1",
+      "licenseId": "OLDAP-1.1",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d806557a5ad59804ef3a44d5abfbe91d706b0791f"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-1.2.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-1.2.json",
+      "referenceNumber": 409,
+      "name": "Open LDAP Public License v1.2",
+      "licenseId": "OLDAP-1.2",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d42b0383c50c299977b5893ee695cf4e486fb0dc7"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-1.3.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-1.3.json",
+      "referenceNumber": 501,
+      "name": "Open LDAP Public License v1.3",
+      "licenseId": "OLDAP-1.3",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003de5f8117f0ce088d0bd7a8e18ddf37eaa40eb09b1"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-1.4.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-1.4.json",
+      "referenceNumber": 383,
+      "name": "Open LDAP Public License v1.4",
+      "licenseId": "OLDAP-1.4",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003dc9f95c2f3f2ffb5e0ae55fe7388af75547660941"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.0.json",
+      "referenceNumber": 402,
+      "name": "Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B)",
+      "licenseId": "OLDAP-2.0",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003dcbf50f4e1185a21abd4c0a54d3f4341fe28f36ea"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-2.0.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.0.1.json",
+      "referenceNumber": 301,
+      "name": "Open LDAP Public License v2.0.1",
+      "licenseId": "OLDAP-2.0.1",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003db6d68acd14e51ca3aab4428bf26522aa74873f0e"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-2.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.1.json",
+      "referenceNumber": 389,
+      "name": "Open LDAP Public License v2.1",
+      "licenseId": "OLDAP-2.1",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003db0d176738e96a0d3b9f85cb51e140a86f21be715"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-2.2.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.2.json",
+      "referenceNumber": 17,
+      "name": "Open LDAP Public License v2.2",
+      "licenseId": "OLDAP-2.2",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d470b0c18ec67621c85881b2733057fecf4a1acc3"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-2.2.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.2.1.json",
+      "referenceNumber": 112,
+      "name": "Open LDAP Public License v2.2.1",
+      "licenseId": "OLDAP-2.2.1",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d4bc786f34b50aa301be6f5600f58a980070f481e"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-2.2.2.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.2.2.json",
+      "referenceNumber": 394,
+      "name": "Open LDAP Public License 2.2.2",
+      "licenseId": "OLDAP-2.2.2",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003ddf2cc1e21eb7c160695f5b7cffd6296c151ba188"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-2.3.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.3.json",
+      "referenceNumber": 480,
+      "name": "Open LDAP Public License v2.3",
+      "licenseId": "OLDAP-2.3",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003dd32cf54a32d581ab475d23c810b0a7fbaf8d63c3"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-2.4.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.4.json",
+      "referenceNumber": 259,
+      "name": "Open LDAP Public License v2.4",
+      "licenseId": "OLDAP-2.4",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003dcd1284c4a91a8a380d904eee68d1583f989ed386"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-2.5.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.5.json",
+      "referenceNumber": 55,
+      "name": "Open LDAP Public License v2.5",
+      "licenseId": "OLDAP-2.5",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d6852b9d90022e8593c98205413380536b1b5a7cf"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-2.6.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.6.json",
+      "referenceNumber": 443,
+      "name": "Open LDAP Public License v2.6",
+      "licenseId": "OLDAP-2.6",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d1cae062821881f41b73012ba816434897abf4205"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-2.7.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.7.json",
+      "referenceNumber": 51,
+      "name": "Open LDAP Public License v2.7",
+      "licenseId": "OLDAP-2.7",
+      "seeAlso": [
+        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d47c2415c1df81556eeb39be6cad458ef87c534a2"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OLDAP-2.8.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.8.json",
+      "referenceNumber": 93,
+      "name": "Open LDAP Public License v2.8",
+      "licenseId": "OLDAP-2.8",
+      "seeAlso": [
+        "http://www.openldap.org/software/release/license.html"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OML.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OML.json",
+      "referenceNumber": 474,
+      "name": "Open Market License",
+      "licenseId": "OML",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Open_Market_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OpenPBS-2.3.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OpenPBS-2.3.json",
+      "referenceNumber": 20,
+      "name": "OpenPBS v2.3 Software License",
+      "licenseId": "OpenPBS-2.3",
+      "seeAlso": [
+        "https://github.com/adaptivecomputing/torque/blob/master/PBS_License.txt",
+        "https://www.mcs.anl.gov/research/projects/openpbs/PBS_License.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OpenSSL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OpenSSL.json",
+      "referenceNumber": 50,
+      "name": "OpenSSL License",
+      "licenseId": "OpenSSL",
+      "seeAlso": [
+        "http://www.openssl.org/source/license.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OPL-1.0.json",
+      "referenceNumber": 408,
+      "name": "Open Public License v1.0",
+      "licenseId": "OPL-1.0",
+      "seeAlso": [
+        "http://old.koalateam.com/jackaroo/OPL_1_0.TXT",
+        "https://fedoraproject.org/wiki/Licensing/Open_Public_License"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OPUBL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OPUBL-1.0.json",
+      "referenceNumber": 169,
+      "name": "Open Publication License v1.0",
+      "licenseId": "OPUBL-1.0",
+      "seeAlso": [
+        "http://opencontent.org/openpub/",
+        "https://www.debian.org/opl",
+        "https://www.ctan.org/license/opl"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/OSET-PL-2.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OSET-PL-2.1.json",
+      "referenceNumber": 230,
+      "name": "OSET Public License version 2.1",
+      "licenseId": "OSET-PL-2.1",
+      "seeAlso": [
+        "http://www.osetfoundation.org/public-license",
+        "https://opensource.org/licenses/OPL-2.1"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OSL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OSL-1.0.json",
+      "referenceNumber": 466,
+      "name": "Open Software License 1.0",
+      "licenseId": "OSL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/OSL-1.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OSL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OSL-1.1.json",
+      "referenceNumber": 497,
+      "name": "Open Software License 1.1",
+      "licenseId": "OSL-1.1",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/OSL1.1"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OSL-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OSL-2.0.json",
+      "referenceNumber": 11,
+      "name": "Open Software License 2.0",
+      "licenseId": "OSL-2.0",
+      "seeAlso": [
+        "http://web.archive.org/web/20041020171434/http://www.rosenlaw.com/osl2.0.html"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OSL-2.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OSL-2.1.json",
+      "referenceNumber": 297,
+      "name": "Open Software License 2.1",
+      "licenseId": "OSL-2.1",
+      "seeAlso": [
+        "http://web.archive.org/web/20050212003940/http://www.rosenlaw.com/osl21.htm",
+        "https://opensource.org/licenses/OSL-2.1"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/OSL-3.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/OSL-3.0.json",
+      "referenceNumber": 60,
+      "name": "Open Software License 3.0",
+      "licenseId": "OSL-3.0",
+      "seeAlso": [
+        "https://web.archive.org/web/20120101081418/http://rosenlaw.com:80/OSL3.0.htm",
+        "https://opensource.org/licenses/OSL-3.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Parity-6.0.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Parity-6.0.0.json",
+      "referenceNumber": 85,
+      "name": "The Parity Public License 6.0.0",
+      "licenseId": "Parity-6.0.0",
+      "seeAlso": [
+        "https://paritylicense.com/versions/6.0.0.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Parity-7.0.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Parity-7.0.0.json",
+      "referenceNumber": 333,
+      "name": "The Parity Public License 7.0.0",
+      "licenseId": "Parity-7.0.0",
+      "seeAlso": [
+        "https://paritylicense.com/versions/7.0.0.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/PDDL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/PDDL-1.0.json",
+      "referenceNumber": 181,
+      "name": "Open Data Commons Public Domain Dedication \u0026 License 1.0",
+      "licenseId": "PDDL-1.0",
+      "seeAlso": [
+        "http://opendatacommons.org/licenses/pddl/1.0/",
+        "https://opendatacommons.org/licenses/pddl/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/PHP-3.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/PHP-3.0.json",
+      "referenceNumber": 123,
+      "name": "PHP License v3.0",
+      "licenseId": "PHP-3.0",
+      "seeAlso": [
+        "http://www.php.net/license/3_0.txt",
+        "https://opensource.org/licenses/PHP-3.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/PHP-3.01.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/PHP-3.01.json",
+      "referenceNumber": 27,
+      "name": "PHP License v3.01",
+      "licenseId": "PHP-3.01",
+      "seeAlso": [
+        "http://www.php.net/license/3_01.txt"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Plexus.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Plexus.json",
+      "referenceNumber": 286,
+      "name": "Plexus Classworlds License",
+      "licenseId": "Plexus",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Plexus_Classworlds_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/PolyForm-Noncommercial-1.0.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/PolyForm-Noncommercial-1.0.0.json",
+      "referenceNumber": 285,
+      "name": "PolyForm Noncommercial License 1.0.0",
+      "licenseId": "PolyForm-Noncommercial-1.0.0",
+      "seeAlso": [
+        "https://polyformproject.org/licenses/noncommercial/1.0.0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/PolyForm-Small-Business-1.0.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/PolyForm-Small-Business-1.0.0.json",
+      "referenceNumber": 426,
+      "name": "PolyForm Small Business License 1.0.0",
+      "licenseId": "PolyForm-Small-Business-1.0.0",
+      "seeAlso": [
+        "https://polyformproject.org/licenses/small-business/1.0.0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/PostgreSQL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/PostgreSQL.json",
+      "referenceNumber": 340,
+      "name": "PostgreSQL License",
+      "licenseId": "PostgreSQL",
+      "seeAlso": [
+        "http://www.postgresql.org/about/licence",
+        "https://opensource.org/licenses/PostgreSQL"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/PSF-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/PSF-2.0.json",
+      "referenceNumber": 203,
+      "name": "Python Software Foundation License 2.0",
+      "licenseId": "PSF-2.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/Python-2.0"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/psfrag.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/psfrag.json",
+      "referenceNumber": 481,
+      "name": "psfrag License",
+      "licenseId": "psfrag",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/psfrag"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/psutils.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/psutils.json",
+      "referenceNumber": 391,
+      "name": "psutils License",
+      "licenseId": "psutils",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/psutils"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Python-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Python-2.0.json",
+      "referenceNumber": 487,
+      "name": "Python License 2.0",
+      "licenseId": "Python-2.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/Python-2.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Python-2.0.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Python-2.0.1.json",
+      "referenceNumber": 303,
+      "name": "Python License 2.0.1",
+      "licenseId": "Python-2.0.1",
+      "seeAlso": [
+        "https://www.python.org/download/releases/2.0.1/license/",
+        "https://docs.python.org/3/license.html",
+        "https://github.com/python/cpython/blob/main/LICENSE"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Qhull.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Qhull.json",
+      "referenceNumber": 162,
+      "name": "Qhull License",
+      "licenseId": "Qhull",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Qhull"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/QPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/QPL-1.0.json",
+      "referenceNumber": 69,
+      "name": "Q Public License 1.0",
+      "licenseId": "QPL-1.0",
+      "seeAlso": [
+        "http://doc.qt.nokia.com/3.3/license.html",
+        "https://opensource.org/licenses/QPL-1.0",
+        "https://doc.qt.io/archives/3.3/license.html"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/QPL-1.0-INRIA-2004.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/QPL-1.0-INRIA-2004.json",
+      "referenceNumber": 9,
+      "name": "Q Public License 1.0 - INRIA 2004 variant",
+      "licenseId": "QPL-1.0-INRIA-2004",
+      "seeAlso": [
+        "https://github.com/maranget/hevea/blob/master/LICENSE"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Rdisc.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Rdisc.json",
+      "referenceNumber": 486,
+      "name": "Rdisc License",
+      "licenseId": "Rdisc",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Rdisc_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/RHeCos-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/RHeCos-1.1.json",
+      "referenceNumber": 462,
+      "name": "Red Hat eCos Public License v1.1",
+      "licenseId": "RHeCos-1.1",
+      "seeAlso": [
+        "http://ecos.sourceware.org/old-license.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/RPL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/RPL-1.1.json",
+      "referenceNumber": 313,
+      "name": "Reciprocal Public License 1.1",
+      "licenseId": "RPL-1.1",
+      "seeAlso": [
+        "https://opensource.org/licenses/RPL-1.1"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/RPL-1.5.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/RPL-1.5.json",
+      "referenceNumber": 75,
+      "name": "Reciprocal Public License 1.5",
+      "licenseId": "RPL-1.5",
+      "seeAlso": [
+        "https://opensource.org/licenses/RPL-1.5"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/RPSL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/RPSL-1.0.json",
+      "referenceNumber": 463,
+      "name": "RealNetworks Public Source License v1.0",
+      "licenseId": "RPSL-1.0",
+      "seeAlso": [
+        "https://helixcommunity.org/content/rpsl",
+        "https://opensource.org/licenses/RPSL-1.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/RSA-MD.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/RSA-MD.json",
+      "referenceNumber": 1,
+      "name": "RSA Message-Digest License",
+      "licenseId": "RSA-MD",
+      "seeAlso": [
+        "http://www.faqs.org/rfcs/rfc1321.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/RSCPL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/RSCPL.json",
+      "referenceNumber": 34,
+      "name": "Ricoh Source Code Public License",
+      "licenseId": "RSCPL",
+      "seeAlso": [
+        "http://wayback.archive.org/web/20060715140826/http://www.risource.org/RPL/RPL-1.0A.shtml",
+        "https://opensource.org/licenses/RSCPL"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Ruby.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Ruby.json",
+      "referenceNumber": 3,
+      "name": "Ruby License",
+      "licenseId": "Ruby",
+      "seeAlso": [
+        "http://www.ruby-lang.org/en/LICENSE.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/SAX-PD.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SAX-PD.json",
+      "referenceNumber": 515,
+      "name": "Sax Public Domain Notice",
+      "licenseId": "SAX-PD",
+      "seeAlso": [
+        "http://www.saxproject.org/copying.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Saxpath.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Saxpath.json",
+      "referenceNumber": 117,
+      "name": "Saxpath License",
+      "licenseId": "Saxpath",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Saxpath_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SCEA.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SCEA.json",
+      "referenceNumber": 0,
+      "name": "SCEA Shared Source License",
+      "licenseId": "SCEA",
+      "seeAlso": [
+        "http://research.scea.com/scea_shared_source_license.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SchemeReport.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SchemeReport.json",
+      "referenceNumber": 142,
+      "name": "Scheme Language Report License",
+      "licenseId": "SchemeReport",
+      "seeAlso": [],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Sendmail.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Sendmail.json",
+      "referenceNumber": 97,
+      "name": "Sendmail License",
+      "licenseId": "Sendmail",
+      "seeAlso": [
+        "http://www.sendmail.com/pdfs/open_source/sendmail_license.pdf",
+        "https://web.archive.org/web/20160322142305/https://www.sendmail.com/pdfs/open_source/sendmail_license.pdf"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Sendmail-8.23.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Sendmail-8.23.json",
+      "referenceNumber": 153,
+      "name": "Sendmail License 8.23",
+      "licenseId": "Sendmail-8.23",
+      "seeAlso": [
+        "https://www.proofpoint.com/sites/default/files/sendmail-license.pdf",
+        "https://web.archive.org/web/20181003101040/https://www.proofpoint.com/sites/default/files/sendmail-license.pdf"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SGI-B-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SGI-B-1.0.json",
+      "referenceNumber": 226,
+      "name": "SGI Free Software License B v1.0",
+      "licenseId": "SGI-B-1.0",
+      "seeAlso": [
+        "http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.1.0.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SGI-B-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SGI-B-1.1.json",
+      "referenceNumber": 315,
+      "name": "SGI Free Software License B v1.1",
+      "licenseId": "SGI-B-1.1",
+      "seeAlso": [
+        "http://oss.sgi.com/projects/FreeB/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SGI-B-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SGI-B-2.0.json",
+      "referenceNumber": 445,
+      "name": "SGI Free Software License B v2.0",
+      "licenseId": "SGI-B-2.0",
+      "seeAlso": [
+        "http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/SHL-0.5.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SHL-0.5.json",
+      "referenceNumber": 102,
+      "name": "Solderpad Hardware License v0.5",
+      "licenseId": "SHL-0.5",
+      "seeAlso": [
+        "https://solderpad.org/licenses/SHL-0.5/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SHL-0.51.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SHL-0.51.json",
+      "referenceNumber": 201,
+      "name": "Solderpad Hardware License, Version 0.51",
+      "licenseId": "SHL-0.51",
+      "seeAlso": [
+        "https://solderpad.org/licenses/SHL-0.51/"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SimPL-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SimPL-2.0.json",
+      "referenceNumber": 523,
+      "name": "Simple Public License 2.0",
+      "licenseId": "SimPL-2.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/SimPL-2.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/SISSL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SISSL.json",
+      "referenceNumber": 256,
+      "name": "Sun Industry Standards Source License v1.1",
+      "licenseId": "SISSL",
+      "seeAlso": [
+        "http://www.openoffice.org/licenses/sissl_license.html",
+        "https://opensource.org/licenses/SISSL"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/SISSL-1.2.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SISSL-1.2.json",
+      "referenceNumber": 247,
+      "name": "Sun Industry Standards Source License v1.2",
+      "licenseId": "SISSL-1.2",
+      "seeAlso": [
+        "http://gridscheduler.sourceforge.net/Gridengine_SISSL_license.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Sleepycat.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Sleepycat.json",
+      "referenceNumber": 192,
+      "name": "Sleepycat License",
+      "licenseId": "Sleepycat",
+      "seeAlso": [
+        "https://opensource.org/licenses/Sleepycat"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/SMLNJ.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SMLNJ.json",
+      "referenceNumber": 146,
+      "name": "Standard ML of New Jersey License",
+      "licenseId": "SMLNJ",
+      "seeAlso": [
+        "https://www.smlnj.org/license.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/SMPPL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SMPPL.json",
+      "referenceNumber": 62,
+      "name": "Secure Messaging Protocol Public License",
+      "licenseId": "SMPPL",
+      "seeAlso": [
+        "https://github.com/dcblake/SMP/blob/master/Documentation/License.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SNIA.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SNIA.json",
+      "referenceNumber": 273,
+      "name": "SNIA Public License 1.1",
+      "licenseId": "SNIA",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/SNIA_Public_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/snprintf.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/snprintf.json",
+      "referenceNumber": 418,
+      "name": "snprintf License",
+      "licenseId": "snprintf",
+      "seeAlso": [
+        "https://github.com/openssh/openssh-portable/blob/master/openbsd-compat/bsd-snprintf.c#L2"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Spencer-86.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Spencer-86.json",
+      "referenceNumber": 239,
+      "name": "Spencer License 86",
+      "licenseId": "Spencer-86",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Henry_Spencer_Reg-Ex_Library_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Spencer-94.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Spencer-94.json",
+      "referenceNumber": 202,
+      "name": "Spencer License 94",
+      "licenseId": "Spencer-94",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Henry_Spencer_Reg-Ex_Library_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Spencer-99.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Spencer-99.json",
+      "referenceNumber": 186,
+      "name": "Spencer License 99",
+      "licenseId": "Spencer-99",
+      "seeAlso": [
+        "http://www.opensource.apple.com/source/tcl/tcl-5/tcl/generic/regfronts.c"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SPL-1.0.json",
+      "referenceNumber": 86,
+      "name": "Sun Public License v1.0",
+      "licenseId": "SPL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/SPL-1.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/SSH-OpenSSH.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SSH-OpenSSH.json",
+      "referenceNumber": 120,
+      "name": "SSH OpenSSH license",
+      "licenseId": "SSH-OpenSSH",
+      "seeAlso": [
+        "https://github.com/openssh/openssh-portable/blob/1b11ea7c58cd5c59838b5fa574cd456d6047b2d4/LICENCE#L10"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SSH-short.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SSH-short.json",
+      "referenceNumber": 221,
+      "name": "SSH short notice",
+      "licenseId": "SSH-short",
+      "seeAlso": [
+        "https://github.com/openssh/openssh-portable/blob/1b11ea7c58cd5c59838b5fa574cd456d6047b2d4/pathnames.h",
+        "http://web.mit.edu/kolya/.f/root/athena.mit.edu/sipb.mit.edu/project/openssh/OldFiles/src/openssh-2.9.9p2/ssh-add.1",
+        "https://joinup.ec.europa.eu/svn/lesoll/trunk/italc/lib/src/dsa_key.cpp"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SSPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SSPL-1.0.json",
+      "referenceNumber": 321,
+      "name": "Server Side Public License, v 1",
+      "licenseId": "SSPL-1.0",
+      "seeAlso": [
+        "https://www.mongodb.com/licensing/server-side-public-license"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/StandardML-NJ.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/StandardML-NJ.json",
+      "referenceNumber": 534,
+      "name": "Standard ML of New Jersey License",
+      "licenseId": "StandardML-NJ",
+      "seeAlso": [
+        "https://www.smlnj.org/license.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/SugarCRM-1.1.3.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SugarCRM-1.1.3.json",
+      "referenceNumber": 40,
+      "name": "SugarCRM Public License v1.1.3",
+      "licenseId": "SugarCRM-1.1.3",
+      "seeAlso": [
+        "http://www.sugarcrm.com/crm/SPL"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SunPro.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SunPro.json",
+      "referenceNumber": 361,
+      "name": "SunPro License",
+      "licenseId": "SunPro",
+      "seeAlso": [
+        "https://github.com/freebsd/freebsd-src/blob/main/lib/msun/src/e_acosh.c",
+        "https://github.com/freebsd/freebsd-src/blob/main/lib/msun/src/e_lgammal.c"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/SWL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/SWL.json",
+      "referenceNumber": 109,
+      "name": "Scheme Widget Library (SWL) Software License Agreement",
+      "licenseId": "SWL",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/SWL"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Symlinks.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Symlinks.json",
+      "referenceNumber": 392,
+      "name": "Symlinks License",
+      "licenseId": "Symlinks",
+      "seeAlso": [
+        "https://www.mail-archive.com/debian-bugs-rc@lists.debian.org/msg11494.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/TAPR-OHL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/TAPR-OHL-1.0.json",
+      "referenceNumber": 512,
+      "name": "TAPR Open Hardware License v1.0",
+      "licenseId": "TAPR-OHL-1.0",
+      "seeAlso": [
+        "https://www.tapr.org/OHL"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/TCL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/TCL.json",
+      "referenceNumber": 485,
+      "name": "TCL/TK License",
+      "licenseId": "TCL",
+      "seeAlso": [
+        "http://www.tcl.tk/software/tcltk/license.html",
+        "https://fedoraproject.org/wiki/Licensing/TCL"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/TCP-wrappers.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/TCP-wrappers.json",
+      "referenceNumber": 58,
+      "name": "TCP Wrappers License",
+      "licenseId": "TCP-wrappers",
+      "seeAlso": [
+        "http://rc.quest.com/topics/openssh/license.php#tcpwrappers"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/TMate.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/TMate.json",
+      "referenceNumber": 362,
+      "name": "TMate Open Source License",
+      "licenseId": "TMate",
+      "seeAlso": [
+        "http://svnkit.com/license.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/TORQUE-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/TORQUE-1.1.json",
+      "referenceNumber": 490,
+      "name": "TORQUE v2.5+ Software License v1.1",
+      "licenseId": "TORQUE-1.1",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/TORQUEv1.1"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/TOSL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/TOSL.json",
+      "referenceNumber": 134,
+      "name": "Trusster Open Source License",
+      "licenseId": "TOSL",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/TOSL"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/TPDL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/TPDL.json",
+      "referenceNumber": 88,
+      "name": "Time::ParseDate License",
+      "licenseId": "TPDL",
+      "seeAlso": [
+        "https://metacpan.org/pod/Time::ParseDate#LICENSE"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/TPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/TPL-1.0.json",
+      "referenceNumber": 249,
+      "name": "THOR Public License 1.0",
+      "licenseId": "TPL-1.0",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing:ThorPublicLicense"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/TTWL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/TTWL.json",
+      "referenceNumber": 322,
+      "name": "Text-Tabs+Wrap License",
+      "licenseId": "TTWL",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/TTWL",
+        "https://github.com/ap/Text-Tabs/blob/master/lib.modern/Text/Tabs.pm#L148"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/TU-Berlin-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/TU-Berlin-1.0.json",
+      "referenceNumber": 207,
+      "name": "Technische Universitaet Berlin License 1.0",
+      "licenseId": "TU-Berlin-1.0",
+      "seeAlso": [
+        "https://github.com/swh/ladspa/blob/7bf6f3799fdba70fda297c2d8fd9f526803d9680/gsm/COPYRIGHT"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/TU-Berlin-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/TU-Berlin-2.0.json",
+      "referenceNumber": 305,
+      "name": "Technische Universitaet Berlin License 2.0",
+      "licenseId": "TU-Berlin-2.0",
+      "seeAlso": [
+        "https://github.com/CorsixTH/deps/blob/fd339a9f526d1d9c9f01ccf39e438a015da50035/licences/libgsm.txt"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/UCAR.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/UCAR.json",
+      "referenceNumber": 125,
+      "name": "UCAR License",
+      "licenseId": "UCAR",
+      "seeAlso": [
+        "https://github.com/Unidata/UDUNITS-2/blob/master/COPYRIGHT"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/UCL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/UCL-1.0.json",
+      "referenceNumber": 451,
+      "name": "Upstream Compatibility License v1.0",
+      "licenseId": "UCL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/UCL-1.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Unicode-DFS-2015.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Unicode-DFS-2015.json",
+      "referenceNumber": 304,
+      "name": "Unicode License Agreement - Data Files and Software (2015)",
+      "licenseId": "Unicode-DFS-2015",
+      "seeAlso": [
+        "https://web.archive.org/web/20151224134844/http://unicode.org/copyright.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Unicode-DFS-2016.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Unicode-DFS-2016.json",
+      "referenceNumber": 6,
+      "name": "Unicode License Agreement - Data Files and Software (2016)",
+      "licenseId": "Unicode-DFS-2016",
+      "seeAlso": [
+        "http://www.unicode.org/copyright.html"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Unicode-TOU.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Unicode-TOU.json",
+      "referenceNumber": 195,
+      "name": "Unicode Terms of Use",
+      "licenseId": "Unicode-TOU",
+      "seeAlso": [
+        "http://www.unicode.org/copyright.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Unlicense.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Unlicense.json",
+      "referenceNumber": 214,
+      "name": "The Unlicense",
+      "licenseId": "Unlicense",
+      "seeAlso": [
+        "https://unlicense.org/"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/UPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/UPL-1.0.json",
+      "referenceNumber": 73,
+      "name": "Universal Permissive License v1.0",
+      "licenseId": "UPL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/UPL"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Vim.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Vim.json",
+      "referenceNumber": 35,
+      "name": "Vim License",
+      "licenseId": "Vim",
+      "seeAlso": [
+        "http://vimdoc.sourceforge.net/htmldoc/uganda.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/VOSTROM.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/VOSTROM.json",
+      "referenceNumber": 400,
+      "name": "VOSTROM Public License for Open Source",
+      "licenseId": "VOSTROM",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/VOSTROM"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/VSL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/VSL-1.0.json",
+      "referenceNumber": 223,
+      "name": "Vovida Software License v1.0",
+      "licenseId": "VSL-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/VSL-1.0"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/W3C.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/W3C.json",
+      "referenceNumber": 164,
+      "name": "W3C Software Notice and License (2002-12-31)",
+      "licenseId": "W3C",
+      "seeAlso": [
+        "http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231.html",
+        "https://opensource.org/licenses/W3C"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/W3C-19980720.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/W3C-19980720.json",
+      "referenceNumber": 240,
+      "name": "W3C Software Notice and License (1998-07-20)",
+      "licenseId": "W3C-19980720",
+      "seeAlso": [
+        "http://www.w3.org/Consortium/Legal/copyright-software-19980720.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/W3C-20150513.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/W3C-20150513.json",
+      "referenceNumber": 22,
+      "name": "W3C Software Notice and Document License (2015-05-13)",
+      "licenseId": "W3C-20150513",
+      "seeAlso": [
+        "https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/w3m.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/w3m.json",
+      "referenceNumber": 279,
+      "name": "w3m License",
+      "licenseId": "w3m",
+      "seeAlso": [
+        "https://github.com/tats/w3m/blob/master/COPYING"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Watcom-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Watcom-1.0.json",
+      "referenceNumber": 416,
+      "name": "Sybase Open Watcom Public License 1.0",
+      "licenseId": "Watcom-1.0",
+      "seeAlso": [
+        "https://opensource.org/licenses/Watcom-1.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Wsuipa.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Wsuipa.json",
+      "referenceNumber": 152,
+      "name": "Wsuipa License",
+      "licenseId": "Wsuipa",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Wsuipa"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/WTFPL.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/WTFPL.json",
+      "referenceNumber": 32,
+      "name": "Do What The F*ck You Want To Public License",
+      "licenseId": "WTFPL",
+      "seeAlso": [
+        "http://www.wtfpl.net/about/",
+        "http://sam.zoy.org/wtfpl/COPYING"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/wxWindows.html",
+      "isDeprecatedLicenseId": true,
+      "detailsUrl": "https://spdx.org/licenses/wxWindows.json",
+      "referenceNumber": 452,
+      "name": "wxWindows Library License",
+      "licenseId": "wxWindows",
+      "seeAlso": [
+        "https://opensource.org/licenses/WXwindows"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/X11.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/X11.json",
+      "referenceNumber": 289,
+      "name": "X11 License",
+      "licenseId": "X11",
+      "seeAlso": [
+        "http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/X11-distribute-modifications-variant.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/X11-distribute-modifications-variant.json",
+      "referenceNumber": 351,
+      "name": "X11 License Distribution Modification Variant",
+      "licenseId": "X11-distribute-modifications-variant",
+      "seeAlso": [
+        "https://github.com/mirror/ncurses/blob/master/COPYING"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Xerox.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Xerox.json",
+      "referenceNumber": 158,
+      "name": "Xerox License",
+      "licenseId": "Xerox",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Xerox"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/XFree86-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/XFree86-1.1.json",
+      "referenceNumber": 449,
+      "name": "XFree86 License 1.1",
+      "licenseId": "XFree86-1.1",
+      "seeAlso": [
+        "http://www.xfree86.org/current/LICENSE4.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/xinetd.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/xinetd.json",
+      "referenceNumber": 118,
+      "name": "xinetd License",
+      "licenseId": "xinetd",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Xinetd_License"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/xlock.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/xlock.json",
+      "referenceNumber": 500,
+      "name": "xlock License",
+      "licenseId": "xlock",
+      "seeAlso": [
+        "https://fossies.org/linux/tiff/contrib/ras/ras2tif.c"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Xnet.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Xnet.json",
+      "referenceNumber": 266,
+      "name": "X.Net License",
+      "licenseId": "Xnet",
+      "seeAlso": [
+        "https://opensource.org/licenses/Xnet"
+      ],
+      "isOsiApproved": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/xpp.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/xpp.json",
+      "referenceNumber": 348,
+      "name": "XPP License",
+      "licenseId": "xpp",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/xpp"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/XSkat.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/XSkat.json",
+      "referenceNumber": 272,
+      "name": "XSkat License",
+      "licenseId": "XSkat",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/XSkat_License"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/YPL-1.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/YPL-1.0.json",
+      "referenceNumber": 430,
+      "name": "Yahoo! Public License v1.0",
+      "licenseId": "YPL-1.0",
+      "seeAlso": [
+        "http://www.zimbra.com/license/yahoo_public_license_1.0.html"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/YPL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/YPL-1.1.json",
+      "referenceNumber": 269,
+      "name": "Yahoo! Public License v1.1",
+      "licenseId": "YPL-1.1",
+      "seeAlso": [
+        "http://www.zimbra.com/license/yahoo_public_license_1.1.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Zed.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Zed.json",
+      "referenceNumber": 360,
+      "name": "Zed License",
+      "licenseId": "Zed",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/Zed"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Zend-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Zend-2.0.json",
+      "referenceNumber": 160,
+      "name": "Zend License v2.0",
+      "licenseId": "Zend-2.0",
+      "seeAlso": [
+        "https://web.archive.org/web/20130517195954/http://www.zend.com/license/2_00.txt"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Zimbra-1.3.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Zimbra-1.3.json",
+      "referenceNumber": 401,
+      "name": "Zimbra Public License v1.3",
+      "licenseId": "Zimbra-1.3",
+      "seeAlso": [
+        "http://web.archive.org/web/20100302225219/http://www.zimbra.com/license/zimbra-public-license-1-3.html"
+      ],
+      "isOsiApproved": false,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/Zimbra-1.4.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Zimbra-1.4.json",
+      "referenceNumber": 161,
+      "name": "Zimbra Public License v1.4",
+      "licenseId": "Zimbra-1.4",
+      "seeAlso": [
+        "http://www.zimbra.com/legal/zimbra-public-license-1-4"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/Zlib.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/Zlib.json",
+      "referenceNumber": 4,
+      "name": "zlib License",
+      "licenseId": "Zlib",
+      "seeAlso": [
+        "http://www.zlib.net/zlib_license.html",
+        "https://opensource.org/licenses/Zlib"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/zlib-acknowledgement.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/zlib-acknowledgement.json",
+      "referenceNumber": 398,
+      "name": "zlib/libpng License with Acknowledgement",
+      "licenseId": "zlib-acknowledgement",
+      "seeAlso": [
+        "https://fedoraproject.org/wiki/Licensing/ZlibWithAcknowledgement"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/ZPL-1.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ZPL-1.1.json",
+      "referenceNumber": 116,
+      "name": "Zope Public License 1.1",
+      "licenseId": "ZPL-1.1",
+      "seeAlso": [
+        "http://old.zope.org/Resources/License/ZPL-1.1"
+      ],
+      "isOsiApproved": false
+    },
+    {
+      "reference": "https://spdx.org/licenses/ZPL-2.0.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ZPL-2.0.json",
+      "referenceNumber": 248,
+      "name": "Zope Public License 2.0",
+      "licenseId": "ZPL-2.0",
+      "seeAlso": [
+        "http://old.zope.org/Resources/License/ZPL-2.0",
+        "https://opensource.org/licenses/ZPL-2.0"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    },
+    {
+      "reference": "https://spdx.org/licenses/ZPL-2.1.html",
+      "isDeprecatedLicenseId": false,
+      "detailsUrl": "https://spdx.org/licenses/ZPL-2.1.json",
+      "referenceNumber": 412,
+      "name": "Zope Public License 2.1",
+      "licenseId": "ZPL-2.1",
+      "seeAlso": [
+        "http://old.zope.org/Resources/ZPL/"
+      ],
+      "isOsiApproved": true,
+      "isFsfLibre": true
+    }
+  ],
+  "releaseDate": "2023-02-17"
+}
\ No newline at end of file
diff --git a/templates/SPDX.LicenseExceptionId.template.hs b/templates/SPDX.LicenseExceptionId.template.hs
index d18641c3768..99546f55f44 100644
--- a/templates/SPDX.LicenseExceptionId.template.hs
+++ b/templates/SPDX.LicenseExceptionId.template.hs
@@ -28,7 +28,7 @@ import qualified Text.PrettyPrint as Disp
 -- LicenseExceptionId
 -------------------------------------------------------------------------------
 
--- | SPDX License Exceptions identifiers list v3.16
+-- | SPDX License Exceptions identifiers list v3.20
 data LicenseExceptionId
 {{ licenseIds }}
   deriving (Eq, Ord, Enum, Bounded, Show, Read, Typeable, Data, Generic)
@@ -98,6 +98,10 @@ licenseExceptionIdList LicenseListVersion_3_16 =
 {{licenseList_perv.v_3_16}}
     ++ bulkOfLicenses
 
+licenseExceptionIdList LicenseListVersion_3_20 =
+{{licenseList_perv.v_3_20}}
+    ++ bulkOfLicenses
+
 -- | Create a 'LicenseExceptionId' from a 'String'.
 mkLicenseExceptionId :: LicenseListVersion -> String -> Maybe LicenseExceptionId
 mkLicenseExceptionId LicenseListVersion_3_0  s = Map.lookup s stringLookup_3_0
@@ -106,6 +110,7 @@ mkLicenseExceptionId LicenseListVersion_3_6  s = Map.lookup s stringLookup_3_6
 mkLicenseExceptionId LicenseListVersion_3_9  s = Map.lookup s stringLookup_3_9
 mkLicenseExceptionId LicenseListVersion_3_10 s = Map.lookup s stringLookup_3_10
 mkLicenseExceptionId LicenseListVersion_3_16 s = Map.lookup s stringLookup_3_16
+mkLicenseExceptionId LicenseListVersion_3_20 s = Map.lookup s stringLookup_3_20
 
 stringLookup_3_0 :: Map String LicenseExceptionId
 stringLookup_3_0 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
@@ -131,6 +136,10 @@ stringLookup_3_16 :: Map String LicenseExceptionId
 stringLookup_3_16 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
     licenseExceptionIdList LicenseListVersion_3_16
 
+stringLookup_3_20 :: Map String LicenseExceptionId
+stringLookup_3_20 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
+    licenseExceptionIdList LicenseListVersion_3_20
+
 --  | License exceptions in all SPDX License lists
 bulkOfLicenses :: [LicenseExceptionId]
 bulkOfLicenses =
diff --git a/templates/SPDX.LicenseId.template.hs b/templates/SPDX.LicenseId.template.hs
index 9aa5d2c1737..d84cbf423b8 100644
--- a/templates/SPDX.LicenseId.template.hs
+++ b/templates/SPDX.LicenseId.template.hs
@@ -31,7 +31,7 @@ import qualified Text.PrettyPrint as Disp
 -- LicenseId
 -------------------------------------------------------------------------------
 
--- | SPDX License identifiers list v3.16
+-- | SPDX License identifiers list v3.20
 data LicenseId
 {{ licenseIds }}
   deriving (Eq, Ord, Enum, Bounded, Show, Read, Typeable, Data)
@@ -174,6 +174,9 @@ licenseIdList LicenseListVersion_3_10 =
 licenseIdList LicenseListVersion_3_16 =
 {{licenseList_perv.v_3_16}}
     ++ bulkOfLicenses
+licenseIdList LicenseListVersion_3_20 =
+{{licenseList_perv.v_3_20}}
+    ++ bulkOfLicenses
 
 -- | Create a 'LicenseId' from a 'String'.
 mkLicenseId :: LicenseListVersion -> String -> Maybe LicenseId
@@ -183,6 +186,7 @@ mkLicenseId LicenseListVersion_3_6  s = Map.lookup s stringLookup_3_6
 mkLicenseId LicenseListVersion_3_9  s = Map.lookup s stringLookup_3_9
 mkLicenseId LicenseListVersion_3_10 s = Map.lookup s stringLookup_3_10
 mkLicenseId LicenseListVersion_3_16 s = Map.lookup s stringLookup_3_16
+mkLicenseId LicenseListVersion_3_20 s = Map.lookup s stringLookup_3_20
 
 stringLookup_3_0 :: Map String LicenseId
 stringLookup_3_0 = Map.fromList $ map (\i -> (licenseId i, i)) $
@@ -208,6 +212,10 @@ stringLookup_3_16 :: Map String LicenseId
 stringLookup_3_16 = Map.fromList $ map (\i -> (licenseId i, i)) $
     licenseIdList LicenseListVersion_3_16
 
+stringLookup_3_20 :: Map String LicenseId
+stringLookup_3_20 = Map.fromList $ map (\i -> (licenseId i, i)) $
+    licenseIdList LicenseListVersion_3_20
+
 --  | Licenses in all SPDX License lists
 bulkOfLicenses :: [LicenseId]
 bulkOfLicenses =

From 14f66daeafaebd226c480545b63dc8dd0a3926d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Fri, 23 Jun 2023 14:38:20 +0200
Subject: [PATCH 057/144] Update Cabal{,-install,-syntax} to 3.10.2.0 (#9033)

Co-authored-by: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
---
 .github/workflows/bootstrap.yml               |  4 +-
 .github/workflows/validate.yml                | 12 ++--
 Cabal-syntax/Cabal-syntax.cabal               |  2 +-
 Cabal/Cabal.cabal                             |  2 +-
 Cabal/Makefile                                |  2 +-
 Makefile                                      |  2 +-
 bootstrap/cabal-bootstrap-gen.cabal           |  4 +-
 bootstrap/linux-8.10.7.json                   | 58 ++++++++---------
 bootstrap/linux-9.0.2.json                    | 58 ++++++++---------
 .../{linux-9.2.6.json => linux-9.2.8.json}    | 54 ++++++++--------
 .../{linux-9.4.4.json => linux-9.4.5.json}    | 64 +++++++++----------
 cabal-install/cabal-install.cabal             |  2 +-
 .../CustomPreProcess/cabal.test.hs            |  3 -
 .../FFI/ForeignOptsC/cabal.test.hs            |  3 -
 .../FFI/ForeignOptsCxx/cabal.test.hs          |  3 -
 .../CmdBench/OptionsFlag/cabal.test.hs        |  3 -
 .../CmdBuild/ScriptBuildRepl/cabal.test.hs    |  3 -
 .../CmdBuild/ScriptBuildRun/cabal.test.hs     |  3 -
 .../CmdRun/ScriptLiterate/cabal.test.hs       |  3 -
 .../CmdRun/ScriptNoExtension/cabal.test.hs    |  3 -
 .../ScriptWithProjectBlock/cabal.test.hs      |  3 -
 .../CmdTest/OptionsFlag/cabal.test.hs         |  3 -
 cabal-testsuite/cabal-testsuite.cabal         |  8 +--
 doc/conf.py                                   |  2 +-
 24 files changed, 137 insertions(+), 167 deletions(-)
 rename bootstrap/{linux-9.2.6.json => linux-9.2.8.json} (89%)
 rename bootstrap/{linux-9.4.4.json => linux-9.4.5.json} (86%)

diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml
index 1165e6a138c..97d66a8ccda 100644
--- a/.github/workflows/bootstrap.yml
+++ b/.github/workflows/bootstrap.yml
@@ -19,10 +19,10 @@ jobs:
     strategy:
       matrix:
         os: [ubuntu-latest]
-        ghc: ["8.10.7", "9.0.2", "9.2.6", "9.4.4"]
+        ghc: ["8.10.7", "9.0.2", "9.2.8", "9.4.5"]
         include:
           - os: macos-latest
-            ghc: "9.2.6"
+            ghc: "9.2.8"
     name: Bootstrap ${{ matrix.os }} ghc-${{ matrix.ghc }}
     runs-on: ${{ matrix.os }}
     steps:
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 29380501a5c..252dc742e5f 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -23,10 +23,10 @@ on:
 env:
   # We choose a stable ghc version across all os's
   # which will be used to do the next release
-  GHC_FOR_RELEASE: '9.2.3'
+  GHC_FOR_RELEASE: '9.2.8'
   # Ideally we should use the version about to be released for hackage tests and benchmarks
-  GHC_FOR_SOLVER_BENCHMARKS: '9.2.3'
-  GHC_FOR_COMPLETE_HACKAGE_TESTS: '9.2.3'
+  GHC_FOR_SOLVER_BENCHMARKS: '9.2.8'
+  GHC_FOR_COMPLETE_HACKAGE_TESTS: '9.2.8'
   COMMON_FLAGS: '-j 2 -v'
 
 jobs:
@@ -38,7 +38,7 @@ jobs:
     strategy:
       matrix:
         os: ["ubuntu-20.04", "macos-latest", "windows-latest"]
-        ghc: ["9.4.2", "9.2.3", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"]
+        ghc: ["9.4.5", "9.2.8", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"]
         exclude:
           # corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356
           - os: "windows-latest"
@@ -71,7 +71,7 @@ jobs:
         id: setup-haskell
         with:
           ghc-version: ${{ matrix.ghc }}
-          cabal-version: '3.8.1.0'
+          cabal-version: '3.10.1.0'
 
       #  See the following link for a breakdown of the following step
       #  https://github.com/haskell/actions/issues/7#issuecomment-745697160
@@ -360,7 +360,7 @@ jobs:
         id: setup-haskell
         with:
           ghc-version: ${{ matrix.ghc }}
-          cabal-version: '3.8.1.0'
+          cabal-version: '3.10.1.0'
 
       # As we are reusing the cached build dir from the previous step
       # the generated artifacts are available here,
diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index d4039a55fb6..48334f5c7e6 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal-syntax
-version:       3.10.1.0
+version:       3.10.2.0
 copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index bbe963f26d5..707f57c7745 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal
-version:       3.10.1.0
+version:       3.10.2.0
 copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
diff --git a/Cabal/Makefile b/Cabal/Makefile
index 8515826802f..a76edf6206e 100644
--- a/Cabal/Makefile
+++ b/Cabal/Makefile
@@ -1,4 +1,4 @@
-VERSION=3.10.1.0
+VERSION=3.10.2.0
 
 #KIND=devel
 KIND=rc
diff --git a/Makefile b/Makefile
index 192f0696eb2..c95c3274b0f 100644
--- a/Makefile
+++ b/Makefile
@@ -195,7 +195,7 @@ bootstrap-json-%: phony
 	cd bootstrap && cabal v2-run -v0 cabal-bootstrap-gen -- linux-$*.plan.json \
 		| python3 -m json.tool > linux-$*.json
 
-BOOTSTRAP_GHC_VERSIONS := 8.10.7 9.0.2 9.2.6 9.4.4
+BOOTSTRAP_GHC_VERSIONS := 8.10.7 9.0.2 9.2.8 9.4.5
 
 bootstrap-jsons: $(BOOTSTRAP_GHC_VERSIONS:%=bootstrap-json-%)
 
diff --git a/bootstrap/cabal-bootstrap-gen.cabal b/bootstrap/cabal-bootstrap-gen.cabal
index 64c5a098f65..7fa4c3149a1 100644
--- a/bootstrap/cabal-bootstrap-gen.cabal
+++ b/bootstrap/cabal-bootstrap-gen.cabal
@@ -11,8 +11,8 @@ executable cabal-bootstrap-gen
     , aeson                  ^>=1.5.2.0  || ^>=2.0.3.0 || ^>=2.1.0.0
     , base                   ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0 || ^>=4.15.0.0 || ^>=4.16.0.0 || ^>=4.17.0.0
     , bytestring             ^>=0.10.8.2 || ^>=0.11.0.0
-    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0 || ^>=3.8.1.0 || ^>=3.10.1.0
-    , Cabal-syntax           ^>=3.8.1.0 || ^>=3.10.1.0
+    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0 || ^>=3.8.1.0 || ^>=3.10.2.0
+    , Cabal-syntax           ^>=3.8.1.0 || ^>=3.10.2.0
     , cabal-install-parsers  ^>=0.3.0.1  || ^>=0.4.5 || ^>=0.6
     , cabal-plan             ^>=0.7.0.0
     , containers             ^>=0.6.0.1
diff --git a/bootstrap/linux-8.10.7.json b/bootstrap/linux-8.10.7.json
index d60690f2075..87d0aeb21a5 100644
--- a/bootstrap/linux-8.10.7.json
+++ b/bootstrap/linux-8.10.7.json
@@ -102,7 +102,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.2.0"
         },
         {
             "cabal_sha256": "49d8a7f372d35363011591b253cae4c8db8b9ec594590448e20b7bed7acaee98",
@@ -120,24 +120,24 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.2.0"
         },
         {
-            "cabal_sha256": "e3d78b13db9512aeb106e44a334ab42b7aa48d26c097299084084cb8be5c5568",
+            "cabal_sha256": "d50e055f45bd09a8238200ec64ffa0f17492c32cdb5807487894388ce1c2f839",
             "flags": [
                 "-devel"
             ],
             "package": "network",
             "revision": 0,
             "source": "hackage",
-            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
-            "version": "3.1.2.7"
+            "src_sha256": "b452a2afac95d9207357eb3820c719c7c7d27871ef4b6ed7bfcd03a036b9158e",
+            "version": "3.1.4.0"
         },
         {
-            "cabal_sha256": "6ca77c4e80b4e4109e30549c269631a9cc295c8fc2431ce4123972a5f80f7bfc",
+            "cabal_sha256": "e5ae7c083ef3a22248558f8451669bb1c55ea8090f5908b86b9033743c161730",
             "flags": [],
             "package": "th-compat",
-            "revision": 0,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8",
             "version": "0.1.4"
@@ -152,7 +152,7 @@
             "version": "2.6.4.2"
         },
         {
-            "cabal_sha256": "b878d575c470bd1f72d37af6654d924ab2b9489d88de8a71bd74d9d5d726c013",
+            "cabal_sha256": "d9220cc1b8c1f287248d650910710b96e62e54530772e3bcd19dbdec6547f8ae",
             "flags": [
                 "-conduit10",
                 "+network-uri",
@@ -160,19 +160,19 @@
                 "-warp-tests"
             ],
             "package": "HTTP",
-            "revision": 1,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
             "version": "4000.4.1"
         },
         {
-            "cabal_sha256": "58d5514b688ec037f53b9d60097b9d87f6b3847da68f65124987d67222c3a334",
+            "cabal_sha256": "0bdd3486d3a1bcbed0513b46af4a13ca74b395313fa5b6e0068d6b7413b76a04",
             "flags": [],
             "package": "base-orphans",
             "revision": 0,
             "source": "hackage",
-            "src_sha256": "888fd67f0dbe932778f5b170922ce80d0dcab1680ee98f1d6fcc362f20d9e447",
-            "version": "0.8.7"
+            "src_sha256": "613ed4d8241ed5a648a59ae6569a6962990bb545711d020d49fb83fa12d16e62",
+            "version": "0.9.0"
         },
         {
             "cabal_sha256": "2ef1bd3511e82ba56f7f23cd793dd2da84338a1e7c2cbea5b151417afe3baada",
@@ -184,24 +184,24 @@
             "version": "0.1.0.1"
         },
         {
-            "cabal_sha256": "02acedd7ac829b52756fe481a1d53294d8f5d42aaa56df560c62c6cec3587a14",
+            "cabal_sha256": "585792335d5541dba78fa8dfcb291a89cd5812a281825ff7a44afa296ab5d58a",
             "flags": [
                 "+integer-gmp",
                 "-random-initial-seed"
             ],
             "package": "hashable",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8",
             "version": "1.4.2.0"
         },
         {
-            "cabal_sha256": "2b9409023536823233ce3134558565d01b3382e651fa54ac8cb8a99967e023c9",
+            "cabal_sha256": "46367dc0c8326dcbeb7b93f200b567491c2f6029bccf822b8bb26ee660397e08",
             "flags": [
                 "-bench"
             ],
             "package": "async",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
             "version": "2.2.4"
@@ -267,13 +267,13 @@
             "version": "3.10.1.0"
         },
         {
-            "cabal_sha256": "facd0c04925ef925ec05243471fd16055229fdf51f64db1a1049de0cc6c6dfc3",
+            "cabal_sha256": "72ce9095872eae653addca5f412ac8070d6282d8e1c8578c2237c33f2cbbf4bc",
             "flags": [
                 "-exe",
                 "+use-cbits"
             ],
             "package": "cryptohash-sha256",
-            "revision": 1,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
             "version": "0.11.102.1"
@@ -290,7 +290,7 @@
             "version": "0.1.4"
         },
         {
-            "cabal_sha256": "885c9e2410e5d91a08b199897df0867fecedf818216d7329a2d43a512833dd63",
+            "cabal_sha256": "3db04d7c18b9e68ba5eef3fa7eeca05e1e248958dd182290c8e6b010c81ef73e",
             "flags": [
                 "+no-donna",
                 "+test-doctests",
@@ -298,30 +298,30 @@
                 "+test-properties"
             ],
             "package": "ed25519",
-            "revision": 6,
+            "revision": 7,
             "source": "hackage",
             "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
             "version": "0.0.5.0"
         },
         {
-            "cabal_sha256": "efd4c08c4df1ac3f423858a834c0e3b5b4909febda66a901d12a8e1d57bddaa8",
+            "cabal_sha256": "9ab54ee4f80bbd8a3fddd639ea142b7039ee2deb27f7df031a93de1819e34146",
             "flags": [
                 "+ofd-locking"
             ],
             "package": "lukko",
-            "revision": 3,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
             "version": "0.1.1.3"
         },
         {
-            "cabal_sha256": "bc14969ea4adfec6eee20264decf4a07c4002b38b2aa802d58d86b1a2cf7b895",
+            "cabal_sha256": "63dbcb0f507273a8331363e4c13a1fe91f4ea0c495883cf65f314629582a2630",
             "flags": [
                 "-old-bytestring",
                 "-old-time"
             ],
             "package": "tar",
-            "revision": 5,
+            "revision": 6,
             "source": "hackage",
             "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "version": "0.5.1.1"
@@ -340,7 +340,7 @@
             "version": "0.6.3.0"
         },
         {
-            "cabal_sha256": "18405474813b37ddfc27778c88c549f444661432224999068417dfab3471281e",
+            "cabal_sha256": "5b225c2d82f0b8f4168a6124840bae353e6b462b90fd1e07c846211ae9bcb5ed",
             "flags": [
                 "+base48",
                 "+cabal-syntax",
@@ -350,7 +350,7 @@
                 "+use-network-uri"
             ],
             "package": "hackage-security",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066",
             "version": "0.6.2.3"
@@ -376,10 +376,10 @@
             "version": "0.96.0.1"
         },
         {
-            "cabal_sha256": "61e2d98ff634b8b4b3db467772420c0f9c79c2da9ddf3d2daeb2af2417f2c535",
+            "cabal_sha256": "a1f7edb255edae85ccb9d8001b26fea760f846aee0c6302b177eb59d613214e2",
             "flags": [],
             "package": "resolv",
-            "revision": 5,
+            "revision": 6,
             "source": "hackage",
             "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
             "version": "0.1.2.0"
@@ -403,7 +403,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.2.0"
         }
     ]
 }
diff --git a/bootstrap/linux-9.0.2.json b/bootstrap/linux-9.0.2.json
index e0015b5461b..381044d6327 100644
--- a/bootstrap/linux-9.0.2.json
+++ b/bootstrap/linux-9.0.2.json
@@ -102,7 +102,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.2.0"
         },
         {
             "cabal_sha256": "49d8a7f372d35363011591b253cae4c8db8b9ec594590448e20b7bed7acaee98",
@@ -120,24 +120,24 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.2.0"
         },
         {
-            "cabal_sha256": "e3d78b13db9512aeb106e44a334ab42b7aa48d26c097299084084cb8be5c5568",
+            "cabal_sha256": "d50e055f45bd09a8238200ec64ffa0f17492c32cdb5807487894388ce1c2f839",
             "flags": [
                 "-devel"
             ],
             "package": "network",
             "revision": 0,
             "source": "hackage",
-            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
-            "version": "3.1.2.7"
+            "src_sha256": "b452a2afac95d9207357eb3820c719c7c7d27871ef4b6ed7bfcd03a036b9158e",
+            "version": "3.1.4.0"
         },
         {
-            "cabal_sha256": "6ca77c4e80b4e4109e30549c269631a9cc295c8fc2431ce4123972a5f80f7bfc",
+            "cabal_sha256": "e5ae7c083ef3a22248558f8451669bb1c55ea8090f5908b86b9033743c161730",
             "flags": [],
             "package": "th-compat",
-            "revision": 0,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8",
             "version": "0.1.4"
@@ -152,7 +152,7 @@
             "version": "2.6.4.2"
         },
         {
-            "cabal_sha256": "b878d575c470bd1f72d37af6654d924ab2b9489d88de8a71bd74d9d5d726c013",
+            "cabal_sha256": "d9220cc1b8c1f287248d650910710b96e62e54530772e3bcd19dbdec6547f8ae",
             "flags": [
                 "-conduit10",
                 "+network-uri",
@@ -160,19 +160,19 @@
                 "-warp-tests"
             ],
             "package": "HTTP",
-            "revision": 1,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
             "version": "4000.4.1"
         },
         {
-            "cabal_sha256": "58d5514b688ec037f53b9d60097b9d87f6b3847da68f65124987d67222c3a334",
+            "cabal_sha256": "0bdd3486d3a1bcbed0513b46af4a13ca74b395313fa5b6e0068d6b7413b76a04",
             "flags": [],
             "package": "base-orphans",
             "revision": 0,
             "source": "hackage",
-            "src_sha256": "888fd67f0dbe932778f5b170922ce80d0dcab1680ee98f1d6fcc362f20d9e447",
-            "version": "0.8.7"
+            "src_sha256": "613ed4d8241ed5a648a59ae6569a6962990bb545711d020d49fb83fa12d16e62",
+            "version": "0.9.0"
         },
         {
             "cabal_sha256": "2ef1bd3511e82ba56f7f23cd793dd2da84338a1e7c2cbea5b151417afe3baada",
@@ -184,24 +184,24 @@
             "version": "0.1.0.1"
         },
         {
-            "cabal_sha256": "02acedd7ac829b52756fe481a1d53294d8f5d42aaa56df560c62c6cec3587a14",
+            "cabal_sha256": "585792335d5541dba78fa8dfcb291a89cd5812a281825ff7a44afa296ab5d58a",
             "flags": [
                 "+integer-gmp",
                 "-random-initial-seed"
             ],
             "package": "hashable",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8",
             "version": "1.4.2.0"
         },
         {
-            "cabal_sha256": "2b9409023536823233ce3134558565d01b3382e651fa54ac8cb8a99967e023c9",
+            "cabal_sha256": "46367dc0c8326dcbeb7b93f200b567491c2f6029bccf822b8bb26ee660397e08",
             "flags": [
                 "-bench"
             ],
             "package": "async",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
             "version": "2.2.4"
@@ -267,13 +267,13 @@
             "version": "3.10.1.0"
         },
         {
-            "cabal_sha256": "facd0c04925ef925ec05243471fd16055229fdf51f64db1a1049de0cc6c6dfc3",
+            "cabal_sha256": "72ce9095872eae653addca5f412ac8070d6282d8e1c8578c2237c33f2cbbf4bc",
             "flags": [
                 "-exe",
                 "+use-cbits"
             ],
             "package": "cryptohash-sha256",
-            "revision": 1,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
             "version": "0.11.102.1"
@@ -290,7 +290,7 @@
             "version": "0.1.4"
         },
         {
-            "cabal_sha256": "885c9e2410e5d91a08b199897df0867fecedf818216d7329a2d43a512833dd63",
+            "cabal_sha256": "3db04d7c18b9e68ba5eef3fa7eeca05e1e248958dd182290c8e6b010c81ef73e",
             "flags": [
                 "+no-donna",
                 "+test-doctests",
@@ -298,30 +298,30 @@
                 "+test-properties"
             ],
             "package": "ed25519",
-            "revision": 6,
+            "revision": 7,
             "source": "hackage",
             "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
             "version": "0.0.5.0"
         },
         {
-            "cabal_sha256": "efd4c08c4df1ac3f423858a834c0e3b5b4909febda66a901d12a8e1d57bddaa8",
+            "cabal_sha256": "9ab54ee4f80bbd8a3fddd639ea142b7039ee2deb27f7df031a93de1819e34146",
             "flags": [
                 "+ofd-locking"
             ],
             "package": "lukko",
-            "revision": 3,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
             "version": "0.1.1.3"
         },
         {
-            "cabal_sha256": "bc14969ea4adfec6eee20264decf4a07c4002b38b2aa802d58d86b1a2cf7b895",
+            "cabal_sha256": "63dbcb0f507273a8331363e4c13a1fe91f4ea0c495883cf65f314629582a2630",
             "flags": [
                 "-old-bytestring",
                 "-old-time"
             ],
             "package": "tar",
-            "revision": 5,
+            "revision": 6,
             "source": "hackage",
             "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "version": "0.5.1.1"
@@ -340,7 +340,7 @@
             "version": "0.6.3.0"
         },
         {
-            "cabal_sha256": "18405474813b37ddfc27778c88c549f444661432224999068417dfab3471281e",
+            "cabal_sha256": "5b225c2d82f0b8f4168a6124840bae353e6b462b90fd1e07c846211ae9bcb5ed",
             "flags": [
                 "+base48",
                 "+cabal-syntax",
@@ -350,7 +350,7 @@
                 "+use-network-uri"
             ],
             "package": "hackage-security",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066",
             "version": "0.6.2.3"
@@ -376,10 +376,10 @@
             "version": "0.96.0.1"
         },
         {
-            "cabal_sha256": "61e2d98ff634b8b4b3db467772420c0f9c79c2da9ddf3d2daeb2af2417f2c535",
+            "cabal_sha256": "a1f7edb255edae85ccb9d8001b26fea760f846aee0c6302b177eb59d613214e2",
             "flags": [],
             "package": "resolv",
-            "revision": 5,
+            "revision": 6,
             "source": "hackage",
             "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
             "version": "0.1.2.0"
@@ -403,7 +403,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.2.0"
         }
     ]
 }
diff --git a/bootstrap/linux-9.2.6.json b/bootstrap/linux-9.2.8.json
similarity index 89%
rename from bootstrap/linux-9.2.6.json
rename to bootstrap/linux-9.2.8.json
index c1eab1720e7..f9485f85557 100644
--- a/bootstrap/linux-9.2.6.json
+++ b/bootstrap/linux-9.2.8.json
@@ -26,7 +26,7 @@
         },
         {
             "package": "ghc-boot-th",
-            "version": "9.2.6"
+            "version": "9.2.8"
         },
         {
             "package": "pretty",
@@ -102,7 +102,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.2.0"
         },
         {
             "cabal_sha256": "49d8a7f372d35363011591b253cae4c8db8b9ec594590448e20b7bed7acaee98",
@@ -120,24 +120,24 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.2.0"
         },
         {
-            "cabal_sha256": "e3d78b13db9512aeb106e44a334ab42b7aa48d26c097299084084cb8be5c5568",
+            "cabal_sha256": "d50e055f45bd09a8238200ec64ffa0f17492c32cdb5807487894388ce1c2f839",
             "flags": [
                 "-devel"
             ],
             "package": "network",
             "revision": 0,
             "source": "hackage",
-            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
-            "version": "3.1.2.7"
+            "src_sha256": "b452a2afac95d9207357eb3820c719c7c7d27871ef4b6ed7bfcd03a036b9158e",
+            "version": "3.1.4.0"
         },
         {
-            "cabal_sha256": "6ca77c4e80b4e4109e30549c269631a9cc295c8fc2431ce4123972a5f80f7bfc",
+            "cabal_sha256": "e5ae7c083ef3a22248558f8451669bb1c55ea8090f5908b86b9033743c161730",
             "flags": [],
             "package": "th-compat",
-            "revision": 0,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8",
             "version": "0.1.4"
@@ -152,7 +152,7 @@
             "version": "2.6.4.2"
         },
         {
-            "cabal_sha256": "b878d575c470bd1f72d37af6654d924ab2b9489d88de8a71bd74d9d5d726c013",
+            "cabal_sha256": "d9220cc1b8c1f287248d650910710b96e62e54530772e3bcd19dbdec6547f8ae",
             "flags": [
                 "-conduit10",
                 "+network-uri",
@@ -160,7 +160,7 @@
                 "-warp-tests"
             ],
             "package": "HTTP",
-            "revision": 1,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
             "version": "4000.4.1"
@@ -175,24 +175,24 @@
             "version": "0.1.0.1"
         },
         {
-            "cabal_sha256": "02acedd7ac829b52756fe481a1d53294d8f5d42aaa56df560c62c6cec3587a14",
+            "cabal_sha256": "585792335d5541dba78fa8dfcb291a89cd5812a281825ff7a44afa296ab5d58a",
             "flags": [
                 "+integer-gmp",
                 "-random-initial-seed"
             ],
             "package": "hashable",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8",
             "version": "1.4.2.0"
         },
         {
-            "cabal_sha256": "2b9409023536823233ce3134558565d01b3382e651fa54ac8cb8a99967e023c9",
+            "cabal_sha256": "46367dc0c8326dcbeb7b93f200b567491c2f6029bccf822b8bb26ee660397e08",
             "flags": [
                 "-bench"
             ],
             "package": "async",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
             "version": "2.2.4"
@@ -258,13 +258,13 @@
             "version": "3.10.1.0"
         },
         {
-            "cabal_sha256": "facd0c04925ef925ec05243471fd16055229fdf51f64db1a1049de0cc6c6dfc3",
+            "cabal_sha256": "72ce9095872eae653addca5f412ac8070d6282d8e1c8578c2237c33f2cbbf4bc",
             "flags": [
                 "-exe",
                 "+use-cbits"
             ],
             "package": "cryptohash-sha256",
-            "revision": 1,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
             "version": "0.11.102.1"
@@ -281,7 +281,7 @@
             "version": "0.1.4"
         },
         {
-            "cabal_sha256": "885c9e2410e5d91a08b199897df0867fecedf818216d7329a2d43a512833dd63",
+            "cabal_sha256": "3db04d7c18b9e68ba5eef3fa7eeca05e1e248958dd182290c8e6b010c81ef73e",
             "flags": [
                 "+no-donna",
                 "+test-doctests",
@@ -289,30 +289,30 @@
                 "+test-properties"
             ],
             "package": "ed25519",
-            "revision": 6,
+            "revision": 7,
             "source": "hackage",
             "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
             "version": "0.0.5.0"
         },
         {
-            "cabal_sha256": "efd4c08c4df1ac3f423858a834c0e3b5b4909febda66a901d12a8e1d57bddaa8",
+            "cabal_sha256": "9ab54ee4f80bbd8a3fddd639ea142b7039ee2deb27f7df031a93de1819e34146",
             "flags": [
                 "+ofd-locking"
             ],
             "package": "lukko",
-            "revision": 3,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
             "version": "0.1.1.3"
         },
         {
-            "cabal_sha256": "bc14969ea4adfec6eee20264decf4a07c4002b38b2aa802d58d86b1a2cf7b895",
+            "cabal_sha256": "63dbcb0f507273a8331363e4c13a1fe91f4ea0c495883cf65f314629582a2630",
             "flags": [
                 "-old-bytestring",
                 "-old-time"
             ],
             "package": "tar",
-            "revision": 5,
+            "revision": 6,
             "source": "hackage",
             "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "version": "0.5.1.1"
@@ -331,7 +331,7 @@
             "version": "0.6.3.0"
         },
         {
-            "cabal_sha256": "18405474813b37ddfc27778c88c549f444661432224999068417dfab3471281e",
+            "cabal_sha256": "5b225c2d82f0b8f4168a6124840bae353e6b462b90fd1e07c846211ae9bcb5ed",
             "flags": [
                 "+base48",
                 "+cabal-syntax",
@@ -341,7 +341,7 @@
                 "+use-network-uri"
             ],
             "package": "hackage-security",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066",
             "version": "0.6.2.3"
@@ -367,10 +367,10 @@
             "version": "0.96.0.1"
         },
         {
-            "cabal_sha256": "61e2d98ff634b8b4b3db467772420c0f9c79c2da9ddf3d2daeb2af2417f2c535",
+            "cabal_sha256": "a1f7edb255edae85ccb9d8001b26fea760f846aee0c6302b177eb59d613214e2",
             "flags": [],
             "package": "resolv",
-            "revision": 5,
+            "revision": 6,
             "source": "hackage",
             "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
             "version": "0.1.2.0"
@@ -394,7 +394,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.2.0"
         }
     ]
 }
diff --git a/bootstrap/linux-9.4.4.json b/bootstrap/linux-9.4.5.json
similarity index 86%
rename from bootstrap/linux-9.4.4.json
rename to bootstrap/linux-9.4.5.json
index 33c80f8b821..dc533481ea9 100644
--- a/bootstrap/linux-9.4.4.json
+++ b/bootstrap/linux-9.4.5.json
@@ -14,7 +14,7 @@
         },
         {
             "package": "base",
-            "version": "4.17.0.0"
+            "version": "4.17.1.0"
         },
         {
             "package": "array",
@@ -26,7 +26,7 @@
         },
         {
             "package": "ghc-boot-th",
-            "version": "9.4.4"
+            "version": "9.4.5"
         },
         {
             "package": "pretty",
@@ -38,11 +38,11 @@
         },
         {
             "package": "bytestring",
-            "version": "0.11.3.1"
+            "version": "0.11.4.0"
         },
         {
             "package": "containers",
-            "version": "0.6.6"
+            "version": "0.6.7"
         },
         {
             "package": "binary",
@@ -74,11 +74,11 @@
         },
         {
             "package": "text",
-            "version": "2.0.1"
+            "version": "2.0.2"
         },
         {
             "package": "parsec",
-            "version": "3.1.15.0"
+            "version": "3.1.16.1"
         },
         {
             "package": "process",
@@ -101,7 +101,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.2.0"
         },
         {
             "cabal_sha256": null,
@@ -110,24 +110,24 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.2.0"
         },
         {
-            "cabal_sha256": "e3d78b13db9512aeb106e44a334ab42b7aa48d26c097299084084cb8be5c5568",
+            "cabal_sha256": "d50e055f45bd09a8238200ec64ffa0f17492c32cdb5807487894388ce1c2f839",
             "flags": [
                 "-devel"
             ],
             "package": "network",
             "revision": 0,
             "source": "hackage",
-            "src_sha256": "7f7620fef1a1af3d3d6747f510e73223a5c600e7d7fd9ace073d1222bdc63d85",
-            "version": "3.1.2.7"
+            "src_sha256": "b452a2afac95d9207357eb3820c719c7c7d27871ef4b6ed7bfcd03a036b9158e",
+            "version": "3.1.4.0"
         },
         {
-            "cabal_sha256": "6ca77c4e80b4e4109e30549c269631a9cc295c8fc2431ce4123972a5f80f7bfc",
+            "cabal_sha256": "e5ae7c083ef3a22248558f8451669bb1c55ea8090f5908b86b9033743c161730",
             "flags": [],
             "package": "th-compat",
-            "revision": 0,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8",
             "version": "0.1.4"
@@ -142,7 +142,7 @@
             "version": "2.6.4.2"
         },
         {
-            "cabal_sha256": "b878d575c470bd1f72d37af6654d924ab2b9489d88de8a71bd74d9d5d726c013",
+            "cabal_sha256": "d9220cc1b8c1f287248d650910710b96e62e54530772e3bcd19dbdec6547f8ae",
             "flags": [
                 "-conduit10",
                 "+network-uri",
@@ -150,30 +150,30 @@
                 "-warp-tests"
             ],
             "package": "HTTP",
-            "revision": 1,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
             "version": "4000.4.1"
         },
         {
-            "cabal_sha256": "02acedd7ac829b52756fe481a1d53294d8f5d42aaa56df560c62c6cec3587a14",
+            "cabal_sha256": "585792335d5541dba78fa8dfcb291a89cd5812a281825ff7a44afa296ab5d58a",
             "flags": [
                 "+integer-gmp",
                 "-random-initial-seed"
             ],
             "package": "hashable",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8",
             "version": "1.4.2.0"
         },
         {
-            "cabal_sha256": "2b9409023536823233ce3134558565d01b3382e651fa54ac8cb8a99967e023c9",
+            "cabal_sha256": "46367dc0c8326dcbeb7b93f200b567491c2f6029bccf822b8bb26ee660397e08",
             "flags": [
                 "-bench"
             ],
             "package": "async",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
             "version": "2.2.4"
@@ -239,13 +239,13 @@
             "version": "3.10.1.0"
         },
         {
-            "cabal_sha256": "facd0c04925ef925ec05243471fd16055229fdf51f64db1a1049de0cc6c6dfc3",
+            "cabal_sha256": "72ce9095872eae653addca5f412ac8070d6282d8e1c8578c2237c33f2cbbf4bc",
             "flags": [
                 "-exe",
                 "+use-cbits"
             ],
             "package": "cryptohash-sha256",
-            "revision": 1,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
             "version": "0.11.102.1"
@@ -262,7 +262,7 @@
             "version": "0.1.4"
         },
         {
-            "cabal_sha256": "885c9e2410e5d91a08b199897df0867fecedf818216d7329a2d43a512833dd63",
+            "cabal_sha256": "3db04d7c18b9e68ba5eef3fa7eeca05e1e248958dd182290c8e6b010c81ef73e",
             "flags": [
                 "+no-donna",
                 "+test-doctests",
@@ -270,30 +270,30 @@
                 "+test-properties"
             ],
             "package": "ed25519",
-            "revision": 6,
+            "revision": 7,
             "source": "hackage",
             "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
             "version": "0.0.5.0"
         },
         {
-            "cabal_sha256": "efd4c08c4df1ac3f423858a834c0e3b5b4909febda66a901d12a8e1d57bddaa8",
+            "cabal_sha256": "9ab54ee4f80bbd8a3fddd639ea142b7039ee2deb27f7df031a93de1819e34146",
             "flags": [
                 "+ofd-locking"
             ],
             "package": "lukko",
-            "revision": 3,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
             "version": "0.1.1.3"
         },
         {
-            "cabal_sha256": "bc14969ea4adfec6eee20264decf4a07c4002b38b2aa802d58d86b1a2cf7b895",
+            "cabal_sha256": "63dbcb0f507273a8331363e4c13a1fe91f4ea0c495883cf65f314629582a2630",
             "flags": [
                 "-old-bytestring",
                 "-old-time"
             ],
             "package": "tar",
-            "revision": 5,
+            "revision": 6,
             "source": "hackage",
             "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "version": "0.5.1.1"
@@ -312,7 +312,7 @@
             "version": "0.6.3.0"
         },
         {
-            "cabal_sha256": "18405474813b37ddfc27778c88c549f444661432224999068417dfab3471281e",
+            "cabal_sha256": "5b225c2d82f0b8f4168a6124840bae353e6b462b90fd1e07c846211ae9bcb5ed",
             "flags": [
                 "+base48",
                 "+cabal-syntax",
@@ -322,7 +322,7 @@
                 "+use-network-uri"
             ],
             "package": "hackage-security",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066",
             "version": "0.6.2.3"
@@ -348,10 +348,10 @@
             "version": "0.96.0.1"
         },
         {
-            "cabal_sha256": "61e2d98ff634b8b4b3db467772420c0f9c79c2da9ddf3d2daeb2af2417f2c535",
+            "cabal_sha256": "a1f7edb255edae85ccb9d8001b26fea760f846aee0c6302b177eb59d613214e2",
             "flags": [],
             "package": "resolv",
-            "revision": 5,
+            "revision": 6,
             "source": "hackage",
             "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
             "version": "0.1.2.0"
@@ -375,7 +375,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.2.0"
         }
     ]
 }
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index c9f7f98223d..52fb7cf4de2 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -1,7 +1,7 @@
 Cabal-Version:      2.2
 
 Name:               cabal-install
-Version:            3.10.1.0
+Version:            3.10.2.0
 Synopsis:           The command-line interface for Cabal and Hackage.
 Description:
     The \'cabal\' command-line program simplifies the process of managing
diff --git a/cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs b/cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs
index b492140b4ed..93588d88c3f 100644
--- a/cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/CustomPreProcess/cabal.test.hs
@@ -1,9 +1,6 @@
 import Test.Cabal.Prelude
 -- Test internal custom preprocessor
 main = cabalTest $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     skipUnless "no Cabal for GHC" =<< hasCabalForGhc
 
     -- old Cabal's ./Setup.hs output is difficult to normalise
diff --git a/cabal-testsuite/PackageTests/FFI/ForeignOptsC/cabal.test.hs b/cabal-testsuite/PackageTests/FFI/ForeignOptsC/cabal.test.hs
index 377b4a01466..7d5d4f0aff9 100644
--- a/cabal-testsuite/PackageTests/FFI/ForeignOptsC/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/FFI/ForeignOptsC/cabal.test.hs
@@ -1,7 +1,4 @@
 import Test.Cabal.Prelude
 main = cabalTest $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     cabal "v2-build" ["foreign-opts-c-exe"]
     withPlan $ runPlanExe "foreign-opts-c" "foreign-opts-c-exe" []
diff --git a/cabal-testsuite/PackageTests/FFI/ForeignOptsCxx/cabal.test.hs b/cabal-testsuite/PackageTests/FFI/ForeignOptsCxx/cabal.test.hs
index 83177d702e3..10024955a78 100644
--- a/cabal-testsuite/PackageTests/FFI/ForeignOptsCxx/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/FFI/ForeignOptsCxx/cabal.test.hs
@@ -1,7 +1,4 @@
 import Test.Cabal.Prelude
 main = cabalTest $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     cabal "v2-build" ["foreign-opts-cxx-exe"]
     withPlan $ runPlanExe "foreign-opts-cxx" "foreign-opts-cxx-exe" []
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdBench/OptionsFlag/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdBench/OptionsFlag/cabal.test.hs
index 055979ea65c..9174ba94a6c 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdBench/OptionsFlag/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdBench/OptionsFlag/cabal.test.hs
@@ -1,9 +1,6 @@
 import Test.Cabal.Prelude
 
 main = cabalTest $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     cabal "v2-bench"
       [ "--benchmark-option=1"
       , "--benchmark-options=\"2 3\""
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRepl/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRepl/cabal.test.hs
index f09f7f8a4fa..9c0f021da5d 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRepl/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRepl/cabal.test.hs
@@ -1,8 +1,5 @@
 import Test.Cabal.Prelude
 
 main = cabalTest . void $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     cabal' "v2-build" ["script.hs"]
     cabalWithStdin "v2-repl" ["script.hs"] ""
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRun/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRun/cabal.test.hs
index 23d49e3f73f..e46b56d4afd 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRun/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdBuild/ScriptBuildRun/cabal.test.hs
@@ -1,8 +1,5 @@
 import Test.Cabal.Prelude
 
 main = cabalTest . void $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     cabal' "v2-build" ["script.hs"]
     cabal' "v2-run" ["script.hs"]
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.test.hs
index 1754c7cb4a5..64c858e8d0d 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptLiterate/cabal.test.hs
@@ -1,8 +1,5 @@
 import Test.Cabal.Prelude
 
 main = cabalTest $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     res <- cabal' "v2-run" ["script.lhs"]
     assertOutputContains "Hello World" res
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.test.hs
index e010ea6ec05..b78a6941a79 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptNoExtension/cabal.test.hs
@@ -1,7 +1,4 @@
 import Test.Cabal.Prelude
 
 main = cabalTest . void $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     cabal' "v2-run" ["with sp"] >>= assertOutputContains "Hello World"
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.test.hs
index 731fb7182da..8c92079136b 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdRun/ScriptWithProjectBlock/cabal.test.hs
@@ -1,9 +1,6 @@
 import Test.Cabal.Prelude
 
 main = cabalTest $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     -- script is called "s.hs" to avoid Windows long path issue in CI
     res <- cabal' "v2-run" ["s.hs"]
     assertOutputContains "Hello World" res
diff --git a/cabal-testsuite/PackageTests/NewBuild/CmdTest/OptionsFlag/cabal.test.hs b/cabal-testsuite/PackageTests/NewBuild/CmdTest/OptionsFlag/cabal.test.hs
index c0493cf4629..e9b8f5b6c12 100644
--- a/cabal-testsuite/PackageTests/NewBuild/CmdTest/OptionsFlag/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/NewBuild/CmdTest/OptionsFlag/cabal.test.hs
@@ -1,9 +1,6 @@
 import Test.Cabal.Prelude
 
 main = cabalTest $ do
-  isWin <- isWindows
-  ghc94 <- isGhcVersion "== 9.4.*"
-  expectBrokenIf (isWin && ghc94) 8451 $ do
     cabal "v2-test"
       [ "--test-option=1"
       , "--test-options=\"2 3\""
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index 095a51b54cc..4b9a9f6eea6 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -28,8 +28,8 @@ common shared
   build-depends:
     , base >= 4.9 && <4.19
     -- this needs to match the in-tree lib:Cabal version
-    , Cabal ^>= 3.10.0.0
-    , Cabal-syntax ^>= 3.10.0.0
+    , Cabal ^>= 3.10.2.0
+    , Cabal-syntax ^>= 3.10.2.0
 
   ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
 
@@ -115,6 +115,6 @@ custom-setup
   -- and due to Custom complexity and ConstraintSetupCabalMaxVersion
   -- it has to be the latest release version plus
   -- you have to use the latest cabal-install release
-  setup-depends: Cabal == 3.8.*,
-                 Cabal-syntax == 3.8.*,
+  setup-depends: Cabal == 3.10.2.0,
+                 Cabal-syntax == 3.10.2.0,
                  base, filepath, directory
diff --git a/doc/conf.py b/doc/conf.py
index ef955125486..2fc7bfe2694 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -13,7 +13,7 @@
 sys.path.insert(0, os.path.abspath('.'))
 import cabaldomain
 
-version = "3.10.1.0"
+version = "3.10.2.0"
 
 extensions = [
     'sphinx.ext.extlinks',

From 9accc33be36cf83e8d718a24276064fd746d5d2f Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Wed, 28 Jun 2023 19:45:46 +1200
Subject: [PATCH 058/144] check: allow "haiku" as a valid OS string. (#9048)

---
 Cabal/src/Distribution/PackageDescription/Check.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs
index 4c14a6999b3..9a79fb4f683 100644
--- a/Cabal/src/Distribution/PackageDescription/Check.hs
+++ b/Cabal/src/Distribution/PackageDescription/Check.hs
@@ -1932,7 +1932,7 @@ checkConditionals pkg =
       PackageDistInexcusable (UnknownCompiler unknownImpls)
   ]
   where
-    unknownOSs    = [ os   | OS   (OtherOS os)           <- conditions ]
+    unknownOSs    = [ os   | OS   (OtherOS os)           <- conditions, os /= "haiku" ]
     unknownArches = [ arch | Arch (OtherArch arch)       <- conditions ]
     unknownImpls  = [ impl | Impl (OtherCompiler impl) _ <- conditions ]
     conditions = concatMap fvs (maybeToList (condLibrary pkg))

From 08e94a7c0372f4f6d0e1d6ab1db4a36859054d28 Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Fri, 30 Jun 2023 12:14:14 +0200
Subject: [PATCH 059/144] Do not always pass `--quickjump` to haddock (backport
 #9049) (#9073)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Finley <finleymcilwaine@gmail.com>
Co-authored-by: Hécate Moonlight <Kleidukos@users.noreply.github.com>
---
 .github/workflows/whitespace.yml         |  2 +-
 Cabal/src/Distribution/Simple/Haddock.hs |  2 +-
 changelog.d/pr-9049                      | 13 +++++++++++++
 3 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 changelog.d/pr-9049

diff --git a/.github/workflows/whitespace.yml b/.github/workflows/whitespace.yml
index 1254f7ccc4e..9c759ee3e35 100644
--- a/.github/workflows/whitespace.yml
+++ b/.github/workflows/whitespace.yml
@@ -49,7 +49,7 @@ jobs:
     - name: Install fix-whitespace
       if: ${{ !steps.cache.outputs.cache-hit }}
       run: |
-        cabal install --ignore-project --install-method=copy --installdir=$HOME/.local/bin fix-whitespace-${{ env.fix-whitespace-ver }}
+        cabal install --constraint=aeson==2.1.2.1 --ignore-project --install-method=copy --installdir=$HOME/.local/bin fix-whitespace-${{ env.fix-whitespace-ver }}
         strip $HOME/.local/bin/fix-whitespace
 
     - name: Check the whitespace issue
diff --git a/Cabal/src/Distribution/Simple/Haddock.hs b/Cabal/src/Distribution/Simple/Haddock.hs
index aa616ec0249..bc5c79f4e82 100644
--- a/Cabal/src/Distribution/Simple/Haddock.hs
+++ b/Cabal/src/Distribution/Simple/Haddock.hs
@@ -709,7 +709,7 @@ renderPureArgs version comp platform args = concat
     , [ "--since-qual=external" | isVersion 2 20 ]
 
     , [ "--quickjump" | isVersion 2 19
-                      , _ <- flagToList . argQuickJump $ args ]
+                      , True <- flagToList . argQuickJump $ args ]
 
     , [ "--hyperlinked-source" | isVersion 2 17
                                , True <- flagToList . argLinkedSource $ args ]
diff --git a/changelog.d/pr-9049 b/changelog.d/pr-9049
new file mode 100644
index 00000000000..41fcd0a5bb7
--- /dev/null
+++ b/changelog.d/pr-9049
@@ -0,0 +1,13 @@
+synopsis: Do not always pass --quickjump to haddock #9049
+packages: Cabal
+prs: #9049
+issues: #9060
+description: {
+
+6d8adf13101 caused `cabal` to always pass the `--quickjump` flag to Haddock.
+Not only does this waste memory for a service that user hasn't asked for,
+but also leads to a failure with Haddocks shipped with GHC 9.0 and 9.2,
+which had a separate bug (fixed in later versions but not backported) when
+Haddock does not pass `--quickjump` recursively to the package dependencies.
+
+}

From c7915c271b12cdc36bc6a936caed20bf86125412 Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Sat, 1 Jul 2023 20:59:37 +0200
Subject: [PATCH 060/144] Document the pkg: prefix for package targets
 (backport #9015) (#9079)

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
---
 doc/cabal-commands.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/cabal-commands.rst b/doc/cabal-commands.rst
index c1dbaa780bc..b10d28787b5 100644
--- a/doc/cabal-commands.rst
+++ b/doc/cabal-commands.rst
@@ -191,7 +191,7 @@ Target Forms
 
 A cabal command target can take any of the following forms:
 
--  A package target: ``package``, which specifies that all enabled
+-  A package target: ``[pkg:]package``, which specifies that all enabled
    components of a package to be built. By default, test suites and
    benchmarks are *not* enabled, unless they are explicitly requested
    (e.g., via ``--enable-tests``.)

From 7b53e6588c7e518d007bf6621290312a964b6a65 Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Thu, 22 Jun 2023 21:13:49 +0000
Subject: [PATCH 061/144] cabal-install: update resolv to 0.2.0.2

Fixes #9054

Co-authored-by: Francesco Gazzetta <fgaz@fgaz.me>
(cherry picked from commit 037673e5a2169e781afe7fa75c18f4e2dc2d7be9)
---
 cabal-install/cabal-install.cabal                     |  2 +-
 .../NewUpdate/UpdateIndexState/update-index-state.out |  6 ------
 .../UpdateIndexState/update-index-state.test.hs       | 11 +++++++----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 52fb7cf4de2..2cae6726b2a 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -237,7 +237,7 @@ library
       if os(windows)
         build-depends: windns      >= 0.1.0 && < 0.2
       else
-        build-depends: resolv      >= 0.1.1 && < 0.2
+        build-depends: resolv      >= 0.1.1 && < 0.3
 
     if os(windows)
       -- newer directory for symlinks
diff --git a/cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.out b/cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.out
index cee2a5a19de..d63c65ec921 100644
--- a/cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.out
+++ b/cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.out
@@ -1,10 +1,4 @@
 # cabal update
-Warning: Caught exception during _mirrors lookup:user error (res_query(3) failed)
-Warning: No mirrors found for http://localhost:8000/
-Downloading the latest package list from repository.localhost
-Package list of repository.localhost has been updated.
-The index-state is set to 2022-01-28T02:36:41Z.
-# cabal update
 Downloading the latest package list from repository.localhost
 Package list of repository.localhost is up to date.
 The index-state is set to 2016-09-24T17:47:48Z.
diff --git a/cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.test.hs b/cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.test.hs
index 047d70b29c1..2be563c6bec 100644
--- a/cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.test.hs
+++ b/cabal-testsuite/PackageTests/NewUpdate/UpdateIndexState/update-index-state.test.hs
@@ -1,9 +1,12 @@
 import Test.Cabal.Prelude
 
 main = cabalTest $ withRemoteRepo "repo" $ do
-  -- This test causes a warning about missing mirrors, the warning is
-  -- included in the expected output to make the test pass but it's not
-  -- part of the test expectations.
-  cabal "update" ["repository.localhost,2022-01-28T02:36:41Z"]
+  -- The _first_ update call causes a warning about missing mirrors, the warning
+  -- is platform-dependent and it's not part of the test expectations, so we
+  -- check the output manually.
+  res <- recordMode DoNotRecord $
+           cabal' "update" ["repository.localhost,2022-01-28T02:36:41Z"]
+  assertOutputContains "The index-state is set to 2022-01-28T02:36:41Z" res
+  assertOutputDoesNotContain "revert" res
   cabal "update" ["repository.localhost,2016-09-24T17:47:48Z"]
   cabal "update" ["repository.localhost,2022-01-28T02:36:41Z"]

From 9c223f6532b2fa8dd5bda9ac6f061575a8cf9342 Mon Sep 17 00:00:00 2001
From: Ben Gamari <ben@smart-cactus.org>
Date: Fri, 30 Jun 2023 15:42:46 -0400
Subject: [PATCH 062/144] Bump deepseq bounds to allow 1.5

(cherry picked from commit c801599f78974c6a12dcb2ef7444f57ab27395a2)
---
 Cabal-syntax/Cabal-syntax.cabal | 2 +-
 Cabal/Cabal.cabal               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index 48334f5c7e6..f74b827e34b 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -33,7 +33,7 @@ library
     binary     >= 0.7      && < 0.9,
     bytestring >= 0.10.0.0 && < 0.12,
     containers >= 0.5.0.0  && < 0.7,
-    deepseq    >= 1.3.0.1  && < 1.5,
+    deepseq    >= 1.3.0.1  && < 1.6,
     directory  >= 1.2      && < 1.4,
     filepath   >= 1.3.0.1  && < 1.5,
     mtl        >= 2.1      && < 2.4,
diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index 707f57c7745..da42b926e07 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -39,7 +39,7 @@ library
     base       >= 4.9      && < 5,
     bytestring >= 0.10.0.0 && < 0.12,
     containers >= 0.5.0.0  && < 0.7,
-    deepseq    >= 1.3.0.1  && < 1.5,
+    deepseq    >= 1.3.0.1  && < 1.6,
     directory  >= 1.2      && < 1.4,
     filepath   >= 1.3.0.1  && < 1.5,
     pretty     >= 1.1.1    && < 1.2,

From 2722e81aa1489e71f58e6020e6c8a3fa9c1ce0c9 Mon Sep 17 00:00:00 2001
From: ulysses4ever <6832600+ulysses4ever@users.noreply.github.com>
Date: Wed, 12 Jul 2023 11:41:00 +0000
Subject: [PATCH 063/144] Avoid dodgy Rep (..) import in Cabal-syntax (backport
 #9071) (#9077) Avoid dodgy Rep (..) import in Cabal-syntax

Fixes #9070.

(cherry picked from commit ec75950b3d5e8391500957664d937dedaeee7cce)

# Conflicts:
#	Cabal-syntax/src/Distribution/Compat/Prelude.hs

* Merge branch '3.10' into mergify/bp/3.10/pr-9071
---
 Cabal-syntax/src/Distribution/Compat/Prelude.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Cabal-syntax/src/Distribution/Compat/Prelude.hs b/Cabal-syntax/src/Distribution/Compat/Prelude.hs
index 954714dc8ab..4c820e73c69 100644
--- a/Cabal-syntax/src/Distribution/Compat/Prelude.hs
+++ b/Cabal-syntax/src/Distribution/Compat/Prelude.hs
@@ -186,7 +186,7 @@ import Data.Word                     (Word, Word16, Word32, Word64, Word8)
 import Distribution.Compat.Binary    (Binary (..))
 import Distribution.Compat.Semigroup (Semigroup (..), gmappend, gmempty)
 import Distribution.Compat.Typeable  (TypeRep, Typeable, typeRep)
-import GHC.Generics                  ((:*:) ((:*:)), (:+:) (L1, R1), Generic, K1 (unK1), M1 (unM1), Rep (..), U1 (U1), V1)
+import GHC.Generics                  (Generic (..), K1 (unK1), M1 (unM1), U1 (U1), V1, (:*:) ((:*:)), (:+:) (L1, R1))
 import System.Exit                   (ExitCode (..), exitFailure, exitSuccess, exitWith)
 import Text.Read                     (readMaybe)
 

From b4ee3697c6f128da2e88a3116d6895c5d029f939 Mon Sep 17 00:00:00 2001
From: ulysses4ever <6832600+ulysses4ever@users.noreply.github.com>
Date: Wed, 12 Jul 2023 21:31:09 +0000
Subject: [PATCH 064/144] Add new root keys (backport #9068) (#9080) Add new
 root keys

(cherry picked from commit 7436f8f124b1655affe107a0acb7b16759294877)

# Conflicts:
#	cabal-install/src/Distribution/Client/Config.hs

* Add CHANGELOG entry for PR #9068

(cherry picked from commit 700670402b6125a67f1741f93286c22a362fd9f1)

* Fix conflict
---
 .../src/Distribution/Client/Config.hs         | 29 +++++++++++++++----
 changelog.d/pr-9068                           | 12 ++++++++
 2 files changed, 35 insertions(+), 6 deletions(-)
 create mode 100644 changelog.d/pr-9068

diff --git a/cabal-install/src/Distribution/Client/Config.hs b/cabal-install/src/Distribution/Client/Config.hs
index d06a3ccf8ad..3787fc89c96 100644
--- a/cabal-install/src/Distribution/Client/Config.hs
+++ b/cabal-install/src/Distribution/Client/Config.hs
@@ -755,12 +755,29 @@ addInfoForKnownRepos other = other
 --
 defaultHackageRemoteRepoKeys :: [String]
 defaultHackageRemoteRepoKeys =
-    [ "fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0",
-      "1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42",
-      "2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3",
-      "0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d",
-      "51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921"
-    ]
+  -- Key owners and public keys are provided as a convenience to readers.
+  -- The canonical source for this mapping data is the hackage-root-keys
+  -- repository and Hackage's root.json file.
+  --
+  -- Links:
+  --  * https://github.com/haskell-infra/hackage-root-keys
+  --  * https://hackage.haskell.org/root.json
+  -- Please consult root.json on Hackage to map key IDs to public keys,
+  -- and the hackage-root-keys repository to map public keys to their
+  -- owners.
+  [ -- Adam Gundry (uRPdSiL3/MNsk50z6NB55ABo0OrrNDXigtCul4vtzmw=)
+    "fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0"
+  , -- Gershom Bazerman (bYoUXXQ9TtX10UriaMiQtTccuXPGnmldP68djzZ7cLo=)
+    "1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42"
+  , -- John Wiegley (zazm5w480r+zPO6Z0+8fjGuxZtb9pAuoVmQ+VkuCvgU=)
+    "0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d"
+  , -- Norman Ramsey (ZI8di3a9Un0s2RBrt5GwVRvfOXVuywADfXGPZfkiDb0=)
+    "51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921"
+  , -- Mathieu Boespflug (ydN1nGGQ79K1Q0nN+ul+Ln8MxikTB95w0YdGd3v3kmg=)
+    "be75553f3c7ba1dbe298da81f1d1b05c9d39dd8ed2616c9bddf1525ca8c03e48"
+  , -- Joachim Breitner (5iUgwqZCWrCJktqMx0bBMIuoIyT4A1RYGozzchRN9rA=)
+    "d26e46f3b631aae1433b89379a6c68bd417eb5d1c408f0643dcc07757fece522"
+  ]
 
 -- | The required threshold of root key signatures for hackage.haskell.org
 --
diff --git a/changelog.d/pr-9068 b/changelog.d/pr-9068
new file mode 100644
index 00000000000..cd590c76e85
--- /dev/null
+++ b/changelog.d/pr-9068
@@ -0,0 +1,12 @@
+synopsis: Add new Hackage root keys to bootstrap set
+packages: cabal-install
+prs: #9068
+
+description: {
+
+The two new [Hackage root keyholders](https://github.com/haskell-infra/hackage-root-keys/tree/master/root-keys) were added to the bootstrap set.
+
+- Added Hackage root key for Joachim Breitner
+- Added Hackage root key for Mathieu Boespflug
+
+}

From f247c0bf1da0773ce9179c6259c05a829b5e8558 Mon Sep 17 00:00:00 2001
From: Kleidukos <29253044+Kleidukos@users.noreply.github.com>
Date: Wed, 12 Jul 2023 22:00:00 +0000
Subject: [PATCH 065/144] Don't add `extra-prog-path` to
 `~/.config/cabal/config` (#8951) (backport #8952) (#9050) Don't add
 `extra-prog-path` to `~/.config/cabal/config` (#8951)

(when initially creating it)

(cherry picked from commit ea55955edadcfab7a00c825db0dc5d9d17dbb69e)

# Conflicts:
#	cabal-install/src/Distribution/Client/Config.hs

* fix conflict

* Merge branch '3.10' into mergify/bp/3.10/pr-8952
---
 .../src/Distribution/Client/Config.hs         | 50 ++++++++-----------
 cabal-install/tests/IntegrationTests2.hs      |  2 +-
 .../IntegrationTests2/config/default-config   |  2 +-
 changelog.d/issue-8951                        |  3 ++
 4 files changed, 25 insertions(+), 32 deletions(-)
 create mode 100644 changelog.d/issue-8951

diff --git a/cabal-install/src/Distribution/Client/Config.hs b/cabal-install/src/Distribution/Client/Config.hs
index d06a3ccf8ad..a0f65ec4d52 100644
--- a/cabal-install/src/Distribution/Client/Config.hs
+++ b/cabal-install/src/Distribution/Client/Config.hs
@@ -568,27 +568,27 @@ baseSavedConfig = do
 --
 initialSavedConfig :: IO SavedConfig
 initialSavedConfig = do
-  cacheDir    <- defaultCacheDir
-  logsDir     <- defaultLogsDir
-  extraPath   <- defaultExtraPath
+  cacheDir <- defaultCacheDir
+  logsDir <- defaultLogsDir
   installPath <- defaultInstallPath
-  return mempty {
-    savedGlobalFlags     = mempty {
-      globalCacheDir     = toFlag cacheDir,
-      globalRemoteRepos  = toNubList [defaultRemoteRepo]
-    },
-    savedConfigureFlags  = mempty {
-      configProgramPathExtra = toNubList extraPath
-    },
-    savedInstallFlags    = mempty {
-      installSummaryFile = toNubList [toPathTemplate (logsDir </> "build.log")],
-      installBuildReports= toFlag NoReports,
-      installNumJobs     = toFlag Nothing
-    },
-    savedClientInstallFlags = mempty {
-      cinstInstalldir = toFlag installPath
-    }
-  }
+  return
+    mempty
+      { savedGlobalFlags =
+          mempty
+            { globalCacheDir = toFlag cacheDir
+            , globalRemoteRepos = toNubList [defaultRemoteRepo]
+            }
+      , savedInstallFlags =
+          mempty
+            { installSummaryFile = toNubList [toPathTemplate (logsDir </> "build.log")]
+            , installBuildReports = toFlag NoReports
+            , installNumJobs = toFlag Nothing
+            }
+      , savedClientInstallFlags =
+          mempty
+            { cinstInstalldir = toFlag installPath
+            }
+      }
 
 -- | Issue a warning if both @$XDG_CONFIG_HOME/cabal/config@ and
 -- @~/.cabal@ exists.
@@ -674,16 +674,6 @@ defaultReportsDir :: IO FilePath
 defaultReportsDir =
   getDefaultDir XdgCache "reports"
 
-defaultExtraPath :: IO [FilePath]
-defaultExtraPath = do
-  mDir <- maybeGetCabalDir
-  case mDir of
-    Just dir ->
-      return [dir </> "bin"]
-    Nothing -> do
-      dir <- getHomeDirectory
-      return [dir </> ".local" </> "bin"]
-
 defaultInstallPath :: IO FilePath
 defaultInstallPath = do
   mDir <- maybeGetCabalDir
diff --git a/cabal-install/tests/IntegrationTests2.hs b/cabal-install/tests/IntegrationTests2.hs
index f2fdf2ea3df..3e3907035e1 100644
--- a/cabal-install/tests/IntegrationTests2.hs
+++ b/cabal-install/tests/IntegrationTests2.hs
@@ -2031,7 +2031,7 @@ testConfigOptionComments = do
   "-- extra-lib-dirs" @=? findLineWith True "extra-lib-dirs" defaultConfigFile
   "-- extra-lib-dirs-static" @=? findLineWith True "extra-lib-dirs-static" defaultConfigFile
   "-- extra-framework-dirs" @=? findLineWith True "extra-framework-dirs" defaultConfigFile
-  "extra-prog-path"  @=? findLineWith False "extra-prog-path" defaultConfigFile
+  "-- extra-prog-path"  @=? findLineWith False "extra-prog-path" defaultConfigFile
   "-- instantiate-with" @=? findLineWith True "instantiate-with" defaultConfigFile
   "-- tests" @=? findLineWith True "tests" defaultConfigFile
   "-- coverage" @=? findLineWith True "coverage" defaultConfigFile
diff --git a/cabal-install/tests/IntegrationTests2/config/default-config b/cabal-install/tests/IntegrationTests2/config/default-config
index 8e3aa02742c..fab39496295 100644
--- a/cabal-install/tests/IntegrationTests2/config/default-config
+++ b/cabal-install/tests/IntegrationTests2/config/default-config
@@ -63,7 +63,7 @@ remote-repo-cache: /home/colton/.cabal/packages
 -- extra-lib-dirs:
 -- extra-lib-dirs-static:
 -- extra-framework-dirs:
-extra-prog-path: /home/colton/.cabal/bin
+-- extra-prog-path:
 -- instantiate-with:
 -- tests: False
 -- coverage: False
diff --git a/changelog.d/issue-8951 b/changelog.d/issue-8951
new file mode 100644
index 00000000000..38bc8c7503b
--- /dev/null
+++ b/changelog.d/issue-8951
@@ -0,0 +1,3 @@
+synopsis: Don't add `extra-prog-path: ~/.local/bin` when initially creating `~/.config/cabal/config`
+packages: cabal-install
+issues: #8951

From 2c16e6589de28a761663842efd7a0a3ba493bb2f Mon Sep 17 00:00:00 2001
From: ulysses4ever <6832600+ulysses4ever@users.noreply.github.com>
Date: Fri, 14 Jul 2023 14:48:44 +0000
Subject: [PATCH 066/144] Remove v2-prefix from Quickstart guide (backport
 #9087) (#9124) Remove v2-prefix from Quickstart guide

Closes https://github.com/haskell/cabal/issues/9086

(cherry picked from commit b3953e3b11e63e7f02bfd5d8133c1c6a1d8db1f1)

* Clarify what build is

Co-authored-by: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
(cherry picked from commit 1f5c00d50130e43fa0a7c647ab23f11b5b236320)
---
 doc/nix-local-build.rst | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/doc/nix-local-build.rst b/doc/nix-local-build.rst
index 70ebd28359d..0391077a908 100644
--- a/doc/nix-local-build.rst
+++ b/doc/nix-local-build.rst
@@ -11,19 +11,19 @@ local builds with this command (configuring is not necessary):
 
 ::
 
-    $ cabal v2-build
+    $ cabal build
 
 To open a GHCi shell with this package, use this command:
 
 ::
 
-    $ cabal v2-repl
+    $ cabal repl
 
 To run an executable defined in this package, use this command:
 
 ::
 
-    $ cabal v2-run <executable name> [executable args]
+    $ cabal run <executable name> [executable args]
 
 Developing multiple packages
 ----------------------------
@@ -51,29 +51,29 @@ directory, run the command: (using cabal-install-2.0 or greater.)
 
 ::
 
-    $ cabal v2-build all
+    $ cabal build all
 
-To build a specific package, you can either run ``v2-build`` from the
+To build a specific package, you can either run ``build`` from the
 directory of the package in question:
 
 ::
 
     $ cd cabal-install
-    $ cabal v2-build
+    $ cabal build
 
 or you can pass the name of the package as an argument to
-``cabal v2-build`` (this works in any subdirectory of the project):
+``cabal build`` (this works in any subdirectory of the project):
 
 ::
 
-    $ cabal v2-build cabal-install
+    $ cabal build cabal-install
 
 You can also specify a specific component of the package to build. For
 example, to build a test suite named ``package-tests``, use the command:
 
 ::
 
-    $ cabal v2-build package-tests
+    $ cabal build package-tests
 
 Targets can be qualified with package names. So to request
 ``package-tests`` *from* the ``Cabal`` package, use
@@ -81,7 +81,7 @@ Targets can be qualified with package names. So to request
 
 Unlike sandboxes, there is no need to setup a sandbox or ``add-source``
 projects; just check in ``cabal.project`` to your repository and
-``v2-build`` will just work.
+``build`` will just work.
 
 Cookbook
 ========
@@ -94,14 +94,14 @@ line::
 
     profiling: True
 
-Now, ``cabal v2-build`` will automatically build all libraries and
+Now, ``cabal build`` will automatically build all libraries and
 executables with profiling.  You can fine-tune the profiling settings
 for each package using :cfg-field:`profiling-detail`::
 
     package p
         profiling-detail: toplevel-functions
 
-Alternately, you can call ``cabal v2-build --enable-profiling`` to
+Alternately, you can call ``cabal build --enable-profiling`` to
 temporarily build with profiling.
 
 How can I have a reproducible set of versions for my dependencies?
@@ -173,13 +173,13 @@ built version.
 The global package store is ``~/.cabal/store`` (configurable via
 global `store-dir` option); if you need to clear your store for
 whatever reason (e.g., to reclaim disk space or because the global
-store is corrupted), deleting this directory is safe (``v2-build``
+store is corrupted), deleting this directory is safe (``build``
 will just rebuild everything it needs on its next invocation).
 
 This split motivates some of the UI choices for Nix-style local build
-commands. For example, flags passed to ``cabal v2-build`` are only
+commands. For example, flags passed to ``cabal build`` are only
 applied to *local* packages, so that adding a flag to
-``cabal v2-build`` doesn't necessitate a rebuild of *every* transitive
+``cabal build`` doesn't necessitate a rebuild of *every* transitive
 dependency in the global package store.
 
 In cabal-install 2.0 and above, Nix-style local builds also take advantage of a
@@ -194,10 +194,10 @@ are not currently built on a per-component basis.
 Where are my build products?
 ----------------------------
 
-A major deficiency in the current implementation of v2-build is that
+A major deficiency in the current implementation of ``cabal build`` is that
 there is no programmatic way to access the location of build products.
 The location of the build products is intended to be an internal
-implementation detail of v2-build, but we also understand that many
+implementation detail of ``cabal build``, but we also understand that many
 unimplemented features can only be reasonably worked around by
 accessing build products directly.
 
@@ -245,7 +245,7 @@ the time it takes to execute a rebuild cycle. While the details of how
 ``cabal-install`` does caching are an implementation detail and may
 change in the future, knowing what gets cached is helpful for
 understanding the performance characteristics of invocations to
-``v2-build``. The cached intermediate results are stored in
+``build``. The cached intermediate results are stored in
 ``dist-newstyle/cache``; this folder can be safely deleted to clear the
 cache.
 
@@ -261,7 +261,7 @@ this folder (the most important two are first):
     already available in the store.)
 ``source-hashes`` (binary)
     The hashes of all local source files. When all local source files of
-    a local package are unchanged, ``cabal v2-build`` will skip
+    a local package are unchanged, ``cabal build`` will skip
     invoking ``setup build`` entirely (saving us from a possibly
     expensive call to ``ghc --make``). The full list of source files
     participating in compilation is determined using

From e08b46559d0c513dd17b61d9b8b0657fc8ccd890 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale <ftweedal@redhat.com>
Date: Mon, 5 Jun 2023 22:19:06 +1000
Subject: [PATCH 067/144] Fix parsing of password-command option (#6268)

The password-command option does not parse its value correctly.
Quotes are ignored, making many kinds of commands impossible to
express (e.g.  `sh -c "foo | bar"`).  Also, `cabal user-config`
treats the argument list as a *list of option values*, rather than a
*value that is a list*.  As a consequence, `cabal user-config
update` corrupts the value in the config file.

Fix these issues by parsing the command as a space separated list of
tokens, and changing the getter to `unwords` the value and return a
*singleton* list.  Also update the argument placeholder from
`PASSWORD` to `COMMAND`.

Fixes: https://github.com/haskell/cabal/issues/6268
(cherry picked from commit 95f48ad71eba4891ccfd6affe72cbf1a6dd3b970)

# Conflicts:
#	cabal-install/src/Distribution/Client/Setup.hs
#	cabal-install/src/Distribution/Deprecated/ParseUtils.hs
---
 .../src/Distribution/Client/Setup.hs          | 82 +++++++++++++++++++
 .../src/Distribution/Deprecated/ParseUtils.hs | 40 +++++++++
 .../PackageTests/UserConfig/cabal.out         |  3 +
 .../PackageTests/UserConfig/cabal.test.hs     |  6 ++
 changelog.d/issue-6268                        | 19 +++++
 doc/cabal-commands.rst                        | 14 +++-
 6 files changed, 163 insertions(+), 1 deletion(-)
 create mode 100644 changelog.d/issue-6268

diff --git a/cabal-install/src/Distribution/Client/Setup.hs b/cabal-install/src/Distribution/Client/Setup.hs
index 3ea80c6df23..af597684eb3 100644
--- a/cabal-install/src/Distribution/Client/Setup.hs
+++ b/cabal-install/src/Distribution/Client/Setup.hs
@@ -72,7 +72,15 @@ import Distribution.Client.IndexUtils.IndexState
 import qualified Distribution.Client.Init.Types as IT
 import qualified Distribution.Client.Init.Defaults as IT
 import Distribution.Client.Targets
+<<<<<<< HEAD
          ( UserConstraint, readUserConstraint )
+=======
+  ( UserConstraint
+  , readUserConstraint
+  )
+import Distribution.Deprecated.ParseUtils (parseSpaceList, parseTokenQ)
+import Distribution.Deprecated.ReadP (readP_to_E)
+>>>>>>> 95f48ad71 (Fix parsing of password-command option (#6268))
 import Distribution.Utils.NubList
          ( NubList, toNubList, fromNubList)
 
@@ -2004,6 +2012,7 @@ defaultUploadFlags = UploadFlags {
   }
 
 uploadCommand :: CommandUI UploadFlags
+<<<<<<< HEAD
 uploadCommand = CommandUI {
     commandName         = "upload",
     commandSynopsis     = "Uploads source packages or documentation to Hackage.",
@@ -2049,6 +2058,79 @@ uploadCommand = CommandUI {
         (reqArg' "PASSWORD" (Flag . words) (fromMaybe [] . flagToMaybe))
       ]
   }
+=======
+uploadCommand =
+  CommandUI
+    { commandName = "upload"
+    , commandSynopsis = "Uploads source packages or documentation to Hackage."
+    , commandDescription = Nothing
+    , commandNotes = Just $ \_ ->
+        "You can store your Hackage login in the ~/.config/cabal/config file\n"
+          ++ relevantConfigValuesText ["username", "password", "password-command"]
+    , commandUsage = \pname ->
+        "Usage: " ++ pname ++ " upload [FLAGS] TARFILES\n"
+    , commandDefaultFlags = defaultUploadFlags
+    , commandOptions = \_ ->
+        [ optionVerbosity
+            uploadVerbosity
+            (\v flags -> flags{uploadVerbosity = v})
+        , option
+            []
+            ["publish"]
+            "Publish the package instead of uploading it as a candidate."
+            uploadCandidate
+            (\v flags -> flags{uploadCandidate = v})
+            (noArg (Flag IsPublished))
+        , option
+            ['d']
+            ["documentation"]
+            ( "Upload documentation instead of a source package. "
+                ++ "By default, this uploads documentation for a package candidate. "
+                ++ "To upload documentation for "
+                ++ "a published package, combine with --publish."
+            )
+            uploadDoc
+            (\v flags -> flags{uploadDoc = v})
+            trueArg
+        , option
+            ['u']
+            ["username"]
+            "Hackage username."
+            uploadUsername
+            (\v flags -> flags{uploadUsername = v})
+            ( reqArg'
+                "USERNAME"
+                (toFlag . Username)
+                (flagToList . fmap unUsername)
+            )
+        , option
+            ['p']
+            ["password"]
+            "Hackage password."
+            uploadPassword
+            (\v flags -> flags{uploadPassword = v})
+            ( reqArg'
+                "PASSWORD"
+                (toFlag . Password)
+                (flagToList . fmap unPassword)
+            )
+        , option
+            ['P']
+            ["password-command"]
+            "Command to get Hackage password."
+            uploadPasswordCmd
+            (\v flags -> flags{uploadPasswordCmd = v})
+            ( reqArg
+                "COMMAND"
+                ( readP_to_E
+                    ("Cannot parse command: " ++)
+                    (Flag <$> parseSpaceList parseTokenQ)
+                )
+                (flagElim [] (pure . unwords . fmap show))
+            )
+        ]
+    }
+>>>>>>> 95f48ad71 (Fix parsing of password-command option (#6268))
 
 instance Monoid UploadFlags where
   mempty = gmempty
diff --git a/cabal-install/src/Distribution/Deprecated/ParseUtils.hs b/cabal-install/src/Distribution/Deprecated/ParseUtils.hs
index 6ac62a6e82d..26bffbd8caa 100644
--- a/cabal-install/src/Distribution/Deprecated/ParseUtils.hs
+++ b/cabal-install/src/Distribution/Deprecated/ParseUtils.hs
@@ -16,6 +16,7 @@
 -- couple others. It has the parsing framework code and also little parsers for
 -- many of the formats we get in various @.cabal@ file fields, like module
 -- names, comma separated lists etc.
+<<<<<<< HEAD
 
 -- This module is meant to be local-only to Distribution...
 
@@ -40,6 +41,45 @@ module Distribution.Deprecated.ParseUtils (
         commaNewLineListFieldParsec,
 
         UnrecFieldParser,
+=======
+module Distribution.Deprecated.ParseUtils
+  ( LineNo
+  , PError (..)
+  , PWarning (..)
+  , locatedErrorMsg
+  , syntaxError
+  , warning
+  , runP
+  , runE
+  , ParseResult (..)
+  , parseFail
+  , showPWarning
+  , Field (..)
+  , lineNo
+  , FieldDescr (..)
+  , readFields
+  , parseHaskellString
+  , parseTokenQ
+  , parseSpaceList
+  , parseOptCommaList
+  , showFilePath
+  , showToken
+  , showFreeText
+  , field
+  , simpleField
+  , listField
+  , listFieldWithSep
+  , spaceListField
+  , newLineListField
+  , liftField
+  , readPToMaybe
+  , fieldParsec
+  , simpleFieldParsec
+  , listFieldParsec
+  , commaListFieldParsec
+  , commaNewLineListFieldParsec
+  , UnrecFieldParser
+>>>>>>> 95f48ad71 (Fix parsing of password-command option (#6268))
   ) where
 
 import Distribution.Client.Compat.Prelude hiding (get)
diff --git a/cabal-testsuite/PackageTests/UserConfig/cabal.out b/cabal-testsuite/PackageTests/UserConfig/cabal.out
index b5e1f5ef9f8..2c6e1a3cd14 100644
--- a/cabal-testsuite/PackageTests/UserConfig/cabal.out
+++ b/cabal-testsuite/PackageTests/UserConfig/cabal.out
@@ -12,3 +12,6 @@ Writing merged config to <ROOT>/cabal.dist/cabal-config.
 # cabal user-config
 Renaming <ROOT>/cabal.dist/cabal-config to <ROOT>/cabal.dist/cabal-config.backup.
 Writing merged config to <ROOT>/cabal.dist/cabal-config.
+# cabal user-config
+Renaming <ROOT>/cabal.dist/cabal-config to <ROOT>/cabal.dist/cabal-config.backup.
+Writing merged config to <ROOT>/cabal.dist/cabal-config.
diff --git a/cabal-testsuite/PackageTests/UserConfig/cabal.test.hs b/cabal-testsuite/PackageTests/UserConfig/cabal.test.hs
index 85d67212d4c..300bcc59ea5 100644
--- a/cabal-testsuite/PackageTests/UserConfig/cabal.test.hs
+++ b/cabal-testsuite/PackageTests/UserConfig/cabal.test.hs
@@ -15,3 +15,9 @@ main = cabalTest $ do
     assertFileDoesContain conf "foo,bar"
     cabalG ["--config-file", conf] "user-config" ["update", "-f", "-a", "extra-prog-path: foo, bar"]
     assertFileDoesContain conf "foo,bar"
+
+    -- regression test for #6268 (password-command parsing)
+    cabalG ["--config-file", conf]
+        "user-config" ["update", "-f", "-a", "password-command: sh -c \"echo secret\""]
+    -- non-quoted tokens do get quoted when writing, but this is expected
+    assertFileDoesContain conf "password-command: \"sh\" \"-c\" \"echo secret\""
diff --git a/changelog.d/issue-6268 b/changelog.d/issue-6268
new file mode 100644
index 00000000000..cc78eecf884
--- /dev/null
+++ b/changelog.d/issue-6268
@@ -0,0 +1,19 @@
+synopsis: Fix parsing of password-command option
+packages: cabal-install
+prs: #9002
+issuesa: #6268
+
+description: {
+
+The password-command option did not parse its value correctly.
+Quotes were ignored, making many kinds of commands impossible to
+express (e.g.  `sh -c "foo | bar"`).  Also, `cabal user-config`
+treated the argument list as a *list of option values*, rather than a
+*value that is a list*.  As a consequence, `cabal user-config
+update` corrupted the value in the config file.
+
+Fixed these issues by parsing the command as a space separated list
+of tokens (which may be enclosed in double quotes), and treating the
+parsed list-of-token as one value (not multiple).
+
+}
diff --git a/doc/cabal-commands.rst b/doc/cabal-commands.rst
index b10d28787b5..1b52f51f204 100644
--- a/doc/cabal-commands.rst
+++ b/doc/cabal-commands.rst
@@ -1066,7 +1066,19 @@ to Hackage.
 
 .. option:: -P, --password-command
 
-    Command to get your Hackage password.
+    Command to get your Hackage password.  Arguments with whitespace
+    must be quoted (double-quotes only).  For example:
+
+    ::
+
+        --password-command 'sh -c "grep hackage ~/secrets | cut -d : -f 2"'
+
+    Or in the config file:
+
+    ::
+
+        password-command: sh -c "grep hackage ~/secrets | cut -d : -f 2"
+
 
 cabal report
 ^^^^^^^^^^^^

From 9939338c05cbd3cb7869ba7aceaac5f94e129801 Mon Sep 17 00:00:00 2001
From: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Date: Fri, 14 Jul 2023 14:01:17 -0400
Subject: [PATCH 068/144] fix conflicts

---
 .../src/Distribution/Client/Setup.hs          | 52 -------------------
 .../src/Distribution/Deprecated/ParseUtils.hs | 22 --------
 2 files changed, 74 deletions(-)

diff --git a/cabal-install/src/Distribution/Client/Setup.hs b/cabal-install/src/Distribution/Client/Setup.hs
index af597684eb3..385f0a0a672 100644
--- a/cabal-install/src/Distribution/Client/Setup.hs
+++ b/cabal-install/src/Distribution/Client/Setup.hs
@@ -72,15 +72,11 @@ import Distribution.Client.IndexUtils.IndexState
 import qualified Distribution.Client.Init.Types as IT
 import qualified Distribution.Client.Init.Defaults as IT
 import Distribution.Client.Targets
-<<<<<<< HEAD
-         ( UserConstraint, readUserConstraint )
-=======
   ( UserConstraint
   , readUserConstraint
   )
 import Distribution.Deprecated.ParseUtils (parseSpaceList, parseTokenQ)
 import Distribution.Deprecated.ReadP (readP_to_E)
->>>>>>> 95f48ad71 (Fix parsing of password-command option (#6268))
 import Distribution.Utils.NubList
          ( NubList, toNubList, fromNubList)
 
@@ -2012,53 +2008,6 @@ defaultUploadFlags = UploadFlags {
   }
 
 uploadCommand :: CommandUI UploadFlags
-<<<<<<< HEAD
-uploadCommand = CommandUI {
-    commandName         = "upload",
-    commandSynopsis     = "Uploads source packages or documentation to Hackage.",
-    commandDescription  = Nothing,
-    commandNotes        = Just $ \_ ->
-         "You can store your Hackage login in the ~/.config/cabal/config file\n"
-      ++ relevantConfigValuesText ["username", "password", "password-command"],
-    commandUsage        = \pname ->
-         "Usage: " ++ pname ++ " upload [FLAGS] TARFILES\n",
-    commandDefaultFlags = defaultUploadFlags,
-    commandOptions      = \_ ->
-      [optionVerbosity uploadVerbosity
-       (\v flags -> flags { uploadVerbosity = v })
-
-      ,option [] ["publish"]
-        "Publish the package instead of uploading it as a candidate."
-        uploadCandidate (\v flags -> flags { uploadCandidate = v })
-        (noArg (Flag IsPublished))
-
-      ,option ['d'] ["documentation"]
-        ("Upload documentation instead of a source package. "
-        ++ "By default, this uploads documentation for a package candidate. "
-        ++ "To upload documentation for "
-        ++ "a published package, combine with --publish.")
-        uploadDoc (\v flags -> flags { uploadDoc = v })
-        trueArg
-
-      ,option ['u'] ["username"]
-        "Hackage username."
-        uploadUsername (\v flags -> flags { uploadUsername = v })
-        (reqArg' "USERNAME" (toFlag . Username)
-                            (flagToList . fmap unUsername))
-
-      ,option ['p'] ["password"]
-        "Hackage password."
-        uploadPassword (\v flags -> flags { uploadPassword = v })
-        (reqArg' "PASSWORD" (toFlag . Password)
-                            (flagToList . fmap unPassword))
-
-      ,option ['P'] ["password-command"]
-        "Command to get Hackage password."
-        uploadPasswordCmd (\v flags -> flags { uploadPasswordCmd = v })
-        (reqArg' "PASSWORD" (Flag . words) (fromMaybe [] . flagToMaybe))
-      ]
-  }
-=======
 uploadCommand =
   CommandUI
     { commandName = "upload"
@@ -2130,7 +2079,6 @@ uploadCommand =
             )
         ]
     }
->>>>>>> 95f48ad71 (Fix parsing of password-command option (#6268))
 
 instance Monoid UploadFlags where
   mempty = gmempty
diff --git a/cabal-install/src/Distribution/Deprecated/ParseUtils.hs b/cabal-install/src/Distribution/Deprecated/ParseUtils.hs
index 26bffbd8caa..a4b6fbec836 100644
--- a/cabal-install/src/Distribution/Deprecated/ParseUtils.hs
+++ b/cabal-install/src/Distribution/Deprecated/ParseUtils.hs
@@ -16,32 +16,11 @@
 -- couple others. It has the parsing framework code and also little parsers for
 -- many of the formats we get in various @.cabal@ file fields, like module
 -- names, comma separated lists etc.
-<<<<<<< HEAD
 
 -- This module is meant to be local-only to Distribution...
 
 {-# OPTIONS_HADDOCK hide #-}
 {-# LANGUAGE Rank2Types #-}
-module Distribution.Deprecated.ParseUtils (
-        LineNo, PError(..), PWarning(..), locatedErrorMsg, syntaxError, warning,
-        runP, runE, ParseResult(..), parseFail, showPWarning,
-        Field(..), lineNo,
-        FieldDescr(..), readFields,
-        parseHaskellString, parseTokenQ,
-        parseOptCommaList,
-        showFilePath, showToken, showFreeText,
-        field, simpleField, listField, listFieldWithSep, spaceListField,
-        newLineListField,
-        liftField,
-        readPToMaybe,
-
-        fieldParsec, simpleFieldParsec,
-        listFieldParsec,
-        commaListFieldParsec,
-        commaNewLineListFieldParsec,
-
-        UnrecFieldParser,
-=======
 module Distribution.Deprecated.ParseUtils
   ( LineNo
   , PError (..)
@@ -79,7 +58,6 @@ module Distribution.Deprecated.ParseUtils
   , commaListFieldParsec
   , commaNewLineListFieldParsec
   , UnrecFieldParser
->>>>>>> 95f48ad71 (Fix parsing of password-command option (#6268))
   ) where
 
 import Distribution.Client.Compat.Prelude hiding (get)

From 8078074921546c2cfaa8612419933670c8141040 Mon Sep 17 00:00:00 2001
From: Kleidukos <29253044+Kleidukos@users.noreply.github.com>
Date: Thu, 20 Jul 2023 16:12:35 +0000
Subject: [PATCH 069/144] cabal-install: Fix non-reinstallable package set
 (backport #9092) (#9141) cabal-install: Fix non-reinstallable package set

In #9064 we discovered that `ghc-boot` was added to the
non-reinstallable package set due to #8051 despite there being no
reason why it can't be built from its source distribution. This
revealed the fact that there is quite some ambiguity around what
constitutes a non-reinstallable package.

In #9064 we worked out a hopefully-more-clear picture of
non-reinstallability. Here we update the commentary to describe this
concept and update the lists to reflect the new definition.

Closes #9064.

(cherry picked from commit 2e32a44f217eb7b0e9e906f45f7aa084228319e5)

# Conflicts:
#	cabal-install/src/Distribution/Client/Dependency.hs

* Fix tests

(cherry picked from commit 249374d16b328736a01a4c7e84fa42fbad7422e7)

# Conflicts:
#	cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs

* Fix conflicts
---
 .../src/Distribution/Client/Dependency.hs     |  39 +-
 .../Distribution/Solver/Modular/Solver.hs     | 873 +++++++++++++++++-
 2 files changed, 866 insertions(+), 46 deletions(-)

diff --git a/cabal-install/src/Distribution/Client/Dependency.hs b/cabal-install/src/Distribution/Client/Dependency.hs
index c5cbba8d48e..09ea4548222 100644
--- a/cabal-install/src/Distribution/Client/Dependency.hs
+++ b/cabal-install/src/Distribution/Client/Dependency.hs
@@ -413,8 +413,43 @@ dontUpgradeNonUpgradeablePackages params =
                 . InstalledPackageIndex.lookupPackageName
                                  (depResolverInstalledPkgIndex params)
 
-addSourcePackages :: [UnresolvedSourcePackage]
-                  -> DepResolverParams -> DepResolverParams
+-- | The set of non-reinstallable packages includes those which cannot be
+-- rebuilt using a GHC installation and Hackage-published source distribution.
+-- There are a few reasons why this might be true:
+--
+--  * the package overrides its unit ID (e.g. with ghc's @-this-unit-id@ flag),
+--    which can result in multiple indistinguishable packages (having potentially
+--    different ABIs) with the same unit ID.
+--
+--  * the package contains definitions of wired-in declarations which tie
+--    it to a particular compiler (e.g. we can't build link against
+--    @base-4.18.0.0@ using GHC 9.6.1).
+--
+--  * the package does not have a complete (that is, buildable) source distribution.
+--    For instance, some packages provided by GHC rely on files outside of the
+--    source tree generated by GHC's build system.
+--
+-- Note: the list of non-upgradable/non-installable packages used to be
+-- respectively in this module and in `Distribution.Solver.Modular.Solver`.
+-- Since they were kept synced, they are now combined in the following list.
+--
+-- See: https://github.com/haskell/cabal/issues/8581 and
+-- https://github.com/haskell/cabal/issues/9064.
+nonUpgradeablePackages :: [PackageName]
+nonUpgradeablePackages =
+  [ mkPackageName "base"
+  , mkPackageName "ghc-bignum"
+  , mkPackageName "ghc-prim"
+  , mkPackageName "ghc"
+  , mkPackageName "integer-gmp"
+  , mkPackageName "integer-simple"
+  , mkPackageName "template-haskell"
+  ]
+
+addSourcePackages
+  :: [UnresolvedSourcePackage]
+  -> DepResolverParams
+  -> DepResolverParams
 addSourcePackages pkgs params =
     params {
       depResolverSourcePkgIndex =
diff --git a/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs b/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
index 1101e05aff9..599c76f7114 100644
--- a/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
+++ b/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
@@ -26,42 +26,833 @@ import UnitTests.Distribution.Solver.Modular.DSL
 import UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
 
 tests :: [TF.TestTree]
-tests = [
-      testGroup "Simple dependencies" [
-          runTest $         mkTest db1 "alreadyInstalled"   ["A"]      (solverSuccess [])
-        , runTest $         mkTest db1 "installLatest"      ["B"]      (solverSuccess [("B", 2)])
-        , runTest $ preferOldest
-                  $         mkTest db1 "installOldest"      ["B"]      (solverSuccess [("B", 1)])
-        , runTest $         mkTest db1 "simpleDep1"         ["C"]      (solverSuccess [("B", 1), ("C", 1)])
-        , runTest $         mkTest db1 "simpleDep2"         ["D"]      (solverSuccess [("B", 2), ("D", 1)])
-        , runTest $         mkTest db1 "failTwoVersions"    ["C", "D"] anySolverFailure
-        , runTest $ indep $ mkTest db1 "indepTwoVersions"   ["C", "D"] (solverSuccess [("B", 1), ("B", 2), ("C", 1), ("D", 1)])
-        , runTest $ indep $ mkTest db1 "aliasWhenPossible1" ["C", "E"] (solverSuccess [("B", 1), ("C", 1), ("E", 1)])
-        , runTest $ indep $ mkTest db1 "aliasWhenPossible2" ["D", "E"] (solverSuccess [("B", 2), ("D", 1), ("E", 1)])
-        , runTest $ indep $ mkTest db2 "aliasWhenPossible3" ["C", "D"] (solverSuccess [("A", 1), ("A", 2), ("B", 1), ("B", 2), ("C", 1), ("D", 1)])
-        , runTest $         mkTest db1 "buildDepAgainstOld" ["F"]      (solverSuccess [("B", 1), ("E", 1), ("F", 1)])
-        , runTest $         mkTest db1 "buildDepAgainstNew" ["G"]      (solverSuccess [("B", 2), ("E", 1), ("G", 1)])
-        , runTest $ indep $ mkTest db1 "multipleInstances"  ["F", "G"] anySolverFailure
-        , runTest $         mkTest db21 "unknownPackage1"   ["A"]      (solverSuccess [("A", 1), ("B", 1)])
-        , runTest $         mkTest db22 "unknownPackage2"   ["A"]      (solverFailure (isInfixOf "unknown package: C"))
-        , runTest $         mkTest db23 "unknownPackage3"   ["A"]      (solverFailure (isInfixOf "unknown package: B"))
-        , runTest $         mkTest []   "unknown target"    ["A"]      (solverFailure (isInfixOf "unknown package: A"))
-        ]
-    , testGroup "Flagged dependencies" [
-          runTest $         mkTest db3 "forceFlagOn"  ["C"]      (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
-        , runTest $         mkTest db3 "forceFlagOff" ["D"]      (solverSuccess [("A", 2), ("B", 1), ("D", 1)])
-        , runTest $ indep $ mkTest db3 "linkFlags1"   ["C", "D"] anySolverFailure
-        , runTest $ indep $ mkTest db4 "linkFlags2"   ["C", "D"] anySolverFailure
-        , runTest $ indep $ mkTest db18 "linkFlags3"  ["A", "B"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("D", 1), ("D", 2), ("F", 1)])
-        ]
-    , testGroup "Lifting dependencies out of conditionals" [
-          runTest $ commonDependencyLogMessage "common dependency log message"
-        , runTest $ twoLevelDeepCommonDependencyLogMessage "two level deep common dependency log message"
-        , runTest $ testBackjumpingWithCommonDependency "backjumping with common dependency"
-        ]
-    , testGroup "Manual flags" [
-          runTest $ mkTest dbManualFlags "Use default value for manual flag" ["pkg"] $
-          solverSuccess [("pkg", 1), ("true-dep", 1)]
+tests =
+  [ testGroup
+      "Simple dependencies"
+      [ runTest $ mkTest db1 "alreadyInstalled" ["A"] (solverSuccess [])
+      , runTest $ mkTest db1 "installLatest" ["B"] (solverSuccess [("B", 2)])
+      , runTest $
+          preferOldest $
+            mkTest db1 "installOldest" ["B"] (solverSuccess [("B", 1)])
+      , runTest $ mkTest db1 "simpleDep1" ["C"] (solverSuccess [("B", 1), ("C", 1)])
+      , runTest $ mkTest db1 "simpleDep2" ["D"] (solverSuccess [("B", 2), ("D", 1)])
+      , runTest $ mkTest db1 "failTwoVersions" ["C", "D"] anySolverFailure
+      , runTest $ indep $ mkTest db1 "indepTwoVersions" ["C", "D"] (solverSuccess [("B", 1), ("B", 2), ("C", 1), ("D", 1)])
+      , runTest $ indep $ mkTest db1 "aliasWhenPossible1" ["C", "E"] (solverSuccess [("B", 1), ("C", 1), ("E", 1)])
+      , runTest $ indep $ mkTest db1 "aliasWhenPossible2" ["D", "E"] (solverSuccess [("B", 2), ("D", 1), ("E", 1)])
+      , runTest $ indep $ mkTest db2 "aliasWhenPossible3" ["C", "D"] (solverSuccess [("A", 1), ("A", 2), ("B", 1), ("B", 2), ("C", 1), ("D", 1)])
+      , runTest $ mkTest db1 "buildDepAgainstOld" ["F"] (solverSuccess [("B", 1), ("E", 1), ("F", 1)])
+      , runTest $ mkTest db1 "buildDepAgainstNew" ["G"] (solverSuccess [("B", 2), ("E", 1), ("G", 1)])
+      , runTest $ indep $ mkTest db1 "multipleInstances" ["F", "G"] anySolverFailure
+      , runTest $ mkTest db21 "unknownPackage1" ["A"] (solverSuccess [("A", 1), ("B", 1)])
+      , runTest $ mkTest db22 "unknownPackage2" ["A"] (solverFailure (isInfixOf "unknown package: C"))
+      , runTest $ mkTest db23 "unknownPackage3" ["A"] (solverFailure (isInfixOf "unknown package: B"))
+      , runTest $ mkTest [] "unknown target" ["A"] (solverFailure (isInfixOf "unknown package: A"))
+      ]
+  , testGroup
+      "Flagged dependencies"
+      [ runTest $ mkTest db3 "forceFlagOn" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
+      , runTest $ mkTest db3 "forceFlagOff" ["D"] (solverSuccess [("A", 2), ("B", 1), ("D", 1)])
+      , runTest $ indep $ mkTest db3 "linkFlags1" ["C", "D"] anySolverFailure
+      , runTest $ indep $ mkTest db4 "linkFlags2" ["C", "D"] anySolverFailure
+      , runTest $ indep $ mkTest db18 "linkFlags3" ["A", "B"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("D", 1), ("D", 2), ("F", 1)])
+      ]
+  , testGroup
+      "Lifting dependencies out of conditionals"
+      [ runTest $ commonDependencyLogMessage "common dependency log message"
+      , runTest $ twoLevelDeepCommonDependencyLogMessage "two level deep common dependency log message"
+      , runTest $ testBackjumpingWithCommonDependency "backjumping with common dependency"
+      ]
+  , testGroup
+      "Manual flags"
+      [ runTest $
+          mkTest dbManualFlags "Use default value for manual flag" ["pkg"] $
+            solverSuccess [("pkg", 1), ("true-dep", 1)]
+      , let checkFullLog =
+              any $ isInfixOf "rejecting: pkg:-flag (manual flag can only be changed explicitly)"
+         in runTest $
+              setVerbose $
+                constraints [ExVersionConstraint (ScopeAnyQualifier "true-dep") V.noVersion] $
+                  mkTest dbManualFlags "Don't toggle manual flag to avoid conflict" ["pkg"] $
+                    -- TODO: We should check the summarized log instead of the full log
+                    -- for the manual flags error message, but it currently only
+                    -- appears in the full log.
+                    SolverResult checkFullLog (Left $ const True)
+      , let cs = [ExFlagConstraint (ScopeAnyQualifier "pkg") "flag" False]
+         in runTest $
+              constraints cs $
+                mkTest dbManualFlags "Toggle manual flag with flag constraint" ["pkg"] $
+                  solverSuccess [("false-dep", 1), ("pkg", 1)]
+      ]
+  , testGroup
+      "Qualified manual flag constraints"
+      [ let name = "Top-level flag constraint does not constrain setup dep's flag"
+            cs = [ExFlagConstraint (ScopeQualified P.QualToplevel "B") "flag" False]
+         in runTest $
+              constraints cs $
+                mkTest dbSetupDepWithManualFlag name ["A"] $
+                  solverSuccess
+                    [ ("A", 1)
+                    , ("B", 1)
+                    , ("B", 2)
+                    , ("b-1-false-dep", 1)
+                    , ("b-2-true-dep", 1)
+                    ]
+      , let name = "Solver can toggle setup dep's flag to match top-level constraint"
+            cs =
+              [ ExFlagConstraint (ScopeQualified P.QualToplevel "B") "flag" False
+              , ExVersionConstraint (ScopeAnyQualifier "b-2-true-dep") V.noVersion
+              ]
+         in runTest $
+              constraints cs $
+                mkTest dbSetupDepWithManualFlag name ["A"] $
+                  solverSuccess
+                    [ ("A", 1)
+                    , ("B", 1)
+                    , ("B", 2)
+                    , ("b-1-false-dep", 1)
+                    , ("b-2-false-dep", 1)
+                    ]
+      , let name = "User can constrain flags separately with qualified constraints"
+            cs =
+              [ ExFlagConstraint (ScopeQualified P.QualToplevel "B") "flag" True
+              , ExFlagConstraint (ScopeQualified (P.QualSetup "A") "B") "flag" False
+              ]
+         in runTest $
+              constraints cs $
+                mkTest dbSetupDepWithManualFlag name ["A"] $
+                  solverSuccess
+                    [ ("A", 1)
+                    , ("B", 1)
+                    , ("B", 2)
+                    , ("b-1-true-dep", 1)
+                    , ("b-2-false-dep", 1)
+                    ]
+      , -- Regression test for #4299
+        let name = "Solver can link deps when only one has constrained manual flag"
+            cs = [ExFlagConstraint (ScopeQualified P.QualToplevel "B") "flag" False]
+         in runTest $
+              constraints cs $
+                mkTest dbLinkedSetupDepWithManualFlag name ["A"] $
+                  solverSuccess [("A", 1), ("B", 1), ("b-1-false-dep", 1)]
+      , let name = "Solver cannot link deps that have conflicting manual flag constraints"
+            cs =
+              [ ExFlagConstraint (ScopeQualified P.QualToplevel "B") "flag" True
+              , ExFlagConstraint (ScopeQualified (P.QualSetup "A") "B") "flag" False
+              ]
+            failureReason = "(constraint from unknown source requires opposite flag selection)"
+            checkFullLog lns =
+              all
+                (\msg -> any (msg `isInfixOf`) lns)
+                [ "rejecting: B:-flag " ++ failureReason
+                , "rejecting: A:setup.B:+flag " ++ failureReason
+                ]
+         in runTest $
+              constraints cs $
+                setVerbose $
+                  mkTest dbLinkedSetupDepWithManualFlag name ["A"] $
+                    SolverResult checkFullLog (Left $ const True)
+      ]
+  , testGroup
+      "Stanzas"
+      [ runTest $ enableAllTests $ mkTest db5 "simpleTest1" ["C"] (solverSuccess [("A", 2), ("C", 1)])
+      , runTest $ enableAllTests $ mkTest db5 "simpleTest2" ["D"] anySolverFailure
+      , runTest $ enableAllTests $ mkTest db5 "simpleTest3" ["E"] (solverSuccess [("A", 1), ("E", 1)])
+      , runTest $ enableAllTests $ mkTest db5 "simpleTest4" ["F"] anySolverFailure -- TODO
+      , runTest $ enableAllTests $ mkTest db5 "simpleTest5" ["G"] (solverSuccess [("A", 2), ("G", 1)])
+      , runTest $ enableAllTests $ mkTest db5 "simpleTest6" ["E", "G"] anySolverFailure
+      , runTest $ indep $ enableAllTests $ mkTest db5 "simpleTest7" ["E", "G"] (solverSuccess [("A", 1), ("A", 2), ("E", 1), ("G", 1)])
+      , runTest $ enableAllTests $ mkTest db6 "depsWithTests1" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
+      , runTest $ indep $ enableAllTests $ mkTest db6 "depsWithTests2" ["C", "D"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("D", 1)])
+      , runTest $ testTestSuiteWithFlag "test suite with flag"
+      ]
+  , testGroup
+      "Setup dependencies"
+      [ runTest $ mkTest db7 "setupDeps1" ["B"] (solverSuccess [("A", 2), ("B", 1)])
+      , runTest $ mkTest db7 "setupDeps2" ["C"] (solverSuccess [("A", 2), ("C", 1)])
+      , runTest $ mkTest db7 "setupDeps3" ["D"] (solverSuccess [("A", 1), ("D", 1)])
+      , runTest $ mkTest db7 "setupDeps4" ["E"] (solverSuccess [("A", 1), ("A", 2), ("E", 1)])
+      , runTest $ mkTest db7 "setupDeps5" ["F"] (solverSuccess [("A", 1), ("A", 2), ("F", 1)])
+      , runTest $ mkTest db8 "setupDeps6" ["C", "D"] (solverSuccess [("A", 1), ("B", 1), ("B", 2), ("C", 1), ("D", 1)])
+      , runTest $ mkTest db9 "setupDeps7" ["F", "G"] (solverSuccess [("A", 1), ("B", 1), ("B", 2), ("C", 1), ("D", 1), ("E", 1), ("E", 2), ("F", 1), ("G", 1)])
+      , runTest $ mkTest db10 "setupDeps8" ["C"] (solverSuccess [("C", 1)])
+      , runTest $ indep $ mkTest dbSetupDeps "setupDeps9" ["A", "B"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("D", 1), ("D", 2)])
+      ]
+  , testGroup
+      "Base shim"
+      [ runTest $ mkTest db11 "baseShim1" ["A"] (solverSuccess [("A", 1)])
+      , runTest $ mkTest db12 "baseShim2" ["A"] (solverSuccess [("A", 1)])
+      , runTest $ mkTest db12 "baseShim3" ["B"] (solverSuccess [("B", 1)])
+      , runTest $ mkTest db12 "baseShim4" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
+      , runTest $ mkTest db12 "baseShim5" ["D"] anySolverFailure
+      , runTest $ mkTest db12 "baseShim6" ["E"] (solverSuccess [("E", 1), ("syb", 2)])
+      ]
+  , testGroup
+      "Base and Nonupgradable"
+      [ runTest $
+          mkTest dbBase "Refuse to install base without --allow-boot-library-installs" ["base"] $
+            solverFailure (isInfixOf "only already installed instances can be used")
+      , runTest $
+          allowBootLibInstalls $
+            mkTest dbBase "Install base with --allow-boot-library-installs" ["base"] $
+              solverSuccess [("base", 1), ("ghc-prim", 1), ("integer-gmp", 1), ("integer-simple", 1)]
+      , runTest $
+          mkTest dbNonupgrade "Refuse to install newer ghc requested by another library" ["A"] $
+            solverFailure (isInfixOf "rejecting: ghc-2.0.0 (constraint from non-upgradeable package requires installed instance)")
+      ]
+  , testGroup
+      "reject-unconstrained"
+      [ runTest $
+          onlyConstrained $
+            mkTest db12 "missing syb" ["E"] $
+              solverFailure (isInfixOf "not a user-provided goal")
+      , runTest $
+          onlyConstrained $
+            mkTest db12 "all goals" ["E", "syb"] $
+              solverSuccess [("E", 1), ("syb", 2)]
+      , runTest $
+          onlyConstrained $
+            mkTest db17 "backtracking" ["A", "B"] $
+              solverSuccess [("A", 2), ("B", 1)]
+      , runTest $
+          onlyConstrained $
+            mkTest db17 "failure message" ["A"] $
+              solverFailure $
+                isInfixOf $
+                  "Could not resolve dependencies:\n"
+                    ++ "[__0] trying: A-3.0.0 (user goal)\n"
+                    ++ "[__1] next goal: C (dependency of A)\n"
+                    ++ "[__1] fail (not a user-provided goal nor mentioned as a constraint, "
+                    ++ "but reject-unconstrained-dependencies was set)\n"
+                    ++ "[__1] fail (backjumping, conflict set: A, C)\n"
+                    ++ "After searching the rest of the dependency tree exhaustively, "
+                    ++ "these were the goals I've had most trouble fulfilling: A, C, B"
+      ]
+  , testGroup
+      "Cycles"
+      [ runTest $ mkTest db14 "simpleCycle1" ["A"] anySolverFailure
+      , runTest $ mkTest db14 "simpleCycle2" ["A", "B"] anySolverFailure
+      , runTest $ mkTest db14 "cycleWithFlagChoice1" ["C"] (solverSuccess [("C", 1), ("E", 1)])
+      , runTest $ mkTest db15 "cycleThroughSetupDep1" ["A"] anySolverFailure
+      , runTest $ mkTest db15 "cycleThroughSetupDep2" ["B"] anySolverFailure
+      , runTest $ mkTest db15 "cycleThroughSetupDep3" ["C"] (solverSuccess [("C", 2), ("D", 1)])
+      , runTest $ mkTest db15 "cycleThroughSetupDep4" ["D"] (solverSuccess [("D", 1)])
+      , runTest $ mkTest db15 "cycleThroughSetupDep5" ["E"] (solverSuccess [("C", 2), ("D", 1), ("E", 1)])
+      , runTest $ issue4161 "detect cycle between package and its setup script"
+      , runTest $ testCyclicDependencyErrorMessages "cyclic dependency error messages"
+      ]
+  , testGroup
+      "Extensions"
+      [ runTest $ mkTestExts [EnableExtension CPP] dbExts1 "unsupported" ["A"] anySolverFailure
+      , runTest $ mkTestExts [EnableExtension CPP] dbExts1 "unsupportedIndirect" ["B"] anySolverFailure
+      , runTest $ mkTestExts [EnableExtension RankNTypes] dbExts1 "supported" ["A"] (solverSuccess [("A", 1)])
+      , runTest $ mkTestExts (map EnableExtension [CPP, RankNTypes]) dbExts1 "supportedIndirect" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
+      , runTest $ mkTestExts [EnableExtension CPP] dbExts1 "disabledExtension" ["D"] anySolverFailure
+      , runTest $ mkTestExts (map EnableExtension [CPP, RankNTypes]) dbExts1 "disabledExtension" ["D"] anySolverFailure
+      , runTest $ mkTestExts (UnknownExtension "custom" : map EnableExtension [CPP, RankNTypes]) dbExts1 "supportedUnknown" ["E"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("E", 1)])
+      ]
+  , testGroup
+      "Languages"
+      [ runTest $ mkTestLangs [Haskell98] dbLangs1 "unsupported" ["A"] anySolverFailure
+      , runTest $ mkTestLangs [Haskell98, Haskell2010] dbLangs1 "supported" ["A"] (solverSuccess [("A", 1)])
+      , runTest $ mkTestLangs [Haskell98] dbLangs1 "unsupportedIndirect" ["B"] anySolverFailure
+      , runTest $ mkTestLangs [Haskell98, Haskell2010, UnknownLanguage "Haskell3000"] dbLangs1 "supportedUnknown" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
+      ]
+  , testGroup
+      "Qualified Package Constraints"
+      [ runTest $
+          mkTest dbConstraints "install latest versions without constraints" ["A", "B", "C"] $
+            solverSuccess [("A", 7), ("B", 8), ("C", 9), ("D", 7), ("D", 8), ("D", 9)]
+      , let cs = [ExVersionConstraint (ScopeAnyQualifier "D") $ mkVersionRange 1 4]
+         in runTest $
+              constraints cs $
+                mkTest dbConstraints "force older versions with unqualified constraint" ["A", "B", "C"] $
+                  solverSuccess [("A", 1), ("B", 2), ("C", 3), ("D", 1), ("D", 2), ("D", 3)]
+      , let cs =
+              [ ExVersionConstraint (ScopeQualified P.QualToplevel "D") $ mkVersionRange 1 4
+              , ExVersionConstraint (ScopeQualified (P.QualSetup "B") "D") $ mkVersionRange 4 7
+              ]
+         in runTest $
+              constraints cs $
+                mkTest dbConstraints "force multiple versions with qualified constraints" ["A", "B", "C"] $
+                  solverSuccess [("A", 1), ("B", 5), ("C", 9), ("D", 1), ("D", 5), ("D", 9)]
+      , let cs = [ExVersionConstraint (ScopeAnySetupQualifier "D") $ mkVersionRange 1 4]
+         in runTest $
+              constraints cs $
+                mkTest dbConstraints "constrain package across setup scripts" ["A", "B", "C"] $
+                  solverSuccess [("A", 7), ("B", 2), ("C", 3), ("D", 2), ("D", 3), ("D", 7)]
+      ]
+  , testGroup
+      "Package Preferences"
+      [ runTest $ preferences [ExPkgPref "A" $ mkvrThis 1] $ mkTest db13 "selectPreferredVersionSimple" ["A"] (solverSuccess [("A", 1)])
+      , runTest $ preferences [ExPkgPref "A" $ mkvrOrEarlier 2] $ mkTest db13 "selectPreferredVersionSimple2" ["A"] (solverSuccess [("A", 2)])
+      , runTest
+          $ preferences
+            [ ExPkgPref "A" $ mkvrOrEarlier 2
+            , ExPkgPref "A" $ mkvrOrEarlier 1
+            ]
+          $ mkTest db13 "selectPreferredVersionMultiple" ["A"] (solverSuccess [("A", 1)])
+      , runTest
+          $ preferences
+            [ ExPkgPref "A" $ mkvrOrEarlier 1
+            , ExPkgPref "A" $ mkvrOrEarlier 2
+            ]
+          $ mkTest db13 "selectPreferredVersionMultiple2" ["A"] (solverSuccess [("A", 1)])
+      , runTest
+          $ preferences
+            [ ExPkgPref "A" $ mkvrThis 1
+            , ExPkgPref "A" $ mkvrThis 2
+            ]
+          $ mkTest db13 "selectPreferredVersionMultiple3" ["A"] (solverSuccess [("A", 2)])
+      , runTest
+          $ preferences
+            [ ExPkgPref "A" $ mkvrThis 1
+            , ExPkgPref "A" $ mkvrOrEarlier 2
+            ]
+          $ mkTest db13 "selectPreferredVersionMultiple4" ["A"] (solverSuccess [("A", 1)])
+      ]
+  , testGroup
+      "Stanza Preferences"
+      [ runTest $
+          mkTest dbStanzaPreferences1 "disable tests by default" ["pkg"] $
+            solverSuccess [("pkg", 1)]
+      , runTest $
+          preferences [ExStanzaPref "pkg" [TestStanzas]] $
+            mkTest dbStanzaPreferences1 "enable tests with testing preference" ["pkg"] $
+              solverSuccess [("pkg", 1), ("test-dep", 1)]
+      , runTest $
+          preferences [ExStanzaPref "pkg" [TestStanzas]] $
+            mkTest dbStanzaPreferences2 "disable testing when it's not possible" ["pkg"] $
+              solverSuccess [("pkg", 1)]
+      , testStanzaPreference "test stanza preference"
+      ]
+  , testGroup
+      "Buildable Field"
+      [ testBuildable "avoid building component with unknown dependency" (ExAny "unknown")
+      , testBuildable "avoid building component with unknown extension" (ExExt (UnknownExtension "unknown"))
+      , testBuildable "avoid building component with unknown language" (ExLang (UnknownLanguage "unknown"))
+      , runTest $ mkTest dbBuildable1 "choose flags that set buildable to false" ["pkg"] (solverSuccess [("flag1-false", 1), ("flag2-true", 1), ("pkg", 1)])
+      , runTest $ mkTest dbBuildable2 "choose version that sets buildable to false" ["A"] (solverSuccess [("A", 1), ("B", 2)])
+      ]
+  , testGroup
+      "Pkg-config dependencies"
+      [ runTest $ mkTestPCDepends (Just []) dbPC1 "noPkgs" ["A"] anySolverFailure
+      , runTest $ mkTestPCDepends (Just [("pkgA", "0")]) dbPC1 "tooOld" ["A"] anySolverFailure
+      , runTest $ mkTestPCDepends (Just [("pkgA", "1.0.0"), ("pkgB", "1.0.0")]) dbPC1 "pruneNotFound" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
+      , runTest $ mkTestPCDepends (Just [("pkgA", "1.0.0"), ("pkgB", "2.0.0")]) dbPC1 "chooseNewest" ["C"] (solverSuccess [("A", 1), ("B", 2), ("C", 1)])
+      , runTest $ mkTestPCDepends Nothing dbPC1 "noPkgConfigFailure" ["A"] anySolverFailure
+      , runTest $ mkTestPCDepends Nothing dbPC1 "noPkgConfigSuccess" ["D"] (solverSuccess [("D", 1)])
+      ]
+  , testGroup
+      "Independent goals"
+      [ runTest $ indep $ mkTest db16 "indepGoals1" ["A", "B"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("D", 1), ("D", 2), ("E", 1)])
+      , runTest $ testIndepGoals2 "indepGoals2"
+      , runTest $ testIndepGoals3 "indepGoals3"
+      , runTest $ testIndepGoals4 "indepGoals4"
+      , runTest $ testIndepGoals5 "indepGoals5 - fixed goal order" FixedGoalOrder
+      , runTest $ testIndepGoals5 "indepGoals5 - default goal order" DefaultGoalOrder
+      , runTest $ testIndepGoals6 "indepGoals6 - fixed goal order" FixedGoalOrder
+      , runTest $ testIndepGoals6 "indepGoals6 - default goal order" DefaultGoalOrder
+      ]
+  , -- Tests designed for the backjumping blog post
+    testGroup
+      "Backjumping"
+      [ runTest $ mkTest dbBJ1a "bj1a" ["A"] (solverSuccess [("A", 1), ("B", 1)])
+      , runTest $ mkTest dbBJ1b "bj1b" ["A"] (solverSuccess [("A", 1), ("B", 1)])
+      , runTest $ mkTest dbBJ1c "bj1c" ["A"] (solverSuccess [("A", 1), ("B", 1)])
+      , runTest $ mkTest dbBJ2 "bj2" ["A"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
+      , runTest $ mkTest dbBJ3 "bj3" ["A"] (solverSuccess [("A", 1), ("Ba", 1), ("C", 1)])
+      , runTest $ mkTest dbBJ4 "bj4" ["A"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
+      , runTest $ mkTest dbBJ5 "bj5" ["A"] (solverSuccess [("A", 1), ("B", 1), ("D", 1)])
+      , runTest $ mkTest dbBJ6 "bj6" ["A"] (solverSuccess [("A", 1), ("B", 1)])
+      , runTest $ mkTest dbBJ7 "bj7" ["A"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
+      , runTest $ indep $ mkTest dbBJ8 "bj8" ["A", "B"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
+      ]
+  , testGroup
+      "main library dependencies"
+      [ let db = [Right $ exAvNoLibrary "A" 1 `withExe` exExe "exe" []]
+         in runTest $
+              mkTest db "install build target without a library" ["A"] $
+                solverSuccess [("A", 1)]
+      , let db =
+              [ Right $ exAv "A" 1 [ExAny "B"]
+              , Right $ exAvNoLibrary "B" 1 `withExe` exExe "exe" []
+              ]
+         in runTest $
+              mkTest db "reject build-depends dependency with no library" ["A"] $
+                solverFailure (isInfixOf "rejecting: B-1.0.0 (does not contain library, which is required by A)")
+      , let exe = exExe "exe" []
+            db =
+              [ Right $ exAv "A" 1 [ExAny "B"]
+              , Right $ exAvNoLibrary "B" 2 `withExe` exe
+              , Right $ exAv "B" 1 [] `withExe` exe
+              ]
+         in runTest $
+              mkTest db "choose version of build-depends dependency that has a library" ["A"] $
+                solverSuccess [("A", 1), ("B", 1)]
+      ]
+  , testGroup
+      "sub-library dependencies"
+      [ let db =
+              [ Right $ exAv "A" 1 [ExSubLibAny "B" "sub-lib"]
+              , Right $ exAv "B" 1 []
+              ]
+         in runTest $
+              mkTest db "reject package that is missing required sub-library" ["A"] $
+                solverFailure $
+                  isInfixOf $
+                    "rejecting: B-1.0.0 (does not contain library 'sub-lib', which is required by A)"
+      , let db =
+              [ Right $ exAv "A" 1 [ExSubLibAny "B" "sub-lib"]
+              , Right $ exAvNoLibrary "B" 1 `withSubLibrary` exSubLib "sub-lib" []
+              ]
+         in runTest $
+              mkTest db "reject package with private but required sub-library" ["A"] $
+                solverFailure $
+                  isInfixOf $
+                    "rejecting: B-1.0.0 (library 'sub-lib' is private, but it is required by A)"
+      , let db =
+              [ Right $ exAv "A" 1 [ExSubLibAny "B" "sub-lib"]
+              , Right $
+                  exAvNoLibrary "B" 1
+                    `withSubLibrary` exSubLib "sub-lib" [ExFlagged "make-lib-private" (dependencies []) publicDependencies]
+              ]
+         in runTest $
+              constraints [ExFlagConstraint (ScopeAnyQualifier "B") "make-lib-private" True] $
+                mkTest db "reject package with sub-library made private by flag constraint" ["A"] $
+                  solverFailure $
+                    isInfixOf $
+                      "rejecting: B-1.0.0 (library 'sub-lib' is private, but it is required by A)"
+      , let db =
+              [ Right $ exAv "A" 1 [ExSubLibAny "B" "sub-lib"]
+              , Right $
+                  exAvNoLibrary "B" 1
+                    `withSubLibrary` exSubLib "sub-lib" [ExFlagged "make-lib-private" (dependencies []) publicDependencies]
+              ]
+         in runTest $
+              mkTest db "treat sub-library as visible even though flag choice could make it private" ["A"] $
+                solverSuccess [("A", 1), ("B", 1)]
+      , let db =
+              [ Right $ exAv "A" 1 [ExAny "B"]
+              , Right $ exAv "B" 1 [] `withSubLibrary` exSubLib "sub-lib" []
+              , Right $ exAv "C" 1 [ExSubLibAny "B" "sub-lib"]
+              ]
+            goals :: [ExampleVar]
+            goals =
+              [ P QualNone "A"
+              , P QualNone "B"
+              , P QualNone "C"
+              ]
+         in runTest $
+              goalOrder goals $
+                mkTest db "reject package that requires a private sub-library" ["A", "C"] $
+                  solverFailure $
+                    isInfixOf $
+                      "rejecting: C-1.0.0 (requires library 'sub-lib' from B, but the component is private)"
+      , let db =
+              [ Right $ exAv "A" 1 [ExSubLibAny "B" "sub-lib-v1"]
+              , Right $ exAv "B" 2 [] `withSubLibrary` ExSubLib "sub-lib-v2" publicDependencies
+              , Right $ exAv "B" 1 [] `withSubLibrary` ExSubLib "sub-lib-v1" publicDependencies
+              ]
+         in runTest $
+              mkTest db "choose version of package containing correct sub-library" ["A"] $
+                solverSuccess [("A", 1), ("B", 1)]
+      , let db =
+              [ Right $ exAv "A" 1 [ExSubLibAny "B" "sub-lib"]
+              , Right $ exAv "B" 2 [] `withSubLibrary` ExSubLib "sub-lib" (dependencies [])
+              , Right $ exAv "B" 1 [] `withSubLibrary` ExSubLib "sub-lib" publicDependencies
+              ]
+         in runTest $
+              mkTest db "choose version of package with public sub-library" ["A"] $
+                solverSuccess [("A", 1), ("B", 1)]
+      ]
+  , -- build-tool-depends dependencies
+    testGroup
+      "build-tool-depends"
+      [ runTest $ mkTest dbBuildTools "simple exe dependency" ["A"] (solverSuccess [("A", 1), ("bt-pkg", 2)])
+      , runTest $
+          disableSolveExecutables $
+            mkTest dbBuildTools "don't install build tool packages in legacy mode" ["A"] (solverSuccess [("A", 1)])
+      , runTest $ mkTest dbBuildTools "flagged exe dependency" ["B"] (solverSuccess [("B", 1), ("bt-pkg", 2)])
+      , runTest $
+          enableAllTests $
+            mkTest dbBuildTools "test suite exe dependency" ["C"] (solverSuccess [("C", 1), ("bt-pkg", 2)])
+      , runTest $
+          mkTest dbBuildTools "unknown exe" ["D"] $
+            solverFailure (isInfixOf "does not contain executable 'unknown-exe', which is required by D")
+      , runTest $
+          disableSolveExecutables $
+            mkTest dbBuildTools "don't check for build tool executables in legacy mode" ["D"] $
+              solverSuccess [("D", 1)]
+      , runTest $
+          mkTest dbBuildTools "unknown build tools package error mentions package, not exe" ["E"] $
+            solverFailure (isInfixOf "unknown package: E:unknown-pkg:exe.unknown-pkg (dependency of E)")
+      , runTest $
+          mkTest dbBuildTools "unknown flagged exe" ["F"] $
+            solverFailure (isInfixOf "does not contain executable 'unknown-exe', which is required by F +flagF")
+      , runTest $
+          enableAllTests $
+            mkTest dbBuildTools "unknown test suite exe" ["G"] $
+              solverFailure (isInfixOf "does not contain executable 'unknown-exe', which is required by G *test")
+      , runTest $
+          mkTest dbBuildTools "wrong exe for build tool package version" ["H"] $
+            solverFailure $
+              isInfixOf $
+                -- The solver reports the version conflict when a version conflict
+                -- and an executable conflict apply to the same package version.
+                "[__1] rejecting: H:bt-pkg:exe.bt-pkg-4.0.0 (conflict: H => H:bt-pkg:exe.bt-pkg (exe exe1)==3.0.0)\n"
+                  ++ "[__1] rejecting: H:bt-pkg:exe.bt-pkg-3.0.0 (does not contain executable 'exe1', which is required by H)\n"
+                  ++ "[__1] rejecting: H:bt-pkg:exe.bt-pkg-2.0.0 (conflict: H => H:bt-pkg:exe.bt-pkg (exe exe1)==3.0.0)"
+      , runTest $ chooseExeAfterBuildToolsPackage True "choose exe after choosing its package - success"
+      , runTest $ chooseExeAfterBuildToolsPackage False "choose exe after choosing its package - failure"
+      , runTest $ rejectInstalledBuildToolPackage "reject installed package for build-tool dependency"
+      , runTest $ requireConsistentBuildToolVersions "build tool versions must be consistent within one package"
+      ]
+  , -- build-tools dependencies
+    testGroup
+      "legacy build-tools"
+      [ runTest $ mkTest dbLegacyBuildTools1 "bt1" ["A"] (solverSuccess [("A", 1), ("alex", 1)])
+      , runTest $
+          disableSolveExecutables $
+            mkTest dbLegacyBuildTools1 "bt1 - don't install build tool packages in legacy mode" ["A"] (solverSuccess [("A", 1)])
+      , runTest $
+          mkTest dbLegacyBuildTools2 "bt2" ["A"] $
+            solverFailure (isInfixOf "does not contain executable 'alex', which is required by A")
+      , runTest $
+          disableSolveExecutables $
+            mkTest dbLegacyBuildTools2 "bt2 - don't check for build tool executables in legacy mode" ["A"] (solverSuccess [("A", 1)])
+      , runTest $ mkTest dbLegacyBuildTools3 "bt3" ["A"] (solverSuccess [("A", 1)])
+      , runTest $ mkTest dbLegacyBuildTools4 "bt4" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("alex", 1), ("alex", 2)])
+      , runTest $ mkTest dbLegacyBuildTools5 "bt5" ["B"] (solverSuccess [("A", 1), ("A", 2), ("B", 1), ("alex", 1)])
+      , runTest $ mkTest dbLegacyBuildTools6 "bt6" ["A"] (solverSuccess [("A", 1), ("alex", 1), ("happy", 1)])
+      ]
+  , -- internal dependencies
+    testGroup
+      "internal dependencies"
+      [ runTest $ mkTest dbIssue3775 "issue #3775" ["B"] (solverSuccess [("A", 2), ("B", 2), ("warp", 1)])
+      ]
+  , -- tests for partial fix for issue #5325
+    testGroup "Components that are unbuildable in the current environment" $
+      let flagConstraint = ExFlagConstraint . ScopeAnyQualifier
+       in [ let db = [Right $ exAv "A" 1 [ExFlagged "build-lib" (dependencies []) unbuildableDependencies]]
+             in runTest $
+                  constraints [flagConstraint "A" "build-lib" False] $
+                    mkTest db "install unbuildable library" ["A"] $
+                      solverSuccess [("A", 1)]
+          , let db =
+                  [ Right $
+                      exAvNoLibrary "A" 1
+                        `withExe` exExe "exe" [ExFlagged "build-exe" (dependencies []) unbuildableDependencies]
+                  ]
+             in runTest $
+                  constraints [flagConstraint "A" "build-exe" False] $
+                    mkTest db "install unbuildable exe" ["A"] $
+                      solverSuccess [("A", 1)]
+          , let db =
+                  [ Right $ exAv "A" 1 [ExAny "B"]
+                  , Right $ exAv "B" 1 [ExFlagged "build-lib" (dependencies []) unbuildableDependencies]
+                  ]
+             in runTest $
+                  constraints [flagConstraint "B" "build-lib" False] $
+                    mkTest db "reject library dependency with unbuildable library" ["A"] $
+                      solverFailure $
+                        isInfixOf $
+                          "rejecting: B-1.0.0 (library is not buildable in the "
+                            ++ "current environment, but it is required by A)"
+          , let db =
+                  [ Right $ exAv "A" 1 [ExBuildToolAny "B" "bt"]
+                  , Right $
+                      exAv "B" 1 [ExFlagged "build-lib" (dependencies []) unbuildableDependencies]
+                        `withExe` exExe "bt" []
+                  ]
+             in runTest $
+                  constraints [flagConstraint "B" "build-lib" False] $
+                    mkTest db "allow build-tool dependency with unbuildable library" ["A"] $
+                      solverSuccess [("A", 1), ("B", 1)]
+          , let db =
+                  [ Right $ exAv "A" 1 [ExBuildToolAny "B" "bt"]
+                  , Right $
+                      exAv "B" 1 []
+                        `withExe` exExe "bt" [ExFlagged "build-exe" (dependencies []) unbuildableDependencies]
+                  ]
+             in runTest $
+                  constraints [flagConstraint "B" "build-exe" False] $
+                    mkTest db "reject build-tool dependency with unbuildable exe" ["A"] $
+                      solverFailure $
+                        isInfixOf $
+                          "rejecting: A:B:exe.B-1.0.0 (executable 'bt' is not "
+                            ++ "buildable in the current environment, but it is required by A)"
+          , runTest $
+              chooseUnbuildableExeAfterBuildToolsPackage
+                "choose unbuildable exe after choosing its package"
+          ]
+  , testGroup
+      "--fine-grained-conflicts"
+      [ -- Skipping a version because of a problematic dependency:
+        --
+        -- When the solver explores A-4, it finds that it cannot satisfy B's
+        -- dependencies. This allows the solver to skip the subsequent
+        -- versions of A that also depend on B.
+        runTest $
+          let db =
+                [ Right $ exAv "A" 4 [ExAny "B"]
+                , Right $ exAv "A" 3 [ExAny "B"]
+                , Right $ exAv "A" 2 [ExAny "B"]
+                , Right $ exAv "A" 1 []
+                , Right $ exAv "B" 2 [ExAny "unknown1"]
+                , Right $ exAv "B" 1 [ExAny "unknown2"]
+                ]
+              msg =
+                [ "[__0] trying: A-4.0.0 (user goal)"
+                , "[__1] trying: B-2.0.0 (dependency of A)"
+                , "[__2] unknown package: unknown1 (dependency of B)"
+                , "[__2] fail (backjumping, conflict set: B, unknown1)"
+                , "[__1] trying: B-1.0.0"
+                , "[__2] unknown package: unknown2 (dependency of B)"
+                , "[__2] fail (backjumping, conflict set: B, unknown2)"
+                , "[__1] fail (backjumping, conflict set: A, B, unknown1, unknown2)"
+                , "[__0] skipping: A-3.0.0, A-2.0.0 (has the same characteristics that "
+                    ++ "caused the previous version to fail: depends on 'B')"
+                , "[__0] trying: A-1.0.0"
+                , "[__1] done"
+                ]
+           in setVerbose $
+                mkTest db "skip version due to problematic dependency" ["A"] $
+                  SolverResult (isInfixOf msg) $
+                    Right [("A", 1)]
+      , -- Skipping a version because of a restrictive constraint on a
+        -- dependency:
+        --
+        -- The solver rejects A-4 because its constraint on B excludes B-1.
+        -- Then the solver is able to skip A-3 and A-2 because they also
+        -- exclude B-1, even though they don't have the exact same constraints
+        -- on B.
+        runTest $
+          let db =
+                [ Right $ exAv "A" 4 [ExFix "B" 14]
+                , Right $ exAv "A" 3 [ExFix "B" 13]
+                , Right $ exAv "A" 2 [ExFix "B" 12]
+                , Right $ exAv "A" 1 [ExFix "B" 11]
+                , Right $ exAv "B" 11 []
+                ]
+              msg =
+                [ "[__0] trying: A-4.0.0 (user goal)"
+                , "[__1] next goal: B (dependency of A)"
+                , "[__1] rejecting: B-11.0.0 (conflict: A => B==14.0.0)"
+                , "[__1] fail (backjumping, conflict set: A, B)"
+                , "[__0] skipping: A-3.0.0, A-2.0.0 (has the same characteristics that "
+                    ++ "caused the previous version to fail: depends on 'B' but excludes "
+                    ++ "version 11.0.0)"
+                , "[__0] trying: A-1.0.0"
+                , "[__1] next goal: B (dependency of A)"
+                , "[__1] trying: B-11.0.0"
+                , "[__2] done"
+                ]
+           in setVerbose $
+                mkTest db "skip version due to restrictive constraint on its dependency" ["A"] $
+                  SolverResult (isInfixOf msg) $
+                    Right [("A", 1), ("B", 11)]
+      , -- This test tests the case where the solver chooses a version for one
+        -- package, B, before choosing a version for one of its reverse
+        -- dependencies, C. While the solver is exploring the subtree rooted
+        -- at B-3, it finds that C-2's dependency on B conflicts with B-3.
+        -- Then the solver is able to skip C-1, because it also excludes B-3.
+        --
+        -- --fine-grained-conflicts could have a benefit in this case even
+        -- though the solver would have found the conflict between B-3 and C-1
+        -- immediately after trying C-1 anyway. It prevents C-1 from
+        -- introducing any other conflicts which could increase the size of
+        -- the conflict set.
+        runTest $
+          let db =
+                [ Right $ exAv "A" 1 [ExAny "B", ExAny "C"]
+                , Right $ exAv "B" 3 []
+                , Right $ exAv "B" 2 []
+                , Right $ exAv "B" 1 []
+                , Right $ exAv "C" 2 [ExFix "B" 2]
+                , Right $ exAv "C" 1 [ExFix "B" 1]
+                ]
+              goals = [P QualNone pkg | pkg <- ["A", "B", "C"]]
+              expectedMsg =
+                [ "[__0] trying: A-1.0.0 (user goal)"
+                , "[__1] trying: B-3.0.0 (dependency of A)"
+                , "[__2] next goal: C (dependency of A)"
+                , "[__2] rejecting: C-2.0.0 (conflict: B==3.0.0, C => B==2.0.0)"
+                , "[__2] skipping: C-1.0.0 (has the same characteristics that caused the "
+                    ++ "previous version to fail: excludes 'B' version 3.0.0)"
+                , "[__2] fail (backjumping, conflict set: A, B, C)"
+                , "[__1] trying: B-2.0.0"
+                , "[__2] next goal: C (dependency of A)"
+                , "[__2] trying: C-2.0.0"
+                , "[__3] done"
+                ]
+           in setVerbose $
+                goalOrder goals $
+                  mkTest db "skip version that excludes dependency that was already chosen" ["A"] $
+                    SolverResult (isInfixOf expectedMsg) $
+                      Right [("A", 1), ("B", 2), ("C", 2)]
+      , -- This test tests how the solver merges conflicts when it has
+        -- multiple reasons to add a variable to the conflict set. In this
+        -- case, package A conflicts with B and C. The solver should take the
+        -- union of the conflicts and then only skip a version if it does not
+        -- resolve any of the conflicts.
+        --
+        -- The solver rejects A-3 because it can't find consistent versions for
+        -- its two dependencies, B and C. Then it skips A-2 because A-2 also
+        -- depends on B and C. This test ensures that the solver considers
+        -- A-1 even though A-1 only resolves one of the conflicts (A-1 removes
+        -- the dependency on C).
+        runTest $
+          let db =
+                [ Right $ exAv "A" 3 [ExAny "B", ExAny "C"]
+                , Right $ exAv "A" 2 [ExAny "B", ExAny "C"]
+                , Right $ exAv "A" 1 [ExAny "B"]
+                , Right $ exAv "B" 1 [ExFix "D" 1]
+                , Right $ exAv "C" 1 [ExFix "D" 2]
+                , Right $ exAv "D" 1 []
+                , Right $ exAv "D" 2 []
+                ]
+              goals = [P QualNone pkg | pkg <- ["A", "B", "C", "D"]]
+              msg =
+                [ "[__0] trying: A-3.0.0 (user goal)"
+                , "[__1] trying: B-1.0.0 (dependency of A)"
+                , "[__2] trying: C-1.0.0 (dependency of A)"
+                , "[__3] next goal: D (dependency of B)"
+                , "[__3] rejecting: D-2.0.0 (conflict: B => D==1.0.0)"
+                , "[__3] rejecting: D-1.0.0 (conflict: C => D==2.0.0)"
+                , "[__3] fail (backjumping, conflict set: B, C, D)"
+                , "[__2] fail (backjumping, conflict set: A, B, C, D)"
+                , "[__1] fail (backjumping, conflict set: A, B, C, D)"
+                , "[__0] skipping: A-2.0.0 (has the same characteristics that caused the "
+                    ++ "previous version to fail: depends on 'B'; depends on 'C')"
+                , "[__0] trying: A-1.0.0"
+                , "[__1] trying: B-1.0.0 (dependency of A)"
+                , "[__2] next goal: D (dependency of B)"
+                , "[__2] rejecting: D-2.0.0 (conflict: B => D==1.0.0)"
+                , "[__2] trying: D-1.0.0"
+                , "[__3] done"
+                ]
+           in setVerbose $
+                goalOrder goals $
+                  mkTest db "only skip a version if it resolves none of the previous conflicts" ["A"] $
+                    SolverResult (isInfixOf msg) $
+                      Right [("A", 1), ("B", 1), ("D", 1)]
+      , -- This test ensures that the solver log doesn't show all conflicts
+        -- that the solver encountered in a subtree. The solver should only
+        -- show the conflicts that are contained in the current conflict set.
+        --
+        -- The goal order forces the solver to try A-4, encounter a conflict
+        -- with B-2, try B-1, and then try C. A-4 conflicts with the only
+        -- version of C, so the solver backjumps with a conflict set of
+        -- {A, C}. When the solver skips the next version of A, the log should
+        -- mention the conflict with C but not B.
+        runTest $
+          let db =
+                [ Right $ exAv "A" 4 [ExFix "B" 1, ExFix "C" 1]
+                , Right $ exAv "A" 3 [ExFix "B" 1, ExFix "C" 1]
+                , Right $ exAv "A" 2 [ExFix "C" 1]
+                , Right $ exAv "A" 1 [ExFix "C" 2]
+                , Right $ exAv "B" 2 []
+                , Right $ exAv "B" 1 []
+                , Right $ exAv "C" 2 []
+                ]
+              goals = [P QualNone pkg | pkg <- ["A", "B", "C"]]
+              msg =
+                [ "[__0] trying: A-4.0.0 (user goal)"
+                , "[__1] next goal: B (dependency of A)"
+                , "[__1] rejecting: B-2.0.0 (conflict: A => B==1.0.0)"
+                , "[__1] trying: B-1.0.0"
+                , "[__2] next goal: C (dependency of A)"
+                , "[__2] rejecting: C-2.0.0 (conflict: A => C==1.0.0)"
+                , "[__2] fail (backjumping, conflict set: A, C)"
+                , "[__0] skipping: A-3.0.0, A-2.0.0 (has the same characteristics that caused the "
+                    ++ "previous version to fail: depends on 'C' but excludes version 2.0.0)"
+                , "[__0] trying: A-1.0.0"
+                , "[__1] next goal: C (dependency of A)"
+                , "[__1] trying: C-2.0.0"
+                , "[__2] done"
+                ]
+           in setVerbose $
+                goalOrder goals $
+                  mkTest db "don't show conflicts that aren't part of the conflict set" ["A"] $
+                    SolverResult (isInfixOf msg) $
+                      Right [("A", 1), ("C", 2)]
+      , -- Tests that the conflict set is properly updated when a version is
+        -- skipped due to being excluded by one of its reverse dependencies'
+        -- constraints.
+        runTest $
+          let db =
+                [ Right $ exAv "A" 2 [ExFix "B" 3]
+                , Right $ exAv "A" 1 [ExFix "B" 1]
+                , Right $ exAv "B" 2 []
+                , Right $ exAv "B" 1 []
+                ]
+              msg =
+                [ "[__0] trying: A-2.0.0 (user goal)"
+                , "[__1] next goal: B (dependency of A)"
+                , -- During this step, the solver adds A and B to the
+                  -- conflict set, with the details of each package's
+                  -- conflict:
+                  --
+                  -- A: A's constraint rejected B-2.
+                  -- B: B was rejected by A's B==3 constraint
+                  "[__1] rejecting: B-2.0.0 (conflict: A => B==3.0.0)"
+                , -- When the solver skips B-1, it cannot simply reuse the
+                  -- previous conflict set. It also needs to update A's
+                  -- entry to say that A also rejected B-1. Otherwise, the
+                  -- solver wouldn't know that A-1 could resolve one of
+                  -- the conflicts encountered while exploring A-2. The
+                  -- solver would skip A-1, even though it leads to the
+                  -- solution.
+                  "[__1] skipping: B-1.0.0 (has the same characteristics that caused "
+                    ++ "the previous version to fail: excluded by constraint '==3.0.0' from 'A')"
+                , "[__1] fail (backjumping, conflict set: A, B)"
+                , "[__0] trying: A-1.0.0"
+                , "[__1] next goal: B (dependency of A)"
+                , "[__1] rejecting: B-2.0.0 (conflict: A => B==1.0.0)"
+                , "[__1] trying: B-1.0.0"
+                , "[__2] done"
+                ]
+           in setVerbose $
+                mkTest db "update conflict set after skipping version - 1" ["A"] $
+                  SolverResult (isInfixOf msg) $
+                    Right [("A", 1), ("B", 1)]
+      , -- Tests that the conflict set is properly updated when a version is
+        -- skipped due to excluding a version of one of its dependencies.
+        -- This test is similar the previous one, with the goal order reversed.
+        runTest $
+          let db =
+                [ Right $ exAv "A" 2 []
+                , Right $ exAv "A" 1 []
+                , Right $ exAv "B" 2 [ExFix "A" 3]
+                , Right $ exAv "B" 1 [ExFix "A" 1]
+                ]
+              goals = [P QualNone pkg | pkg <- ["A", "B"]]
+              msg =
+                [ "[__0] trying: A-2.0.0 (user goal)"
+                , "[__1] next goal: B (user goal)"
+                , "[__1] rejecting: B-2.0.0 (conflict: A==2.0.0, B => A==3.0.0)"
+                , "[__1] skipping: B-1.0.0 (has the same characteristics that caused "
+                    ++ "the previous version to fail: excludes 'A' version 2.0.0)"
+                , "[__1] fail (backjumping, conflict set: A, B)"
+                , "[__0] trying: A-1.0.0"
+                , "[__1] next goal: B (user goal)"
+                , "[__1] rejecting: B-2.0.0 (conflict: A==1.0.0, B => A==3.0.0)"
+                , "[__1] trying: B-1.0.0"
+                , "[__2] done"
+                ]
+           in setVerbose $
+                goalOrder goals $
+                  mkTest db "update conflict set after skipping version - 2" ["A", "B"] $
+                    SolverResult (isInfixOf msg) $
+                      Right [("A", 1), ("B", 1)]
+      ]
+  , -- Tests for the contents of the solver's log
+    testGroup
+      "Solver log"
+      [ -- See issue #3203. The solver should only choose a version for A once.
+        runTest $
+          let db = [Right $ exAv "A" 1 []]
 
         , let checkFullLog =
                   any $ isInfixOf "rejecting: pkg:-flag (manual flag can only be changed explicitly)"
@@ -1130,16 +1921,10 @@ dbBase = [
     ]
 
 dbNonupgrade :: ExampleDb
-dbNonupgrade = [
-    Left $ exInst "ghc" 1 "ghc-1" []
-  , Left $ exInst "ghci" 1 "ghci-1" []
-  , Left $ exInst "ghc-boot" 1 "ghc-boot-1" []
+dbNonupgrade =
+  [ Left $ exInst "ghc" 1 "ghc-1" []
   , Right $ exAv "ghc" 2 []
-  , Right $ exAv "ghci" 2 []
-  , Right $ exAv "ghc-boot" 2 []
   , Right $ exAv "A" 1 [ExFix "ghc" 2]
-  , Right $ exAv "B" 1 [ExFix "ghci" 2]
-  , Right $ exAv "C" 1 [ExFix "ghc-boot" 2]
   ]
 
 db13 :: ExampleDb

From 3dd0f33b2dfd017fcad4b9c84942adde78c9459c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Thu, 20 Jul 2023 17:41:04 +0000
Subject: [PATCH 070/144] Fix build

---
 cabal-install/src/Distribution/Client/Dependency.hs | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/cabal-install/src/Distribution/Client/Dependency.hs b/cabal-install/src/Distribution/Client/Dependency.hs
index 09ea4548222..11a48d8d6b5 100644
--- a/cabal-install/src/Distribution/Client/Dependency.hs
+++ b/cabal-install/src/Distribution/Client/Dependency.hs
@@ -397,16 +397,7 @@ dontUpgradeNonUpgradeablePackages params =
       | Set.notMember (mkPackageName "base") (depResolverTargets params)
       -- If you change this enumeration, make sure to update the list in
       -- "Distribution.Solver.Modular.Solver" as well
-      , pkgname <- [ mkPackageName "base"
-                   , mkPackageName "ghc-bignum"
-                   , mkPackageName "ghc-prim"
-                   , mkPackageName "ghc-boot"
-                   , mkPackageName "ghc"
-                   , mkPackageName "ghci"
-                   , mkPackageName "integer-gmp"
-                   , mkPackageName "integer-simple"
-                   , mkPackageName "template-haskell"
-                   ]
+      , pkgname <- nonUpgradeablePackages
       , isInstalled pkgname ]
 
     isInstalled = not . null

From a989f6a6e590a37c1a5f74df8d908a866d73d260 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= <hecate+github@glitchbra.in>
Date: Thu, 20 Jul 2023 20:55:04 +0200
Subject: [PATCH 071/144] remove duplicates in the code

---
 .../Distribution/Solver/Modular/Solver.hs     | 871 +-----------------
 1 file changed, 38 insertions(+), 833 deletions(-)

diff --git a/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs b/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
index 599c76f7114..11f09f3e1bb 100644
--- a/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
+++ b/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
@@ -26,833 +26,42 @@ import UnitTests.Distribution.Solver.Modular.DSL
 import UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
 
 tests :: [TF.TestTree]
-tests =
-  [ testGroup
-      "Simple dependencies"
-      [ runTest $ mkTest db1 "alreadyInstalled" ["A"] (solverSuccess [])
-      , runTest $ mkTest db1 "installLatest" ["B"] (solverSuccess [("B", 2)])
-      , runTest $
-          preferOldest $
-            mkTest db1 "installOldest" ["B"] (solverSuccess [("B", 1)])
-      , runTest $ mkTest db1 "simpleDep1" ["C"] (solverSuccess [("B", 1), ("C", 1)])
-      , runTest $ mkTest db1 "simpleDep2" ["D"] (solverSuccess [("B", 2), ("D", 1)])
-      , runTest $ mkTest db1 "failTwoVersions" ["C", "D"] anySolverFailure
-      , runTest $ indep $ mkTest db1 "indepTwoVersions" ["C", "D"] (solverSuccess [("B", 1), ("B", 2), ("C", 1), ("D", 1)])
-      , runTest $ indep $ mkTest db1 "aliasWhenPossible1" ["C", "E"] (solverSuccess [("B", 1), ("C", 1), ("E", 1)])
-      , runTest $ indep $ mkTest db1 "aliasWhenPossible2" ["D", "E"] (solverSuccess [("B", 2), ("D", 1), ("E", 1)])
-      , runTest $ indep $ mkTest db2 "aliasWhenPossible3" ["C", "D"] (solverSuccess [("A", 1), ("A", 2), ("B", 1), ("B", 2), ("C", 1), ("D", 1)])
-      , runTest $ mkTest db1 "buildDepAgainstOld" ["F"] (solverSuccess [("B", 1), ("E", 1), ("F", 1)])
-      , runTest $ mkTest db1 "buildDepAgainstNew" ["G"] (solverSuccess [("B", 2), ("E", 1), ("G", 1)])
-      , runTest $ indep $ mkTest db1 "multipleInstances" ["F", "G"] anySolverFailure
-      , runTest $ mkTest db21 "unknownPackage1" ["A"] (solverSuccess [("A", 1), ("B", 1)])
-      , runTest $ mkTest db22 "unknownPackage2" ["A"] (solverFailure (isInfixOf "unknown package: C"))
-      , runTest $ mkTest db23 "unknownPackage3" ["A"] (solverFailure (isInfixOf "unknown package: B"))
-      , runTest $ mkTest [] "unknown target" ["A"] (solverFailure (isInfixOf "unknown package: A"))
-      ]
-  , testGroup
-      "Flagged dependencies"
-      [ runTest $ mkTest db3 "forceFlagOn" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
-      , runTest $ mkTest db3 "forceFlagOff" ["D"] (solverSuccess [("A", 2), ("B", 1), ("D", 1)])
-      , runTest $ indep $ mkTest db3 "linkFlags1" ["C", "D"] anySolverFailure
-      , runTest $ indep $ mkTest db4 "linkFlags2" ["C", "D"] anySolverFailure
-      , runTest $ indep $ mkTest db18 "linkFlags3" ["A", "B"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("D", 1), ("D", 2), ("F", 1)])
-      ]
-  , testGroup
-      "Lifting dependencies out of conditionals"
-      [ runTest $ commonDependencyLogMessage "common dependency log message"
-      , runTest $ twoLevelDeepCommonDependencyLogMessage "two level deep common dependency log message"
-      , runTest $ testBackjumpingWithCommonDependency "backjumping with common dependency"
-      ]
-  , testGroup
-      "Manual flags"
-      [ runTest $
-          mkTest dbManualFlags "Use default value for manual flag" ["pkg"] $
-            solverSuccess [("pkg", 1), ("true-dep", 1)]
-      , let checkFullLog =
-              any $ isInfixOf "rejecting: pkg:-flag (manual flag can only be changed explicitly)"
-         in runTest $
-              setVerbose $
-                constraints [ExVersionConstraint (ScopeAnyQualifier "true-dep") V.noVersion] $
-                  mkTest dbManualFlags "Don't toggle manual flag to avoid conflict" ["pkg"] $
-                    -- TODO: We should check the summarized log instead of the full log
-                    -- for the manual flags error message, but it currently only
-                    -- appears in the full log.
-                    SolverResult checkFullLog (Left $ const True)
-      , let cs = [ExFlagConstraint (ScopeAnyQualifier "pkg") "flag" False]
-         in runTest $
-              constraints cs $
-                mkTest dbManualFlags "Toggle manual flag with flag constraint" ["pkg"] $
-                  solverSuccess [("false-dep", 1), ("pkg", 1)]
-      ]
-  , testGroup
-      "Qualified manual flag constraints"
-      [ let name = "Top-level flag constraint does not constrain setup dep's flag"
-            cs = [ExFlagConstraint (ScopeQualified P.QualToplevel "B") "flag" False]
-         in runTest $
-              constraints cs $
-                mkTest dbSetupDepWithManualFlag name ["A"] $
-                  solverSuccess
-                    [ ("A", 1)
-                    , ("B", 1)
-                    , ("B", 2)
-                    , ("b-1-false-dep", 1)
-                    , ("b-2-true-dep", 1)
-                    ]
-      , let name = "Solver can toggle setup dep's flag to match top-level constraint"
-            cs =
-              [ ExFlagConstraint (ScopeQualified P.QualToplevel "B") "flag" False
-              , ExVersionConstraint (ScopeAnyQualifier "b-2-true-dep") V.noVersion
-              ]
-         in runTest $
-              constraints cs $
-                mkTest dbSetupDepWithManualFlag name ["A"] $
-                  solverSuccess
-                    [ ("A", 1)
-                    , ("B", 1)
-                    , ("B", 2)
-                    , ("b-1-false-dep", 1)
-                    , ("b-2-false-dep", 1)
-                    ]
-      , let name = "User can constrain flags separately with qualified constraints"
-            cs =
-              [ ExFlagConstraint (ScopeQualified P.QualToplevel "B") "flag" True
-              , ExFlagConstraint (ScopeQualified (P.QualSetup "A") "B") "flag" False
-              ]
-         in runTest $
-              constraints cs $
-                mkTest dbSetupDepWithManualFlag name ["A"] $
-                  solverSuccess
-                    [ ("A", 1)
-                    , ("B", 1)
-                    , ("B", 2)
-                    , ("b-1-true-dep", 1)
-                    , ("b-2-false-dep", 1)
-                    ]
-      , -- Regression test for #4299
-        let name = "Solver can link deps when only one has constrained manual flag"
-            cs = [ExFlagConstraint (ScopeQualified P.QualToplevel "B") "flag" False]
-         in runTest $
-              constraints cs $
-                mkTest dbLinkedSetupDepWithManualFlag name ["A"] $
-                  solverSuccess [("A", 1), ("B", 1), ("b-1-false-dep", 1)]
-      , let name = "Solver cannot link deps that have conflicting manual flag constraints"
-            cs =
-              [ ExFlagConstraint (ScopeQualified P.QualToplevel "B") "flag" True
-              , ExFlagConstraint (ScopeQualified (P.QualSetup "A") "B") "flag" False
-              ]
-            failureReason = "(constraint from unknown source requires opposite flag selection)"
-            checkFullLog lns =
-              all
-                (\msg -> any (msg `isInfixOf`) lns)
-                [ "rejecting: B:-flag " ++ failureReason
-                , "rejecting: A:setup.B:+flag " ++ failureReason
-                ]
-         in runTest $
-              constraints cs $
-                setVerbose $
-                  mkTest dbLinkedSetupDepWithManualFlag name ["A"] $
-                    SolverResult checkFullLog (Left $ const True)
-      ]
-  , testGroup
-      "Stanzas"
-      [ runTest $ enableAllTests $ mkTest db5 "simpleTest1" ["C"] (solverSuccess [("A", 2), ("C", 1)])
-      , runTest $ enableAllTests $ mkTest db5 "simpleTest2" ["D"] anySolverFailure
-      , runTest $ enableAllTests $ mkTest db5 "simpleTest3" ["E"] (solverSuccess [("A", 1), ("E", 1)])
-      , runTest $ enableAllTests $ mkTest db5 "simpleTest4" ["F"] anySolverFailure -- TODO
-      , runTest $ enableAllTests $ mkTest db5 "simpleTest5" ["G"] (solverSuccess [("A", 2), ("G", 1)])
-      , runTest $ enableAllTests $ mkTest db5 "simpleTest6" ["E", "G"] anySolverFailure
-      , runTest $ indep $ enableAllTests $ mkTest db5 "simpleTest7" ["E", "G"] (solverSuccess [("A", 1), ("A", 2), ("E", 1), ("G", 1)])
-      , runTest $ enableAllTests $ mkTest db6 "depsWithTests1" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
-      , runTest $ indep $ enableAllTests $ mkTest db6 "depsWithTests2" ["C", "D"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("D", 1)])
-      , runTest $ testTestSuiteWithFlag "test suite with flag"
-      ]
-  , testGroup
-      "Setup dependencies"
-      [ runTest $ mkTest db7 "setupDeps1" ["B"] (solverSuccess [("A", 2), ("B", 1)])
-      , runTest $ mkTest db7 "setupDeps2" ["C"] (solverSuccess [("A", 2), ("C", 1)])
-      , runTest $ mkTest db7 "setupDeps3" ["D"] (solverSuccess [("A", 1), ("D", 1)])
-      , runTest $ mkTest db7 "setupDeps4" ["E"] (solverSuccess [("A", 1), ("A", 2), ("E", 1)])
-      , runTest $ mkTest db7 "setupDeps5" ["F"] (solverSuccess [("A", 1), ("A", 2), ("F", 1)])
-      , runTest $ mkTest db8 "setupDeps6" ["C", "D"] (solverSuccess [("A", 1), ("B", 1), ("B", 2), ("C", 1), ("D", 1)])
-      , runTest $ mkTest db9 "setupDeps7" ["F", "G"] (solverSuccess [("A", 1), ("B", 1), ("B", 2), ("C", 1), ("D", 1), ("E", 1), ("E", 2), ("F", 1), ("G", 1)])
-      , runTest $ mkTest db10 "setupDeps8" ["C"] (solverSuccess [("C", 1)])
-      , runTest $ indep $ mkTest dbSetupDeps "setupDeps9" ["A", "B"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("D", 1), ("D", 2)])
-      ]
-  , testGroup
-      "Base shim"
-      [ runTest $ mkTest db11 "baseShim1" ["A"] (solverSuccess [("A", 1)])
-      , runTest $ mkTest db12 "baseShim2" ["A"] (solverSuccess [("A", 1)])
-      , runTest $ mkTest db12 "baseShim3" ["B"] (solverSuccess [("B", 1)])
-      , runTest $ mkTest db12 "baseShim4" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
-      , runTest $ mkTest db12 "baseShim5" ["D"] anySolverFailure
-      , runTest $ mkTest db12 "baseShim6" ["E"] (solverSuccess [("E", 1), ("syb", 2)])
-      ]
-  , testGroup
-      "Base and Nonupgradable"
-      [ runTest $
-          mkTest dbBase "Refuse to install base without --allow-boot-library-installs" ["base"] $
-            solverFailure (isInfixOf "only already installed instances can be used")
-      , runTest $
-          allowBootLibInstalls $
-            mkTest dbBase "Install base with --allow-boot-library-installs" ["base"] $
-              solverSuccess [("base", 1), ("ghc-prim", 1), ("integer-gmp", 1), ("integer-simple", 1)]
-      , runTest $
-          mkTest dbNonupgrade "Refuse to install newer ghc requested by another library" ["A"] $
-            solverFailure (isInfixOf "rejecting: ghc-2.0.0 (constraint from non-upgradeable package requires installed instance)")
-      ]
-  , testGroup
-      "reject-unconstrained"
-      [ runTest $
-          onlyConstrained $
-            mkTest db12 "missing syb" ["E"] $
-              solverFailure (isInfixOf "not a user-provided goal")
-      , runTest $
-          onlyConstrained $
-            mkTest db12 "all goals" ["E", "syb"] $
-              solverSuccess [("E", 1), ("syb", 2)]
-      , runTest $
-          onlyConstrained $
-            mkTest db17 "backtracking" ["A", "B"] $
-              solverSuccess [("A", 2), ("B", 1)]
-      , runTest $
-          onlyConstrained $
-            mkTest db17 "failure message" ["A"] $
-              solverFailure $
-                isInfixOf $
-                  "Could not resolve dependencies:\n"
-                    ++ "[__0] trying: A-3.0.0 (user goal)\n"
-                    ++ "[__1] next goal: C (dependency of A)\n"
-                    ++ "[__1] fail (not a user-provided goal nor mentioned as a constraint, "
-                    ++ "but reject-unconstrained-dependencies was set)\n"
-                    ++ "[__1] fail (backjumping, conflict set: A, C)\n"
-                    ++ "After searching the rest of the dependency tree exhaustively, "
-                    ++ "these were the goals I've had most trouble fulfilling: A, C, B"
-      ]
-  , testGroup
-      "Cycles"
-      [ runTest $ mkTest db14 "simpleCycle1" ["A"] anySolverFailure
-      , runTest $ mkTest db14 "simpleCycle2" ["A", "B"] anySolverFailure
-      , runTest $ mkTest db14 "cycleWithFlagChoice1" ["C"] (solverSuccess [("C", 1), ("E", 1)])
-      , runTest $ mkTest db15 "cycleThroughSetupDep1" ["A"] anySolverFailure
-      , runTest $ mkTest db15 "cycleThroughSetupDep2" ["B"] anySolverFailure
-      , runTest $ mkTest db15 "cycleThroughSetupDep3" ["C"] (solverSuccess [("C", 2), ("D", 1)])
-      , runTest $ mkTest db15 "cycleThroughSetupDep4" ["D"] (solverSuccess [("D", 1)])
-      , runTest $ mkTest db15 "cycleThroughSetupDep5" ["E"] (solverSuccess [("C", 2), ("D", 1), ("E", 1)])
-      , runTest $ issue4161 "detect cycle between package and its setup script"
-      , runTest $ testCyclicDependencyErrorMessages "cyclic dependency error messages"
-      ]
-  , testGroup
-      "Extensions"
-      [ runTest $ mkTestExts [EnableExtension CPP] dbExts1 "unsupported" ["A"] anySolverFailure
-      , runTest $ mkTestExts [EnableExtension CPP] dbExts1 "unsupportedIndirect" ["B"] anySolverFailure
-      , runTest $ mkTestExts [EnableExtension RankNTypes] dbExts1 "supported" ["A"] (solverSuccess [("A", 1)])
-      , runTest $ mkTestExts (map EnableExtension [CPP, RankNTypes]) dbExts1 "supportedIndirect" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
-      , runTest $ mkTestExts [EnableExtension CPP] dbExts1 "disabledExtension" ["D"] anySolverFailure
-      , runTest $ mkTestExts (map EnableExtension [CPP, RankNTypes]) dbExts1 "disabledExtension" ["D"] anySolverFailure
-      , runTest $ mkTestExts (UnknownExtension "custom" : map EnableExtension [CPP, RankNTypes]) dbExts1 "supportedUnknown" ["E"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("E", 1)])
-      ]
-  , testGroup
-      "Languages"
-      [ runTest $ mkTestLangs [Haskell98] dbLangs1 "unsupported" ["A"] anySolverFailure
-      , runTest $ mkTestLangs [Haskell98, Haskell2010] dbLangs1 "supported" ["A"] (solverSuccess [("A", 1)])
-      , runTest $ mkTestLangs [Haskell98] dbLangs1 "unsupportedIndirect" ["B"] anySolverFailure
-      , runTest $ mkTestLangs [Haskell98, Haskell2010, UnknownLanguage "Haskell3000"] dbLangs1 "supportedUnknown" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
-      ]
-  , testGroup
-      "Qualified Package Constraints"
-      [ runTest $
-          mkTest dbConstraints "install latest versions without constraints" ["A", "B", "C"] $
-            solverSuccess [("A", 7), ("B", 8), ("C", 9), ("D", 7), ("D", 8), ("D", 9)]
-      , let cs = [ExVersionConstraint (ScopeAnyQualifier "D") $ mkVersionRange 1 4]
-         in runTest $
-              constraints cs $
-                mkTest dbConstraints "force older versions with unqualified constraint" ["A", "B", "C"] $
-                  solverSuccess [("A", 1), ("B", 2), ("C", 3), ("D", 1), ("D", 2), ("D", 3)]
-      , let cs =
-              [ ExVersionConstraint (ScopeQualified P.QualToplevel "D") $ mkVersionRange 1 4
-              , ExVersionConstraint (ScopeQualified (P.QualSetup "B") "D") $ mkVersionRange 4 7
-              ]
-         in runTest $
-              constraints cs $
-                mkTest dbConstraints "force multiple versions with qualified constraints" ["A", "B", "C"] $
-                  solverSuccess [("A", 1), ("B", 5), ("C", 9), ("D", 1), ("D", 5), ("D", 9)]
-      , let cs = [ExVersionConstraint (ScopeAnySetupQualifier "D") $ mkVersionRange 1 4]
-         in runTest $
-              constraints cs $
-                mkTest dbConstraints "constrain package across setup scripts" ["A", "B", "C"] $
-                  solverSuccess [("A", 7), ("B", 2), ("C", 3), ("D", 2), ("D", 3), ("D", 7)]
-      ]
-  , testGroup
-      "Package Preferences"
-      [ runTest $ preferences [ExPkgPref "A" $ mkvrThis 1] $ mkTest db13 "selectPreferredVersionSimple" ["A"] (solverSuccess [("A", 1)])
-      , runTest $ preferences [ExPkgPref "A" $ mkvrOrEarlier 2] $ mkTest db13 "selectPreferredVersionSimple2" ["A"] (solverSuccess [("A", 2)])
-      , runTest
-          $ preferences
-            [ ExPkgPref "A" $ mkvrOrEarlier 2
-            , ExPkgPref "A" $ mkvrOrEarlier 1
-            ]
-          $ mkTest db13 "selectPreferredVersionMultiple" ["A"] (solverSuccess [("A", 1)])
-      , runTest
-          $ preferences
-            [ ExPkgPref "A" $ mkvrOrEarlier 1
-            , ExPkgPref "A" $ mkvrOrEarlier 2
-            ]
-          $ mkTest db13 "selectPreferredVersionMultiple2" ["A"] (solverSuccess [("A", 1)])
-      , runTest
-          $ preferences
-            [ ExPkgPref "A" $ mkvrThis 1
-            , ExPkgPref "A" $ mkvrThis 2
-            ]
-          $ mkTest db13 "selectPreferredVersionMultiple3" ["A"] (solverSuccess [("A", 2)])
-      , runTest
-          $ preferences
-            [ ExPkgPref "A" $ mkvrThis 1
-            , ExPkgPref "A" $ mkvrOrEarlier 2
-            ]
-          $ mkTest db13 "selectPreferredVersionMultiple4" ["A"] (solverSuccess [("A", 1)])
-      ]
-  , testGroup
-      "Stanza Preferences"
-      [ runTest $
-          mkTest dbStanzaPreferences1 "disable tests by default" ["pkg"] $
-            solverSuccess [("pkg", 1)]
-      , runTest $
-          preferences [ExStanzaPref "pkg" [TestStanzas]] $
-            mkTest dbStanzaPreferences1 "enable tests with testing preference" ["pkg"] $
-              solverSuccess [("pkg", 1), ("test-dep", 1)]
-      , runTest $
-          preferences [ExStanzaPref "pkg" [TestStanzas]] $
-            mkTest dbStanzaPreferences2 "disable testing when it's not possible" ["pkg"] $
-              solverSuccess [("pkg", 1)]
-      , testStanzaPreference "test stanza preference"
-      ]
-  , testGroup
-      "Buildable Field"
-      [ testBuildable "avoid building component with unknown dependency" (ExAny "unknown")
-      , testBuildable "avoid building component with unknown extension" (ExExt (UnknownExtension "unknown"))
-      , testBuildable "avoid building component with unknown language" (ExLang (UnknownLanguage "unknown"))
-      , runTest $ mkTest dbBuildable1 "choose flags that set buildable to false" ["pkg"] (solverSuccess [("flag1-false", 1), ("flag2-true", 1), ("pkg", 1)])
-      , runTest $ mkTest dbBuildable2 "choose version that sets buildable to false" ["A"] (solverSuccess [("A", 1), ("B", 2)])
-      ]
-  , testGroup
-      "Pkg-config dependencies"
-      [ runTest $ mkTestPCDepends (Just []) dbPC1 "noPkgs" ["A"] anySolverFailure
-      , runTest $ mkTestPCDepends (Just [("pkgA", "0")]) dbPC1 "tooOld" ["A"] anySolverFailure
-      , runTest $ mkTestPCDepends (Just [("pkgA", "1.0.0"), ("pkgB", "1.0.0")]) dbPC1 "pruneNotFound" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
-      , runTest $ mkTestPCDepends (Just [("pkgA", "1.0.0"), ("pkgB", "2.0.0")]) dbPC1 "chooseNewest" ["C"] (solverSuccess [("A", 1), ("B", 2), ("C", 1)])
-      , runTest $ mkTestPCDepends Nothing dbPC1 "noPkgConfigFailure" ["A"] anySolverFailure
-      , runTest $ mkTestPCDepends Nothing dbPC1 "noPkgConfigSuccess" ["D"] (solverSuccess [("D", 1)])
-      ]
-  , testGroup
-      "Independent goals"
-      [ runTest $ indep $ mkTest db16 "indepGoals1" ["A", "B"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("D", 1), ("D", 2), ("E", 1)])
-      , runTest $ testIndepGoals2 "indepGoals2"
-      , runTest $ testIndepGoals3 "indepGoals3"
-      , runTest $ testIndepGoals4 "indepGoals4"
-      , runTest $ testIndepGoals5 "indepGoals5 - fixed goal order" FixedGoalOrder
-      , runTest $ testIndepGoals5 "indepGoals5 - default goal order" DefaultGoalOrder
-      , runTest $ testIndepGoals6 "indepGoals6 - fixed goal order" FixedGoalOrder
-      , runTest $ testIndepGoals6 "indepGoals6 - default goal order" DefaultGoalOrder
-      ]
-  , -- Tests designed for the backjumping blog post
-    testGroup
-      "Backjumping"
-      [ runTest $ mkTest dbBJ1a "bj1a" ["A"] (solverSuccess [("A", 1), ("B", 1)])
-      , runTest $ mkTest dbBJ1b "bj1b" ["A"] (solverSuccess [("A", 1), ("B", 1)])
-      , runTest $ mkTest dbBJ1c "bj1c" ["A"] (solverSuccess [("A", 1), ("B", 1)])
-      , runTest $ mkTest dbBJ2 "bj2" ["A"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
-      , runTest $ mkTest dbBJ3 "bj3" ["A"] (solverSuccess [("A", 1), ("Ba", 1), ("C", 1)])
-      , runTest $ mkTest dbBJ4 "bj4" ["A"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
-      , runTest $ mkTest dbBJ5 "bj5" ["A"] (solverSuccess [("A", 1), ("B", 1), ("D", 1)])
-      , runTest $ mkTest dbBJ6 "bj6" ["A"] (solverSuccess [("A", 1), ("B", 1)])
-      , runTest $ mkTest dbBJ7 "bj7" ["A"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
-      , runTest $ indep $ mkTest dbBJ8 "bj8" ["A", "B"] (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
-      ]
-  , testGroup
-      "main library dependencies"
-      [ let db = [Right $ exAvNoLibrary "A" 1 `withExe` exExe "exe" []]
-         in runTest $
-              mkTest db "install build target without a library" ["A"] $
-                solverSuccess [("A", 1)]
-      , let db =
-              [ Right $ exAv "A" 1 [ExAny "B"]
-              , Right $ exAvNoLibrary "B" 1 `withExe` exExe "exe" []
-              ]
-         in runTest $
-              mkTest db "reject build-depends dependency with no library" ["A"] $
-                solverFailure (isInfixOf "rejecting: B-1.0.0 (does not contain library, which is required by A)")
-      , let exe = exExe "exe" []
-            db =
-              [ Right $ exAv "A" 1 [ExAny "B"]
-              , Right $ exAvNoLibrary "B" 2 `withExe` exe
-              , Right $ exAv "B" 1 [] `withExe` exe
-              ]
-         in runTest $
-              mkTest db "choose version of build-depends dependency that has a library" ["A"] $
-                solverSuccess [("A", 1), ("B", 1)]
-      ]
-  , testGroup
-      "sub-library dependencies"
-      [ let db =
-              [ Right $ exAv "A" 1 [ExSubLibAny "B" "sub-lib"]
-              , Right $ exAv "B" 1 []
-              ]
-         in runTest $
-              mkTest db "reject package that is missing required sub-library" ["A"] $
-                solverFailure $
-                  isInfixOf $
-                    "rejecting: B-1.0.0 (does not contain library 'sub-lib', which is required by A)"
-      , let db =
-              [ Right $ exAv "A" 1 [ExSubLibAny "B" "sub-lib"]
-              , Right $ exAvNoLibrary "B" 1 `withSubLibrary` exSubLib "sub-lib" []
-              ]
-         in runTest $
-              mkTest db "reject package with private but required sub-library" ["A"] $
-                solverFailure $
-                  isInfixOf $
-                    "rejecting: B-1.0.0 (library 'sub-lib' is private, but it is required by A)"
-      , let db =
-              [ Right $ exAv "A" 1 [ExSubLibAny "B" "sub-lib"]
-              , Right $
-                  exAvNoLibrary "B" 1
-                    `withSubLibrary` exSubLib "sub-lib" [ExFlagged "make-lib-private" (dependencies []) publicDependencies]
-              ]
-         in runTest $
-              constraints [ExFlagConstraint (ScopeAnyQualifier "B") "make-lib-private" True] $
-                mkTest db "reject package with sub-library made private by flag constraint" ["A"] $
-                  solverFailure $
-                    isInfixOf $
-                      "rejecting: B-1.0.0 (library 'sub-lib' is private, but it is required by A)"
-      , let db =
-              [ Right $ exAv "A" 1 [ExSubLibAny "B" "sub-lib"]
-              , Right $
-                  exAvNoLibrary "B" 1
-                    `withSubLibrary` exSubLib "sub-lib" [ExFlagged "make-lib-private" (dependencies []) publicDependencies]
-              ]
-         in runTest $
-              mkTest db "treat sub-library as visible even though flag choice could make it private" ["A"] $
-                solverSuccess [("A", 1), ("B", 1)]
-      , let db =
-              [ Right $ exAv "A" 1 [ExAny "B"]
-              , Right $ exAv "B" 1 [] `withSubLibrary` exSubLib "sub-lib" []
-              , Right $ exAv "C" 1 [ExSubLibAny "B" "sub-lib"]
-              ]
-            goals :: [ExampleVar]
-            goals =
-              [ P QualNone "A"
-              , P QualNone "B"
-              , P QualNone "C"
-              ]
-         in runTest $
-              goalOrder goals $
-                mkTest db "reject package that requires a private sub-library" ["A", "C"] $
-                  solverFailure $
-                    isInfixOf $
-                      "rejecting: C-1.0.0 (requires library 'sub-lib' from B, but the component is private)"
-      , let db =
-              [ Right $ exAv "A" 1 [ExSubLibAny "B" "sub-lib-v1"]
-              , Right $ exAv "B" 2 [] `withSubLibrary` ExSubLib "sub-lib-v2" publicDependencies
-              , Right $ exAv "B" 1 [] `withSubLibrary` ExSubLib "sub-lib-v1" publicDependencies
-              ]
-         in runTest $
-              mkTest db "choose version of package containing correct sub-library" ["A"] $
-                solverSuccess [("A", 1), ("B", 1)]
-      , let db =
-              [ Right $ exAv "A" 1 [ExSubLibAny "B" "sub-lib"]
-              , Right $ exAv "B" 2 [] `withSubLibrary` ExSubLib "sub-lib" (dependencies [])
-              , Right $ exAv "B" 1 [] `withSubLibrary` ExSubLib "sub-lib" publicDependencies
-              ]
-         in runTest $
-              mkTest db "choose version of package with public sub-library" ["A"] $
-                solverSuccess [("A", 1), ("B", 1)]
-      ]
-  , -- build-tool-depends dependencies
-    testGroup
-      "build-tool-depends"
-      [ runTest $ mkTest dbBuildTools "simple exe dependency" ["A"] (solverSuccess [("A", 1), ("bt-pkg", 2)])
-      , runTest $
-          disableSolveExecutables $
-            mkTest dbBuildTools "don't install build tool packages in legacy mode" ["A"] (solverSuccess [("A", 1)])
-      , runTest $ mkTest dbBuildTools "flagged exe dependency" ["B"] (solverSuccess [("B", 1), ("bt-pkg", 2)])
-      , runTest $
-          enableAllTests $
-            mkTest dbBuildTools "test suite exe dependency" ["C"] (solverSuccess [("C", 1), ("bt-pkg", 2)])
-      , runTest $
-          mkTest dbBuildTools "unknown exe" ["D"] $
-            solverFailure (isInfixOf "does not contain executable 'unknown-exe', which is required by D")
-      , runTest $
-          disableSolveExecutables $
-            mkTest dbBuildTools "don't check for build tool executables in legacy mode" ["D"] $
-              solverSuccess [("D", 1)]
-      , runTest $
-          mkTest dbBuildTools "unknown build tools package error mentions package, not exe" ["E"] $
-            solverFailure (isInfixOf "unknown package: E:unknown-pkg:exe.unknown-pkg (dependency of E)")
-      , runTest $
-          mkTest dbBuildTools "unknown flagged exe" ["F"] $
-            solverFailure (isInfixOf "does not contain executable 'unknown-exe', which is required by F +flagF")
-      , runTest $
-          enableAllTests $
-            mkTest dbBuildTools "unknown test suite exe" ["G"] $
-              solverFailure (isInfixOf "does not contain executable 'unknown-exe', which is required by G *test")
-      , runTest $
-          mkTest dbBuildTools "wrong exe for build tool package version" ["H"] $
-            solverFailure $
-              isInfixOf $
-                -- The solver reports the version conflict when a version conflict
-                -- and an executable conflict apply to the same package version.
-                "[__1] rejecting: H:bt-pkg:exe.bt-pkg-4.0.0 (conflict: H => H:bt-pkg:exe.bt-pkg (exe exe1)==3.0.0)\n"
-                  ++ "[__1] rejecting: H:bt-pkg:exe.bt-pkg-3.0.0 (does not contain executable 'exe1', which is required by H)\n"
-                  ++ "[__1] rejecting: H:bt-pkg:exe.bt-pkg-2.0.0 (conflict: H => H:bt-pkg:exe.bt-pkg (exe exe1)==3.0.0)"
-      , runTest $ chooseExeAfterBuildToolsPackage True "choose exe after choosing its package - success"
-      , runTest $ chooseExeAfterBuildToolsPackage False "choose exe after choosing its package - failure"
-      , runTest $ rejectInstalledBuildToolPackage "reject installed package for build-tool dependency"
-      , runTest $ requireConsistentBuildToolVersions "build tool versions must be consistent within one package"
-      ]
-  , -- build-tools dependencies
-    testGroup
-      "legacy build-tools"
-      [ runTest $ mkTest dbLegacyBuildTools1 "bt1" ["A"] (solverSuccess [("A", 1), ("alex", 1)])
-      , runTest $
-          disableSolveExecutables $
-            mkTest dbLegacyBuildTools1 "bt1 - don't install build tool packages in legacy mode" ["A"] (solverSuccess [("A", 1)])
-      , runTest $
-          mkTest dbLegacyBuildTools2 "bt2" ["A"] $
-            solverFailure (isInfixOf "does not contain executable 'alex', which is required by A")
-      , runTest $
-          disableSolveExecutables $
-            mkTest dbLegacyBuildTools2 "bt2 - don't check for build tool executables in legacy mode" ["A"] (solverSuccess [("A", 1)])
-      , runTest $ mkTest dbLegacyBuildTools3 "bt3" ["A"] (solverSuccess [("A", 1)])
-      , runTest $ mkTest dbLegacyBuildTools4 "bt4" ["C"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("alex", 1), ("alex", 2)])
-      , runTest $ mkTest dbLegacyBuildTools5 "bt5" ["B"] (solverSuccess [("A", 1), ("A", 2), ("B", 1), ("alex", 1)])
-      , runTest $ mkTest dbLegacyBuildTools6 "bt6" ["A"] (solverSuccess [("A", 1), ("alex", 1), ("happy", 1)])
-      ]
-  , -- internal dependencies
-    testGroup
-      "internal dependencies"
-      [ runTest $ mkTest dbIssue3775 "issue #3775" ["B"] (solverSuccess [("A", 2), ("B", 2), ("warp", 1)])
-      ]
-  , -- tests for partial fix for issue #5325
-    testGroup "Components that are unbuildable in the current environment" $
-      let flagConstraint = ExFlagConstraint . ScopeAnyQualifier
-       in [ let db = [Right $ exAv "A" 1 [ExFlagged "build-lib" (dependencies []) unbuildableDependencies]]
-             in runTest $
-                  constraints [flagConstraint "A" "build-lib" False] $
-                    mkTest db "install unbuildable library" ["A"] $
-                      solverSuccess [("A", 1)]
-          , let db =
-                  [ Right $
-                      exAvNoLibrary "A" 1
-                        `withExe` exExe "exe" [ExFlagged "build-exe" (dependencies []) unbuildableDependencies]
-                  ]
-             in runTest $
-                  constraints [flagConstraint "A" "build-exe" False] $
-                    mkTest db "install unbuildable exe" ["A"] $
-                      solverSuccess [("A", 1)]
-          , let db =
-                  [ Right $ exAv "A" 1 [ExAny "B"]
-                  , Right $ exAv "B" 1 [ExFlagged "build-lib" (dependencies []) unbuildableDependencies]
-                  ]
-             in runTest $
-                  constraints [flagConstraint "B" "build-lib" False] $
-                    mkTest db "reject library dependency with unbuildable library" ["A"] $
-                      solverFailure $
-                        isInfixOf $
-                          "rejecting: B-1.0.0 (library is not buildable in the "
-                            ++ "current environment, but it is required by A)"
-          , let db =
-                  [ Right $ exAv "A" 1 [ExBuildToolAny "B" "bt"]
-                  , Right $
-                      exAv "B" 1 [ExFlagged "build-lib" (dependencies []) unbuildableDependencies]
-                        `withExe` exExe "bt" []
-                  ]
-             in runTest $
-                  constraints [flagConstraint "B" "build-lib" False] $
-                    mkTest db "allow build-tool dependency with unbuildable library" ["A"] $
-                      solverSuccess [("A", 1), ("B", 1)]
-          , let db =
-                  [ Right $ exAv "A" 1 [ExBuildToolAny "B" "bt"]
-                  , Right $
-                      exAv "B" 1 []
-                        `withExe` exExe "bt" [ExFlagged "build-exe" (dependencies []) unbuildableDependencies]
-                  ]
-             in runTest $
-                  constraints [flagConstraint "B" "build-exe" False] $
-                    mkTest db "reject build-tool dependency with unbuildable exe" ["A"] $
-                      solverFailure $
-                        isInfixOf $
-                          "rejecting: A:B:exe.B-1.0.0 (executable 'bt' is not "
-                            ++ "buildable in the current environment, but it is required by A)"
-          , runTest $
-              chooseUnbuildableExeAfterBuildToolsPackage
-                "choose unbuildable exe after choosing its package"
-          ]
-  , testGroup
-      "--fine-grained-conflicts"
-      [ -- Skipping a version because of a problematic dependency:
-        --
-        -- When the solver explores A-4, it finds that it cannot satisfy B's
-        -- dependencies. This allows the solver to skip the subsequent
-        -- versions of A that also depend on B.
-        runTest $
-          let db =
-                [ Right $ exAv "A" 4 [ExAny "B"]
-                , Right $ exAv "A" 3 [ExAny "B"]
-                , Right $ exAv "A" 2 [ExAny "B"]
-                , Right $ exAv "A" 1 []
-                , Right $ exAv "B" 2 [ExAny "unknown1"]
-                , Right $ exAv "B" 1 [ExAny "unknown2"]
-                ]
-              msg =
-                [ "[__0] trying: A-4.0.0 (user goal)"
-                , "[__1] trying: B-2.0.0 (dependency of A)"
-                , "[__2] unknown package: unknown1 (dependency of B)"
-                , "[__2] fail (backjumping, conflict set: B, unknown1)"
-                , "[__1] trying: B-1.0.0"
-                , "[__2] unknown package: unknown2 (dependency of B)"
-                , "[__2] fail (backjumping, conflict set: B, unknown2)"
-                , "[__1] fail (backjumping, conflict set: A, B, unknown1, unknown2)"
-                , "[__0] skipping: A-3.0.0, A-2.0.0 (has the same characteristics that "
-                    ++ "caused the previous version to fail: depends on 'B')"
-                , "[__0] trying: A-1.0.0"
-                , "[__1] done"
-                ]
-           in setVerbose $
-                mkTest db "skip version due to problematic dependency" ["A"] $
-                  SolverResult (isInfixOf msg) $
-                    Right [("A", 1)]
-      , -- Skipping a version because of a restrictive constraint on a
-        -- dependency:
-        --
-        -- The solver rejects A-4 because its constraint on B excludes B-1.
-        -- Then the solver is able to skip A-3 and A-2 because they also
-        -- exclude B-1, even though they don't have the exact same constraints
-        -- on B.
-        runTest $
-          let db =
-                [ Right $ exAv "A" 4 [ExFix "B" 14]
-                , Right $ exAv "A" 3 [ExFix "B" 13]
-                , Right $ exAv "A" 2 [ExFix "B" 12]
-                , Right $ exAv "A" 1 [ExFix "B" 11]
-                , Right $ exAv "B" 11 []
-                ]
-              msg =
-                [ "[__0] trying: A-4.0.0 (user goal)"
-                , "[__1] next goal: B (dependency of A)"
-                , "[__1] rejecting: B-11.0.0 (conflict: A => B==14.0.0)"
-                , "[__1] fail (backjumping, conflict set: A, B)"
-                , "[__0] skipping: A-3.0.0, A-2.0.0 (has the same characteristics that "
-                    ++ "caused the previous version to fail: depends on 'B' but excludes "
-                    ++ "version 11.0.0)"
-                , "[__0] trying: A-1.0.0"
-                , "[__1] next goal: B (dependency of A)"
-                , "[__1] trying: B-11.0.0"
-                , "[__2] done"
-                ]
-           in setVerbose $
-                mkTest db "skip version due to restrictive constraint on its dependency" ["A"] $
-                  SolverResult (isInfixOf msg) $
-                    Right [("A", 1), ("B", 11)]
-      , -- This test tests the case where the solver chooses a version for one
-        -- package, B, before choosing a version for one of its reverse
-        -- dependencies, C. While the solver is exploring the subtree rooted
-        -- at B-3, it finds that C-2's dependency on B conflicts with B-3.
-        -- Then the solver is able to skip C-1, because it also excludes B-3.
-        --
-        -- --fine-grained-conflicts could have a benefit in this case even
-        -- though the solver would have found the conflict between B-3 and C-1
-        -- immediately after trying C-1 anyway. It prevents C-1 from
-        -- introducing any other conflicts which could increase the size of
-        -- the conflict set.
-        runTest $
-          let db =
-                [ Right $ exAv "A" 1 [ExAny "B", ExAny "C"]
-                , Right $ exAv "B" 3 []
-                , Right $ exAv "B" 2 []
-                , Right $ exAv "B" 1 []
-                , Right $ exAv "C" 2 [ExFix "B" 2]
-                , Right $ exAv "C" 1 [ExFix "B" 1]
-                ]
-              goals = [P QualNone pkg | pkg <- ["A", "B", "C"]]
-              expectedMsg =
-                [ "[__0] trying: A-1.0.0 (user goal)"
-                , "[__1] trying: B-3.0.0 (dependency of A)"
-                , "[__2] next goal: C (dependency of A)"
-                , "[__2] rejecting: C-2.0.0 (conflict: B==3.0.0, C => B==2.0.0)"
-                , "[__2] skipping: C-1.0.0 (has the same characteristics that caused the "
-                    ++ "previous version to fail: excludes 'B' version 3.0.0)"
-                , "[__2] fail (backjumping, conflict set: A, B, C)"
-                , "[__1] trying: B-2.0.0"
-                , "[__2] next goal: C (dependency of A)"
-                , "[__2] trying: C-2.0.0"
-                , "[__3] done"
-                ]
-           in setVerbose $
-                goalOrder goals $
-                  mkTest db "skip version that excludes dependency that was already chosen" ["A"] $
-                    SolverResult (isInfixOf expectedMsg) $
-                      Right [("A", 1), ("B", 2), ("C", 2)]
-      , -- This test tests how the solver merges conflicts when it has
-        -- multiple reasons to add a variable to the conflict set. In this
-        -- case, package A conflicts with B and C. The solver should take the
-        -- union of the conflicts and then only skip a version if it does not
-        -- resolve any of the conflicts.
-        --
-        -- The solver rejects A-3 because it can't find consistent versions for
-        -- its two dependencies, B and C. Then it skips A-2 because A-2 also
-        -- depends on B and C. This test ensures that the solver considers
-        -- A-1 even though A-1 only resolves one of the conflicts (A-1 removes
-        -- the dependency on C).
-        runTest $
-          let db =
-                [ Right $ exAv "A" 3 [ExAny "B", ExAny "C"]
-                , Right $ exAv "A" 2 [ExAny "B", ExAny "C"]
-                , Right $ exAv "A" 1 [ExAny "B"]
-                , Right $ exAv "B" 1 [ExFix "D" 1]
-                , Right $ exAv "C" 1 [ExFix "D" 2]
-                , Right $ exAv "D" 1 []
-                , Right $ exAv "D" 2 []
-                ]
-              goals = [P QualNone pkg | pkg <- ["A", "B", "C", "D"]]
-              msg =
-                [ "[__0] trying: A-3.0.0 (user goal)"
-                , "[__1] trying: B-1.0.0 (dependency of A)"
-                , "[__2] trying: C-1.0.0 (dependency of A)"
-                , "[__3] next goal: D (dependency of B)"
-                , "[__3] rejecting: D-2.0.0 (conflict: B => D==1.0.0)"
-                , "[__3] rejecting: D-1.0.0 (conflict: C => D==2.0.0)"
-                , "[__3] fail (backjumping, conflict set: B, C, D)"
-                , "[__2] fail (backjumping, conflict set: A, B, C, D)"
-                , "[__1] fail (backjumping, conflict set: A, B, C, D)"
-                , "[__0] skipping: A-2.0.0 (has the same characteristics that caused the "
-                    ++ "previous version to fail: depends on 'B'; depends on 'C')"
-                , "[__0] trying: A-1.0.0"
-                , "[__1] trying: B-1.0.0 (dependency of A)"
-                , "[__2] next goal: D (dependency of B)"
-                , "[__2] rejecting: D-2.0.0 (conflict: B => D==1.0.0)"
-                , "[__2] trying: D-1.0.0"
-                , "[__3] done"
-                ]
-           in setVerbose $
-                goalOrder goals $
-                  mkTest db "only skip a version if it resolves none of the previous conflicts" ["A"] $
-                    SolverResult (isInfixOf msg) $
-                      Right [("A", 1), ("B", 1), ("D", 1)]
-      , -- This test ensures that the solver log doesn't show all conflicts
-        -- that the solver encountered in a subtree. The solver should only
-        -- show the conflicts that are contained in the current conflict set.
-        --
-        -- The goal order forces the solver to try A-4, encounter a conflict
-        -- with B-2, try B-1, and then try C. A-4 conflicts with the only
-        -- version of C, so the solver backjumps with a conflict set of
-        -- {A, C}. When the solver skips the next version of A, the log should
-        -- mention the conflict with C but not B.
-        runTest $
-          let db =
-                [ Right $ exAv "A" 4 [ExFix "B" 1, ExFix "C" 1]
-                , Right $ exAv "A" 3 [ExFix "B" 1, ExFix "C" 1]
-                , Right $ exAv "A" 2 [ExFix "C" 1]
-                , Right $ exAv "A" 1 [ExFix "C" 2]
-                , Right $ exAv "B" 2 []
-                , Right $ exAv "B" 1 []
-                , Right $ exAv "C" 2 []
-                ]
-              goals = [P QualNone pkg | pkg <- ["A", "B", "C"]]
-              msg =
-                [ "[__0] trying: A-4.0.0 (user goal)"
-                , "[__1] next goal: B (dependency of A)"
-                , "[__1] rejecting: B-2.0.0 (conflict: A => B==1.0.0)"
-                , "[__1] trying: B-1.0.0"
-                , "[__2] next goal: C (dependency of A)"
-                , "[__2] rejecting: C-2.0.0 (conflict: A => C==1.0.0)"
-                , "[__2] fail (backjumping, conflict set: A, C)"
-                , "[__0] skipping: A-3.0.0, A-2.0.0 (has the same characteristics that caused the "
-                    ++ "previous version to fail: depends on 'C' but excludes version 2.0.0)"
-                , "[__0] trying: A-1.0.0"
-                , "[__1] next goal: C (dependency of A)"
-                , "[__1] trying: C-2.0.0"
-                , "[__2] done"
-                ]
-           in setVerbose $
-                goalOrder goals $
-                  mkTest db "don't show conflicts that aren't part of the conflict set" ["A"] $
-                    SolverResult (isInfixOf msg) $
-                      Right [("A", 1), ("C", 2)]
-      , -- Tests that the conflict set is properly updated when a version is
-        -- skipped due to being excluded by one of its reverse dependencies'
-        -- constraints.
-        runTest $
-          let db =
-                [ Right $ exAv "A" 2 [ExFix "B" 3]
-                , Right $ exAv "A" 1 [ExFix "B" 1]
-                , Right $ exAv "B" 2 []
-                , Right $ exAv "B" 1 []
-                ]
-              msg =
-                [ "[__0] trying: A-2.0.0 (user goal)"
-                , "[__1] next goal: B (dependency of A)"
-                , -- During this step, the solver adds A and B to the
-                  -- conflict set, with the details of each package's
-                  -- conflict:
-                  --
-                  -- A: A's constraint rejected B-2.
-                  -- B: B was rejected by A's B==3 constraint
-                  "[__1] rejecting: B-2.0.0 (conflict: A => B==3.0.0)"
-                , -- When the solver skips B-1, it cannot simply reuse the
-                  -- previous conflict set. It also needs to update A's
-                  -- entry to say that A also rejected B-1. Otherwise, the
-                  -- solver wouldn't know that A-1 could resolve one of
-                  -- the conflicts encountered while exploring A-2. The
-                  -- solver would skip A-1, even though it leads to the
-                  -- solution.
-                  "[__1] skipping: B-1.0.0 (has the same characteristics that caused "
-                    ++ "the previous version to fail: excluded by constraint '==3.0.0' from 'A')"
-                , "[__1] fail (backjumping, conflict set: A, B)"
-                , "[__0] trying: A-1.0.0"
-                , "[__1] next goal: B (dependency of A)"
-                , "[__1] rejecting: B-2.0.0 (conflict: A => B==1.0.0)"
-                , "[__1] trying: B-1.0.0"
-                , "[__2] done"
-                ]
-           in setVerbose $
-                mkTest db "update conflict set after skipping version - 1" ["A"] $
-                  SolverResult (isInfixOf msg) $
-                    Right [("A", 1), ("B", 1)]
-      , -- Tests that the conflict set is properly updated when a version is
-        -- skipped due to excluding a version of one of its dependencies.
-        -- This test is similar the previous one, with the goal order reversed.
-        runTest $
-          let db =
-                [ Right $ exAv "A" 2 []
-                , Right $ exAv "A" 1 []
-                , Right $ exAv "B" 2 [ExFix "A" 3]
-                , Right $ exAv "B" 1 [ExFix "A" 1]
-                ]
-              goals = [P QualNone pkg | pkg <- ["A", "B"]]
-              msg =
-                [ "[__0] trying: A-2.0.0 (user goal)"
-                , "[__1] next goal: B (user goal)"
-                , "[__1] rejecting: B-2.0.0 (conflict: A==2.0.0, B => A==3.0.0)"
-                , "[__1] skipping: B-1.0.0 (has the same characteristics that caused "
-                    ++ "the previous version to fail: excludes 'A' version 2.0.0)"
-                , "[__1] fail (backjumping, conflict set: A, B)"
-                , "[__0] trying: A-1.0.0"
-                , "[__1] next goal: B (user goal)"
-                , "[__1] rejecting: B-2.0.0 (conflict: A==1.0.0, B => A==3.0.0)"
-                , "[__1] trying: B-1.0.0"
-                , "[__2] done"
-                ]
-           in setVerbose $
-                goalOrder goals $
-                  mkTest db "update conflict set after skipping version - 2" ["A", "B"] $
-                    SolverResult (isInfixOf msg) $
-                      Right [("A", 1), ("B", 1)]
-      ]
-  , -- Tests for the contents of the solver's log
-    testGroup
-      "Solver log"
-      [ -- See issue #3203. The solver should only choose a version for A once.
-        runTest $
-          let db = [Right $ exAv "A" 1 []]
+tests = [
+      testGroup "Simple dependencies" [
+          runTest $         mkTest db1 "alreadyInstalled"   ["A"]      (solverSuccess [])
+        , runTest $         mkTest db1 "installLatest"      ["B"]      (solverSuccess [("B", 2)])
+        , runTest $ preferOldest
+                  $         mkTest db1 "installOldest"      ["B"]      (solverSuccess [("B", 1)])
+        , runTest $         mkTest db1 "simpleDep1"         ["C"]      (solverSuccess [("B", 1), ("C", 1)])
+        , runTest $         mkTest db1 "simpleDep2"         ["D"]      (solverSuccess [("B", 2), ("D", 1)])
+        , runTest $         mkTest db1 "failTwoVersions"    ["C", "D"] anySolverFailure
+        , runTest $ indep $ mkTest db1 "indepTwoVersions"   ["C", "D"] (solverSuccess [("B", 1), ("B", 2), ("C", 1), ("D", 1)])
+        , runTest $ indep $ mkTest db1 "aliasWhenPossible1" ["C", "E"] (solverSuccess [("B", 1), ("C", 1), ("E", 1)])
+        , runTest $ indep $ mkTest db1 "aliasWhenPossible2" ["D", "E"] (solverSuccess [("B", 2), ("D", 1), ("E", 1)])
+        , runTest $ indep $ mkTest db2 "aliasWhenPossible3" ["C", "D"] (solverSuccess [("A", 1), ("A", 2), ("B", 1), ("B", 2), ("C", 1), ("D", 1)])
+        , runTest $         mkTest db1 "buildDepAgainstOld" ["F"]      (solverSuccess [("B", 1), ("E", 1), ("F", 1)])
+        , runTest $         mkTest db1 "buildDepAgainstNew" ["G"]      (solverSuccess [("B", 2), ("E", 1), ("G", 1)])
+        , runTest $ indep $ mkTest db1 "multipleInstances"  ["F", "G"] anySolverFailure
+        , runTest $         mkTest db21 "unknownPackage1"   ["A"]      (solverSuccess [("A", 1), ("B", 1)])
+        , runTest $         mkTest db22 "unknownPackage2"   ["A"]      (solverFailure (isInfixOf "unknown package: C"))
+        , runTest $         mkTest db23 "unknownPackage3"   ["A"]      (solverFailure (isInfixOf "unknown package: B"))
+        , runTest $         mkTest []   "unknown target"    ["A"]      (solverFailure (isInfixOf "unknown package: A"))
+        ]
+    , testGroup "Flagged dependencies" [
+          runTest $         mkTest db3 "forceFlagOn"  ["C"]      (solverSuccess [("A", 1), ("B", 1), ("C", 1)])
+        , runTest $         mkTest db3 "forceFlagOff" ["D"]      (solverSuccess [("A", 2), ("B", 1), ("D", 1)])
+        , runTest $ indep $ mkTest db3 "linkFlags1"   ["C", "D"] anySolverFailure
+        , runTest $ indep $ mkTest db4 "linkFlags2"   ["C", "D"] anySolverFailure
+        , runTest $ indep $ mkTest db18 "linkFlags3"  ["A", "B"] (solverSuccess [("A", 1), ("B", 1), ("C", 1), ("D", 1), ("D", 2), ("F", 1)])
+        ]
+    , testGroup "Lifting dependencies out of conditionals" [
+          runTest $ commonDependencyLogMessage "common dependency log message"
+        , runTest $ twoLevelDeepCommonDependencyLogMessage "two level deep common dependency log message"
+        , runTest $ testBackjumpingWithCommonDependency "backjumping with common dependency"
+        ]
+    , testGroup "Manual flags" [
+          runTest $ mkTest dbManualFlags "Use default value for manual flag" ["pkg"] $
+          solverSuccess [("pkg", 1), ("true-dep", 1)]
 
         , let checkFullLog =
                   any $ isInfixOf "rejecting: pkg:-flag (manual flag can only be changed explicitly)"
@@ -946,10 +155,6 @@ tests =
                       solverSuccess [("base", 1), ("ghc-prim", 1), ("integer-gmp", 1), ("integer-simple", 1)]
         , runTest $ mkTest dbNonupgrade "Refuse to install newer ghc requested by another library" ["A"] $
                       solverFailure (isInfixOf "rejecting: ghc-2.0.0 (constraint from non-upgradeable package requires installed instance)")
-        , runTest $ mkTest dbNonupgrade "Refuse to install newer ghci requested by another library" ["B"] $
-                      solverFailure (isInfixOf "rejecting: ghci-2.0.0 (constraint from non-upgradeable package requires installed instance)")
-        , runTest $ mkTest dbNonupgrade "Refuse to install newer ghc-boot requested by another library" ["C"] $
-                      solverFailure (isInfixOf "rejecting: ghc-boot-2.0.0 (constraint from non-upgradeable package requires installed instance)")
         ]
     , testGroup "reject-unconstrained" [
           runTest $ onlyConstrained $ mkTest db12 "missing syb" ["E"] $
@@ -1921,8 +1126,8 @@ dbBase = [
     ]
 
 dbNonupgrade :: ExampleDb
-dbNonupgrade =
-  [ Left $ exInst "ghc" 1 "ghc-1" []
+dbNonupgrade = [
+    Left $ exInst "ghc" 1 "ghc-1" []
   , Right $ exAv "ghc" 2 []
   , Right $ exAv "A" 1 [ExFix "ghc" 2]
   ]

From 9faa4db9180ec4a645cfa1a4a00666dcaf37986c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= <hecate+github@glitchbra.in>
Date: Sun, 20 Aug 2023 14:57:37 +0200
Subject: [PATCH 072/144] Add the ExtendedLiterals extension (backport of
 #8992)

---
 Cabal-syntax/src/Language/Haskell/Extension.hs         |  5 ++++-
 .../tests/UnitTests/Distribution/Utils/Structured.hs   |  4 ++--
 changelog.d/pr-8992                                    | 10 ++++++++++
 editors/vim/syntax/cabal.vim                           |  4 ++++
 4 files changed, 20 insertions(+), 3 deletions(-)
 create mode 100644 changelog.d/pr-8992

diff --git a/Cabal-syntax/src/Language/Haskell/Extension.hs b/Cabal-syntax/src/Language/Haskell/Extension.hs
index b7adc1c7e7e..d746819f087 100644
--- a/Cabal-syntax/src/Language/Haskell/Extension.hs
+++ b/Cabal-syntax/src/Language/Haskell/Extension.hs
@@ -92,7 +92,7 @@ classifyLanguage = \str -> case lookup str langTable of
 
 -- Note: if you add a new 'KnownExtension':
 --
--- * also add it to the Distribution.Simple.X.languageExtensions lists
+-- * also add it to the Distribution.Simple.X.compilerExtensions lists
 --   (where X is each compiler: GHC, UHC, HaskellSuite)
 --
 -- | This represents language extensions beyond a base 'Language' definition
@@ -677,6 +677,9 @@ data KnownExtension =
   -- | Enable data types for which an unlifted or levity-polymorphic result kind is inferred.
   | UnliftedDatatypes
 
+  -- | Enable syntax for primitive numeric literals, e.g. @3#Int8@
+  | ExtendedLiterals
+
   -- | Undocumented parsing-related extensions introduced in GHC 7.0.
   | AlternativeLayoutRule
 
diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
index 7d68bb251de..37d38f2bac4 100644
--- a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
+++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
@@ -27,9 +27,9 @@ tests = testGroup "Distribution.Utils.Structured"
     -- The difference is in encoding of newtypes
 #if MIN_VERSION_base(4,7,0)
     , testCase "GenericPackageDescription" $
-      md5Check (Proxy :: Proxy GenericPackageDescription) 0xa3e9433662ecf0c7a3c26f6d75a53ba1
+      md5Check (Proxy :: Proxy GenericPackageDescription) 0x8d8f340f10a58b8d8a87bf42213dac89
     , testCase "LocalBuildInfo" $
-      md5Check (Proxy :: Proxy LocalBuildInfo) 0x91ffcd61bbd83525e8edba877435a031
+      md5Check (Proxy :: Proxy LocalBuildInfo) 0xbb22c3258d3092f31e992bc093d09170
 #endif
     ]
 
diff --git a/changelog.d/pr-8992 b/changelog.d/pr-8992
new file mode 100644
index 00000000000..ef74800c430
--- /dev/null
+++ b/changelog.d/pr-8992
@@ -0,0 +1,10 @@
+synopsis: Add language extension ExtendedLiterals
+packages: Cabal-syntax
+prs: #8992
+significance: significant
+
+description: {
+
+- adds support for the ExtendedLiterals language extension (GHC proposal #451)
+
+}
diff --git a/editors/vim/syntax/cabal.vim b/editors/vim/syntax/cabal.vim
index 1fc84f4d8af..bcd80a7fb7e 100644
--- a/editors/vim/syntax/cabal.vim
+++ b/editors/vim/syntax/cabal.vim
@@ -182,6 +182,7 @@ syn keyword cabalExtension contained
   \ ExplicitNamespaces
   \ ExtendedDefaultRules
   \ ExtensibleRecords
+  \ ExtendedLiterals
   \ FieldSelectors
   \ FlexibleContexts
   \ FlexibleInstances
@@ -299,6 +300,7 @@ syn keyword cabalExtension contained
   \ NoDataKinds
   \ NoDatatypeContexts
   \ NoDefaultSignatures
+  \ NoDeepSubsumption
   \ NoDeriveAnyClass
   \ NoDeriveDataTypeable
   \ NoDeriveFoldable
@@ -319,6 +321,7 @@ syn keyword cabalExtension contained
   \ NoExplicitForAll
   \ NoExplicitNamespaces
   \ NoExtendedDefaultRules
+  \ NoExtendedLiterals
   \ NoExtensibleRecords
   \ NoFieldSelectors
   \ NoFlexibleContexts
@@ -406,6 +409,7 @@ syn keyword cabalExtension contained
   \ NoTransformListComp
   \ NoTupleSections
   \ NoTypeApplications
+  \ NoTypeData
   \ NoTypeFamilies
   \ NoTypeFamilyDependencies
   \ NoTypeInType

From 47eb77ba3248083c0dd6c31cd4e15f4ea7bd749f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Thu, 24 Aug 2023 17:54:40 +0200
Subject: [PATCH 073/144] Filter out files that are not ending in .c from
 c-sources (#9200)

Co-authored-by: Andrea Bedini <andrea.bedini@tweag.io>
fixes #9190
---
 .../Distribution/Utils/Structured.hs          |   2 +-
 Cabal/src/Distribution/Simple/GHC.hs          | 124 ++++++++++--------
 .../PackageTests/CSourcesSanitisation/Main.hs |   4 +
 .../CSourcesSanitisation/build.out            |  25 ++++
 .../CSourcesSanitisation/build.test.hs        |   4 +
 .../CSourcesSanitisation/cabal.project        |   1 +
 .../CSourcesSanitisation/cbits/gwinsz.c       |   0
 .../CSourcesSanitisation/cbits/gwinsz.h       |   0
 .../CSourcesSanitisation/repro.cabal          |  23 ++++
 9 files changed, 129 insertions(+), 54 deletions(-)
 create mode 100644 cabal-testsuite/PackageTests/CSourcesSanitisation/Main.hs
 create mode 100644 cabal-testsuite/PackageTests/CSourcesSanitisation/build.out
 create mode 100644 cabal-testsuite/PackageTests/CSourcesSanitisation/build.test.hs
 create mode 100644 cabal-testsuite/PackageTests/CSourcesSanitisation/cabal.project
 create mode 100644 cabal-testsuite/PackageTests/CSourcesSanitisation/cbits/gwinsz.c
 create mode 100644 cabal-testsuite/PackageTests/CSourcesSanitisation/cbits/gwinsz.h
 create mode 100644 cabal-testsuite/PackageTests/CSourcesSanitisation/repro.cabal

diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
index 37d38f2bac4..2dc84db4237 100644
--- a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
+++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
@@ -29,7 +29,7 @@ tests = testGroup "Distribution.Utils.Structured"
     , testCase "GenericPackageDescription" $
       md5Check (Proxy :: Proxy GenericPackageDescription) 0x8d8f340f10a58b8d8a87bf42213dac89
     , testCase "LocalBuildInfo" $
-      md5Check (Proxy :: Proxy LocalBuildInfo) 0xbb22c3258d3092f31e992bc093d09170
+      md5Check (Proxy :: Proxy LocalBuildInfo) 0x618ab257e99d0b21c617e1f8c39a5a4b
 #endif
     ]
 
diff --git a/Cabal/src/Distribution/Simple/GHC.hs b/Cabal/src/Distribution/Simple/GHC.hs
index 2ef352f300b..e3f5adcc487 100644
--- a/Cabal/src/Distribution/Simple/GHC.hs
+++ b/Cabal/src/Distribution/Simple/GHC.hs
@@ -705,35 +705,45 @@ buildOrReplLib mReplFlags verbosity numJobs pkg_descr lbi lib clbi = do
       | filename <- cxxSources libBi]
 
   -- build any C sources
-  unless (not has_code || null (cSources libBi)) $ do
+  let (cSrcs', others) = partition (\filepath -> ".c"`isSuffixOf` filepath) (cSources libBi)
+  unless (not has_code || null cSrcs') $ do
     info verbosity "Building C Sources..."
-    sequence_
-      [ do let baseCcOpts    = Internal.componentCcGhcOptions verbosity implInfo
-                               lbi libBi clbi relLibTargetDir filename
-               vanillaCcOpts = if isGhcDynamic
-                               -- Dynamic GHC requires C sources to be built
-                               -- with -fPIC for REPL to work. See #2207.
-                               then baseCcOpts { ghcOptFPic = toFlag True }
-                               else baseCcOpts
-               profCcOpts    = vanillaCcOpts `mappend` mempty {
-                                 ghcOptProfilingMode = toFlag True,
-                                 ghcOptObjSuffix     = toFlag "p_o"
-                               }
-               sharedCcOpts  = vanillaCcOpts `mappend` mempty {
-                                 ghcOptFPic        = toFlag True,
-                                 ghcOptDynLinkMode = toFlag GhcDynamicOnly,
-                                 ghcOptObjSuffix   = toFlag "dyn_o"
-                               }
-               odir          = fromFlag (ghcOptObjDir vanillaCcOpts)
-           createDirectoryIfMissingVerbose verbosity True odir
-           let runGhcProgIfNeeded ccOpts = do
-                 needsRecomp <- checkNeedsRecompilation filename ccOpts
-                 when needsRecomp $ runGhcProg ccOpts
-           runGhcProgIfNeeded vanillaCcOpts
-           unless forRepl $
-             whenSharedLib forceSharedLib (runGhcProgIfNeeded sharedCcOpts)
-           unless forRepl $ whenProfLib (runGhcProgIfNeeded profCcOpts)
-      | filename <- cSources libBi]
+    unless (null others) $ do
+      let files = intercalate ", " others
+      let libraryName = case libName lib of
+            LMainLibName -> "the main library"
+            LSubLibName name -> "library " <> prettyShow name
+      warn verbosity $ unlines
+        [ "The following files listed in " <> libraryName <> "'s c-sources will not be used: " <> files <> "."
+        , "Header files should be in the 'include' or 'install-include' stanza."
+        , "See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-includes"
+        ]
+    forM_ cSrcs' $ \filename -> do
+       let baseCcOpts    = Internal.componentCcGhcOptions verbosity implInfo
+                           lbi libBi clbi relLibTargetDir filename
+           vanillaCcOpts = if isGhcDynamic
+                           -- Dynamic GHC requires C sources to be built
+                           -- with -fPIC for REPL to work. See #2207.
+                           then baseCcOpts { ghcOptFPic = toFlag True }
+                           else baseCcOpts
+           profCcOpts    = vanillaCcOpts `mappend` mempty {
+                             ghcOptProfilingMode = toFlag True,
+                             ghcOptObjSuffix     = toFlag "p_o"
+                           }
+           sharedCcOpts  = vanillaCcOpts `mappend` mempty {
+                             ghcOptFPic        = toFlag True,
+                             ghcOptDynLinkMode = toFlag GhcDynamicOnly,
+                             ghcOptObjSuffix   = toFlag "dyn_o"
+                           }
+           odir          = fromFlag (ghcOptObjDir vanillaCcOpts)
+       createDirectoryIfMissingVerbose verbosity True odir
+       let runGhcProgIfNeeded ccOpts = do
+             needsRecomp <- checkNeedsRecompilation filename ccOpts
+             when needsRecomp $ runGhcProg ccOpts
+       runGhcProgIfNeeded vanillaCcOpts
+       unless forRepl $
+         whenSharedLib forceSharedLib (runGhcProgIfNeeded sharedCcOpts)
+       unless forRepl $ whenProfLib (runGhcProgIfNeeded profCcOpts)
 
   -- build any JS sources
   unless (not has_code || not hasJsSupport || null (jsSources libBi)) $ do
@@ -1527,32 +1537,40 @@ gbuild verbosity numJobs pkg_descr lbi bm clbi = do
      | filename <- cxxSrcs ]
 
   -- build any C sources
-  unless (null cSrcs) $ do
-   info verbosity "Building C Sources..."
-   sequence_
-     [ do let baseCcOpts    = Internal.componentCcGhcOptions verbosity implInfo
+  let (cSrcs', others) = partition (\filepath -> ".c"`isSuffixOf` filepath) cSrcs
+  unless (null cSrcs') $ do
+    info verbosity "Building C Sources..."
+    unless (null others) $ do
+      let files = intercalate ", " others
+      let currentComponentName = gbuildName bm
+      warn verbosity $ unlines
+        [ "The following files listed in " <> currentComponentName <> "'s c-sources will not be used: " <> files <> "."
+        , "Header files should be in the 'include' or 'install-include' stanza."
+        , "See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-includes"
+        ]
+    forM_ cSrcs' $ \filename -> do
+      let baseCcOpts    = Internal.componentCcGhcOptions verbosity implInfo
                               lbi bnfo clbi tmpDir filename
-              vanillaCcOpts = if isGhcDynamic
-                              -- Dynamic GHC requires C sources to be built
-                              -- with -fPIC for REPL to work. See #2207.
-                              then baseCcOpts { ghcOptFPic = toFlag True }
-                              else baseCcOpts
-              profCcOpts    = vanillaCcOpts `mappend` mempty {
-                                ghcOptProfilingMode = toFlag True
-                              }
-              sharedCcOpts  = vanillaCcOpts `mappend` mempty {
-                                ghcOptFPic        = toFlag True,
-                                ghcOptDynLinkMode = toFlag GhcDynamicOnly
-                              }
-              opts | needProfiling = profCcOpts
-                   | needDynamic   = sharedCcOpts
-                   | otherwise     = vanillaCcOpts
-              odir = fromFlag (ghcOptObjDir opts)
-          createDirectoryIfMissingVerbose verbosity True odir
-          needsRecomp <- checkNeedsRecompilation filename opts
-          when needsRecomp $
-            runGhcProg opts
-     | filename <- cSrcs ]
+      let vanillaCcOpts = if isGhcDynamic
+                          -- Dynamic GHC requires C sources to be built
+                          -- with -fPIC for REPL to work. See #2207.
+                          then baseCcOpts { ghcOptFPic = toFlag True }
+                          else baseCcOpts
+      let profCcOpts    = vanillaCcOpts `mappend` mempty {
+                            ghcOptProfilingMode = toFlag True
+                          }
+      let sharedCcOpts  = vanillaCcOpts `mappend` mempty {
+                            ghcOptFPic        = toFlag True,
+                            ghcOptDynLinkMode = toFlag GhcDynamicOnly
+                          }
+      let opts | needProfiling = profCcOpts
+               | needDynamic   = sharedCcOpts
+               | otherwise     = vanillaCcOpts
+      let odir = fromFlag (ghcOptObjDir opts)
+      createDirectoryIfMissingVerbose verbosity True odir
+      needsRecomp <- checkNeedsRecompilation filename opts
+      when needsRecomp $
+        runGhcProg opts
 
   -- TODO: problem here is we need the .c files built first, so we can load them
   -- with ghci, but .c files can depend on .h files generated by ghc by ffi
diff --git a/cabal-testsuite/PackageTests/CSourcesSanitisation/Main.hs b/cabal-testsuite/PackageTests/CSourcesSanitisation/Main.hs
new file mode 100644
index 00000000000..694e8564328
--- /dev/null
+++ b/cabal-testsuite/PackageTests/CSourcesSanitisation/Main.hs
@@ -0,0 +1,4 @@
+module Main where
+
+main :: IO ()
+main = putStrLn "main"
diff --git a/cabal-testsuite/PackageTests/CSourcesSanitisation/build.out b/cabal-testsuite/PackageTests/CSourcesSanitisation/build.out
new file mode 100644
index 00000000000..1e423a54cb9
--- /dev/null
+++ b/cabal-testsuite/PackageTests/CSourcesSanitisation/build.out
@@ -0,0 +1,25 @@
+# cabal build
+Resolving dependencies...
+Build profile: -w ghc-<GHCVER> -O1
+In order, the following will be built:
+ - repro-0.1.0.0 (lib) (first run)
+ - repro-0.1.0.0 (exe:exec1) (first run)
+ - repro-0.1.0.0 (lib:lib2) (first run)
+Configuring library for repro-0.1.0.0..
+Preprocessing library for repro-0.1.0.0..
+Building library for repro-0.1.0.0..
+Warning: The following files listed in the main library's c-sources will not be used: cbits/gwinsz.h.
+Header files should be in the 'include' or 'install-include' stanza.
+See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-includes
+Configuring executable 'exec1' for repro-0.1.0.0..
+Preprocessing executable 'exec1' for repro-0.1.0.0..
+Building executable 'exec1' for repro-0.1.0.0..
+Warning: The following files listed in exec1's c-sources will not be used: cbits/gwinsz.h.
+Header files should be in the 'include' or 'install-include' stanza.
+See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-includes
+Configuring library 'lib2' for repro-0.1.0.0..
+Preprocessing library 'lib2' for repro-0.1.0.0..
+Building library 'lib2' for repro-0.1.0.0..
+Warning: The following files listed in library lib2's c-sources will not be used: cbits/gwinsz.h.
+Header files should be in the 'include' or 'install-include' stanza.
+See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-includes
diff --git a/cabal-testsuite/PackageTests/CSourcesSanitisation/build.test.hs b/cabal-testsuite/PackageTests/CSourcesSanitisation/build.test.hs
new file mode 100644
index 00000000000..db6203e6546
--- /dev/null
+++ b/cabal-testsuite/PackageTests/CSourcesSanitisation/build.test.hs
@@ -0,0 +1,4 @@
+import Test.Cabal.Prelude
+
+main = cabalTest $ do
+  cabal "build" []
diff --git a/cabal-testsuite/PackageTests/CSourcesSanitisation/cabal.project b/cabal-testsuite/PackageTests/CSourcesSanitisation/cabal.project
new file mode 100644
index 00000000000..e6fdbadb439
--- /dev/null
+++ b/cabal-testsuite/PackageTests/CSourcesSanitisation/cabal.project
@@ -0,0 +1 @@
+packages: .
diff --git a/cabal-testsuite/PackageTests/CSourcesSanitisation/cbits/gwinsz.c b/cabal-testsuite/PackageTests/CSourcesSanitisation/cbits/gwinsz.c
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/cabal-testsuite/PackageTests/CSourcesSanitisation/cbits/gwinsz.h b/cabal-testsuite/PackageTests/CSourcesSanitisation/cbits/gwinsz.h
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/cabal-testsuite/PackageTests/CSourcesSanitisation/repro.cabal b/cabal-testsuite/PackageTests/CSourcesSanitisation/repro.cabal
new file mode 100644
index 00000000000..659f1510a7e
--- /dev/null
+++ b/cabal-testsuite/PackageTests/CSourcesSanitisation/repro.cabal
@@ -0,0 +1,23 @@
+cabal-version:      3.0
+name:               repro
+version:            0.1.0.0
+build-type:         Simple
+
+library
+    default-language: Haskell2010
+    c-sources:        cbits/gwinsz.h
+                      cbits/gwinsz.c
+    build-depends:    base
+
+library lib2
+    default-language: Haskell2010
+    c-sources:        cbits/gwinsz.h
+                      cbits/gwinsz.c
+    build-depends:    base
+
+executable exec1
+    main-is: Main.hs
+    default-language: Haskell2010
+    c-sources:        cbits/gwinsz.h
+                      cbits/gwinsz.c
+    build-depends:    base

From dcfdc9cffd74cade4e8cf3df37c5993413ffd30f Mon Sep 17 00:00:00 2001
From: Gershom Bazerman <gershom@arista.com>
Date: Wed, 28 Jun 2023 01:09:55 -0400
Subject: [PATCH 074/144] cleanup and document a global repo flag

---
 cabal-install/src/Distribution/Client/CmdUpdate.hs | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/cabal-install/src/Distribution/Client/CmdUpdate.hs b/cabal-install/src/Distribution/Client/CmdUpdate.hs
index f066788ec63..727381046e9 100644
--- a/cabal-install/src/Distribution/Client/CmdUpdate.hs
+++ b/cabal-install/src/Distribution/Client/CmdUpdate.hs
@@ -199,10 +199,12 @@ updateRepo verbosity _updateFlags repoCtxt (repo, indexState) = do
       -- NB: always update the timestamp, even if we didn't actually
       -- download anything
       writeIndexTimestamp index indexState
-      ce <- if repoContextIgnoreExpiry repoCtxt
-              then Just `fmap` getCurrentTime
-              else return Nothing
-      updated <- Sec.uncheckClientErrors $ Sec.checkForUpdates repoSecure ce
+      -- typically we get the current time to check expiry against
+      -- but if the flag is set, we don't.
+      now <- case repoContextIgnoreExpiry repoCtxt of
+                 False -> Just <$> getCurrentTime
+                 True  -> pure Nothing
+      updated <- Sec.uncheckClientErrors $ Sec.checkForUpdates repoSecure now
       -- this resolves indexState (which could be HEAD) into a timestamp
       new_ts <- currentIndexTimestamp (lessVerbose verbosity) repoCtxt repo
       let rname = remoteRepoName (repoRemote repo)

From ec86ddcdd990b358ada9395c41a94a408c5eb9a8 Mon Sep 17 00:00:00 2001
From: Gershom Bazerman <gershom@arista.com>
Date: Wed, 28 Jun 2023 01:09:55 -0400
Subject: [PATCH 075/144] cleanup and document a global repo flag

---
 cabal-install/src/Distribution/Client/CmdUpdate.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cabal-install/src/Distribution/Client/CmdUpdate.hs b/cabal-install/src/Distribution/Client/CmdUpdate.hs
index 727381046e9..55efee8459c 100644
--- a/cabal-install/src/Distribution/Client/CmdUpdate.hs
+++ b/cabal-install/src/Distribution/Client/CmdUpdate.hs
@@ -201,10 +201,10 @@ updateRepo verbosity _updateFlags repoCtxt (repo, indexState) = do
       writeIndexTimestamp index indexState
       -- typically we get the current time to check expiry against
       -- but if the flag is set, we don't.
-      now <- case repoContextIgnoreExpiry repoCtxt of
+      now' <- case repoContextIgnoreExpiry repoCtxt of
                  False -> Just <$> getCurrentTime
                  True  -> pure Nothing
-      updated <- Sec.uncheckClientErrors $ Sec.checkForUpdates repoSecure now
+      updated <- Sec.uncheckClientErrors $ Sec.checkForUpdates repoSecure now'
       -- this resolves indexState (which could be HEAD) into a timestamp
       new_ts <- currentIndexTimestamp (lessVerbose verbosity) repoCtxt repo
       let rname = remoteRepoName (repoRemote repo)

From 483350b3b0c158e2c65d2b39de9fdd1c6c3d10aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Sat, 26 Aug 2023 14:40:55 +0200
Subject: [PATCH 076/144] Add changelogs for 3.10.2.0 (#9207)

---
 Cabal-syntax/ChangeLog.md               |  2 +-
 Cabal/ChangeLog.md                      |  3 ++
 cabal-install-solver/ChangeLog.md       |  2 +-
 cabal-install/changelog                 |  3 ++
 release-notes/Cabal-3.10.2.0.md         | 30 +++++++++++++
 release-notes/cabal-install-3.10.2.0.md | 60 +++++++++++++++++++++++++
 6 files changed, 98 insertions(+), 2 deletions(-)
 create mode 100644 release-notes/Cabal-3.10.2.0.md
 create mode 100644 release-notes/cabal-install-3.10.2.0.md

diff --git a/Cabal-syntax/ChangeLog.md b/Cabal-syntax/ChangeLog.md
index 19933508cd9..58c8379eb44 100644
--- a/Cabal-syntax/ChangeLog.md
+++ b/Cabal-syntax/ChangeLog.md
@@ -1 +1 @@
-Please see https://hackage.haskell.org/package/Cabal/changelog
+Please see See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.2.0.md
diff --git a/Cabal/ChangeLog.md b/Cabal/ChangeLog.md
index 573337d81da..fd928c4de23 100644
--- a/Cabal/ChangeLog.md
+++ b/Cabal/ChangeLog.md
@@ -1,3 +1,6 @@
+# 3.10.2.0 [Hécate](mailto:hecate+github@glitchbra.in) August 2023
+* See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.2.0.md
+
 # 3.10.1.0 [Mikolaj Konarski](mailto:mikolaj@well-typed.com) March 2023
 * See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.1.0.md
 
diff --git a/cabal-install-solver/ChangeLog.md b/cabal-install-solver/ChangeLog.md
index 3c9ef2350ec..7af34641df0 100644
--- a/cabal-install-solver/ChangeLog.md
+++ b/cabal-install-solver/ChangeLog.md
@@ -1 +1 @@
-Please see https://hackage.haskell.org/package/cabal-install/changelog
+Please see https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.10.2.0.md
diff --git a/cabal-install/changelog b/cabal-install/changelog
index 063241f57c2..0a211ba0946 100644
--- a/cabal-install/changelog
+++ b/cabal-install/changelog
@@ -1,5 +1,8 @@
 -*-change-log-*-
 
+3.10.2.0 Hécate <hecate+github@glitchbra.in> August 2023
+	* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.10.2.0.md
+
 3.10.1.0 Mikolaj Konarski <mikolaj@well-typed.com> March 2023
 	* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.10.1.0.md
 
diff --git a/release-notes/Cabal-3.10.2.0.md b/release-notes/Cabal-3.10.2.0.md
new file mode 100644
index 00000000000..5471aa2f12e
--- /dev/null
+++ b/release-notes/Cabal-3.10.2.0.md
@@ -0,0 +1,30 @@
+Cabal and Cabal-syntax 3.10.2.0 changelog and release notes
+---
+
+## Release 3.10.2.0 is strictly a bug-fix release, with the fixes listed below
+
+- Shorten script-builds paths [#8841](https://github.com/haskell/cabal/issues/8841) [#8898](https://github.com/haskell/cabal/pull/8898)
+
+  - Use Base64 hash truncated to 26 chars for script-build cache directories.
+  - Use the cache directory as the dist directory.
+  - Use script-<your-sanitized-script-name> as the component name instead of cabal-script-<...>.
+  - Use cabal-script-<your-actual-script-name> for the executable name.
+  - This change is incompatible with previous cabal versions in terms of cache location,
+    you should manually remove your old caches once you no longer need them.
+
+- Do not always pass --quickjump to haddock #9049 [#9060](https://github.com/haskell/cabal/issues/9060) [#9049](https://github.com/haskell/cabal/pull/9049)
+
+  6d8adf13101 caused `cabal` to always pass the `--quickjump` flag to Haddock.
+  Not only does this waste memory for a service that user hasn't asked for,
+  but also leads to a failure with Haddocks shipped with GHC 9.0 and 9.2,
+  which had a separate bug (fixed in later versions but not backported) when
+  Haddock does not pass `--quickjump` recursively to the package dependencies.
+
+- Add language extension ExtendedLiterals [#8992](https://github.com/haskell/cabal/pull/8992)
+
+  - adds support for the ExtendedLiterals language extension (GHC proposal #451)
+
+- Regenerate Lexer.hs to avoid out-of-bound array access due to a bug in Alex [#8892](https://github.com/haskell/cabal/issues/8892) [#8896](https://github.com/haskell/cabal/pull/8896)
+
+  - Regenerate Cabal-syntax's Lexer.hs with Alex 3.2.7.3 which includes a fix for
+    an out-of-bound array access (only noticeable with GHC's JavaScript backend).
diff --git a/release-notes/cabal-install-3.10.2.0.md b/release-notes/cabal-install-3.10.2.0.md
new file mode 100644
index 00000000000..52dc5de7b8f
--- /dev/null
+++ b/release-notes/cabal-install-3.10.2.0.md
@@ -0,0 +1,60 @@
+cabal-install and cabal-install-solver 3.10.2.0 changelog and release notes
+---
+
+## Release 3.10.2.0 is strictly a bug-fix release, with the fixes listed below
+
+- Fix parsing of password-command option [#9002](https://github.com/haskell/cabal/pull/9002)
+
+  The password-command option did not parse its value correctly.
+  Quotes were ignored, making many kinds of commands impossible to
+  express (e.g.  `sh -c "foo | bar"`).  Also, `cabal user-config`
+  treated the argument list as a *list of option values*, rather than a
+  *value that is a list*.  As a consequence, `cabal user-config
+  update` corrupted the value in the config file.
+
+  Fixed these issues by parsing the command as a space separated list
+  of tokens (which may be enclosed in double quotes), and treating the
+  parsed list-of-token as one value (not multiple).
+
+- Existence of $XDG_CONFIG_HOME/cabal/config now overrides existence of $HOME/.cabal [#8577](https://github.com/haskell/cabal/issues/8577)
+
+  To avoid pre-XDG backwards compatibility from triggering due to other
+  tools accidentally creating a $HOME/.cabal directory, the presence of
+  $XDG_CONFIG_HOME/cabal/config now disables pre-XDG backwards
+  compatibility.  Presumably $XDG_CONFIG_HOME/cabal/config will never be
+  created by accident.
+
+- Shorten script-builds paths [#8841](https://github.com/haskell/cabal/issues/8841) [#8898](https://github.com/haskell/cabal/pull/8898)
+
+  - Use Base64 hash truncated to 26 chars for script-build cache directories.
+  - Use the cache directory as the dist directory.
+  - Use script-<your-sanitized-script-name> as the component name instead of cabal-script-<...>.
+  - Use cabal-script-<your-actual-script-name> for the executable name.
+  - This change is incompatible with previous cabal versions in terms of cache location,
+    you should manually remove your old caches once you no longer need them.
+
+- Don't add `extra-prog-path: ~/.local/bin` when initially creating `~/.config/cabal/config` [#8951](https://github.com/haskell/cabal/issues/8951)
+
+- Use compiler flags for caching project config [#8819](https://github.com/haskell/cabal/pull/8819)
+
+  This ensures that cached project configs with conditionals re-execute the conditional logic when the compiler changes.
+
+- Fix default Nix configuration option in generated ~/.cabal/config file [#8878](https://github.com/haskell/cabal/pull/8878)
+
+  Fixes the default for ~/.cabal/config file. The nix option should now be commented out by default.
+
+- add base to cabal install --lib default env file [#8903](https://github.com/haskell/cabal/pull/8903)
+
+  This adds base by default to the env file created by `cabal install --lib`. Further it ensures that packagedbs have been created before adding them to the env file.
+
+- Do not check PVP on internal targets [#8361](https://github.com/haskell/cabal/issues/8361) [#9004](https://github.com/haskell/cabal/pull/9004)
+
+  - `cabal check` will not check for dependencies upper bounds in internal
+    targets (i.e. test-suites and benchmarks)
+
+- Add new Hackage root keys to bootstrap set [#9068](https://github.com/haskell/cabal/pull/9068)
+
+  The two new [Hackage root keyholders](https://github.com/haskell-infra/hackage-root-keys/tree/master/root-keys) were added to the bootstrap set.
+
+  - Added Hackage root key for Joachim Breitner
+  - Added Hackage root key for Mathieu Boespflug

From 97567fb86f973848c922b6b9345f6afce2be76ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= <hecate+github@glitchbra.in>
Date: Sat, 26 Aug 2023 16:20:43 +0200
Subject: [PATCH 077/144] bump the version of cabal-install-solver

---
 cabal-install-solver/cabal-install-solver.cabal | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index 30d14db08ef..cfd3398e1c3 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          cabal-install-solver
-version:       3.10.1.0
+version:       3.10.2.0
 synopsis:      The command-line interface for Cabal and Hackage.
 description:
   The solver component used in cabal-install command-line program

From 459c75e200f22bd4fb8ba4439fbb0d5a6a76eba7 Mon Sep 17 00:00:00 2001
From: Marcin Szamotulski <coot@coot.me>
Date: Mon, 28 Aug 2023 01:38:36 +0200
Subject: [PATCH 078/144] haddock-packages fixes (#9213)

Fixes #8958.
---
 .gitignore                                    |   1 +
 Cabal/src/Distribution/Simple/Haddock.hs      |  17 +-
 .../src/Distribution/Simple/Setup/Haddock.hs  | 603 ++++++++++++++++++
 .../Distribution/Client/CmdHaddockProject.hs  |  81 ++-
 cabal-install/tests/IntegrationTests2.hs      |  54 +-
 .../haddock-project/dependencies/a.cabal      |  10 +
 .../dependencies/cabal.project                |   8 +
 .../haddock-project/dependencies/src/MyLib.hs |   6 +
 .../Includes2/setup-external.cabal.out        |  12 +-
 .../Backpack/Includes2/setup-external.out     |  12 +-
 .../Includes2/setup-per-component.out         |  12 +-
 .../Includes3/setup-external-explicit.out     |   4 +-
 .../Includes3/setup-external-ok.cabal.out     |   8 +-
 .../Backpack/Includes3/setup-external-ok.out  |   8 +-
 .../Backpack/Reexport1/setup.cabal.out        |   4 +-
 .../PackageTests/Backpack/Reexport1/setup.out |   4 +-
 .../PackageTests/Haddock/setup.cabal.out      |   2 +-
 .../PackageTests/Haddock/setup.out            |   2 +-
 .../PackageTests/HaddockArgs/quickjump.out    |   6 +-
 .../HaddockNewline/setup.cabal.out            |   2 +-
 .../PackageTests/HaddockNewline/setup.out     |   2 +-
 .../PackageTests/HaddockProject/a.cabal       |  10 +
 .../PackageTests/HaddockProject/cabal.project |   8 +
 .../HaddockProject/haddock-project.out        |  25 +
 .../HaddockProject/haddock-project.test.hs    |  13 +
 .../async-2.2.4/Control/Concurrent/Async.hs   |  25 +
 .../HaddockProject/repo/async-2.2.4/LICENSE   |  30 +
 .../HaddockProject/repo/async-2.2.4/Setup.hs  |   2 +
 .../repo/async-2.2.4/async.cabal              |  22 +
 .../PackageTests/HaddockProject/src/MyLib.hs  |   6 +
 .../Haddock/haddock.cabal.out                 |   6 +-
 .../InternalLibraries/Haddock/haddock.out     |   6 +-
 .../NewHaddock/DisableDoc/cabal.out           |   2 +-
 .../HaddockOutput/HaddockOutputCmd/cabal.out  |  11 +
 .../HaddockOutputConfig/cabal.out             |  11 +
 .../NewHaddock/ImplyDependencies/cabal.out    |   4 +-
 cabal-testsuite/src/Test/Cabal/Prelude.hs     |   1 +
 changelog.d/issue-8843                        |  15 +
 doc/cabal-commands.rst                        |   8 +-
 doc/requirements.txt                          |   2 +-
 40 files changed, 953 insertions(+), 112 deletions(-)
 create mode 100644 Cabal/src/Distribution/Simple/Setup/Haddock.hs
 create mode 100644 cabal-install/tests/IntegrationTests2/haddock-project/dependencies/a.cabal
 create mode 100644 cabal-install/tests/IntegrationTests2/haddock-project/dependencies/cabal.project
 create mode 100644 cabal-install/tests/IntegrationTests2/haddock-project/dependencies/src/MyLib.hs
 create mode 100644 cabal-testsuite/PackageTests/HaddockProject/a.cabal
 create mode 100644 cabal-testsuite/PackageTests/HaddockProject/cabal.project
 create mode 100644 cabal-testsuite/PackageTests/HaddockProject/haddock-project.out
 create mode 100644 cabal-testsuite/PackageTests/HaddockProject/haddock-project.test.hs
 create mode 100644 cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/Control/Concurrent/Async.hs
 create mode 100644 cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/LICENSE
 create mode 100644 cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/Setup.hs
 create mode 100644 cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/async.cabal
 create mode 100644 cabal-testsuite/PackageTests/HaddockProject/src/MyLib.hs
 create mode 100644 cabal-testsuite/PackageTests/NewHaddock/HaddockOutput/HaddockOutputCmd/cabal.out
 create mode 100644 cabal-testsuite/PackageTests/NewHaddock/HaddockOutput/HaddockOutputConfig/cabal.out
 create mode 100644 changelog.d/issue-8843

diff --git a/.gitignore b/.gitignore
index 8f1097ae8a1..e9ec3b6322f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,6 +68,7 @@ register.sh
 # windows test artifacts
 cabal-testsuite/**/*.exe
 cabal-testsuite/**/*.bat
+cabal-testsuite/**/haddocks
 
 # python artifacts from documentation builds
 *.pyc
diff --git a/Cabal/src/Distribution/Simple/Haddock.hs b/Cabal/src/Distribution/Simple/Haddock.hs
index bc5c79f4e82..09194c34cd4 100644
--- a/Cabal/src/Distribution/Simple/Haddock.hs
+++ b/Cabal/src/Distribution/Simple/Haddock.hs
@@ -360,7 +360,7 @@ createHaddockIndex :: Verbosity
 createHaddockIndex verbosity programDb comp platform flags = do
     let args = fromHaddockProjectFlags flags
     (haddockProg, _version) <-
-      getHaddockProg verbosity programDb comp args (haddockProjectQuickJump flags)
+      getHaddockProg verbosity programDb comp args (Flag True)
     runHaddock verbosity defaultTempFileOptions comp platform haddockProg False args
 
 -- ------------------------------------------------------------------------------
@@ -405,12 +405,12 @@ fromHaddockProjectFlags :: HaddockProjectFlags -> HaddockArgs
 fromHaddockProjectFlags flags =
     mempty
       { argOutputDir = Dir (fromFlag $ haddockProjectDir flags)
-      , argQuickJump = haddockProjectQuickJump flags
-      , argGenContents = haddockProjectGenContents flags
-      , argGenIndex = haddockProjectGenIndex flags
+      , argQuickJump = Flag True
+      , argGenContents = Flag True
+      , argGenIndex = Flag True
       , argPrologueFile = haddockProjectPrologue flags
       , argInterfaces = fromFlagOrDefault [] (haddockProjectInterfaces flags)
-      , argLinkedSource = haddockProjectLinkedSource flags
+      , argLinkedSource = Flag True
       , argLib = haddockProjectLib flags
       }
 
@@ -684,7 +684,12 @@ renderArgs verbosity tmpFileOpts version comp platform args k = do
       result = intercalate ", "
              . map (\o -> outputDir </>
                             case o of
-                              Html -> "index.html"
+                              Html
+                                | fromFlagOrDefault False (argGenIndex args) ->
+                                    "index.html"
+                              Html
+                                | otherwise ->
+                                    mempty
                               Hoogle -> pkgstr <.> "txt")
              . fromFlagOrDefault [Html]
              . argOutput
diff --git a/Cabal/src/Distribution/Simple/Setup/Haddock.hs b/Cabal/src/Distribution/Simple/Setup/Haddock.hs
new file mode 100644
index 00000000000..3efc6640bd2
--- /dev/null
+++ b/Cabal/src/Distribution/Simple/Setup/Haddock.hs
@@ -0,0 +1,603 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE RankNTypes #-}
+
+-----------------------------------------------------------------------------
+
+-- |
+-- Module      :  Distribution.Simple.Setup.Haddock
+-- Copyright   :  Isaac Jones 2003-2004
+--                Duncan Coutts 2007
+-- License     :  BSD3
+--
+-- Maintainer  :  cabal-devel@haskell.org
+-- Portability :  portable
+--
+-- Definition of the haddock command-line options.
+-- See: @Distribution.Simple.Setup@
+module Distribution.Simple.Setup.Haddock
+  ( HaddockTarget (..)
+  , HaddockFlags (..)
+  , emptyHaddockFlags
+  , defaultHaddockFlags
+  , haddockCommand
+  , Visibility (..)
+  , HaddockProjectFlags (..)
+  , emptyHaddockProjectFlags
+  , defaultHaddockProjectFlags
+  , haddockProjectCommand
+  , haddockOptions
+  , haddockProjectOptions
+  ) where
+
+import Distribution.Compat.Prelude hiding (get)
+import Prelude ()
+
+import qualified Distribution.Compat.CharParsing as P
+import Distribution.Parsec
+import Distribution.Pretty
+import Distribution.Simple.Command hiding (boolOpt, boolOpt')
+import Distribution.Simple.Flag
+import Distribution.Simple.InstallDirs
+import Distribution.Simple.Program
+import Distribution.Verbosity
+import qualified Text.PrettyPrint as Disp
+
+import Distribution.Simple.Setup.Common
+
+-- ------------------------------------------------------------
+
+-- * Haddock flags
+
+-- ------------------------------------------------------------
+
+-- | When we build haddock documentation, there are two cases:
+--
+-- 1. We build haddocks only for the current development version,
+--    intended for local use and not for distribution. In this case,
+--    we store the generated documentation in @<dist>/doc/html/<package name>@.
+--
+-- 2. We build haddocks for intended for uploading them to hackage.
+--    In this case, we need to follow the layout that hackage expects
+--    from documentation tarballs, and we might also want to use different
+--    flags than for development builds, so in this case we store the generated
+--    documentation in @<dist>/doc/html/<package id>-docs@.
+data HaddockTarget = ForHackage | ForDevelopment deriving (Eq, Show, Generic, Typeable)
+
+instance Binary HaddockTarget
+instance Structured HaddockTarget
+
+instance Pretty HaddockTarget where
+  pretty ForHackage = Disp.text "for-hackage"
+  pretty ForDevelopment = Disp.text "for-development"
+
+instance Parsec HaddockTarget where
+  parsec =
+    P.choice
+      [ P.try $ P.string "for-hackage" >> return ForHackage
+      , P.string "for-development" >> return ForDevelopment
+      ]
+
+data HaddockFlags = HaddockFlags
+  { haddockProgramPaths :: [(String, FilePath)]
+  , haddockProgramArgs :: [(String, [String])]
+  , haddockHoogle :: Flag Bool
+  , haddockHtml :: Flag Bool
+  , haddockHtmlLocation :: Flag String
+  , haddockForHackage :: Flag HaddockTarget
+  , haddockExecutables :: Flag Bool
+  , haddockTestSuites :: Flag Bool
+  , haddockBenchmarks :: Flag Bool
+  , haddockForeignLibs :: Flag Bool
+  , haddockInternal :: Flag Bool
+  , haddockCss :: Flag FilePath
+  , haddockLinkedSource :: Flag Bool
+  , haddockQuickJump :: Flag Bool
+  , haddockHscolourCss :: Flag FilePath
+  , haddockContents :: Flag PathTemplate
+  , haddockIndex :: Flag PathTemplate
+  , haddockDistPref :: Flag FilePath
+  , haddockKeepTempFiles :: Flag Bool
+  , haddockVerbosity :: Flag Verbosity
+  , haddockCabalFilePath :: Flag FilePath
+  , haddockBaseUrl :: Flag String
+  , haddockLib :: Flag String
+  , haddockOutputDir :: Flag FilePath
+  , haddockArgs :: [String]
+  }
+  deriving (Show, Generic, Typeable)
+
+defaultHaddockFlags :: HaddockFlags
+defaultHaddockFlags =
+  HaddockFlags
+    { haddockProgramPaths = mempty
+    , haddockProgramArgs = []
+    , haddockHoogle = Flag False
+    , haddockHtml = Flag False
+    , haddockHtmlLocation = NoFlag
+    , haddockForHackage = NoFlag
+    , haddockExecutables = Flag False
+    , haddockTestSuites = Flag False
+    , haddockBenchmarks = Flag False
+    , haddockForeignLibs = Flag False
+    , haddockInternal = Flag False
+    , haddockCss = NoFlag
+    , haddockLinkedSource = Flag False
+    , haddockQuickJump = Flag False
+    , haddockHscolourCss = NoFlag
+    , haddockContents = NoFlag
+    , haddockDistPref = NoFlag
+    , haddockKeepTempFiles = Flag False
+    , haddockVerbosity = Flag normal
+    , haddockCabalFilePath = mempty
+    , haddockIndex = NoFlag
+    , haddockBaseUrl = NoFlag
+    , haddockLib = NoFlag
+    , haddockOutputDir = NoFlag
+    , haddockArgs = mempty
+    }
+
+haddockCommand :: CommandUI HaddockFlags
+haddockCommand =
+  CommandUI
+    { commandName = "haddock"
+    , commandSynopsis = "Generate Haddock HTML documentation."
+    , commandDescription = Just $ \_ ->
+        "Requires the program haddock, version 2.x.\n"
+    , commandNotes = Nothing
+    , commandUsage =
+        usageAlternatives "haddock" $
+          [ "[FLAGS]"
+          , "COMPONENTS [FLAGS]"
+          ]
+    , commandDefaultFlags = defaultHaddockFlags
+    , commandOptions = \showOrParseArgs ->
+        haddockOptions showOrParseArgs
+          ++ programDbPaths
+            progDb
+            ParseArgs
+            haddockProgramPaths
+            (\v flags -> flags{haddockProgramPaths = v})
+          ++ programDbOption
+            progDb
+            showOrParseArgs
+            haddockProgramArgs
+            (\v fs -> fs{haddockProgramArgs = v})
+          ++ programDbOptions
+            progDb
+            ParseArgs
+            haddockProgramArgs
+            (\v flags -> flags{haddockProgramArgs = v})
+    }
+  where
+    progDb =
+      addKnownProgram haddockProgram $
+        addKnownProgram ghcProgram $
+          emptyProgramDb
+
+haddockOptions :: ShowOrParseArgs -> [OptionField HaddockFlags]
+haddockOptions showOrParseArgs =
+  [ optionVerbosity
+      haddockVerbosity
+      (\v flags -> flags{haddockVerbosity = v})
+  , optionDistPref
+      haddockDistPref
+      (\d flags -> flags{haddockDistPref = d})
+      showOrParseArgs
+  , option
+      ""
+      ["keep-temp-files"]
+      "Keep temporary files"
+      haddockKeepTempFiles
+      (\b flags -> flags{haddockKeepTempFiles = b})
+      trueArg
+  , option
+      ""
+      ["hoogle"]
+      "Generate a hoogle database"
+      haddockHoogle
+      (\v flags -> flags{haddockHoogle = v})
+      trueArg
+  , option
+      ""
+      ["html"]
+      "Generate HTML documentation (the default)"
+      haddockHtml
+      (\v flags -> flags{haddockHtml = v})
+      trueArg
+  , option
+      ""
+      ["html-location"]
+      "Location of HTML documentation for pre-requisite packages"
+      haddockHtmlLocation
+      (\v flags -> flags{haddockHtmlLocation = v})
+      (reqArgFlag "URL")
+  , option
+      ""
+      ["for-hackage"]
+      "Collection of flags to generate documentation suitable for upload to hackage"
+      haddockForHackage
+      (\v flags -> flags{haddockForHackage = v})
+      (noArg (Flag ForHackage))
+  , option
+      ""
+      ["executables"]
+      "Run haddock for Executables targets"
+      haddockExecutables
+      (\v flags -> flags{haddockExecutables = v})
+      trueArg
+  , option
+      ""
+      ["tests"]
+      "Run haddock for Test Suite targets"
+      haddockTestSuites
+      (\v flags -> flags{haddockTestSuites = v})
+      trueArg
+  , option
+      ""
+      ["benchmarks"]
+      "Run haddock for Benchmark targets"
+      haddockBenchmarks
+      (\v flags -> flags{haddockBenchmarks = v})
+      trueArg
+  , option
+      ""
+      ["foreign-libraries"]
+      "Run haddock for Foreign Library targets"
+      haddockForeignLibs
+      (\v flags -> flags{haddockForeignLibs = v})
+      trueArg
+  , option
+      ""
+      ["all"]
+      "Run haddock for all targets"
+      ( \f ->
+          allFlags
+            [ haddockExecutables f
+            , haddockTestSuites f
+            , haddockBenchmarks f
+            , haddockForeignLibs f
+            ]
+      )
+      ( \v flags ->
+          flags
+            { haddockExecutables = v
+            , haddockTestSuites = v
+            , haddockBenchmarks = v
+            , haddockForeignLibs = v
+            }
+      )
+      trueArg
+  , option
+      ""
+      ["internal"]
+      "Run haddock for internal modules and include all symbols"
+      haddockInternal
+      (\v flags -> flags{haddockInternal = v})
+      trueArg
+  , option
+      ""
+      ["css"]
+      "Use PATH as the haddock stylesheet"
+      haddockCss
+      (\v flags -> flags{haddockCss = v})
+      (reqArgFlag "PATH")
+  , option
+      ""
+      ["hyperlink-source", "hyperlink-sources", "hyperlinked-source"]
+      "Hyperlink the documentation to the source code"
+      haddockLinkedSource
+      (\v flags -> flags{haddockLinkedSource = v})
+      trueArg
+  , option
+      ""
+      ["quickjump"]
+      "Generate an index for interactive documentation navigation"
+      haddockQuickJump
+      (\v flags -> flags{haddockQuickJump = v})
+      trueArg
+  , option
+      ""
+      ["hscolour-css"]
+      "Use PATH as the HsColour stylesheet"
+      haddockHscolourCss
+      (\v flags -> flags{haddockHscolourCss = v})
+      (reqArgFlag "PATH")
+  , option
+      ""
+      ["contents-location"]
+      "Bake URL in as the location for the contents page"
+      haddockContents
+      (\v flags -> flags{haddockContents = v})
+      ( reqArg'
+          "URL"
+          (toFlag . toPathTemplate)
+          (flagToList . fmap fromPathTemplate)
+      )
+  , option
+      ""
+      ["index-location"]
+      "Use a separately-generated HTML index"
+      haddockIndex
+      (\v flags -> flags{haddockIndex = v})
+      ( reqArg'
+          "URL"
+          (toFlag . toPathTemplate)
+          (flagToList . fmap fromPathTemplate)
+      )
+  , option
+      ""
+      ["base-url"]
+      "Base URL for static files."
+      haddockBaseUrl
+      (\v flags -> flags{haddockBaseUrl = v})
+      (reqArgFlag "URL")
+  , option
+      ""
+      ["lib"]
+      "location of Haddocks static / auxiliary files"
+      haddockLib
+      (\v flags -> flags{haddockLib = v})
+      (reqArgFlag "DIR")
+  , option
+      ""
+      ["output-dir"]
+      "Generate haddock documentation into this directory. This flag is provided as a technology preview and is subject to change in the next releases."
+      haddockOutputDir
+      (\v flags -> flags{haddockOutputDir = v})
+      (reqArgFlag "DIR")
+  ]
+
+emptyHaddockFlags :: HaddockFlags
+emptyHaddockFlags = mempty
+
+instance Monoid HaddockFlags where
+  mempty = gmempty
+  mappend = (<>)
+
+instance Semigroup HaddockFlags where
+  (<>) = gmappend
+
+-- ------------------------------------------------------------
+
+-- * HaddocksFlags flags
+
+-- ------------------------------------------------------------
+
+-- | Governs whether modules from a given interface should be visible or
+-- hidden in the Haddock generated content page.  We don't expose this
+-- functionality to the user, but simply use 'Visible' for only local packages.
+-- Visibility of modules is available since @haddock-2.26.1@.
+data Visibility = Visible | Hidden
+  deriving (Eq, Show)
+
+data HaddockProjectFlags = HaddockProjectFlags
+  { haddockProjectHackage :: Flag Bool
+  -- ^ a shortcut option which builds documentation linked to hackage.  It implies:
+  -- * `--html-location='https://hackage.haskell.org/package/$prg-$version/docs'
+  -- * `--quickjump`
+  -- * `--gen-index`
+  -- * `--gen-contents`
+  -- * `--hyperlinked-source`
+  , -- options passed to @haddock@ via 'createHaddockIndex'
+    haddockProjectDir :: Flag String
+  -- ^ output directory of combined haddocks, the default is './haddocks'
+  , haddockProjectPrologue :: Flag String
+  , haddockProjectInterfaces :: Flag [(FilePath, Maybe FilePath, Maybe FilePath, Visibility)]
+  -- ^ 'haddocksInterfaces' is inferred by the 'haddocksAction'; currently not
+  -- exposed to the user.
+  , -- options passed to @haddock@ via 'HaddockFlags' when building
+    -- documentation
+
+    haddockProjectProgramPaths :: [(String, FilePath)]
+  , haddockProjectProgramArgs :: [(String, [String])]
+  , haddockProjectHoogle :: Flag Bool
+  , -- haddockHtml is not supported
+    haddockProjectHtmlLocation :: Flag String
+  , -- haddockForHackage is not supported
+    haddockProjectExecutables :: Flag Bool
+  , haddockProjectTestSuites :: Flag Bool
+  , haddockProjectBenchmarks :: Flag Bool
+  , haddockProjectForeignLibs :: Flag Bool
+  , haddockProjectInternal :: Flag Bool
+  , haddockProjectCss :: Flag FilePath
+  , haddockProjectHscolourCss :: Flag FilePath
+  , -- haddockContent is not supported, a fixed value is provided
+    -- haddockIndex is not supported, a fixed value is provided
+    -- haddockDistPerf is not supported, note: it changes location of the haddocks
+    haddockProjectKeepTempFiles :: Flag Bool
+  , haddockProjectVerbosity :: Flag Verbosity
+  , -- haddockBaseUrl is not supported, a fixed value is provided
+    haddockProjectLib :: Flag String
+  , haddockProjectOutputDir :: Flag FilePath
+  }
+  deriving (Show, Generic, Typeable)
+
+defaultHaddockProjectFlags :: HaddockProjectFlags
+defaultHaddockProjectFlags =
+  HaddockProjectFlags
+    { haddockProjectHackage = Flag False
+    , haddockProjectDir = Flag "./haddocks"
+    , haddockProjectPrologue = NoFlag
+    , haddockProjectTestSuites = Flag False
+    , haddockProjectProgramPaths = mempty
+    , haddockProjectProgramArgs = mempty
+    , haddockProjectHoogle = Flag False
+    , haddockProjectHtmlLocation = NoFlag
+    , haddockProjectExecutables = Flag False
+    , haddockProjectBenchmarks = Flag False
+    , haddockProjectForeignLibs = Flag False
+    , haddockProjectInternal = Flag False
+    , haddockProjectCss = NoFlag
+    , haddockProjectHscolourCss = NoFlag
+    , haddockProjectKeepTempFiles = Flag False
+    , haddockProjectVerbosity = Flag normal
+    , haddockProjectLib = NoFlag
+    , haddockProjectOutputDir = NoFlag
+    , haddockProjectInterfaces = NoFlag
+    }
+
+haddockProjectCommand :: CommandUI HaddockProjectFlags
+haddockProjectCommand =
+  CommandUI
+    { commandName = "v2-haddock-project"
+    , commandSynopsis = "Generate Haddocks HTML documentation for the cabal project."
+    , commandDescription = Just $ \_ ->
+        "Require the programm haddock, version 2.26.\n"
+    , commandNotes = Nothing
+    , commandUsage =
+        usageAlternatives "haddocks" $
+          [ "[FLAGS]"
+          , "COMPONENTS [FLAGS]"
+          ]
+    , commandDefaultFlags = defaultHaddockProjectFlags
+    , commandOptions = \showOrParseArgs ->
+        haddockProjectOptions showOrParseArgs
+          ++ programDbPaths
+            progDb
+            ParseArgs
+            haddockProjectProgramPaths
+            (\v flags -> flags{haddockProjectProgramPaths = v})
+          ++ programDbOption
+            progDb
+            showOrParseArgs
+            haddockProjectProgramArgs
+            (\v fs -> fs{haddockProjectProgramArgs = v})
+          ++ programDbOptions
+            progDb
+            ParseArgs
+            haddockProjectProgramArgs
+            (\v flags -> flags{haddockProjectProgramArgs = v})
+    }
+  where
+    progDb =
+      addKnownProgram haddockProgram $
+        addKnownProgram ghcProgram $
+          emptyProgramDb
+
+haddockProjectOptions :: ShowOrParseArgs -> [OptionField HaddockProjectFlags]
+haddockProjectOptions _showOrParseArgs =
+  [ option
+      ""
+      ["hackage"]
+      ( concat
+          [ "A short-cut option to build documentation linked to hackage."
+          ]
+      )
+      haddockProjectHackage
+      (\v flags -> flags{haddockProjectHackage = v})
+      trueArg
+  , option
+      ""
+      ["output"]
+      "Output directory"
+      haddockProjectDir
+      (\v flags -> flags{haddockProjectDir = v})
+      (optArg' "DIRECTORY" maybeToFlag (fmap Just . flagToList))
+  , option
+      ""
+      ["prologue"]
+      "File path to a prologue file in haddock format"
+      haddockProjectPrologue
+      (\v flags -> flags{haddockProjectPrologue = v})
+      (optArg' "PATH" maybeToFlag (fmap Just . flagToList))
+  , option
+      ""
+      ["hoogle"]
+      "Generate a hoogle database"
+      haddockProjectHoogle
+      (\v flags -> flags{haddockProjectHoogle = v})
+      trueArg
+  , option
+      ""
+      ["html-location"]
+      "Location of HTML documentation for pre-requisite packages"
+      haddockProjectHtmlLocation
+      (\v flags -> flags{haddockProjectHtmlLocation = v})
+      (reqArgFlag "URL")
+  , option
+      ""
+      ["executables"]
+      "Run haddock for Executables targets"
+      haddockProjectExecutables
+      (\v flags -> flags{haddockProjectExecutables = v})
+      trueArg
+  , option
+      ""
+      ["tests"]
+      "Run haddock for Test Suite targets"
+      haddockProjectTestSuites
+      (\v flags -> flags{haddockProjectTestSuites = v})
+      trueArg
+  , option
+      ""
+      ["benchmarks"]
+      "Run haddock for Benchmark targets"
+      haddockProjectBenchmarks
+      (\v flags -> flags{haddockProjectBenchmarks = v})
+      trueArg
+  , option
+      ""
+      ["foreign-libraries"]
+      "Run haddock for Foreign Library targets"
+      haddockProjectForeignLibs
+      (\v flags -> flags{haddockProjectForeignLibs = v})
+      trueArg
+  , option
+      ""
+      ["internal"]
+      "Run haddock for internal modules and include all symbols"
+      haddockProjectInternal
+      (\v flags -> flags{haddockProjectInternal = v})
+      trueArg
+  , option
+      ""
+      ["css"]
+      "Use PATH as the haddock stylesheet"
+      haddockProjectCss
+      (\v flags -> flags{haddockProjectCss = v})
+      (reqArgFlag "PATH")
+  , option
+      ""
+      ["hscolour-css"]
+      "Use PATH as the HsColour stylesheet"
+      haddockProjectHscolourCss
+      (\v flags -> flags{haddockProjectHscolourCss = v})
+      (reqArgFlag "PATH")
+  , option
+      ""
+      ["keep-temp-files"]
+      "Keep temporary files"
+      haddockProjectKeepTempFiles
+      (\b flags -> flags{haddockProjectKeepTempFiles = b})
+      trueArg
+  , optionVerbosity
+      haddockProjectVerbosity
+      (\v flags -> flags{haddockProjectVerbosity = v})
+  , option
+      ""
+      ["lib"]
+      "location of Haddocks static / auxiliary files"
+      haddockProjectLib
+      (\v flags -> flags{haddockProjectLib = v})
+      (reqArgFlag "DIR")
+  , option
+      ""
+      ["output-dir"]
+      "Generate haddock documentation into this directory. This flag is provided as a technology preview and is subject to change in the next releases."
+      haddockProjectOutputDir
+      (\v flags -> flags{haddockProjectOutputDir = v})
+      (reqArgFlag "DIR")
+  ]
+
+emptyHaddockProjectFlags :: HaddockProjectFlags
+emptyHaddockProjectFlags = mempty
+
+instance Monoid HaddockProjectFlags where
+  mempty = gmempty
+  mappend = (<>)
+
+instance Semigroup HaddockProjectFlags where
+  (<>) = gmappend
diff --git a/cabal-install/src/Distribution/Client/CmdHaddockProject.hs b/cabal-install/src/Distribution/Client/CmdHaddockProject.hs
index c9e160ca52e..8f79c5060d5 100644
--- a/cabal-install/src/Distribution/Client/CmdHaddockProject.hs
+++ b/cabal-install/src/Distribution/Client/CmdHaddockProject.hs
@@ -4,7 +4,6 @@ module Distribution.Client.CmdHaddockProject
   ) where
 
 import Prelude ()
-import Data.Bool (bool)
 import Distribution.Client.Compat.Prelude hiding (get)
 
 import qualified Distribution.Client.CmdBuild   as CmdBuild
@@ -44,6 +43,7 @@ import Distribution.Client.TargetProblem      (TargetProblem(..))
 
 import Distribution.Types.PackageId (pkgName)
 import Distribution.Types.PackageName (unPackageName)
+import Distribution.Types.UnitId (unUnitId)
 import Distribution.Types.Version (mkVersion)
 import Distribution.Types.VersionRange (orLaterVersion)
 import Distribution.Types.InstalledPackageInfo (InstalledPackageInfo (..))
@@ -53,8 +53,6 @@ import Distribution.Simple.Compiler
          ( Compiler (..) )
 import Distribution.Simple.Flag
         ( Flag(..)
-        , flagElim
-        , flagToList
         , fromFlag
         , fromFlagOrDefault
         )
@@ -86,13 +84,6 @@ haddockProjectAction flags _extraArgs globalFlags = do
     let outputDir = normalise $ fromFlag (haddockProjectDir flags)
     createDirectoryIfMissingVerbose verbosity True outputDir
 
-    when ((2::Int) <=
-            ( flagElim 0 (bool 0 1) (haddockProjectHackage flags)
-            + flagElim 0 (bool 0 1) (haddockProjectLocal flags)
-            + flagElim 0 (const 1)  (haddockProjectHtmlLocation flags)
-            )) $
-      die' verbosity "Options `--local`, `--hackage` and `--html-location` are mutually exclusive`"
-
     warn verbosity "haddock-project command is experimental, it might break in the future"
 
     -- build all packages with appropriate haddock flags
@@ -115,12 +106,8 @@ haddockProjectAction flags _extraArgs globalFlags = do
           , haddockForeignLibs  = haddockProjectForeignLibs   flags
           , haddockInternal     = haddockProjectInternal      flags
           , haddockCss          = haddockProjectCss           flags
-          , haddockLinkedSource = if localOrHackage
-                                  then Flag True
-                                  else haddockProjectLinkedSource flags
-          , haddockQuickJump    = if localOrHackage
-                                  then Flag True
-                                  else haddockProjectQuickJump flags
+          , haddockLinkedSource = Flag True
+          , haddockQuickJump = Flag True
           , haddockHscolourCss  = haddockProjectHscolourCss    flags
           , haddockContents     = if localStyle then Flag (toPathTemplate "../index.html")
                                                 else NoFlag
@@ -142,7 +129,7 @@ haddockProjectAction flags _extraArgs globalFlags = do
     -- we need.
     --
 
-    withContextAndSelectors RejectNoTargets Nothing nixFlags ["all"] globalFlags HaddockCommand $ \targetCtx ctx targetSelectors -> do
+    withContextAndSelectors RejectNoTargets Nothing (commandDefaultFlags CmdBuild.buildCommand) ["all"] globalFlags HaddockCommand $ \targetCtx ctx targetSelectors -> do
       baseCtx <- case targetCtx of
         ProjectContext             -> return ctx
         GlobalContext              -> return ctx
@@ -193,6 +180,16 @@ haddockProjectAction flags _extraArgs globalFlags = do
              (orLaterVersion (mkVersion [2,26,1])) progs
 
       --
+      -- Build project; we need to build dependencies.
+      -- Issue #8958.
+      --
+
+      when localStyle $
+        CmdBuild.buildAction
+          (commandDefaultFlags CmdBuild.buildCommand)
+          ["all"]
+          globalFlags
+      --
       -- Build haddocks of each components
       --
 
@@ -210,6 +207,8 @@ haddockProjectAction flags _extraArgs globalFlags = do
           Left _ | not localStyle ->
             return []
           Left package -> do
+            -- TODO: this might not work for public packages with sublibraries.
+            -- Issue #9026.
             let packageName = unPackageName (pkgName $ sourcePackageId package)
                 destDir = outputDir </> packageName
             fmap catMaybes $ for (haddockInterfaces package) $ \interfacePath -> do
@@ -227,12 +226,13 @@ haddockProjectAction flags _extraArgs globalFlags = do
             case elabLocalToProject package of
               True -> do
                 let distDirParams = elabDistDirParams sharedConfig' package
+                    unitId = unUnitId (elabUnitId package)
                     buildDir = distBuildDirectory distLayout distDirParams
                     packageName = unPackageName (pkgName $ elabPkgSourceId package)
                 let docDir = buildDir
                          </> "doc" </> "html"
                          </> packageName
-                    destDir = outputDir </> packageName
+                    destDir = outputDir </> unitId
                     interfacePath = destDir
                                 </> packageName <.> "haddock"
                 a <- doesDirectoryExist docDir
@@ -242,11 +242,17 @@ haddockProjectAction flags _extraArgs globalFlags = do
                                    , interfacePath
                                    , Visible
                                    )]
-                  False -> return []
+                  False -> do
+                    warn verbosity
+                         ("haddocks of "
+                          ++ show unitId
+                          ++ " not found in the store")
+                    return []
               False | not localStyle ->
                 return []
               False -> do
                 let packageName = unPackageName (pkgName $ elabPkgSourceId package)
+                    unitId = unUnitId (elabUnitId package)
                     packageDir = storePackageDirectory (cabalStoreDirLayout cabalLayout)
                                    (compilerId (pkgConfigCompiler sharedConfig'))
                                    (elabUnitId package)
@@ -259,11 +265,16 @@ haddockProjectAction flags _extraArgs globalFlags = do
                   True  -> copyDirectoryRecursive verbosity docDir destDir
                         -- non local packages will be hidden in haddock's
                         -- generated contents page
-                        >> return [( packageName
+                        >> return [( unitId
                                    , interfacePath
                                    , Hidden
                                    )]
-                  False -> return []
+                  False -> do
+                    warn verbosity
+                         ("haddocks of "
+                          ++ show unitId
+                          ++ " not found in the store")
+                    return []
 
       --
       -- generate index, content, etc.
@@ -271,23 +282,13 @@ haddockProjectAction flags _extraArgs globalFlags = do
 
       let flags' = flags
             { haddockProjectDir         = Flag outputDir
-            , haddockProjectGenIndex    = if localOrHackage
-                                          then Flag True
-                                          else haddockProjectGenIndex flags
-            , haddockProjectGenContents = if localOrHackage
-                                          then Flag True
-                                          else haddockProjectGenContents flags
-            , haddockProjectQuickJump   = if localOrHackage
-                                          then Flag True
-                                          else haddockProjectQuickJump flags
-            , haddockProjectLinkedSource = haddockLinkedSource haddockFlags
             , haddockProjectInterfaces  = Flag
                 [ ( interfacePath
-                  , Just packageName
-                  , Just packageName
+                  , Just name
+                  , Just name
                   , visibility
                   )
-                | (packageName, interfacePath, visibility) <- packageInfos
+                | (name, interfacePath, visibility) <- packageInfos
                 ]
             }
       createHaddockIndex verbosity
@@ -302,17 +303,9 @@ haddockProjectAction flags _extraArgs globalFlags = do
     -- transitive dependencies; or depend on `--haddocks-html-location` to
     -- provide location of the documentation of dependencies.
     localStyle =
-      let local    = fromFlagOrDefault False (haddockProjectLocal flags)
-          hackage  = fromFlagOrDefault False (haddockProjectHackage flags)
+      let hackage  = fromFlagOrDefault False (haddockProjectHackage flags)
           location = fromFlagOrDefault False (const True <$> haddockProjectHtmlLocation flags)
-      in        local && not hackage && not location
-         -- or if none of the flags is given set `localStyle` to `True`
-         || not local && not hackage && not location
-
-
-    localOrHackage =
-      any id $ flagToList (haddockProjectLocal flags)
-            ++ flagToList (haddockProjectHackage flags)
+      in not hackage && not location
 
     reportTargetProblems :: Show x => [x] -> IO a
     reportTargetProblems =
diff --git a/cabal-install/tests/IntegrationTests2.hs b/cabal-install/tests/IntegrationTests2.hs
index 3e3907035e1..3d8ea79c238 100644
--- a/cabal-install/tests/IntegrationTests2.hs
+++ b/cabal-install/tests/IntegrationTests2.hs
@@ -37,13 +37,13 @@ import Distribution.Solver.Types.ConstraintSource
 import Distribution.Solver.Types.PackageConstraint
          ( PackageProperty(PackagePropertySource) )
 
-import qualified Distribution.Client.CmdBuild   as CmdBuild
-import qualified Distribution.Client.CmdRepl    as CmdRepl
-import qualified Distribution.Client.CmdRun     as CmdRun
-import qualified Distribution.Client.CmdTest    as CmdTest
-import qualified Distribution.Client.CmdBench   as CmdBench
-import qualified Distribution.Client.CmdHaddock as CmdHaddock
-import qualified Distribution.Client.CmdListBin as CmdListBin
+import qualified Distribution.Client.CmdBuild          as CmdBuild
+import qualified Distribution.Client.CmdRepl           as CmdRepl
+import qualified Distribution.Client.CmdRun            as CmdRun
+import qualified Distribution.Client.CmdTest           as CmdTest
+import qualified Distribution.Client.CmdBench          as CmdBench
+import qualified Distribution.Client.CmdHaddock        as CmdHaddock
+import qualified Distribution.Client.CmdListBin        as CmdListBin
 
 import Distribution.Package
 import Distribution.PackageDescription
@@ -59,6 +59,10 @@ import Distribution.Version
 import Distribution.ModuleName (ModuleName)
 import Distribution.Text
 import Distribution.Utils.Path
+import qualified Distribution.Client.CmdHaddockProject as CmdHaddockProject
+import Distribution.Client.Setup (globalStoreDir)
+import Distribution.Client.GlobalFlags (defaultGlobalFlags)
+import Distribution.Simple.Setup (HaddockProjectFlags(..), defaultHaddockProjectFlags)
 
 import qualified Data.Map as Map
 import qualified Data.Set as Set
@@ -155,6 +159,9 @@ tests config =
       testCase "Test Config options for commented options" testConfigOptionComments,
       testCase "Test Ignore Project Flag" testIgnoreProjectFlag
     ]
+  , testGroup "haddock-project"
+    [ testCase "dependencies" (testHaddockProjectDependencies config)
+    ]
   ]
 
 testFindProjectRoot :: Assertion
@@ -2210,3 +2217,36 @@ testIgnoreProjectFlag = do
     emptyConfig = mempty
     ignoreSetConfig :: ProjectConfig
     ignoreSetConfig = mempty { projectConfigShared = mempty { projectConfigIgnoreProject = Flag True } }
+
+
+cleanHaddockProject :: FilePath -> IO ()
+cleanHaddockProject testdir = do
+    cleanProject testdir
+    let haddocksdir = basedir </> testdir </> "haddocks"
+    alreadyExists <- doesDirectoryExist haddocksdir
+    when alreadyExists $ removePathForcibly haddocksdir
+    let storedir = basedir </> testdir </> "store"
+    alreadyExists' <- doesDirectoryExist storedir
+    when alreadyExists' $ removePathForcibly storedir
+
+
+testHaddockProjectDependencies :: ProjectConfig -> Assertion
+testHaddockProjectDependencies config = do
+    (_,_,sharedConfig) <- planProject testdir config
+    -- `haddock-project` is only supported by `haddock-2.26.1` and above which is
+    -- shipped with `ghc-9.4`
+    when (compilerVersion (pkgConfigCompiler sharedConfig) > mkVersion [9,4]) $ do
+      let dir = basedir </> testdir
+      cleanHaddockProject testdir
+      withCurrentDirectory dir $ do
+        CmdHaddockProject.haddockProjectAction
+          defaultHaddockProjectFlags { haddockProjectVerbosity = Flag verbosity }
+          ["all"]
+          defaultGlobalFlags { globalStoreDir = Flag "store" }
+
+        let haddock = "haddocks" </> "async" </> "async.haddock"
+        hasHaddock <- doesFileExist haddock
+        unless hasHaddock $ assertFailure ("File `" ++ haddock ++ "` does not exist.")
+      cleanHaddockProject testdir
+  where
+    testdir = "haddock-project/dependencies"
diff --git a/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/a.cabal b/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/a.cabal
new file mode 100644
index 00000000000..831be636bec
--- /dev/null
+++ b/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/a.cabal
@@ -0,0 +1,10 @@
+name: a
+version: 0.1.0.0
+build-type: Simple
+cabal-version: >= 1.10
+
+library
+    exposed-modules:  MyLib
+    build-depends:    base, async
+    hs-source-dirs:   src
+    default-language: Haskell2010
diff --git a/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/cabal.project b/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/cabal.project
new file mode 100644
index 00000000000..052c3c8685d
--- /dev/null
+++ b/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/cabal.project
@@ -0,0 +1,8 @@
+packages: .
+-- `jobs` is necessary to use `InternalMethod :: SetupMethod`.
+jobs: 1
+
+documentation: True
+
+package async
+  documentation: True
diff --git a/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/src/MyLib.hs b/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/src/MyLib.hs
new file mode 100644
index 00000000000..b0b955743ad
--- /dev/null
+++ b/cabal-install/tests/IntegrationTests2/haddock-project/dependencies/src/MyLib.hs
@@ -0,0 +1,6 @@
+module MyLib (someFunc) where
+
+import Control.Concurrent.Async
+
+someFunc :: IO (Async ())
+someFunc = async (return ())
diff --git a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.cabal.out b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.cabal.out
index 28d34c68971..835dd4e11e0 100644
--- a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.cabal.out
+++ b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.cabal.out
@@ -8,7 +8,7 @@ for mylib-0.1.0.0..
 Preprocessing library for mylib-0.1.0.0..
 Running Haddock on library instantiated with Database = <Database>
 for mylib-0.1.0.0..
-Documentation created: ../setup-external.cabal.dist/work/mylib/dist/doc/html/mylib/index.html
+Documentation created: ../setup-external.cabal.dist/work/mylib/dist/doc/html/mylib/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -22,7 +22,7 @@ Building library for mysql-0.1.0.0..
 # Setup haddock
 Preprocessing library for mysql-0.1.0.0..
 Running Haddock on library for mysql-0.1.0.0..
-Documentation created: ../setup-external.cabal.dist/work/mysql/dist/doc/html/mysql/index.html
+Documentation created: ../setup-external.cabal.dist/work/mysql/dist/doc/html/mysql/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -35,7 +35,7 @@ Building library for postgresql-0.1.0.0..
 # Setup haddock
 Preprocessing library for postgresql-0.1.0.0..
 Running Haddock on library for postgresql-0.1.0.0..
-Documentation created: ../setup-external.cabal.dist/work/postgresql/dist/doc/html/postgresql/index.html
+Documentation created: ../setup-external.cabal.dist/work/postgresql/dist/doc/html/postgresql/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -51,7 +51,7 @@ Preprocessing library for mylib-0.1.0.0..
 Running Haddock on library instantiated with
   Database = mysql-0.1.0.0:Database.MySQL
 for mylib-0.1.0.0..
-Documentation created: ../setup-external.cabal.dist/work/mylib/dist/doc/html/mylib/index.html
+Documentation created: ../setup-external.cabal.dist/work/mylib/dist/doc/html/mylib/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -69,7 +69,7 @@ Preprocessing library for mylib-0.1.0.0..
 Running Haddock on library instantiated with
   Database = postgresql-0.1.0.0:Database.PostgreSQL
 for mylib-0.1.0.0..
-Documentation created: ../setup-external.cabal.dist/work/mylib/dist/doc/html/mylib/index.html
+Documentation created: ../setup-external.cabal.dist/work/mylib/dist/doc/html/mylib/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -84,7 +84,7 @@ Building library for src-0.1.0.0..
 # Setup haddock
 Preprocessing library for src-0.1.0.0..
 Running Haddock on library for src-0.1.0.0..
-Documentation created: ../setup-external.cabal.dist/work/src/dist/doc/html/src/index.html
+Documentation created: ../setup-external.cabal.dist/work/src/dist/doc/html/src/
 # Setup copy
 Installing library in <PATH>
 # Setup register
diff --git a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.out b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.out
index af72c0bf26d..bb2feec4554 100644
--- a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.out
+++ b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-external.out
@@ -8,7 +8,7 @@ for mylib-0.1.0.0..
 Preprocessing library for mylib-0.1.0.0..
 Running Haddock on library instantiated with Database = <Database>
 for mylib-0.1.0.0..
-Documentation created: ../setup-external.dist/work/mylib/dist/doc/html/mylib/index.html
+Documentation created: ../setup-external.dist/work/mylib/dist/doc/html/mylib/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -22,7 +22,7 @@ Building library for mysql-0.1.0.0..
 # Setup haddock
 Preprocessing library for mysql-0.1.0.0..
 Running Haddock on library for mysql-0.1.0.0..
-Documentation created: ../setup-external.dist/work/mysql/dist/doc/html/mysql/index.html
+Documentation created: ../setup-external.dist/work/mysql/dist/doc/html/mysql/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -35,7 +35,7 @@ Building library for postgresql-0.1.0.0..
 # Setup haddock
 Preprocessing library for postgresql-0.1.0.0..
 Running Haddock on library for postgresql-0.1.0.0..
-Documentation created: ../setup-external.dist/work/postgresql/dist/doc/html/postgresql/index.html
+Documentation created: ../setup-external.dist/work/postgresql/dist/doc/html/postgresql/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -51,7 +51,7 @@ Preprocessing library for mylib-0.1.0.0..
 Running Haddock on library instantiated with
   Database = mysql-0.1.0.0:Database.MySQL
 for mylib-0.1.0.0..
-Documentation created: ../setup-external.dist/work/mylib/dist/doc/html/mylib/index.html
+Documentation created: ../setup-external.dist/work/mylib/dist/doc/html/mylib/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -69,7 +69,7 @@ Preprocessing library for mylib-0.1.0.0..
 Running Haddock on library instantiated with
   Database = postgresql-0.1.0.0:Database.PostgreSQL
 for mylib-0.1.0.0..
-Documentation created: ../setup-external.dist/work/mylib/dist/doc/html/mylib/index.html
+Documentation created: ../setup-external.dist/work/mylib/dist/doc/html/mylib/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -84,7 +84,7 @@ Building library for src-0.1.0.0..
 # Setup haddock
 Preprocessing library for src-0.1.0.0..
 Running Haddock on library for src-0.1.0.0..
-Documentation created: ../setup-external.dist/work/src/dist/doc/html/src/index.html
+Documentation created: ../setup-external.dist/work/src/dist/doc/html/src/
 # Setup copy
 Installing library in <PATH>
 # Setup register
diff --git a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.out b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.out
index 1735b0ac541..943686c035f 100644
--- a/cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.out
+++ b/cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.out
@@ -8,7 +8,7 @@ for Includes2-0.1.0.0..
 Preprocessing library 'mylib' for Includes2-0.1.0.0..
 Running Haddock on library 'mylib' instantiated with Database = <Database>
 for Includes2-0.1.0.0..
-Documentation created: setup-per-component.dist/work/dist/doc/html/Includes2/index.html
+Documentation created: setup-per-component.dist/work/dist/doc/html/Includes2/
 # Setup copy
 Installing internal library mylib in <PATH>
 # Setup register
@@ -22,7 +22,7 @@ Building library 'mysql' for Includes2-0.1.0.0..
 # Setup haddock
 Preprocessing library 'mysql' for Includes2-0.1.0.0..
 Running Haddock on library 'mysql' for Includes2-0.1.0.0..
-Documentation created: setup-per-component.dist/work/dist/doc/html/Includes2/index.html
+Documentation created: setup-per-component.dist/work/dist/doc/html/Includes2/
 # Setup copy
 Installing internal library mysql in <PATH>
 # Setup register
@@ -35,7 +35,7 @@ Building library 'postgresql' for Includes2-0.1.0.0..
 # Setup haddock
 Preprocessing library 'postgresql' for Includes2-0.1.0.0..
 Running Haddock on library 'postgresql' for Includes2-0.1.0.0..
-Documentation created: setup-per-component.dist/work/dist/doc/html/Includes2/index.html
+Documentation created: setup-per-component.dist/work/dist/doc/html/Includes2/
 # Setup copy
 Installing internal library postgresql in <PATH>
 # Setup register
@@ -54,7 +54,7 @@ Preprocessing library 'mylib' for Includes2-0.1.0.0..
 Running Haddock on library 'mylib' instantiated with
   Database = mysql-0.1.0.0:Database.MySQL
 for Includes2-0.1.0.0..
-Documentation created: setup-per-component.dist/work/dist/doc/html/Includes2/index.html
+Documentation created: setup-per-component.dist/work/dist/doc/html/Includes2/
 # Setup copy
 Installing internal library mylib in <PATH>
 # Setup register
@@ -75,7 +75,7 @@ Preprocessing library 'mylib' for Includes2-0.1.0.0..
 Running Haddock on library 'mylib' instantiated with
   Database = postgresql-0.1.0.0:Database.PostgreSQL
 for Includes2-0.1.0.0..
-Documentation created: setup-per-component.dist/work/dist/doc/html/Includes2/index.html
+Documentation created: setup-per-component.dist/work/dist/doc/html/Includes2/
 # Setup copy
 Installing internal library mylib in <PATH>
 # Setup register
@@ -90,7 +90,7 @@ Building library for Includes2-0.1.0.0..
 # Setup haddock
 Preprocessing library for Includes2-0.1.0.0..
 Running Haddock on library for Includes2-0.1.0.0..
-Documentation created: setup-per-component.dist/work/dist/doc/html/Includes2/index.html
+Documentation created: setup-per-component.dist/work/dist/doc/html/Includes2/
 # Setup copy
 Installing library in <PATH>
 # Setup register
diff --git a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-explicit.out b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-explicit.out
index da91bf8ad36..d46f08127ef 100644
--- a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-explicit.out
+++ b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-explicit.out
@@ -8,7 +8,7 @@ for sigs-0.1.0.0..
 Preprocessing library for sigs-0.1.0.0..
 Running Haddock on library instantiated with Data.Map = <Data.Map>
 for sigs-0.1.0.0..
-Documentation created: ../../setup-external-explicit.dist/work/repo/sigs-0.1.0.0/dist/doc/html/sigs/index.html
+Documentation created: ../../setup-external-explicit.dist/work/repo/sigs-0.1.0.0/dist/doc/html/sigs/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -24,7 +24,7 @@ for indef-0.1.0.0..
 Preprocessing library for indef-0.1.0.0..
 Running Haddock on library instantiated with Data.Map = <Data.Map>
 for indef-0.1.0.0..
-Documentation created: ../../setup-external-explicit.dist/work/repo/indef-0.1.0.0/dist/doc/html/indef/index.html
+Documentation created: ../../setup-external-explicit.dist/work/repo/indef-0.1.0.0/dist/doc/html/indef/
 # Setup copy
 Installing library in <PATH>
 # Setup register
diff --git a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.cabal.out b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.cabal.out
index c661e2a14ed..bdf40c0039f 100644
--- a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.cabal.out
+++ b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.cabal.out
@@ -8,7 +8,7 @@ for sigs-0.1.0.0..
 Preprocessing library for sigs-0.1.0.0..
 Running Haddock on library instantiated with Data.Map = <Data.Map>
 for sigs-0.1.0.0..
-Documentation created: ../../setup-external-ok.cabal.dist/work/repo/sigs-0.1.0.0/dist/doc/html/sigs/index.html
+Documentation created: ../../setup-external-ok.cabal.dist/work/repo/sigs-0.1.0.0/dist/doc/html/sigs/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -24,7 +24,7 @@ for indef-0.1.0.0..
 Preprocessing library for indef-0.1.0.0..
 Running Haddock on library instantiated with Data.Map = <Data.Map>
 for indef-0.1.0.0..
-Documentation created: ../../setup-external-ok.cabal.dist/work/repo/indef-0.1.0.0/dist/doc/html/indef/index.html
+Documentation created: ../../setup-external-ok.cabal.dist/work/repo/indef-0.1.0.0/dist/doc/html/indef/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -41,7 +41,7 @@ Preprocessing library for sigs-0.1.0.0..
 Running Haddock on library instantiated with
   Data.Map = containers-<VERSION>:Data.Map
 for sigs-0.1.0.0..
-Documentation created: ../../setup-external-ok.cabal.dist/work/repo/sigs-0.1.0.0/dist/doc/html/sigs/index.html
+Documentation created: ../../setup-external-ok.cabal.dist/work/repo/sigs-0.1.0.0/dist/doc/html/sigs/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -58,7 +58,7 @@ Preprocessing library for indef-0.1.0.0..
 Running Haddock on library instantiated with
   Data.Map = containers-<VERSION>:Data.Map
 for indef-0.1.0.0..
-Documentation created: ../../setup-external-ok.cabal.dist/work/repo/indef-0.1.0.0/dist/doc/html/indef/index.html
+Documentation created: ../../setup-external-ok.cabal.dist/work/repo/indef-0.1.0.0/dist/doc/html/indef/
 # Setup copy
 Installing library in <PATH>
 # Setup register
diff --git a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.out b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.out
index 474250807c8..125ebe2cf05 100644
--- a/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.out
+++ b/cabal-testsuite/PackageTests/Backpack/Includes3/setup-external-ok.out
@@ -8,7 +8,7 @@ for sigs-0.1.0.0..
 Preprocessing library for sigs-0.1.0.0..
 Running Haddock on library instantiated with Data.Map = <Data.Map>
 for sigs-0.1.0.0..
-Documentation created: ../../setup-external-ok.dist/work/repo/sigs-0.1.0.0/dist/doc/html/sigs/index.html
+Documentation created: ../../setup-external-ok.dist/work/repo/sigs-0.1.0.0/dist/doc/html/sigs/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -24,7 +24,7 @@ for indef-0.1.0.0..
 Preprocessing library for indef-0.1.0.0..
 Running Haddock on library instantiated with Data.Map = <Data.Map>
 for indef-0.1.0.0..
-Documentation created: ../../setup-external-ok.dist/work/repo/indef-0.1.0.0/dist/doc/html/indef/index.html
+Documentation created: ../../setup-external-ok.dist/work/repo/indef-0.1.0.0/dist/doc/html/indef/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -41,7 +41,7 @@ Preprocessing library for sigs-0.1.0.0..
 Running Haddock on library instantiated with
   Data.Map = containers-<VERSION>:Data.Map
 for sigs-0.1.0.0..
-Documentation created: ../../setup-external-ok.dist/work/repo/sigs-0.1.0.0/dist/doc/html/sigs/index.html
+Documentation created: ../../setup-external-ok.dist/work/repo/sigs-0.1.0.0/dist/doc/html/sigs/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -58,7 +58,7 @@ Preprocessing library for indef-0.1.0.0..
 Running Haddock on library instantiated with
   Data.Map = containers-<VERSION>:Data.Map
 for indef-0.1.0.0..
-Documentation created: ../../setup-external-ok.dist/work/repo/indef-0.1.0.0/dist/doc/html/indef/index.html
+Documentation created: ../../setup-external-ok.dist/work/repo/indef-0.1.0.0/dist/doc/html/indef/
 # Setup copy
 Installing library in <PATH>
 # Setup register
diff --git a/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.cabal.out b/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.cabal.out
index 925eb46040b..07eb138e639 100644
--- a/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.cabal.out
+++ b/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.cabal.out
@@ -6,7 +6,7 @@ Building library for p-0.1.0.0..
 # Setup haddock
 Preprocessing library for p-0.1.0.0..
 Running Haddock on library for p-0.1.0.0..
-Documentation created: ../setup.cabal.dist/work/p/dist/doc/html/p/index.html
+Documentation created: ../setup.cabal.dist/work/p/dist/doc/html/p/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -19,4 +19,4 @@ Building library for q-0.1.0.0..
 # Setup haddock
 Preprocessing library for q-0.1.0.0..
 Running Haddock on library for q-0.1.0.0..
-Documentation created: ../setup.cabal.dist/work/q/dist/doc/html/q/index.html
+Documentation created: ../setup.cabal.dist/work/q/dist/doc/html/q/
diff --git a/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.out b/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.out
index 47cafd236af..75143237c17 100644
--- a/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.out
+++ b/cabal-testsuite/PackageTests/Backpack/Reexport1/setup.out
@@ -6,7 +6,7 @@ Building library for p-0.1.0.0..
 # Setup haddock
 Preprocessing library for p-0.1.0.0..
 Running Haddock on library for p-0.1.0.0..
-Documentation created: ../setup.dist/work/p/dist/doc/html/p/index.html
+Documentation created: ../setup.dist/work/p/dist/doc/html/p/
 # Setup copy
 Installing library in <PATH>
 # Setup register
@@ -19,4 +19,4 @@ Building library for q-0.1.0.0..
 # Setup haddock
 Preprocessing library for q-0.1.0.0..
 Running Haddock on library for q-0.1.0.0..
-Documentation created: ../setup.dist/work/q/dist/doc/html/q/index.html
+Documentation created: ../setup.dist/work/q/dist/doc/html/q/
diff --git a/cabal-testsuite/PackageTests/Haddock/setup.cabal.out b/cabal-testsuite/PackageTests/Haddock/setup.cabal.out
index 09430defb6f..ca5b8af65b9 100644
--- a/cabal-testsuite/PackageTests/Haddock/setup.cabal.out
+++ b/cabal-testsuite/PackageTests/Haddock/setup.cabal.out
@@ -3,4 +3,4 @@ Configuring Haddock-0.1...
 # Setup haddock
 Preprocessing library for Haddock-0.1..
 Running Haddock on library for Haddock-0.1..
-Documentation created: setup.cabal.dist/work/dist/doc/html/Haddock/index.html
+Documentation created: setup.cabal.dist/work/dist/doc/html/Haddock/
diff --git a/cabal-testsuite/PackageTests/Haddock/setup.out b/cabal-testsuite/PackageTests/Haddock/setup.out
index d7e7e38acbb..351dc0b0955 100644
--- a/cabal-testsuite/PackageTests/Haddock/setup.out
+++ b/cabal-testsuite/PackageTests/Haddock/setup.out
@@ -3,4 +3,4 @@ Configuring Haddock-0.1...
 # Setup haddock
 Preprocessing library for Haddock-0.1..
 Running Haddock on library for Haddock-0.1..
-Documentation created: setup.dist/work/dist/doc/html/Haddock/index.html
+Documentation created: setup.dist/work/dist/doc/html/Haddock/
diff --git a/cabal-testsuite/PackageTests/HaddockArgs/quickjump.out b/cabal-testsuite/PackageTests/HaddockArgs/quickjump.out
index 3cafb20670e..6597cffcc0d 100644
--- a/cabal-testsuite/PackageTests/HaddockArgs/quickjump.out
+++ b/cabal-testsuite/PackageTests/HaddockArgs/quickjump.out
@@ -14,7 +14,7 @@ for sigs-0.1.0.0..
 Preprocessing library for sigs-0.1.0.0..
 Running Haddock on library instantiated with Data.Map = <Data.Map>
 for sigs-0.1.0.0..
-Documentation created: dist/doc/html/sigs/index.html
+Documentation created: dist/doc/html/sigs/
 Installing library in <PATH>
 Configuring library for indef-0.1.0.0..
 Preprocessing library for indef-0.1.0.0..
@@ -23,7 +23,7 @@ for indef-0.1.0.0..
 Preprocessing library for indef-0.1.0.0..
 Running Haddock on library instantiated with Data.Map = <Data.Map>
 for indef-0.1.0.0..
-Documentation created: dist/doc/html/indef/index.html
+Documentation created: dist/doc/html/indef/
 Installing library in <PATH>
 Configuring library for example-1.0..
 Preprocessing library for example-1.0..
@@ -32,4 +32,4 @@ for example-1.0..
 Preprocessing library for example-1.0..
 Running Haddock on library instantiated with Data.Map = <Data.Map>
 for example-1.0..
-Documentation created: <ROOT>/quickjump.dist/work/dist/build/<ARCH>/ghc-<GHCVER>/example-1.0/doc/html/example/index.html
\ No newline at end of file
+Documentation created: <ROOT>/quickjump.dist/work/dist/build/<ARCH>/ghc-<GHCVER>/example-1.0/doc/html/example/
diff --git a/cabal-testsuite/PackageTests/HaddockNewline/setup.cabal.out b/cabal-testsuite/PackageTests/HaddockNewline/setup.cabal.out
index a0978c99d95..d81487bbcec 100644
--- a/cabal-testsuite/PackageTests/HaddockNewline/setup.cabal.out
+++ b/cabal-testsuite/PackageTests/HaddockNewline/setup.cabal.out
@@ -3,4 +3,4 @@ Configuring HaddockNewline-0.1.0.0...
 # Setup haddock
 Preprocessing library for HaddockNewline-0.1.0.0..
 Running Haddock on library for HaddockNewline-0.1.0.0..
-Documentation created: setup.cabal.dist/work/dist/doc/html/HaddockNewline/index.html
+Documentation created: setup.cabal.dist/work/dist/doc/html/HaddockNewline/
diff --git a/cabal-testsuite/PackageTests/HaddockNewline/setup.out b/cabal-testsuite/PackageTests/HaddockNewline/setup.out
index 60784ec862c..112cf17ce0f 100644
--- a/cabal-testsuite/PackageTests/HaddockNewline/setup.out
+++ b/cabal-testsuite/PackageTests/HaddockNewline/setup.out
@@ -3,4 +3,4 @@ Configuring HaddockNewline-0.1.0.0...
 # Setup haddock
 Preprocessing library for HaddockNewline-0.1.0.0..
 Running Haddock on library for HaddockNewline-0.1.0.0..
-Documentation created: setup.dist/work/dist/doc/html/HaddockNewline/index.html
+Documentation created: setup.dist/work/dist/doc/html/HaddockNewline/
diff --git a/cabal-testsuite/PackageTests/HaddockProject/a.cabal b/cabal-testsuite/PackageTests/HaddockProject/a.cabal
new file mode 100644
index 00000000000..831be636bec
--- /dev/null
+++ b/cabal-testsuite/PackageTests/HaddockProject/a.cabal
@@ -0,0 +1,10 @@
+name: a
+version: 0.1.0.0
+build-type: Simple
+cabal-version: >= 1.10
+
+library
+    exposed-modules:  MyLib
+    build-depends:    base, async
+    hs-source-dirs:   src
+    default-language: Haskell2010
diff --git a/cabal-testsuite/PackageTests/HaddockProject/cabal.project b/cabal-testsuite/PackageTests/HaddockProject/cabal.project
new file mode 100644
index 00000000000..052c3c8685d
--- /dev/null
+++ b/cabal-testsuite/PackageTests/HaddockProject/cabal.project
@@ -0,0 +1,8 @@
+packages: .
+-- `jobs` is necessary to use `InternalMethod :: SetupMethod`.
+jobs: 1
+
+documentation: True
+
+package async
+  documentation: True
diff --git a/cabal-testsuite/PackageTests/HaddockProject/haddock-project.out b/cabal-testsuite/PackageTests/HaddockProject/haddock-project.out
new file mode 100644
index 00000000000..82067670822
--- /dev/null
+++ b/cabal-testsuite/PackageTests/HaddockProject/haddock-project.out
@@ -0,0 +1,25 @@
+# cabal v2-update
+Downloading the latest package list from test-local-repo
+# cabal haddock-project
+Warning: haddock-project command is experimental, it might break in the future
+Resolving dependencies...
+Build profile: -w ghc-<GHCVER> -O1
+In order, the following will be built:
+ - async-2.2.4 (lib) (requires build)
+ - a-0.1.0.0 (lib) (first run)
+Build profile: -w ghc-<GHCVER> -O1
+In order, the following will be built:
+ - async-2.2.4 (lib) (requires build)
+ - a-0.1.0.0 (lib) (configuration changed)
+Configuring library for async-2.2.4..
+Preprocessing library for async-2.2.4..
+Building library for async-2.2.4..
+Preprocessing library for async-2.2.4..
+Running Haddock on library for async-2.2.4..
+Documentation created: dist/doc/html/async/
+Installing library in <PATH>
+Configuring library for a-0.1.0.0..
+Preprocessing library for a-0.1.0.0..
+Running Haddock on library for a-0.1.0.0..
+Documentation created: <ROOT>/haddock-project.dist/source/dist-newstyle/build/<ARCH>/ghc-<GHCVER>/a-0.1.0.0/doc/html/a/
+Documentation created: haddocks/index.html
diff --git a/cabal-testsuite/PackageTests/HaddockProject/haddock-project.test.hs b/cabal-testsuite/PackageTests/HaddockProject/haddock-project.test.hs
new file mode 100644
index 00000000000..6d889a14163
--- /dev/null
+++ b/cabal-testsuite/PackageTests/HaddockProject/haddock-project.test.hs
@@ -0,0 +1,13 @@
+import Test.Cabal.Prelude
+import System.Directory (doesFileExist, removeDirectory)
+
+main = cabalTest . withRepo "repo" . withSourceCopy $ do
+    skipUnlessGhcVersion ">= 9.4.0"
+    env <- getTestEnv
+    let testDir = testCurrentDir env
+
+    cabal "haddock-project" ["all"]
+    let asyncHaddocks = "haddocks" </> "async" </> "async.haddock"
+    liftIO (doesFileExist (testDir </> asyncHaddocks))
+      >>= assertBool ("'" ++ asyncHaddocks ++ "'" ++ "should exist")
+
diff --git a/cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/Control/Concurrent/Async.hs b/cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/Control/Concurrent/Async.hs
new file mode 100644
index 00000000000..cedaa25747e
--- /dev/null
+++ b/cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/Control/Concurrent/Async.hs
@@ -0,0 +1,25 @@
+module Control.Concurrent.Async (
+    Async,
+    async
+  ) where
+
+
+-- -----------------------------------------------------------------------------
+-- STM Async API
+
+
+-- | An asynchronous action spawned by 'async' or 'withAsync'.
+-- Asynchronous actions are executed in a separate thread, and
+-- operations are provided for waiting for asynchronous actions to
+-- complete and obtaining their results (see e.g. 'wait').
+--
+data Async a = Async
+
+-- | Spawn an asynchronous action in a separate thread.
+--
+-- Like for 'forkIO', the action may be left running unintentinally
+-- (see module-level documentation for details).
+--
+-- __Use 'withAsync' style functions wherever you can instead!__
+async :: IO a -> IO (Async a)
+async = undefined
diff --git a/cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/LICENSE b/cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/LICENSE
new file mode 100644
index 00000000000..0acbb121f46
--- /dev/null
+++ b/cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/LICENSE
@@ -0,0 +1,30 @@
+Copyright (c) 2012, Simon Marlow
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of Simon Marlow nor the names of other
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/Setup.hs b/cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/Setup.hs
new file mode 100644
index 00000000000..9a994af677b
--- /dev/null
+++ b/cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/async.cabal b/cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/async.cabal
new file mode 100644
index 00000000000..27736a4eee1
--- /dev/null
+++ b/cabal-testsuite/PackageTests/HaddockProject/repo/async-2.2.4/async.cabal
@@ -0,0 +1,22 @@
+name:                async
+version:             2.2.4
+synopsis:            Run IO operations asynchronously and wait for their results
+license:             BSD3
+license-file:        LICENSE
+author:              Simon Marlow
+maintainer:          Simon Marlow <marlowsd@gmail.com>
+copyright:           (c) Simon Marlow 2012
+category:            Concurrency
+build-type:          Simple
+cabal-version:       >=1.10
+homepage:            https://github.com/simonmar/async
+bug-reports:         https://github.com/simonmar/async/issues
+
+source-repository head
+    type: git
+    location: https://github.com/simonmar/async.git
+
+library
+    default-language:    Haskell2010
+    exposed-modules:     Control.Concurrent.Async
+    build-depends:       base
diff --git a/cabal-testsuite/PackageTests/HaddockProject/src/MyLib.hs b/cabal-testsuite/PackageTests/HaddockProject/src/MyLib.hs
new file mode 100644
index 00000000000..b0b955743ad
--- /dev/null
+++ b/cabal-testsuite/PackageTests/HaddockProject/src/MyLib.hs
@@ -0,0 +1,6 @@
+module MyLib (someFunc) where
+
+import Control.Concurrent.Async
+
+someFunc :: IO (Async ())
+someFunc = async (return ())
diff --git a/cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.cabal.out b/cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.cabal.out
index 0488cfda73e..679ab70bf19 100644
--- a/cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.cabal.out
+++ b/cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.cabal.out
@@ -18,10 +18,10 @@ Registering library 'foo-internal-after' for foo-0.1.0.0..
 # Setup haddock
 Preprocessing library 'foo-internal-before' for foo-0.1.0.0..
 Running Haddock on library 'foo-internal-before' for foo-0.1.0.0..
-Documentation created: haddock.cabal.dist/work/dist/doc/html/foo/index.html
+Documentation created: haddock.cabal.dist/work/dist/doc/html/foo/
 Preprocessing library for foo-0.1.0.0..
 Running Haddock on library for foo-0.1.0.0..
-Documentation created: haddock.cabal.dist/work/dist/doc/html/foo/index.html
+Documentation created: haddock.cabal.dist/work/dist/doc/html/foo/
 Preprocessing library 'foo-internal-after' for foo-0.1.0.0..
 Running Haddock on library 'foo-internal-after' for foo-0.1.0.0..
-Documentation created: haddock.cabal.dist/work/dist/doc/html/foo/index.html
+Documentation created: haddock.cabal.dist/work/dist/doc/html/foo/
diff --git a/cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.out b/cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.out
index e469bdded3f..077dc9b86c5 100644
--- a/cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.out
+++ b/cabal-testsuite/PackageTests/InternalLibraries/Haddock/haddock.out
@@ -18,10 +18,10 @@ Registering library 'foo-internal-after' for foo-0.1.0.0..
 # Setup haddock
 Preprocessing library 'foo-internal-before' for foo-0.1.0.0..
 Running Haddock on library 'foo-internal-before' for foo-0.1.0.0..
-Documentation created: haddock.dist/work/dist/doc/html/foo/index.html
+Documentation created: haddock.dist/work/dist/doc/html/foo/
 Preprocessing library for foo-0.1.0.0..
 Running Haddock on library for foo-0.1.0.0..
-Documentation created: haddock.dist/work/dist/doc/html/foo/index.html
+Documentation created: haddock.dist/work/dist/doc/html/foo/
 Preprocessing library 'foo-internal-after' for foo-0.1.0.0..
 Running Haddock on library 'foo-internal-after' for foo-0.1.0.0..
-Documentation created: haddock.dist/work/dist/doc/html/foo/index.html
+Documentation created: haddock.dist/work/dist/doc/html/foo/
diff --git a/cabal-testsuite/PackageTests/NewHaddock/DisableDoc/cabal.out b/cabal-testsuite/PackageTests/NewHaddock/DisableDoc/cabal.out
index 8966072f81f..1a4d580a56e 100644
--- a/cabal-testsuite/PackageTests/NewHaddock/DisableDoc/cabal.out
+++ b/cabal-testsuite/PackageTests/NewHaddock/DisableDoc/cabal.out
@@ -13,4 +13,4 @@ Installing library in <PATH>
 Configuring library for B-0.1.0.0..
 Preprocessing library for B-0.1.0.0..
 Running Haddock on library for B-0.1.0.0..
-Documentation created: <ROOT>/cabal.dist/work/dist/build/<ARCH>/ghc-<GHCVER>/B-0.1.0.0/doc/html/B/index.html
+Documentation created: <ROOT>/cabal.dist/work/dist/build/<ARCH>/ghc-<GHCVER>/B-0.1.0.0/doc/html/B/
diff --git a/cabal-testsuite/PackageTests/NewHaddock/HaddockOutput/HaddockOutputCmd/cabal.out b/cabal-testsuite/PackageTests/NewHaddock/HaddockOutput/HaddockOutputCmd/cabal.out
new file mode 100644
index 00000000000..38e56384678
--- /dev/null
+++ b/cabal-testsuite/PackageTests/NewHaddock/HaddockOutput/HaddockOutputCmd/cabal.out
@@ -0,0 +1,11 @@
+# cabal v2-update
+Downloading the latest package list from test-local-repo
+# cabal haddock
+Resolving dependencies...
+Build profile: -w ghc-<GHCVER> -O1
+In order, the following will be built:
+ - A-0.0.0 (lib) (first run)
+Configuring library for A-0.0.0...
+Preprocessing library for A-0.0.0...
+Running Haddock on library for A-0.0.0...
+Documentation created: <ROOT>/docs/
diff --git a/cabal-testsuite/PackageTests/NewHaddock/HaddockOutput/HaddockOutputConfig/cabal.out b/cabal-testsuite/PackageTests/NewHaddock/HaddockOutput/HaddockOutputConfig/cabal.out
new file mode 100644
index 00000000000..38e56384678
--- /dev/null
+++ b/cabal-testsuite/PackageTests/NewHaddock/HaddockOutput/HaddockOutputConfig/cabal.out
@@ -0,0 +1,11 @@
+# cabal v2-update
+Downloading the latest package list from test-local-repo
+# cabal haddock
+Resolving dependencies...
+Build profile: -w ghc-<GHCVER> -O1
+In order, the following will be built:
+ - A-0.0.0 (lib) (first run)
+Configuring library for A-0.0.0...
+Preprocessing library for A-0.0.0...
+Running Haddock on library for A-0.0.0...
+Documentation created: <ROOT>/docs/
diff --git a/cabal-testsuite/PackageTests/NewHaddock/ImplyDependencies/cabal.out b/cabal-testsuite/PackageTests/NewHaddock/ImplyDependencies/cabal.out
index 42d235c367e..1fc340b970e 100644
--- a/cabal-testsuite/PackageTests/NewHaddock/ImplyDependencies/cabal.out
+++ b/cabal-testsuite/PackageTests/NewHaddock/ImplyDependencies/cabal.out
@@ -11,9 +11,9 @@ Preprocessing library for A-0.1.0.0..
 Building library for A-0.1.0.0..
 Preprocessing library for A-0.1.0.0..
 Running Haddock on library for A-0.1.0.0..
-Documentation created: dist/doc/html/A/index.html
+Documentation created: dist/doc/html/A/
 Installing library in <PATH>
 Configuring library for B-0.1.0.0..
 Preprocessing library for B-0.1.0.0..
 Running Haddock on library for B-0.1.0.0..
-Documentation created: <ROOT>/cabal.dist/work/dist/build/<ARCH>/ghc-<GHCVER>/B-0.1.0.0/doc/html/B/index.html
+Documentation created: <ROOT>/cabal.dist/work/dist/build/<ARCH>/ghc-<GHCVER>/B-0.1.0.0/doc/html/B/
diff --git a/cabal-testsuite/src/Test/Cabal/Prelude.hs b/cabal-testsuite/src/Test/Cabal/Prelude.hs
index fd6992d258d..eb3ca2a951c 100644
--- a/cabal-testsuite/src/Test/Cabal/Prelude.hs
+++ b/cabal-testsuite/src/Test/Cabal/Prelude.hs
@@ -293,6 +293,7 @@ cabalGArgs global_args cmd args input = do
               , "get", "unpack"
               , "info"
               , "init"
+              , "haddock-project"
               ]
           = [ ]
 
diff --git a/changelog.d/issue-8843 b/changelog.d/issue-8843
new file mode 100644
index 00000000000..fa1c93141fa
--- /dev/null
+++ b/changelog.d/issue-8843
@@ -0,0 +1,15 @@
+synopsis: changes to haddock-project command
+
+packages: cabal-install
+prs: #8919
+issues: #8843 #8958
+description: {
+
+- cabal haddock-project by default creates self contained
+  documentation (formerly it required `--local` switch, which is removed).
+- `--gen-contents`, `--gen-index`, `--quickjump` and `--hyperlinked-source`
+  options where removed as they are always passed to haddock.
+- Fixes a bug which prevented to use `haddock-project` with
+  packages containing sublibraries.
+
+}
diff --git a/doc/cabal-commands.rst b/doc/cabal-commands.rst
index 1b52f51f204..b3ee41aa34d 100644
--- a/doc/cabal-commands.rst
+++ b/doc/cabal-commands.rst
@@ -705,12 +705,8 @@ By default the documentation will be put in ``./haddocks`` folder, this can be
 modified with the ``--output`` flag.
 
 This command supports two primary modes: building a self contained directory
-(by specifying ``--local`` flag) or documentation that links to hackage (with
-``--hackage`` flag).  Both options imply: ``--quickjump``, ``--gen-index``,
-``--gen-contents`` and ``--hyperlinked-source``.
-
-If neither ``--local`` nor ``--hackage`` option is specified a self contained
-directory will only be build if ``--html-location`` is not specified.
+(which is the default mode) or documentation that links to hackage (with
+``--hackage`` flag).
 
 In both cases the html index as well as quickjump index will include all terms
 and types defined in any of the local packages, but not ones that are included
diff --git a/doc/requirements.txt b/doc/requirements.txt
index d65e0d37e15..441ab0baab0 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -37,7 +37,7 @@ pygments==2.14.0
     #   sphinx
 pytz==2021.3
     # via babel
-pyyaml==5.4.1
+pyyaml==6.0.1
     # via sphinx-jsonschema
 requests==2.26.0
     # via

From 852d255460e82981d9aa604da1e5a179111673f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= <hecate+github@glitchbra.in>
Date: Wed, 30 Aug 2023 00:08:38 +0200
Subject: [PATCH 079/144] Bump the version in cabal-install

---
 cabal-install/src/Distribution/Client/Version.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cabal-install/src/Distribution/Client/Version.hs b/cabal-install/src/Distribution/Client/Version.hs
index 5d434820441..2172884c1ac 100644
--- a/cabal-install/src/Distribution/Client/Version.hs
+++ b/cabal-install/src/Distribution/Client/Version.hs
@@ -13,4 +13,4 @@ import Distribution.Version
 -- program coverage information generated by HPC, and hence was moved to be a standalone value.
 --
 cabalInstallVersion :: Version
-cabalInstallVersion = mkVersion [3,10,1,0]
+cabalInstallVersion = mkVersion [3,10,2,0]

From 87882fef5db401c8448abe7c54f567d17f6eb36a Mon Sep 17 00:00:00 2001
From: Francesco Ariis <fa-ml@ariis.it>
Date: Fri, 14 Apr 2023 12:37:34 +0200
Subject: [PATCH 080/144] Fix `prefer-oldest` documentation

Available since 3.10, not 3.8.

(cherry picked from commit 7b40528f5b8b7133c681783fc1be064e72633365)
---
 doc/cabal-project.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/cabal-project.rst b/doc/cabal-project.rst
index 2e47dfdc53c..de8451bedc7 100644
--- a/doc/cabal-project.rst
+++ b/doc/cabal-project.rst
@@ -1747,7 +1747,7 @@ Most users generally won't need these.
                --prefer-oldest
                --no-prefer-oldest
     :synopsis: Prefer the oldest versions of packages available.
-    :since:    3.8
+    :since:    3.10
 
     :default:  False
 

From 3b74b6803d28678686ec20667fe2bafaf9a2b0c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Tue, 5 Sep 2023 22:42:14 +0200
Subject: [PATCH 081/144] Support GHC 9.8 in cabal 3.10.2.0 (#9225)

Co-authored-by: Ben Gamari <ben@smart-cactus.org>
---
 Cabal/src/Distribution/Simple/GHC.hs                     | 6 +++---
 cabal-install/src/Distribution/Client/ProjectPlanning.hs | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Cabal/src/Distribution/Simple/GHC.hs b/Cabal/src/Distribution/Simple/GHC.hs
index e3f5adcc487..4387da26369 100644
--- a/Cabal/src/Distribution/Simple/GHC.hs
+++ b/Cabal/src/Distribution/Simple/GHC.hs
@@ -140,12 +140,12 @@ configure verbosity hcPath hcPkgPath conf0 = do
       (userMaybeSpecifyPath "ghc" hcPath conf0)
   let implInfo = ghcVersionImplInfo ghcVersion
 
-  -- Cabal currently supports ghc >= 7.0.1 && < 9.8
+  -- Cabal currently supports ghc >= 7.0.1 && < 9.10
   -- ... and the following odd development version
-  unless (ghcVersion < mkVersion [9,8]) $
+  unless (ghcVersion < mkVersion [9,10]) $
     warn verbosity $
          "Unknown/unsupported 'ghc' version detected "
-      ++ "(Cabal " ++ prettyShow cabalVersion ++ " supports 'ghc' version < 9.8): "
+      ++ "(Cabal " ++ prettyShow cabalVersion ++ " supports 'ghc' version < 9.10): "
       ++ programPath ghcProg ++ " is version " ++ prettyShow ghcVersion
 
   -- This is slightly tricky, we have to configure ghc first, then we use the
diff --git a/cabal-install/src/Distribution/Client/ProjectPlanning.hs b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
index 05fbf69909e..0f09514fca4 100644
--- a/cabal-install/src/Distribution/Client/ProjectPlanning.hs
+++ b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
@@ -1218,6 +1218,7 @@ planPackages verbosity comp platform solver SolverSettings{..}
     -- TODO: long-term, this compatibility matrix should be
     --       stored as a field inside 'Distribution.Compiler.Compiler'
     setupMinCabalVersionConstraint
+      | isGHC, compVer >= mkVersion [9,8]  = mkVersion [3,10,2]
       | isGHC, compVer >= mkVersion [9,6]  = mkVersion [3,10]
       | isGHC, compVer >= mkVersion [9,4]  = mkVersion [3,8]
       | isGHC, compVer >= mkVersion [9,2]  = mkVersion [3,6]

From 9093f32ed57301278436fb2dd8f38b7ba6796aa6 Mon Sep 17 00:00:00 2001
From: Francesco Gazzetta <fgaz@fgaz.me>
Date: Mon, 24 Jul 2023 17:28:36 +0200
Subject: [PATCH 082/144] PD check: do not treat library names as package names
 (#9132)

Fixes #9122

(cherry picked from commit 4aa5f88618a29cb53b988a8ae859caa2c70a6e62)
---
 Cabal/src/Distribution/PackageDescription/Check.hs    |  6 +-----
 .../PackageTests/Regression/T9122/p/p.cabal           |  6 ++++++
 .../PackageTests/Regression/T9122/q/q.cabal           | 10 ++++++++++
 .../PackageTests/Regression/T9122/setup.cabal.out     | 11 +++++++++++
 .../PackageTests/Regression/T9122/setup.out           | 11 +++++++++++
 .../PackageTests/Regression/T9122/setup.test.hs       |  5 +++++
 changelog.d/issue-9122                                |  4 ++++
 7 files changed, 48 insertions(+), 5 deletions(-)
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9122/p/p.cabal
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9122/q/q.cabal
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9122/setup.cabal.out
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9122/setup.out
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9122/setup.test.hs
 create mode 100644 changelog.d/issue-9122

diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs
index 9a79fb4f683..166d53e0290 100644
--- a/Cabal/src/Distribution/PackageDescription/Check.hs
+++ b/Cabal/src/Distribution/PackageDescription/Check.hs
@@ -1210,17 +1210,13 @@ checkFields pkg =
       | (compiler, vr) <- testedWith pkg
       , isNoVersion vr ]
 
-    internalLibraries =
-        map (maybe (packageName pkg) unqualComponentNameToPackageName . libraryNameString . libName)
-            (allLibraries pkg)
-
     internalExecutables = map exeName $ executables pkg
 
     internalLibDeps =
       [ dep
       | bi <- allBuildInfo pkg
       , dep@(Dependency name _ _) <- targetBuildDepends bi
-      , name `elem` internalLibraries
+      , name == packageName pkg
       ]
 
     internalExeDeps =
diff --git a/cabal-testsuite/PackageTests/Regression/T9122/p/p.cabal b/cabal-testsuite/PackageTests/Regression/T9122/p/p.cabal
new file mode 100644
index 00000000000..1100690129a
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9122/p/p.cabal
@@ -0,0 +1,6 @@
+cabal-version:      3.4
+name:               p
+Version:            2
+Build-Type:         Simple
+
+library
diff --git a/cabal-testsuite/PackageTests/Regression/T9122/q/q.cabal b/cabal-testsuite/PackageTests/Regression/T9122/q/q.cabal
new file mode 100644
index 00000000000..d9bd9b331e5
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9122/q/q.cabal
@@ -0,0 +1,10 @@
+cabal-version:      3.4
+name:               q
+Version:            1
+Build-Type:         Simple
+
+library
+  build-depends:        q:p
+
+library p
+  build-depends:        p:p == 2
diff --git a/cabal-testsuite/PackageTests/Regression/T9122/setup.cabal.out b/cabal-testsuite/PackageTests/Regression/T9122/setup.cabal.out
new file mode 100644
index 00000000000..8957672640b
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9122/setup.cabal.out
@@ -0,0 +1,11 @@
+# Setup configure
+Configuring p-2...
+# Setup build
+Preprocessing library for p-2..
+Building library for p-2..
+# Setup copy
+Installing library in <PATH>
+# Setup register
+Registering library for p-2..
+# Setup configure
+Configuring q-1...
diff --git a/cabal-testsuite/PackageTests/Regression/T9122/setup.out b/cabal-testsuite/PackageTests/Regression/T9122/setup.out
new file mode 100644
index 00000000000..8957672640b
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9122/setup.out
@@ -0,0 +1,11 @@
+# Setup configure
+Configuring p-2...
+# Setup build
+Preprocessing library for p-2..
+Building library for p-2..
+# Setup copy
+Installing library in <PATH>
+# Setup register
+Registering library for p-2..
+# Setup configure
+Configuring q-1...
diff --git a/cabal-testsuite/PackageTests/Regression/T9122/setup.test.hs b/cabal-testsuite/PackageTests/Regression/T9122/setup.test.hs
new file mode 100644
index 00000000000..93a4a976b3b
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9122/setup.test.hs
@@ -0,0 +1,5 @@
+import Test.Cabal.Prelude
+
+main = setupAndCabalTest $ withPackageDb $ do
+  withDirectory "p" $ setup_install []
+  withDirectory "q" $ setup "configure" []
diff --git a/changelog.d/issue-9122 b/changelog.d/issue-9122
new file mode 100644
index 00000000000..c8d82af1d86
--- /dev/null
+++ b/changelog.d/issue-9122
@@ -0,0 +1,4 @@
+synopsis: Fix dependency on an external package when an internal library with the same name exists
+packages: Cabal
+issues: #9122
+prs: #9132

From 628e2dbc98a5735ca00ed57651341308a8eb6a93 Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Mon, 11 Sep 2023 10:57:09 +0200
Subject: [PATCH 083/144] Support text-2.1 in Cabal and Cabal-syntax (backport
 #9242) (#9243)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Hécate Moonlight <Kleidukos@users.noreply.github.com>
---
 Cabal-syntax/Cabal-syntax.cabal | 2 +-
 Cabal/Cabal.cabal               | 2 +-
 changelog.d/pr-9242             | 3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)
 create mode 100644 changelog.d/pr-9242

diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index f74b827e34b..7ec9b1064a8 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -39,7 +39,7 @@ library
     mtl        >= 2.1      && < 2.4,
     parsec     >= 3.1.13.0 && < 3.2,
     pretty     >= 1.1.1    && < 1.2,
-    text       (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.1),
+    text       (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.2),
     time       >= 1.4.0.1  && < 1.13,
     -- transformers-0.4.0.0 doesn't have record syntax e.g. for Identity
     -- See also https://github.com/ekmett/transformers-compat/issues/35
diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index da42b926e07..7f57a2e3b8b 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -302,7 +302,7 @@ library
     -- See also https://github.com/ekmett/transformers-compat/issues/35
     transformers (>= 0.3      && < 0.4) || (>=0.4.1.0 && <0.7),
     mtl           >= 2.1      && < 2.4,
-    text         (>= 1.2.3.0  && < 1.3) || (>= 2.0 && < 2.1),
+    text         (>= 1.2.3.0  && < 1.3) || (>= 2.0 && < 2.2),
     parsec        >= 3.1.13.0 && < 3.2
 
   other-modules:
diff --git a/changelog.d/pr-9242 b/changelog.d/pr-9242
new file mode 100644
index 00000000000..dfabc5fd982
--- /dev/null
+++ b/changelog.d/pr-9242
@@ -0,0 +1,3 @@
+synopsis: Support text-2.1 in Cabal and Cabal-syntax
+packages: Cabal Cabal-syntax
+prs: #9242

From 390dc1cab3d9710248a10df17470252873fa37d3 Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Thu, 14 Sep 2023 19:20:20 +0200
Subject: [PATCH 084/144] Allow bytestring-0.12 (backport #9241) (#9257)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Bodigrim <andrew.lelechenko@gmail.com>
Co-authored-by: Hécate Moonlight <Kleidukos@users.noreply.github.com>
---
 Cabal-syntax/Cabal-syntax.cabal                 | 2 +-
 Cabal/Cabal.cabal                               | 2 +-
 cabal-install-solver/cabal-install-solver.cabal | 2 +-
 cabal-install/cabal-install.cabal               | 2 +-
 cabal-testsuite/cabal-testsuite.cabal           | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index 7ec9b1064a8..6efbaeae07b 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -31,7 +31,7 @@ library
     array      >= 0.4.0.1  && < 0.6,
     base       >= 4.9      && < 5,
     binary     >= 0.7      && < 0.9,
-    bytestring >= 0.10.0.0 && < 0.12,
+    bytestring >= 0.10.0.0 && < 0.13,
     containers >= 0.5.0.0  && < 0.7,
     deepseq    >= 1.3.0.1  && < 1.6,
     directory  >= 1.2      && < 1.4,
diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index 7f57a2e3b8b..b669cf7092b 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -37,7 +37,7 @@ library
     Cabal-syntax ^>= 3.10,
     array      >= 0.4.0.1  && < 0.6,
     base       >= 4.9      && < 5,
-    bytestring >= 0.10.0.0 && < 0.12,
+    bytestring >= 0.10.0.0 && < 0.13,
     containers >= 0.5.0.0  && < 0.7,
     deepseq    >= 1.3.0.1  && < 1.6,
     directory  >= 1.2      && < 1.4,
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index cfd3398e1c3..df260d8bc06 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -106,7 +106,7 @@ library
   build-depends:
     , array         >=0.4      && <0.6
     , base          >=4.10     && <4.19
-    , bytestring    >=0.10.6.0 && <0.12
+    , bytestring    >=0.10.6.0 && <0.13
     , Cabal         ^>=3.10
     , Cabal-syntax  ^>=3.10
     , containers    >=0.5.6.2  && <0.7
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 2cae6726b2a..f206f635a47 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -207,7 +207,7 @@ library
         base16-bytestring >= 0.1.1 && < 1.1.0.0,
         base64-bytestring >= 1.0 && < 1.3,
         binary     >= 0.7.3    && < 0.9,
-        bytestring >= 0.10.6.0 && < 0.12,
+        bytestring >= 0.10.6.0 && < 0.13,
         containers >= 0.5.6.2  && < 0.7,
         cryptohash-sha256 >= 0.11 && < 0.12,
         directory  >= 1.3.7.0  && < 1.4,
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index 4b9a9f6eea6..ce93b72d7c9 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -61,7 +61,7 @@ library
     , async                 ^>= 2.2.1
     , attoparsec            ^>= 0.13.2.2 || ^>=0.14.1
     , base64-bytestring     ^>= 1.0.0.0 || ^>= 1.1.0.0 || ^>= 1.2.0.0
-    , bytestring            ^>= 0.10.0.2 || ^>= 0.11.0.0
+    , bytestring            ^>= 0.10.0.2 || ^>= 0.11.0.0 || ^>= 0.12.0.0
     , containers            ^>= 0.5.0.0 || ^>= 0.6.0.1
     , cryptohash-sha256     ^>= 0.11.101.0
     , directory             ^>= 1.2.0.1 || ^>= 1.3.0.0

From 720b6b1ab08655aa90c5454eefdcc5b4fa6e442b Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Mon, 18 Sep 2023 11:43:47 +0200
Subject: [PATCH 085/144] Future-proof against potential Prelude.foldl'
 (backport #8960) (#9265)

Co-authored-by: Bodigrim <andrew.lelechenko@gmail.com>
---
 Cabal-syntax/src/Distribution/Compat/Prelude.hs           | 6 +++---
 Cabal-tests/tests/UnitTests/Distribution/Utils/CharSet.hs | 3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Cabal-syntax/src/Distribution/Compat/Prelude.hs b/Cabal-syntax/src/Distribution/Compat/Prelude.hs
index 4c820e73c69..51a32f912b1 100644
--- a/Cabal-syntax/src/Distribution/Compat/Prelude.hs
+++ b/Cabal-syntax/src/Distribution/Compat/Prelude.hs
@@ -130,10 +130,9 @@ module Distribution.Compat.Prelude (
 
 -- We also could hide few partial function
 import Prelude                       as BasePrelude hiding
-    ( mapM, mapM_, sequence, null, length, foldr, any, all, head, tail, last, init
+    ( mapM, mapM_, sequence, any, all, head, tail, last, init
     -- partial functions
     , read
-    , foldr1, foldl1
 #if MINVER_base_411
     -- As of base 4.11.0.0 Prelude exports part of Semigroup(..).
     -- Hide this so we instead rely on Distribution.Compat.Semigroup.
@@ -142,8 +141,9 @@ import Prelude                       as BasePrelude hiding
     , Word
     -- We hide them, as we import only some members
     , Traversable, traverse, sequenceA
-    , Foldable, foldMap
+    , Foldable(..)
     )
+import Data.Foldable as BasePrelude (foldl, elem, sum, product, maximum, minimum)
 
 -- AMP
 import Data.Foldable
diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/CharSet.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/CharSet.hs
index 44efa858a01..c2180b630b7 100644
--- a/Cabal-tests/tests/UnitTests/Distribution/Utils/CharSet.hs
+++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/CharSet.hs
@@ -5,8 +5,9 @@
 #endif
 module UnitTests.Distribution.Utils.CharSet where
 
+import Prelude hiding (Foldable(..))
 import Data.Char        (isAlpha, isAlphaNum)
-import Data.List        (foldl')
+import Data.Foldable    (foldl')
 import Test.Tasty       (TestTree, testGroup)
 import Test.Tasty.HUnit (testCase, (@?=))
 

From a1095e3b65e327b9d1e4f88fc97fe02c6b3cc700 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Tue, 19 Sep 2023 21:06:12 +0200
Subject: [PATCH 086/144] Revert "Update SPDX license Ids & exceptions to 3.20"
 (#9259)

---
 .../Distribution/SPDX/LicenseExceptionId.hs   |   85 +-
 .../src/Distribution/SPDX/LicenseId.hs        |  564 +-
 .../Distribution/SPDX/LicenseListVersion.hs   |    3 +-
 Makefile                                      |    6 +-
 cabal-dev-scripts/cabal-dev-scripts.cabal     |    4 +-
 cabal-dev-scripts/src/GenSPDX.hs              |    1 -
 cabal-dev-scripts/src/GenSPDXExc.hs           |    1 -
 cabal-dev-scripts/src/GenUtils.hs             |   19 +-
 changelog.d/pr-9028                           |    7 -
 fix-whitespace.yaml                           |    1 -
 license-list-data/exceptions-3.20.json        |  558 --
 license-list-data/licenses-3.20.json          | 6744 -----------------
 templates/SPDX.LicenseExceptionId.template.hs |   11 +-
 templates/SPDX.LicenseId.template.hs          |   10 +-
 14 files changed, 146 insertions(+), 7868 deletions(-)
 delete mode 100644 changelog.d/pr-9028
 delete mode 100644 license-list-data/exceptions-3.20.json
 delete mode 100644 license-list-data/licenses-3.20.json

diff --git a/Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs b/Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs
index ddb98a5845a..b25a9e69341 100644
--- a/Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs
+++ b/Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs
@@ -29,12 +29,11 @@ import qualified Text.PrettyPrint as Disp
 -- LicenseExceptionId
 -------------------------------------------------------------------------------
 
--- | SPDX License Exceptions identifiers list v3.20
+-- | SPDX License Exceptions identifiers list v3.16
 data LicenseExceptionId
     = DS389_exception -- ^ @389-exception@, 389 Directory Server Exception
     | Autoconf_exception_2_0 -- ^ @Autoconf-exception-2.0@, Autoconf exception 2.0
     | Autoconf_exception_3_0 -- ^ @Autoconf-exception-3.0@, Autoconf exception 3.0
-    | Autoconf_exception_generic -- ^ @Autoconf-exception-generic@, Autoconf generic exception, SPDX License List 3.20
     | Bison_exception_2_2 -- ^ @Bison-exception-2.2@, Bison exception 2.2
     | Bootloader_exception -- ^ @Bootloader-exception@, Bootloader Distribution Exception
     | Classpath_exception_2_0 -- ^ @Classpath-exception-2.0@, Classpath exception 2.0
@@ -47,39 +46,32 @@ data LicenseExceptionId
     | Freertos_exception_2_0 -- ^ @freertos-exception-2.0@, FreeRTOS Exception 2.0
     | 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
-    | GNAT_exception -- ^ @GNAT-exception@, GNAT exception, SPDX License List 3.20
     | Gnu_javamail_exception -- ^ @gnu-javamail-exception@, GNU JavaMail exception
-    | GPL_3_0_linking_exception -- ^ @GPL-3.0-linking-exception@, GPL-3.0 Linking Exception, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | GPL_3_0_linking_source_exception -- ^ @GPL-3.0-linking-source-exception@, GPL-3.0 Linking Exception (with Corresponding Source), SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | GPL_CC_1_0 -- ^ @GPL-CC-1.0@, GPL Cooperation Commitment 1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | GStreamer_exception_2005 -- ^ @GStreamer-exception-2005@, GStreamer Exception (2005), SPDX License List 3.20
-    | GStreamer_exception_2008 -- ^ @GStreamer-exception-2008@, GStreamer Exception (2008), SPDX License List 3.20
+    | GPL_3_0_linking_exception -- ^ @GPL-3.0-linking-exception@, GPL-3.0 Linking Exception, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | GPL_3_0_linking_source_exception -- ^ @GPL-3.0-linking-source-exception@, GPL-3.0 Linking Exception (with Corresponding Source), SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | GPL_CC_1_0 -- ^ @GPL-CC-1.0@, GPL Cooperation Commitment 1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | I2p_gpl_java_exception -- ^ @i2p-gpl-java-exception@, i2p GPL+Java Exception
-    | KiCad_libraries_exception -- ^ @KiCad-libraries-exception@, KiCad Libraries Exception, SPDX License List 3.20
-    | LGPL_3_0_linking_exception -- ^ @LGPL-3.0-linking-exception@, LGPL-3.0 Linking Exception, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | LGPL_3_0_linking_exception -- ^ @LGPL-3.0-linking-exception@, LGPL-3.0 Linking Exception, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | 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, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | LLVM_exception -- ^ @LLVM-exception@, LLVM Exception, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | 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, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | OCaml_LGPL_linking_exception -- ^ @OCaml-LGPL-linking-exception@, OCaml LGPL Linking Exception, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | 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, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | 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.9, SPDX License List 3.10, SPDX License List 3.16
     | 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, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | QPL_1_0_INRIA_2004_exception -- ^ @QPL-1.0-INRIA-2004-exception@, INRIA QPL 1.0 2004 variant exception, SPDX License List 3.20
-    | 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.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | 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.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | 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.9, SPDX License List 3.10, SPDX License List 3.16
+    | 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.9, SPDX License List 3.10, SPDX License List 3.16
+    | 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.9, SPDX License List 3.10, SPDX License List 3.16
     | Qwt_exception_1_0 -- ^ @Qwt-exception-1.0@, Qwt exception 1.0
-    | SHL_2_0 -- ^ @SHL-2.0@, Solderpad Hardware License v2.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | SHL_2_1 -- ^ @SHL-2.1@, Solderpad Hardware License v2.1, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | SWI_exception -- ^ @SWI-exception@, SWI exception, SPDX License List 3.20
-    | Swift_exception -- ^ @Swift-exception@, Swift Exception, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | SHL_2_0 -- ^ @SHL-2.0@, Solderpad Hardware License v2.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | SHL_2_1 -- ^ @SHL-2.1@, Solderpad Hardware License v2.1, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | Swift_exception -- ^ @Swift-exception@, Swift Exception, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | 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, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | 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.9, SPDX License List 3.10, SPDX License List 3.16
     | WxWindows_exception_3_1 -- ^ @WxWindows-exception-3.1@, WxWindows Library Exception 3.1
-    | X11vnc_openssl_exception -- ^ @x11vnc-openssl-exception@, x11vnc OpenSSL Exception, SPDX License List 3.20
   deriving (Eq, Ord, Enum, Bounded, Show, Read, Typeable, Data, Generic)
 
 instance Binary LicenseExceptionId where
@@ -116,7 +108,6 @@ licenseExceptionId :: LicenseExceptionId -> String
 licenseExceptionId DS389_exception = "389-exception"
 licenseExceptionId Autoconf_exception_2_0 = "Autoconf-exception-2.0"
 licenseExceptionId Autoconf_exception_3_0 = "Autoconf-exception-3.0"
-licenseExceptionId Autoconf_exception_generic = "Autoconf-exception-generic"
 licenseExceptionId Bison_exception_2_2 = "Bison-exception-2.2"
 licenseExceptionId Bootloader_exception = "Bootloader-exception"
 licenseExceptionId Classpath_exception_2_0 = "Classpath-exception-2.0"
@@ -129,15 +120,11 @@ licenseExceptionId Font_exception_2_0 = "Font-exception-2.0"
 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 GNAT_exception = "GNAT-exception"
 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 GStreamer_exception_2005 = "GStreamer-exception-2005"
-licenseExceptionId GStreamer_exception_2008 = "GStreamer-exception-2008"
 licenseExceptionId I2p_gpl_java_exception = "i2p-gpl-java-exception"
-licenseExceptionId KiCad_libraries_exception = "KiCad-libraries-exception"
 licenseExceptionId LGPL_3_0_linking_exception = "LGPL-3.0-linking-exception"
 licenseExceptionId Libtool_exception = "Libtool-exception"
 licenseExceptionId Linux_syscall_note = "Linux-syscall-note"
@@ -150,25 +137,21 @@ licenseExceptionId OCCT_exception_1_0 = "OCCT-exception-1.0"
 licenseExceptionId OpenJDK_assembly_exception_1_0 = "OpenJDK-assembly-exception-1.0"
 licenseExceptionId Openvpn_openssl_exception = "openvpn-openssl-exception"
 licenseExceptionId PS_or_PDF_font_exception_20170817 = "PS-or-PDF-font-exception-20170817"
-licenseExceptionId QPL_1_0_INRIA_2004_exception = "QPL-1.0-INRIA-2004-exception"
 licenseExceptionId Qt_GPL_exception_1_0 = "Qt-GPL-exception-1.0"
 licenseExceptionId Qt_LGPL_exception_1_1 = "Qt-LGPL-exception-1.1"
 licenseExceptionId Qwt_exception_1_0 = "Qwt-exception-1.0"
 licenseExceptionId SHL_2_0 = "SHL-2.0"
 licenseExceptionId SHL_2_1 = "SHL-2.1"
-licenseExceptionId SWI_exception = "SWI-exception"
 licenseExceptionId Swift_exception = "Swift-exception"
 licenseExceptionId U_boot_exception_2_0 = "u-boot-exception-2.0"
 licenseExceptionId Universal_FOSS_exception_1_0 = "Universal-FOSS-exception-1.0"
 licenseExceptionId WxWindows_exception_3_1 = "WxWindows-exception-3.1"
-licenseExceptionId X11vnc_openssl_exception = "x11vnc-openssl-exception"
 
 -- | License name, e.g. @"GNU General Public License v2.0 only"@
 licenseExceptionName :: LicenseExceptionId -> String
 licenseExceptionName DS389_exception = "389 Directory Server Exception"
 licenseExceptionName Autoconf_exception_2_0 = "Autoconf exception 2.0"
 licenseExceptionName Autoconf_exception_3_0 = "Autoconf exception 3.0"
-licenseExceptionName Autoconf_exception_generic = "Autoconf generic exception"
 licenseExceptionName Bison_exception_2_2 = "Bison exception 2.2"
 licenseExceptionName Bootloader_exception = "Bootloader Distribution Exception"
 licenseExceptionName Classpath_exception_2_0 = "Classpath exception 2.0"
@@ -181,15 +164,11 @@ licenseExceptionName Font_exception_2_0 = "Font exception 2.0"
 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 GNAT_exception = "GNAT exception"
 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 GStreamer_exception_2005 = "GStreamer Exception (2005)"
-licenseExceptionName GStreamer_exception_2008 = "GStreamer Exception (2008)"
 licenseExceptionName I2p_gpl_java_exception = "i2p GPL+Java Exception"
-licenseExceptionName KiCad_libraries_exception = "KiCad Libraries Exception"
 licenseExceptionName LGPL_3_0_linking_exception = "LGPL-3.0 Linking Exception"
 licenseExceptionName Libtool_exception = "Libtool Exception"
 licenseExceptionName Linux_syscall_note = "Linux Syscall Note"
@@ -202,18 +181,15 @@ licenseExceptionName OCCT_exception_1_0 = "Open CASCADE Exception 1.0"
 licenseExceptionName OpenJDK_assembly_exception_1_0 = "OpenJDK Assembly exception 1.0"
 licenseExceptionName Openvpn_openssl_exception = "OpenVPN OpenSSL Exception"
 licenseExceptionName PS_or_PDF_font_exception_20170817 = "PS/PDF font exception (2017-08-17)"
-licenseExceptionName QPL_1_0_INRIA_2004_exception = "INRIA QPL 1.0 2004 variant exception"
 licenseExceptionName Qt_GPL_exception_1_0 = "Qt GPL exception 1.0"
 licenseExceptionName Qt_LGPL_exception_1_1 = "Qt LGPL exception 1.1"
 licenseExceptionName Qwt_exception_1_0 = "Qwt exception 1.0"
 licenseExceptionName SHL_2_0 = "Solderpad Hardware License v2.0"
 licenseExceptionName SHL_2_1 = "Solderpad Hardware License v2.1"
-licenseExceptionName SWI_exception = "SWI exception"
 licenseExceptionName Swift_exception = "Swift Exception"
 licenseExceptionName U_boot_exception_2_0 = "U-Boot exception 2.0"
 licenseExceptionName Universal_FOSS_exception_1_0 = "Universal FOSS Exception, Version 1.0"
 licenseExceptionName WxWindows_exception_3_1 = "WxWindows Library Exception 3.1"
-licenseExceptionName X11vnc_openssl_exception = "x11vnc OpenSSL Exception"
 
 -------------------------------------------------------------------------------
 -- Creation
@@ -297,32 +273,6 @@ licenseExceptionIdList LicenseListVersion_3_16 =
     ]
     ++ bulkOfLicenses
 
-licenseExceptionIdList LicenseListVersion_3_20 =
-    [ Autoconf_exception_generic
-    , GNAT_exception
-    , GPL_3_0_linking_exception
-    , GPL_3_0_linking_source_exception
-    , GPL_CC_1_0
-    , GStreamer_exception_2005
-    , GStreamer_exception_2008
-    , KiCad_libraries_exception
-    , LGPL_3_0_linking_exception
-    , LLVM_exception
-    , OCaml_LGPL_linking_exception
-    , OpenJDK_assembly_exception_1_0
-    , PS_or_PDF_font_exception_20170817
-    , QPL_1_0_INRIA_2004_exception
-    , Qt_GPL_exception_1_0
-    , Qt_LGPL_exception_1_1
-    , SHL_2_0
-    , SHL_2_1
-    , SWI_exception
-    , Swift_exception
-    , Universal_FOSS_exception_1_0
-    , X11vnc_openssl_exception
-    ]
-    ++ bulkOfLicenses
-
 -- | Create a 'LicenseExceptionId' from a 'String'.
 mkLicenseExceptionId :: LicenseListVersion -> String -> Maybe LicenseExceptionId
 mkLicenseExceptionId LicenseListVersion_3_0  s = Map.lookup s stringLookup_3_0
@@ -331,7 +281,6 @@ mkLicenseExceptionId LicenseListVersion_3_6  s = Map.lookup s stringLookup_3_6
 mkLicenseExceptionId LicenseListVersion_3_9  s = Map.lookup s stringLookup_3_9
 mkLicenseExceptionId LicenseListVersion_3_10 s = Map.lookup s stringLookup_3_10
 mkLicenseExceptionId LicenseListVersion_3_16 s = Map.lookup s stringLookup_3_16
-mkLicenseExceptionId LicenseListVersion_3_20 s = Map.lookup s stringLookup_3_20
 
 stringLookup_3_0 :: Map String LicenseExceptionId
 stringLookup_3_0 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
@@ -357,10 +306,6 @@ stringLookup_3_16 :: Map String LicenseExceptionId
 stringLookup_3_16 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
     licenseExceptionIdList LicenseListVersion_3_16
 
-stringLookup_3_20 :: Map String LicenseExceptionId
-stringLookup_3_20 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
-    licenseExceptionIdList LicenseListVersion_3_20
-
 --  | License exceptions in all SPDX License lists
 bulkOfLicenses :: [LicenseExceptionId]
 bulkOfLicenses =
diff --git a/Cabal-syntax/src/Distribution/SPDX/LicenseId.hs b/Cabal-syntax/src/Distribution/SPDX/LicenseId.hs
index 67d580906a2..6d5361ba366 100644
--- a/Cabal-syntax/src/Distribution/SPDX/LicenseId.hs
+++ b/Cabal-syntax/src/Distribution/SPDX/LicenseId.hs
@@ -32,12 +32,11 @@ import qualified Text.PrettyPrint as Disp
 -- LicenseId
 -------------------------------------------------------------------------------
 
--- | SPDX License identifiers list v3.20
+-- | SPDX License identifiers list v3.16
 data LicenseId
     = NullBSD -- ^ @0BSD@, BSD Zero Clause License
     | AAL -- ^ @AAL@, Attribution Assurance License
     | Abstyles -- ^ @Abstyles@, Abstyles License
-    | AdaCore_doc -- ^ @AdaCore-doc@, AdaCore Doc License, SPDX License List 3.20
     | Adobe_2006 -- ^ @Adobe-2006@, Adobe Systems Incorporated Source Code License Agreement
     | Adobe_Glyph -- ^ @Adobe-Glyph@, Adobe Glyph List License
     | ADSL -- ^ @ADSL@, Amazon Digital Services License
@@ -48,133 +47,122 @@ data LicenseId
     | AFL_3_0 -- ^ @AFL-3.0@, Academic Free License v3.0
     | Afmparse -- ^ @Afmparse@, Afmparse License
     | AGPL_1_0 -- ^ @AGPL-1.0@, Affero General Public License v1.0, SPDX License List 3.0
-    | AGPL_1_0_only -- ^ @AGPL-1.0-only@, Affero General Public License v1.0 only, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | AGPL_1_0_or_later -- ^ @AGPL-1.0-or-later@, Affero General Public License v1.0 or later, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | AGPL_1_0_only -- ^ @AGPL-1.0-only@, Affero General Public License v1.0 only, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | AGPL_1_0_or_later -- ^ @AGPL-1.0-or-later@, Affero General Public License v1.0 or later, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | AGPL_3_0_only -- ^ @AGPL-3.0-only@, GNU Affero General Public License v3.0 only
     | AGPL_3_0_or_later -- ^ @AGPL-3.0-or-later@, GNU Affero General Public License v3.0 or later
     | Aladdin -- ^ @Aladdin@, Aladdin Free Public License
     | AMDPLPA -- ^ @AMDPLPA@, AMD's plpa_map.c License
     | AML -- ^ @AML@, Apple MIT License
     | AMPAS -- ^ @AMPAS@, Academy of Motion Picture Arts and Sciences BSD
-    | ANTLR_PD_fallback -- ^ @ANTLR-PD-fallback@, ANTLR Software Rights Notice with license fallback, SPDX License List 3.16, SPDX License List 3.20
+    | ANTLR_PD_fallback -- ^ @ANTLR-PD-fallback@, ANTLR Software Rights Notice with license fallback, SPDX License List 3.16
     | ANTLR_PD -- ^ @ANTLR-PD@, ANTLR Software Rights Notice
     | Apache_1_0 -- ^ @Apache-1.0@, Apache License 1.0
     | Apache_1_1 -- ^ @Apache-1.1@, Apache License 1.1
     | Apache_2_0 -- ^ @Apache-2.0@, Apache License 2.0
     | APAFML -- ^ @APAFML@, Adobe Postscript AFM License
     | APL_1_0 -- ^ @APL-1.0@, Adaptive Public License 1.0
-    | App_s2p -- ^ @App-s2p@, App::s2p License, SPDX License List 3.16, SPDX License List 3.20
+    | App_s2p -- ^ @App-s2p@, App::s2p License, SPDX License List 3.16
     | APSL_1_0 -- ^ @APSL-1.0@, Apple Public Source License 1.0
     | APSL_1_1 -- ^ @APSL-1.1@, Apple Public Source License 1.1
     | APSL_1_2 -- ^ @APSL-1.2@, Apple Public Source License 1.2
     | APSL_2_0 -- ^ @APSL-2.0@, Apple Public Source License 2.0
-    | Arphic_1999 -- ^ @Arphic-1999@, Arphic Public License, SPDX License List 3.20
     | Artistic_1_0_cl8 -- ^ @Artistic-1.0-cl8@, Artistic License 1.0 w/clause 8
     | Artistic_1_0_Perl -- ^ @Artistic-1.0-Perl@, Artistic License 1.0 (Perl)
     | Artistic_1_0 -- ^ @Artistic-1.0@, Artistic License 1.0
     | Artistic_2_0 -- ^ @Artistic-2.0@, Artistic License 2.0
-    | Baekmuk -- ^ @Baekmuk@, Baekmuk License, SPDX License List 3.20
     | Bahyph -- ^ @Bahyph@, Bahyph License
     | Barr -- ^ @Barr@, Barr License
     | Beerware -- ^ @Beerware@, Beerware License
-    | Bitstream_Charter -- ^ @Bitstream-Charter@, Bitstream Charter Font License, SPDX License List 3.20
-    | Bitstream_Vera -- ^ @Bitstream-Vera@, Bitstream Vera Font License, SPDX License List 3.20
     | BitTorrent_1_0 -- ^ @BitTorrent-1.0@, BitTorrent Open Source License v1.0
     | BitTorrent_1_1 -- ^ @BitTorrent-1.1@, BitTorrent Open Source License v1.1
-    | Blessing -- ^ @blessing@, SQLite Blessing, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | BlueOak_1_0_0 -- ^ @BlueOak-1.0.0@, Blue Oak Model License 1.0.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | Blessing -- ^ @blessing@, SQLite Blessing, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | BlueOak_1_0_0 -- ^ @BlueOak-1.0.0@, Blue Oak Model License 1.0.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | Borceux -- ^ @Borceux@, Borceux license
-    | Brian_Gladman_3_Clause -- ^ @Brian-Gladman-3-Clause@, Brian Gladman 3-Clause License, SPDX License List 3.20
     | BSD_1_Clause -- ^ @BSD-1-Clause@, BSD 1-Clause License
     | BSD_2_Clause_FreeBSD -- ^ @BSD-2-Clause-FreeBSD@, BSD 2-Clause FreeBSD License, SPDX License List 3.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9
     | BSD_2_Clause_NetBSD -- ^ @BSD-2-Clause-NetBSD@, BSD 2-Clause NetBSD License, SPDX License List 3.0, SPDX License List 3.2, SPDX License List 3.6
     | BSD_2_Clause_Patent -- ^ @BSD-2-Clause-Patent@, BSD-2-Clause Plus Patent License
-    | BSD_2_Clause_Views -- ^ @BSD-2-Clause-Views@, BSD 2-Clause with views sentence, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | BSD_2_Clause_Views -- ^ @BSD-2-Clause-Views@, BSD 2-Clause with views sentence, SPDX License List 3.10, SPDX License List 3.16
     | BSD_2_Clause -- ^ @BSD-2-Clause@, BSD 2-Clause "Simplified" License
     | BSD_3_Clause_Attribution -- ^ @BSD-3-Clause-Attribution@, BSD with attribution
     | BSD_3_Clause_Clear -- ^ @BSD-3-Clause-Clear@, BSD 3-Clause Clear License
     | BSD_3_Clause_LBNL -- ^ @BSD-3-Clause-LBNL@, Lawrence Berkeley National Labs BSD variant license
-    | BSD_3_Clause_Modification -- ^ @BSD-3-Clause-Modification@, BSD 3-Clause Modification, SPDX License List 3.16, SPDX License List 3.20
-    | BSD_3_Clause_No_Military_License -- ^ @BSD-3-Clause-No-Military-License@, BSD 3-Clause No Military License, SPDX License List 3.16, SPDX License List 3.20
+    | BSD_3_Clause_Modification -- ^ @BSD-3-Clause-Modification@, BSD 3-Clause Modification, SPDX License List 3.16
+    | BSD_3_Clause_No_Military_License -- ^ @BSD-3-Clause-No-Military-License@, BSD 3-Clause No Military License, SPDX License List 3.16
     | BSD_3_Clause_No_Nuclear_License_2014 -- ^ @BSD-3-Clause-No-Nuclear-License-2014@, BSD 3-Clause No Nuclear License 2014
     | BSD_3_Clause_No_Nuclear_License -- ^ @BSD-3-Clause-No-Nuclear-License@, BSD 3-Clause No Nuclear License
     | BSD_3_Clause_No_Nuclear_Warranty -- ^ @BSD-3-Clause-No-Nuclear-Warranty@, BSD 3-Clause No Nuclear Warranty
-    | BSD_3_Clause_Open_MPI -- ^ @BSD-3-Clause-Open-MPI@, BSD 3-Clause Open MPI variant, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | BSD_3_Clause_Open_MPI -- ^ @BSD-3-Clause-Open-MPI@, BSD 3-Clause Open MPI variant, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | BSD_3_Clause -- ^ @BSD-3-Clause@, BSD 3-Clause "New" or "Revised" License
-    | BSD_4_Clause_Shortened -- ^ @BSD-4-Clause-Shortened@, BSD 4 Clause Shortened, SPDX License List 3.16, SPDX License List 3.20
+    | BSD_4_Clause_Shortened -- ^ @BSD-4-Clause-Shortened@, BSD 4 Clause Shortened, SPDX License List 3.16
     | BSD_4_Clause_UC -- ^ @BSD-4-Clause-UC@, BSD-4-Clause (University of California-Specific)
     | BSD_4_Clause -- ^ @BSD-4-Clause@, BSD 4-Clause "Original" or "Old" License
-    | BSD_4_3RENO -- ^ @BSD-4.3RENO@, BSD 4.3 RENO License, SPDX License List 3.20
-    | BSD_4_3TAHOE -- ^ @BSD-4.3TAHOE@, BSD 4.3 TAHOE License, SPDX License List 3.20
-    | BSD_Advertising_Acknowledgement -- ^ @BSD-Advertising-Acknowledgement@, BSD Advertising Acknowledgement License, SPDX License List 3.20
-    | BSD_Attribution_HPND_disclaimer -- ^ @BSD-Attribution-HPND-disclaimer@, BSD with Attribution and HPND disclaimer, SPDX License List 3.20
     | BSD_Protection -- ^ @BSD-Protection@, BSD Protection License
     | BSD_Source_Code -- ^ @BSD-Source-Code@, BSD Source Code Attribution
     | BSL_1_0 -- ^ @BSL-1.0@, Boost Software License 1.0
     | Bzip2_1_0_5 -- ^ @bzip2-1.0.5@, bzip2 and libbzip2 License v1.0.5, SPDX License List 3.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10
-    | BUSL_1_1 -- ^ @BUSL-1.1@, Business Source License 1.1, SPDX License List 3.16, SPDX License List 3.20
+    | BUSL_1_1 -- ^ @BUSL-1.1@, Business Source License 1.1, SPDX License List 3.16
     | Bzip2_1_0_6 -- ^ @bzip2-1.0.6@, bzip2 and libbzip2 License v1.0.6
-    | C_UDA_1_0 -- ^ @C-UDA-1.0@, Computational Use of Data Agreement v1.0, SPDX License List 3.16, SPDX License List 3.20
-    | CAL_1_0_Combined_Work_Exception -- ^ @CAL-1.0-Combined-Work-Exception@, Cryptographic Autonomy License 1.0 (Combined Work Exception), SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | CAL_1_0 -- ^ @CAL-1.0@, Cryptographic Autonomy License 1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | C_UDA_1_0 -- ^ @C-UDA-1.0@, Computational Use of Data Agreement v1.0, SPDX License List 3.16
+    | CAL_1_0_Combined_Work_Exception -- ^ @CAL-1.0-Combined-Work-Exception@, Cryptographic Autonomy License 1.0 (Combined Work Exception), SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | CAL_1_0 -- ^ @CAL-1.0@, Cryptographic Autonomy License 1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | Caldera -- ^ @Caldera@, Caldera License
     | CATOSL_1_1 -- ^ @CATOSL-1.1@, Computer Associates Trusted Open Source License 1.1
     | CC_BY_1_0 -- ^ @CC-BY-1.0@, Creative Commons Attribution 1.0 Generic
     | CC_BY_2_0 -- ^ @CC-BY-2.0@, Creative Commons Attribution 2.0 Generic
-    | CC_BY_2_5_AU -- ^ @CC-BY-2.5-AU@, Creative Commons Attribution 2.5 Australia, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_2_5_AU -- ^ @CC-BY-2.5-AU@, Creative Commons Attribution 2.5 Australia, SPDX License List 3.16
     | CC_BY_2_5 -- ^ @CC-BY-2.5@, Creative Commons Attribution 2.5 Generic
-    | CC_BY_3_0_AT -- ^ @CC-BY-3.0-AT@, Creative Commons Attribution 3.0 Austria, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | CC_BY_3_0_DE -- ^ @CC-BY-3.0-DE@, Creative Commons Attribution 3.0 Germany, SPDX License List 3.16, SPDX License List 3.20
-    | CC_BY_3_0_IGO -- ^ @CC-BY-3.0-IGO@, Creative Commons Attribution 3.0 IGO, SPDX License List 3.20
-    | CC_BY_3_0_NL -- ^ @CC-BY-3.0-NL@, Creative Commons Attribution 3.0 Netherlands, SPDX License List 3.16, SPDX License List 3.20
-    | CC_BY_3_0_US -- ^ @CC-BY-3.0-US@, Creative Commons Attribution 3.0 United States, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_3_0_AT -- ^ @CC-BY-3.0-AT@, Creative Commons Attribution 3.0 Austria, SPDX License List 3.10, SPDX License List 3.16
+    | CC_BY_3_0_DE -- ^ @CC-BY-3.0-DE@, Creative Commons Attribution 3.0 Germany, SPDX License List 3.16
+    | CC_BY_3_0_NL -- ^ @CC-BY-3.0-NL@, Creative Commons Attribution 3.0 Netherlands, SPDX License List 3.16
+    | CC_BY_3_0_US -- ^ @CC-BY-3.0-US@, Creative Commons Attribution 3.0 United States, SPDX License List 3.16
     | CC_BY_3_0 -- ^ @CC-BY-3.0@, Creative Commons Attribution 3.0 Unported
     | CC_BY_4_0 -- ^ @CC-BY-4.0@, Creative Commons Attribution 4.0 International
     | CC_BY_NC_1_0 -- ^ @CC-BY-NC-1.0@, Creative Commons Attribution Non Commercial 1.0 Generic
     | CC_BY_NC_2_0 -- ^ @CC-BY-NC-2.0@, Creative Commons Attribution Non Commercial 2.0 Generic
     | CC_BY_NC_2_5 -- ^ @CC-BY-NC-2.5@, Creative Commons Attribution Non Commercial 2.5 Generic
-    | CC_BY_NC_3_0_DE -- ^ @CC-BY-NC-3.0-DE@, Creative Commons Attribution Non Commercial 3.0 Germany, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_NC_3_0_DE -- ^ @CC-BY-NC-3.0-DE@, Creative Commons Attribution Non Commercial 3.0 Germany, SPDX License List 3.16
     | CC_BY_NC_3_0 -- ^ @CC-BY-NC-3.0@, Creative Commons Attribution Non Commercial 3.0 Unported
     | CC_BY_NC_4_0 -- ^ @CC-BY-NC-4.0@, Creative Commons Attribution Non Commercial 4.0 International
     | CC_BY_NC_ND_1_0 -- ^ @CC-BY-NC-ND-1.0@, Creative Commons Attribution Non Commercial No Derivatives 1.0 Generic
     | CC_BY_NC_ND_2_0 -- ^ @CC-BY-NC-ND-2.0@, Creative Commons Attribution Non Commercial No Derivatives 2.0 Generic
     | CC_BY_NC_ND_2_5 -- ^ @CC-BY-NC-ND-2.5@, Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic
-    | CC_BY_NC_ND_3_0_DE -- ^ @CC-BY-NC-ND-3.0-DE@, Creative Commons Attribution Non Commercial No Derivatives 3.0 Germany, SPDX License List 3.16, SPDX License List 3.20
-    | CC_BY_NC_ND_3_0_IGO -- ^ @CC-BY-NC-ND-3.0-IGO@, Creative Commons Attribution Non Commercial No Derivatives 3.0 IGO, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_NC_ND_3_0_DE -- ^ @CC-BY-NC-ND-3.0-DE@, Creative Commons Attribution Non Commercial No Derivatives 3.0 Germany, SPDX License List 3.16
+    | CC_BY_NC_ND_3_0_IGO -- ^ @CC-BY-NC-ND-3.0-IGO@, Creative Commons Attribution Non Commercial No Derivatives 3.0 IGO, SPDX License List 3.10, SPDX License List 3.16
     | CC_BY_NC_ND_3_0 -- ^ @CC-BY-NC-ND-3.0@, Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported
     | CC_BY_NC_ND_4_0 -- ^ @CC-BY-NC-ND-4.0@, Creative Commons Attribution Non Commercial No Derivatives 4.0 International
     | CC_BY_NC_SA_1_0 -- ^ @CC-BY-NC-SA-1.0@, Creative Commons Attribution Non Commercial Share Alike 1.0 Generic
-    | CC_BY_NC_SA_2_0_DE -- ^ @CC-BY-NC-SA-2.0-DE@, Creative Commons Attribution Non Commercial Share Alike 2.0 Germany, SPDX License List 3.20
-    | CC_BY_NC_SA_2_0_FR -- ^ @CC-BY-NC-SA-2.0-FR@, Creative Commons Attribution-NonCommercial-ShareAlike 2.0 France, SPDX License List 3.16, SPDX License List 3.20
-    | CC_BY_NC_SA_2_0_UK -- ^ @CC-BY-NC-SA-2.0-UK@, Creative Commons Attribution Non Commercial Share Alike 2.0 England and Wales, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_NC_SA_2_0_FR -- ^ @CC-BY-NC-SA-2.0-FR@, Creative Commons Attribution-NonCommercial-ShareAlike 2.0 France, SPDX License List 3.16
+    | CC_BY_NC_SA_2_0_UK -- ^ @CC-BY-NC-SA-2.0-UK@, Creative Commons Attribution Non Commercial Share Alike 2.0 England and Wales, SPDX License List 3.16
     | CC_BY_NC_SA_2_0 -- ^ @CC-BY-NC-SA-2.0@, Creative Commons Attribution Non Commercial Share Alike 2.0 Generic
     | CC_BY_NC_SA_2_5 -- ^ @CC-BY-NC-SA-2.5@, Creative Commons Attribution Non Commercial Share Alike 2.5 Generic
-    | CC_BY_NC_SA_3_0_DE -- ^ @CC-BY-NC-SA-3.0-DE@, Creative Commons Attribution Non Commercial Share Alike 3.0 Germany, SPDX License List 3.16, SPDX License List 3.20
-    | CC_BY_NC_SA_3_0_IGO -- ^ @CC-BY-NC-SA-3.0-IGO@, Creative Commons Attribution Non Commercial Share Alike 3.0 IGO, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_NC_SA_3_0_DE -- ^ @CC-BY-NC-SA-3.0-DE@, Creative Commons Attribution Non Commercial Share Alike 3.0 Germany, SPDX License List 3.16
+    | CC_BY_NC_SA_3_0_IGO -- ^ @CC-BY-NC-SA-3.0-IGO@, Creative Commons Attribution Non Commercial Share Alike 3.0 IGO, SPDX License List 3.16
     | CC_BY_NC_SA_3_0 -- ^ @CC-BY-NC-SA-3.0@, Creative Commons Attribution Non Commercial Share Alike 3.0 Unported
     | CC_BY_NC_SA_4_0 -- ^ @CC-BY-NC-SA-4.0@, Creative Commons Attribution Non Commercial Share Alike 4.0 International
     | CC_BY_ND_1_0 -- ^ @CC-BY-ND-1.0@, Creative Commons Attribution No Derivatives 1.0 Generic
     | CC_BY_ND_2_0 -- ^ @CC-BY-ND-2.0@, Creative Commons Attribution No Derivatives 2.0 Generic
     | CC_BY_ND_2_5 -- ^ @CC-BY-ND-2.5@, Creative Commons Attribution No Derivatives 2.5 Generic
-    | CC_BY_ND_3_0_DE -- ^ @CC-BY-ND-3.0-DE@, Creative Commons Attribution No Derivatives 3.0 Germany, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_ND_3_0_DE -- ^ @CC-BY-ND-3.0-DE@, Creative Commons Attribution No Derivatives 3.0 Germany, SPDX License List 3.16
     | CC_BY_ND_3_0 -- ^ @CC-BY-ND-3.0@, Creative Commons Attribution No Derivatives 3.0 Unported
     | CC_BY_ND_4_0 -- ^ @CC-BY-ND-4.0@, Creative Commons Attribution No Derivatives 4.0 International
     | CC_BY_SA_1_0 -- ^ @CC-BY-SA-1.0@, Creative Commons Attribution Share Alike 1.0 Generic
-    | CC_BY_SA_2_0_UK -- ^ @CC-BY-SA-2.0-UK@, Creative Commons Attribution Share Alike 2.0 England and Wales, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_SA_2_0_UK -- ^ @CC-BY-SA-2.0-UK@, Creative Commons Attribution Share Alike 2.0 England and Wales, SPDX License List 3.16
     | CC_BY_SA_2_0 -- ^ @CC-BY-SA-2.0@, Creative Commons Attribution Share Alike 2.0 Generic
-    | CC_BY_SA_2_1_JP -- ^ @CC-BY-SA-2.1-JP@, Creative Commons Attribution Share Alike 2.1 Japan, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_SA_2_1_JP -- ^ @CC-BY-SA-2.1-JP@, Creative Commons Attribution Share Alike 2.1 Japan, SPDX License List 3.16
     | CC_BY_SA_2_5 -- ^ @CC-BY-SA-2.5@, Creative Commons Attribution Share Alike 2.5 Generic
-    | CC_BY_SA_3_0_AT -- ^ @CC-BY-SA-3.0-AT@, Creative Commons Attribution Share Alike 3.0 Austria, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | CC_BY_SA_3_0_DE -- ^ @CC-BY-SA-3.0-DE@, Creative Commons Attribution Share Alike 3.0 Germany, SPDX License List 3.16, SPDX License List 3.20
+    | CC_BY_SA_3_0_AT -- ^ @CC-BY-SA-3.0-AT@, Creative Commons Attribution Share Alike 3.0 Austria, SPDX License List 3.10, SPDX License List 3.16
+    | CC_BY_SA_3_0_DE -- ^ @CC-BY-SA-3.0-DE@, Creative Commons Attribution Share Alike 3.0 Germany, SPDX License List 3.16
     | CC_BY_SA_3_0 -- ^ @CC-BY-SA-3.0@, Creative Commons Attribution Share Alike 3.0 Unported
     | CC_BY_SA_4_0 -- ^ @CC-BY-SA-4.0@, Creative Commons Attribution Share Alike 4.0 International
-    | CC_PDDC -- ^ @CC-PDDC@, Creative Commons Public Domain Dedication and Certification, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | CC_PDDC -- ^ @CC-PDDC@, Creative Commons Public Domain Dedication and Certification, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | CC0_1_0 -- ^ @CC0-1.0@, Creative Commons Zero v1.0 Universal
     | CDDL_1_0 -- ^ @CDDL-1.0@, Common Development and Distribution License 1.0
     | CDDL_1_1 -- ^ @CDDL-1.1@, Common Development and Distribution License 1.1
-    | CDL_1_0 -- ^ @CDL-1.0@, Common Documentation License 1.0, SPDX License List 3.16, SPDX License List 3.20
+    | CDL_1_0 -- ^ @CDL-1.0@, Common Documentation License 1.0, SPDX License List 3.16
     | CDLA_Permissive_1_0 -- ^ @CDLA-Permissive-1.0@, Community Data License Agreement Permissive 1.0
-    | CDLA_Permissive_2_0 -- ^ @CDLA-Permissive-2.0@, Community Data License Agreement Permissive 2.0, SPDX License List 3.16, SPDX License List 3.20
+    | CDLA_Permissive_2_0 -- ^ @CDLA-Permissive-2.0@, Community Data License Agreement Permissive 2.0, SPDX License List 3.16
     | CDLA_Sharing_1_0 -- ^ @CDLA-Sharing-1.0@, Community Data License Agreement Sharing 1.0
     | CECILL_1_0 -- ^ @CECILL-1.0@, CeCILL Free Software License Agreement v1.0
     | CECILL_1_1 -- ^ @CECILL-1.1@, CeCILL Free Software License Agreement v1.1
@@ -182,25 +170,20 @@ data LicenseId
     | CECILL_2_1 -- ^ @CECILL-2.1@, CeCILL Free Software License Agreement v2.1
     | CECILL_B -- ^ @CECILL-B@, CeCILL-B Free Software License Agreement
     | CECILL_C -- ^ @CECILL-C@, CeCILL-C Free Software License Agreement
-    | CERN_OHL_1_1 -- ^ @CERN-OHL-1.1@, CERN Open Hardware Licence v1.1, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | CERN_OHL_1_2 -- ^ @CERN-OHL-1.2@, CERN Open Hardware Licence v1.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | CERN_OHL_P_2_0 -- ^ @CERN-OHL-P-2.0@, CERN Open Hardware Licence Version 2 - Permissive, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | CERN_OHL_S_2_0 -- ^ @CERN-OHL-S-2.0@, CERN Open Hardware Licence Version 2 - Strongly Reciprocal, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | CERN_OHL_W_2_0 -- ^ @CERN-OHL-W-2.0@, CERN Open Hardware Licence Version 2 - Weakly Reciprocal, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | CFITSIO -- ^ @CFITSIO@, CFITSIO License, SPDX License List 3.20
-    | Checkmk -- ^ @checkmk@, Checkmk License, SPDX License List 3.20
+    | CERN_OHL_1_1 -- ^ @CERN-OHL-1.1@, CERN Open Hardware Licence v1.1, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | CERN_OHL_1_2 -- ^ @CERN-OHL-1.2@, CERN Open Hardware Licence v1.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | CERN_OHL_P_2_0 -- ^ @CERN-OHL-P-2.0@, CERN Open Hardware Licence Version 2 - Permissive, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | CERN_OHL_S_2_0 -- ^ @CERN-OHL-S-2.0@, CERN Open Hardware Licence Version 2 - Strongly Reciprocal, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | CERN_OHL_W_2_0 -- ^ @CERN-OHL-W-2.0@, CERN Open Hardware Licence Version 2 - Weakly Reciprocal, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | ClArtistic -- ^ @ClArtistic@, Clarified Artistic License
-    | Clips -- ^ @Clips@, Clips License, SPDX License List 3.20
-    | CMU_Mach -- ^ @CMU-Mach@, CMU Mach License, SPDX License List 3.20
     | CNRI_Jython -- ^ @CNRI-Jython@, CNRI Jython License
     | CNRI_Python_GPL_Compatible -- ^ @CNRI-Python-GPL-Compatible@, CNRI Python Open Source GPL Compatible License Agreement
     | CNRI_Python -- ^ @CNRI-Python@, CNRI Python License
-    | COIL_1_0 -- ^ @COIL-1.0@, Copyfree Open Innovation License, SPDX License List 3.16, SPDX License List 3.20
-    | Community_Spec_1_0 -- ^ @Community-Spec-1.0@, Community Specification License 1.0, SPDX License List 3.16, SPDX License List 3.20
+    | COIL_1_0 -- ^ @COIL-1.0@, Copyfree Open Innovation License, SPDX License List 3.16
+    | Community_Spec_1_0 -- ^ @Community-Spec-1.0@, Community Specification License 1.0, SPDX License List 3.16
     | Condor_1_1 -- ^ @Condor-1.1@, Condor Public License v1.1
-    | Copyleft_next_0_3_0 -- ^ @copyleft-next-0.3.0@, copyleft-next 0.3.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | Copyleft_next_0_3_1 -- ^ @copyleft-next-0.3.1@, copyleft-next 0.3.1, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | Cornell_Lossless_JPEG -- ^ @Cornell-Lossless-JPEG@, Cornell Lossless JPEG License, SPDX License List 3.20
+    | Copyleft_next_0_3_0 -- ^ @copyleft-next-0.3.0@, copyleft-next 0.3.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | Copyleft_next_0_3_1 -- ^ @copyleft-next-0.3.1@, copyleft-next 0.3.1, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | CPAL_1_0 -- ^ @CPAL-1.0@, Common Public Attribution License 1.0
     | CPL_1_0 -- ^ @CPL-1.0@, Common Public License 1.0
     | CPOL_1_02 -- ^ @CPOL-1.02@, Code Project Open License 1.02
@@ -211,10 +194,10 @@ data LicenseId
     | Curl -- ^ @curl@, curl License
     | D_FSL_1_0 -- ^ @D-FSL-1.0@, Deutsche Freie Software Lizenz
     | Diffmark -- ^ @diffmark@, diffmark license
-    | DL_DE_BY_2_0 -- ^ @DL-DE-BY-2.0@, Data licence Germany – attribution – version 2.0, SPDX License List 3.16, SPDX License List 3.20
+    | DL_DE_BY_2_0 -- ^ @DL-DE-BY-2.0@, Data licence Germany – attribution – version 2.0, SPDX License List 3.16
     | DOC -- ^ @DOC@, DOC License
     | Dotseqn -- ^ @Dotseqn@, Dotseqn License
-    | DRL_1_0 -- ^ @DRL-1.0@, Detection Rule License 1.0, SPDX License List 3.16, SPDX License List 3.20
+    | DRL_1_0 -- ^ @DRL-1.0@, Detection Rule License 1.0, SPDX License List 3.16
     | DSDP -- ^ @DSDP@, DSDP License
     | Dvipdfm -- ^ @dvipdfm@, dvipdfm License
     | ECL_1_0 -- ^ @ECL-1.0@, Educational Community License v1.0
@@ -222,52 +205,51 @@ data LicenseId
     | EFL_1_0 -- ^ @EFL-1.0@, Eiffel Forum License v1.0
     | EFL_2_0 -- ^ @EFL-2.0@, Eiffel Forum License v2.0
     | EGenix -- ^ @eGenix@, eGenix.com Public License 1.1.0
-    | Elastic_2_0 -- ^ @Elastic-2.0@, Elastic License 2.0, SPDX License List 3.16, SPDX License List 3.20
+    | Elastic_2_0 -- ^ @Elastic-2.0@, Elastic License 2.0, SPDX License List 3.16
     | Entessa -- ^ @Entessa@, Entessa Public License v1.0
-    | EPICS -- ^ @EPICS@, EPICS Open License, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | EPICS -- ^ @EPICS@, EPICS Open License, SPDX License List 3.10, SPDX License List 3.16
     | EPL_1_0 -- ^ @EPL-1.0@, Eclipse Public License 1.0
     | EPL_2_0 -- ^ @EPL-2.0@, Eclipse Public License 2.0
     | ErlPL_1_1 -- ^ @ErlPL-1.1@, Erlang Public License v1.1
-    | Etalab_2_0 -- ^ @etalab-2.0@, Etalab Open License 2.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | Etalab_2_0 -- ^ @etalab-2.0@, Etalab Open License 2.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | EUDatagrid -- ^ @EUDatagrid@, EU DataGrid Software License
     | EUPL_1_0 -- ^ @EUPL-1.0@, European Union Public License 1.0
     | EUPL_1_1 -- ^ @EUPL-1.1@, European Union Public License 1.1
     | EUPL_1_2 -- ^ @EUPL-1.2@, European Union Public License 1.2
     | Eurosym -- ^ @Eurosym@, Eurosym License
     | Fair -- ^ @Fair@, Fair License
-    | FDK_AAC -- ^ @FDK-AAC@, Fraunhofer FDK AAC Codec Library, SPDX License List 3.16, SPDX License List 3.20
+    | FDK_AAC -- ^ @FDK-AAC@, Fraunhofer FDK AAC Codec Library, SPDX License List 3.16
     | Frameworx_1_0 -- ^ @Frameworx-1.0@, Frameworx Open License 1.0
-    | FreeBSD_DOC -- ^ @FreeBSD-DOC@, FreeBSD Documentation License, SPDX License List 3.16, SPDX License List 3.20
+    | FreeBSD_DOC -- ^ @FreeBSD-DOC@, FreeBSD Documentation License, SPDX License List 3.16
     | FreeImage -- ^ @FreeImage@, FreeImage Public License v1.0
     | FSFAP -- ^ @FSFAP@, FSF All Permissive License
-    | FSFULLRWD -- ^ @FSFULLRWD@, FSF Unlimited License (With License Retention    and Warranty Disclaimer), SPDX License List 3.20
     | FSFULLR -- ^ @FSFULLR@, FSF Unlimited License (with License Retention)
     | FSFUL -- ^ @FSFUL@, FSF Unlimited License
     | FTL -- ^ @FTL@, Freetype Project License
-    | GD -- ^ @GD@, GD License, SPDX License List 3.16, SPDX License List 3.20
-    | GFDL_1_1_invariants_only -- ^ @GFDL-1.1-invariants-only@, GNU Free Documentation License v1.1 only - invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | GFDL_1_1_invariants_or_later -- ^ @GFDL-1.1-invariants-or-later@, GNU Free Documentation License v1.1 or later - invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | GFDL_1_1_no_invariants_only -- ^ @GFDL-1.1-no-invariants-only@, GNU Free Documentation License v1.1 only - no invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | GFDL_1_1_no_invariants_or_later -- ^ @GFDL-1.1-no-invariants-or-later@, GNU Free Documentation License v1.1 or later - no invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GD -- ^ @GD@, GD License, SPDX License List 3.16
+    | GFDL_1_1_invariants_only -- ^ @GFDL-1.1-invariants-only@, GNU Free Documentation License v1.1 only - invariants, SPDX License List 3.10, SPDX License List 3.16
+    | GFDL_1_1_invariants_or_later -- ^ @GFDL-1.1-invariants-or-later@, GNU Free Documentation License v1.1 or later - invariants, SPDX License List 3.10, SPDX License List 3.16
+    | GFDL_1_1_no_invariants_only -- ^ @GFDL-1.1-no-invariants-only@, GNU Free Documentation License v1.1 only - no invariants, SPDX License List 3.10, SPDX License List 3.16
+    | GFDL_1_1_no_invariants_or_later -- ^ @GFDL-1.1-no-invariants-or-later@, GNU Free Documentation License v1.1 or later - no invariants, SPDX License List 3.10, SPDX License List 3.16
     | GFDL_1_1_only -- ^ @GFDL-1.1-only@, GNU Free Documentation License v1.1 only
     | GFDL_1_1_or_later -- ^ @GFDL-1.1-or-later@, GNU Free Documentation License v1.1 or later
-    | GFDL_1_2_invariants_only -- ^ @GFDL-1.2-invariants-only@, GNU Free Documentation License v1.2 only - invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | GFDL_1_2_invariants_or_later -- ^ @GFDL-1.2-invariants-or-later@, GNU Free Documentation License v1.2 or later - invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | GFDL_1_2_no_invariants_only -- ^ @GFDL-1.2-no-invariants-only@, GNU Free Documentation License v1.2 only - no invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | GFDL_1_2_no_invariants_or_later -- ^ @GFDL-1.2-no-invariants-or-later@, GNU Free Documentation License v1.2 or later - no invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GFDL_1_2_invariants_only -- ^ @GFDL-1.2-invariants-only@, GNU Free Documentation License v1.2 only - invariants, SPDX License List 3.10, SPDX License List 3.16
+    | GFDL_1_2_invariants_or_later -- ^ @GFDL-1.2-invariants-or-later@, GNU Free Documentation License v1.2 or later - invariants, SPDX License List 3.10, SPDX License List 3.16
+    | GFDL_1_2_no_invariants_only -- ^ @GFDL-1.2-no-invariants-only@, GNU Free Documentation License v1.2 only - no invariants, SPDX License List 3.10, SPDX License List 3.16
+    | GFDL_1_2_no_invariants_or_later -- ^ @GFDL-1.2-no-invariants-or-later@, GNU Free Documentation License v1.2 or later - no invariants, SPDX License List 3.10, SPDX License List 3.16
     | GFDL_1_2_only -- ^ @GFDL-1.2-only@, GNU Free Documentation License v1.2 only
     | GFDL_1_2_or_later -- ^ @GFDL-1.2-or-later@, GNU Free Documentation License v1.2 or later
-    | GFDL_1_3_invariants_only -- ^ @GFDL-1.3-invariants-only@, GNU Free Documentation License v1.3 only - invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | GFDL_1_3_invariants_or_later -- ^ @GFDL-1.3-invariants-or-later@, GNU Free Documentation License v1.3 or later - invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | GFDL_1_3_no_invariants_only -- ^ @GFDL-1.3-no-invariants-only@, GNU Free Documentation License v1.3 only - no invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | GFDL_1_3_no_invariants_or_later -- ^ @GFDL-1.3-no-invariants-or-later@, GNU Free Documentation License v1.3 or later - no invariants, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GFDL_1_3_invariants_only -- ^ @GFDL-1.3-invariants-only@, GNU Free Documentation License v1.3 only - invariants, SPDX License List 3.10, SPDX License List 3.16
+    | GFDL_1_3_invariants_or_later -- ^ @GFDL-1.3-invariants-or-later@, GNU Free Documentation License v1.3 or later - invariants, SPDX License List 3.10, SPDX License List 3.16
+    | GFDL_1_3_no_invariants_only -- ^ @GFDL-1.3-no-invariants-only@, GNU Free Documentation License v1.3 only - no invariants, SPDX License List 3.10, SPDX License List 3.16
+    | GFDL_1_3_no_invariants_or_later -- ^ @GFDL-1.3-no-invariants-or-later@, GNU Free Documentation License v1.3 or later - no invariants, SPDX License List 3.10, SPDX License List 3.16
     | GFDL_1_3_only -- ^ @GFDL-1.3-only@, GNU Free Documentation License v1.3 only
     | GFDL_1_3_or_later -- ^ @GFDL-1.3-or-later@, GNU Free Documentation License v1.3 or later
     | Giftware -- ^ @Giftware@, Giftware License
     | GL2PS -- ^ @GL2PS@, GL2PS License
     | Glide -- ^ @Glide@, 3dfx Glide License
     | Glulxe -- ^ @Glulxe@, Glulxe License
-    | GLWTPL -- ^ @GLWTPL@, Good Luck With That Public License, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | GLWTPL -- ^ @GLWTPL@, Good Luck With That Public License, SPDX License List 3.10, SPDX License List 3.16
     | Gnuplot -- ^ @gnuplot@, gnuplot License
     | GPL_1_0_only -- ^ @GPL-1.0-only@, GNU General Public License v1.0 only
     | GPL_1_0_or_later -- ^ @GPL-1.0-or-later@, GNU General Public License v1.0 or later
@@ -275,21 +257,14 @@ data LicenseId
     | GPL_2_0_or_later -- ^ @GPL-2.0-or-later@, GNU General Public License v2.0 or later
     | GPL_3_0_only -- ^ @GPL-3.0-only@, GNU General Public License v3.0 only
     | GPL_3_0_or_later -- ^ @GPL-3.0-or-later@, GNU General Public License v3.0 or later
-    | Graphics_Gems -- ^ @Graphics-Gems@, Graphics Gems License, SPDX License List 3.20
     | GSOAP_1_3b -- ^ @gSOAP-1.3b@, gSOAP Public License v1.3b
     | HaskellReport -- ^ @HaskellReport@, Haskell Language Report License
-    | Hippocratic_2_1 -- ^ @Hippocratic-2.1@, Hippocratic License 2.1, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | HP_1986 -- ^ @HP-1986@, Hewlett-Packard 1986 License, SPDX License List 3.20
-    | HPND_export_US -- ^ @HPND-export-US@, HPND with US Government export control warning, SPDX License List 3.20
-    | HPND_Markus_Kuhn -- ^ @HPND-Markus-Kuhn@, Historical Permission Notice and Disclaimer - Markus Kuhn variant, SPDX License List 3.20
-    | HPND_sell_variant_MIT_disclaimer -- ^ @HPND-sell-variant-MIT-disclaimer@, HPND sell variant with MIT disclaimer, SPDX License List 3.20
-    | HPND_sell_variant -- ^ @HPND-sell-variant@, Historical Permission Notice and Disclaimer - sell variant, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | Hippocratic_2_1 -- ^ @Hippocratic-2.1@, Hippocratic License 2.1, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | HPND_sell_variant -- ^ @HPND-sell-variant@, Historical Permission Notice and Disclaimer - sell variant, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | HPND -- ^ @HPND@, Historical Permission Notice and Disclaimer
-    | HTMLTIDY -- ^ @HTMLTIDY@, HTML Tidy License, SPDX License List 3.16, SPDX License List 3.20
+    | HTMLTIDY -- ^ @HTMLTIDY@, HTML Tidy License, SPDX License List 3.16
     | IBM_pibs -- ^ @IBM-pibs@, IBM PowerPC Initialization and Boot Software
     | ICU -- ^ @ICU@, ICU License
-    | IEC_Code_Components_EULA -- ^ @IEC-Code-Components-EULA@, IEC    Code Components End-user licence agreement, SPDX License List 3.20
-    | IJG_short -- ^ @IJG-short@, Independent JPEG Group License - short, SPDX License List 3.20
     | IJG -- ^ @IJG@, Independent JPEG Group License
     | ImageMagick -- ^ @ImageMagick@, ImageMagick License
     | IMatix -- ^ @iMatix@, iMatix Standard Function Library Agreement
@@ -301,13 +276,10 @@ data LicenseId
     | IPA -- ^ @IPA@, IPA Font License
     | IPL_1_0 -- ^ @IPL-1.0@, IBM Public License v1.0
     | ISC -- ^ @ISC@, ISC License
-    | Jam -- ^ @Jam@, Jam License, SPDX License List 3.16, SPDX License List 3.20
+    | Jam -- ^ @Jam@, Jam License, SPDX License List 3.16
     | JasPer_2_0 -- ^ @JasPer-2.0@, JasPer License
-    | JPL_image -- ^ @JPL-image@, JPL Image Use Policy, SPDX License List 3.20
-    | JPNIC -- ^ @JPNIC@, Japan Network Information Center License, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | JPNIC -- ^ @JPNIC@, Japan Network Information Center License, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | JSON -- ^ @JSON@, JSON License
-    | Kazlib -- ^ @Kazlib@, Kazlib License, SPDX License List 3.20
-    | Knuth_CTAN -- ^ @Knuth-CTAN@, Knuth CTAN License, SPDX License List 3.20
     | LAL_1_2 -- ^ @LAL-1.2@, Licence Art Libre 1.2
     | LAL_1_3 -- ^ @LAL-1.3@, Licence Art Libre 1.3
     | Latex2e -- ^ @Latex2e@, Latex2e License
@@ -319,17 +291,15 @@ data LicenseId
     | LGPL_3_0_only -- ^ @LGPL-3.0-only@, GNU Lesser General Public License v3.0 only
     | LGPL_3_0_or_later -- ^ @LGPL-3.0-or-later@, GNU Lesser General Public License v3.0 or later
     | LGPLLR -- ^ @LGPLLR@, Lesser General Public License For Linguistic Resources
-    | Libpng_2_0 -- ^ @libpng-2.0@, PNG Reference Library version 2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | Libpng_2_0 -- ^ @libpng-2.0@, PNG Reference Library version 2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | Libpng -- ^ @Libpng@, libpng License
-    | Libselinux_1_0 -- ^ @libselinux-1.0@, libselinux public domain notice, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | Libselinux_1_0 -- ^ @libselinux-1.0@, libselinux public domain notice, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | Libtiff -- ^ @libtiff@, libtiff License
-    | Libutil_David_Nugent -- ^ @libutil-David-Nugent@, libutil David Nugent License, SPDX License List 3.20
     | LiLiQ_P_1_1 -- ^ @LiLiQ-P-1.1@, Licence Libre du Québec – Permissive version 1.1
     | LiLiQ_R_1_1 -- ^ @LiLiQ-R-1.1@, Licence Libre du Québec – Réciprocité version 1.1
     | LiLiQ_Rplus_1_1 -- ^ @LiLiQ-Rplus-1.1@, Licence Libre du Québec – Réciprocité forte version 1.1
-    | Linux_man_pages_copyleft -- ^ @Linux-man-pages-copyleft@, Linux man-pages Copyleft, SPDX License List 3.16, SPDX License List 3.20
-    | Linux_OpenIB -- ^ @Linux-OpenIB@, Linux Kernel Variant of OpenIB.org license, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | LOOP -- ^ @LOOP@, Common Lisp LOOP License, SPDX License List 3.20
+    | Linux_man_pages_copyleft -- ^ @Linux-man-pages-copyleft@, Linux man-pages Copyleft, SPDX License List 3.16
+    | Linux_OpenIB -- ^ @Linux-OpenIB@, Linux Kernel Variant of OpenIB.org license, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | LPL_1_02 -- ^ @LPL-1.02@, Lucent Public License v1.02
     | LPL_1_0 -- ^ @LPL-1.0@, Lucent Public License Version 1.0
     | LPPL_1_0 -- ^ @LPPL-1.0@, LaTeX Project Public License v1.0
@@ -337,53 +307,44 @@ data LicenseId
     | LPPL_1_2 -- ^ @LPPL-1.2@, LaTeX Project Public License v1.2
     | LPPL_1_3a -- ^ @LPPL-1.3a@, LaTeX Project Public License v1.3a
     | LPPL_1_3c -- ^ @LPPL-1.3c@, LaTeX Project Public License v1.3c
-    | LZMA_SDK_9_11_to_9_20 -- ^ @LZMA-SDK-9.11-to-9.20@, LZMA SDK License (versions 9.11 to 9.20), SPDX License List 3.20
-    | LZMA_SDK_9_22 -- ^ @LZMA-SDK-9.22@, LZMA SDK License (versions 9.22 and beyond), SPDX License List 3.20
     | MakeIndex -- ^ @MakeIndex@, MakeIndex License
-    | Martin_Birgmeier -- ^ @Martin-Birgmeier@, Martin Birgmeier License, SPDX License List 3.20
-    | Minpack -- ^ @Minpack@, Minpack License, SPDX License List 3.20
     | MirOS -- ^ @MirOS@, The MirOS Licence
-    | MIT_0 -- ^ @MIT-0@, MIT No Attribution, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | MIT_0 -- ^ @MIT-0@, MIT No Attribution, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | MIT_advertising -- ^ @MIT-advertising@, Enlightenment License (e16)
     | MIT_CMU -- ^ @MIT-CMU@, CMU License
     | MIT_enna -- ^ @MIT-enna@, enna License
     | MIT_feh -- ^ @MIT-feh@, feh License
-    | MIT_Modern_Variant -- ^ @MIT-Modern-Variant@, MIT License Modern Variant, SPDX License List 3.16, SPDX License List 3.20
-    | MIT_open_group -- ^ @MIT-open-group@, MIT Open Group variant, SPDX License List 3.16, SPDX License List 3.20
-    | MIT_Wu -- ^ @MIT-Wu@, MIT Tom Wu Variant, SPDX License List 3.20
+    | MIT_Modern_Variant -- ^ @MIT-Modern-Variant@, MIT License Modern Variant, SPDX License List 3.16
+    | MIT_open_group -- ^ @MIT-open-group@, MIT Open Group variant, SPDX License List 3.16
     | MITNFA -- ^ @MITNFA@, MIT +no-false-attribs license
     | MIT -- ^ @MIT@, MIT License
     | Motosoto -- ^ @Motosoto@, Motosoto License
-    | Mpi_permissive -- ^ @mpi-permissive@, mpi Permissive License, SPDX License List 3.20
     | Mpich2 -- ^ @mpich2@, mpich2 License
     | MPL_1_0 -- ^ @MPL-1.0@, Mozilla Public License 1.0
     | MPL_1_1 -- ^ @MPL-1.1@, Mozilla Public License 1.1
     | MPL_2_0_no_copyleft_exception -- ^ @MPL-2.0-no-copyleft-exception@, Mozilla Public License 2.0 (no copyleft exception)
     | MPL_2_0 -- ^ @MPL-2.0@, Mozilla Public License 2.0
-    | Mplus -- ^ @mplus@, mplus Font License, SPDX License List 3.20
-    | MS_LPL -- ^ @MS-LPL@, Microsoft Limited Public License, SPDX License List 3.20
     | MS_PL -- ^ @MS-PL@, Microsoft Public License
     | MS_RL -- ^ @MS-RL@, Microsoft Reciprocal License
     | MTLL -- ^ @MTLL@, Matrix Template Library License
-    | MulanPSL_1_0 -- ^ @MulanPSL-1.0@, Mulan Permissive Software License, Version 1, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | MulanPSL_2_0 -- ^ @MulanPSL-2.0@, Mulan Permissive Software License, Version 2, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | MulanPSL_1_0 -- ^ @MulanPSL-1.0@, Mulan Permissive Software License, Version 1, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | MulanPSL_2_0 -- ^ @MulanPSL-2.0@, Mulan Permissive Software License, Version 2, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | Multics -- ^ @Multics@, Multics License
     | Mup -- ^ @Mup@, Mup License
-    | NAIST_2003 -- ^ @NAIST-2003@, Nara Institute of Science and Technology License (2003), SPDX License List 3.16, SPDX License List 3.20
+    | NAIST_2003 -- ^ @NAIST-2003@, Nara Institute of Science and Technology License (2003), SPDX License List 3.16
     | NASA_1_3 -- ^ @NASA-1.3@, NASA Open Source Agreement 1.3
     | Naumen -- ^ @Naumen@, Naumen Public License
     | NBPL_1_0 -- ^ @NBPL-1.0@, Net Boolean Public License v1
-    | NCGL_UK_2_0 -- ^ @NCGL-UK-2.0@, Non-Commercial Government Licence, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | NCGL_UK_2_0 -- ^ @NCGL-UK-2.0@, Non-Commercial Government Licence, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | NCSA -- ^ @NCSA@, University of Illinois/NCSA Open Source License
     | Net_SNMP -- ^ @Net-SNMP@, Net-SNMP License
     | NetCDF -- ^ @NetCDF@, NetCDF license
     | Newsletr -- ^ @Newsletr@, Newsletr License
     | NGPL -- ^ @NGPL@, Nethack General Public License
-    | NICTA_1_0 -- ^ @NICTA-1.0@, NICTA Public Software License, Version 1.0, SPDX License List 3.20
-    | NIST_PD_fallback -- ^ @NIST-PD-fallback@, NIST Public Domain Notice with license fallback, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | NIST_PD -- ^ @NIST-PD@, NIST Public Domain Notice, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | NIST_PD_fallback -- ^ @NIST-PD-fallback@, NIST Public Domain Notice with license fallback, SPDX License List 3.10, SPDX License List 3.16
+    | NIST_PD -- ^ @NIST-PD@, NIST Public Domain Notice, SPDX License List 3.10, SPDX License List 3.16
     | NLOD_1_0 -- ^ @NLOD-1.0@, Norwegian Licence for Open Government Data (NLOD) 1.0
-    | NLOD_2_0 -- ^ @NLOD-2.0@, Norwegian Licence for Open Government Data (NLOD) 2.0, SPDX License List 3.16, SPDX License List 3.20
+    | NLOD_2_0 -- ^ @NLOD-2.0@, Norwegian Licence for Open Government Data (NLOD) 2.0, SPDX License List 3.16
     | NLPL -- ^ @NLPL@, No Limit Public License
     | Nokia -- ^ @Nokia@, Nokia Open Source License
     | NOSL -- ^ @NOSL@, Netizen Open Source License
@@ -392,26 +353,25 @@ data LicenseId
     | NPL_1_1 -- ^ @NPL-1.1@, Netscape Public License v1.1
     | NPOSL_3_0 -- ^ @NPOSL-3.0@, Non-Profit Open Software License 3.0
     | NRL -- ^ @NRL@, NRL License
-    | NTP_0 -- ^ @NTP-0@, NTP No Attribution, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | NTP_0 -- ^ @NTP-0@, NTP No Attribution, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | NTP -- ^ @NTP@, NTP License
-    | O_UDA_1_0 -- ^ @O-UDA-1.0@, Open Use of Data Agreement v1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | O_UDA_1_0 -- ^ @O-UDA-1.0@, Open Use of Data Agreement v1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | OCCT_PL -- ^ @OCCT-PL@, Open CASCADE Technology Public License
     | OCLC_2_0 -- ^ @OCLC-2.0@, OCLC Research Public License 2.0
     | ODbL_1_0 -- ^ @ODbL-1.0@, Open Data Commons Open Database License v1.0
-    | ODC_By_1_0 -- ^ @ODC-By-1.0@, Open Data Commons Attribution License v1.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | OFFIS -- ^ @OFFIS@, OFFIS License, SPDX License List 3.20
-    | OFL_1_0_no_RFN -- ^ @OFL-1.0-no-RFN@, SIL Open Font License 1.0 with no Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | OFL_1_0_RFN -- ^ @OFL-1.0-RFN@, SIL Open Font License 1.0 with Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | ODC_By_1_0 -- ^ @ODC-By-1.0@, Open Data Commons Attribution License v1.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | OFL_1_0_no_RFN -- ^ @OFL-1.0-no-RFN@, SIL Open Font License 1.0 with no Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | OFL_1_0_RFN -- ^ @OFL-1.0-RFN@, SIL Open Font License 1.0 with Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | OFL_1_0 -- ^ @OFL-1.0@, SIL Open Font License 1.0
-    | OFL_1_1_no_RFN -- ^ @OFL-1.1-no-RFN@, SIL Open Font License 1.1 with no Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | OFL_1_1_RFN -- ^ @OFL-1.1-RFN@, SIL Open Font License 1.1 with Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | OFL_1_1_no_RFN -- ^ @OFL-1.1-no-RFN@, SIL Open Font License 1.1 with no Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | OFL_1_1_RFN -- ^ @OFL-1.1-RFN@, SIL Open Font License 1.1 with Reserved Font Name, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | OFL_1_1 -- ^ @OFL-1.1@, SIL Open Font License 1.1
-    | OGC_1_0 -- ^ @OGC-1.0@, OGC Software License, Version 1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | OGDL_Taiwan_1_0 -- ^ @OGDL-Taiwan-1.0@, Taiwan Open Government Data License, version 1.0, SPDX License List 3.16, SPDX License List 3.20
-    | OGL_Canada_2_0 -- ^ @OGL-Canada-2.0@, Open Government Licence - Canada, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | OGL_UK_1_0 -- ^ @OGL-UK-1.0@, Open Government Licence v1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | OGL_UK_2_0 -- ^ @OGL-UK-2.0@, Open Government Licence v2.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | OGL_UK_3_0 -- ^ @OGL-UK-3.0@, Open Government Licence v3.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | OGC_1_0 -- ^ @OGC-1.0@, OGC Software License, Version 1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | OGDL_Taiwan_1_0 -- ^ @OGDL-Taiwan-1.0@, Taiwan Open Government Data License, version 1.0, SPDX License List 3.16
+    | OGL_Canada_2_0 -- ^ @OGL-Canada-2.0@, Open Government Licence - Canada, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | OGL_UK_1_0 -- ^ @OGL-UK-1.0@, Open Government Licence v1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | OGL_UK_2_0 -- ^ @OGL-UK-2.0@, Open Government Licence v2.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | OGL_UK_3_0 -- ^ @OGL-UK-3.0@, Open Government Licence v3.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | OGTSL -- ^ @OGTSL@, Open Group Test Suite License
     | OLDAP_1_1 -- ^ @OLDAP-1.1@, Open LDAP Public License v1.1
     | OLDAP_1_2 -- ^ @OLDAP-1.2@, Open LDAP Public License v1.2
@@ -430,32 +390,29 @@ data LicenseId
     | OLDAP_2_7 -- ^ @OLDAP-2.7@, Open LDAP Public License v2.7
     | OLDAP_2_8 -- ^ @OLDAP-2.8@, Open LDAP Public License v2.8
     | OML -- ^ @OML@, Open Market License
-    | OpenPBS_2_3 -- ^ @OpenPBS-2.3@, OpenPBS v2.3 Software License, SPDX License List 3.20
     | OpenSSL -- ^ @OpenSSL@, OpenSSL License
     | OPL_1_0 -- ^ @OPL-1.0@, Open Public License v1.0
-    | OPUBL_1_0 -- ^ @OPUBL-1.0@, Open Publication License v1.0, SPDX License List 3.16, SPDX License List 3.20
+    | OPUBL_1_0 -- ^ @OPUBL-1.0@, Open Publication License v1.0, SPDX License List 3.16
     | OSET_PL_2_1 -- ^ @OSET-PL-2.1@, OSET Public License version 2.1
     | OSL_1_0 -- ^ @OSL-1.0@, Open Software License 1.0
     | OSL_1_1 -- ^ @OSL-1.1@, Open Software License 1.1
     | OSL_2_0 -- ^ @OSL-2.0@, Open Software License 2.0
     | OSL_2_1 -- ^ @OSL-2.1@, Open Software License 2.1
     | OSL_3_0 -- ^ @OSL-3.0@, Open Software License 3.0
-    | Parity_6_0_0 -- ^ @Parity-6.0.0@, The Parity Public License 6.0.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | Parity_7_0_0 -- ^ @Parity-7.0.0@, The Parity Public License 7.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | Parity_6_0_0 -- ^ @Parity-6.0.0@, The Parity Public License 6.0.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | Parity_7_0_0 -- ^ @Parity-7.0.0@, The Parity Public License 7.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | PDDL_1_0 -- ^ @PDDL-1.0@, Open Data Commons Public Domain Dedication & License 1.0
     | PHP_3_01 -- ^ @PHP-3.01@, PHP License v3.01
     | PHP_3_0 -- ^ @PHP-3.0@, PHP License v3.0
     | Plexus -- ^ @Plexus@, Plexus Classworlds License
-    | PolyForm_Noncommercial_1_0_0 -- ^ @PolyForm-Noncommercial-1.0.0@, PolyForm Noncommercial License 1.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | PolyForm_Small_Business_1_0_0 -- ^ @PolyForm-Small-Business-1.0.0@, PolyForm Small Business License 1.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | PolyForm_Noncommercial_1_0_0 -- ^ @PolyForm-Noncommercial-1.0.0@, PolyForm Noncommercial License 1.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | PolyForm_Small_Business_1_0_0 -- ^ @PolyForm-Small-Business-1.0.0@, PolyForm Small Business License 1.0.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | PostgreSQL -- ^ @PostgreSQL@, PostgreSQL License
-    | PSF_2_0 -- ^ @PSF-2.0@, Python Software Foundation License 2.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | PSF_2_0 -- ^ @PSF-2.0@, Python Software Foundation License 2.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | Psfrag -- ^ @psfrag@, psfrag License
     | Psutils -- ^ @psutils@, psutils License
-    | Python_2_0_1 -- ^ @Python-2.0.1@, Python License 2.0.1, SPDX License List 3.20
     | Python_2_0 -- ^ @Python-2.0@, Python License 2.0
     | Qhull -- ^ @Qhull@, Qhull License
-    | QPL_1_0_INRIA_2004 -- ^ @QPL-1.0-INRIA-2004@, Q Public License 1.0 - INRIA 2004 variant, SPDX License List 3.20
     | QPL_1_0 -- ^ @QPL-1.0@, Q Public License 1.0
     | Rdisc -- ^ @Rdisc@, Rdisc License
     | RHeCos_1_1 -- ^ @RHeCos-1.1@, Red Hat eCos Public License v1.1
@@ -468,14 +425,14 @@ data LicenseId
     | SAX_PD -- ^ @SAX-PD@, Sax Public Domain Notice
     | Saxpath -- ^ @Saxpath@, Saxpath License
     | SCEA -- ^ @SCEA@, SCEA Shared Source License
-    | SchemeReport -- ^ @SchemeReport@, Scheme Language Report License, SPDX License List 3.16, SPDX License List 3.20
-    | Sendmail_8_23 -- ^ @Sendmail-8.23@, Sendmail License 8.23, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | SchemeReport -- ^ @SchemeReport@, Scheme Language Report License, SPDX License List 3.16
+    | Sendmail_8_23 -- ^ @Sendmail-8.23@, Sendmail License 8.23, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | Sendmail -- ^ @Sendmail@, Sendmail License
     | SGI_B_1_0 -- ^ @SGI-B-1.0@, SGI Free Software License B v1.0
     | SGI_B_1_1 -- ^ @SGI-B-1.1@, SGI Free Software License B v1.1
     | SGI_B_2_0 -- ^ @SGI-B-2.0@, SGI Free Software License B v2.0
-    | SHL_0_51 -- ^ @SHL-0.51@, Solderpad Hardware License, Version 0.51, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | SHL_0_5 -- ^ @SHL-0.5@, Solderpad Hardware License v0.5, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | SHL_0_51 -- ^ @SHL-0.51@, Solderpad Hardware License, Version 0.51, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | SHL_0_5 -- ^ @SHL-0.5@, Solderpad Hardware License v0.5, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | SimPL_2_0 -- ^ @SimPL-2.0@, Simple Public License 2.0
     | SISSL_1_2 -- ^ @SISSL-1.2@, Sun Industry Standards Source License v1.2
     | SISSL -- ^ @SISSL@, Sun Industry Standards Source License v1.1
@@ -483,31 +440,24 @@ data LicenseId
     | SMLNJ -- ^ @SMLNJ@, Standard ML of New Jersey License
     | SMPPL -- ^ @SMPPL@, Secure Messaging Protocol Public License
     | SNIA -- ^ @SNIA@, SNIA Public License 1.1
-    | Snprintf -- ^ @snprintf@, snprintf License, SPDX License List 3.20
     | Spencer_86 -- ^ @Spencer-86@, Spencer License 86
     | Spencer_94 -- ^ @Spencer-94@, Spencer License 94
     | Spencer_99 -- ^ @Spencer-99@, Spencer License 99
     | SPL_1_0 -- ^ @SPL-1.0@, Sun Public License v1.0
-    | SSH_OpenSSH -- ^ @SSH-OpenSSH@, SSH OpenSSH license, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | SSH_short -- ^ @SSH-short@, SSH short notice, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | SSPL_1_0 -- ^ @SSPL-1.0@, Server Side Public License, v 1, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | SSH_OpenSSH -- ^ @SSH-OpenSSH@, SSH OpenSSH license, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | SSH_short -- ^ @SSH-short@, SSH short notice, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | SSPL_1_0 -- ^ @SSPL-1.0@, Server Side Public License, v 1, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | SugarCRM_1_1_3 -- ^ @SugarCRM-1.1.3@, SugarCRM Public License v1.1.3
-    | SunPro -- ^ @SunPro@, SunPro License, SPDX License List 3.20
     | SWL -- ^ @SWL@, Scheme Widget Library (SWL) Software License Agreement
-    | Symlinks -- ^ @Symlinks@, Symlinks License, SPDX License List 3.20
-    | TAPR_OHL_1_0 -- ^ @TAPR-OHL-1.0@, TAPR Open Hardware License v1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | TAPR_OHL_1_0 -- ^ @TAPR-OHL-1.0@, TAPR Open Hardware License v1.0, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | TCL -- ^ @TCL@, TCL/TK License
     | TCP_wrappers -- ^ @TCP-wrappers@, TCP Wrappers License
     | TMate -- ^ @TMate@, TMate Open Source License
     | TORQUE_1_1 -- ^ @TORQUE-1.1@, TORQUE v2.5+ Software License v1.1
     | TOSL -- ^ @TOSL@, Trusster Open Source License
-    | TPDL -- ^ @TPDL@, Time::ParseDate License, SPDX License List 3.20
-    | TPL_1_0 -- ^ @TPL-1.0@, THOR Public License 1.0, SPDX License List 3.20
-    | TTWL -- ^ @TTWL@, Text-Tabs+Wrap License, SPDX License List 3.20
-    | TU_Berlin_1_0 -- ^ @TU-Berlin-1.0@, Technische Universitaet Berlin License 1.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | TU_Berlin_2_0 -- ^ @TU-Berlin-2.0@, Technische Universitaet Berlin License 2.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
-    | UCAR -- ^ @UCAR@, UCAR License, SPDX License List 3.20
-    | UCL_1_0 -- ^ @UCL-1.0@, Upstream Compatibility License v1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16, SPDX License List 3.20
+    | TU_Berlin_1_0 -- ^ @TU-Berlin-1.0@, Technische Universitaet Berlin License 1.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | TU_Berlin_2_0 -- ^ @TU-Berlin-2.0@, Technische Universitaet Berlin License 2.0, SPDX License List 3.2, SPDX License List 3.6, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
+    | UCL_1_0 -- ^ @UCL-1.0@, Upstream Compatibility License v1.0, SPDX License List 3.9, SPDX License List 3.10, SPDX License List 3.16
     | Unicode_DFS_2015 -- ^ @Unicode-DFS-2015@, Unicode License Agreement - Data Files and Software (2015)
     | Unicode_DFS_2016 -- ^ @Unicode-DFS-2016@, Unicode License Agreement - Data Files and Software (2016)
     | Unicode_TOU -- ^ @Unicode-TOU@, Unicode Terms of Use
@@ -519,16 +469,14 @@ data LicenseId
     | W3C_19980720 -- ^ @W3C-19980720@, W3C Software Notice and License (1998-07-20)
     | W3C_20150513 -- ^ @W3C-20150513@, W3C Software Notice and Document License (2015-05-13)
     | W3C -- ^ @W3C@, W3C Software Notice and License (2002-12-31)
-    | W3m -- ^ @w3m@, w3m License, SPDX License List 3.20
     | Watcom_1_0 -- ^ @Watcom-1.0@, Sybase Open Watcom Public License 1.0
     | Wsuipa -- ^ @Wsuipa@, Wsuipa License
     | WTFPL -- ^ @WTFPL@, Do What The F*ck You Want To Public License
-    | X11_distribute_modifications_variant -- ^ @X11-distribute-modifications-variant@, X11 License Distribution Modification Variant, SPDX License List 3.16, SPDX License List 3.20
+    | X11_distribute_modifications_variant -- ^ @X11-distribute-modifications-variant@, X11 License Distribution Modification Variant, SPDX License List 3.16
     | X11 -- ^ @X11@, X11 License
     | Xerox -- ^ @Xerox@, Xerox License
     | XFree86_1_1 -- ^ @XFree86-1.1@, XFree86 License 1.1
     | Xinetd -- ^ @xinetd@, xinetd License
-    | Xlock -- ^ @xlock@, xlock License, SPDX License List 3.20
     | Xnet -- ^ @Xnet@, X.Net License
     | Xpp -- ^ @xpp@, XPP License
     | XSkat -- ^ @XSkat@, XSkat License
@@ -628,7 +576,6 @@ licenseId :: LicenseId -> String
 licenseId NullBSD = "0BSD"
 licenseId AAL = "AAL"
 licenseId Abstyles = "Abstyles"
-licenseId AdaCore_doc = "AdaCore-doc"
 licenseId Adobe_2006 = "Adobe-2006"
 licenseId Adobe_Glyph = "Adobe-Glyph"
 licenseId ADSL = "ADSL"
@@ -659,23 +606,18 @@ licenseId APSL_1_0 = "APSL-1.0"
 licenseId APSL_1_1 = "APSL-1.1"
 licenseId APSL_1_2 = "APSL-1.2"
 licenseId APSL_2_0 = "APSL-2.0"
-licenseId Arphic_1999 = "Arphic-1999"
 licenseId Artistic_1_0_cl8 = "Artistic-1.0-cl8"
 licenseId Artistic_1_0_Perl = "Artistic-1.0-Perl"
 licenseId Artistic_1_0 = "Artistic-1.0"
 licenseId Artistic_2_0 = "Artistic-2.0"
-licenseId Baekmuk = "Baekmuk"
 licenseId Bahyph = "Bahyph"
 licenseId Barr = "Barr"
 licenseId Beerware = "Beerware"
-licenseId Bitstream_Charter = "Bitstream-Charter"
-licenseId Bitstream_Vera = "Bitstream-Vera"
 licenseId BitTorrent_1_0 = "BitTorrent-1.0"
 licenseId BitTorrent_1_1 = "BitTorrent-1.1"
 licenseId Blessing = "blessing"
 licenseId BlueOak_1_0_0 = "BlueOak-1.0.0"
 licenseId Borceux = "Borceux"
-licenseId Brian_Gladman_3_Clause = "Brian-Gladman-3-Clause"
 licenseId BSD_1_Clause = "BSD-1-Clause"
 licenseId BSD_2_Clause_FreeBSD = "BSD-2-Clause-FreeBSD"
 licenseId BSD_2_Clause_NetBSD = "BSD-2-Clause-NetBSD"
@@ -695,10 +637,6 @@ licenseId BSD_3_Clause = "BSD-3-Clause"
 licenseId BSD_4_Clause_Shortened = "BSD-4-Clause-Shortened"
 licenseId BSD_4_Clause_UC = "BSD-4-Clause-UC"
 licenseId BSD_4_Clause = "BSD-4-Clause"
-licenseId BSD_4_3RENO = "BSD-4.3RENO"
-licenseId BSD_4_3TAHOE = "BSD-4.3TAHOE"
-licenseId BSD_Advertising_Acknowledgement = "BSD-Advertising-Acknowledgement"
-licenseId BSD_Attribution_HPND_disclaimer = "BSD-Attribution-HPND-disclaimer"
 licenseId BSD_Protection = "BSD-Protection"
 licenseId BSD_Source_Code = "BSD-Source-Code"
 licenseId BSL_1_0 = "BSL-1.0"
@@ -716,7 +654,6 @@ licenseId CC_BY_2_5_AU = "CC-BY-2.5-AU"
 licenseId CC_BY_2_5 = "CC-BY-2.5"
 licenseId CC_BY_3_0_AT = "CC-BY-3.0-AT"
 licenseId CC_BY_3_0_DE = "CC-BY-3.0-DE"
-licenseId CC_BY_3_0_IGO = "CC-BY-3.0-IGO"
 licenseId CC_BY_3_0_NL = "CC-BY-3.0-NL"
 licenseId CC_BY_3_0_US = "CC-BY-3.0-US"
 licenseId CC_BY_3_0 = "CC-BY-3.0"
@@ -735,7 +672,6 @@ licenseId CC_BY_NC_ND_3_0_IGO = "CC-BY-NC-ND-3.0-IGO"
 licenseId CC_BY_NC_ND_3_0 = "CC-BY-NC-ND-3.0"
 licenseId CC_BY_NC_ND_4_0 = "CC-BY-NC-ND-4.0"
 licenseId CC_BY_NC_SA_1_0 = "CC-BY-NC-SA-1.0"
-licenseId CC_BY_NC_SA_2_0_DE = "CC-BY-NC-SA-2.0-DE"
 licenseId CC_BY_NC_SA_2_0_FR = "CC-BY-NC-SA-2.0-FR"
 licenseId CC_BY_NC_SA_2_0_UK = "CC-BY-NC-SA-2.0-UK"
 licenseId CC_BY_NC_SA_2_0 = "CC-BY-NC-SA-2.0"
@@ -778,11 +714,7 @@ licenseId CERN_OHL_1_2 = "CERN-OHL-1.2"
 licenseId CERN_OHL_P_2_0 = "CERN-OHL-P-2.0"
 licenseId CERN_OHL_S_2_0 = "CERN-OHL-S-2.0"
 licenseId CERN_OHL_W_2_0 = "CERN-OHL-W-2.0"
-licenseId CFITSIO = "CFITSIO"
-licenseId Checkmk = "checkmk"
 licenseId ClArtistic = "ClArtistic"
-licenseId Clips = "Clips"
-licenseId CMU_Mach = "CMU-Mach"
 licenseId CNRI_Jython = "CNRI-Jython"
 licenseId CNRI_Python_GPL_Compatible = "CNRI-Python-GPL-Compatible"
 licenseId CNRI_Python = "CNRI-Python"
@@ -791,7 +723,6 @@ licenseId Community_Spec_1_0 = "Community-Spec-1.0"
 licenseId Condor_1_1 = "Condor-1.1"
 licenseId Copyleft_next_0_3_0 = "copyleft-next-0.3.0"
 licenseId Copyleft_next_0_3_1 = "copyleft-next-0.3.1"
-licenseId Cornell_Lossless_JPEG = "Cornell-Lossless-JPEG"
 licenseId CPAL_1_0 = "CPAL-1.0"
 licenseId CPL_1_0 = "CPL-1.0"
 licenseId CPOL_1_02 = "CPOL-1.02"
@@ -831,7 +762,6 @@ licenseId Frameworx_1_0 = "Frameworx-1.0"
 licenseId FreeBSD_DOC = "FreeBSD-DOC"
 licenseId FreeImage = "FreeImage"
 licenseId FSFAP = "FSFAP"
-licenseId FSFULLRWD = "FSFULLRWD"
 licenseId FSFULLR = "FSFULLR"
 licenseId FSFUL = "FSFUL"
 licenseId FTL = "FTL"
@@ -866,21 +796,14 @@ licenseId GPL_2_0_only = "GPL-2.0-only"
 licenseId GPL_2_0_or_later = "GPL-2.0-or-later"
 licenseId GPL_3_0_only = "GPL-3.0-only"
 licenseId GPL_3_0_or_later = "GPL-3.0-or-later"
-licenseId Graphics_Gems = "Graphics-Gems"
 licenseId GSOAP_1_3b = "gSOAP-1.3b"
 licenseId HaskellReport = "HaskellReport"
 licenseId Hippocratic_2_1 = "Hippocratic-2.1"
-licenseId HP_1986 = "HP-1986"
-licenseId HPND_export_US = "HPND-export-US"
-licenseId HPND_Markus_Kuhn = "HPND-Markus-Kuhn"
-licenseId HPND_sell_variant_MIT_disclaimer = "HPND-sell-variant-MIT-disclaimer"
 licenseId HPND_sell_variant = "HPND-sell-variant"
 licenseId HPND = "HPND"
 licenseId HTMLTIDY = "HTMLTIDY"
 licenseId IBM_pibs = "IBM-pibs"
 licenseId ICU = "ICU"
-licenseId IEC_Code_Components_EULA = "IEC-Code-Components-EULA"
-licenseId IJG_short = "IJG-short"
 licenseId IJG = "IJG"
 licenseId ImageMagick = "ImageMagick"
 licenseId IMatix = "iMatix"
@@ -894,11 +817,8 @@ licenseId IPL_1_0 = "IPL-1.0"
 licenseId ISC = "ISC"
 licenseId Jam = "Jam"
 licenseId JasPer_2_0 = "JasPer-2.0"
-licenseId JPL_image = "JPL-image"
 licenseId JPNIC = "JPNIC"
 licenseId JSON = "JSON"
-licenseId Kazlib = "Kazlib"
-licenseId Knuth_CTAN = "Knuth-CTAN"
 licenseId LAL_1_2 = "LAL-1.2"
 licenseId LAL_1_3 = "LAL-1.3"
 licenseId Latex2e = "Latex2e"
@@ -914,13 +834,11 @@ licenseId Libpng_2_0 = "libpng-2.0"
 licenseId Libpng = "Libpng"
 licenseId Libselinux_1_0 = "libselinux-1.0"
 licenseId Libtiff = "libtiff"
-licenseId Libutil_David_Nugent = "libutil-David-Nugent"
 licenseId LiLiQ_P_1_1 = "LiLiQ-P-1.1"
 licenseId LiLiQ_R_1_1 = "LiLiQ-R-1.1"
 licenseId LiLiQ_Rplus_1_1 = "LiLiQ-Rplus-1.1"
 licenseId Linux_man_pages_copyleft = "Linux-man-pages-copyleft"
 licenseId Linux_OpenIB = "Linux-OpenIB"
-licenseId LOOP = "LOOP"
 licenseId LPL_1_02 = "LPL-1.02"
 licenseId LPL_1_0 = "LPL-1.0"
 licenseId LPPL_1_0 = "LPPL-1.0"
@@ -928,11 +846,7 @@ licenseId LPPL_1_1 = "LPPL-1.1"
 licenseId LPPL_1_2 = "LPPL-1.2"
 licenseId LPPL_1_3a = "LPPL-1.3a"
 licenseId LPPL_1_3c = "LPPL-1.3c"
-licenseId LZMA_SDK_9_11_to_9_20 = "LZMA-SDK-9.11-to-9.20"
-licenseId LZMA_SDK_9_22 = "LZMA-SDK-9.22"
 licenseId MakeIndex = "MakeIndex"
-licenseId Martin_Birgmeier = "Martin-Birgmeier"
-licenseId Minpack = "Minpack"
 licenseId MirOS = "MirOS"
 licenseId MIT_0 = "MIT-0"
 licenseId MIT_advertising = "MIT-advertising"
@@ -941,18 +855,14 @@ licenseId MIT_enna = "MIT-enna"
 licenseId MIT_feh = "MIT-feh"
 licenseId MIT_Modern_Variant = "MIT-Modern-Variant"
 licenseId MIT_open_group = "MIT-open-group"
-licenseId MIT_Wu = "MIT-Wu"
 licenseId MITNFA = "MITNFA"
 licenseId MIT = "MIT"
 licenseId Motosoto = "Motosoto"
-licenseId Mpi_permissive = "mpi-permissive"
 licenseId Mpich2 = "mpich2"
 licenseId MPL_1_0 = "MPL-1.0"
 licenseId MPL_1_1 = "MPL-1.1"
 licenseId MPL_2_0_no_copyleft_exception = "MPL-2.0-no-copyleft-exception"
 licenseId MPL_2_0 = "MPL-2.0"
-licenseId Mplus = "mplus"
-licenseId MS_LPL = "MS-LPL"
 licenseId MS_PL = "MS-PL"
 licenseId MS_RL = "MS-RL"
 licenseId MTLL = "MTLL"
@@ -970,7 +880,6 @@ licenseId Net_SNMP = "Net-SNMP"
 licenseId NetCDF = "NetCDF"
 licenseId Newsletr = "Newsletr"
 licenseId NGPL = "NGPL"
-licenseId NICTA_1_0 = "NICTA-1.0"
 licenseId NIST_PD_fallback = "NIST-PD-fallback"
 licenseId NIST_PD = "NIST-PD"
 licenseId NLOD_1_0 = "NLOD-1.0"
@@ -990,7 +899,6 @@ licenseId OCCT_PL = "OCCT-PL"
 licenseId OCLC_2_0 = "OCLC-2.0"
 licenseId ODbL_1_0 = "ODbL-1.0"
 licenseId ODC_By_1_0 = "ODC-By-1.0"
-licenseId OFFIS = "OFFIS"
 licenseId OFL_1_0_no_RFN = "OFL-1.0-no-RFN"
 licenseId OFL_1_0_RFN = "OFL-1.0-RFN"
 licenseId OFL_1_0 = "OFL-1.0"
@@ -1021,7 +929,6 @@ licenseId OLDAP_2_6 = "OLDAP-2.6"
 licenseId OLDAP_2_7 = "OLDAP-2.7"
 licenseId OLDAP_2_8 = "OLDAP-2.8"
 licenseId OML = "OML"
-licenseId OpenPBS_2_3 = "OpenPBS-2.3"
 licenseId OpenSSL = "OpenSSL"
 licenseId OPL_1_0 = "OPL-1.0"
 licenseId OPUBL_1_0 = "OPUBL-1.0"
@@ -1043,10 +950,8 @@ licenseId PostgreSQL = "PostgreSQL"
 licenseId PSF_2_0 = "PSF-2.0"
 licenseId Psfrag = "psfrag"
 licenseId Psutils = "psutils"
-licenseId Python_2_0_1 = "Python-2.0.1"
 licenseId Python_2_0 = "Python-2.0"
 licenseId Qhull = "Qhull"
-licenseId QPL_1_0_INRIA_2004 = "QPL-1.0-INRIA-2004"
 licenseId QPL_1_0 = "QPL-1.0"
 licenseId Rdisc = "Rdisc"
 licenseId RHeCos_1_1 = "RHeCos-1.1"
@@ -1074,7 +979,6 @@ licenseId Sleepycat = "Sleepycat"
 licenseId SMLNJ = "SMLNJ"
 licenseId SMPPL = "SMPPL"
 licenseId SNIA = "SNIA"
-licenseId Snprintf = "snprintf"
 licenseId Spencer_86 = "Spencer-86"
 licenseId Spencer_94 = "Spencer-94"
 licenseId Spencer_99 = "Spencer-99"
@@ -1083,21 +987,15 @@ licenseId SSH_OpenSSH = "SSH-OpenSSH"
 licenseId SSH_short = "SSH-short"
 licenseId SSPL_1_0 = "SSPL-1.0"
 licenseId SugarCRM_1_1_3 = "SugarCRM-1.1.3"
-licenseId SunPro = "SunPro"
 licenseId SWL = "SWL"
-licenseId Symlinks = "Symlinks"
 licenseId TAPR_OHL_1_0 = "TAPR-OHL-1.0"
 licenseId TCL = "TCL"
 licenseId TCP_wrappers = "TCP-wrappers"
 licenseId TMate = "TMate"
 licenseId TORQUE_1_1 = "TORQUE-1.1"
 licenseId TOSL = "TOSL"
-licenseId TPDL = "TPDL"
-licenseId TPL_1_0 = "TPL-1.0"
-licenseId TTWL = "TTWL"
 licenseId TU_Berlin_1_0 = "TU-Berlin-1.0"
 licenseId TU_Berlin_2_0 = "TU-Berlin-2.0"
-licenseId UCAR = "UCAR"
 licenseId UCL_1_0 = "UCL-1.0"
 licenseId Unicode_DFS_2015 = "Unicode-DFS-2015"
 licenseId Unicode_DFS_2016 = "Unicode-DFS-2016"
@@ -1110,7 +1008,6 @@ licenseId VSL_1_0 = "VSL-1.0"
 licenseId W3C_19980720 = "W3C-19980720"
 licenseId W3C_20150513 = "W3C-20150513"
 licenseId W3C = "W3C"
-licenseId W3m = "w3m"
 licenseId Watcom_1_0 = "Watcom-1.0"
 licenseId Wsuipa = "Wsuipa"
 licenseId WTFPL = "WTFPL"
@@ -1119,7 +1016,6 @@ licenseId X11 = "X11"
 licenseId Xerox = "Xerox"
 licenseId XFree86_1_1 = "XFree86-1.1"
 licenseId Xinetd = "xinetd"
-licenseId Xlock = "xlock"
 licenseId Xnet = "Xnet"
 licenseId Xpp = "xpp"
 licenseId XSkat = "XSkat"
@@ -1140,7 +1036,6 @@ licenseName :: LicenseId -> String
 licenseName NullBSD = "BSD Zero Clause License"
 licenseName AAL = "Attribution Assurance License"
 licenseName Abstyles = "Abstyles License"
-licenseName AdaCore_doc = "AdaCore Doc License"
 licenseName Adobe_2006 = "Adobe Systems Incorporated Source Code License Agreement"
 licenseName Adobe_Glyph = "Adobe Glyph List License"
 licenseName ADSL = "Amazon Digital Services License"
@@ -1171,23 +1066,18 @@ licenseName APSL_1_0 = "Apple Public Source License 1.0"
 licenseName APSL_1_1 = "Apple Public Source License 1.1"
 licenseName APSL_1_2 = "Apple Public Source License 1.2"
 licenseName APSL_2_0 = "Apple Public Source License 2.0"
-licenseName Arphic_1999 = "Arphic Public License"
 licenseName Artistic_1_0_cl8 = "Artistic License 1.0 w/clause 8"
 licenseName Artistic_1_0_Perl = "Artistic License 1.0 (Perl)"
 licenseName Artistic_1_0 = "Artistic License 1.0"
 licenseName Artistic_2_0 = "Artistic License 2.0"
-licenseName Baekmuk = "Baekmuk License"
 licenseName Bahyph = "Bahyph License"
 licenseName Barr = "Barr License"
 licenseName Beerware = "Beerware License"
-licenseName Bitstream_Charter = "Bitstream Charter Font License"
-licenseName Bitstream_Vera = "Bitstream Vera Font License"
 licenseName BitTorrent_1_0 = "BitTorrent Open Source License v1.0"
 licenseName BitTorrent_1_1 = "BitTorrent Open Source License v1.1"
 licenseName Blessing = "SQLite Blessing"
 licenseName BlueOak_1_0_0 = "Blue Oak Model License 1.0.0"
 licenseName Borceux = "Borceux license"
-licenseName Brian_Gladman_3_Clause = "Brian Gladman 3-Clause License"
 licenseName BSD_1_Clause = "BSD 1-Clause License"
 licenseName BSD_2_Clause_FreeBSD = "BSD 2-Clause FreeBSD License"
 licenseName BSD_2_Clause_NetBSD = "BSD 2-Clause NetBSD License"
@@ -1207,10 +1097,6 @@ licenseName BSD_3_Clause = "BSD 3-Clause \"New\" or \"Revised\" License"
 licenseName BSD_4_Clause_Shortened = "BSD 4 Clause Shortened"
 licenseName BSD_4_Clause_UC = "BSD-4-Clause (University of California-Specific)"
 licenseName BSD_4_Clause = "BSD 4-Clause \"Original\" or \"Old\" License"
-licenseName BSD_4_3RENO = "BSD 4.3 RENO License"
-licenseName BSD_4_3TAHOE = "BSD 4.3 TAHOE License"
-licenseName BSD_Advertising_Acknowledgement = "BSD Advertising Acknowledgement License"
-licenseName BSD_Attribution_HPND_disclaimer = "BSD with Attribution and HPND disclaimer"
 licenseName BSD_Protection = "BSD Protection License"
 licenseName BSD_Source_Code = "BSD Source Code Attribution"
 licenseName BSL_1_0 = "Boost Software License 1.0"
@@ -1228,7 +1114,6 @@ licenseName CC_BY_2_5_AU = "Creative Commons Attribution 2.5 Australia"
 licenseName CC_BY_2_5 = "Creative Commons Attribution 2.5 Generic"
 licenseName CC_BY_3_0_AT = "Creative Commons Attribution 3.0 Austria"
 licenseName CC_BY_3_0_DE = "Creative Commons Attribution 3.0 Germany"
-licenseName CC_BY_3_0_IGO = "Creative Commons Attribution 3.0 IGO"
 licenseName CC_BY_3_0_NL = "Creative Commons Attribution 3.0 Netherlands"
 licenseName CC_BY_3_0_US = "Creative Commons Attribution 3.0 United States"
 licenseName CC_BY_3_0 = "Creative Commons Attribution 3.0 Unported"
@@ -1247,7 +1132,6 @@ licenseName CC_BY_NC_ND_3_0_IGO = "Creative Commons Attribution Non Commercial N
 licenseName CC_BY_NC_ND_3_0 = "Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported"
 licenseName CC_BY_NC_ND_4_0 = "Creative Commons Attribution Non Commercial No Derivatives 4.0 International"
 licenseName CC_BY_NC_SA_1_0 = "Creative Commons Attribution Non Commercial Share Alike 1.0 Generic"
-licenseName CC_BY_NC_SA_2_0_DE = "Creative Commons Attribution Non Commercial Share Alike 2.0 Germany"
 licenseName CC_BY_NC_SA_2_0_FR = "Creative Commons Attribution-NonCommercial-ShareAlike 2.0 France"
 licenseName CC_BY_NC_SA_2_0_UK = "Creative Commons Attribution Non Commercial Share Alike 2.0 England and Wales"
 licenseName CC_BY_NC_SA_2_0 = "Creative Commons Attribution Non Commercial Share Alike 2.0 Generic"
@@ -1290,11 +1174,7 @@ licenseName CERN_OHL_1_2 = "CERN Open Hardware Licence v1.2"
 licenseName CERN_OHL_P_2_0 = "CERN Open Hardware Licence Version 2 - Permissive"
 licenseName CERN_OHL_S_2_0 = "CERN Open Hardware Licence Version 2 - Strongly Reciprocal"
 licenseName CERN_OHL_W_2_0 = "CERN Open Hardware Licence Version 2 - Weakly Reciprocal"
-licenseName CFITSIO = "CFITSIO License"
-licenseName Checkmk = "Checkmk License"
 licenseName ClArtistic = "Clarified Artistic License"
-licenseName Clips = "Clips License"
-licenseName CMU_Mach = "CMU Mach License"
 licenseName CNRI_Jython = "CNRI Jython License"
 licenseName CNRI_Python_GPL_Compatible = "CNRI Python Open Source GPL Compatible License Agreement"
 licenseName CNRI_Python = "CNRI Python License"
@@ -1303,7 +1183,6 @@ licenseName Community_Spec_1_0 = "Community Specification License 1.0"
 licenseName Condor_1_1 = "Condor Public License v1.1"
 licenseName Copyleft_next_0_3_0 = "copyleft-next 0.3.0"
 licenseName Copyleft_next_0_3_1 = "copyleft-next 0.3.1"
-licenseName Cornell_Lossless_JPEG = "Cornell Lossless JPEG License"
 licenseName CPAL_1_0 = "Common Public Attribution License 1.0"
 licenseName CPL_1_0 = "Common Public License 1.0"
 licenseName CPOL_1_02 = "Code Project Open License 1.02"
@@ -1343,7 +1222,6 @@ licenseName Frameworx_1_0 = "Frameworx Open License 1.0"
 licenseName FreeBSD_DOC = "FreeBSD Documentation License"
 licenseName FreeImage = "FreeImage Public License v1.0"
 licenseName FSFAP = "FSF All Permissive License"
-licenseName FSFULLRWD = "FSF Unlimited License (With License Retention    and Warranty Disclaimer)"
 licenseName FSFULLR = "FSF Unlimited License (with License Retention)"
 licenseName FSFUL = "FSF Unlimited License"
 licenseName FTL = "Freetype Project License"
@@ -1378,21 +1256,14 @@ licenseName GPL_2_0_only = "GNU General Public License v2.0 only"
 licenseName GPL_2_0_or_later = "GNU General Public License v2.0 or later"
 licenseName GPL_3_0_only = "GNU General Public License v3.0 only"
 licenseName GPL_3_0_or_later = "GNU General Public License v3.0 or later"
-licenseName Graphics_Gems = "Graphics Gems License"
 licenseName GSOAP_1_3b = "gSOAP Public License v1.3b"
 licenseName HaskellReport = "Haskell Language Report License"
 licenseName Hippocratic_2_1 = "Hippocratic License 2.1"
-licenseName HP_1986 = "Hewlett-Packard 1986 License"
-licenseName HPND_export_US = "HPND with US Government export control warning"
-licenseName HPND_Markus_Kuhn = "Historical Permission Notice and Disclaimer - Markus Kuhn variant"
-licenseName HPND_sell_variant_MIT_disclaimer = "HPND sell variant with MIT disclaimer"
 licenseName HPND_sell_variant = "Historical Permission Notice and Disclaimer - sell variant"
 licenseName HPND = "Historical Permission Notice and Disclaimer"
 licenseName HTMLTIDY = "HTML Tidy License"
 licenseName IBM_pibs = "IBM PowerPC Initialization and Boot Software"
 licenseName ICU = "ICU License"
-licenseName IEC_Code_Components_EULA = "IEC    Code Components End-user licence agreement"
-licenseName IJG_short = "Independent JPEG Group License - short"
 licenseName IJG = "Independent JPEG Group License"
 licenseName ImageMagick = "ImageMagick License"
 licenseName IMatix = "iMatix Standard Function Library Agreement"
@@ -1406,11 +1277,8 @@ licenseName IPL_1_0 = "IBM Public License v1.0"
 licenseName ISC = "ISC License"
 licenseName Jam = "Jam License"
 licenseName JasPer_2_0 = "JasPer License"
-licenseName JPL_image = "JPL Image Use Policy"
 licenseName JPNIC = "Japan Network Information Center License"
 licenseName JSON = "JSON License"
-licenseName Kazlib = "Kazlib License"
-licenseName Knuth_CTAN = "Knuth CTAN License"
 licenseName LAL_1_2 = "Licence Art Libre 1.2"
 licenseName LAL_1_3 = "Licence Art Libre 1.3"
 licenseName Latex2e = "Latex2e License"
@@ -1426,13 +1294,11 @@ licenseName Libpng_2_0 = "PNG Reference Library version 2"
 licenseName Libpng = "libpng License"
 licenseName Libselinux_1_0 = "libselinux public domain notice"
 licenseName Libtiff = "libtiff License"
-licenseName Libutil_David_Nugent = "libutil David Nugent License"
 licenseName LiLiQ_P_1_1 = "Licence Libre du Qu\233bec \8211 Permissive version 1.1"
 licenseName LiLiQ_R_1_1 = "Licence Libre du Qu\233bec \8211 R\233ciprocit\233 version 1.1"
 licenseName LiLiQ_Rplus_1_1 = "Licence Libre du Qu\233bec \8211 R\233ciprocit\233 forte version 1.1"
 licenseName Linux_man_pages_copyleft = "Linux man-pages Copyleft"
 licenseName Linux_OpenIB = "Linux Kernel Variant of OpenIB.org license"
-licenseName LOOP = "Common Lisp LOOP License"
 licenseName LPL_1_02 = "Lucent Public License v1.02"
 licenseName LPL_1_0 = "Lucent Public License Version 1.0"
 licenseName LPPL_1_0 = "LaTeX Project Public License v1.0"
@@ -1440,11 +1306,7 @@ licenseName LPPL_1_1 = "LaTeX Project Public License v1.1"
 licenseName LPPL_1_2 = "LaTeX Project Public License v1.2"
 licenseName LPPL_1_3a = "LaTeX Project Public License v1.3a"
 licenseName LPPL_1_3c = "LaTeX Project Public License v1.3c"
-licenseName LZMA_SDK_9_11_to_9_20 = "LZMA SDK License (versions 9.11 to 9.20)"
-licenseName LZMA_SDK_9_22 = "LZMA SDK License (versions 9.22 and beyond)"
 licenseName MakeIndex = "MakeIndex License"
-licenseName Martin_Birgmeier = "Martin Birgmeier License"
-licenseName Minpack = "Minpack License"
 licenseName MirOS = "The MirOS Licence"
 licenseName MIT_0 = "MIT No Attribution"
 licenseName MIT_advertising = "Enlightenment License (e16)"
@@ -1453,18 +1315,14 @@ licenseName MIT_enna = "enna License"
 licenseName MIT_feh = "feh License"
 licenseName MIT_Modern_Variant = "MIT License Modern Variant"
 licenseName MIT_open_group = "MIT Open Group variant"
-licenseName MIT_Wu = "MIT Tom Wu Variant"
 licenseName MITNFA = "MIT +no-false-attribs license"
 licenseName MIT = "MIT License"
 licenseName Motosoto = "Motosoto License"
-licenseName Mpi_permissive = "mpi Permissive License"
 licenseName Mpich2 = "mpich2 License"
 licenseName MPL_1_0 = "Mozilla Public License 1.0"
 licenseName MPL_1_1 = "Mozilla Public License 1.1"
 licenseName MPL_2_0_no_copyleft_exception = "Mozilla Public License 2.0 (no copyleft exception)"
 licenseName MPL_2_0 = "Mozilla Public License 2.0"
-licenseName Mplus = "mplus Font License"
-licenseName MS_LPL = "Microsoft Limited Public License"
 licenseName MS_PL = "Microsoft Public License"
 licenseName MS_RL = "Microsoft Reciprocal License"
 licenseName MTLL = "Matrix Template Library License"
@@ -1482,7 +1340,6 @@ licenseName Net_SNMP = "Net-SNMP License"
 licenseName NetCDF = "NetCDF license"
 licenseName Newsletr = "Newsletr License"
 licenseName NGPL = "Nethack General Public License"
-licenseName NICTA_1_0 = "NICTA Public Software License, Version 1.0"
 licenseName NIST_PD_fallback = "NIST Public Domain Notice with license fallback"
 licenseName NIST_PD = "NIST Public Domain Notice"
 licenseName NLOD_1_0 = "Norwegian Licence for Open Government Data (NLOD) 1.0"
@@ -1502,7 +1359,6 @@ licenseName OCCT_PL = "Open CASCADE Technology Public License"
 licenseName OCLC_2_0 = "OCLC Research Public License 2.0"
 licenseName ODbL_1_0 = "Open Data Commons Open Database License v1.0"
 licenseName ODC_By_1_0 = "Open Data Commons Attribution License v1.0"
-licenseName OFFIS = "OFFIS License"
 licenseName OFL_1_0_no_RFN = "SIL Open Font License 1.0 with no Reserved Font Name"
 licenseName OFL_1_0_RFN = "SIL Open Font License 1.0 with Reserved Font Name"
 licenseName OFL_1_0 = "SIL Open Font License 1.0"
@@ -1533,7 +1389,6 @@ licenseName OLDAP_2_6 = "Open LDAP Public License v2.6"
 licenseName OLDAP_2_7 = "Open LDAP Public License v2.7"
 licenseName OLDAP_2_8 = "Open LDAP Public License v2.8"
 licenseName OML = "Open Market License"
-licenseName OpenPBS_2_3 = "OpenPBS v2.3 Software License"
 licenseName OpenSSL = "OpenSSL License"
 licenseName OPL_1_0 = "Open Public License v1.0"
 licenseName OPUBL_1_0 = "Open Publication License v1.0"
@@ -1555,10 +1410,8 @@ licenseName PostgreSQL = "PostgreSQL License"
 licenseName PSF_2_0 = "Python Software Foundation License 2.0"
 licenseName Psfrag = "psfrag License"
 licenseName Psutils = "psutils License"
-licenseName Python_2_0_1 = "Python License 2.0.1"
 licenseName Python_2_0 = "Python License 2.0"
 licenseName Qhull = "Qhull License"
-licenseName QPL_1_0_INRIA_2004 = "Q Public License 1.0 - INRIA 2004 variant"
 licenseName QPL_1_0 = "Q Public License 1.0"
 licenseName Rdisc = "Rdisc License"
 licenseName RHeCos_1_1 = "Red Hat eCos Public License v1.1"
@@ -1586,7 +1439,6 @@ licenseName Sleepycat = "Sleepycat License"
 licenseName SMLNJ = "Standard ML of New Jersey License"
 licenseName SMPPL = "Secure Messaging Protocol Public License"
 licenseName SNIA = "SNIA Public License 1.1"
-licenseName Snprintf = "snprintf License"
 licenseName Spencer_86 = "Spencer License 86"
 licenseName Spencer_94 = "Spencer License 94"
 licenseName Spencer_99 = "Spencer License 99"
@@ -1595,21 +1447,15 @@ licenseName SSH_OpenSSH = "SSH OpenSSH license"
 licenseName SSH_short = "SSH short notice"
 licenseName SSPL_1_0 = "Server Side Public License, v 1"
 licenseName SugarCRM_1_1_3 = "SugarCRM Public License v1.1.3"
-licenseName SunPro = "SunPro License"
 licenseName SWL = "Scheme Widget Library (SWL) Software License Agreement"
-licenseName Symlinks = "Symlinks License"
 licenseName TAPR_OHL_1_0 = "TAPR Open Hardware License v1.0"
 licenseName TCL = "TCL/TK License"
 licenseName TCP_wrappers = "TCP Wrappers License"
 licenseName TMate = "TMate Open Source License"
 licenseName TORQUE_1_1 = "TORQUE v2.5+ Software License v1.1"
 licenseName TOSL = "Trusster Open Source License"
-licenseName TPDL = "Time::ParseDate License"
-licenseName TPL_1_0 = "THOR Public License 1.0"
-licenseName TTWL = "Text-Tabs+Wrap License"
 licenseName TU_Berlin_1_0 = "Technische Universitaet Berlin License 1.0"
 licenseName TU_Berlin_2_0 = "Technische Universitaet Berlin License 2.0"
-licenseName UCAR = "UCAR License"
 licenseName UCL_1_0 = "Upstream Compatibility License v1.0"
 licenseName Unicode_DFS_2015 = "Unicode License Agreement - Data Files and Software (2015)"
 licenseName Unicode_DFS_2016 = "Unicode License Agreement - Data Files and Software (2016)"
@@ -1622,7 +1468,6 @@ licenseName VSL_1_0 = "Vovida Software License v1.0"
 licenseName W3C_19980720 = "W3C Software Notice and License (1998-07-20)"
 licenseName W3C_20150513 = "W3C Software Notice and Document License (2015-05-13)"
 licenseName W3C = "W3C Software Notice and License (2002-12-31)"
-licenseName W3m = "w3m License"
 licenseName Watcom_1_0 = "Sybase Open Watcom Public License 1.0"
 licenseName Wsuipa = "Wsuipa License"
 licenseName WTFPL = "Do What The F*ck You Want To Public License"
@@ -1631,7 +1476,6 @@ licenseName X11 = "X11 License"
 licenseName Xerox = "Xerox License"
 licenseName XFree86_1_1 = "XFree86 License 1.1"
 licenseName Xinetd = "xinetd License"
-licenseName Xlock = "xlock License"
 licenseName Xnet = "X.Net License"
 licenseName Xpp = "XPP License"
 licenseName XSkat = "XSkat License"
@@ -1710,7 +1554,6 @@ licenseIsOsiApproved Intel = True
 licenseIsOsiApproved IPA = True
 licenseIsOsiApproved IPL_1_0 = True
 licenseIsOsiApproved ISC = True
-licenseIsOsiApproved Jam = True
 licenseIsOsiApproved LGPL_2_0_only = True
 licenseIsOsiApproved LGPL_2_0_or_later = True
 licenseIsOsiApproved LGPL_2_1_only = True
@@ -2211,176 +2054,6 @@ licenseIdList LicenseListVersion_3_16 =
     , X11_distribute_modifications_variant
     ]
     ++ bulkOfLicenses
-licenseIdList LicenseListVersion_3_20 =
-    [ AdaCore_doc
-    , AGPL_1_0_only
-    , AGPL_1_0_or_later
-    , ANTLR_PD_fallback
-    , App_s2p
-    , Arphic_1999
-    , Baekmuk
-    , Bitstream_Charter
-    , Bitstream_Vera
-    , Blessing
-    , BlueOak_1_0_0
-    , Brian_Gladman_3_Clause
-    , BSD_2_Clause_Views
-    , BSD_3_Clause_Modification
-    , BSD_3_Clause_No_Military_License
-    , BSD_3_Clause_Open_MPI
-    , BSD_4_Clause_Shortened
-    , BSD_4_3RENO
-    , BSD_4_3TAHOE
-    , BSD_Advertising_Acknowledgement
-    , BSD_Attribution_HPND_disclaimer
-    , BUSL_1_1
-    , C_UDA_1_0
-    , CAL_1_0_Combined_Work_Exception
-    , CAL_1_0
-    , CC_BY_2_5_AU
-    , CC_BY_3_0_AT
-    , CC_BY_3_0_DE
-    , CC_BY_3_0_IGO
-    , CC_BY_3_0_NL
-    , CC_BY_3_0_US
-    , CC_BY_NC_3_0_DE
-    , CC_BY_NC_ND_3_0_DE
-    , CC_BY_NC_ND_3_0_IGO
-    , CC_BY_NC_SA_2_0_DE
-    , CC_BY_NC_SA_2_0_FR
-    , CC_BY_NC_SA_2_0_UK
-    , CC_BY_NC_SA_3_0_DE
-    , CC_BY_NC_SA_3_0_IGO
-    , CC_BY_ND_3_0_DE
-    , CC_BY_SA_2_0_UK
-    , CC_BY_SA_2_1_JP
-    , CC_BY_SA_3_0_AT
-    , CC_BY_SA_3_0_DE
-    , CC_PDDC
-    , CDL_1_0
-    , CDLA_Permissive_2_0
-    , CERN_OHL_1_1
-    , CERN_OHL_1_2
-    , CERN_OHL_P_2_0
-    , CERN_OHL_S_2_0
-    , CERN_OHL_W_2_0
-    , CFITSIO
-    , Checkmk
-    , Clips
-    , CMU_Mach
-    , COIL_1_0
-    , Community_Spec_1_0
-    , Copyleft_next_0_3_0
-    , Copyleft_next_0_3_1
-    , Cornell_Lossless_JPEG
-    , DL_DE_BY_2_0
-    , DRL_1_0
-    , Elastic_2_0
-    , EPICS
-    , Etalab_2_0
-    , FDK_AAC
-    , FreeBSD_DOC
-    , FSFULLRWD
-    , GD
-    , GFDL_1_1_invariants_only
-    , GFDL_1_1_invariants_or_later
-    , GFDL_1_1_no_invariants_only
-    , GFDL_1_1_no_invariants_or_later
-    , GFDL_1_2_invariants_only
-    , GFDL_1_2_invariants_or_later
-    , GFDL_1_2_no_invariants_only
-    , GFDL_1_2_no_invariants_or_later
-    , GFDL_1_3_invariants_only
-    , GFDL_1_3_invariants_or_later
-    , GFDL_1_3_no_invariants_only
-    , GFDL_1_3_no_invariants_or_later
-    , GLWTPL
-    , Graphics_Gems
-    , Hippocratic_2_1
-    , HP_1986
-    , HPND_export_US
-    , HPND_Markus_Kuhn
-    , HPND_sell_variant_MIT_disclaimer
-    , HPND_sell_variant
-    , HTMLTIDY
-    , IEC_Code_Components_EULA
-    , IJG_short
-    , Jam
-    , JPL_image
-    , JPNIC
-    , Kazlib
-    , Knuth_CTAN
-    , Libpng_2_0
-    , Libselinux_1_0
-    , Libutil_David_Nugent
-    , Linux_man_pages_copyleft
-    , Linux_OpenIB
-    , LOOP
-    , LZMA_SDK_9_11_to_9_20
-    , LZMA_SDK_9_22
-    , Martin_Birgmeier
-    , Minpack
-    , MIT_0
-    , MIT_Modern_Variant
-    , MIT_open_group
-    , MIT_Wu
-    , Mpi_permissive
-    , Mplus
-    , MS_LPL
-    , MulanPSL_1_0
-    , MulanPSL_2_0
-    , NAIST_2003
-    , NCGL_UK_2_0
-    , NICTA_1_0
-    , NIST_PD_fallback
-    , NIST_PD
-    , NLOD_2_0
-    , NTP_0
-    , O_UDA_1_0
-    , ODC_By_1_0
-    , OFFIS
-    , OFL_1_0_no_RFN
-    , OFL_1_0_RFN
-    , OFL_1_1_no_RFN
-    , OFL_1_1_RFN
-    , OGC_1_0
-    , OGDL_Taiwan_1_0
-    , OGL_Canada_2_0
-    , OGL_UK_1_0
-    , OGL_UK_2_0
-    , OGL_UK_3_0
-    , OpenPBS_2_3
-    , OPUBL_1_0
-    , Parity_6_0_0
-    , Parity_7_0_0
-    , PolyForm_Noncommercial_1_0_0
-    , PolyForm_Small_Business_1_0_0
-    , PSF_2_0
-    , Python_2_0_1
-    , QPL_1_0_INRIA_2004
-    , SchemeReport
-    , Sendmail_8_23
-    , SHL_0_51
-    , SHL_0_5
-    , Snprintf
-    , SSH_OpenSSH
-    , SSH_short
-    , SSPL_1_0
-    , SunPro
-    , Symlinks
-    , TAPR_OHL_1_0
-    , TPDL
-    , TPL_1_0
-    , TTWL
-    , TU_Berlin_1_0
-    , TU_Berlin_2_0
-    , UCAR
-    , UCL_1_0
-    , W3m
-    , X11_distribute_modifications_variant
-    , Xlock
-    ]
-    ++ bulkOfLicenses
 
 -- | Create a 'LicenseId' from a 'String'.
 mkLicenseId :: LicenseListVersion -> String -> Maybe LicenseId
@@ -2390,7 +2063,6 @@ mkLicenseId LicenseListVersion_3_6  s = Map.lookup s stringLookup_3_6
 mkLicenseId LicenseListVersion_3_9  s = Map.lookup s stringLookup_3_9
 mkLicenseId LicenseListVersion_3_10 s = Map.lookup s stringLookup_3_10
 mkLicenseId LicenseListVersion_3_16 s = Map.lookup s stringLookup_3_16
-mkLicenseId LicenseListVersion_3_20 s = Map.lookup s stringLookup_3_20
 
 stringLookup_3_0 :: Map String LicenseId
 stringLookup_3_0 = Map.fromList $ map (\i -> (licenseId i, i)) $
@@ -2416,10 +2088,6 @@ stringLookup_3_16 :: Map String LicenseId
 stringLookup_3_16 = Map.fromList $ map (\i -> (licenseId i, i)) $
     licenseIdList LicenseListVersion_3_16
 
-stringLookup_3_20 :: Map String LicenseId
-stringLookup_3_20 = Map.fromList $ map (\i -> (licenseId i, i)) $
-    licenseIdList LicenseListVersion_3_20
-
 --  | Licenses in all SPDX License lists
 bulkOfLicenses :: [LicenseId]
 bulkOfLicenses =
diff --git a/Cabal-syntax/src/Distribution/SPDX/LicenseListVersion.hs b/Cabal-syntax/src/Distribution/SPDX/LicenseListVersion.hs
index f6a403f13c2..467405a0b59 100644
--- a/Cabal-syntax/src/Distribution/SPDX/LicenseListVersion.hs
+++ b/Cabal-syntax/src/Distribution/SPDX/LicenseListVersion.hs
@@ -13,11 +13,10 @@ data LicenseListVersion
     | LicenseListVersion_3_9
     | LicenseListVersion_3_10
     | LicenseListVersion_3_16
-    | LicenseListVersion_3_20
   deriving (Eq, Ord, Show, Enum, Bounded)
 
 cabalSpecVersionToSPDXListVersion :: CabalSpecVersion -> LicenseListVersion
-cabalSpecVersionToSPDXListVersion CabalSpecV3_8 = LicenseListVersion_3_20
+cabalSpecVersionToSPDXListVersion CabalSpecV3_8 = LicenseListVersion_3_16
 cabalSpecVersionToSPDXListVersion CabalSpecV3_6 = LicenseListVersion_3_10
 cabalSpecVersionToSPDXListVersion CabalSpecV3_4 = LicenseListVersion_3_9
 cabalSpecVersionToSPDXListVersion CabalSpecV3_0 = LicenseListVersion_3_6
diff --git a/Makefile b/Makefile
index c95c3274b0f..40f213eb49e 100644
--- a/Makefile
+++ b/Makefile
@@ -32,12 +32,12 @@ SPDX_EXCEPTION_HS:=Cabal-syntax/src/Distribution/SPDX/LicenseExceptionId.hs
 
 spdx : $(SPDX_LICENSE_HS) $(SPDX_EXCEPTION_HS)
 
-SPDX_LICENSE_VERSIONS:=3.0 3.2 3.6 3.9 3.10 3.16 3.20
+SPDX_LICENSE_VERSIONS:=3.0 3.2 3.6 3.9 3.10 3.16
 
-$(SPDX_LICENSE_HS) : templates/SPDX.LicenseId.template.hs cabal-dev-scripts/src/GenUtils.hs cabal-dev-scripts/src/GenSPDX.hs license-list-data/licenses-3.20.json license-list-data/licenses-3.20.json
+$(SPDX_LICENSE_HS) : templates/SPDX.LicenseId.template.hs cabal-dev-scripts/src/GenUtils.hs cabal-dev-scripts/src/GenSPDX.hs license-list-data/licenses-3.0.json license-list-data/licenses-3.2.json
 	cabal v2-run --builddir=dist-newstyle-meta --project-file=cabal.project.meta gen-spdx -- templates/SPDX.LicenseId.template.hs $(SPDX_LICENSE_VERSIONS:%=license-list-data/licenses-%.json) $(SPDX_LICENSE_HS)
 
-$(SPDX_EXCEPTION_HS) : templates/SPDX.LicenseExceptionId.template.hs cabal-dev-scripts/src/GenUtils.hs cabal-dev-scripts/src/GenSPDXExc.hs license-list-data/exceptions-3.20.json license-list-data/exceptions-3.20.json
+$(SPDX_EXCEPTION_HS) : templates/SPDX.LicenseExceptionId.template.hs cabal-dev-scripts/src/GenUtils.hs cabal-dev-scripts/src/GenSPDXExc.hs license-list-data/exceptions-3.0.json license-list-data/exceptions-3.2.json
 	cabal v2-run --builddir=dist-newstyle-meta --project-file=cabal.project.meta gen-spdx-exc -- templates/SPDX.LicenseExceptionId.template.hs $(SPDX_LICENSE_VERSIONS:%=license-list-data/exceptions-%.json) $(SPDX_EXCEPTION_HS)
 
 # source generation: templates
diff --git a/cabal-dev-scripts/cabal-dev-scripts.cabal b/cabal-dev-scripts/cabal-dev-scripts.cabal
index 24e160eaa92..dcf40f84371 100644
--- a/cabal-dev-scripts/cabal-dev-scripts.cabal
+++ b/cabal-dev-scripts/cabal-dev-scripts.cabal
@@ -18,7 +18,7 @@ executable gen-spdx
   ghc-options:      -Wall
   build-depends:
     , aeson                 ^>=1.4.1.0 || ^>=1.5.2.0 || ^>=2.1.1.0
-    , base                  >=4.10     && <4.19
+    , base                  >=4.10     && <4.17
     , bytestring
     , containers
     , Diff                  ^>=0.4
@@ -35,7 +35,7 @@ executable gen-spdx-exc
   ghc-options:      -Wall
   build-depends:
     , aeson                 ^>=1.4.1.0 || ^>=1.5.2.0 || ^>=2.1.1.0
-    , base                  >=4.10     && <4.19
+    , base                  >=4.10     && <4.17
     , bytestring
     , containers
     , Diff                  ^>=0.4
diff --git a/cabal-dev-scripts/src/GenSPDX.hs b/cabal-dev-scripts/src/GenSPDX.hs
index 53518d9f77f..288a0643a9c 100644
--- a/cabal-dev-scripts/src/GenSPDX.hs
+++ b/cabal-dev-scripts/src/GenSPDX.hs
@@ -36,7 +36,6 @@ main = generate =<< O.execParser opts where
         <*> licenses "3.9"
         <*> licenses "3.10"
         <*> licenses "3.16"
-        <*> licenses "3.20"
 
     template = O.strArgument $ mconcat
         [ O.metavar "SPDX.LicenseId.template.hs"
diff --git a/cabal-dev-scripts/src/GenSPDXExc.hs b/cabal-dev-scripts/src/GenSPDXExc.hs
index c4d972bb4ad..c0fa0f3861d 100644
--- a/cabal-dev-scripts/src/GenSPDXExc.hs
+++ b/cabal-dev-scripts/src/GenSPDXExc.hs
@@ -35,7 +35,6 @@ main = generate =<< O.execParser opts where
         <*> licenses "3.9"
         <*> licenses "3.10"
         <*> licenses "3.16"
-        <*> licenses "3.20"
 
     template = O.strArgument $ mconcat
         [ O.metavar "SPDX.LicenseExceptionId.template.hs"
diff --git a/cabal-dev-scripts/src/GenUtils.hs b/cabal-dev-scripts/src/GenUtils.hs
index f9c096bc884..41834ef517a 100644
--- a/cabal-dev-scripts/src/GenUtils.hs
+++ b/cabal-dev-scripts/src/GenUtils.hs
@@ -32,14 +32,12 @@ data SPDXLicenseListVersion
     | SPDXLicenseListVersion_3_9
     | SPDXLicenseListVersion_3_10
     | SPDXLicenseListVersion_3_16
-    | SPDXLicenseListVersion_3_20
   deriving (Eq, Ord, Show, Enum, Bounded)
 
 allVers :: Set.Set SPDXLicenseListVersion
 allVers =  Set.fromList [minBound .. maxBound]
 
 prettyVer :: SPDXLicenseListVersion -> Text
-prettyVer SPDXLicenseListVersion_3_20 = "SPDX License List 3.20"
 prettyVer SPDXLicenseListVersion_3_16 = "SPDX License List 3.16"
 prettyVer SPDXLicenseListVersion_3_10 = "SPDX License List 3.10"
 prettyVer SPDXLicenseListVersion_3_9  = "SPDX License List 3.9"
@@ -48,7 +46,6 @@ prettyVer SPDXLicenseListVersion_3_2  = "SPDX License List 3.2"
 prettyVer SPDXLicenseListVersion_3_0  = "SPDX License List 3.0"
 
 suffixVer :: SPDXLicenseListVersion -> String
-suffixVer SPDXLicenseListVersion_3_20 = "_3_20"
 suffixVer SPDXLicenseListVersion_3_16 = "_3_16"
 suffixVer SPDXLicenseListVersion_3_10 = "_3_10"
 suffixVer SPDXLicenseListVersion_3_9  = "_3_9"
@@ -60,7 +57,7 @@ suffixVer SPDXLicenseListVersion_3_0  = "_3_0"
 -- Per version
 -------------------------------------------------------------------------------
 
-data PerV a = PerV a a a a a a a
+data PerV a = PerV a a a a a a
   deriving (Show, Functor, Foldable, Traversable)
 
 class Functor f => Representable i f | f -> i where
@@ -68,13 +65,12 @@ class Functor f => Representable i f | f -> i where
     tabulate :: (i -> a) -> f a
 
 instance Representable SPDXLicenseListVersion PerV where
-    index SPDXLicenseListVersion_3_0  (PerV x _ _ _ _ _ _) = x
-    index SPDXLicenseListVersion_3_2  (PerV _ x _ _ _ _ _) = x
-    index SPDXLicenseListVersion_3_6  (PerV _ _ x _ _ _ _) = x
-    index SPDXLicenseListVersion_3_9  (PerV _ _ _ x _ _ _) = x
-    index SPDXLicenseListVersion_3_10 (PerV _ _ _ _ x _ _) = x
-    index SPDXLicenseListVersion_3_16 (PerV _ _ _ _ _ x _) = x
-    index SPDXLicenseListVersion_3_20 (PerV _ _ _ _ _ _ x) = x
+    index SPDXLicenseListVersion_3_0  (PerV x _ _ _ _ _) = x
+    index SPDXLicenseListVersion_3_2  (PerV _ x _ _ _ _) = x
+    index SPDXLicenseListVersion_3_6  (PerV _ _ x _ _ _) = x
+    index SPDXLicenseListVersion_3_9  (PerV _ _ _ x _ _) = x
+    index SPDXLicenseListVersion_3_10 (PerV _ _ _ _ x _) = x
+    index SPDXLicenseListVersion_3_16 (PerV _ _ _ _ _ x) = x
 
     tabulate f = PerV
         (f SPDXLicenseListVersion_3_0)
@@ -83,7 +79,6 @@ instance Representable SPDXLicenseListVersion PerV where
         (f SPDXLicenseListVersion_3_9)
         (f SPDXLicenseListVersion_3_10)
         (f SPDXLicenseListVersion_3_16)
-        (f SPDXLicenseListVersion_3_20)
 
 -------------------------------------------------------------------------------
 -- Sorting
diff --git a/changelog.d/pr-9028 b/changelog.d/pr-9028
deleted file mode 100644
index 6a781f360d5..00000000000
--- a/changelog.d/pr-9028
+++ /dev/null
@@ -1,7 +0,0 @@
-synopsis: Update SPDX license Ids & exceptions to 3.20
-packages: cabal-syntax
-prs: #9028
-
-description: {
-  Integrate the SPDX License Ids & Exceptions index v3.20
-}
diff --git a/fix-whitespace.yaml b/fix-whitespace.yaml
index 1fa91e57c83..d96e84188b1 100644
--- a/fix-whitespace.yaml
+++ b/fix-whitespace.yaml
@@ -32,7 +32,6 @@ excluded-dirs:
   - .python-sphinx-virtualenv
   - .stack-work
   - .vscode
-  - license-list-data
 
 # Every matched filename is included unless it is matched by excluded-files.
 included-files:
diff --git a/license-list-data/exceptions-3.20.json b/license-list-data/exceptions-3.20.json
deleted file mode 100644
index 28dde08c49d..00000000000
--- a/license-list-data/exceptions-3.20.json
+++ /dev/null
@@ -1,558 +0,0 @@
-{
-  "licenseListVersion": "3.20",
-  "exceptions": [
-    {
-      "reference": "./389-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./389-exception.html",
-      "referenceNumber": 35,
-      "name": "389 Directory Server Exception",
-      "licenseExceptionId": "389-exception",
-      "seeAlso": [
-        "http://directory.fedoraproject.org/wiki/GPL_Exception_License_Text",
-        "https://web.archive.org/web/20080828121337/http://directory.fedoraproject.org/wiki/GPL_Exception_License_Text"
-      ]
-    },
-    {
-      "reference": "./Autoconf-exception-2.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Autoconf-exception-2.0.html",
-      "referenceNumber": 9,
-      "name": "Autoconf exception 2.0",
-      "licenseExceptionId": "Autoconf-exception-2.0",
-      "seeAlso": [
-        "http://ac-archive.sourceforge.net/doc/copyright.html",
-        "http://ftp.gnu.org/gnu/autoconf/autoconf-2.59.tar.gz"
-      ]
-    },
-    {
-      "reference": "./Autoconf-exception-3.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Autoconf-exception-3.0.html",
-      "referenceNumber": 8,
-      "name": "Autoconf exception 3.0",
-      "licenseExceptionId": "Autoconf-exception-3.0",
-      "seeAlso": [
-        "http://www.gnu.org/licenses/autoconf-exception-3.0.html"
-      ]
-    },
-    {
-      "reference": "./Autoconf-exception-generic.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Autoconf-exception-generic.html",
-      "referenceNumber": 39,
-      "name": "Autoconf generic exception",
-      "licenseExceptionId": "Autoconf-exception-generic",
-      "seeAlso": [
-        "https://launchpad.net/ubuntu/precise/+source/xmltooling/+copyright",
-        "https://tracker.debian.org/media/packages/s/sipwitch/copyright-1.9.15-3",
-        "https://opensource.apple.com/source/launchd/launchd-258.1/launchd/compile.auto.html"
-      ]
-    },
-    {
-      "reference": "./Bison-exception-2.2.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Bison-exception-2.2.html",
-      "referenceNumber": 37,
-      "name": "Bison exception 2.2",
-      "licenseExceptionId": "Bison-exception-2.2",
-      "seeAlso": [
-        "http://git.savannah.gnu.org/cgit/bison.git/tree/data/yacc.c?id\u003d193d7c7054ba7197b0789e14965b739162319b5e#n141"
-      ]
-    },
-    {
-      "reference": "./Bootloader-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Bootloader-exception.html",
-      "referenceNumber": 20,
-      "name": "Bootloader Distribution Exception",
-      "licenseExceptionId": "Bootloader-exception",
-      "seeAlso": [
-        "https://github.com/pyinstaller/pyinstaller/blob/develop/COPYING.txt"
-      ]
-    },
-    {
-      "reference": "./Classpath-exception-2.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Classpath-exception-2.0.html",
-      "referenceNumber": 36,
-      "name": "Classpath exception 2.0",
-      "licenseExceptionId": "Classpath-exception-2.0",
-      "seeAlso": [
-        "http://www.gnu.org/software/classpath/license.html",
-        "https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception"
-      ]
-    },
-    {
-      "reference": "./CLISP-exception-2.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./CLISP-exception-2.0.html",
-      "referenceNumber": 5,
-      "name": "CLISP exception 2.0",
-      "licenseExceptionId": "CLISP-exception-2.0",
-      "seeAlso": [
-        "http://sourceforge.net/p/clisp/clisp/ci/default/tree/COPYRIGHT"
-      ]
-    },
-    {
-      "reference": "./DigiRule-FOSS-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./DigiRule-FOSS-exception.html",
-      "referenceNumber": 34,
-      "name": "DigiRule FOSS License Exception",
-      "licenseExceptionId": "DigiRule-FOSS-exception",
-      "seeAlso": [
-        "http://www.digirulesolutions.com/drupal/foss"
-      ]
-    },
-    {
-      "reference": "./eCos-exception-2.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./eCos-exception-2.0.html",
-      "referenceNumber": 31,
-      "name": "eCos exception 2.0",
-      "licenseExceptionId": "eCos-exception-2.0",
-      "seeAlso": [
-        "http://ecos.sourceware.org/license-overview.html"
-      ]
-    },
-    {
-      "reference": "./Fawkes-Runtime-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Fawkes-Runtime-exception.html",
-      "referenceNumber": 22,
-      "name": "Fawkes Runtime Exception",
-      "licenseExceptionId": "Fawkes-Runtime-exception",
-      "seeAlso": [
-        "http://www.fawkesrobotics.org/about/license/"
-      ]
-    },
-    {
-      "reference": "./FLTK-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./FLTK-exception.html",
-      "referenceNumber": 42,
-      "name": "FLTK exception",
-      "licenseExceptionId": "FLTK-exception",
-      "seeAlso": [
-        "http://www.fltk.org/COPYING.php"
-      ]
-    },
-    {
-      "reference": "./Font-exception-2.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Font-exception-2.0.html",
-      "referenceNumber": 29,
-      "name": "Font exception 2.0",
-      "licenseExceptionId": "Font-exception-2.0",
-      "seeAlso": [
-        "http://www.gnu.org/licenses/gpl-faq.html#FontException"
-      ]
-    },
-    {
-      "reference": "./freertos-exception-2.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./freertos-exception-2.0.html",
-      "referenceNumber": 25,
-      "name": "FreeRTOS Exception 2.0",
-      "licenseExceptionId": "freertos-exception-2.0",
-      "seeAlso": [
-        "https://web.archive.org/web/20060809182744/http://www.freertos.org/a00114.html"
-      ]
-    },
-    {
-      "reference": "./GCC-exception-2.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./GCC-exception-2.0.html",
-      "referenceNumber": 24,
-      "name": "GCC Runtime Library exception 2.0",
-      "licenseExceptionId": "GCC-exception-2.0",
-      "seeAlso": [
-        "https://gcc.gnu.org/git/?p\u003dgcc.git;a\u003dblob;f\u003dgcc/libgcc1.c;h\u003d762f5143fc6eed57b6797c82710f3538aa52b40b;hb\u003dcb143a3ce4fb417c68f5fa2691a1b1b1053dfba9#l10"
-      ]
-    },
-    {
-      "reference": "./GCC-exception-3.1.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./GCC-exception-3.1.html",
-      "referenceNumber": 11,
-      "name": "GCC Runtime Library exception 3.1",
-      "licenseExceptionId": "GCC-exception-3.1",
-      "seeAlso": [
-        "http://www.gnu.org/licenses/gcc-exception-3.1.html"
-      ]
-    },
-    {
-      "reference": "./GNAT-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./GNAT-exception.html",
-      "referenceNumber": 16,
-      "name": "GNAT exception",
-      "licenseExceptionId": "GNAT-exception",
-      "seeAlso": [
-        "https://github.com/AdaCore/florist/blob/master/libsrc/posix-configurable_file_limits.adb"
-      ]
-    },
-    {
-      "reference": "./gnu-javamail-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./gnu-javamail-exception.html",
-      "referenceNumber": 26,
-      "name": "GNU JavaMail exception",
-      "licenseExceptionId": "gnu-javamail-exception",
-      "seeAlso": [
-        "http://www.gnu.org/software/classpathx/javamail/javamail.html"
-      ]
-    },
-    {
-      "reference": "./GPL-3.0-linking-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./GPL-3.0-linking-exception.html",
-      "referenceNumber": 6,
-      "name": "GPL-3.0 Linking Exception",
-      "licenseExceptionId": "GPL-3.0-linking-exception",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs"
-      ]
-    },
-    {
-      "reference": "./GPL-3.0-linking-source-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./GPL-3.0-linking-source-exception.html",
-      "referenceNumber": 32,
-      "name": "GPL-3.0 Linking Exception (with Corresponding Source)",
-      "licenseExceptionId": "GPL-3.0-linking-source-exception",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs",
-        "https://github.com/mirror/wget/blob/master/src/http.c#L20"
-      ]
-    },
-    {
-      "reference": "./GPL-CC-1.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./GPL-CC-1.0.html",
-      "referenceNumber": 41,
-      "name": "GPL Cooperation Commitment 1.0",
-      "licenseExceptionId": "GPL-CC-1.0",
-      "seeAlso": [
-        "https://github.com/gplcc/gplcc/blob/master/Project/COMMITMENT",
-        "https://gplcc.github.io/gplcc/Project/README-PROJECT.html"
-      ]
-    },
-    {
-      "reference": "./GStreamer-exception-2005.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./GStreamer-exception-2005.html",
-      "referenceNumber": 33,
-      "name": "GStreamer Exception (2005)",
-      "licenseExceptionId": "GStreamer-exception-2005",
-      "seeAlso": [
-        "https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/licensing.html?gi-language\u003dc#licensing-of-applications-using-gstreamer"
-      ]
-    },
-    {
-      "reference": "./GStreamer-exception-2008.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./GStreamer-exception-2008.html",
-      "referenceNumber": 27,
-      "name": "GStreamer Exception (2008)",
-      "licenseExceptionId": "GStreamer-exception-2008",
-      "seeAlso": [
-        "https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/licensing.html?gi-language\u003dc#licensing-of-applications-using-gstreamer"
-      ]
-    },
-    {
-      "reference": "./i2p-gpl-java-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./i2p-gpl-java-exception.html",
-      "referenceNumber": 2,
-      "name": "i2p GPL+Java Exception",
-      "licenseExceptionId": "i2p-gpl-java-exception",
-      "seeAlso": [
-        "http://geti2p.net/en/get-involved/develop/licenses#java_exception"
-      ]
-    },
-    {
-      "reference": "./KiCad-libraries-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./KiCad-libraries-exception.html",
-      "referenceNumber": 47,
-      "name": "KiCad Libraries Exception",
-      "licenseExceptionId": "KiCad-libraries-exception",
-      "seeAlso": [
-        "https://www.kicad.org/libraries/license/"
-      ]
-    },
-    {
-      "reference": "./LGPL-3.0-linking-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./LGPL-3.0-linking-exception.html",
-      "referenceNumber": 7,
-      "name": "LGPL-3.0 Linking Exception",
-      "licenseExceptionId": "LGPL-3.0-linking-exception",
-      "seeAlso": [
-        "https://raw.githubusercontent.com/go-xmlpath/xmlpath/v2/LICENSE",
-        "https://github.com/goamz/goamz/blob/master/LICENSE",
-        "https://github.com/juju/errors/blob/master/LICENSE"
-      ]
-    },
-    {
-      "reference": "./Libtool-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Libtool-exception.html",
-      "referenceNumber": 38,
-      "name": "Libtool Exception",
-      "licenseExceptionId": "Libtool-exception",
-      "seeAlso": [
-        "http://git.savannah.gnu.org/cgit/libtool.git/tree/m4/libtool.m4"
-      ]
-    },
-    {
-      "reference": "./Linux-syscall-note.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Linux-syscall-note.html",
-      "referenceNumber": 15,
-      "name": "Linux Syscall Note",
-      "licenseExceptionId": "Linux-syscall-note",
-      "seeAlso": [
-        "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/COPYING"
-      ]
-    },
-    {
-      "reference": "./LLVM-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./LLVM-exception.html",
-      "referenceNumber": 17,
-      "name": "LLVM Exception",
-      "licenseExceptionId": "LLVM-exception",
-      "seeAlso": [
-        "http://llvm.org/foundation/relicensing/LICENSE.txt"
-      ]
-    },
-    {
-      "reference": "./LZMA-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./LZMA-exception.html",
-      "referenceNumber": 10,
-      "name": "LZMA exception",
-      "licenseExceptionId": "LZMA-exception",
-      "seeAlso": [
-        "http://nsis.sourceforge.net/Docs/AppendixI.html#I.6"
-      ]
-    },
-    {
-      "reference": "./mif-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./mif-exception.html",
-      "referenceNumber": 49,
-      "name": "Macros and Inline Functions Exception",
-      "licenseExceptionId": "mif-exception",
-      "seeAlso": [
-        "http://www.scs.stanford.edu/histar/src/lib/cppsup/exception",
-        "http://dev.bertos.org/doxygen/",
-        "https://www.threadingbuildingblocks.org/licensing"
-      ]
-    },
-    {
-      "reference": "./Nokia-Qt-exception-1.1.json",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "./Nokia-Qt-exception-1.1.html",
-      "referenceNumber": 23,
-      "name": "Nokia Qt LGPL exception 1.1",
-      "licenseExceptionId": "Nokia-Qt-exception-1.1",
-      "seeAlso": [
-        "https://www.keepassx.org/dev/projects/keepassx/repository/revisions/b8dfb9cc4d5133e0f09cd7533d15a4f1c19a40f2/entry/LICENSE.NOKIA-LGPL-EXCEPTION"
-      ]
-    },
-    {
-      "reference": "./OCaml-LGPL-linking-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./OCaml-LGPL-linking-exception.html",
-      "referenceNumber": 28,
-      "name": "OCaml LGPL Linking Exception",
-      "licenseExceptionId": "OCaml-LGPL-linking-exception",
-      "seeAlso": [
-        "https://caml.inria.fr/ocaml/license.en.html"
-      ]
-    },
-    {
-      "reference": "./OCCT-exception-1.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./OCCT-exception-1.0.html",
-      "referenceNumber": 43,
-      "name": "Open CASCADE Exception 1.0",
-      "licenseExceptionId": "OCCT-exception-1.0",
-      "seeAlso": [
-        "http://www.opencascade.com/content/licensing"
-      ]
-    },
-    {
-      "reference": "./OpenJDK-assembly-exception-1.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./OpenJDK-assembly-exception-1.0.html",
-      "referenceNumber": 44,
-      "name": "OpenJDK Assembly exception 1.0",
-      "licenseExceptionId": "OpenJDK-assembly-exception-1.0",
-      "seeAlso": [
-        "http://openjdk.java.net/legal/assembly-exception.html"
-      ]
-    },
-    {
-      "reference": "./openvpn-openssl-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./openvpn-openssl-exception.html",
-      "referenceNumber": 13,
-      "name": "OpenVPN OpenSSL Exception",
-      "licenseExceptionId": "openvpn-openssl-exception",
-      "seeAlso": [
-        "http://openvpn.net/index.php/license.html"
-      ]
-    },
-    {
-      "reference": "./PS-or-PDF-font-exception-20170817.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./PS-or-PDF-font-exception-20170817.html",
-      "referenceNumber": 18,
-      "name": "PS/PDF font exception (2017-08-17)",
-      "licenseExceptionId": "PS-or-PDF-font-exception-20170817",
-      "seeAlso": [
-        "https://github.com/ArtifexSoftware/urw-base35-fonts/blob/65962e27febc3883a17e651cdb23e783668c996f/LICENSE"
-      ]
-    },
-    {
-      "reference": "./QPL-1.0-INRIA-2004-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./QPL-1.0-INRIA-2004-exception.html",
-      "referenceNumber": 12,
-      "name": "INRIA QPL 1.0 2004 variant exception",
-      "licenseExceptionId": "QPL-1.0-INRIA-2004-exception",
-      "seeAlso": [
-        "https://git.frama-c.com/pub/frama-c/-/blob/master/licenses/Q_MODIFIED_LICENSE",
-        "https://github.com/maranget/hevea/blob/master/LICENSE"
-      ]
-    },
-    {
-      "reference": "./Qt-GPL-exception-1.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Qt-GPL-exception-1.0.html",
-      "referenceNumber": 46,
-      "name": "Qt GPL exception 1.0",
-      "licenseExceptionId": "Qt-GPL-exception-1.0",
-      "seeAlso": [
-        "http://code.qt.io/cgit/qt/qtbase.git/tree/LICENSE.GPL3-EXCEPT"
-      ]
-    },
-    {
-      "reference": "./Qt-LGPL-exception-1.1.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Qt-LGPL-exception-1.1.html",
-      "referenceNumber": 45,
-      "name": "Qt LGPL exception 1.1",
-      "licenseExceptionId": "Qt-LGPL-exception-1.1",
-      "seeAlso": [
-        "http://code.qt.io/cgit/qt/qtbase.git/tree/LGPL_EXCEPTION.txt"
-      ]
-    },
-    {
-      "reference": "./Qwt-exception-1.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Qwt-exception-1.0.html",
-      "referenceNumber": 30,
-      "name": "Qwt exception 1.0",
-      "licenseExceptionId": "Qwt-exception-1.0",
-      "seeAlso": [
-        "http://qwt.sourceforge.net/qwtlicense.html"
-      ]
-    },
-    {
-      "reference": "./SHL-2.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./SHL-2.0.html",
-      "referenceNumber": 19,
-      "name": "Solderpad Hardware License v2.0",
-      "licenseExceptionId": "SHL-2.0",
-      "seeAlso": [
-        "https://solderpad.org/licenses/SHL-2.0/"
-      ]
-    },
-    {
-      "reference": "./SHL-2.1.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./SHL-2.1.html",
-      "referenceNumber": 21,
-      "name": "Solderpad Hardware License v2.1",
-      "licenseExceptionId": "SHL-2.1",
-      "seeAlso": [
-        "https://solderpad.org/licenses/SHL-2.1/"
-      ]
-    },
-    {
-      "reference": "./SWI-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./SWI-exception.html",
-      "referenceNumber": 4,
-      "name": "SWI exception",
-      "licenseExceptionId": "SWI-exception",
-      "seeAlso": [
-        "https://github.com/SWI-Prolog/packages-clpqr/blob/bfa80b9270274f0800120d5b8e6fef42ac2dc6a5/clpqr/class.pl"
-      ]
-    },
-    {
-      "reference": "./Swift-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Swift-exception.html",
-      "referenceNumber": 3,
-      "name": "Swift Exception",
-      "licenseExceptionId": "Swift-exception",
-      "seeAlso": [
-        "https://swift.org/LICENSE.txt",
-        "https://github.com/apple/swift-package-manager/blob/7ab2275f447a5eb37497ed63a9340f8a6d1e488b/LICENSE.txt#L205"
-      ]
-    },
-    {
-      "reference": "./u-boot-exception-2.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./u-boot-exception-2.0.html",
-      "referenceNumber": 14,
-      "name": "U-Boot exception 2.0",
-      "licenseExceptionId": "u-boot-exception-2.0",
-      "seeAlso": [
-        "http://git.denx.de/?p\u003du-boot.git;a\u003dblob;f\u003dLicenses/Exceptions"
-      ]
-    },
-    {
-      "reference": "./Universal-FOSS-exception-1.0.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./Universal-FOSS-exception-1.0.html",
-      "referenceNumber": 40,
-      "name": "Universal FOSS Exception, Version 1.0",
-      "licenseExceptionId": "Universal-FOSS-exception-1.0",
-      "seeAlso": [
-        "https://oss.oracle.com/licenses/universal-foss-exception/"
-      ]
-    },
-    {
-      "reference": "./WxWindows-exception-3.1.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./WxWindows-exception-3.1.html",
-      "referenceNumber": 1,
-      "name": "WxWindows Library Exception 3.1",
-      "licenseExceptionId": "WxWindows-exception-3.1",
-      "seeAlso": [
-        "http://www.opensource.org/licenses/WXwindows"
-      ]
-    },
-    {
-      "reference": "./x11vnc-openssl-exception.json",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "./x11vnc-openssl-exception.html",
-      "referenceNumber": 48,
-      "name": "x11vnc OpenSSL Exception",
-      "licenseExceptionId": "x11vnc-openssl-exception",
-      "seeAlso": [
-        "https://github.com/LibVNC/x11vnc/blob/master/src/8to24.c#L22"
-      ]
-    }
-  ],
-  "releaseDate": "2023-02-17"
-}
\ No newline at end of file
diff --git a/license-list-data/licenses-3.20.json b/license-list-data/licenses-3.20.json
deleted file mode 100644
index f0f96fd7b92..00000000000
--- a/license-list-data/licenses-3.20.json
+++ /dev/null
@@ -1,6744 +0,0 @@
-{
-  "licenseListVersion": "3.20",
-  "licenses": [
-    {
-      "reference": "https://spdx.org/licenses/0BSD.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/0BSD.json",
-      "referenceNumber": 372,
-      "name": "BSD Zero Clause License",
-      "licenseId": "0BSD",
-      "seeAlso": [
-        "http://landley.net/toybox/license.html",
-        "https://opensource.org/licenses/0BSD"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/AAL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AAL.json",
-      "referenceNumber": 275,
-      "name": "Attribution Assurance License",
-      "licenseId": "AAL",
-      "seeAlso": [
-        "https://opensource.org/licenses/attribution"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Abstyles.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Abstyles.json",
-      "referenceNumber": 347,
-      "name": "Abstyles License",
-      "licenseId": "Abstyles",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Abstyles"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/AdaCore-doc.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AdaCore-doc.json",
-      "referenceNumber": 496,
-      "name": "AdaCore Doc License",
-      "licenseId": "AdaCore-doc",
-      "seeAlso": [
-        "https://github.com/AdaCore/xmlada/blob/master/docs/index.rst",
-        "https://github.com/AdaCore/gnatcoll-core/blob/master/docs/index.rst",
-        "https://github.com/AdaCore/gnatcoll-db/blob/master/docs/index.rst"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Adobe-2006.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Adobe-2006.json",
-      "referenceNumber": 104,
-      "name": "Adobe Systems Incorporated Source Code License Agreement",
-      "licenseId": "Adobe-2006",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/AdobeLicense"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Adobe-Glyph.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Adobe-Glyph.json",
-      "referenceNumber": 432,
-      "name": "Adobe Glyph List License",
-      "licenseId": "Adobe-Glyph",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/MIT#AdobeGlyph"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/ADSL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ADSL.json",
-      "referenceNumber": 200,
-      "name": "Amazon Digital Services License",
-      "licenseId": "ADSL",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/AmazonDigitalServicesLicense"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/AFL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AFL-1.1.json",
-      "referenceNumber": 71,
-      "name": "Academic Free License v1.1",
-      "licenseId": "AFL-1.1",
-      "seeAlso": [
-        "http://opensource.linux-mirror.org/licenses/afl-1.1.txt",
-        "http://wayback.archive.org/web/20021004124254/http://www.opensource.org/licenses/academic.php"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/AFL-1.2.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AFL-1.2.json",
-      "referenceNumber": 70,
-      "name": "Academic Free License v1.2",
-      "licenseId": "AFL-1.2",
-      "seeAlso": [
-        "http://opensource.linux-mirror.org/licenses/afl-1.2.txt",
-        "http://wayback.archive.org/web/20021204204652/http://www.opensource.org/licenses/academic.php"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/AFL-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AFL-2.0.json",
-      "referenceNumber": 237,
-      "name": "Academic Free License v2.0",
-      "licenseId": "AFL-2.0",
-      "seeAlso": [
-        "http://wayback.archive.org/web/20060924134533/http://www.opensource.org/licenses/afl-2.0.txt"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/AFL-2.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AFL-2.1.json",
-      "referenceNumber": 197,
-      "name": "Academic Free License v2.1",
-      "licenseId": "AFL-2.1",
-      "seeAlso": [
-        "http://opensource.linux-mirror.org/licenses/afl-2.1.txt"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/AFL-3.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AFL-3.0.json",
-      "referenceNumber": 47,
-      "name": "Academic Free License v3.0",
-      "licenseId": "AFL-3.0",
-      "seeAlso": [
-        "http://www.rosenlaw.com/AFL3.0.htm",
-        "https://opensource.org/licenses/afl-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Afmparse.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Afmparse.json",
-      "referenceNumber": 99,
-      "name": "Afmparse License",
-      "licenseId": "Afmparse",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Afmparse"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/AGPL-1.0.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/AGPL-1.0.json",
-      "referenceNumber": 63,
-      "name": "Affero General Public License v1.0",
-      "licenseId": "AGPL-1.0",
-      "seeAlso": [
-        "http://www.affero.org/oagpl.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/AGPL-1.0-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AGPL-1.0-only.json",
-      "referenceNumber": 185,
-      "name": "Affero General Public License v1.0 only",
-      "licenseId": "AGPL-1.0-only",
-      "seeAlso": [
-        "http://www.affero.org/oagpl.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/AGPL-1.0-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AGPL-1.0-or-later.json",
-      "referenceNumber": 370,
-      "name": "Affero General Public License v1.0 or later",
-      "licenseId": "AGPL-1.0-or-later",
-      "seeAlso": [
-        "http://www.affero.org/oagpl.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/AGPL-3.0.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/AGPL-3.0.json",
-      "referenceNumber": 54,
-      "name": "GNU Affero General Public License v3.0",
-      "licenseId": "AGPL-3.0",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/agpl.txt",
-        "https://opensource.org/licenses/AGPL-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/AGPL-3.0-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AGPL-3.0-only.json",
-      "referenceNumber": 504,
-      "name": "GNU Affero General Public License v3.0 only",
-      "licenseId": "AGPL-3.0-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/agpl.txt",
-        "https://opensource.org/licenses/AGPL-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/AGPL-3.0-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AGPL-3.0-or-later.json",
-      "referenceNumber": 295,
-      "name": "GNU Affero General Public License v3.0 or later",
-      "licenseId": "AGPL-3.0-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/agpl.txt",
-        "https://opensource.org/licenses/AGPL-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Aladdin.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Aladdin.json",
-      "referenceNumber": 473,
-      "name": "Aladdin Free Public License",
-      "licenseId": "Aladdin",
-      "seeAlso": [
-        "http://pages.cs.wisc.edu/~ghost/doc/AFPL/6.01/Public.htm"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/AMDPLPA.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AMDPLPA.json",
-      "referenceNumber": 435,
-      "name": "AMD\u0027s plpa_map.c License",
-      "licenseId": "AMDPLPA",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/AMD_plpa_map_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/AML.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AML.json",
-      "referenceNumber": 460,
-      "name": "Apple MIT License",
-      "licenseId": "AML",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Apple_MIT_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/AMPAS.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/AMPAS.json",
-      "referenceNumber": 234,
-      "name": "Academy of Motion Picture Arts and Sciences BSD",
-      "licenseId": "AMPAS",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/BSD#AMPASBSD"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/ANTLR-PD.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ANTLR-PD.json",
-      "referenceNumber": 182,
-      "name": "ANTLR Software Rights Notice",
-      "licenseId": "ANTLR-PD",
-      "seeAlso": [
-        "http://www.antlr2.org/license.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/ANTLR-PD-fallback.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ANTLR-PD-fallback.json",
-      "referenceNumber": 364,
-      "name": "ANTLR Software Rights Notice with license fallback",
-      "licenseId": "ANTLR-PD-fallback",
-      "seeAlso": [
-        "http://www.antlr2.org/license.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Apache-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Apache-1.0.json",
-      "referenceNumber": 525,
-      "name": "Apache License 1.0",
-      "licenseId": "Apache-1.0",
-      "seeAlso": [
-        "http://www.apache.org/licenses/LICENSE-1.0"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Apache-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Apache-1.1.json",
-      "referenceNumber": 332,
-      "name": "Apache License 1.1",
-      "licenseId": "Apache-1.1",
-      "seeAlso": [
-        "http://apache.org/licenses/LICENSE-1.1",
-        "https://opensource.org/licenses/Apache-1.1"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Apache-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Apache-2.0.json",
-      "referenceNumber": 72,
-      "name": "Apache License 2.0",
-      "licenseId": "Apache-2.0",
-      "seeAlso": [
-        "https://www.apache.org/licenses/LICENSE-2.0",
-        "https://opensource.org/licenses/Apache-2.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/APAFML.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/APAFML.json",
-      "referenceNumber": 122,
-      "name": "Adobe Postscript AFM License",
-      "licenseId": "APAFML",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/AdobePostscriptAFM"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/APL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/APL-1.0.json",
-      "referenceNumber": 270,
-      "name": "Adaptive Public License 1.0",
-      "licenseId": "APL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/APL-1.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/App-s2p.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/App-s2p.json",
-      "referenceNumber": 108,
-      "name": "App::s2p License",
-      "licenseId": "App-s2p",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/App-s2p"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/APSL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/APSL-1.0.json",
-      "referenceNumber": 439,
-      "name": "Apple Public Source License 1.0",
-      "licenseId": "APSL-1.0",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Apple_Public_Source_License_1.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/APSL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/APSL-1.1.json",
-      "referenceNumber": 292,
-      "name": "Apple Public Source License 1.1",
-      "licenseId": "APSL-1.1",
-      "seeAlso": [
-        "http://www.opensource.apple.com/source/IOSerialFamily/IOSerialFamily-7/APPLE_LICENSE"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/APSL-1.2.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/APSL-1.2.json",
-      "referenceNumber": 209,
-      "name": "Apple Public Source License 1.2",
-      "licenseId": "APSL-1.2",
-      "seeAlso": [
-        "http://www.samurajdata.se/opensource/mirror/licenses/apsl.php"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/APSL-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/APSL-2.0.json",
-      "referenceNumber": 251,
-      "name": "Apple Public Source License 2.0",
-      "licenseId": "APSL-2.0",
-      "seeAlso": [
-        "http://www.opensource.apple.com/license/apsl/"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Arphic-1999.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Arphic-1999.json",
-      "referenceNumber": 290,
-      "name": "Arphic Public License",
-      "licenseId": "Arphic-1999",
-      "seeAlso": [
-        "http://ftp.gnu.org/gnu/non-gnu/chinese-fonts-truetype/LICENSE"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Artistic-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Artistic-1.0.json",
-      "referenceNumber": 422,
-      "name": "Artistic License 1.0",
-      "licenseId": "Artistic-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/Artistic-1.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Artistic-1.0-cl8.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Artistic-1.0-cl8.json",
-      "referenceNumber": 267,
-      "name": "Artistic License 1.0 w/clause 8",
-      "licenseId": "Artistic-1.0-cl8",
-      "seeAlso": [
-        "https://opensource.org/licenses/Artistic-1.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Artistic-1.0-Perl.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Artistic-1.0-Perl.json",
-      "referenceNumber": 530,
-      "name": "Artistic License 1.0 (Perl)",
-      "licenseId": "Artistic-1.0-Perl",
-      "seeAlso": [
-        "http://dev.perl.org/licenses/artistic.html"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Artistic-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Artistic-2.0.json",
-      "referenceNumber": 468,
-      "name": "Artistic License 2.0",
-      "licenseId": "Artistic-2.0",
-      "seeAlso": [
-        "http://www.perlfoundation.org/artistic_license_2_0",
-        "https://www.perlfoundation.org/artistic-license-20.html",
-        "https://opensource.org/licenses/artistic-license-2.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Baekmuk.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Baekmuk.json",
-      "referenceNumber": 503,
-      "name": "Baekmuk License",
-      "licenseId": "Baekmuk",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing:Baekmuk?rd\u003dLicensing/Baekmuk"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Bahyph.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Bahyph.json",
-      "referenceNumber": 244,
-      "name": "Bahyph License",
-      "licenseId": "Bahyph",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Bahyph"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Barr.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Barr.json",
-      "referenceNumber": 217,
-      "name": "Barr License",
-      "licenseId": "Barr",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Barr"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Beerware.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Beerware.json",
-      "referenceNumber": 414,
-      "name": "Beerware License",
-      "licenseId": "Beerware",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Beerware",
-        "https://people.freebsd.org/~phk/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Bitstream-Charter.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Bitstream-Charter.json",
-      "referenceNumber": 148,
-      "name": "Bitstream Charter Font License",
-      "licenseId": "Bitstream-Charter",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Charter#License_Text",
-        "https://raw.githubusercontent.com/blackhole89/notekit/master/data/fonts/Charter%20license.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Bitstream-Vera.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Bitstream-Vera.json",
-      "referenceNumber": 354,
-      "name": "Bitstream Vera Font License",
-      "licenseId": "Bitstream-Vera",
-      "seeAlso": [
-        "https://web.archive.org/web/20080207013128/http://www.gnome.org/fonts/",
-        "https://docubrain.com/sites/default/files/licenses/bitstream-vera.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BitTorrent-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BitTorrent-1.0.json",
-      "referenceNumber": 219,
-      "name": "BitTorrent Open Source License v1.0",
-      "licenseId": "BitTorrent-1.0",
-      "seeAlso": [
-        "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/licenses/BitTorrent?r1\u003d1.1\u0026r2\u003d1.1.1.1\u0026diff_format\u003ds"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BitTorrent-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BitTorrent-1.1.json",
-      "referenceNumber": 176,
-      "name": "BitTorrent Open Source License v1.1",
-      "licenseId": "BitTorrent-1.1",
-      "seeAlso": [
-        "http://directory.fsf.org/wiki/License:BitTorrentOSL1.1"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/blessing.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/blessing.json",
-      "referenceNumber": 404,
-      "name": "SQLite Blessing",
-      "licenseId": "blessing",
-      "seeAlso": [
-        "https://www.sqlite.org/src/artifact/e33a4df7e32d742a?ln\u003d4-9",
-        "https://sqlite.org/src/artifact/df5091916dbb40e6"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BlueOak-1.0.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BlueOak-1.0.0.json",
-      "referenceNumber": 428,
-      "name": "Blue Oak Model License 1.0.0",
-      "licenseId": "BlueOak-1.0.0",
-      "seeAlso": [
-        "https://blueoakcouncil.org/license/1.0.0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Borceux.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Borceux.json",
-      "referenceNumber": 81,
-      "name": "Borceux license",
-      "licenseId": "Borceux",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Borceux"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Brian-Gladman-3-Clause.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Brian-Gladman-3-Clause.json",
-      "referenceNumber": 220,
-      "name": "Brian Gladman 3-Clause License",
-      "licenseId": "Brian-Gladman-3-Clause",
-      "seeAlso": [
-        "https://github.com/SWI-Prolog/packages-clib/blob/master/sha1/brg_endian.h"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-1-Clause.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-1-Clause.json",
-      "referenceNumber": 517,
-      "name": "BSD 1-Clause License",
-      "licenseId": "BSD-1-Clause",
-      "seeAlso": [
-        "https://svnweb.freebsd.org/base/head/include/ifaddrs.h?revision\u003d326823"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-2-Clause.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause.json",
-      "referenceNumber": 167,
-      "name": "BSD 2-Clause \"Simplified\" License",
-      "licenseId": "BSD-2-Clause",
-      "seeAlso": [
-        "https://opensource.org/licenses/BSD-2-Clause"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-2-Clause-FreeBSD.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-FreeBSD.json",
-      "referenceNumber": 489,
-      "name": "BSD 2-Clause FreeBSD License",
-      "licenseId": "BSD-2-Clause-FreeBSD",
-      "seeAlso": [
-        "http://www.freebsd.org/copyright/freebsd-license.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-2-Clause-NetBSD.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-NetBSD.json",
-      "referenceNumber": 114,
-      "name": "BSD 2-Clause NetBSD License",
-      "licenseId": "BSD-2-Clause-NetBSD",
-      "seeAlso": [
-        "http://www.netbsd.org/about/redistribution.html#default"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-2-Clause-Patent.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-Patent.json",
-      "referenceNumber": 352,
-      "name": "BSD-2-Clause Plus Patent License",
-      "licenseId": "BSD-2-Clause-Patent",
-      "seeAlso": [
-        "https://opensource.org/licenses/BSDplusPatent"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-2-Clause-Views.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-2-Clause-Views.json",
-      "referenceNumber": 531,
-      "name": "BSD 2-Clause with views sentence",
-      "licenseId": "BSD-2-Clause-Views",
-      "seeAlso": [
-        "http://www.freebsd.org/copyright/freebsd-license.html",
-        "https://people.freebsd.org/~ivoras/wine/patch-wine-nvidia.sh",
-        "https://github.com/protegeproject/protege/blob/master/license.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-3-Clause.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause.json",
-      "referenceNumber": 491,
-      "name": "BSD 3-Clause \"New\" or \"Revised\" License",
-      "licenseId": "BSD-3-Clause",
-      "seeAlso": [
-        "https://opensource.org/licenses/BSD-3-Clause",
-        "https://www.eclipse.org/org/documents/edl-v10.php"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-3-Clause-Attribution.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Attribution.json",
-      "referenceNumber": 318,
-      "name": "BSD with attribution",
-      "licenseId": "BSD-3-Clause-Attribution",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/BSD_with_Attribution"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-3-Clause-Clear.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Clear.json",
-      "referenceNumber": 522,
-      "name": "BSD 3-Clause Clear License",
-      "licenseId": "BSD-3-Clause-Clear",
-      "seeAlso": [
-        "http://labs.metacarta.com/license-explanation.html#license"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-3-Clause-LBNL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-LBNL.json",
-      "referenceNumber": 375,
-      "name": "Lawrence Berkeley National Labs BSD variant license",
-      "licenseId": "BSD-3-Clause-LBNL",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/LBNLBSD"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-3-Clause-Modification.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Modification.json",
-      "referenceNumber": 527,
-      "name": "BSD 3-Clause Modification",
-      "licenseId": "BSD-3-Clause-Modification",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing:BSD#Modification_Variant"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-3-Clause-No-Military-License.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-No-Military-License.json",
-      "referenceNumber": 227,
-      "name": "BSD 3-Clause No Military License",
-      "licenseId": "BSD-3-Clause-No-Military-License",
-      "seeAlso": [
-        "https://gitlab.syncad.com/hive/dhive/-/blob/master/LICENSE",
-        "https://github.com/greymass/swift-eosio/blob/master/LICENSE"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License.json",
-      "referenceNumber": 260,
-      "name": "BSD 3-Clause No Nuclear License",
-      "licenseId": "BSD-3-Clause-No-Nuclear-License",
-      "seeAlso": [
-        "http://download.oracle.com/otn-pub/java/licenses/bsd.txt?AuthParam\u003d1467140197_43d516ce1776bd08a58235a7785be1cc"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License-2014.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License-2014.json",
-      "referenceNumber": 94,
-      "name": "BSD 3-Clause No Nuclear License 2014",
-      "licenseId": "BSD-3-Clause-No-Nuclear-License-2014",
-      "seeAlso": [
-        "https://java.net/projects/javaeetutorial/pages/BerkeleyLicense"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-Warranty.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-Warranty.json",
-      "referenceNumber": 10,
-      "name": "BSD 3-Clause No Nuclear Warranty",
-      "licenseId": "BSD-3-Clause-No-Nuclear-Warranty",
-      "seeAlso": [
-        "https://jogamp.org/git/?p\u003dgluegen.git;a\u003dblob_plain;f\u003dLICENSE.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-3-Clause-Open-MPI.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-3-Clause-Open-MPI.json",
-      "referenceNumber": 345,
-      "name": "BSD 3-Clause Open MPI variant",
-      "licenseId": "BSD-3-Clause-Open-MPI",
-      "seeAlso": [
-        "https://www.open-mpi.org/community/license.php",
-        "http://www.netlib.org/lapack/LICENSE.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-4-Clause.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-4-Clause.json",
-      "referenceNumber": 453,
-      "name": "BSD 4-Clause \"Original\" or \"Old\" License",
-      "licenseId": "BSD-4-Clause",
-      "seeAlso": [
-        "http://directory.fsf.org/wiki/License:BSD_4Clause"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-4-Clause-Shortened.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-4-Clause-Shortened.json",
-      "referenceNumber": 477,
-      "name": "BSD 4 Clause Shortened",
-      "licenseId": "BSD-4-Clause-Shortened",
-      "seeAlso": [
-        "https://metadata.ftp-master.debian.org/changelogs//main/a/arpwatch/arpwatch_2.1a15-7_copyright"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-4-Clause-UC.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-4-Clause-UC.json",
-      "referenceNumber": 188,
-      "name": "BSD-4-Clause (University of California-Specific)",
-      "licenseId": "BSD-4-Clause-UC",
-      "seeAlso": [
-        "http://www.freebsd.org/copyright/license.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-4.3RENO.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-4.3RENO.json",
-      "referenceNumber": 131,
-      "name": "BSD 4.3 RENO License",
-      "licenseId": "BSD-4.3RENO",
-      "seeAlso": [
-        "https://sourceware.org/git/?p\u003dbinutils-gdb.git;a\u003dblob;f\u003dlibiberty/strcasecmp.c;h\u003d131d81c2ce7881fa48c363dc5bf5fb302c61ce0b;hb\u003dHEAD"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-4.3TAHOE.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-4.3TAHOE.json",
-      "referenceNumber": 41,
-      "name": "BSD 4.3 TAHOE License",
-      "licenseId": "BSD-4.3TAHOE",
-      "seeAlso": [
-        "https://github.com/389ds/389-ds-base/blob/main/ldap/include/sysexits-compat.h#L15"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-Advertising-Acknowledgement.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-Advertising-Acknowledgement.json",
-      "referenceNumber": 373,
-      "name": "BSD Advertising Acknowledgement License",
-      "licenseId": "BSD-Advertising-Acknowledgement",
-      "seeAlso": [
-        "https://github.com/python-excel/xlrd/blob/master/LICENSE#L33"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-Attribution-HPND-disclaimer.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-Attribution-HPND-disclaimer.json",
-      "referenceNumber": 83,
-      "name": "BSD with Attribution and HPND disclaimer",
-      "licenseId": "BSD-Attribution-HPND-disclaimer",
-      "seeAlso": [
-        "https://github.com/cyrusimap/cyrus-sasl/blob/master/COPYING"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-Protection.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-Protection.json",
-      "referenceNumber": 461,
-      "name": "BSD Protection License",
-      "licenseId": "BSD-Protection",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/BSD_Protection_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSD-Source-Code.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSD-Source-Code.json",
-      "referenceNumber": 90,
-      "name": "BSD Source Code Attribution",
-      "licenseId": "BSD-Source-Code",
-      "seeAlso": [
-        "https://github.com/robbiehanson/CocoaHTTPServer/blob/master/LICENSE.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/BSL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BSL-1.0.json",
-      "referenceNumber": 262,
-      "name": "Boost Software License 1.0",
-      "licenseId": "BSL-1.0",
-      "seeAlso": [
-        "http://www.boost.org/LICENSE_1_0.txt",
-        "https://opensource.org/licenses/BSL-1.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/BUSL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/BUSL-1.1.json",
-      "referenceNumber": 378,
-      "name": "Business Source License 1.1",
-      "licenseId": "BUSL-1.1",
-      "seeAlso": [
-        "https://mariadb.com/bsl11/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/bzip2-1.0.5.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/bzip2-1.0.5.json",
-      "referenceNumber": 76,
-      "name": "bzip2 and libbzip2 License v1.0.5",
-      "licenseId": "bzip2-1.0.5",
-      "seeAlso": [
-        "https://sourceware.org/bzip2/1.0.5/bzip2-manual-1.0.5.html",
-        "http://bzip.org/1.0.5/bzip2-manual-1.0.5.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/bzip2-1.0.6.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/bzip2-1.0.6.json",
-      "referenceNumber": 296,
-      "name": "bzip2 and libbzip2 License v1.0.6",
-      "licenseId": "bzip2-1.0.6",
-      "seeAlso": [
-        "https://sourceware.org/git/?p\u003dbzip2.git;a\u003dblob;f\u003dLICENSE;hb\u003dbzip2-1.0.6",
-        "http://bzip.org/1.0.5/bzip2-manual-1.0.5.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/C-UDA-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/C-UDA-1.0.json",
-      "referenceNumber": 310,
-      "name": "Computational Use of Data Agreement v1.0",
-      "licenseId": "C-UDA-1.0",
-      "seeAlso": [
-        "https://github.com/microsoft/Computational-Use-of-Data-Agreement/blob/master/C-UDA-1.0.md",
-        "https://cdla.dev/computational-use-of-data-agreement-v1-0/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CAL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CAL-1.0.json",
-      "referenceNumber": 56,
-      "name": "Cryptographic Autonomy License 1.0",
-      "licenseId": "CAL-1.0",
-      "seeAlso": [
-        "http://cryptographicautonomylicense.com/license-text.html",
-        "https://opensource.org/licenses/CAL-1.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CAL-1.0-Combined-Work-Exception.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CAL-1.0-Combined-Work-Exception.json",
-      "referenceNumber": 180,
-      "name": "Cryptographic Autonomy License 1.0 (Combined Work Exception)",
-      "licenseId": "CAL-1.0-Combined-Work-Exception",
-      "seeAlso": [
-        "http://cryptographicautonomylicense.com/license-text.html",
-        "https://opensource.org/licenses/CAL-1.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Caldera.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Caldera.json",
-      "referenceNumber": 168,
-      "name": "Caldera License",
-      "licenseId": "Caldera",
-      "seeAlso": [
-        "http://www.lemis.com/grog/UNIX/ancient-source-all.pdf"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CATOSL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CATOSL-1.1.json",
-      "referenceNumber": 413,
-      "name": "Computer Associates Trusted Open Source License 1.1",
-      "licenseId": "CATOSL-1.1",
-      "seeAlso": [
-        "https://opensource.org/licenses/CATOSL-1.1"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-1.0.json",
-      "referenceNumber": 359,
-      "name": "Creative Commons Attribution 1.0 Generic",
-      "licenseId": "CC-BY-1.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by/1.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-2.0.json",
-      "referenceNumber": 450,
-      "name": "Creative Commons Attribution 2.0 Generic",
-      "licenseId": "CC-BY-2.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by/2.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-2.5.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-2.5.json",
-      "referenceNumber": 331,
-      "name": "Creative Commons Attribution 2.5 Generic",
-      "licenseId": "CC-BY-2.5",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by/2.5/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-2.5-AU.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-2.5-AU.json",
-      "referenceNumber": 291,
-      "name": "Creative Commons Attribution 2.5 Australia",
-      "licenseId": "CC-BY-2.5-AU",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by/2.5/au/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-3.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0.json",
-      "referenceNumber": 341,
-      "name": "Creative Commons Attribution 3.0 Unported",
-      "licenseId": "CC-BY-3.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by/3.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-3.0-AT.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-AT.json",
-      "referenceNumber": 14,
-      "name": "Creative Commons Attribution 3.0 Austria",
-      "licenseId": "CC-BY-3.0-AT",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by/3.0/at/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-3.0-DE.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-DE.json",
-      "referenceNumber": 28,
-      "name": "Creative Commons Attribution 3.0 Germany",
-      "licenseId": "CC-BY-3.0-DE",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by/3.0/de/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-3.0-IGO.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-IGO.json",
-      "referenceNumber": 488,
-      "name": "Creative Commons Attribution 3.0 IGO",
-      "licenseId": "CC-BY-3.0-IGO",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by/3.0/igo/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-3.0-NL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-NL.json",
-      "referenceNumber": 514,
-      "name": "Creative Commons Attribution 3.0 Netherlands",
-      "licenseId": "CC-BY-3.0-NL",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by/3.0/nl/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-3.0-US.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-3.0-US.json",
-      "referenceNumber": 133,
-      "name": "Creative Commons Attribution 3.0 United States",
-      "licenseId": "CC-BY-3.0-US",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by/3.0/us/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-4.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-4.0.json",
-      "referenceNumber": 159,
-      "name": "Creative Commons Attribution 4.0 International",
-      "licenseId": "CC-BY-4.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by/4.0/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-1.0.json",
-      "referenceNumber": 48,
-      "name": "Creative Commons Attribution Non Commercial 1.0 Generic",
-      "licenseId": "CC-BY-NC-1.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc/1.0/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-2.0.json",
-      "referenceNumber": 311,
-      "name": "Creative Commons Attribution Non Commercial 2.0 Generic",
-      "licenseId": "CC-BY-NC-2.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc/2.0/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-2.5.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-2.5.json",
-      "referenceNumber": 456,
-      "name": "Creative Commons Attribution Non Commercial 2.5 Generic",
-      "licenseId": "CC-BY-NC-2.5",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc/2.5/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-3.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-3.0.json",
-      "referenceNumber": 510,
-      "name": "Creative Commons Attribution Non Commercial 3.0 Unported",
-      "licenseId": "CC-BY-NC-3.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc/3.0/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-3.0-DE.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-3.0-DE.json",
-      "referenceNumber": 300,
-      "name": "Creative Commons Attribution Non Commercial 3.0 Germany",
-      "licenseId": "CC-BY-NC-3.0-DE",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc/3.0/de/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-4.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-4.0.json",
-      "referenceNumber": 284,
-      "name": "Creative Commons Attribution Non Commercial 4.0 International",
-      "licenseId": "CC-BY-NC-4.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc/4.0/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-1.0.json",
-      "referenceNumber": 433,
-      "name": "Creative Commons Attribution Non Commercial No Derivatives 1.0 Generic",
-      "licenseId": "CC-BY-NC-ND-1.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nd-nc/1.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-2.0.json",
-      "referenceNumber": 374,
-      "name": "Creative Commons Attribution Non Commercial No Derivatives 2.0 Generic",
-      "licenseId": "CC-BY-NC-ND-2.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-nd/2.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-2.5.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-2.5.json",
-      "referenceNumber": 7,
-      "name": "Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic",
-      "licenseId": "CC-BY-NC-ND-2.5",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-nd/2.5/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-3.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-3.0.json",
-      "referenceNumber": 448,
-      "name": "Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported",
-      "licenseId": "CC-BY-NC-ND-3.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-3.0-DE.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-3.0-DE.json",
-      "referenceNumber": 121,
-      "name": "Creative Commons Attribution Non Commercial No Derivatives 3.0 Germany",
-      "licenseId": "CC-BY-NC-ND-3.0-DE",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-nd/3.0/de/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-3.0-IGO.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-3.0-IGO.json",
-      "referenceNumber": 484,
-      "name": "Creative Commons Attribution Non Commercial No Derivatives 3.0 IGO",
-      "licenseId": "CC-BY-NC-ND-3.0-IGO",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-nd/3.0/igo/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-ND-4.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-ND-4.0.json",
-      "referenceNumber": 518,
-      "name": "Creative Commons Attribution Non Commercial No Derivatives 4.0 International",
-      "licenseId": "CC-BY-NC-ND-4.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-1.0.json",
-      "referenceNumber": 319,
-      "name": "Creative Commons Attribution Non Commercial Share Alike 1.0 Generic",
-      "licenseId": "CC-BY-NC-SA-1.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-sa/1.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.0.json",
-      "referenceNumber": 440,
-      "name": "Creative Commons Attribution Non Commercial Share Alike 2.0 Generic",
-      "licenseId": "CC-BY-NC-SA-2.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-sa/2.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-DE.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-DE.json",
-      "referenceNumber": 170,
-      "name": "Creative Commons Attribution Non Commercial Share Alike 2.0 Germany",
-      "licenseId": "CC-BY-NC-SA-2.0-DE",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-sa/2.0/de/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-FR.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-FR.json",
-      "referenceNumber": 82,
-      "name": "Creative Commons Attribution-NonCommercial-ShareAlike 2.0 France",
-      "licenseId": "CC-BY-NC-SA-2.0-FR",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-sa/2.0/fr/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-UK.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.0-UK.json",
-      "referenceNumber": 492,
-      "name": "Creative Commons Attribution Non Commercial Share Alike 2.0 England and Wales",
-      "licenseId": "CC-BY-NC-SA-2.0-UK",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-sa/2.0/uk/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-2.5.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-2.5.json",
-      "referenceNumber": 342,
-      "name": "Creative Commons Attribution Non Commercial Share Alike 2.5 Generic",
-      "licenseId": "CC-BY-NC-SA-2.5",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-sa/2.5/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-3.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-3.0.json",
-      "referenceNumber": 326,
-      "name": "Creative Commons Attribution Non Commercial Share Alike 3.0 Unported",
-      "licenseId": "CC-BY-NC-SA-3.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-3.0-DE.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-3.0-DE.json",
-      "referenceNumber": 335,
-      "name": "Creative Commons Attribution Non Commercial Share Alike 3.0 Germany",
-      "licenseId": "CC-BY-NC-SA-3.0-DE",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-sa/3.0/de/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-3.0-IGO.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-3.0-IGO.json",
-      "referenceNumber": 268,
-      "name": "Creative Commons Attribution Non Commercial Share Alike 3.0 IGO",
-      "licenseId": "CC-BY-NC-SA-3.0-IGO",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-sa/3.0/igo/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-NC-SA-4.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-NC-SA-4.0.json",
-      "referenceNumber": 395,
-      "name": "Creative Commons Attribution Non Commercial Share Alike 4.0 International",
-      "licenseId": "CC-BY-NC-SA-4.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-ND-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-1.0.json",
-      "referenceNumber": 411,
-      "name": "Creative Commons Attribution No Derivatives 1.0 Generic",
-      "licenseId": "CC-BY-ND-1.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nd/1.0/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-ND-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-2.0.json",
-      "referenceNumber": 101,
-      "name": "Creative Commons Attribution No Derivatives 2.0 Generic",
-      "licenseId": "CC-BY-ND-2.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nd/2.0/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-ND-2.5.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-2.5.json",
-      "referenceNumber": 329,
-      "name": "Creative Commons Attribution No Derivatives 2.5 Generic",
-      "licenseId": "CC-BY-ND-2.5",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nd/2.5/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-ND-3.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-3.0.json",
-      "referenceNumber": 277,
-      "name": "Creative Commons Attribution No Derivatives 3.0 Unported",
-      "licenseId": "CC-BY-ND-3.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nd/3.0/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-ND-3.0-DE.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-3.0-DE.json",
-      "referenceNumber": 98,
-      "name": "Creative Commons Attribution No Derivatives 3.0 Germany",
-      "licenseId": "CC-BY-ND-3.0-DE",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nd/3.0/de/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-ND-4.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-ND-4.0.json",
-      "referenceNumber": 222,
-      "name": "Creative Commons Attribution No Derivatives 4.0 International",
-      "licenseId": "CC-BY-ND-4.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-nd/4.0/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-SA-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-1.0.json",
-      "referenceNumber": 407,
-      "name": "Creative Commons Attribution Share Alike 1.0 Generic",
-      "licenseId": "CC-BY-SA-1.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-sa/1.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-SA-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-2.0.json",
-      "referenceNumber": 280,
-      "name": "Creative Commons Attribution Share Alike 2.0 Generic",
-      "licenseId": "CC-BY-SA-2.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-sa/2.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-SA-2.0-UK.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-2.0-UK.json",
-      "referenceNumber": 57,
-      "name": "Creative Commons Attribution Share Alike 2.0 England and Wales",
-      "licenseId": "CC-BY-SA-2.0-UK",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-sa/2.0/uk/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-SA-2.1-JP.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-2.1-JP.json",
-      "referenceNumber": 130,
-      "name": "Creative Commons Attribution Share Alike 2.1 Japan",
-      "licenseId": "CC-BY-SA-2.1-JP",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-sa/2.1/jp/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-SA-2.5.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-2.5.json",
-      "referenceNumber": 241,
-      "name": "Creative Commons Attribution Share Alike 2.5 Generic",
-      "licenseId": "CC-BY-SA-2.5",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-sa/2.5/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-SA-3.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-3.0.json",
-      "referenceNumber": 208,
-      "name": "Creative Commons Attribution Share Alike 3.0 Unported",
-      "licenseId": "CC-BY-SA-3.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-sa/3.0/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-SA-3.0-AT.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-3.0-AT.json",
-      "referenceNumber": 210,
-      "name": "Creative Commons Attribution Share Alike 3.0 Austria",
-      "licenseId": "CC-BY-SA-3.0-AT",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-sa/3.0/at/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-SA-3.0-DE.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-3.0-DE.json",
-      "referenceNumber": 513,
-      "name": "Creative Commons Attribution Share Alike 3.0 Germany",
-      "licenseId": "CC-BY-SA-3.0-DE",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-sa/3.0/de/legalcode"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-BY-SA-4.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-BY-SA-4.0.json",
-      "referenceNumber": 154,
-      "name": "Creative Commons Attribution Share Alike 4.0 International",
-      "licenseId": "CC-BY-SA-4.0",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/by-sa/4.0/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC-PDDC.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC-PDDC.json",
-      "referenceNumber": 238,
-      "name": "Creative Commons Public Domain Dedication and Certification",
-      "licenseId": "CC-PDDC",
-      "seeAlso": [
-        "https://creativecommons.org/licenses/publicdomain/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CC0-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CC0-1.0.json",
-      "referenceNumber": 189,
-      "name": "Creative Commons Zero v1.0 Universal",
-      "licenseId": "CC0-1.0",
-      "seeAlso": [
-        "https://creativecommons.org/publicdomain/zero/1.0/legalcode"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CDDL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CDDL-1.0.json",
-      "referenceNumber": 437,
-      "name": "Common Development and Distribution License 1.0",
-      "licenseId": "CDDL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/cddl1"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CDDL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CDDL-1.1.json",
-      "referenceNumber": 39,
-      "name": "Common Development and Distribution License 1.1",
-      "licenseId": "CDDL-1.1",
-      "seeAlso": [
-        "http://glassfish.java.net/public/CDDL+GPL_1_1.html",
-        "https://javaee.github.io/glassfish/LICENSE"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CDL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CDL-1.0.json",
-      "referenceNumber": 171,
-      "name": "Common Documentation License 1.0",
-      "licenseId": "CDL-1.0",
-      "seeAlso": [
-        "http://www.opensource.apple.com/cdl/",
-        "https://fedoraproject.org/wiki/Licensing/Common_Documentation_License",
-        "https://www.gnu.org/licenses/license-list.html#ACDL"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CDLA-Permissive-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CDLA-Permissive-1.0.json",
-      "referenceNumber": 307,
-      "name": "Community Data License Agreement Permissive 1.0",
-      "licenseId": "CDLA-Permissive-1.0",
-      "seeAlso": [
-        "https://cdla.io/permissive-1-0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CDLA-Permissive-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CDLA-Permissive-2.0.json",
-      "referenceNumber": 25,
-      "name": "Community Data License Agreement Permissive 2.0",
-      "licenseId": "CDLA-Permissive-2.0",
-      "seeAlso": [
-        "https://cdla.dev/permissive-2-0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CDLA-Sharing-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CDLA-Sharing-1.0.json",
-      "referenceNumber": 506,
-      "name": "Community Data License Agreement Sharing 1.0",
-      "licenseId": "CDLA-Sharing-1.0",
-      "seeAlso": [
-        "https://cdla.io/sharing-1-0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CECILL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CECILL-1.0.json",
-      "referenceNumber": 459,
-      "name": "CeCILL Free Software License Agreement v1.0",
-      "licenseId": "CECILL-1.0",
-      "seeAlso": [
-        "http://www.cecill.info/licences/Licence_CeCILL_V1-fr.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CECILL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CECILL-1.1.json",
-      "referenceNumber": 179,
-      "name": "CeCILL Free Software License Agreement v1.1",
-      "licenseId": "CECILL-1.1",
-      "seeAlso": [
-        "http://www.cecill.info/licences/Licence_CeCILL_V1.1-US.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CECILL-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CECILL-2.0.json",
-      "referenceNumber": 87,
-      "name": "CeCILL Free Software License Agreement v2.0",
-      "licenseId": "CECILL-2.0",
-      "seeAlso": [
-        "http://www.cecill.info/licences/Licence_CeCILL_V2-en.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CECILL-2.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CECILL-2.1.json",
-      "referenceNumber": 511,
-      "name": "CeCILL Free Software License Agreement v2.1",
-      "licenseId": "CECILL-2.1",
-      "seeAlso": [
-        "http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.html"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CECILL-B.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CECILL-B.json",
-      "referenceNumber": 346,
-      "name": "CeCILL-B Free Software License Agreement",
-      "licenseId": "CECILL-B",
-      "seeAlso": [
-        "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CECILL-C.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CECILL-C.json",
-      "referenceNumber": 49,
-      "name": "CeCILL-C Free Software License Agreement",
-      "licenseId": "CECILL-C",
-      "seeAlso": [
-        "http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CERN-OHL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CERN-OHL-1.1.json",
-      "referenceNumber": 107,
-      "name": "CERN Open Hardware Licence v1.1",
-      "licenseId": "CERN-OHL-1.1",
-      "seeAlso": [
-        "https://www.ohwr.org/project/licenses/wikis/cern-ohl-v1.1"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CERN-OHL-1.2.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CERN-OHL-1.2.json",
-      "referenceNumber": 336,
-      "name": "CERN Open Hardware Licence v1.2",
-      "licenseId": "CERN-OHL-1.2",
-      "seeAlso": [
-        "https://www.ohwr.org/project/licenses/wikis/cern-ohl-v1.2"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CERN-OHL-P-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CERN-OHL-P-2.0.json",
-      "referenceNumber": 294,
-      "name": "CERN Open Hardware Licence Version 2 - Permissive",
-      "licenseId": "CERN-OHL-P-2.0",
-      "seeAlso": [
-        "https://www.ohwr.org/project/cernohl/wikis/Documents/CERN-OHL-version-2"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CERN-OHL-S-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CERN-OHL-S-2.0.json",
-      "referenceNumber": 128,
-      "name": "CERN Open Hardware Licence Version 2 - Strongly Reciprocal",
-      "licenseId": "CERN-OHL-S-2.0",
-      "seeAlso": [
-        "https://www.ohwr.org/project/cernohl/wikis/Documents/CERN-OHL-version-2"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CERN-OHL-W-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CERN-OHL-W-2.0.json",
-      "referenceNumber": 254,
-      "name": "CERN Open Hardware Licence Version 2 - Weakly Reciprocal",
-      "licenseId": "CERN-OHL-W-2.0",
-      "seeAlso": [
-        "https://www.ohwr.org/project/cernohl/wikis/Documents/CERN-OHL-version-2"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CFITSIO.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CFITSIO.json",
-      "referenceNumber": 415,
-      "name": "CFITSIO License",
-      "licenseId": "CFITSIO",
-      "seeAlso": [
-        "https://heasarc.gsfc.nasa.gov/docs/software/fitsio/c/f_user/node9.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/checkmk.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/checkmk.json",
-      "referenceNumber": 115,
-      "name": "Checkmk License",
-      "licenseId": "checkmk",
-      "seeAlso": [
-        "https://github.com/libcheck/check/blob/master/checkmk/checkmk.in"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/ClArtistic.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ClArtistic.json",
-      "referenceNumber": 231,
-      "name": "Clarified Artistic License",
-      "licenseId": "ClArtistic",
-      "seeAlso": [
-        "http://gianluca.dellavedova.org/2011/01/03/clarified-artistic-license/",
-        "http://www.ncftp.com/ncftp/doc/LICENSE.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Clips.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Clips.json",
-      "referenceNumber": 381,
-      "name": "Clips License",
-      "licenseId": "Clips",
-      "seeAlso": [
-        "https://github.com/DrItanium/maya/blob/master/LICENSE.CLIPS"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CMU-Mach.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CMU-Mach.json",
-      "referenceNumber": 132,
-      "name": "CMU Mach License",
-      "licenseId": "CMU-Mach",
-      "seeAlso": [
-        "https://www.cs.cmu.edu/~410/licenses.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CNRI-Jython.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CNRI-Jython.json",
-      "referenceNumber": 320,
-      "name": "CNRI Jython License",
-      "licenseId": "CNRI-Jython",
-      "seeAlso": [
-        "http://www.jython.org/license.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CNRI-Python.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CNRI-Python.json",
-      "referenceNumber": 399,
-      "name": "CNRI Python License",
-      "licenseId": "CNRI-Python",
-      "seeAlso": [
-        "https://opensource.org/licenses/CNRI-Python"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CNRI-Python-GPL-Compatible.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CNRI-Python-GPL-Compatible.json",
-      "referenceNumber": 358,
-      "name": "CNRI Python Open Source GPL Compatible License Agreement",
-      "licenseId": "CNRI-Python-GPL-Compatible",
-      "seeAlso": [
-        "http://www.python.org/download/releases/1.6.1/download_win/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/COIL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/COIL-1.0.json",
-      "referenceNumber": 365,
-      "name": "Copyfree Open Innovation License",
-      "licenseId": "COIL-1.0",
-      "seeAlso": [
-        "https://coil.apotheon.org/plaintext/01.0.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Community-Spec-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Community-Spec-1.0.json",
-      "referenceNumber": 263,
-      "name": "Community Specification License 1.0",
-      "licenseId": "Community-Spec-1.0",
-      "seeAlso": [
-        "https://github.com/CommunitySpecification/1.0/blob/master/1._Community_Specification_License-v1.md"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Condor-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Condor-1.1.json",
-      "referenceNumber": 261,
-      "name": "Condor Public License v1.1",
-      "licenseId": "Condor-1.1",
-      "seeAlso": [
-        "http://research.cs.wisc.edu/condor/license.html#condor",
-        "http://web.archive.org/web/20111123062036/http://research.cs.wisc.edu/condor/license.html#condor"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/copyleft-next-0.3.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/copyleft-next-0.3.0.json",
-      "referenceNumber": 405,
-      "name": "copyleft-next 0.3.0",
-      "licenseId": "copyleft-next-0.3.0",
-      "seeAlso": [
-        "https://github.com/copyleft-next/copyleft-next/blob/master/Releases/copyleft-next-0.3.0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/copyleft-next-0.3.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/copyleft-next-0.3.1.json",
-      "referenceNumber": 458,
-      "name": "copyleft-next 0.3.1",
-      "licenseId": "copyleft-next-0.3.1",
-      "seeAlso": [
-        "https://github.com/copyleft-next/copyleft-next/blob/master/Releases/copyleft-next-0.3.1"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Cornell-Lossless-JPEG.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Cornell-Lossless-JPEG.json",
-      "referenceNumber": 396,
-      "name": "Cornell Lossless JPEG License",
-      "licenseId": "Cornell-Lossless-JPEG",
-      "seeAlso": [
-        "https://android.googlesource.com/platform/external/dng_sdk/+/refs/heads/master/source/dng_lossless_jpeg.cpp#16",
-        "https://www.mssl.ucl.ac.uk/~mcrw/src/20050920/proto.h",
-        "https://gitlab.freedesktop.org/libopenraw/libopenraw/blob/master/lib/ljpegdecompressor.cpp#L32"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CPAL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CPAL-1.0.json",
-      "referenceNumber": 299,
-      "name": "Common Public Attribution License 1.0",
-      "licenseId": "CPAL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/CPAL-1.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CPL-1.0.json",
-      "referenceNumber": 166,
-      "name": "Common Public License 1.0",
-      "licenseId": "CPL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/CPL-1.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/CPOL-1.02.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CPOL-1.02.json",
-      "referenceNumber": 471,
-      "name": "Code Project Open License 1.02",
-      "licenseId": "CPOL-1.02",
-      "seeAlso": [
-        "http://www.codeproject.com/info/cpol10.aspx"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Crossword.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Crossword.json",
-      "referenceNumber": 138,
-      "name": "Crossword License",
-      "licenseId": "Crossword",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Crossword"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CrystalStacker.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CrystalStacker.json",
-      "referenceNumber": 193,
-      "name": "CrystalStacker License",
-      "licenseId": "CrystalStacker",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing:CrystalStacker?rd\u003dLicensing/CrystalStacker"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/CUA-OPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/CUA-OPL-1.0.json",
-      "referenceNumber": 13,
-      "name": "CUA Office Public License v1.0",
-      "licenseId": "CUA-OPL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/CUA-OPL-1.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Cube.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Cube.json",
-      "referenceNumber": 29,
-      "name": "Cube License",
-      "licenseId": "Cube",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Cube"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/curl.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/curl.json",
-      "referenceNumber": 163,
-      "name": "curl License",
-      "licenseId": "curl",
-      "seeAlso": [
-        "https://github.com/bagder/curl/blob/master/COPYING"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/D-FSL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/D-FSL-1.0.json",
-      "referenceNumber": 253,
-      "name": "Deutsche Freie Software Lizenz",
-      "licenseId": "D-FSL-1.0",
-      "seeAlso": [
-        "http://www.dipp.nrw.de/d-fsl/lizenzen/",
-        "http://www.dipp.nrw.de/d-fsl/index_html/lizenzen/de/D-FSL-1_0_de.txt",
-        "http://www.dipp.nrw.de/d-fsl/index_html/lizenzen/en/D-FSL-1_0_en.txt",
-        "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl",
-        "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl/deutsche-freie-software-lizenz",
-        "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl/german-free-software-license",
-        "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl/D-FSL-1_0_de.txt/at_download/file",
-        "https://www.hbz-nrw.de/produkte/open-access/lizenzen/dfsl/D-FSL-1_0_en.txt/at_download/file"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/diffmark.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/diffmark.json",
-      "referenceNumber": 37,
-      "name": "diffmark license",
-      "licenseId": "diffmark",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/diffmark"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/DL-DE-BY-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/DL-DE-BY-2.0.json",
-      "referenceNumber": 385,
-      "name": "Data licence Germany – attribution – version 2.0",
-      "licenseId": "DL-DE-BY-2.0",
-      "seeAlso": [
-        "https://www.govdata.de/dl-de/by-2-0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/DOC.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/DOC.json",
-      "referenceNumber": 421,
-      "name": "DOC License",
-      "licenseId": "DOC",
-      "seeAlso": [
-        "http://www.cs.wustl.edu/~schmidt/ACE-copying.html",
-        "https://www.dre.vanderbilt.edu/~schmidt/ACE-copying.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Dotseqn.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Dotseqn.json",
-      "referenceNumber": 59,
-      "name": "Dotseqn License",
-      "licenseId": "Dotseqn",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Dotseqn"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/DRL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/DRL-1.0.json",
-      "referenceNumber": 264,
-      "name": "Detection Rule License 1.0",
-      "licenseId": "DRL-1.0",
-      "seeAlso": [
-        "https://github.com/Neo23x0/sigma/blob/master/LICENSE.Detection.Rules.md"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/DSDP.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/DSDP.json",
-      "referenceNumber": 46,
-      "name": "DSDP License",
-      "licenseId": "DSDP",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/DSDP"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/dvipdfm.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/dvipdfm.json",
-      "referenceNumber": 136,
-      "name": "dvipdfm License",
-      "licenseId": "dvipdfm",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/dvipdfm"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/ECL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ECL-1.0.json",
-      "referenceNumber": 151,
-      "name": "Educational Community License v1.0",
-      "licenseId": "ECL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/ECL-1.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/ECL-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ECL-2.0.json",
-      "referenceNumber": 216,
-      "name": "Educational Community License v2.0",
-      "licenseId": "ECL-2.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/ECL-2.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/eCos-2.0.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/eCos-2.0.json",
-      "referenceNumber": 224,
-      "name": "eCos license version 2.0",
-      "licenseId": "eCos-2.0",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/ecos-license.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/EFL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/EFL-1.0.json",
-      "referenceNumber": 388,
-      "name": "Eiffel Forum License v1.0",
-      "licenseId": "EFL-1.0",
-      "seeAlso": [
-        "http://www.eiffel-nice.org/license/forum.txt",
-        "https://opensource.org/licenses/EFL-1.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/EFL-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/EFL-2.0.json",
-      "referenceNumber": 283,
-      "name": "Eiffel Forum License v2.0",
-      "licenseId": "EFL-2.0",
-      "seeAlso": [
-        "http://www.eiffel-nice.org/license/eiffel-forum-license-2.html",
-        "https://opensource.org/licenses/EFL-2.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/eGenix.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/eGenix.json",
-      "referenceNumber": 403,
-      "name": "eGenix.com Public License 1.1.0",
-      "licenseId": "eGenix",
-      "seeAlso": [
-        "http://www.egenix.com/products/eGenix.com-Public-License-1.1.0.pdf",
-        "https://fedoraproject.org/wiki/Licensing/eGenix.com_Public_License_1.1.0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Elastic-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Elastic-2.0.json",
-      "referenceNumber": 149,
-      "name": "Elastic License 2.0",
-      "licenseId": "Elastic-2.0",
-      "seeAlso": [
-        "https://www.elastic.co/licensing/elastic-license",
-        "https://github.com/elastic/elasticsearch/blob/master/licenses/ELASTIC-LICENSE-2.0.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Entessa.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Entessa.json",
-      "referenceNumber": 337,
-      "name": "Entessa Public License v1.0",
-      "licenseId": "Entessa",
-      "seeAlso": [
-        "https://opensource.org/licenses/Entessa"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/EPICS.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/EPICS.json",
-      "referenceNumber": 252,
-      "name": "EPICS Open License",
-      "licenseId": "EPICS",
-      "seeAlso": [
-        "https://epics.anl.gov/license/open.php"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/EPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/EPL-1.0.json",
-      "referenceNumber": 457,
-      "name": "Eclipse Public License 1.0",
-      "licenseId": "EPL-1.0",
-      "seeAlso": [
-        "http://www.eclipse.org/legal/epl-v10.html",
-        "https://opensource.org/licenses/EPL-1.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/EPL-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/EPL-2.0.json",
-      "referenceNumber": 105,
-      "name": "Eclipse Public License 2.0",
-      "licenseId": "EPL-2.0",
-      "seeAlso": [
-        "https://www.eclipse.org/legal/epl-2.0",
-        "https://www.opensource.org/licenses/EPL-2.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/ErlPL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ErlPL-1.1.json",
-      "referenceNumber": 126,
-      "name": "Erlang Public License v1.1",
-      "licenseId": "ErlPL-1.1",
-      "seeAlso": [
-        "http://www.erlang.org/EPLICENSE"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/etalab-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/etalab-2.0.json",
-      "referenceNumber": 157,
-      "name": "Etalab Open License 2.0",
-      "licenseId": "etalab-2.0",
-      "seeAlso": [
-        "https://github.com/DISIC/politique-de-contribution-open-source/blob/master/LICENSE.pdf",
-        "https://raw.githubusercontent.com/DISIC/politique-de-contribution-open-source/master/LICENSE"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/EUDatagrid.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/EUDatagrid.json",
-      "referenceNumber": 33,
-      "name": "EU DataGrid Software License",
-      "licenseId": "EUDatagrid",
-      "seeAlso": [
-        "http://eu-datagrid.web.cern.ch/eu-datagrid/license.html",
-        "https://opensource.org/licenses/EUDatagrid"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/EUPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/EUPL-1.0.json",
-      "referenceNumber": 494,
-      "name": "European Union Public License 1.0",
-      "licenseId": "EUPL-1.0",
-      "seeAlso": [
-        "http://ec.europa.eu/idabc/en/document/7330.html",
-        "http://ec.europa.eu/idabc/servlets/Doc027f.pdf?id\u003d31096"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/EUPL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/EUPL-1.1.json",
-      "referenceNumber": 526,
-      "name": "European Union Public License 1.1",
-      "licenseId": "EUPL-1.1",
-      "seeAlso": [
-        "https://joinup.ec.europa.eu/software/page/eupl/licence-eupl",
-        "https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/eupl1.1.-licence-en_0.pdf",
-        "https://opensource.org/licenses/EUPL-1.1"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/EUPL-1.2.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/EUPL-1.2.json",
-      "referenceNumber": 420,
-      "name": "European Union Public License 1.2",
-      "licenseId": "EUPL-1.2",
-      "seeAlso": [
-        "https://joinup.ec.europa.eu/page/eupl-text-11-12",
-        "https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/eupl_v1.2_en.pdf",
-        "https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt",
-        "https://joinup.ec.europa.eu/sites/default/files/inline-files/EUPL%20v1_2%20EN(1).txt",
-        "http://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri\u003dCELEX:32017D0863",
-        "https://opensource.org/licenses/EUPL-1.2"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Eurosym.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Eurosym.json",
-      "referenceNumber": 509,
-      "name": "Eurosym License",
-      "licenseId": "Eurosym",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Eurosym"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Fair.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Fair.json",
-      "referenceNumber": 306,
-      "name": "Fair License",
-      "licenseId": "Fair",
-      "seeAlso": [
-        "http://fairlicense.org/",
-        "https://opensource.org/licenses/Fair"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/FDK-AAC.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/FDK-AAC.json",
-      "referenceNumber": 95,
-      "name": "Fraunhofer FDK AAC Codec Library",
-      "licenseId": "FDK-AAC",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/FDK-AAC",
-        "https://directory.fsf.org/wiki/License:Fdk"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Frameworx-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Frameworx-1.0.json",
-      "referenceNumber": 317,
-      "name": "Frameworx Open License 1.0",
-      "licenseId": "Frameworx-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/Frameworx-1.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/FreeBSD-DOC.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/FreeBSD-DOC.json",
-      "referenceNumber": 516,
-      "name": "FreeBSD Documentation License",
-      "licenseId": "FreeBSD-DOC",
-      "seeAlso": [
-        "https://www.freebsd.org/copyright/freebsd-doc-license/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/FreeImage.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/FreeImage.json",
-      "referenceNumber": 196,
-      "name": "FreeImage Public License v1.0",
-      "licenseId": "FreeImage",
-      "seeAlso": [
-        "http://freeimage.sourceforge.net/freeimage-license.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/FSFAP.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/FSFAP.json",
-      "referenceNumber": 349,
-      "name": "FSF All Permissive License",
-      "licenseId": "FSFAP",
-      "seeAlso": [
-        "https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/FSFUL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/FSFUL.json",
-      "referenceNumber": 229,
-      "name": "FSF Unlimited License",
-      "licenseId": "FSFUL",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/FSF_Unlimited_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/FSFULLR.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/FSFULLR.json",
-      "referenceNumber": 68,
-      "name": "FSF Unlimited License (with License Retention)",
-      "licenseId": "FSFULLR",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/FSF_Unlimited_License#License_Retention_Variant"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/FSFULLRWD.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/FSFULLRWD.json",
-      "referenceNumber": 8,
-      "name": "FSF Unlimited License (With License Retention    and Warranty Disclaimer)",
-      "licenseId": "FSFULLRWD",
-      "seeAlso": [
-        "https://lists.gnu.org/archive/html/autoconf/2012-04/msg00061.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/FTL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/FTL.json",
-      "referenceNumber": 339,
-      "name": "Freetype Project License",
-      "licenseId": "FTL",
-      "seeAlso": [
-        "http://freetype.fis.uniroma2.it/FTL.TXT",
-        "http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT",
-        "http://gitlab.freedesktop.org/freetype/freetype/-/raw/master/docs/FTL.TXT"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GD.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GD.json",
-      "referenceNumber": 454,
-      "name": "GD License",
-      "licenseId": "GD",
-      "seeAlso": [
-        "https://libgd.github.io/manuals/2.3.0/files/license-txt.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.1.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1.json",
-      "referenceNumber": 91,
-      "name": "GNU Free Documentation License v1.1",
-      "licenseId": "GFDL-1.1",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.1-invariants-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-invariants-only.json",
-      "referenceNumber": 250,
-      "name": "GNU Free Documentation License v1.1 only - invariants",
-      "licenseId": "GFDL-1.1-invariants-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.1-invariants-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-invariants-or-later.json",
-      "referenceNumber": 174,
-      "name": "GNU Free Documentation License v1.1 or later - invariants",
-      "licenseId": "GFDL-1.1-invariants-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.1-no-invariants-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-no-invariants-only.json",
-      "referenceNumber": 482,
-      "name": "GNU Free Documentation License v1.1 only - no invariants",
-      "licenseId": "GFDL-1.1-no-invariants-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.1-no-invariants-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-no-invariants-or-later.json",
-      "referenceNumber": 293,
-      "name": "GNU Free Documentation License v1.1 or later - no invariants",
-      "licenseId": "GFDL-1.1-no-invariants-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.1-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-only.json",
-      "referenceNumber": 137,
-      "name": "GNU Free Documentation License v1.1 only",
-      "licenseId": "GFDL-1.1-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.1-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.1-or-later.json",
-      "referenceNumber": 369,
-      "name": "GNU Free Documentation License v1.1 or later",
-      "licenseId": "GFDL-1.1-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.2.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2.json",
-      "referenceNumber": 5,
-      "name": "GNU Free Documentation License v1.2",
-      "licenseId": "GFDL-1.2",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.2-invariants-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-invariants-only.json",
-      "referenceNumber": 314,
-      "name": "GNU Free Documentation License v1.2 only - invariants",
-      "licenseId": "GFDL-1.2-invariants-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.2-invariants-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-invariants-or-later.json",
-      "referenceNumber": 281,
-      "name": "GNU Free Documentation License v1.2 or later - invariants",
-      "licenseId": "GFDL-1.2-invariants-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.2-no-invariants-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-no-invariants-only.json",
-      "referenceNumber": 469,
-      "name": "GNU Free Documentation License v1.2 only - no invariants",
-      "licenseId": "GFDL-1.2-no-invariants-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.2-no-invariants-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-no-invariants-or-later.json",
-      "referenceNumber": 393,
-      "name": "GNU Free Documentation License v1.2 or later - no invariants",
-      "licenseId": "GFDL-1.2-no-invariants-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.2-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-only.json",
-      "referenceNumber": 124,
-      "name": "GNU Free Documentation License v1.2 only",
-      "licenseId": "GFDL-1.2-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.2-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.2-or-later.json",
-      "referenceNumber": 147,
-      "name": "GNU Free Documentation License v1.2 or later",
-      "licenseId": "GFDL-1.2-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.3.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3.json",
-      "referenceNumber": 15,
-      "name": "GNU Free Documentation License v1.3",
-      "licenseId": "GFDL-1.3",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/fdl-1.3.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.3-invariants-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-invariants-only.json",
-      "referenceNumber": 427,
-      "name": "GNU Free Documentation License v1.3 only - invariants",
-      "licenseId": "GFDL-1.3-invariants-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/fdl-1.3.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.3-invariants-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-invariants-or-later.json",
-      "referenceNumber": 287,
-      "name": "GNU Free Documentation License v1.3 or later - invariants",
-      "licenseId": "GFDL-1.3-invariants-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/fdl-1.3.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.3-no-invariants-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-no-invariants-only.json",
-      "referenceNumber": 425,
-      "name": "GNU Free Documentation License v1.3 only - no invariants",
-      "licenseId": "GFDL-1.3-no-invariants-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/fdl-1.3.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.3-no-invariants-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-no-invariants-or-later.json",
-      "referenceNumber": 64,
-      "name": "GNU Free Documentation License v1.3 or later - no invariants",
-      "licenseId": "GFDL-1.3-no-invariants-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/fdl-1.3.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.3-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-only.json",
-      "referenceNumber": 16,
-      "name": "GNU Free Documentation License v1.3 only",
-      "licenseId": "GFDL-1.3-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/fdl-1.3.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GFDL-1.3-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GFDL-1.3-or-later.json",
-      "referenceNumber": 444,
-      "name": "GNU Free Documentation License v1.3 or later",
-      "licenseId": "GFDL-1.3-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/fdl-1.3.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Giftware.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Giftware.json",
-      "referenceNumber": 135,
-      "name": "Giftware License",
-      "licenseId": "Giftware",
-      "seeAlso": [
-        "http://liballeg.org/license.html#allegro-4-the-giftware-license"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GL2PS.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GL2PS.json",
-      "referenceNumber": 325,
-      "name": "GL2PS License",
-      "licenseId": "GL2PS",
-      "seeAlso": [
-        "http://www.geuz.org/gl2ps/COPYING.GL2PS"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Glide.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Glide.json",
-      "referenceNumber": 434,
-      "name": "3dfx Glide License",
-      "licenseId": "Glide",
-      "seeAlso": [
-        "http://www.users.on.net/~triforce/glidexp/COPYING.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Glulxe.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Glulxe.json",
-      "referenceNumber": 246,
-      "name": "Glulxe License",
-      "licenseId": "Glulxe",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Glulxe"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GLWTPL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GLWTPL.json",
-      "referenceNumber": 74,
-      "name": "Good Luck With That Public License",
-      "licenseId": "GLWTPL",
-      "seeAlso": [
-        "https://github.com/me-shaon/GLWTPL/commit/da5f6bc734095efbacb442c0b31e33a65b9d6e85"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/gnuplot.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/gnuplot.json",
-      "referenceNumber": 36,
-      "name": "gnuplot License",
-      "licenseId": "gnuplot",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Gnuplot"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-1.0.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-1.0.json",
-      "referenceNumber": 483,
-      "name": "GNU General Public License v1.0 only",
-      "licenseId": "GPL-1.0",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-1.0+.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-1.0+.json",
-      "referenceNumber": 499,
-      "name": "GNU General Public License v1.0 or later",
-      "licenseId": "GPL-1.0+",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-1.0-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GPL-1.0-only.json",
-      "referenceNumber": 387,
-      "name": "GNU General Public License v1.0 only",
-      "licenseId": "GPL-1.0-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-1.0-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GPL-1.0-or-later.json",
-      "referenceNumber": 96,
-      "name": "GNU General Public License v1.0 or later",
-      "licenseId": "GPL-1.0-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-2.0.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-2.0.json",
-      "referenceNumber": 316,
-      "name": "GNU General Public License v2.0 only",
-      "licenseId": "GPL-2.0",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html",
-        "https://opensource.org/licenses/GPL-2.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-2.0+.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-2.0+.json",
-      "referenceNumber": 218,
-      "name": "GNU General Public License v2.0 or later",
-      "licenseId": "GPL-2.0+",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html",
-        "https://opensource.org/licenses/GPL-2.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-2.0-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-only.json",
-      "referenceNumber": 175,
-      "name": "GNU General Public License v2.0 only",
-      "licenseId": "GPL-2.0-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html",
-        "https://opensource.org/licenses/GPL-2.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-2.0-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-or-later.json",
-      "referenceNumber": 183,
-      "name": "GNU General Public License v2.0 or later",
-      "licenseId": "GPL-2.0-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html",
-        "https://opensource.org/licenses/GPL-2.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-2.0-with-autoconf-exception.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-autoconf-exception.json",
-      "referenceNumber": 327,
-      "name": "GNU General Public License v2.0 w/Autoconf exception",
-      "licenseId": "GPL-2.0-with-autoconf-exception",
-      "seeAlso": [
-        "http://ac-archive.sourceforge.net/doc/copyright.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-2.0-with-bison-exception.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-bison-exception.json",
-      "referenceNumber": 42,
-      "name": "GNU General Public License v2.0 w/Bison exception",
-      "licenseId": "GPL-2.0-with-bison-exception",
-      "seeAlso": [
-        "http://git.savannah.gnu.org/cgit/bison.git/tree/data/yacc.c?id\u003d193d7c7054ba7197b0789e14965b739162319b5e#n141"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-2.0-with-classpath-exception.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-classpath-exception.json",
-      "referenceNumber": 309,
-      "name": "GNU General Public License v2.0 w/Classpath exception",
-      "licenseId": "GPL-2.0-with-classpath-exception",
-      "seeAlso": [
-        "https://www.gnu.org/software/classpath/license.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-2.0-with-font-exception.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-font-exception.json",
-      "referenceNumber": 236,
-      "name": "GNU General Public License v2.0 w/Font exception",
-      "licenseId": "GPL-2.0-with-font-exception",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/gpl-faq.html#FontException"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-2.0-with-GCC-exception.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-2.0-with-GCC-exception.json",
-      "referenceNumber": 177,
-      "name": "GNU General Public License v2.0 w/GCC Runtime Library exception",
-      "licenseId": "GPL-2.0-with-GCC-exception",
-      "seeAlso": [
-        "https://gcc.gnu.org/git/?p\u003dgcc.git;a\u003dblob;f\u003dgcc/libgcc1.c;h\u003d762f5143fc6eed57b6797c82710f3538aa52b40b;hb\u003dcb143a3ce4fb417c68f5fa2691a1b1b1053dfba9#l10"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-3.0.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-3.0.json",
-      "referenceNumber": 479,
-      "name": "GNU General Public License v3.0 only",
-      "licenseId": "GPL-3.0",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/gpl-3.0-standalone.html",
-        "https://opensource.org/licenses/GPL-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-3.0+.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-3.0+.json",
-      "referenceNumber": 110,
-      "name": "GNU General Public License v3.0 or later",
-      "licenseId": "GPL-3.0+",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/gpl-3.0-standalone.html",
-        "https://opensource.org/licenses/GPL-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-3.0-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GPL-3.0-only.json",
-      "referenceNumber": 312,
-      "name": "GNU General Public License v3.0 only",
-      "licenseId": "GPL-3.0-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/gpl-3.0-standalone.html",
-        "https://opensource.org/licenses/GPL-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-3.0-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/GPL-3.0-or-later.json",
-      "referenceNumber": 338,
-      "name": "GNU General Public License v3.0 or later",
-      "licenseId": "GPL-3.0-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/gpl-3.0-standalone.html",
-        "https://opensource.org/licenses/GPL-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-3.0-with-autoconf-exception.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-3.0-with-autoconf-exception.json",
-      "referenceNumber": 442,
-      "name": "GNU General Public License v3.0 w/Autoconf exception",
-      "licenseId": "GPL-3.0-with-autoconf-exception",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/autoconf-exception-3.0.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/GPL-3.0-with-GCC-exception.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/GPL-3.0-with-GCC-exception.json",
-      "referenceNumber": 363,
-      "name": "GNU General Public License v3.0 w/GCC Runtime Library exception",
-      "licenseId": "GPL-3.0-with-GCC-exception",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/gcc-exception-3.1.html"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Graphics-Gems.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Graphics-Gems.json",
-      "referenceNumber": 26,
-      "name": "Graphics Gems License",
-      "licenseId": "Graphics-Gems",
-      "seeAlso": [
-        "https://github.com/erich666/GraphicsGems/blob/master/LICENSE.md"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/gSOAP-1.3b.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/gSOAP-1.3b.json",
-      "referenceNumber": 532,
-      "name": "gSOAP Public License v1.3b",
-      "licenseId": "gSOAP-1.3b",
-      "seeAlso": [
-        "http://www.cs.fsu.edu/~engelen/license.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/HaskellReport.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/HaskellReport.json",
-      "referenceNumber": 350,
-      "name": "Haskell Language Report License",
-      "licenseId": "HaskellReport",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Haskell_Language_Report_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Hippocratic-2.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Hippocratic-2.1.json",
-      "referenceNumber": 165,
-      "name": "Hippocratic License 2.1",
-      "licenseId": "Hippocratic-2.1",
-      "seeAlso": [
-        "https://firstdonoharm.dev/version/2/1/license.html",
-        "https://github.com/EthicalSource/hippocratic-license/blob/58c0e646d64ff6fbee275bfe2b9492f914e3ab2a/LICENSE.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/HP-1986.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/HP-1986.json",
-      "referenceNumber": 119,
-      "name": "Hewlett-Packard 1986 License",
-      "licenseId": "HP-1986",
-      "seeAlso": [
-        "https://sourceware.org/git/?p\u003dnewlib-cygwin.git;a\u003dblob;f\u003dnewlib/libc/machine/hppa/memchr.S;h\u003d1cca3e5e8867aa4bffef1f75a5c1bba25c0c441e;hb\u003dHEAD#l2"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/HPND.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/HPND.json",
-      "referenceNumber": 502,
-      "name": "Historical Permission Notice and Disclaimer",
-      "licenseId": "HPND",
-      "seeAlso": [
-        "https://opensource.org/licenses/HPND"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/HPND-export-US.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/HPND-export-US.json",
-      "referenceNumber": 382,
-      "name": "HPND with US Government export control warning",
-      "licenseId": "HPND-export-US",
-      "seeAlso": [
-        "https://www.kermitproject.org/ck90.html#source"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/HPND-Markus-Kuhn.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/HPND-Markus-Kuhn.json",
-      "referenceNumber": 67,
-      "name": "Historical Permission Notice and Disclaimer - Markus Kuhn variant",
-      "licenseId": "HPND-Markus-Kuhn",
-      "seeAlso": [
-        "https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c",
-        "https://sourceware.org/git/?p\u003dbinutils-gdb.git;a\u003dblob;f\u003dreadline/readline/support/wcwidth.c;h\u003d0f5ec995796f4813abbcf4972aec0378ab74722a;hb\u003dHEAD#l55"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/HPND-sell-variant.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/HPND-sell-variant.json",
-      "referenceNumber": 328,
-      "name": "Historical Permission Notice and Disclaimer - sell variant",
-      "licenseId": "HPND-sell-variant",
-      "seeAlso": [
-        "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/sunrpc/auth_gss/gss_generic_token.c?h\u003dv4.19"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/HPND-sell-variant-MIT-disclaimer.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/HPND-sell-variant-MIT-disclaimer.json",
-      "referenceNumber": 288,
-      "name": "HPND sell variant with MIT disclaimer",
-      "licenseId": "HPND-sell-variant-MIT-disclaimer",
-      "seeAlso": [
-        "https://github.com/sigmavirus24/x11-ssh-askpass/blob/master/README"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/HTMLTIDY.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/HTMLTIDY.json",
-      "referenceNumber": 386,
-      "name": "HTML Tidy License",
-      "licenseId": "HTMLTIDY",
-      "seeAlso": [
-        "https://github.com/htacg/tidy-html5/blob/next/README/LICENSE.md"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/IBM-pibs.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/IBM-pibs.json",
-      "referenceNumber": 255,
-      "name": "IBM PowerPC Initialization and Boot Software",
-      "licenseId": "IBM-pibs",
-      "seeAlso": [
-        "http://git.denx.de/?p\u003du-boot.git;a\u003dblob;f\u003darch/powerpc/cpu/ppc4xx/miiphy.c;h\u003d297155fdafa064b955e53e9832de93bfb0cfb85b;hb\u003d9fab4bf4cc077c21e43941866f3f2c196f28670d"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/ICU.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ICU.json",
-      "referenceNumber": 242,
-      "name": "ICU License",
-      "licenseId": "ICU",
-      "seeAlso": [
-        "http://source.icu-project.org/repos/icu/icu/trunk/license.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/IEC-Code-Components-EULA.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/IEC-Code-Components-EULA.json",
-      "referenceNumber": 205,
-      "name": "IEC    Code Components End-user licence agreement",
-      "licenseId": "IEC-Code-Components-EULA",
-      "seeAlso": [
-        "https://www.iec.ch/webstore/custserv/pdf/CC-EULA.pdf",
-        "https://www.iec.ch/CCv1",
-        "https://www.iec.ch/copyright"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/IJG.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/IJG.json",
-      "referenceNumber": 184,
-      "name": "Independent JPEG Group License",
-      "licenseId": "IJG",
-      "seeAlso": [
-        "http://dev.w3.org/cvsweb/Amaya/libjpeg/Attic/README?rev\u003d1.2"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/IJG-short.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/IJG-short.json",
-      "referenceNumber": 431,
-      "name": "Independent JPEG Group License - short",
-      "licenseId": "IJG-short",
-      "seeAlso": [
-        "https://sourceforge.net/p/xmedcon/code/ci/master/tree/libs/ljpg/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/ImageMagick.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ImageMagick.json",
-      "referenceNumber": 211,
-      "name": "ImageMagick License",
-      "licenseId": "ImageMagick",
-      "seeAlso": [
-        "http://www.imagemagick.org/script/license.php"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/iMatix.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/iMatix.json",
-      "referenceNumber": 258,
-      "name": "iMatix Standard Function Library Agreement",
-      "licenseId": "iMatix",
-      "seeAlso": [
-        "http://legacy.imatix.com/html/sfl/sfl4.htm#license"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Imlib2.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Imlib2.json",
-      "referenceNumber": 423,
-      "name": "Imlib2 License",
-      "licenseId": "Imlib2",
-      "seeAlso": [
-        "http://trac.enlightenment.org/e/browser/trunk/imlib2/COPYING",
-        "https://git.enlightenment.org/legacy/imlib2.git/tree/COPYING"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Info-ZIP.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Info-ZIP.json",
-      "referenceNumber": 225,
-      "name": "Info-ZIP License",
-      "licenseId": "Info-ZIP",
-      "seeAlso": [
-        "http://www.info-zip.org/license.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Intel.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Intel.json",
-      "referenceNumber": 271,
-      "name": "Intel Open Source License",
-      "licenseId": "Intel",
-      "seeAlso": [
-        "https://opensource.org/licenses/Intel"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Intel-ACPI.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Intel-ACPI.json",
-      "referenceNumber": 144,
-      "name": "Intel ACPI Software License Agreement",
-      "licenseId": "Intel-ACPI",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Intel_ACPI_Software_License_Agreement"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Interbase-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Interbase-1.0.json",
-      "referenceNumber": 520,
-      "name": "Interbase Public License v1.0",
-      "licenseId": "Interbase-1.0",
-      "seeAlso": [
-        "https://web.archive.org/web/20060319014854/http://info.borland.com/devsupport/interbase/opensource/IPL.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/IPA.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/IPA.json",
-      "referenceNumber": 213,
-      "name": "IPA Font License",
-      "licenseId": "IPA",
-      "seeAlso": [
-        "https://opensource.org/licenses/IPA"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/IPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/IPL-1.0.json",
-      "referenceNumber": 178,
-      "name": "IBM Public License v1.0",
-      "licenseId": "IPL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/IPL-1.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/ISC.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ISC.json",
-      "referenceNumber": 228,
-      "name": "ISC License",
-      "licenseId": "ISC",
-      "seeAlso": [
-        "https://www.isc.org/licenses/",
-        "https://www.isc.org/downloads/software-support-policy/isc-license/",
-        "https://opensource.org/licenses/ISC"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Jam.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Jam.json",
-      "referenceNumber": 206,
-      "name": "Jam License",
-      "licenseId": "Jam",
-      "seeAlso": [
-        "https://www.boost.org/doc/libs/1_35_0/doc/html/jam.html",
-        "https://web.archive.org/web/20160330173339/https://swarm.workshop.perforce.com/files/guest/perforce_software/jam/src/README"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/JasPer-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/JasPer-2.0.json",
-      "referenceNumber": 243,
-      "name": "JasPer License",
-      "licenseId": "JasPer-2.0",
-      "seeAlso": [
-        "http://www.ece.uvic.ca/~mdadams/jasper/LICENSE"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/JPL-image.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/JPL-image.json",
-      "referenceNumber": 282,
-      "name": "JPL Image Use Policy",
-      "licenseId": "JPL-image",
-      "seeAlso": [
-        "https://www.jpl.nasa.gov/jpl-image-use-policy"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/JPNIC.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/JPNIC.json",
-      "referenceNumber": 330,
-      "name": "Japan Network Information Center License",
-      "licenseId": "JPNIC",
-      "seeAlso": [
-        "https://gitlab.isc.org/isc-projects/bind9/blob/master/COPYRIGHT#L366"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/JSON.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/JSON.json",
-      "referenceNumber": 441,
-      "name": "JSON License",
-      "licenseId": "JSON",
-      "seeAlso": [
-        "http://www.json.org/license.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Kazlib.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Kazlib.json",
-      "referenceNumber": 470,
-      "name": "Kazlib License",
-      "licenseId": "Kazlib",
-      "seeAlso": [
-        "http://git.savannah.gnu.org/cgit/kazlib.git/tree/except.c?id\u003d0062df360c2d17d57f6af19b0e444c51feb99036"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Knuth-CTAN.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Knuth-CTAN.json",
-      "referenceNumber": 344,
-      "name": "Knuth CTAN License",
-      "licenseId": "Knuth-CTAN",
-      "seeAlso": [
-        "https://ctan.org/license/knuth"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/LAL-1.2.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LAL-1.2.json",
-      "referenceNumber": 356,
-      "name": "Licence Art Libre 1.2",
-      "licenseId": "LAL-1.2",
-      "seeAlso": [
-        "http://artlibre.org/licence/lal/licence-art-libre-12/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/LAL-1.3.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LAL-1.3.json",
-      "referenceNumber": 66,
-      "name": "Licence Art Libre 1.3",
-      "licenseId": "LAL-1.3",
-      "seeAlso": [
-        "https://artlibre.org/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Latex2e.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Latex2e.json",
-      "referenceNumber": 371,
-      "name": "Latex2e License",
-      "licenseId": "Latex2e",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Latex2e"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Leptonica.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Leptonica.json",
-      "referenceNumber": 2,
-      "name": "Leptonica License",
-      "licenseId": "Leptonica",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Leptonica"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPL-2.0.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/LGPL-2.0.json",
-      "referenceNumber": 139,
-      "name": "GNU Library General Public License v2 only",
-      "licenseId": "LGPL-2.0",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPL-2.0+.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/LGPL-2.0+.json",
-      "referenceNumber": 447,
-      "name": "GNU Library General Public License v2 or later",
-      "licenseId": "LGPL-2.0+",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPL-2.0-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LGPL-2.0-only.json",
-      "referenceNumber": 465,
-      "name": "GNU Library General Public License v2 only",
-      "licenseId": "LGPL-2.0-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPL-2.0-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LGPL-2.0-or-later.json",
-      "referenceNumber": 145,
-      "name": "GNU Library General Public License v2 or later",
-      "licenseId": "LGPL-2.0-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPL-2.1.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/LGPL-2.1.json",
-      "referenceNumber": 529,
-      "name": "GNU Lesser General Public License v2.1 only",
-      "licenseId": "LGPL-2.1",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html",
-        "https://opensource.org/licenses/LGPL-2.1"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPL-2.1+.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/LGPL-2.1+.json",
-      "referenceNumber": 187,
-      "name": "GNU Lesser General Public License v2.1 or later",
-      "licenseId": "LGPL-2.1+",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html",
-        "https://opensource.org/licenses/LGPL-2.1"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPL-2.1-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LGPL-2.1-only.json",
-      "referenceNumber": 357,
-      "name": "GNU Lesser General Public License v2.1 only",
-      "licenseId": "LGPL-2.1-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html",
-        "https://opensource.org/licenses/LGPL-2.1"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPL-2.1-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LGPL-2.1-or-later.json",
-      "referenceNumber": 156,
-      "name": "GNU Lesser General Public License v2.1 or later",
-      "licenseId": "LGPL-2.1-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html",
-        "https://opensource.org/licenses/LGPL-2.1"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPL-3.0.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/LGPL-3.0.json",
-      "referenceNumber": 528,
-      "name": "GNU Lesser General Public License v3.0 only",
-      "licenseId": "LGPL-3.0",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/lgpl-3.0-standalone.html",
-        "https://www.gnu.org/licenses/lgpl+gpl-3.0.txt",
-        "https://opensource.org/licenses/LGPL-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPL-3.0+.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/LGPL-3.0+.json",
-      "referenceNumber": 455,
-      "name": "GNU Lesser General Public License v3.0 or later",
-      "licenseId": "LGPL-3.0+",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/lgpl-3.0-standalone.html",
-        "https://www.gnu.org/licenses/lgpl+gpl-3.0.txt",
-        "https://opensource.org/licenses/LGPL-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPL-3.0-only.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LGPL-3.0-only.json",
-      "referenceNumber": 276,
-      "name": "GNU Lesser General Public License v3.0 only",
-      "licenseId": "LGPL-3.0-only",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/lgpl-3.0-standalone.html",
-        "https://www.gnu.org/licenses/lgpl+gpl-3.0.txt",
-        "https://opensource.org/licenses/LGPL-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPL-3.0-or-later.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LGPL-3.0-or-later.json",
-      "referenceNumber": 150,
-      "name": "GNU Lesser General Public License v3.0 or later",
-      "licenseId": "LGPL-3.0-or-later",
-      "seeAlso": [
-        "https://www.gnu.org/licenses/lgpl-3.0-standalone.html",
-        "https://www.gnu.org/licenses/lgpl+gpl-3.0.txt",
-        "https://opensource.org/licenses/LGPL-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LGPLLR.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LGPLLR.json",
-      "referenceNumber": 235,
-      "name": "Lesser General Public License For Linguistic Resources",
-      "licenseId": "LGPLLR",
-      "seeAlso": [
-        "http://www-igm.univ-mlv.fr/~unitex/lgpllr.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Libpng.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Libpng.json",
-      "referenceNumber": 113,
-      "name": "libpng License",
-      "licenseId": "Libpng",
-      "seeAlso": [
-        "http://www.libpng.org/pub/png/src/libpng-LICENSE.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/libpng-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/libpng-2.0.json",
-      "referenceNumber": 308,
-      "name": "PNG Reference Library version 2",
-      "licenseId": "libpng-2.0",
-      "seeAlso": [
-        "http://www.libpng.org/pub/png/src/libpng-LICENSE.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/libselinux-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/libselinux-1.0.json",
-      "referenceNumber": 390,
-      "name": "libselinux public domain notice",
-      "licenseId": "libselinux-1.0",
-      "seeAlso": [
-        "https://github.com/SELinuxProject/selinux/blob/master/libselinux/LICENSE"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/libtiff.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/libtiff.json",
-      "referenceNumber": 493,
-      "name": "libtiff License",
-      "licenseId": "libtiff",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/libtiff"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/libutil-David-Nugent.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/libutil-David-Nugent.json",
-      "referenceNumber": 377,
-      "name": "libutil David Nugent License",
-      "licenseId": "libutil-David-Nugent",
-      "seeAlso": [
-        "http://web.mit.edu/freebsd/head/lib/libutil/login_ok.3",
-        "https://cgit.freedesktop.org/libbsd/tree/man/setproctitle.3bsd"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/LiLiQ-P-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LiLiQ-P-1.1.json",
-      "referenceNumber": 379,
-      "name": "Licence Libre du Québec – Permissive version 1.1",
-      "licenseId": "LiLiQ-P-1.1",
-      "seeAlso": [
-        "https://forge.gouv.qc.ca/licence/fr/liliq-v1-1/",
-        "http://opensource.org/licenses/LiLiQ-P-1.1"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LiLiQ-R-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LiLiQ-R-1.1.json",
-      "referenceNumber": 21,
-      "name": "Licence Libre du Québec – Réciprocité version 1.1",
-      "licenseId": "LiLiQ-R-1.1",
-      "seeAlso": [
-        "https://www.forge.gouv.qc.ca/participez/licence-logicielle/licence-libre-du-quebec-liliq-en-francais/licence-libre-du-quebec-reciprocite-liliq-r-v1-1/",
-        "http://opensource.org/licenses/LiLiQ-R-1.1"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LiLiQ-Rplus-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LiLiQ-Rplus-1.1.json",
-      "referenceNumber": 257,
-      "name": "Licence Libre du Québec – Réciprocité forte version 1.1",
-      "licenseId": "LiLiQ-Rplus-1.1",
-      "seeAlso": [
-        "https://www.forge.gouv.qc.ca/participez/licence-logicielle/licence-libre-du-quebec-liliq-en-francais/licence-libre-du-quebec-reciprocite-forte-liliq-r-v1-1/",
-        "http://opensource.org/licenses/LiLiQ-Rplus-1.1"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Linux-man-pages-copyleft.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Linux-man-pages-copyleft.json",
-      "referenceNumber": 53,
-      "name": "Linux man-pages Copyleft",
-      "licenseId": "Linux-man-pages-copyleft",
-      "seeAlso": [
-        "https://www.kernel.org/doc/man-pages/licenses.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Linux-OpenIB.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Linux-OpenIB.json",
-      "referenceNumber": 61,
-      "name": "Linux Kernel Variant of OpenIB.org license",
-      "licenseId": "Linux-OpenIB",
-      "seeAlso": [
-        "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/infiniband/core/sa.h"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/LOOP.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LOOP.json",
-      "referenceNumber": 89,
-      "name": "Common Lisp LOOP License",
-      "licenseId": "LOOP",
-      "seeAlso": [
-        "https://gitlab.com/embeddable-common-lisp/ecl/-/blob/develop/src/lsp/loop.lsp",
-        "http://git.savannah.gnu.org/cgit/gcl.git/tree/gcl/lsp/gcl_loop.lsp?h\u003dVersion_2_6_13pre",
-        "https://sourceforge.net/p/sbcl/sbcl/ci/master/tree/src/code/loop.lisp",
-        "https://github.com/cl-adams/adams/blob/master/LICENSE.md",
-        "https://github.com/blakemcbride/eclipse-lisp/blob/master/lisp/loop.lisp",
-        "https://gitlab.common-lisp.net/cmucl/cmucl/-/blob/master/src/code/loop.lisp"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/LPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LPL-1.0.json",
-      "referenceNumber": 245,
-      "name": "Lucent Public License Version 1.0",
-      "licenseId": "LPL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/LPL-1.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LPL-1.02.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LPL-1.02.json",
-      "referenceNumber": 78,
-      "name": "Lucent Public License v1.02",
-      "licenseId": "LPL-1.02",
-      "seeAlso": [
-        "http://plan9.bell-labs.com/plan9/license.html",
-        "https://opensource.org/licenses/LPL-1.02"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LPPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LPPL-1.0.json",
-      "referenceNumber": 478,
-      "name": "LaTeX Project Public License v1.0",
-      "licenseId": "LPPL-1.0",
-      "seeAlso": [
-        "http://www.latex-project.org/lppl/lppl-1-0.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/LPPL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LPPL-1.1.json",
-      "referenceNumber": 519,
-      "name": "LaTeX Project Public License v1.1",
-      "licenseId": "LPPL-1.1",
-      "seeAlso": [
-        "http://www.latex-project.org/lppl/lppl-1-1.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/LPPL-1.2.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LPPL-1.2.json",
-      "referenceNumber": 495,
-      "name": "LaTeX Project Public License v1.2",
-      "licenseId": "LPPL-1.2",
-      "seeAlso": [
-        "http://www.latex-project.org/lppl/lppl-1-2.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LPPL-1.3a.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LPPL-1.3a.json",
-      "referenceNumber": 127,
-      "name": "LaTeX Project Public License v1.3a",
-      "licenseId": "LPPL-1.3a",
-      "seeAlso": [
-        "http://www.latex-project.org/lppl/lppl-1-3a.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LPPL-1.3c.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LPPL-1.3c.json",
-      "referenceNumber": 19,
-      "name": "LaTeX Project Public License v1.3c",
-      "licenseId": "LPPL-1.3c",
-      "seeAlso": [
-        "http://www.latex-project.org/lppl/lppl-1-3c.txt",
-        "https://opensource.org/licenses/LPPL-1.3c"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/LZMA-SDK-9.11-to-9.20.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LZMA-SDK-9.11-to-9.20.json",
-      "referenceNumber": 191,
-      "name": "LZMA SDK License (versions 9.11 to 9.20)",
-      "licenseId": "LZMA-SDK-9.11-to-9.20",
-      "seeAlso": [
-        "https://www.7-zip.org/sdk.html",
-        "https://sourceforge.net/projects/sevenzip/files/LZMA%20SDK/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/LZMA-SDK-9.22.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/LZMA-SDK-9.22.json",
-      "referenceNumber": 436,
-      "name": "LZMA SDK License (versions 9.22 and beyond)",
-      "licenseId": "LZMA-SDK-9.22",
-      "seeAlso": [
-        "https://www.7-zip.org/sdk.html",
-        "https://sourceforge.net/projects/sevenzip/files/LZMA%20SDK/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MakeIndex.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MakeIndex.json",
-      "referenceNumber": 464,
-      "name": "MakeIndex License",
-      "licenseId": "MakeIndex",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/MakeIndex"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Martin-Birgmeier.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Martin-Birgmeier.json",
-      "referenceNumber": 521,
-      "name": "Martin Birgmeier License",
-      "licenseId": "Martin-Birgmeier",
-      "seeAlso": [
-        "https://github.com/Perl/perl5/blob/blead/util.c#L6136"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Minpack.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Minpack.json",
-      "referenceNumber": 533,
-      "name": "Minpack License",
-      "licenseId": "Minpack",
-      "seeAlso": [
-        "http://www.netlib.org/minpack/disclaimer",
-        "https://gitlab.com/libeigen/eigen/-/blob/master/COPYING.MINPACK"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MirOS.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MirOS.json",
-      "referenceNumber": 323,
-      "name": "The MirOS Licence",
-      "licenseId": "MirOS",
-      "seeAlso": [
-        "https://opensource.org/licenses/MirOS"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/MIT.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MIT.json",
-      "referenceNumber": 129,
-      "name": "MIT License",
-      "licenseId": "MIT",
-      "seeAlso": [
-        "https://opensource.org/licenses/MIT"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/MIT-0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MIT-0.json",
-      "referenceNumber": 31,
-      "name": "MIT No Attribution",
-      "licenseId": "MIT-0",
-      "seeAlso": [
-        "https://github.com/aws/mit-0",
-        "https://romanrm.net/mit-zero",
-        "https://github.com/awsdocs/aws-cloud9-user-guide/blob/master/LICENSE-SAMPLECODE"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/MIT-advertising.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MIT-advertising.json",
-      "referenceNumber": 429,
-      "name": "Enlightenment License (e16)",
-      "licenseId": "MIT-advertising",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/MIT_With_Advertising"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MIT-CMU.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MIT-CMU.json",
-      "referenceNumber": 103,
-      "name": "CMU License",
-      "licenseId": "MIT-CMU",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing:MIT?rd\u003dLicensing/MIT#CMU_Style",
-        "https://github.com/python-pillow/Pillow/blob/fffb426092c8db24a5f4b6df243a8a3c01fb63cd/LICENSE"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MIT-enna.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MIT-enna.json",
-      "referenceNumber": 467,
-      "name": "enna License",
-      "licenseId": "MIT-enna",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/MIT#enna"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MIT-feh.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MIT-feh.json",
-      "referenceNumber": 100,
-      "name": "feh License",
-      "licenseId": "MIT-feh",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/MIT#feh"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MIT-Modern-Variant.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MIT-Modern-Variant.json",
-      "referenceNumber": 215,
-      "name": "MIT License Modern Variant",
-      "licenseId": "MIT-Modern-Variant",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing:MIT#Modern_Variants",
-        "https://ptolemy.berkeley.edu/copyright.htm",
-        "https://pirlwww.lpl.arizona.edu/resources/guide/software/PerlTk/Tixlic.html"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/MIT-open-group.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MIT-open-group.json",
-      "referenceNumber": 368,
-      "name": "MIT Open Group variant",
-      "licenseId": "MIT-open-group",
-      "seeAlso": [
-        "https://gitlab.freedesktop.org/xorg/app/iceauth/-/blob/master/COPYING",
-        "https://gitlab.freedesktop.org/xorg/app/xvinfo/-/blob/master/COPYING",
-        "https://gitlab.freedesktop.org/xorg/app/xsetroot/-/blob/master/COPYING",
-        "https://gitlab.freedesktop.org/xorg/app/xauth/-/blob/master/COPYING"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MIT-Wu.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MIT-Wu.json",
-      "referenceNumber": 366,
-      "name": "MIT Tom Wu Variant",
-      "licenseId": "MIT-Wu",
-      "seeAlso": [
-        "https://github.com/chromium/octane/blob/master/crypto.js"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MITNFA.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MITNFA.json",
-      "referenceNumber": 367,
-      "name": "MIT +no-false-attribs license",
-      "licenseId": "MITNFA",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/MITNFA"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Motosoto.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Motosoto.json",
-      "referenceNumber": 406,
-      "name": "Motosoto License",
-      "licenseId": "Motosoto",
-      "seeAlso": [
-        "https://opensource.org/licenses/Motosoto"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/mpi-permissive.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/mpi-permissive.json",
-      "referenceNumber": 12,
-      "name": "mpi Permissive License",
-      "licenseId": "mpi-permissive",
-      "seeAlso": [
-        "https://sources.debian.org/src/openmpi/4.1.0-10/ompi/debuggers/msgq_interface.h/?hl\u003d19#L19"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/mpich2.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/mpich2.json",
-      "referenceNumber": 524,
-      "name": "mpich2 License",
-      "licenseId": "mpich2",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/MIT"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MPL-1.0.json",
-      "referenceNumber": 380,
-      "name": "Mozilla Public License 1.0",
-      "licenseId": "MPL-1.0",
-      "seeAlso": [
-        "http://www.mozilla.org/MPL/MPL-1.0.html",
-        "https://opensource.org/licenses/MPL-1.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/MPL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MPL-1.1.json",
-      "referenceNumber": 376,
-      "name": "Mozilla Public License 1.1",
-      "licenseId": "MPL-1.1",
-      "seeAlso": [
-        "http://www.mozilla.org/MPL/MPL-1.1.html",
-        "https://opensource.org/licenses/MPL-1.1"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/MPL-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MPL-2.0.json",
-      "referenceNumber": 190,
-      "name": "Mozilla Public License 2.0",
-      "licenseId": "MPL-2.0",
-      "seeAlso": [
-        "https://www.mozilla.org/MPL/2.0/",
-        "https://opensource.org/licenses/MPL-2.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/MPL-2.0-no-copyleft-exception.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MPL-2.0-no-copyleft-exception.json",
-      "referenceNumber": 194,
-      "name": "Mozilla Public License 2.0 (no copyleft exception)",
-      "licenseId": "MPL-2.0-no-copyleft-exception",
-      "seeAlso": [
-        "https://www.mozilla.org/MPL/2.0/",
-        "https://opensource.org/licenses/MPL-2.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/mplus.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/mplus.json",
-      "referenceNumber": 446,
-      "name": "mplus Font License",
-      "licenseId": "mplus",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing:Mplus?rd\u003dLicensing/mplus"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MS-LPL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MS-LPL.json",
-      "referenceNumber": 172,
-      "name": "Microsoft Limited Public License",
-      "licenseId": "MS-LPL",
-      "seeAlso": [
-        "https://www.openhub.net/licenses/mslpl",
-        "https://github.com/gabegundy/atlserver/blob/master/License.txt",
-        "https://en.wikipedia.org/wiki/Shared_Source_Initiative#Microsoft_Limited_Public_License_(Ms-LPL)"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MS-PL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MS-PL.json",
-      "referenceNumber": 417,
-      "name": "Microsoft Public License",
-      "licenseId": "MS-PL",
-      "seeAlso": [
-        "http://www.microsoft.com/opensource/licenses.mspx",
-        "https://opensource.org/licenses/MS-PL"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/MS-RL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MS-RL.json",
-      "referenceNumber": 438,
-      "name": "Microsoft Reciprocal License",
-      "licenseId": "MS-RL",
-      "seeAlso": [
-        "http://www.microsoft.com/opensource/licenses.mspx",
-        "https://opensource.org/licenses/MS-RL"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/MTLL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MTLL.json",
-      "referenceNumber": 30,
-      "name": "Matrix Template Library License",
-      "licenseId": "MTLL",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Matrix_Template_Library_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MulanPSL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MulanPSL-1.0.json",
-      "referenceNumber": 475,
-      "name": "Mulan Permissive Software License, Version 1",
-      "licenseId": "MulanPSL-1.0",
-      "seeAlso": [
-        "https://license.coscl.org.cn/MulanPSL/",
-        "https://github.com/yuwenlong/longphp/blob/25dfb70cc2a466dc4bb55ba30901cbce08d164b5/LICENSE"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/MulanPSL-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/MulanPSL-2.0.json",
-      "referenceNumber": 92,
-      "name": "Mulan Permissive Software License, Version 2",
-      "licenseId": "MulanPSL-2.0",
-      "seeAlso": [
-        "https://license.coscl.org.cn/MulanPSL2/"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Multics.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Multics.json",
-      "referenceNumber": 498,
-      "name": "Multics License",
-      "licenseId": "Multics",
-      "seeAlso": [
-        "https://opensource.org/licenses/Multics"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Mup.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Mup.json",
-      "referenceNumber": 80,
-      "name": "Mup License",
-      "licenseId": "Mup",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Mup"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NAIST-2003.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NAIST-2003.json",
-      "referenceNumber": 173,
-      "name": "Nara Institute of Science and Technology License (2003)",
-      "licenseId": "NAIST-2003",
-      "seeAlso": [
-        "https://enterprise.dejacode.com/licenses/public/naist-2003/#license-text",
-        "https://github.com/nodejs/node/blob/4a19cc8947b1bba2b2d27816ec3d0edf9b28e503/LICENSE#L343"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NASA-1.3.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NASA-1.3.json",
-      "referenceNumber": 111,
-      "name": "NASA Open Source Agreement 1.3",
-      "licenseId": "NASA-1.3",
-      "seeAlso": [
-        "http://ti.arc.nasa.gov/opensource/nosa/",
-        "https://opensource.org/licenses/NASA-1.3"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Naumen.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Naumen.json",
-      "referenceNumber": 419,
-      "name": "Naumen Public License",
-      "licenseId": "Naumen",
-      "seeAlso": [
-        "https://opensource.org/licenses/Naumen"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/NBPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NBPL-1.0.json",
-      "referenceNumber": 198,
-      "name": "Net Boolean Public License v1",
-      "licenseId": "NBPL-1.0",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d37b4b3f6cc4bf34e1d3dec61e69914b9819d8894"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NCGL-UK-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NCGL-UK-2.0.json",
-      "referenceNumber": 140,
-      "name": "Non-Commercial Government Licence",
-      "licenseId": "NCGL-UK-2.0",
-      "seeAlso": [
-        "http://www.nationalarchives.gov.uk/doc/non-commercial-government-licence/version/2/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NCSA.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NCSA.json",
-      "referenceNumber": 18,
-      "name": "University of Illinois/NCSA Open Source License",
-      "licenseId": "NCSA",
-      "seeAlso": [
-        "http://otm.illinois.edu/uiuc_openSource",
-        "https://opensource.org/licenses/NCSA"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Net-SNMP.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Net-SNMP.json",
-      "referenceNumber": 65,
-      "name": "Net-SNMP License",
-      "licenseId": "Net-SNMP",
-      "seeAlso": [
-        "http://net-snmp.sourceforge.net/about/license.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NetCDF.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NetCDF.json",
-      "referenceNumber": 472,
-      "name": "NetCDF license",
-      "licenseId": "NetCDF",
-      "seeAlso": [
-        "http://www.unidata.ucar.edu/software/netcdf/copyright.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Newsletr.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Newsletr.json",
-      "referenceNumber": 212,
-      "name": "Newsletr License",
-      "licenseId": "Newsletr",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Newsletr"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NGPL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NGPL.json",
-      "referenceNumber": 52,
-      "name": "Nethack General Public License",
-      "licenseId": "NGPL",
-      "seeAlso": [
-        "https://opensource.org/licenses/NGPL"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/NICTA-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NICTA-1.0.json",
-      "referenceNumber": 397,
-      "name": "NICTA Public Software License, Version 1.0",
-      "licenseId": "NICTA-1.0",
-      "seeAlso": [
-        "https://opensource.apple.com/source/mDNSResponder/mDNSResponder-320.10/mDNSPosix/nss_ReadMe.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NIST-PD.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NIST-PD.json",
-      "referenceNumber": 278,
-      "name": "NIST Public Domain Notice",
-      "licenseId": "NIST-PD",
-      "seeAlso": [
-        "https://github.com/tcheneau/simpleRPL/blob/e645e69e38dd4e3ccfeceb2db8cba05b7c2e0cd3/LICENSE.txt",
-        "https://github.com/tcheneau/Routing/blob/f09f46fcfe636107f22f2c98348188a65a135d98/README.md"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NIST-PD-fallback.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NIST-PD-fallback.json",
-      "referenceNumber": 353,
-      "name": "NIST Public Domain Notice with license fallback",
-      "licenseId": "NIST-PD-fallback",
-      "seeAlso": [
-        "https://github.com/usnistgov/jsip/blob/59700e6926cbe96c5cdae897d9a7d2656b42abe3/LICENSE",
-        "https://github.com/usnistgov/fipy/blob/86aaa5c2ba2c6f1be19593c5986071cf6568cc34/LICENSE.rst"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NLOD-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NLOD-1.0.json",
-      "referenceNumber": 199,
-      "name": "Norwegian Licence for Open Government Data (NLOD) 1.0",
-      "licenseId": "NLOD-1.0",
-      "seeAlso": [
-        "http://data.norge.no/nlod/en/1.0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NLOD-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NLOD-2.0.json",
-      "referenceNumber": 143,
-      "name": "Norwegian Licence for Open Government Data (NLOD) 2.0",
-      "licenseId": "NLOD-2.0",
-      "seeAlso": [
-        "http://data.norge.no/nlod/en/2.0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NLPL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NLPL.json",
-      "referenceNumber": 274,
-      "name": "No Limit Public License",
-      "licenseId": "NLPL",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/NLPL"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Nokia.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Nokia.json",
-      "referenceNumber": 45,
-      "name": "Nokia Open Source License",
-      "licenseId": "Nokia",
-      "seeAlso": [
-        "https://opensource.org/licenses/nokia"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/NOSL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NOSL.json",
-      "referenceNumber": 302,
-      "name": "Netizen Open Source License",
-      "licenseId": "NOSL",
-      "seeAlso": [
-        "http://bits.netizen.com.au/licenses/NOSL/nosl.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Noweb.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Noweb.json",
-      "referenceNumber": 508,
-      "name": "Noweb License",
-      "licenseId": "Noweb",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Noweb"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NPL-1.0.json",
-      "referenceNumber": 141,
-      "name": "Netscape Public License v1.0",
-      "licenseId": "NPL-1.0",
-      "seeAlso": [
-        "http://www.mozilla.org/MPL/NPL/1.0/"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/NPL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NPL-1.1.json",
-      "referenceNumber": 410,
-      "name": "Netscape Public License v1.1",
-      "licenseId": "NPL-1.1",
-      "seeAlso": [
-        "http://www.mozilla.org/MPL/NPL/1.1/"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/NPOSL-3.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NPOSL-3.0.json",
-      "referenceNumber": 535,
-      "name": "Non-Profit Open Software License 3.0",
-      "licenseId": "NPOSL-3.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/NOSL3.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/NRL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NRL.json",
-      "referenceNumber": 265,
-      "name": "NRL License",
-      "licenseId": "NRL",
-      "seeAlso": [
-        "http://web.mit.edu/network/isakmp/nrllicense.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/NTP.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NTP.json",
-      "referenceNumber": 233,
-      "name": "NTP License",
-      "licenseId": "NTP",
-      "seeAlso": [
-        "https://opensource.org/licenses/NTP"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/NTP-0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/NTP-0.json",
-      "referenceNumber": 232,
-      "name": "NTP No Attribution",
-      "licenseId": "NTP-0",
-      "seeAlso": [
-        "https://github.com/tytso/e2fsprogs/blob/master/lib/et/et_name.c"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Nunit.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/Nunit.json",
-      "referenceNumber": 505,
-      "name": "Nunit License",
-      "licenseId": "Nunit",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Nunit"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/O-UDA-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/O-UDA-1.0.json",
-      "referenceNumber": 24,
-      "name": "Open Use of Data Agreement v1.0",
-      "licenseId": "O-UDA-1.0",
-      "seeAlso": [
-        "https://github.com/microsoft/Open-Use-of-Data-Agreement/blob/v1.0/O-UDA-1.0.md",
-        "https://cdla.dev/open-use-of-data-agreement-v1-0/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OCCT-PL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OCCT-PL.json",
-      "referenceNumber": 298,
-      "name": "Open CASCADE Technology Public License",
-      "licenseId": "OCCT-PL",
-      "seeAlso": [
-        "http://www.opencascade.com/content/occt-public-license"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OCLC-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OCLC-2.0.json",
-      "referenceNumber": 343,
-      "name": "OCLC Research Public License 2.0",
-      "licenseId": "OCLC-2.0",
-      "seeAlso": [
-        "http://www.oclc.org/research/activities/software/license/v2final.htm",
-        "https://opensource.org/licenses/OCLC-2.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/ODbL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ODbL-1.0.json",
-      "referenceNumber": 106,
-      "name": "Open Data Commons Open Database License v1.0",
-      "licenseId": "ODbL-1.0",
-      "seeAlso": [
-        "http://www.opendatacommons.org/licenses/odbl/1.0/",
-        "https://opendatacommons.org/licenses/odbl/1-0/"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/ODC-By-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ODC-By-1.0.json",
-      "referenceNumber": 155,
-      "name": "Open Data Commons Attribution License v1.0",
-      "licenseId": "ODC-By-1.0",
-      "seeAlso": [
-        "https://opendatacommons.org/licenses/by/1.0/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OFFIS.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OFFIS.json",
-      "referenceNumber": 43,
-      "name": "OFFIS License",
-      "licenseId": "OFFIS",
-      "seeAlso": [
-        "https://sourceforge.net/p/xmedcon/code/ci/master/tree/libs/dicom/README"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OFL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OFL-1.0.json",
-      "referenceNumber": 77,
-      "name": "SIL Open Font License 1.0",
-      "licenseId": "OFL-1.0",
-      "seeAlso": [
-        "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL10_web"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OFL-1.0-no-RFN.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OFL-1.0-no-RFN.json",
-      "referenceNumber": 204,
-      "name": "SIL Open Font License 1.0 with no Reserved Font Name",
-      "licenseId": "OFL-1.0-no-RFN",
-      "seeAlso": [
-        "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL10_web"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OFL-1.0-RFN.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OFL-1.0-RFN.json",
-      "referenceNumber": 476,
-      "name": "SIL Open Font License 1.0 with Reserved Font Name",
-      "licenseId": "OFL-1.0-RFN",
-      "seeAlso": [
-        "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL10_web"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OFL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OFL-1.1.json",
-      "referenceNumber": 79,
-      "name": "SIL Open Font License 1.1",
-      "licenseId": "OFL-1.1",
-      "seeAlso": [
-        "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL_web",
-        "https://opensource.org/licenses/OFL-1.1"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OFL-1.1-no-RFN.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OFL-1.1-no-RFN.json",
-      "referenceNumber": 38,
-      "name": "SIL Open Font License 1.1 with no Reserved Font Name",
-      "licenseId": "OFL-1.1-no-RFN",
-      "seeAlso": [
-        "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL_web",
-        "https://opensource.org/licenses/OFL-1.1"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OFL-1.1-RFN.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OFL-1.1-RFN.json",
-      "referenceNumber": 44,
-      "name": "SIL Open Font License 1.1 with Reserved Font Name",
-      "licenseId": "OFL-1.1-RFN",
-      "seeAlso": [
-        "http://scripts.sil.org/cms/scripts/page.php?item_id\u003dOFL_web",
-        "https://opensource.org/licenses/OFL-1.1"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OGC-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OGC-1.0.json",
-      "referenceNumber": 334,
-      "name": "OGC Software License, Version 1.0",
-      "licenseId": "OGC-1.0",
-      "seeAlso": [
-        "https://www.ogc.org/ogc/software/1.0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OGDL-Taiwan-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OGDL-Taiwan-1.0.json",
-      "referenceNumber": 23,
-      "name": "Taiwan Open Government Data License, version 1.0",
-      "licenseId": "OGDL-Taiwan-1.0",
-      "seeAlso": [
-        "https://data.gov.tw/license"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OGL-Canada-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OGL-Canada-2.0.json",
-      "referenceNumber": 355,
-      "name": "Open Government Licence - Canada",
-      "licenseId": "OGL-Canada-2.0",
-      "seeAlso": [
-        "https://open.canada.ca/en/open-government-licence-canada"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OGL-UK-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OGL-UK-1.0.json",
-      "referenceNumber": 84,
-      "name": "Open Government Licence v1.0",
-      "licenseId": "OGL-UK-1.0",
-      "seeAlso": [
-        "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/1/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OGL-UK-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OGL-UK-2.0.json",
-      "referenceNumber": 424,
-      "name": "Open Government Licence v2.0",
-      "licenseId": "OGL-UK-2.0",
-      "seeAlso": [
-        "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/2/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OGL-UK-3.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OGL-UK-3.0.json",
-      "referenceNumber": 507,
-      "name": "Open Government Licence v3.0",
-      "licenseId": "OGL-UK-3.0",
-      "seeAlso": [
-        "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OGTSL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OGTSL.json",
-      "referenceNumber": 324,
-      "name": "Open Group Test Suite License",
-      "licenseId": "OGTSL",
-      "seeAlso": [
-        "http://www.opengroup.org/testing/downloads/The_Open_Group_TSL.txt",
-        "https://opensource.org/licenses/OGTSL"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-1.1.json",
-      "referenceNumber": 384,
-      "name": "Open LDAP Public License v1.1",
-      "licenseId": "OLDAP-1.1",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d806557a5ad59804ef3a44d5abfbe91d706b0791f"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-1.2.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-1.2.json",
-      "referenceNumber": 409,
-      "name": "Open LDAP Public License v1.2",
-      "licenseId": "OLDAP-1.2",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d42b0383c50c299977b5893ee695cf4e486fb0dc7"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-1.3.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-1.3.json",
-      "referenceNumber": 501,
-      "name": "Open LDAP Public License v1.3",
-      "licenseId": "OLDAP-1.3",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003de5f8117f0ce088d0bd7a8e18ddf37eaa40eb09b1"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-1.4.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-1.4.json",
-      "referenceNumber": 383,
-      "name": "Open LDAP Public License v1.4",
-      "licenseId": "OLDAP-1.4",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003dc9f95c2f3f2ffb5e0ae55fe7388af75547660941"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.0.json",
-      "referenceNumber": 402,
-      "name": "Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B)",
-      "licenseId": "OLDAP-2.0",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003dcbf50f4e1185a21abd4c0a54d3f4341fe28f36ea"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-2.0.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.0.1.json",
-      "referenceNumber": 301,
-      "name": "Open LDAP Public License v2.0.1",
-      "licenseId": "OLDAP-2.0.1",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003db6d68acd14e51ca3aab4428bf26522aa74873f0e"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-2.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.1.json",
-      "referenceNumber": 389,
-      "name": "Open LDAP Public License v2.1",
-      "licenseId": "OLDAP-2.1",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003db0d176738e96a0d3b9f85cb51e140a86f21be715"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-2.2.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.2.json",
-      "referenceNumber": 17,
-      "name": "Open LDAP Public License v2.2",
-      "licenseId": "OLDAP-2.2",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d470b0c18ec67621c85881b2733057fecf4a1acc3"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-2.2.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.2.1.json",
-      "referenceNumber": 112,
-      "name": "Open LDAP Public License v2.2.1",
-      "licenseId": "OLDAP-2.2.1",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d4bc786f34b50aa301be6f5600f58a980070f481e"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-2.2.2.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.2.2.json",
-      "referenceNumber": 394,
-      "name": "Open LDAP Public License 2.2.2",
-      "licenseId": "OLDAP-2.2.2",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003ddf2cc1e21eb7c160695f5b7cffd6296c151ba188"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-2.3.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.3.json",
-      "referenceNumber": 480,
-      "name": "Open LDAP Public License v2.3",
-      "licenseId": "OLDAP-2.3",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003dd32cf54a32d581ab475d23c810b0a7fbaf8d63c3"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-2.4.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.4.json",
-      "referenceNumber": 259,
-      "name": "Open LDAP Public License v2.4",
-      "licenseId": "OLDAP-2.4",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003dcd1284c4a91a8a380d904eee68d1583f989ed386"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-2.5.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.5.json",
-      "referenceNumber": 55,
-      "name": "Open LDAP Public License v2.5",
-      "licenseId": "OLDAP-2.5",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d6852b9d90022e8593c98205413380536b1b5a7cf"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-2.6.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.6.json",
-      "referenceNumber": 443,
-      "name": "Open LDAP Public License v2.6",
-      "licenseId": "OLDAP-2.6",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d1cae062821881f41b73012ba816434897abf4205"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-2.7.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.7.json",
-      "referenceNumber": 51,
-      "name": "Open LDAP Public License v2.7",
-      "licenseId": "OLDAP-2.7",
-      "seeAlso": [
-        "http://www.openldap.org/devel/gitweb.cgi?p\u003dopenldap.git;a\u003dblob;f\u003dLICENSE;hb\u003d47c2415c1df81556eeb39be6cad458ef87c534a2"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OLDAP-2.8.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OLDAP-2.8.json",
-      "referenceNumber": 93,
-      "name": "Open LDAP Public License v2.8",
-      "licenseId": "OLDAP-2.8",
-      "seeAlso": [
-        "http://www.openldap.org/software/release/license.html"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OML.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OML.json",
-      "referenceNumber": 474,
-      "name": "Open Market License",
-      "licenseId": "OML",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Open_Market_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OpenPBS-2.3.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OpenPBS-2.3.json",
-      "referenceNumber": 20,
-      "name": "OpenPBS v2.3 Software License",
-      "licenseId": "OpenPBS-2.3",
-      "seeAlso": [
-        "https://github.com/adaptivecomputing/torque/blob/master/PBS_License.txt",
-        "https://www.mcs.anl.gov/research/projects/openpbs/PBS_License.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OpenSSL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OpenSSL.json",
-      "referenceNumber": 50,
-      "name": "OpenSSL License",
-      "licenseId": "OpenSSL",
-      "seeAlso": [
-        "http://www.openssl.org/source/license.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OPL-1.0.json",
-      "referenceNumber": 408,
-      "name": "Open Public License v1.0",
-      "licenseId": "OPL-1.0",
-      "seeAlso": [
-        "http://old.koalateam.com/jackaroo/OPL_1_0.TXT",
-        "https://fedoraproject.org/wiki/Licensing/Open_Public_License"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OPUBL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OPUBL-1.0.json",
-      "referenceNumber": 169,
-      "name": "Open Publication License v1.0",
-      "licenseId": "OPUBL-1.0",
-      "seeAlso": [
-        "http://opencontent.org/openpub/",
-        "https://www.debian.org/opl",
-        "https://www.ctan.org/license/opl"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/OSET-PL-2.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OSET-PL-2.1.json",
-      "referenceNumber": 230,
-      "name": "OSET Public License version 2.1",
-      "licenseId": "OSET-PL-2.1",
-      "seeAlso": [
-        "http://www.osetfoundation.org/public-license",
-        "https://opensource.org/licenses/OPL-2.1"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OSL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OSL-1.0.json",
-      "referenceNumber": 466,
-      "name": "Open Software License 1.0",
-      "licenseId": "OSL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/OSL-1.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OSL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OSL-1.1.json",
-      "referenceNumber": 497,
-      "name": "Open Software License 1.1",
-      "licenseId": "OSL-1.1",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/OSL1.1"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OSL-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OSL-2.0.json",
-      "referenceNumber": 11,
-      "name": "Open Software License 2.0",
-      "licenseId": "OSL-2.0",
-      "seeAlso": [
-        "http://web.archive.org/web/20041020171434/http://www.rosenlaw.com/osl2.0.html"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OSL-2.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OSL-2.1.json",
-      "referenceNumber": 297,
-      "name": "Open Software License 2.1",
-      "licenseId": "OSL-2.1",
-      "seeAlso": [
-        "http://web.archive.org/web/20050212003940/http://www.rosenlaw.com/osl21.htm",
-        "https://opensource.org/licenses/OSL-2.1"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/OSL-3.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/OSL-3.0.json",
-      "referenceNumber": 60,
-      "name": "Open Software License 3.0",
-      "licenseId": "OSL-3.0",
-      "seeAlso": [
-        "https://web.archive.org/web/20120101081418/http://rosenlaw.com:80/OSL3.0.htm",
-        "https://opensource.org/licenses/OSL-3.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Parity-6.0.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Parity-6.0.0.json",
-      "referenceNumber": 85,
-      "name": "The Parity Public License 6.0.0",
-      "licenseId": "Parity-6.0.0",
-      "seeAlso": [
-        "https://paritylicense.com/versions/6.0.0.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Parity-7.0.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Parity-7.0.0.json",
-      "referenceNumber": 333,
-      "name": "The Parity Public License 7.0.0",
-      "licenseId": "Parity-7.0.0",
-      "seeAlso": [
-        "https://paritylicense.com/versions/7.0.0.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/PDDL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/PDDL-1.0.json",
-      "referenceNumber": 181,
-      "name": "Open Data Commons Public Domain Dedication \u0026 License 1.0",
-      "licenseId": "PDDL-1.0",
-      "seeAlso": [
-        "http://opendatacommons.org/licenses/pddl/1.0/",
-        "https://opendatacommons.org/licenses/pddl/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/PHP-3.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/PHP-3.0.json",
-      "referenceNumber": 123,
-      "name": "PHP License v3.0",
-      "licenseId": "PHP-3.0",
-      "seeAlso": [
-        "http://www.php.net/license/3_0.txt",
-        "https://opensource.org/licenses/PHP-3.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/PHP-3.01.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/PHP-3.01.json",
-      "referenceNumber": 27,
-      "name": "PHP License v3.01",
-      "licenseId": "PHP-3.01",
-      "seeAlso": [
-        "http://www.php.net/license/3_01.txt"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Plexus.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Plexus.json",
-      "referenceNumber": 286,
-      "name": "Plexus Classworlds License",
-      "licenseId": "Plexus",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Plexus_Classworlds_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/PolyForm-Noncommercial-1.0.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/PolyForm-Noncommercial-1.0.0.json",
-      "referenceNumber": 285,
-      "name": "PolyForm Noncommercial License 1.0.0",
-      "licenseId": "PolyForm-Noncommercial-1.0.0",
-      "seeAlso": [
-        "https://polyformproject.org/licenses/noncommercial/1.0.0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/PolyForm-Small-Business-1.0.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/PolyForm-Small-Business-1.0.0.json",
-      "referenceNumber": 426,
-      "name": "PolyForm Small Business License 1.0.0",
-      "licenseId": "PolyForm-Small-Business-1.0.0",
-      "seeAlso": [
-        "https://polyformproject.org/licenses/small-business/1.0.0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/PostgreSQL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/PostgreSQL.json",
-      "referenceNumber": 340,
-      "name": "PostgreSQL License",
-      "licenseId": "PostgreSQL",
-      "seeAlso": [
-        "http://www.postgresql.org/about/licence",
-        "https://opensource.org/licenses/PostgreSQL"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/PSF-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/PSF-2.0.json",
-      "referenceNumber": 203,
-      "name": "Python Software Foundation License 2.0",
-      "licenseId": "PSF-2.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/Python-2.0"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/psfrag.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/psfrag.json",
-      "referenceNumber": 481,
-      "name": "psfrag License",
-      "licenseId": "psfrag",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/psfrag"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/psutils.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/psutils.json",
-      "referenceNumber": 391,
-      "name": "psutils License",
-      "licenseId": "psutils",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/psutils"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Python-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Python-2.0.json",
-      "referenceNumber": 487,
-      "name": "Python License 2.0",
-      "licenseId": "Python-2.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/Python-2.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Python-2.0.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Python-2.0.1.json",
-      "referenceNumber": 303,
-      "name": "Python License 2.0.1",
-      "licenseId": "Python-2.0.1",
-      "seeAlso": [
-        "https://www.python.org/download/releases/2.0.1/license/",
-        "https://docs.python.org/3/license.html",
-        "https://github.com/python/cpython/blob/main/LICENSE"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Qhull.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Qhull.json",
-      "referenceNumber": 162,
-      "name": "Qhull License",
-      "licenseId": "Qhull",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Qhull"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/QPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/QPL-1.0.json",
-      "referenceNumber": 69,
-      "name": "Q Public License 1.0",
-      "licenseId": "QPL-1.0",
-      "seeAlso": [
-        "http://doc.qt.nokia.com/3.3/license.html",
-        "https://opensource.org/licenses/QPL-1.0",
-        "https://doc.qt.io/archives/3.3/license.html"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/QPL-1.0-INRIA-2004.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/QPL-1.0-INRIA-2004.json",
-      "referenceNumber": 9,
-      "name": "Q Public License 1.0 - INRIA 2004 variant",
-      "licenseId": "QPL-1.0-INRIA-2004",
-      "seeAlso": [
-        "https://github.com/maranget/hevea/blob/master/LICENSE"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Rdisc.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Rdisc.json",
-      "referenceNumber": 486,
-      "name": "Rdisc License",
-      "licenseId": "Rdisc",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Rdisc_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/RHeCos-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/RHeCos-1.1.json",
-      "referenceNumber": 462,
-      "name": "Red Hat eCos Public License v1.1",
-      "licenseId": "RHeCos-1.1",
-      "seeAlso": [
-        "http://ecos.sourceware.org/old-license.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/RPL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/RPL-1.1.json",
-      "referenceNumber": 313,
-      "name": "Reciprocal Public License 1.1",
-      "licenseId": "RPL-1.1",
-      "seeAlso": [
-        "https://opensource.org/licenses/RPL-1.1"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/RPL-1.5.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/RPL-1.5.json",
-      "referenceNumber": 75,
-      "name": "Reciprocal Public License 1.5",
-      "licenseId": "RPL-1.5",
-      "seeAlso": [
-        "https://opensource.org/licenses/RPL-1.5"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/RPSL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/RPSL-1.0.json",
-      "referenceNumber": 463,
-      "name": "RealNetworks Public Source License v1.0",
-      "licenseId": "RPSL-1.0",
-      "seeAlso": [
-        "https://helixcommunity.org/content/rpsl",
-        "https://opensource.org/licenses/RPSL-1.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/RSA-MD.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/RSA-MD.json",
-      "referenceNumber": 1,
-      "name": "RSA Message-Digest License",
-      "licenseId": "RSA-MD",
-      "seeAlso": [
-        "http://www.faqs.org/rfcs/rfc1321.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/RSCPL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/RSCPL.json",
-      "referenceNumber": 34,
-      "name": "Ricoh Source Code Public License",
-      "licenseId": "RSCPL",
-      "seeAlso": [
-        "http://wayback.archive.org/web/20060715140826/http://www.risource.org/RPL/RPL-1.0A.shtml",
-        "https://opensource.org/licenses/RSCPL"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Ruby.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Ruby.json",
-      "referenceNumber": 3,
-      "name": "Ruby License",
-      "licenseId": "Ruby",
-      "seeAlso": [
-        "http://www.ruby-lang.org/en/LICENSE.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/SAX-PD.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SAX-PD.json",
-      "referenceNumber": 515,
-      "name": "Sax Public Domain Notice",
-      "licenseId": "SAX-PD",
-      "seeAlso": [
-        "http://www.saxproject.org/copying.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Saxpath.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Saxpath.json",
-      "referenceNumber": 117,
-      "name": "Saxpath License",
-      "licenseId": "Saxpath",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Saxpath_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SCEA.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SCEA.json",
-      "referenceNumber": 0,
-      "name": "SCEA Shared Source License",
-      "licenseId": "SCEA",
-      "seeAlso": [
-        "http://research.scea.com/scea_shared_source_license.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SchemeReport.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SchemeReport.json",
-      "referenceNumber": 142,
-      "name": "Scheme Language Report License",
-      "licenseId": "SchemeReport",
-      "seeAlso": [],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Sendmail.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Sendmail.json",
-      "referenceNumber": 97,
-      "name": "Sendmail License",
-      "licenseId": "Sendmail",
-      "seeAlso": [
-        "http://www.sendmail.com/pdfs/open_source/sendmail_license.pdf",
-        "https://web.archive.org/web/20160322142305/https://www.sendmail.com/pdfs/open_source/sendmail_license.pdf"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Sendmail-8.23.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Sendmail-8.23.json",
-      "referenceNumber": 153,
-      "name": "Sendmail License 8.23",
-      "licenseId": "Sendmail-8.23",
-      "seeAlso": [
-        "https://www.proofpoint.com/sites/default/files/sendmail-license.pdf",
-        "https://web.archive.org/web/20181003101040/https://www.proofpoint.com/sites/default/files/sendmail-license.pdf"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SGI-B-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SGI-B-1.0.json",
-      "referenceNumber": 226,
-      "name": "SGI Free Software License B v1.0",
-      "licenseId": "SGI-B-1.0",
-      "seeAlso": [
-        "http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.1.0.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SGI-B-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SGI-B-1.1.json",
-      "referenceNumber": 315,
-      "name": "SGI Free Software License B v1.1",
-      "licenseId": "SGI-B-1.1",
-      "seeAlso": [
-        "http://oss.sgi.com/projects/FreeB/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SGI-B-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SGI-B-2.0.json",
-      "referenceNumber": 445,
-      "name": "SGI Free Software License B v2.0",
-      "licenseId": "SGI-B-2.0",
-      "seeAlso": [
-        "http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/SHL-0.5.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SHL-0.5.json",
-      "referenceNumber": 102,
-      "name": "Solderpad Hardware License v0.5",
-      "licenseId": "SHL-0.5",
-      "seeAlso": [
-        "https://solderpad.org/licenses/SHL-0.5/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SHL-0.51.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SHL-0.51.json",
-      "referenceNumber": 201,
-      "name": "Solderpad Hardware License, Version 0.51",
-      "licenseId": "SHL-0.51",
-      "seeAlso": [
-        "https://solderpad.org/licenses/SHL-0.51/"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SimPL-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SimPL-2.0.json",
-      "referenceNumber": 523,
-      "name": "Simple Public License 2.0",
-      "licenseId": "SimPL-2.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/SimPL-2.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/SISSL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SISSL.json",
-      "referenceNumber": 256,
-      "name": "Sun Industry Standards Source License v1.1",
-      "licenseId": "SISSL",
-      "seeAlso": [
-        "http://www.openoffice.org/licenses/sissl_license.html",
-        "https://opensource.org/licenses/SISSL"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/SISSL-1.2.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SISSL-1.2.json",
-      "referenceNumber": 247,
-      "name": "Sun Industry Standards Source License v1.2",
-      "licenseId": "SISSL-1.2",
-      "seeAlso": [
-        "http://gridscheduler.sourceforge.net/Gridengine_SISSL_license.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Sleepycat.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Sleepycat.json",
-      "referenceNumber": 192,
-      "name": "Sleepycat License",
-      "licenseId": "Sleepycat",
-      "seeAlso": [
-        "https://opensource.org/licenses/Sleepycat"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/SMLNJ.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SMLNJ.json",
-      "referenceNumber": 146,
-      "name": "Standard ML of New Jersey License",
-      "licenseId": "SMLNJ",
-      "seeAlso": [
-        "https://www.smlnj.org/license.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/SMPPL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SMPPL.json",
-      "referenceNumber": 62,
-      "name": "Secure Messaging Protocol Public License",
-      "licenseId": "SMPPL",
-      "seeAlso": [
-        "https://github.com/dcblake/SMP/blob/master/Documentation/License.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SNIA.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SNIA.json",
-      "referenceNumber": 273,
-      "name": "SNIA Public License 1.1",
-      "licenseId": "SNIA",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/SNIA_Public_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/snprintf.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/snprintf.json",
-      "referenceNumber": 418,
-      "name": "snprintf License",
-      "licenseId": "snprintf",
-      "seeAlso": [
-        "https://github.com/openssh/openssh-portable/blob/master/openbsd-compat/bsd-snprintf.c#L2"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Spencer-86.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Spencer-86.json",
-      "referenceNumber": 239,
-      "name": "Spencer License 86",
-      "licenseId": "Spencer-86",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Henry_Spencer_Reg-Ex_Library_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Spencer-94.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Spencer-94.json",
-      "referenceNumber": 202,
-      "name": "Spencer License 94",
-      "licenseId": "Spencer-94",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Henry_Spencer_Reg-Ex_Library_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Spencer-99.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Spencer-99.json",
-      "referenceNumber": 186,
-      "name": "Spencer License 99",
-      "licenseId": "Spencer-99",
-      "seeAlso": [
-        "http://www.opensource.apple.com/source/tcl/tcl-5/tcl/generic/regfronts.c"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SPL-1.0.json",
-      "referenceNumber": 86,
-      "name": "Sun Public License v1.0",
-      "licenseId": "SPL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/SPL-1.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/SSH-OpenSSH.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SSH-OpenSSH.json",
-      "referenceNumber": 120,
-      "name": "SSH OpenSSH license",
-      "licenseId": "SSH-OpenSSH",
-      "seeAlso": [
-        "https://github.com/openssh/openssh-portable/blob/1b11ea7c58cd5c59838b5fa574cd456d6047b2d4/LICENCE#L10"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SSH-short.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SSH-short.json",
-      "referenceNumber": 221,
-      "name": "SSH short notice",
-      "licenseId": "SSH-short",
-      "seeAlso": [
-        "https://github.com/openssh/openssh-portable/blob/1b11ea7c58cd5c59838b5fa574cd456d6047b2d4/pathnames.h",
-        "http://web.mit.edu/kolya/.f/root/athena.mit.edu/sipb.mit.edu/project/openssh/OldFiles/src/openssh-2.9.9p2/ssh-add.1",
-        "https://joinup.ec.europa.eu/svn/lesoll/trunk/italc/lib/src/dsa_key.cpp"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SSPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SSPL-1.0.json",
-      "referenceNumber": 321,
-      "name": "Server Side Public License, v 1",
-      "licenseId": "SSPL-1.0",
-      "seeAlso": [
-        "https://www.mongodb.com/licensing/server-side-public-license"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/StandardML-NJ.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/StandardML-NJ.json",
-      "referenceNumber": 534,
-      "name": "Standard ML of New Jersey License",
-      "licenseId": "StandardML-NJ",
-      "seeAlso": [
-        "https://www.smlnj.org/license.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/SugarCRM-1.1.3.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SugarCRM-1.1.3.json",
-      "referenceNumber": 40,
-      "name": "SugarCRM Public License v1.1.3",
-      "licenseId": "SugarCRM-1.1.3",
-      "seeAlso": [
-        "http://www.sugarcrm.com/crm/SPL"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SunPro.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SunPro.json",
-      "referenceNumber": 361,
-      "name": "SunPro License",
-      "licenseId": "SunPro",
-      "seeAlso": [
-        "https://github.com/freebsd/freebsd-src/blob/main/lib/msun/src/e_acosh.c",
-        "https://github.com/freebsd/freebsd-src/blob/main/lib/msun/src/e_lgammal.c"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/SWL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/SWL.json",
-      "referenceNumber": 109,
-      "name": "Scheme Widget Library (SWL) Software License Agreement",
-      "licenseId": "SWL",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/SWL"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Symlinks.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Symlinks.json",
-      "referenceNumber": 392,
-      "name": "Symlinks License",
-      "licenseId": "Symlinks",
-      "seeAlso": [
-        "https://www.mail-archive.com/debian-bugs-rc@lists.debian.org/msg11494.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/TAPR-OHL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/TAPR-OHL-1.0.json",
-      "referenceNumber": 512,
-      "name": "TAPR Open Hardware License v1.0",
-      "licenseId": "TAPR-OHL-1.0",
-      "seeAlso": [
-        "https://www.tapr.org/OHL"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/TCL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/TCL.json",
-      "referenceNumber": 485,
-      "name": "TCL/TK License",
-      "licenseId": "TCL",
-      "seeAlso": [
-        "http://www.tcl.tk/software/tcltk/license.html",
-        "https://fedoraproject.org/wiki/Licensing/TCL"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/TCP-wrappers.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/TCP-wrappers.json",
-      "referenceNumber": 58,
-      "name": "TCP Wrappers License",
-      "licenseId": "TCP-wrappers",
-      "seeAlso": [
-        "http://rc.quest.com/topics/openssh/license.php#tcpwrappers"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/TMate.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/TMate.json",
-      "referenceNumber": 362,
-      "name": "TMate Open Source License",
-      "licenseId": "TMate",
-      "seeAlso": [
-        "http://svnkit.com/license.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/TORQUE-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/TORQUE-1.1.json",
-      "referenceNumber": 490,
-      "name": "TORQUE v2.5+ Software License v1.1",
-      "licenseId": "TORQUE-1.1",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/TORQUEv1.1"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/TOSL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/TOSL.json",
-      "referenceNumber": 134,
-      "name": "Trusster Open Source License",
-      "licenseId": "TOSL",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/TOSL"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/TPDL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/TPDL.json",
-      "referenceNumber": 88,
-      "name": "Time::ParseDate License",
-      "licenseId": "TPDL",
-      "seeAlso": [
-        "https://metacpan.org/pod/Time::ParseDate#LICENSE"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/TPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/TPL-1.0.json",
-      "referenceNumber": 249,
-      "name": "THOR Public License 1.0",
-      "licenseId": "TPL-1.0",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing:ThorPublicLicense"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/TTWL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/TTWL.json",
-      "referenceNumber": 322,
-      "name": "Text-Tabs+Wrap License",
-      "licenseId": "TTWL",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/TTWL",
-        "https://github.com/ap/Text-Tabs/blob/master/lib.modern/Text/Tabs.pm#L148"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/TU-Berlin-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/TU-Berlin-1.0.json",
-      "referenceNumber": 207,
-      "name": "Technische Universitaet Berlin License 1.0",
-      "licenseId": "TU-Berlin-1.0",
-      "seeAlso": [
-        "https://github.com/swh/ladspa/blob/7bf6f3799fdba70fda297c2d8fd9f526803d9680/gsm/COPYRIGHT"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/TU-Berlin-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/TU-Berlin-2.0.json",
-      "referenceNumber": 305,
-      "name": "Technische Universitaet Berlin License 2.0",
-      "licenseId": "TU-Berlin-2.0",
-      "seeAlso": [
-        "https://github.com/CorsixTH/deps/blob/fd339a9f526d1d9c9f01ccf39e438a015da50035/licences/libgsm.txt"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/UCAR.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/UCAR.json",
-      "referenceNumber": 125,
-      "name": "UCAR License",
-      "licenseId": "UCAR",
-      "seeAlso": [
-        "https://github.com/Unidata/UDUNITS-2/blob/master/COPYRIGHT"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/UCL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/UCL-1.0.json",
-      "referenceNumber": 451,
-      "name": "Upstream Compatibility License v1.0",
-      "licenseId": "UCL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/UCL-1.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Unicode-DFS-2015.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Unicode-DFS-2015.json",
-      "referenceNumber": 304,
-      "name": "Unicode License Agreement - Data Files and Software (2015)",
-      "licenseId": "Unicode-DFS-2015",
-      "seeAlso": [
-        "https://web.archive.org/web/20151224134844/http://unicode.org/copyright.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Unicode-DFS-2016.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Unicode-DFS-2016.json",
-      "referenceNumber": 6,
-      "name": "Unicode License Agreement - Data Files and Software (2016)",
-      "licenseId": "Unicode-DFS-2016",
-      "seeAlso": [
-        "http://www.unicode.org/copyright.html"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Unicode-TOU.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Unicode-TOU.json",
-      "referenceNumber": 195,
-      "name": "Unicode Terms of Use",
-      "licenseId": "Unicode-TOU",
-      "seeAlso": [
-        "http://www.unicode.org/copyright.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Unlicense.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Unlicense.json",
-      "referenceNumber": 214,
-      "name": "The Unlicense",
-      "licenseId": "Unlicense",
-      "seeAlso": [
-        "https://unlicense.org/"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/UPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/UPL-1.0.json",
-      "referenceNumber": 73,
-      "name": "Universal Permissive License v1.0",
-      "licenseId": "UPL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/UPL"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Vim.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Vim.json",
-      "referenceNumber": 35,
-      "name": "Vim License",
-      "licenseId": "Vim",
-      "seeAlso": [
-        "http://vimdoc.sourceforge.net/htmldoc/uganda.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/VOSTROM.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/VOSTROM.json",
-      "referenceNumber": 400,
-      "name": "VOSTROM Public License for Open Source",
-      "licenseId": "VOSTROM",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/VOSTROM"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/VSL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/VSL-1.0.json",
-      "referenceNumber": 223,
-      "name": "Vovida Software License v1.0",
-      "licenseId": "VSL-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/VSL-1.0"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/W3C.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/W3C.json",
-      "referenceNumber": 164,
-      "name": "W3C Software Notice and License (2002-12-31)",
-      "licenseId": "W3C",
-      "seeAlso": [
-        "http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231.html",
-        "https://opensource.org/licenses/W3C"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/W3C-19980720.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/W3C-19980720.json",
-      "referenceNumber": 240,
-      "name": "W3C Software Notice and License (1998-07-20)",
-      "licenseId": "W3C-19980720",
-      "seeAlso": [
-        "http://www.w3.org/Consortium/Legal/copyright-software-19980720.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/W3C-20150513.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/W3C-20150513.json",
-      "referenceNumber": 22,
-      "name": "W3C Software Notice and Document License (2015-05-13)",
-      "licenseId": "W3C-20150513",
-      "seeAlso": [
-        "https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/w3m.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/w3m.json",
-      "referenceNumber": 279,
-      "name": "w3m License",
-      "licenseId": "w3m",
-      "seeAlso": [
-        "https://github.com/tats/w3m/blob/master/COPYING"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Watcom-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Watcom-1.0.json",
-      "referenceNumber": 416,
-      "name": "Sybase Open Watcom Public License 1.0",
-      "licenseId": "Watcom-1.0",
-      "seeAlso": [
-        "https://opensource.org/licenses/Watcom-1.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Wsuipa.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Wsuipa.json",
-      "referenceNumber": 152,
-      "name": "Wsuipa License",
-      "licenseId": "Wsuipa",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Wsuipa"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/WTFPL.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/WTFPL.json",
-      "referenceNumber": 32,
-      "name": "Do What The F*ck You Want To Public License",
-      "licenseId": "WTFPL",
-      "seeAlso": [
-        "http://www.wtfpl.net/about/",
-        "http://sam.zoy.org/wtfpl/COPYING"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/wxWindows.html",
-      "isDeprecatedLicenseId": true,
-      "detailsUrl": "https://spdx.org/licenses/wxWindows.json",
-      "referenceNumber": 452,
-      "name": "wxWindows Library License",
-      "licenseId": "wxWindows",
-      "seeAlso": [
-        "https://opensource.org/licenses/WXwindows"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/X11.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/X11.json",
-      "referenceNumber": 289,
-      "name": "X11 License",
-      "licenseId": "X11",
-      "seeAlso": [
-        "http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/X11-distribute-modifications-variant.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/X11-distribute-modifications-variant.json",
-      "referenceNumber": 351,
-      "name": "X11 License Distribution Modification Variant",
-      "licenseId": "X11-distribute-modifications-variant",
-      "seeAlso": [
-        "https://github.com/mirror/ncurses/blob/master/COPYING"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Xerox.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Xerox.json",
-      "referenceNumber": 158,
-      "name": "Xerox License",
-      "licenseId": "Xerox",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Xerox"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/XFree86-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/XFree86-1.1.json",
-      "referenceNumber": 449,
-      "name": "XFree86 License 1.1",
-      "licenseId": "XFree86-1.1",
-      "seeAlso": [
-        "http://www.xfree86.org/current/LICENSE4.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/xinetd.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/xinetd.json",
-      "referenceNumber": 118,
-      "name": "xinetd License",
-      "licenseId": "xinetd",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Xinetd_License"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/xlock.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/xlock.json",
-      "referenceNumber": 500,
-      "name": "xlock License",
-      "licenseId": "xlock",
-      "seeAlso": [
-        "https://fossies.org/linux/tiff/contrib/ras/ras2tif.c"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Xnet.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Xnet.json",
-      "referenceNumber": 266,
-      "name": "X.Net License",
-      "licenseId": "Xnet",
-      "seeAlso": [
-        "https://opensource.org/licenses/Xnet"
-      ],
-      "isOsiApproved": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/xpp.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/xpp.json",
-      "referenceNumber": 348,
-      "name": "XPP License",
-      "licenseId": "xpp",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/xpp"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/XSkat.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/XSkat.json",
-      "referenceNumber": 272,
-      "name": "XSkat License",
-      "licenseId": "XSkat",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/XSkat_License"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/YPL-1.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/YPL-1.0.json",
-      "referenceNumber": 430,
-      "name": "Yahoo! Public License v1.0",
-      "licenseId": "YPL-1.0",
-      "seeAlso": [
-        "http://www.zimbra.com/license/yahoo_public_license_1.0.html"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/YPL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/YPL-1.1.json",
-      "referenceNumber": 269,
-      "name": "Yahoo! Public License v1.1",
-      "licenseId": "YPL-1.1",
-      "seeAlso": [
-        "http://www.zimbra.com/license/yahoo_public_license_1.1.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Zed.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Zed.json",
-      "referenceNumber": 360,
-      "name": "Zed License",
-      "licenseId": "Zed",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/Zed"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Zend-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Zend-2.0.json",
-      "referenceNumber": 160,
-      "name": "Zend License v2.0",
-      "licenseId": "Zend-2.0",
-      "seeAlso": [
-        "https://web.archive.org/web/20130517195954/http://www.zend.com/license/2_00.txt"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Zimbra-1.3.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Zimbra-1.3.json",
-      "referenceNumber": 401,
-      "name": "Zimbra Public License v1.3",
-      "licenseId": "Zimbra-1.3",
-      "seeAlso": [
-        "http://web.archive.org/web/20100302225219/http://www.zimbra.com/license/zimbra-public-license-1-3.html"
-      ],
-      "isOsiApproved": false,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/Zimbra-1.4.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Zimbra-1.4.json",
-      "referenceNumber": 161,
-      "name": "Zimbra Public License v1.4",
-      "licenseId": "Zimbra-1.4",
-      "seeAlso": [
-        "http://www.zimbra.com/legal/zimbra-public-license-1-4"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/Zlib.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/Zlib.json",
-      "referenceNumber": 4,
-      "name": "zlib License",
-      "licenseId": "Zlib",
-      "seeAlso": [
-        "http://www.zlib.net/zlib_license.html",
-        "https://opensource.org/licenses/Zlib"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/zlib-acknowledgement.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/zlib-acknowledgement.json",
-      "referenceNumber": 398,
-      "name": "zlib/libpng License with Acknowledgement",
-      "licenseId": "zlib-acknowledgement",
-      "seeAlso": [
-        "https://fedoraproject.org/wiki/Licensing/ZlibWithAcknowledgement"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/ZPL-1.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ZPL-1.1.json",
-      "referenceNumber": 116,
-      "name": "Zope Public License 1.1",
-      "licenseId": "ZPL-1.1",
-      "seeAlso": [
-        "http://old.zope.org/Resources/License/ZPL-1.1"
-      ],
-      "isOsiApproved": false
-    },
-    {
-      "reference": "https://spdx.org/licenses/ZPL-2.0.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ZPL-2.0.json",
-      "referenceNumber": 248,
-      "name": "Zope Public License 2.0",
-      "licenseId": "ZPL-2.0",
-      "seeAlso": [
-        "http://old.zope.org/Resources/License/ZPL-2.0",
-        "https://opensource.org/licenses/ZPL-2.0"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    },
-    {
-      "reference": "https://spdx.org/licenses/ZPL-2.1.html",
-      "isDeprecatedLicenseId": false,
-      "detailsUrl": "https://spdx.org/licenses/ZPL-2.1.json",
-      "referenceNumber": 412,
-      "name": "Zope Public License 2.1",
-      "licenseId": "ZPL-2.1",
-      "seeAlso": [
-        "http://old.zope.org/Resources/ZPL/"
-      ],
-      "isOsiApproved": true,
-      "isFsfLibre": true
-    }
-  ],
-  "releaseDate": "2023-02-17"
-}
\ No newline at end of file
diff --git a/templates/SPDX.LicenseExceptionId.template.hs b/templates/SPDX.LicenseExceptionId.template.hs
index 99546f55f44..d18641c3768 100644
--- a/templates/SPDX.LicenseExceptionId.template.hs
+++ b/templates/SPDX.LicenseExceptionId.template.hs
@@ -28,7 +28,7 @@ import qualified Text.PrettyPrint as Disp
 -- LicenseExceptionId
 -------------------------------------------------------------------------------
 
--- | SPDX License Exceptions identifiers list v3.20
+-- | SPDX License Exceptions identifiers list v3.16
 data LicenseExceptionId
 {{ licenseIds }}
   deriving (Eq, Ord, Enum, Bounded, Show, Read, Typeable, Data, Generic)
@@ -98,10 +98,6 @@ licenseExceptionIdList LicenseListVersion_3_16 =
 {{licenseList_perv.v_3_16}}
     ++ bulkOfLicenses
 
-licenseExceptionIdList LicenseListVersion_3_20 =
-{{licenseList_perv.v_3_20}}
-    ++ bulkOfLicenses
-
 -- | Create a 'LicenseExceptionId' from a 'String'.
 mkLicenseExceptionId :: LicenseListVersion -> String -> Maybe LicenseExceptionId
 mkLicenseExceptionId LicenseListVersion_3_0  s = Map.lookup s stringLookup_3_0
@@ -110,7 +106,6 @@ mkLicenseExceptionId LicenseListVersion_3_6  s = Map.lookup s stringLookup_3_6
 mkLicenseExceptionId LicenseListVersion_3_9  s = Map.lookup s stringLookup_3_9
 mkLicenseExceptionId LicenseListVersion_3_10 s = Map.lookup s stringLookup_3_10
 mkLicenseExceptionId LicenseListVersion_3_16 s = Map.lookup s stringLookup_3_16
-mkLicenseExceptionId LicenseListVersion_3_20 s = Map.lookup s stringLookup_3_20
 
 stringLookup_3_0 :: Map String LicenseExceptionId
 stringLookup_3_0 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
@@ -136,10 +131,6 @@ stringLookup_3_16 :: Map String LicenseExceptionId
 stringLookup_3_16 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
     licenseExceptionIdList LicenseListVersion_3_16
 
-stringLookup_3_20 :: Map String LicenseExceptionId
-stringLookup_3_20 = Map.fromList $ map (\i -> (licenseExceptionId i, i)) $
-    licenseExceptionIdList LicenseListVersion_3_20
-
 --  | License exceptions in all SPDX License lists
 bulkOfLicenses :: [LicenseExceptionId]
 bulkOfLicenses =
diff --git a/templates/SPDX.LicenseId.template.hs b/templates/SPDX.LicenseId.template.hs
index d84cbf423b8..9aa5d2c1737 100644
--- a/templates/SPDX.LicenseId.template.hs
+++ b/templates/SPDX.LicenseId.template.hs
@@ -31,7 +31,7 @@ import qualified Text.PrettyPrint as Disp
 -- LicenseId
 -------------------------------------------------------------------------------
 
--- | SPDX License identifiers list v3.20
+-- | SPDX License identifiers list v3.16
 data LicenseId
 {{ licenseIds }}
   deriving (Eq, Ord, Enum, Bounded, Show, Read, Typeable, Data)
@@ -174,9 +174,6 @@ licenseIdList LicenseListVersion_3_10 =
 licenseIdList LicenseListVersion_3_16 =
 {{licenseList_perv.v_3_16}}
     ++ bulkOfLicenses
-licenseIdList LicenseListVersion_3_20 =
-{{licenseList_perv.v_3_20}}
-    ++ bulkOfLicenses
 
 -- | Create a 'LicenseId' from a 'String'.
 mkLicenseId :: LicenseListVersion -> String -> Maybe LicenseId
@@ -186,7 +183,6 @@ mkLicenseId LicenseListVersion_3_6  s = Map.lookup s stringLookup_3_6
 mkLicenseId LicenseListVersion_3_9  s = Map.lookup s stringLookup_3_9
 mkLicenseId LicenseListVersion_3_10 s = Map.lookup s stringLookup_3_10
 mkLicenseId LicenseListVersion_3_16 s = Map.lookup s stringLookup_3_16
-mkLicenseId LicenseListVersion_3_20 s = Map.lookup s stringLookup_3_20
 
 stringLookup_3_0 :: Map String LicenseId
 stringLookup_3_0 = Map.fromList $ map (\i -> (licenseId i, i)) $
@@ -212,10 +208,6 @@ stringLookup_3_16 :: Map String LicenseId
 stringLookup_3_16 = Map.fromList $ map (\i -> (licenseId i, i)) $
     licenseIdList LicenseListVersion_3_16
 
-stringLookup_3_20 :: Map String LicenseId
-stringLookup_3_20 = Map.fromList $ map (\i -> (licenseId i, i)) $
-    licenseIdList LicenseListVersion_3_20
-
 --  | Licenses in all SPDX License lists
 bulkOfLicenses :: [LicenseId]
 bulkOfLicenses =

From 4712f85b0cd96a14059c8dc2aa1611b19fac4ad1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Wed, 20 Sep 2023 09:41:44 +0200
Subject: [PATCH 087/144] Revert "Add the ExtendedLiterals extension (backport
 of #8992)" (#9260)

---
 Cabal-syntax/src/Language/Haskell/Extension.hs         |  5 +----
 .../tests/UnitTests/Distribution/Utils/Structured.hs   |  4 ++--
 changelog.d/pr-8992                                    | 10 ----------
 editors/vim/syntax/cabal.vim                           |  4 ----
 4 files changed, 3 insertions(+), 20 deletions(-)
 delete mode 100644 changelog.d/pr-8992

diff --git a/Cabal-syntax/src/Language/Haskell/Extension.hs b/Cabal-syntax/src/Language/Haskell/Extension.hs
index d746819f087..b7adc1c7e7e 100644
--- a/Cabal-syntax/src/Language/Haskell/Extension.hs
+++ b/Cabal-syntax/src/Language/Haskell/Extension.hs
@@ -92,7 +92,7 @@ classifyLanguage = \str -> case lookup str langTable of
 
 -- Note: if you add a new 'KnownExtension':
 --
--- * also add it to the Distribution.Simple.X.compilerExtensions lists
+-- * also add it to the Distribution.Simple.X.languageExtensions lists
 --   (where X is each compiler: GHC, UHC, HaskellSuite)
 --
 -- | This represents language extensions beyond a base 'Language' definition
@@ -677,9 +677,6 @@ data KnownExtension =
   -- | Enable data types for which an unlifted or levity-polymorphic result kind is inferred.
   | UnliftedDatatypes
 
-  -- | Enable syntax for primitive numeric literals, e.g. @3#Int8@
-  | ExtendedLiterals
-
   -- | Undocumented parsing-related extensions introduced in GHC 7.0.
   | AlternativeLayoutRule
 
diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
index 2dc84db4237..7d68bb251de 100644
--- a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
+++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
@@ -27,9 +27,9 @@ tests = testGroup "Distribution.Utils.Structured"
     -- The difference is in encoding of newtypes
 #if MIN_VERSION_base(4,7,0)
     , testCase "GenericPackageDescription" $
-      md5Check (Proxy :: Proxy GenericPackageDescription) 0x8d8f340f10a58b8d8a87bf42213dac89
+      md5Check (Proxy :: Proxy GenericPackageDescription) 0xa3e9433662ecf0c7a3c26f6d75a53ba1
     , testCase "LocalBuildInfo" $
-      md5Check (Proxy :: Proxy LocalBuildInfo) 0x618ab257e99d0b21c617e1f8c39a5a4b
+      md5Check (Proxy :: Proxy LocalBuildInfo) 0x91ffcd61bbd83525e8edba877435a031
 #endif
     ]
 
diff --git a/changelog.d/pr-8992 b/changelog.d/pr-8992
deleted file mode 100644
index ef74800c430..00000000000
--- a/changelog.d/pr-8992
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: Add language extension ExtendedLiterals
-packages: Cabal-syntax
-prs: #8992
-significance: significant
-
-description: {
-
-- adds support for the ExtendedLiterals language extension (GHC proposal #451)
-
-}
diff --git a/editors/vim/syntax/cabal.vim b/editors/vim/syntax/cabal.vim
index bcd80a7fb7e..1fc84f4d8af 100644
--- a/editors/vim/syntax/cabal.vim
+++ b/editors/vim/syntax/cabal.vim
@@ -182,7 +182,6 @@ syn keyword cabalExtension contained
   \ ExplicitNamespaces
   \ ExtendedDefaultRules
   \ ExtensibleRecords
-  \ ExtendedLiterals
   \ FieldSelectors
   \ FlexibleContexts
   \ FlexibleInstances
@@ -300,7 +299,6 @@ syn keyword cabalExtension contained
   \ NoDataKinds
   \ NoDatatypeContexts
   \ NoDefaultSignatures
-  \ NoDeepSubsumption
   \ NoDeriveAnyClass
   \ NoDeriveDataTypeable
   \ NoDeriveFoldable
@@ -321,7 +319,6 @@ syn keyword cabalExtension contained
   \ NoExplicitForAll
   \ NoExplicitNamespaces
   \ NoExtendedDefaultRules
-  \ NoExtendedLiterals
   \ NoExtensibleRecords
   \ NoFieldSelectors
   \ NoFlexibleContexts
@@ -409,7 +406,6 @@ syn keyword cabalExtension contained
   \ NoTransformListComp
   \ NoTupleSections
   \ NoTypeApplications
-  \ NoTypeData
   \ NoTypeFamilies
   \ NoTypeFamilyDependencies
   \ NoTypeInType

From de8a79f0d7d0634dcaa894ee7b1d4b992c58799e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Wed, 20 Sep 2023 23:25:36 +0200
Subject: [PATCH 088/144] Remove ExtendedLiterals from changelog for 3.10.2.0
 (#9279)

---
 release-notes/Cabal-3.10.2.0.md | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/release-notes/Cabal-3.10.2.0.md b/release-notes/Cabal-3.10.2.0.md
index 5471aa2f12e..0c60f7ff239 100644
--- a/release-notes/Cabal-3.10.2.0.md
+++ b/release-notes/Cabal-3.10.2.0.md
@@ -20,10 +20,6 @@ Cabal and Cabal-syntax 3.10.2.0 changelog and release notes
   which had a separate bug (fixed in later versions but not backported) when
   Haddock does not pass `--quickjump` recursively to the package dependencies.
 
-- Add language extension ExtendedLiterals [#8992](https://github.com/haskell/cabal/pull/8992)
-
-  - adds support for the ExtendedLiterals language extension (GHC proposal #451)
-
 - Regenerate Lexer.hs to avoid out-of-bound array access due to a bug in Alex [#8892](https://github.com/haskell/cabal/issues/8892) [#8896](https://github.com/haskell/cabal/pull/8896)
 
   - Regenerate Cabal-syntax's Lexer.hs with Alex 3.2.7.3 which includes a fix for

From 15a0010461c3d181f30fbbf5980bf75945d6df2a Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Fri, 22 Sep 2023 23:51:09 +0200
Subject: [PATCH 089/144] Fix overzealous warnOnTwoConfigs (backport #9278)
 (#9283)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Bodigrim <andrew.lelechenko@gmail.com>
Co-authored-by: Hécate Moonlight <Kleidukos@users.noreply.github.com>
---
 .../src/Distribution/Client/Config.hs         | 22 +++++++++++--------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/cabal-install/src/Distribution/Client/Config.hs b/cabal-install/src/Distribution/Client/Config.hs
index a352054aeec..d9019ea8a36 100644
--- a/cabal-install/src/Distribution/Client/Config.hs
+++ b/cabal-install/src/Distribution/Client/Config.hs
@@ -595,15 +595,19 @@ initialSavedConfig = do
 warnOnTwoConfigs :: Verbosity -> IO ()
 warnOnTwoConfigs verbosity = do
   defaultDir <- getAppUserDataDirectory "cabal"
-  dotCabalExists <- doesDirectoryExist defaultDir
-  xdgCfg <- getXdgDirectory XdgConfig ("cabal" </> "config")
-  xdgCfgExists <- doesFileExist xdgCfg
-  when (dotCabalExists && xdgCfgExists) $
-    warn verbosity $
-    "Both " <> defaultDir <>
-    " and " <> xdgCfg <>
-    " exist - ignoring the former.\n" <>
-    "It is advisable to remove one of them. In that case, we will use the remaining one by default (unless '$CABAL_DIR' is explicitly set)."
+  xdgCfgDir <- getXdgDirectory XdgConfig "cabal"
+  when (defaultDir /= xdgCfgDir) $ do
+    dotCabalExists <- doesDirectoryExist defaultDir
+    let xdgCfg = xdgCfgDir </> "config"
+    xdgCfgExists <- doesFileExist xdgCfg
+    when (dotCabalExists && xdgCfgExists) $
+      warn verbosity $
+        "Both "
+          <> defaultDir
+          <> " and "
+          <> xdgCfg
+          <> " exist - ignoring the former.\n"
+          <> "It is advisable to remove one of them. In that case, we will use the remaining one by default (unless '$CABAL_DIR' is explicitly set)."
 
 -- | If @CABAL\_DIR@ is set, return @Just@ its value. Otherwise, if
 -- @~/.cabal@ exists and @$XDG_CONFIG_HOME/cabal/config@ does not

From e2cc06620e05e98b20ee5f1855563113ad65f6d5 Mon Sep 17 00:00:00 2001
From: Hamish Mackenzie <Hamish.K.Mackenzie@googlemail.com>
Date: Wed, 4 Oct 2023 21:25:42 +1300
Subject: [PATCH 090/144] Relax extension `.c` requirement for c-sources
 (#9285)

---
 Cabal/src/Distribution/Simple/GHC.hs          | 45 ++++++++++---------
 .../CSourcesSanitisation/build.out            | 23 ++++++++--
 .../CSourcesSanitisation/cbits/gwinsz.cc      |  0
 .../CSourcesSanitisation/repro.cabal          | 11 +++++
 4 files changed, 56 insertions(+), 23 deletions(-)
 create mode 100644 cabal-testsuite/PackageTests/CSourcesSanitisation/cbits/gwinsz.cc

diff --git a/Cabal/src/Distribution/Simple/GHC.hs b/Cabal/src/Distribution/Simple/GHC.hs
index 4387da26369..9d653f85829 100644
--- a/Cabal/src/Distribution/Simple/GHC.hs
+++ b/Cabal/src/Distribution/Simple/GHC.hs
@@ -705,19 +705,12 @@ buildOrReplLib mReplFlags verbosity numJobs pkg_descr lbi lib clbi = do
       | filename <- cxxSources libBi]
 
   -- build any C sources
-  let (cSrcs', others) = partition (\filepath -> ".c"`isSuffixOf` filepath) (cSources libBi)
+  let libraryName = case libName lib of
+          LMainLibName -> "the main library"
+          LSubLibName name -> "library " <> prettyShow name
+  cSrcs' <- checkCSources verbosity libraryName (cSources libBi)
   unless (not has_code || null cSrcs') $ do
     info verbosity "Building C Sources..."
-    unless (null others) $ do
-      let files = intercalate ", " others
-      let libraryName = case libName lib of
-            LMainLibName -> "the main library"
-            LSubLibName name -> "library " <> prettyShow name
-      warn verbosity $ unlines
-        [ "The following files listed in " <> libraryName <> "'s c-sources will not be used: " <> files <> "."
-        , "Header files should be in the 'include' or 'install-include' stanza."
-        , "See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-includes"
-        ]
     forM_ cSrcs' $ \filename -> do
        let baseCcOpts    = Internal.componentCcGhcOptions verbosity implInfo
                            lbi libBi clbi relLibTargetDir filename
@@ -1537,17 +1530,9 @@ gbuild verbosity numJobs pkg_descr lbi bm clbi = do
      | filename <- cxxSrcs ]
 
   -- build any C sources
-  let (cSrcs', others) = partition (\filepath -> ".c"`isSuffixOf` filepath) cSrcs
+  cSrcs' <- checkCSources verbosity (gbuildName bm) cSrcs
   unless (null cSrcs') $ do
     info verbosity "Building C Sources..."
-    unless (null others) $ do
-      let files = intercalate ", " others
-      let currentComponentName = gbuildName bm
-      warn verbosity $ unlines
-        [ "The following files listed in " <> currentComponentName <> "'s c-sources will not be used: " <> files <> "."
-        , "Header files should be in the 'include' or 'install-include' stanza."
-        , "See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-includes"
-        ]
     forM_ cSrcs' $ \filename -> do
       let baseCcOpts    = Internal.componentCcGhcOptions verbosity implInfo
                               lbi bnfo clbi tmpDir filename
@@ -2184,3 +2169,23 @@ supportsDynamicToo = Internal.ghcLookupProperty "Support dynamic-too"
 
 withExt :: FilePath -> String -> FilePath
 withExt fp ext = fp <.> if takeExtension fp /= ('.':ext) then ext else ""
+
+checkCSources :: Verbosity -> String -> [String] -> IO [String]
+checkCSources verbosity name cSrcs = do
+  let (headers, cSrcs') = partition (\filepath -> ".h" `isSuffixOf` filepath) cSrcs
+      others = filter (\filepath -> not (".c" `isSuffixOf` filepath)) cSrcs'
+  unless (null headers) $ do
+    let files = intercalate ", " headers
+    warn verbosity $ unlines
+      [ "The following header files listed in " <> name <> "'s c-sources will not be used: " <> files <> "."
+      , "Header files should be in the 'include' or 'install-include' stanza."
+      , "See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-includes"
+      ]
+  unless (null others) $ do
+    let files = intercalate ", " others
+    warn verbosity $ unlines
+      [ "The following files listed in " <> name <> "'s c-sources do not have the expected '.c' extension " <> files <> "."
+      , "C++ files should be in the 'cxx-sources' stanza."
+      , "See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-cxx-sources"
+      ]
+  return cSrcs'
diff --git a/cabal-testsuite/PackageTests/CSourcesSanitisation/build.out b/cabal-testsuite/PackageTests/CSourcesSanitisation/build.out
index 1e423a54cb9..c66b5962369 100644
--- a/cabal-testsuite/PackageTests/CSourcesSanitisation/build.out
+++ b/cabal-testsuite/PackageTests/CSourcesSanitisation/build.out
@@ -5,21 +5,38 @@ In order, the following will be built:
  - repro-0.1.0.0 (lib) (first run)
  - repro-0.1.0.0 (exe:exec1) (first run)
  - repro-0.1.0.0 (lib:lib2) (first run)
+ - repro-0.1.0.0 (lib:lib3) (first run)
+ - repro-0.1.0.0 (lib:lib4) (first run)
 Configuring library for repro-0.1.0.0..
 Preprocessing library for repro-0.1.0.0..
 Building library for repro-0.1.0.0..
-Warning: The following files listed in the main library's c-sources will not be used: cbits/gwinsz.h.
+Warning: The following header files listed in the main library's c-sources will not be used: cbits/gwinsz.h.
 Header files should be in the 'include' or 'install-include' stanza.
 See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-includes
 Configuring executable 'exec1' for repro-0.1.0.0..
 Preprocessing executable 'exec1' for repro-0.1.0.0..
 Building executable 'exec1' for repro-0.1.0.0..
-Warning: The following files listed in exec1's c-sources will not be used: cbits/gwinsz.h.
+Warning: The following header files listed in exec1's c-sources will not be used: cbits/gwinsz.h.
 Header files should be in the 'include' or 'install-include' stanza.
 See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-includes
 Configuring library 'lib2' for repro-0.1.0.0..
 Preprocessing library 'lib2' for repro-0.1.0.0..
 Building library 'lib2' for repro-0.1.0.0..
-Warning: The following files listed in library lib2's c-sources will not be used: cbits/gwinsz.h.
+Warning: The following header files listed in library lib2's c-sources will not be used: cbits/gwinsz.h.
 Header files should be in the 'include' or 'install-include' stanza.
 See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-includes
+Configuring library 'lib3' for repro-0.1.0.0..
+Preprocessing library 'lib3' for repro-0.1.0.0..
+Building library 'lib3' for repro-0.1.0.0..
+Warning: The following header files listed in library lib3's c-sources will not be used: cbits/gwinsz.h.
+Header files should be in the 'include' or 'install-include' stanza.
+See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-includes
+Warning: The following files listed in library lib3's c-sources do not have the expected '.c' extension cbits/gwinsz.cc.
+C++ files should be in the 'cxx-sources' stanza.
+See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-cxx-sources
+Configuring library 'lib4' for repro-0.1.0.0..
+Preprocessing library 'lib4' for repro-0.1.0.0..
+Building library 'lib4' for repro-0.1.0.0..
+Warning: The following files listed in library lib4's c-sources do not have the expected '.c' extension cbits/gwinsz.cc.
+C++ files should be in the 'cxx-sources' stanza.
+See https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-cxx-sources
diff --git a/cabal-testsuite/PackageTests/CSourcesSanitisation/cbits/gwinsz.cc b/cabal-testsuite/PackageTests/CSourcesSanitisation/cbits/gwinsz.cc
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/cabal-testsuite/PackageTests/CSourcesSanitisation/repro.cabal b/cabal-testsuite/PackageTests/CSourcesSanitisation/repro.cabal
index 659f1510a7e..1cf6d295fb4 100644
--- a/cabal-testsuite/PackageTests/CSourcesSanitisation/repro.cabal
+++ b/cabal-testsuite/PackageTests/CSourcesSanitisation/repro.cabal
@@ -15,6 +15,17 @@ library lib2
                       cbits/gwinsz.c
     build-depends:    base
 
+library lib3
+    default-language: Haskell2010
+    c-sources:        cbits/gwinsz.h
+                      cbits/gwinsz.cc
+    build-depends:    base
+
+library lib4
+    default-language: Haskell2010
+    c-sources:        cbits/gwinsz.cc
+    build-depends:    base
+
 executable exec1
     main-is: Main.hs
     default-language: Haskell2010

From 0f2350c1179b5f3b320fd28514d46b606276610d Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Thu, 5 Oct 2023 19:22:37 +0200
Subject: [PATCH 091/144] Bump base in cabal-dev-scripts.cabal (backport #9303)
 (#9311)

* Bump base in cabal-dev-scripts.cabal

Bump base in cabal-dev-scripts.cabal. We are now using GHC 9.4.7 in CI, which ships with base 4.17.2.0. I am bumping all the way to <4.19 after testing everything compiles with GHC 9.6.3 (base-4.18.1.0).

(cherry picked from commit 033e8e04e17b67630ce8362dc067ad2fcd16cec6)

* Avoid OverloadedStrings when it causes troubles

(cherry picked from commit dc08acb9cad0d900fe48da520dedf2a8b5fc9702)

# Conflicts:
#	Cabal-syntax/src/Distribution/Fields/Parser.hs

* doctest: provide a separate project file without -Werror (fix #9307)

This became necessary after an upgrade to GHC 9.4, which, apparently,
has a subtle change in how -W/-w-related things get interpreted.

(cherry picked from commit ccce7c3bfb709378bb708336f660d5615f078041)

* fixup! resolve a conflict

---------

Co-authored-by: Andrea Bedini <andrea.bedini@tweag.io>
Co-authored-by: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
---
 .../src/Distribution/Fields/Parser.hs         |  3 +++
 .../src/Distribution/InstalledPackageInfo.hs  |  5 +---
 .../src/Distribution/Types/Dependency.hs      |  8 +++----
 Makefile                                      |  4 ++--
 cabal-dev-scripts/cabal-dev-scripts.cabal     |  4 ++--
 cabal.project.doctest                         | 24 +++++++++++++++++++
 6 files changed, 36 insertions(+), 12 deletions(-)
 create mode 100644 cabal.project.doctest

diff --git a/Cabal-syntax/src/Distribution/Fields/Parser.hs b/Cabal-syntax/src/Distribution/Fields/Parser.hs
index 9061117b04e..a72ac35a9e1 100644
--- a/Cabal-syntax/src/Distribution/Fields/Parser.hs
+++ b/Cabal-syntax/src/Distribution/Fields/Parser.hs
@@ -47,6 +47,9 @@ import qualified Data.Text.Encoding       as T
 import qualified Data.Text.Encoding.Error as T
 #endif
 
+-- $setup
+-- >>> import Data.Either (isLeft)
+
 -- | The 'LexState'' (with a prime) is an instance of parsec's 'Stream'
 -- wrapped around lexer's 'LexState' (without a prime)
 data LexState' = LexState' !LexState (LToken, LexState')
diff --git a/Cabal-syntax/src/Distribution/InstalledPackageInfo.hs b/Cabal-syntax/src/Distribution/InstalledPackageInfo.hs
index 54a3fed6fc1..6e4bd785335 100644
--- a/Cabal-syntax/src/Distribution/InstalledPackageInfo.hs
+++ b/Cabal-syntax/src/Distribution/InstalledPackageInfo.hs
@@ -62,9 +62,6 @@ import qualified Text.PrettyPrint    as Disp
 import Distribution.Types.InstalledPackageInfo
 import Distribution.Types.InstalledPackageInfo.FieldGrammar
 
--- $setup
--- >>> :set -XOverloadedStrings
-
 installedComponentId :: InstalledPackageInfo -> ComponentId
 installedComponentId ipi =
     case unComponentId (installedComponentId_ ipi) of
@@ -127,7 +124,7 @@ showFullInstalledPackageInfo = P.showFields (const NoComment) . prettyFieldGramm
 
 -- |
 --
--- >>> let ipi = emptyInstalledPackageInfo { maintainer = "Tester" }
+-- >>> let ipi = emptyInstalledPackageInfo { maintainer = fromString "Tester" }
 -- >>> fmap ($ ipi) $ showInstalledPackageInfoField "maintainer"
 -- Just "maintainer: Tester"
 showInstalledPackageInfoField :: String -> Maybe (InstalledPackageInfo -> String)
diff --git a/Cabal-syntax/src/Distribution/Types/Dependency.hs b/Cabal-syntax/src/Distribution/Types/Dependency.hs
index bfdc78cd06d..74fde6398ae 100644
--- a/Cabal-syntax/src/Distribution/Types/Dependency.hs
+++ b/Cabal-syntax/src/Distribution/Types/Dependency.hs
@@ -77,16 +77,16 @@ instance NFData Dependency where rnf = genericRnf
 
 -- |
 --
--- >>> prettyShow $ Dependency "pkg" anyVersion mainLibSet
+-- >>> prettyShow $ Dependency (mkPackageName "pkg") anyVersion mainLibSet
 -- "pkg"
 --
--- >>> prettyShow $ Dependency "pkg" anyVersion $ NES.insert (LSubLibName "sublib") mainLibSet
+-- >>> prettyShow $ Dependency (mkPackageName "pkg") anyVersion $ NES.insert (LSubLibName $ mkUnqualComponentName "sublib") mainLibSet
 -- "pkg:{pkg, sublib}"
 --
--- >>> prettyShow $ Dependency "pkg" anyVersion $ NES.singleton (LSubLibName "sublib")
+-- >>> prettyShow $ Dependency (mkPackageName "pkg") anyVersion $ NES.singleton (LSubLibName $ mkUnqualComponentName "sublib")
 -- "pkg:sublib"
 --
--- >>> prettyShow $ Dependency "pkg" anyVersion $ NES.insert (LSubLibName "sublib-b") $ NES.singleton (LSubLibName "sublib-a")
+-- >>> prettyShow $ Dependency (mkPackageName "pkg") anyVersion $ NES.insert (LSubLibName $ mkUnqualComponentName "sublib-b") $ NES.singleton (LSubLibName $ mkUnqualComponentName "sublib-a")
 -- "pkg:{sublib-a, sublib-b}"
 --
 instance Pretty Dependency where
diff --git a/Makefile b/Makefile
index 40f213eb49e..3e6a43fed68 100644
--- a/Makefile
+++ b/Makefile
@@ -81,8 +81,8 @@ ghcid-cli :
 #       https://github.com/haskell/cabal/issues/8734
 #       Just as well, cabal-install(-solver) doctests (the target below) bitrotted and need some care.
 doctest :
-	cabal repl --with-ghc=doctest --build-depends=QuickCheck --build-depends=template-haskell --repl-options="-w" --project-file="cabal.project.validate" Cabal-syntax
-	cabal repl --with-ghc=doctest --build-depends=QuickCheck --build-depends=template-haskell --repl-options="-w" --project-file="cabal.project.validate" Cabal
+	cabal repl --with-ghc=doctest --build-depends=QuickCheck --build-depends=template-haskell --repl-options="-w" --project-file="cabal.project.doctest" Cabal-syntax
+	cabal repl --with-ghc=doctest --build-depends=QuickCheck --build-depends=template-haskell --repl-options="-w" --project-file="cabal.project.doctest" Cabal
 
 
 # This is not run as part of validate.sh (we need hackage-security, which is tricky to get).
diff --git a/cabal-dev-scripts/cabal-dev-scripts.cabal b/cabal-dev-scripts/cabal-dev-scripts.cabal
index dcf40f84371..24e160eaa92 100644
--- a/cabal-dev-scripts/cabal-dev-scripts.cabal
+++ b/cabal-dev-scripts/cabal-dev-scripts.cabal
@@ -18,7 +18,7 @@ executable gen-spdx
   ghc-options:      -Wall
   build-depends:
     , aeson                 ^>=1.4.1.0 || ^>=1.5.2.0 || ^>=2.1.1.0
-    , base                  >=4.10     && <4.17
+    , base                  >=4.10     && <4.19
     , bytestring
     , containers
     , Diff                  ^>=0.4
@@ -35,7 +35,7 @@ executable gen-spdx-exc
   ghc-options:      -Wall
   build-depends:
     , aeson                 ^>=1.4.1.0 || ^>=1.5.2.0 || ^>=2.1.1.0
-    , base                  >=4.10     && <4.17
+    , base                  >=4.10     && <4.19
     , bytestring
     , containers
     , Diff                  ^>=0.4
diff --git a/cabal.project.doctest b/cabal.project.doctest
new file mode 100644
index 00000000000..dac9b0d88a9
--- /dev/null
+++ b/cabal.project.doctest
@@ -0,0 +1,24 @@
+packages: Cabal-syntax/
+packages: Cabal/
+packages: cabal-testsuite/
+packages: cabal-install/
+packages: solver-benchmarks/
+
+packages: cabal-install-solver/
+packages: Cabal-QuickCheck/
+packages: Cabal-tree-diff
+packages: Cabal-described
+packages: Cabal-tests
+packages: cabal-benchmarks
+
+tests: True
+
+-- avoiding extra dependencies
+constraints: rere -rere-cfg
+constraints: these -assoc
+
+write-ghc-environment-files: never
+
+program-options
+  ghc-options: -fno-ignore-asserts
+

From ef03eec437b0527d30617e2eef364e620bc20ae7 Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Wed, 18 Oct 2023 09:49:36 +0200
Subject: [PATCH 092/144] Release CI: fixes and improvements (backport #9348)
 (#9349)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Bryan Richter <bryan@haskell.foundation>
Co-authored-by: brandon s allbery kf8nh <allbery.b@gmail.com>
Co-authored-by: Hécate Moonlight <hecate+github@glitchbra.in>
fixes and improvements (#9348)
Fixes #9304
Fixes #9312
Resolves #9347
---
 .github/mergify.yml   | 17 +++++++++++++++++
 .gitlab-ci.yml        | 14 +++++++++++---
 .gitlab/ci.sh         |  3 +++
 .readthedocs.yml      |  6 +++++-
 cabal.project.release |  1 +
 5 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/.github/mergify.yml b/.github/mergify.yml
index 7969fe95c25..94eb5d825c3 100644
--- a/.github/mergify.yml
+++ b/.github/mergify.yml
@@ -57,6 +57,23 @@ pull_request_rules:
       - label=merge me
       - base!=master
       - body~=backport
+      - label=merge delay passed
+      - '#approved-reviews-by>=1'
+
+  # merge+squash strategy for backports: require 1 approver instead of 2
+  - actions:
+      queue:
+        name: default
+        method: squash
+        # both update methods get absorbed by the squash, so we use the most
+        # reliable
+        update_method: merge
+    name: Put pull requests in the squash+merge queue
+    conditions:
+      - label=merge me
+      - base!=master
+      - body~=backport
+      - label=merge delay passed
       - '#approved-reviews-by>=1'
 
   # backports should be labeled as such
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b9718af9e77..4fdf3ed5204 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -59,16 +59,24 @@ build-linux:
     TARBALL_EXT: tar.xz
     ADD_CABAL_ARGS: "--enable-split-sections"
 
-build-x86_64-linux-alpine:
+build-linux-alpine:
   extends: .build
+  parallel:
+    matrix:
+      - ARCH: i386
+        OS: [alpine3_12]
+        GHC_VERSION: 9.0.2
+      - ARCH: x86_64
+        OS: [alpine3_12]
   tags:
     - x86_64-linux
   before_script:
     # for cabal build
     - sudo apk add --no-cache zlib zlib-dev zlib-static
-  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_12:$DOCKER_REV"
+  image: "registry.gitlab.haskell.org/ghc/ci-images/$PLATFORM:$DOCKER_REV"
   variables:
-    TARBALL_ARCHIVE_SUFFIX: x86_64-linux-alpine
+    PLATFORM: "${ARCH}-linux-${OS}"
+    TARBALL_ARCHIVE_SUFFIX: $PLATFORM
     TARBALL_EXT: tar.xz
     ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"
 
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index b0a68079586..c856f9f2cb9 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -27,6 +27,8 @@ export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
 export BOOTSTRAP_HASKELL_GHC_VERSION=$GHC_VERSION
 export BOOTSTRAP_HASKELL_CABAL_VERSION=$CABAL_INSTALL_VERSION
 export BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=yes
+# We don't use stack, and it isn't available on i386-deb9
+export BOOTSTRAP_HASKELL_INSTALL_NO_STACK=yes
 
 # for some reason the subshell doesn't pick up the arm64 environment on darwin
 # and starts installing x86_64 GHC
@@ -63,6 +65,7 @@ args=(
     ${ADD_CABAL_ARGS}
 )
 
+run cabal update hackage.haskell.org,HEAD
 run cabal v2-build ${args[@]} cabal-install
 
 mkdir "$CI_PROJECT_DIR/out"
diff --git a/.readthedocs.yml b/.readthedocs.yml
index 347901d93bd..016f7e47a48 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -3,7 +3,11 @@ version: 2
 sphinx:
   configuration: doc/conf.py
 
+build:
+  os: "ubuntu-22.04"
+  tools:
+    python: "3.8"
+
 python:
-  version: 3.7
   install:
     - requirements: doc/requirements.txt
diff --git a/cabal.project.release b/cabal.project.release
index 1f50c83e324..8d171824287 100644
--- a/cabal.project.release
+++ b/cabal.project.release
@@ -5,3 +5,4 @@ packages: cabal-install/
 tests: False
 benchmarks: False
 optimization: True
+index-state: hackage.haskell.org 2023-10-13T10:16:13Z

From e10b778b424a288b0951c2ac93c6eb6d9a67eb15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Wed, 18 Oct 2023 16:21:22 +0200
Subject: [PATCH 093/144] Release Cabal-3.10.2.1 (#9350)

---
 Cabal/Cabal.cabal                     | 2 +-
 Cabal/ChangeLog.md                    | 3 +++
 Cabal/Makefile                        | 2 +-
 bootstrap/cabal-bootstrap-gen.cabal   | 2 +-
 bootstrap/linux-8.10.7.json           | 6 +++---
 bootstrap/linux-9.0.2.json            | 6 +++---
 bootstrap/linux-9.2.8.json            | 6 +++---
 bootstrap/linux-9.4.5.json            | 6 +++---
 cabal-testsuite/cabal-testsuite.cabal | 4 ++--
 doc/conf.py                           | 2 +-
 release-notes/Cabal-3.10.2.1.md       | 9 +++++++++
 11 files changed, 30 insertions(+), 18 deletions(-)
 create mode 100644 release-notes/Cabal-3.10.2.1.md

diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index b669cf7092b..9bf2bf1e510 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal
-version:       3.10.2.0
+version:       3.10.2.1
 copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
diff --git a/Cabal/ChangeLog.md b/Cabal/ChangeLog.md
index fd928c4de23..53bbfa768f0 100644
--- a/Cabal/ChangeLog.md
+++ b/Cabal/ChangeLog.md
@@ -1,3 +1,6 @@
+# 3.10.2.1 [Hécate] (mailto:hecate+github@glitchbra.in) October 2023
+* See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.2.1.md
+
 # 3.10.2.0 [Hécate](mailto:hecate+github@glitchbra.in) August 2023
 * See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.2.0.md
 
diff --git a/Cabal/Makefile b/Cabal/Makefile
index a76edf6206e..7c85b735a4c 100644
--- a/Cabal/Makefile
+++ b/Cabal/Makefile
@@ -1,4 +1,4 @@
-VERSION=3.10.2.0
+VERSION=3.10.2.1
 
 #KIND=devel
 KIND=rc
diff --git a/bootstrap/cabal-bootstrap-gen.cabal b/bootstrap/cabal-bootstrap-gen.cabal
index 7fa4c3149a1..df75818beaa 100644
--- a/bootstrap/cabal-bootstrap-gen.cabal
+++ b/bootstrap/cabal-bootstrap-gen.cabal
@@ -11,7 +11,7 @@ executable cabal-bootstrap-gen
     , aeson                  ^>=1.5.2.0  || ^>=2.0.3.0 || ^>=2.1.0.0
     , base                   ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0 || ^>=4.15.0.0 || ^>=4.16.0.0 || ^>=4.17.0.0
     , bytestring             ^>=0.10.8.2 || ^>=0.11.0.0
-    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0 || ^>=3.8.1.0 || ^>=3.10.2.0
+    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0 || ^>=3.8.1.0 || ^>=3.10.2.1
     , Cabal-syntax           ^>=3.8.1.0 || ^>=3.10.2.0
     , cabal-install-parsers  ^>=0.3.0.1  || ^>=0.4.5 || ^>=0.6
     , cabal-plan             ^>=0.7.0.0
diff --git a/bootstrap/linux-8.10.7.json b/bootstrap/linux-8.10.7.json
index 87d0aeb21a5..f40dc2263ca 100644
--- a/bootstrap/linux-8.10.7.json
+++ b/bootstrap/linux-8.10.7.json
@@ -102,7 +102,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.0"
+            "version": "3.10.2.1"
         },
         {
             "cabal_sha256": "49d8a7f372d35363011591b253cae4c8db8b9ec594590448e20b7bed7acaee98",
@@ -120,7 +120,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.0"
+            "version": "3.10.2.1"
         },
         {
             "cabal_sha256": "d50e055f45bd09a8238200ec64ffa0f17492c32cdb5807487894388ce1c2f839",
@@ -403,7 +403,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.0"
+            "version": "3.10.2.1"
         }
     ]
 }
diff --git a/bootstrap/linux-9.0.2.json b/bootstrap/linux-9.0.2.json
index 381044d6327..787917300e7 100644
--- a/bootstrap/linux-9.0.2.json
+++ b/bootstrap/linux-9.0.2.json
@@ -102,7 +102,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.0"
+            "version": "3.10.2.1"
         },
         {
             "cabal_sha256": "49d8a7f372d35363011591b253cae4c8db8b9ec594590448e20b7bed7acaee98",
@@ -120,7 +120,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.0"
+            "version": "3.10.2.1"
         },
         {
             "cabal_sha256": "d50e055f45bd09a8238200ec64ffa0f17492c32cdb5807487894388ce1c2f839",
@@ -403,7 +403,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.0"
+            "version": "3.10.2.1"
         }
     ]
 }
diff --git a/bootstrap/linux-9.2.8.json b/bootstrap/linux-9.2.8.json
index f9485f85557..4b1a641f25c 100644
--- a/bootstrap/linux-9.2.8.json
+++ b/bootstrap/linux-9.2.8.json
@@ -102,7 +102,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.0"
+            "version": "3.10.2.1"
         },
         {
             "cabal_sha256": "49d8a7f372d35363011591b253cae4c8db8b9ec594590448e20b7bed7acaee98",
@@ -120,7 +120,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.0"
+            "version": "3.10.2.1"
         },
         {
             "cabal_sha256": "d50e055f45bd09a8238200ec64ffa0f17492c32cdb5807487894388ce1c2f839",
@@ -394,7 +394,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.0"
+            "version": "3.10.2.1"
         }
     ]
 }
diff --git a/bootstrap/linux-9.4.5.json b/bootstrap/linux-9.4.5.json
index dc533481ea9..0302f82e5b6 100644
--- a/bootstrap/linux-9.4.5.json
+++ b/bootstrap/linux-9.4.5.json
@@ -101,7 +101,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.0"
+            "version": "3.10.2.1"
         },
         {
             "cabal_sha256": null,
@@ -110,7 +110,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.0"
+            "version": "3.10.2.1"
         },
         {
             "cabal_sha256": "d50e055f45bd09a8238200ec64ffa0f17492c32cdb5807487894388ce1c2f839",
@@ -375,7 +375,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.0"
+            "version": "3.10.2.1"
         }
     ]
 }
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index ce93b72d7c9..98eb82a8d8a 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -28,7 +28,7 @@ common shared
   build-depends:
     , base >= 4.9 && <4.19
     -- this needs to match the in-tree lib:Cabal version
-    , Cabal ^>= 3.10.2.0
+    , Cabal ^>= 3.10.2.1
     , Cabal-syntax ^>= 3.10.2.0
 
   ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
@@ -115,6 +115,6 @@ custom-setup
   -- and due to Custom complexity and ConstraintSetupCabalMaxVersion
   -- it has to be the latest release version plus
   -- you have to use the latest cabal-install release
-  setup-depends: Cabal == 3.10.2.0,
+  setup-depends: Cabal == 3.10.2.1,
                  Cabal-syntax == 3.10.2.0,
                  base, filepath, directory
diff --git a/doc/conf.py b/doc/conf.py
index 2fc7bfe2694..4d4161ed809 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -13,7 +13,7 @@
 sys.path.insert(0, os.path.abspath('.'))
 import cabaldomain
 
-version = "3.10.2.0"
+version = "3.10.2.1"
 
 extensions = [
     'sphinx.ext.extlinks',
diff --git a/release-notes/Cabal-3.10.2.1.md b/release-notes/Cabal-3.10.2.1.md
new file mode 100644
index 00000000000..1615b3fcfe1
--- /dev/null
+++ b/release-notes/Cabal-3.10.2.1.md
@@ -0,0 +1,9 @@
+Cabal and Cabal-syntax 3.10.2.1 changelog and release notes
+---
+
+## Release 3.10.2.0 is strictly a bug-fix release, with the fixes listed below
+
+- Relax extension .c requirement for c-sources [#9285](https://github.com/haskell/cabal/pull/9285)
+
+We will be tightening the behaviour of Cabal in the future, when users list files ending with extensions other than `.c` in the `c-sources` field of their cabal file. These files were never processed properly.
+This PR displays more warnings and prepares the transition.

From 066ddd834e01b380fb1aed078ff3fe73acc37f85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= <hecate+github@glitchbra.in>
Date: Wed, 18 Oct 2023 17:11:03 +0200
Subject: [PATCH 094/144] Amend version number in the 3.10.2.1 changelog

---
 release-notes/Cabal-3.10.2.1.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/release-notes/Cabal-3.10.2.1.md b/release-notes/Cabal-3.10.2.1.md
index 1615b3fcfe1..bfa8fa750b5 100644
--- a/release-notes/Cabal-3.10.2.1.md
+++ b/release-notes/Cabal-3.10.2.1.md
@@ -1,7 +1,7 @@
 Cabal and Cabal-syntax 3.10.2.1 changelog and release notes
 ---
 
-## Release 3.10.2.0 is strictly a bug-fix release, with the fixes listed below
+## Release 3.10.2.1 is strictly a bug-fix release, with the fixes listed below
 
 - Relax extension .c requirement for c-sources [#9285](https://github.com/haskell/cabal/pull/9285)
 

From fdbaf1c329b700c25f9bc569ef5f48bcbf843447 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= <hecate+github@glitchbra.in>
Date: Mon, 30 Oct 2023 22:45:04 +0100
Subject: [PATCH 095/144] Fix markdown syntax in changelog

---
 Cabal/ChangeLog.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Cabal/ChangeLog.md b/Cabal/ChangeLog.md
index 53bbfa768f0..34d046cc098 100644
--- a/Cabal/ChangeLog.md
+++ b/Cabal/ChangeLog.md
@@ -1,4 +1,4 @@
-# 3.10.2.1 [Hécate] (mailto:hecate+github@glitchbra.in) October 2023
+# 3.10.2.1 [Hécate](mailto:hecate+github@glitchbra.in) October 2023
 * See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.2.1.md
 
 # 3.10.2.0 [Hécate](mailto:hecate+github@glitchbra.in) August 2023

From e29e9e7b553f4ef0f32f3c4779d0fab14b512452 Mon Sep 17 00:00:00 2001
From: Andreas Abel <andreas.abel@ifi.lmu.de>
Date: Wed, 25 Oct 2023 22:32:29 +0200
Subject: [PATCH 096/144] Bump to latest dependencies for GHC 9.8.1

(cherry picked from commit 775a44e7de77118e38495192b4d860d9487a7b88)
---
 Cabal-tests/Cabal-tests.cabal                 | 24 +++++++++----------
 cabal-benchmarks/cabal-benchmarks.cabal       |  2 +-
 .../cabal-install-solver.cabal                |  6 ++---
 cabal-install/cabal-install.cabal             |  6 ++---
 cabal-testsuite/cabal-testsuite.cabal         |  8 +++----
 5 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/Cabal-tests/Cabal-tests.cabal b/Cabal-tests/Cabal-tests.cabal
index bb42abc7fc7..f6a8c2c1481 100644
--- a/Cabal-tests/Cabal-tests.cabal
+++ b/Cabal-tests/Cabal-tests.cabal
@@ -60,7 +60,7 @@ test-suite unit-tests
     , Cabal-QuickCheck
     , containers
     , deepseq
-    , Diff                >=0.4   && <0.5
+    , Diff                >=0.4   && <0.6
     , directory
     , filepath
     , integer-logarithms  >=1.0.2 && <1.1
@@ -68,7 +68,7 @@ test-suite unit-tests
     , QuickCheck          >=2.14  && <2.15
     , rere                >=0.1   && <0.3
     , tagged
-    , tasty               >=1.2.3 && <1.5
+    , tasty               >=1.2.3 && <1.6
     , tasty-hunit
     , tasty-quickcheck
     , temporary
@@ -84,14 +84,14 @@ test-suite parser-tests
   main-is:          ParserTests.hs
   build-depends:
       base
-    , base-compat       >=0.11.0  && <0.13
+    , base-compat       >=0.11.0  && <0.14
     , bytestring
     , Cabal-syntax
     , Cabal-tree-diff
-    , Diff              >=0.4     && <0.5
+    , Diff              >=0.4     && <0.6
     , directory
     , filepath
-    , tasty             >=1.2.3   && <1.5
+    , tasty             >=1.2.3   && <1.6
     , tasty-golden      >=2.3.1.1 && <2.4
     , tasty-hunit
     , tasty-quickcheck
@@ -109,10 +109,10 @@ test-suite check-tests
     , bytestring
     , Cabal
     , Cabal-syntax
-    , Diff          >=0.4     && <0.5
+    , Diff          >=0.4     && <0.6
     , directory
     , filepath
-    , tasty         >=1.2.3   && <1.5
+    , tasty         >=1.2.3   && <1.6
     , tasty-expected-failure
     , tasty-golden  >=2.3.1.1 && <2.4
 
@@ -155,10 +155,10 @@ test-suite hackage-tests
     , filepath
 
   build-depends:
-      base-compat           >=0.11.0   && <0.13
-    , base-orphans          >=0.6      && <0.9
+      base-compat           >=0.11.0   && <0.14
+    , base-orphans          >=0.6      && <0.10
     , clock                 >=0.8      && <0.9
-    , optparse-applicative  >=0.13.2.0 && <0.17
+    , optparse-applicative  >=0.13.2.0 && <0.19
     , stm                   >=2.4.5.0  && <2.6
     , tar                   >=0.5.0.3  && <0.6
     , tree-diff             >=0.1      && <0.4
@@ -178,7 +178,7 @@ test-suite rpmvercmp
 
   build-depends:
       QuickCheck
-    , tasty             >=1.2.3 && <1.5
+    , tasty             >=1.2.3 && <1.6
     , tasty-hunit
     , tasty-quickcheck
 
@@ -197,7 +197,7 @@ test-suite no-thunks-test
       base
     , bytestring
     , Cabal-syntax
-    , tasty        >=1.2.3 && <1.5
+    , tasty        >=1.2.3 && <1.6
     , tasty-hunit
 
   -- this is test is buildable on old GHCs
diff --git a/cabal-benchmarks/cabal-benchmarks.cabal b/cabal-benchmarks/cabal-benchmarks.cabal
index 4e911918321..d2e9cb328b2 100644
--- a/cabal-benchmarks/cabal-benchmarks.cabal
+++ b/cabal-benchmarks/cabal-benchmarks.cabal
@@ -31,4 +31,4 @@ test-suite cabal-benchmarks
       base
     , bytestring
     , Cabal-syntax
-    , criterion   >=1.5.6.2 && <1.6
+    , criterion   >=1.5.6.2 && <1.7
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index df260d8bc06..0d5584f9136 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -105,7 +105,7 @@ library
 
   build-depends:
     , array         >=0.4      && <0.6
-    , base          >=4.10     && <4.19
+    , base          >=4.10     && <4.20
     , bytestring    >=0.10.6.0 && <0.13
     , Cabal         ^>=3.10
     , Cabal-syntax  ^>=3.10
@@ -138,10 +138,10 @@ Test-Suite unit-tests
      UnitTests.Distribution.Solver.Modular.MessageUtils
 
    build-depends:
-     , base        >= 4.10  && <4.19
+     , base        >= 4.10  && <4.20
      , Cabal
      , Cabal-syntax
      , cabal-install-solver
-     , tasty       >= 1.2.3 && <1.5
+     , tasty       >= 1.2.3 && <1.6
      , tasty-quickcheck
      , tasty-hunit >= 0.10
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index f206f635a47..c7066d92a9b 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -46,7 +46,7 @@ common warnings
       ghc-options: -Wunused-packages
 
 common base-dep
-    build-depends: base >=4.10 && <4.19
+    build-depends: base >=4.10 && <4.20
 
 common cabal-dep
     build-depends: Cabal ^>=3.10
@@ -227,7 +227,7 @@ library
         time       >= 1.5.0.1  && < 1.13,
         zlib       >= 0.5.3    && < 0.7,
         hackage-security >= 0.6.2.0 && < 0.7,
-        text       >= 1.2.3    && < 1.3 || >= 2.0 && < 2.1,
+        text       >= 1.2.3    && < 1.3 || >= 2.0 && < 2.2,
         parsec     >= 3.1.13.0 && < 3.2,
         regex-base  >= 0.94.0.0 && <0.95,
         regex-posix >= 0.96.0.0 && <0.97,
@@ -330,7 +330,7 @@ test-suite unit-tests
           tar,
           time,
           zlib,
-          tasty >= 1.2.3 && <1.5,
+          tasty >= 1.2.3 && <1.6,
           tasty-golden >=2.3.1.1 && <2.4,
           tasty-quickcheck,
           tasty-hunit >= 0.10,
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index 98eb82a8d8a..49214626456 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -26,7 +26,7 @@ common shared
   default-language: Haskell2010
 
   build-depends:
-    , base >= 4.9 && <4.19
+    , base >= 4.9 && <4.20
     -- this needs to match the in-tree lib:Cabal version
     , Cabal ^>= 3.10.2.1
     , Cabal-syntax ^>= 3.10.2.0
@@ -57,7 +57,7 @@ library
     Test.Cabal.ScriptEnv0
 
   build-depends:
-    , aeson                 ^>= 1.4.2.0 || ^>=1.5.0.0 || ^>= 2.0.0.0 || ^>= 2.1.0.0
+    , aeson                 ^>= 1.4.2.0 || ^>=1.5.0.0 || ^>= 2.0.0.0 || ^>= 2.1.0.0 || ^>= 2.2.1.0
     , async                 ^>= 2.2.1
     , attoparsec            ^>= 0.13.2.2 || ^>=0.14.1
     , base64-bytestring     ^>= 1.0.0.0 || ^>= 1.1.0.0 || ^>= 1.2.0.0
@@ -68,14 +68,14 @@ library
     , exceptions            ^>= 0.10.0
     , filepath              ^>= 1.3.0.1 || ^>= 1.4.0.0
     , network-wait          ^>= 0.1.2.0 || ^>= 0.2.0.0
-    , optparse-applicative  ^>= 0.14.3.0 || ^>=0.15.1.0 || ^>=0.16.0.0 || ^>= 0.17.0.0
+    , optparse-applicative  ^>= 0.14.3.0 || ^>=0.15.1.0 || ^>=0.16.0.0 || ^>= 0.17.0.0 || ^>= 0.18.1.0
     , process               ^>= 1.2.1.0 || ^>= 1.4.2.0 || ^>= 1.6.1.0
     , regex-base            ^>= 0.94.0.1
     , regex-tdfa            ^>= 1.2.3.1 || ^>=1.3.1.0
     , retry                 ^>= 0.9.1.0
     , array                 ^>= 0.4.0.1 || ^>= 0.5.0.0
     , temporary             ^>= 1.3
-    , text                  ^>= 1.2.3.1 || ^>= 2.0.1
+    , text                  ^>= 1.2.3.1 || ^>= 2.0.1   || ^>= 2.1
     , transformers          ^>= 0.3.0.0 || ^>= 0.4.2.0 || ^>= 0.5.2.0 || ^>= 0.6.0.2
 
   if !os(windows)

From 30f57fa677755b86f8661788accd3ebe808293e0 Mon Sep 17 00:00:00 2001
From: Andreas Abel <andreas.abel@ifi.lmu.de>
Date: Tue, 31 Oct 2023 20:08:20 +0100
Subject: [PATCH 097/144] cabal.project: clean out obsolete `allow-newer`s

(cherry picked from commit cb311fd9914f7c966284af1fc7a1472057facfb4)
---
 cabal.project | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/cabal.project b/cabal.project
index 5f0af8dfa4c..8cd40a33fc4 100644
--- a/cabal.project
+++ b/cabal.project
@@ -13,17 +13,9 @@ packages: cabal-benchmarks/
 
 optional-packages: ./vendored/*/*.cabal
 
-allow-newer:
-  hackage-security:Cabal
-
 -- avoiding extra dependencies
 constraints: rere -rere-cfg
 constraints: these -assoc
 
--- Andreas, 2022-08-19, https://github.com/haskell/cabal/issues/8377
--- Force latest dependencies in the development version:
-constraints: text >= 2.0
-constraints: time >= 1.12
-
 program-options
   ghc-options: -fno-ignore-asserts

From b17d6f243dd9fe7baff1a8ea666cee62613d89e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Tue, 7 Nov 2023 22:11:28 +0100
Subject: [PATCH 098/144] Bump cabal-install{-solver,} to 3.10.2.1 for GHC 9.8
 compat (#9416)

---
 cabal-install-solver/cabal-install-solver.cabal  | 2 +-
 cabal-install/cabal-install.cabal                | 2 +-
 cabal-install/changelog                          | 5 ++++-
 cabal-install/src/Distribution/Client/Version.hs | 2 +-
 release-notes/cabal-install-3.10.2.1.md          | 4 ++++
 5 files changed, 11 insertions(+), 4 deletions(-)
 create mode 100644 release-notes/cabal-install-3.10.2.1.md

diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index 0d5584f9136..aafbfac3680 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          cabal-install-solver
-version:       3.10.2.0
+version:       3.10.2.1
 synopsis:      The command-line interface for Cabal and Hackage.
 description:
   The solver component used in cabal-install command-line program
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index c7066d92a9b..8ba9f8b1331 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -1,7 +1,7 @@
 Cabal-Version:      2.2
 
 Name:               cabal-install
-Version:            3.10.2.0
+Version:            3.10.2.1
 Synopsis:           The command-line interface for Cabal and Hackage.
 Description:
     The \'cabal\' command-line program simplifies the process of managing
diff --git a/cabal-install/changelog b/cabal-install/changelog
index 0a211ba0946..f98fcfe1932 100644
--- a/cabal-install/changelog
+++ b/cabal-install/changelog
@@ -1,6 +1,9 @@
 -*-change-log-*-
 
-3.10.2.0 Hécate <hecate+github@glitchbra.in> August 2023
+3.10.2.1 Hécate <hecate+github@glitchbra.in> November 2023
+	* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.10.2.1.md
+
+3.10.2.0 Hécate <hecate+github@glitchbra.in> November 2023
 	* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.10.2.0.md
 
 3.10.1.0 Mikolaj Konarski <mikolaj@well-typed.com> March 2023
diff --git a/cabal-install/src/Distribution/Client/Version.hs b/cabal-install/src/Distribution/Client/Version.hs
index 2172884c1ac..854752a6b1f 100644
--- a/cabal-install/src/Distribution/Client/Version.hs
+++ b/cabal-install/src/Distribution/Client/Version.hs
@@ -13,4 +13,4 @@ import Distribution.Version
 -- program coverage information generated by HPC, and hence was moved to be a standalone value.
 --
 cabalInstallVersion :: Version
-cabalInstallVersion = mkVersion [3,10,2,0]
+cabalInstallVersion = mkVersion [3,10,2,1]
diff --git a/release-notes/cabal-install-3.10.2.1.md b/release-notes/cabal-install-3.10.2.1.md
new file mode 100644
index 00000000000..3f971275c80
--- /dev/null
+++ b/release-notes/cabal-install-3.10.2.1.md
@@ -0,0 +1,4 @@
+cabal-install and cabal-install-solver 3.10.2.1 changelog and release notes
+---
+
+## Release 3.10.2.1 is strictly a bounds bump release for GHC 9.8 compatibility

From 5d97fcf06a8d1f450b1d12f24334811f1a6e6b91 Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Wed, 22 Nov 2023 10:48:09 +0100
Subject: [PATCH 099/144] Use Paths_cabal_install for cabal-install version
 number (backport #9421) (#9433)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Hécate Moonlight <Kleidukos@users.noreply.github.com>
---
 cabal-install/cabal-install.cabal                |  2 ++
 cabal-install/src/Distribution/Client/Version.hs | 12 +++++-------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 8ba9f8b1331..792a84fd7c3 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -63,6 +63,8 @@ library
     default-extensions: TypeOperators
 
     hs-source-dirs:   src
+    other-modules:
+        Paths_cabal_install
     exposed-modules:
         -- this modules are moved from Cabal
         -- they are needed for as long until cabal-install moves to parsec parser
diff --git a/cabal-install/src/Distribution/Client/Version.hs b/cabal-install/src/Distribution/Client/Version.hs
index 854752a6b1f..0c499fe6484 100644
--- a/cabal-install/src/Distribution/Client/Version.hs
+++ b/cabal-install/src/Distribution/Client/Version.hs
@@ -6,11 +6,9 @@ module Distribution.Client.Version
 
 import Distribution.Version
 
--- This value determines the `cabal-install --version` output.
---
--- It is used in several places throughout the project, including anonymous build reports, client configuration,
--- and project planning output. Historically, this was a @Paths_*@ module, however, this conflicted with
--- program coverage information generated by HPC, and hence was moved to be a standalone value.
---
+import qualified Paths_cabal_install as PackageInfo
+
+-- |
+-- This value determines the output of `cabal-install --version`.
 cabalInstallVersion :: Version
-cabalInstallVersion = mkVersion [3,10,2,1]
+cabalInstallVersion = mkVersion' PackageInfo.version

From 25f972ddef9cf3115b8f9f2d8d8aad224d1f26db Mon Sep 17 00:00:00 2001
From: Francesco Ariis <fa-ml@ariis.it>
Date: Fri, 8 Dec 2023 09:10:56 +0100
Subject: [PATCH 100/144] Make `check` recognise `TypeAbstractions`
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

See #9496.

“Backport” of #9502, notice that we are not adding a new constructor,
just tweaking `check` behaviour.  This is improve UX without breaking
changes.
---
 Cabal/src/Distribution/PackageDescription/Check.hs  |  7 ++++---
 .../Fields/KnownTypeAbstractions/cabal.out          |  2 ++
 .../Fields/KnownTypeAbstractions/cabal.test.hs      |  5 +++++
 .../Fields/KnownTypeAbstractions/pkg.cabal          | 13 +++++++++++++
 changelog.d/pr-9503                                 | 11 +++++++++++
 editors/vim/syntax/cabal.vim                        |  2 ++
 6 files changed, 37 insertions(+), 3 deletions(-)
 create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions/cabal.out
 create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions/cabal.test.hs
 create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions/pkg.cabal
 create mode 100644 changelog.d/pr-9503

diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs
index 166d53e0290..63ea09736f4 100644
--- a/Cabal/src/Distribution/PackageDescription/Check.hs
+++ b/Cabal/src/Distribution/PackageDescription/Check.hs
@@ -1193,9 +1193,10 @@ checkFields pkg =
     unknownCompilers  = [ name | (OtherCompiler name, _) <- testedWith pkg ]
     unknownLanguages  = [ name | bi <- allBuildInfo pkg
                                , UnknownLanguage name <- allLanguages bi ]
-    unknownExtensions = [ name | bi <- allBuildInfo pkg
-                               , UnknownExtension name <- allExtensions bi
-                               , name `notElem` map prettyShow knownLanguages ]
+    unknownExtensions = filter (/= "TypeAbstractions")
+                          [ name | bi <- allBuildInfo pkg
+                                 , UnknownExtension name <- allExtensions bi
+                                 , name `notElem` map prettyShow knownLanguages ]
     ourDeprecatedExtensions = nub $ catMaybes
       [ find ((==ext) . fst) deprecatedExtensions
       | bi <- allBuildInfo pkg
diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions/cabal.out b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions/cabal.out
new file mode 100644
index 00000000000..37aa169b416
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions/cabal.out
@@ -0,0 +1,2 @@
+# cabal check
+No errors or warnings could be found in the package.
diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions/cabal.test.hs b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions/cabal.test.hs
new file mode 100644
index 00000000000..5865ce8893a
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions/cabal.test.hs
@@ -0,0 +1,5 @@
+import Test.Cabal.Prelude
+
+-- Uknown extension, exception for TypeAbstractions, see #9496
+main = cabalTest $
+  cabal "check" []
diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions/pkg.cabal b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions/pkg.cabal
new file mode 100644
index 00000000000..10a8974db90
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/KnownTypeAbstractions/pkg.cabal
@@ -0,0 +1,13 @@
+cabal-version: 3.0
+name: pkg
+synopsis: synopsis
+description: description
+version: 0
+category: example
+maintainer: none@example.com
+license: GPL-3.0-or-later
+
+library
+  exposed-modules: Module
+  default-language: Haskell2010
+  default-extensions: TypeAbstractions
diff --git a/changelog.d/pr-9503 b/changelog.d/pr-9503
new file mode 100644
index 00000000000..d53e09fae9e
--- /dev/null
+++ b/changelog.d/pr-9503
@@ -0,0 +1,11 @@
+synopsis: Make `check` recognise `TypeAbstractions`
+packages: cabal-install
+prs: #9503
+issues: #9496
+
+description: {
+
+- `cabal check` will not complain about “Unknown extension” when
+  finding `TypeAbstractions`.
+
+}
diff --git a/editors/vim/syntax/cabal.vim b/editors/vim/syntax/cabal.vim
index 1fc84f4d8af..fa52f12a168 100644
--- a/editors/vim/syntax/cabal.vim
+++ b/editors/vim/syntax/cabal.vim
@@ -267,6 +267,7 @@ syn keyword cabalExtension contained
   \ TraditionalRecordSyntax
   \ TransformListComp
   \ TupleSections
+  \ TypeAbstractions
   \ TypeApplications
   \ TypeData
   \ TypeFamilies
@@ -405,6 +406,7 @@ syn keyword cabalExtension contained
   \ NoTraditionalRecordSyntax
   \ NoTransformListComp
   \ NoTupleSections
+  \ NoTypeAbstractions
   \ NoTypeApplications
   \ NoTypeFamilies
   \ NoTypeFamilyDependencies

From 5f8cdfab15dfe606474ac8a5a9bacbb165c20f8a Mon Sep 17 00:00:00 2001
From: Andrea Bedini <andrea.bedini@tweag.io>
Date: Sat, 4 Nov 2023 14:59:20 +0800
Subject: [PATCH 101/144] Revert #3639 (Don't pass -package-db and -package
 flags to --abi-hash) (#9384)

* Revert #3639 (Don't pass -package-db and -package flags to --abi-hash)

With ghc>=9.6 `ghc --abi-hash` initialises the plugins so it will fail
if a cabal file specifies `ghc-options: -fplugin=Foo`.

Closes: #9375

* Also revert in GHC.hs

---------

Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 01cfac0e6608f7962e80e7cca67dd1b2b9285ecc)

# Conflicts:
#	Cabal/src/Distribution/Simple/GHC.hs
#	Cabal/src/Distribution/Simple/GHCJS.hs
---
 Cabal/src/Distribution/Simple/GHC.hs   | 8 +-------
 Cabal/src/Distribution/Simple/GHCJS.hs | 8 +-------
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/Cabal/src/Distribution/Simple/GHC.hs b/Cabal/src/Distribution/Simple/GHC.hs
index 9d653f85829..1fbd153187f 100644
--- a/Cabal/src/Distribution/Simple/GHC.hs
+++ b/Cabal/src/Distribution/Simple/GHC.hs
@@ -1861,18 +1861,12 @@ libAbiHash verbosity _pkg_descr lbi lib clbi = do
       libBi = libBuildInfo lib
       comp        = compiler lbi
       platform    = hostPlatform lbi
-      vanillaArgs0 =
+      vanillaArgs =
         (componentGhcOptions verbosity lbi libBi clbi (componentBuildDir lbi clbi))
         `mappend` mempty {
           ghcOptMode         = toFlag GhcModeAbiHash,
           ghcOptInputModules = toNubListR $ exposedModules lib
         }
-      vanillaArgs =
-          -- Package DBs unnecessary, and break ghc-cabal. See #3633
-          -- BUT, put at least the global database so that 7.4 doesn't
-          -- break.
-          vanillaArgs0 { ghcOptPackageDBs = [GlobalPackageDB]
-                       , ghcOptPackages = mempty }
       sharedArgs = vanillaArgs `mappend` mempty {
                        ghcOptDynLinkMode = toFlag GhcDynamicOnly,
                        ghcOptFPic        = toFlag True,
diff --git a/Cabal/src/Distribution/Simple/GHCJS.hs b/Cabal/src/Distribution/Simple/GHCJS.hs
index c8721746a6a..dcd5b3230d9 100644
--- a/Cabal/src/Distribution/Simple/GHCJS.hs
+++ b/Cabal/src/Distribution/Simple/GHCJS.hs
@@ -1573,18 +1573,12 @@ libAbiHash verbosity _pkg_descr lbi lib clbi = do
       libBi = libBuildInfo lib
       comp        = compiler lbi
       platform    = hostPlatform lbi
-      vanillaArgs0 =
+      vanillaArgs =
         (componentGhcOptions verbosity lbi libBi clbi (componentBuildDir lbi clbi))
         `mappend` mempty {
           ghcOptMode         = toFlag GhcModeAbiHash,
           ghcOptInputModules = toNubListR $ exposedModules lib
         }
-      vanillaArgs =
-          -- Package DBs unnecessary, and break ghc-cabal. See #3633
-          -- BUT, put at least the global database so that 7.4 doesn't
-          -- break.
-          vanillaArgs0 { ghcOptPackageDBs = [GlobalPackageDB]
-                       , ghcOptPackages = mempty }
       sharedArgs = vanillaArgs `mappend` mempty {
                        ghcOptDynLinkMode = toFlag GhcDynamicOnly,
                        ghcOptFPic        = toFlag True,

From c21eef43140f62e37da46b71472fde5262b6da2b Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen@redhat.com>
Date: Fri, 3 Nov 2023 16:30:40 +0800
Subject: [PATCH 102/144] cabal-install-solver: fix pkgconf 1.9 --modversion
 regression

Check that the numbers of *versions* output is equal to the number of pkgconf's

fixes #8923

The pkgconf behavior was reverted upstream in 2.0

(this should cover the case too of checking that equal pkgList lines are output also)

(cherry picked from commit 3832beaf50b9ec7d07111ce0f673de95577f48a9)

# Conflicts:
#	cabal-install-solver/src/Distribution/Solver/Types/PkgConfigDb.hs
---
 .../Distribution/Solver/Types/PkgConfigDb.hs  | 21 ++++++++++++-------
 changelog.d/pr-9391                           |  4 ++++
 2 files changed, 18 insertions(+), 7 deletions(-)
 create mode 100644 changelog.d/pr-9391

diff --git a/cabal-install-solver/src/Distribution/Solver/Types/PkgConfigDb.hs b/cabal-install-solver/src/Distribution/Solver/Types/PkgConfigDb.hs
index 11e6da847f0..418f716c21c 100644
--- a/cabal-install-solver/src/Distribution/Solver/Types/PkgConfigDb.hs
+++ b/cabal-install-solver/src/Distribution/Solver/Types/PkgConfigDb.hs
@@ -67,15 +67,22 @@ readPkgConfigDb verbosity progdb = handle ioErrorHandler $ do
         -- The output of @pkg-config --list-all@ also includes a description
         -- for each package, which we do not need.
         let pkgNames = map (takeWhile (not . isSpace)) pkgList
-        (pkgVersions, _errs, exitCode) <-
+        (outs, _errs, exitCode) <-
                      getProgramInvocationOutputAndErrors verbosity
                        (programInvocation pkgConfig ("--modversion" : pkgNames))
-        case exitCode of
-          ExitSuccess -> (return . pkgConfigDbFromList . zip pkgNames) (lines pkgVersions)
-          -- if there's a single broken pc file the above fails, so we fall back into calling it individually
-          _ -> do
-             info verbosity ("call to pkg-config --modversion on all packages failed. Falling back to querying pkg-config individually on each package")
-             pkgConfigDbFromList . catMaybes <$> mapM (getIndividualVersion pkgConfig) pkgNames
+        let pkgVersions = lines outs
+        if exitCode == ExitSuccess && length pkgVersions == length pkgNames
+          then (return . pkgConfigDbFromList . zip pkgNames) pkgVersions
+          else
+          -- if there's a single broken pc file the above fails, so we fall back
+          -- into calling it individually
+          --
+          -- Also some implementations of @pkg-config@ do not provide more than
+          -- one package version, so if the returned list is shorter than the
+          -- requested one, we fall back to querying one by one.
+          do
+            info verbosity ("call to pkg-config --modversion on all packages failed. Falling back to querying pkg-config individually on each package")
+            pkgConfigDbFromList . catMaybes <$> mapM (getIndividualVersion pkgConfig) pkgNames
   where
     -- For when pkg-config invocation fails (possibly because of a
     -- too long command line).
diff --git a/changelog.d/pr-9391 b/changelog.d/pr-9391
new file mode 100644
index 00000000000..517c94ed127
--- /dev/null
+++ b/changelog.d/pr-9391
@@ -0,0 +1,4 @@
+synopsis: fix pkgconfig-depends for pkgconf-1.9
+packages: cabal-install-solver
+prs: #9391
+issues: #8923

From 8a35837e4a641df31e2c3485e214761c9655e3d3 Mon Sep 17 00:00:00 2001
From: Javier Sagredo <javier.sagredo@iohk.io>
Date: Sat, 18 Nov 2023 20:39:35 +0100
Subject: [PATCH 103/144] Use Base16 hash for script path.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Issue #9334 shows that `%` characters on Windows result in invalid
paths, also `/` characters on Linux create invalid paths.

This changes from using base64 to using base16 with the same length
we use for unit-ids.

(cherry picked from commit 97f99171b8b6a2f47b465cc7aa763c5037b8ee9c)

Co-authored-by: Hécate Moonlight <Kleidukos@users.noreply.github.com>
Co-autohred-by: Javier Sagredo <jasataco@gmail.com>
---
 cabal-install/cabal-install.cabal               |  1 -
 .../src/Distribution/Client/HashValue.hs        | 11 +++--------
 .../src/Distribution/Client/ScriptUtils.hs      | 17 +++++++++--------
 cabal-testsuite/cabal-testsuite.cabal           |  2 +-
 cabal-testsuite/src/Test/Cabal/Prelude.hs       |  5 ++---
 changelog.d/base16-script-cache                 |  9 +++++++++
 6 files changed, 24 insertions(+), 21 deletions(-)
 create mode 100644 changelog.d/base16-script-cache

diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 792a84fd7c3..d0331935586 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -207,7 +207,6 @@ library
         async      >= 2.0      && < 2.3,
         array      >= 0.4      && < 0.6,
         base16-bytestring >= 0.1.1 && < 1.1.0.0,
-        base64-bytestring >= 1.0 && < 1.3,
         binary     >= 0.7.3    && < 0.9,
         bytestring >= 0.10.6.0 && < 0.13,
         containers >= 0.5.6.2  && < 0.7,
diff --git a/cabal-install/src/Distribution/Client/HashValue.hs b/cabal-install/src/Distribution/Client/HashValue.hs
index 86281a309ff..3fc9c7ce9df 100644
--- a/cabal-install/src/Distribution/Client/HashValue.hs
+++ b/cabal-install/src/Distribution/Client/HashValue.hs
@@ -6,7 +6,6 @@ module Distribution.Client.HashValue (
     hashValue,
     truncateHash,
     showHashValue,
-    showHashValueBase64,
     readFileHashValue,
     hashFromTUF,
     ) where
@@ -16,10 +15,9 @@ import Prelude ()
 
 import qualified Hackage.Security.Client as Sec
 
-import qualified Crypto.Hash.SHA256         as SHA256
-import qualified Data.ByteString.Base16     as Base16
-import qualified Data.ByteString.Base64     as Base64
-import qualified Data.ByteString.Char8      as BS
+import qualified Crypto.Hash.SHA256 as SHA256
+import qualified Data.ByteString.Base16 as Base16
+import qualified Data.ByteString.Char8 as BS
 import qualified Data.ByteString.Lazy.Char8 as LBS
 
 import System.IO         (IOMode (..), withBinaryFile)
@@ -57,9 +55,6 @@ hashValue = HashValue . SHA256.hashlazy
 showHashValue :: HashValue -> String
 showHashValue (HashValue digest) = BS.unpack (Base16.encode digest)
 
-showHashValueBase64 :: HashValue -> String
-showHashValueBase64 (HashValue digest) = BS.unpack (Base64.encode digest)
-
 -- | Hash the content of a file. Uses SHA256.
 --
 readFileHashValue :: FilePath -> IO HashValue
diff --git a/cabal-install/src/Distribution/Client/ScriptUtils.hs b/cabal-install/src/Distribution/Client/ScriptUtils.hs
index ce64c8a5ef6..6f692fa2ebf 100644
--- a/cabal-install/src/Distribution/Client/ScriptUtils.hs
+++ b/cabal-install/src/Distribution/Client/ScriptUtils.hs
@@ -27,7 +27,7 @@ import Distribution.Client.Config
 import Distribution.Client.DistDirLayout
     ( DistDirLayout(..), DistDirParams(..) )
 import Distribution.Client.HashValue
-    ( hashValue, showHashValueBase64 )
+    ( hashValue, showHashValue, truncateHash )
 import Distribution.Client.HttpUtils
          ( HttpTransport, configureTransport )
 import Distribution.Client.NixStyleOptions
@@ -131,17 +131,18 @@ import qualified Text.Parsec as P
 --    repl to deal with the fact that the repl is relative to the working directory and not
 --    the project root.
 
--- | Get the hash of a script's absolute path)
+-- | Get the hash of a script's absolute path.
 --
 -- Two hashes will be the same as long as the absolute paths
 -- are the same.
 getScriptHash :: FilePath -> IO String
-getScriptHash script
-  -- Base64 is shorter than Base16, which helps avoid long path issues on windows
-  -- but it can contain /'s which aren't valid in file paths so replace them with
-  -- %'s. 26 chars / 130 bits is enough to practically avoid collisions.
-  = map (\c -> if c == '/' then '%' else c) . take 26
-  . showHashValueBase64 . hashValue . fromString <$> canonicalizePath script
+getScriptHash script =
+  -- Truncation here tries to help with long path issues on Windows.
+  showHashValue
+    . truncateHash 26
+    . hashValue
+    . fromString
+    <$> canonicalizePath script
 
 -- | Get the directory for caching a script build.
 --
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index 49214626456..cfd6d830189 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -60,7 +60,7 @@ library
     , aeson                 ^>= 1.4.2.0 || ^>=1.5.0.0 || ^>= 2.0.0.0 || ^>= 2.1.0.0 || ^>= 2.2.1.0
     , async                 ^>= 2.2.1
     , attoparsec            ^>= 0.13.2.2 || ^>=0.14.1
-    , base64-bytestring     ^>= 1.0.0.0 || ^>= 1.1.0.0 || ^>= 1.2.0.0
+    , base16-bytestring     ^>= 0.1.1.5 || ^>= 1.0
     , bytestring            ^>= 0.10.0.2 || ^>= 0.11.0.0 || ^>= 0.12.0.0
     , containers            ^>= 0.5.0.0 || ^>= 0.6.0.1
     , cryptohash-sha256     ^>= 0.11.101.0
diff --git a/cabal-testsuite/src/Test/Cabal/Prelude.hs b/cabal-testsuite/src/Test/Cabal/Prelude.hs
index eb3ca2a951c..934cf5ce355 100644
--- a/cabal-testsuite/src/Test/Cabal/Prelude.hs
+++ b/cabal-testsuite/src/Test/Cabal/Prelude.hs
@@ -52,7 +52,7 @@ import Control.Monad (unless, when, void, forM_, liftM2, liftM4)
 import Control.Monad.Trans.Reader (withReaderT, runReaderT)
 import Control.Monad.IO.Class (MonadIO (..))
 import qualified Crypto.Hash.SHA256 as SHA256
-import qualified Data.ByteString.Base64 as Base64
+import qualified Data.ByteString.Base16 as Base16
 import qualified Data.ByteString.Char8 as C
 import Data.List (isInfixOf, stripPrefix, isPrefixOf, intercalate)
 import Data.List.NonEmpty (NonEmpty (..))
@@ -842,8 +842,7 @@ getScriptCacheDirectory :: FilePath -> TestM FilePath
 getScriptCacheDirectory script = do
     cabalDir <- testCabalDir `fmap` getTestEnv
     hashinput <- liftIO $ canonicalizePath script
-    let hash = map (\c -> if c == '/' then '%' else c) . take 26
-             . C.unpack . Base64.encode . SHA256.hash . C.pack $ hashinput
+    let hash = C.unpack . Base16.encode . C.take 26 . SHA256.hash . C.pack $ hashinput
     return $ cabalDir </> "script-builds" </> hash
 
 ------------------------------------------------------------------------
diff --git a/changelog.d/base16-script-cache b/changelog.d/base16-script-cache
new file mode 100644
index 00000000000..b395f946a09
--- /dev/null
+++ b/changelog.d/base16-script-cache
@@ -0,0 +1,9 @@
+synopsis: Script cache dir is the base16 hash of the canonical path of the script.
+prs: #9459
+packages: cabal-install
+
+description: {
+
+Script cache dir is the base16 hash of the canonical path of the script.
+
+}

From 61d3c1827e2d91d6f86b7c1a5cab049cf0311bba Mon Sep 17 00:00:00 2001
From: Andrea Bedini <andrea.bedini@tweag.io>
Date: Wed, 22 Nov 2023 12:58:16 +0800
Subject: [PATCH 104/144] Migrate to haskell-actions/setup

As of 2023-09-09, haskell/action/setup is no longer maintained.

The comment

  # latest is mandatory for cabal-testsuite, see https://github.com/haskell/cabal/issues/8133

is removed; as the validate job was already fixing a version of cabal-install.

(cherry picked from commit 8e09697082118f6209ac9cc38b0780043e5f1c7e)

# Conflicts:
#	.github/workflows/validate.yml
---
 .github/workflows/validate.yml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 252dc742e5f..16ddf6c3bba 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -67,7 +67,7 @@ jobs:
             sudo chown -R $USER /usr/local/.ghcup
             sudo chmod -R 777 /usr/local/.ghcup
           fi
-      - uses: haskell/actions/setup@v2
+      - uses: haskell-actions/setup@v2
         id: setup-haskell
         with:
           ghc-version: ${{ matrix.ghc }}
@@ -356,11 +356,12 @@ jobs:
           apt-get update
           apt-get install -y ghc-${{ matrix.extra-ghc }}-dyn
 
-      - uses: haskell/actions/setup@v2
+      - uses: haskell-actions/setup@v2
         id: setup-haskell
         with:
           ghc-version: ${{ matrix.ghc }}
-          cabal-version: '3.10.1.0'
+          # Make sure this bindist works in this old environment
+          cabal-version: 3.10.1.0
 
       # As we are reusing the cached build dir from the previous step
       # the generated artifacts are available here,
@@ -415,7 +416,7 @@ jobs:
             sudo chown -R $USER /usr/local/.ghcup
             sudo chmod -R 777 /usr/local/.ghcup
           fi
-      - uses: haskell/actions/setup@v2
+      - uses: haskell-actions/setup@v2
         id: setup-haskell
         with:
           ghc-version: ${{ matrix.ghc }}

From 96fa406f2cbbd99bf10a0ce96338f1ed6aa9c358 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Fri, 15 Dec 2023 21:54:50 +0800
Subject: [PATCH 105/144] Relax upper bounds on filepath

(cherry picked from commit 8515cfd6aff02d13153161ce0fb61d5b9c5daed3)
---
 Cabal-syntax/Cabal-syntax.cabal                 | 2 +-
 Cabal/Cabal.cabal                               | 2 +-
 cabal-install-solver/cabal-install-solver.cabal | 2 +-
 cabal-install/cabal-install.cabal               | 2 +-
 cabal-testsuite/cabal-testsuite.cabal           | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index 6efbaeae07b..6ea32530910 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -35,7 +35,7 @@ library
     containers >= 0.5.0.0  && < 0.7,
     deepseq    >= 1.3.0.1  && < 1.6,
     directory  >= 1.2      && < 1.4,
-    filepath   >= 1.3.0.1  && < 1.5,
+    filepath   >= 1.3.0.1  && < 1.6,
     mtl        >= 2.1      && < 2.4,
     parsec     >= 3.1.13.0 && < 3.2,
     pretty     >= 1.1.1    && < 1.2,
diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index 9bf2bf1e510..6d1a67a720d 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -41,7 +41,7 @@ library
     containers >= 0.5.0.0  && < 0.7,
     deepseq    >= 1.3.0.1  && < 1.6,
     directory  >= 1.2      && < 1.4,
-    filepath   >= 1.3.0.1  && < 1.5,
+    filepath   >= 1.3.0.1  && < 1.6,
     pretty     >= 1.1.1    && < 1.2,
     process    >= 1.2.1.0  && < 1.7,
     time       >= 1.4.0.1  && < 1.13
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index aafbfac3680..87a7d787a45 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -111,7 +111,7 @@ library
     , Cabal-syntax  ^>=3.10
     , containers    >=0.5.6.2  && <0.7
     , edit-distance ^>= 0.2.2
-    , filepath      ^>=1.4.0.0
+    , filepath      ^>=1.4.0.0 || ^>=1.5.0.0
     , mtl           >=2.0      && <2.4
     , pretty        ^>=1.1
     , transformers  >=0.4.2.0  && <0.7
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index d0331935586..344cf8249af 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -215,7 +215,7 @@ library
         echo       >= 0.1.3    && < 0.2,
         edit-distance >= 0.2.2 && < 0.3,
         exceptions >= 0.10.4   && < 0.11,
-        filepath   >= 1.4.0.0  && < 1.5,
+        filepath   >= 1.4.0.0  && < 1.6,
         hashable   >= 1.0      && < 1.5,
         HTTP       >= 4000.1.5 && < 4000.5,
         mtl        >= 2.0      && < 2.4,
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index cfd6d830189..2b292851885 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -66,7 +66,7 @@ library
     , cryptohash-sha256     ^>= 0.11.101.0
     , directory             ^>= 1.2.0.1 || ^>= 1.3.0.0
     , exceptions            ^>= 0.10.0
-    , filepath              ^>= 1.3.0.1 || ^>= 1.4.0.0
+    , filepath              ^>= 1.3.0.1 || ^>= 1.4.0.0 || ^>= 1.5.0.0
     , network-wait          ^>= 0.1.2.0 || ^>= 0.2.0.0
     , optparse-applicative  ^>= 0.14.3.0 || ^>=0.15.1.0 || ^>=0.16.0.0 || ^>= 0.17.0.0 || ^>= 0.18.1.0
     , process               ^>= 1.2.1.0 || ^>= 1.4.2.0 || ^>= 1.6.1.0

From 5fefcf5bff985d5c9a3ffc2e71a1f61786c4c0fb Mon Sep 17 00:00:00 2001
From: ffaf1 <fa-ml@ariis.it>
Date: Fri, 22 Dec 2023 00:53:27 +0100
Subject: [PATCH 106/144] `check`: add PackageInfo warning (#9525) (#9525)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add test for #9331

Guard Paths_* behind `cabal-version: 3.12` or higher, “fail” and
“succeed” tests.

* check: guard PackageInfo behind cabal-version ≥ 3.12

Note we do not actually check for ≥ 3.12, since it is not possible
to introduce constructors in point release.
Instead the check always fires with PackageInfo_* is present, and
suggests an upgrade path.

* Fix testsuite

* Add changelog

Co-authored-by: Mikolaj <281893+Mikolaj@users.noreply.github.com>
---
 .../src/Distribution/PackageDescription/Check.hs |  9 +++++++++
 .../AutogenModules/Package/setup.cabal.out       |  1 +
 .../AutogenModules/Package/setup.out             |  1 +
 .../AutogenModules/SrcDist/setup.cabal.out       |  3 +++
 .../AutogenModules/SrcDist/setup.out             |  3 +++
 .../AutogenModules/SrcDist/setup.test.hs         |  1 -
 .../CabalVersion/AutoGenMods/cabal.out           |  1 +
 .../Sanity/AutogenVersion/cabal.out              |  4 ++++
 .../Sanity/AutogenVersion/cabal.test.hs          |  6 ++++++
 .../Sanity/AutogenVersion/pkg.cabal              | 16 ++++++++++++++++
 .../Check/NonConfCheck/PathsExtensions/cabal.out |  2 ++
 changelog.d/pr-9525                              | 10 ++++++++++
 12 files changed, 56 insertions(+), 1 deletion(-)
 create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.out
 create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.test.hs
 create mode 100644 cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/pkg.cabal
 create mode 100644 changelog.d/pr-9525

diff --git a/Cabal/src/Distribution/PackageDescription/Check.hs b/Cabal/src/Distribution/PackageDescription/Check.hs
index 63ea09736f4..f07748f0db8 100644
--- a/Cabal/src/Distribution/PackageDescription/Check.hs
+++ b/Cabal/src/Distribution/PackageDescription/Check.hs
@@ -224,6 +224,7 @@ data CheckExplanation =
         | CVExpliticDepsCustomSetup
         | CVAutogenPaths
         | CVAutogenPackageInfo
+        | CVAutogenPackageInfoGuard
         | GlobNoMatch String String
         | GlobExactMatch String String FilePath
         | GlobNoDir String String FilePath
@@ -664,6 +665,11 @@ ppExplanation CVAutogenPackageInfo =
       ++ "the module does not come with the package and is generated on "
       ++ "setup. Modules built with a custom Setup.hs script also go here "
       ++ "to ensure that commands like sdist don't fail."
+ppExplanation CVAutogenPackageInfoGuard =
+    "To use the autogenerated module PackageInfo_* you need to specify "
+      ++ "`cabal-version: 3.12` or higher. This is not possible in `cabal "
+      ++ "3.10`. To use this feature and be able to upload your package to "
+      ++ "Hackage, download `cabal 3.12`!"
 ppExplanation (GlobNoMatch field glob) =
     "In '" ++ field ++ "': the pattern '" ++ glob ++ "' does not"
       ++ " match any files."
@@ -1814,6 +1820,9 @@ checkCabalVersion pkg =
            && not (elem (autogenPackageInfoModuleName pkg) allModuleNamesAutogen) ) $
       PackageDistInexcusable CVAutogenPackageInfo
 
+  , check
+      (elem (autogenPackageInfoModuleName pkg) allModuleNames)
+      (PackageDistInexcusable CVAutogenPackageInfoGuard)
   ]
   where
     -- Perform a check on packages that use a version of the spec less than
diff --git a/cabal-testsuite/PackageTests/AutogenModules/Package/setup.cabal.out b/cabal-testsuite/PackageTests/AutogenModules/Package/setup.cabal.out
index a650205c593..07433c25abb 100644
--- a/cabal-testsuite/PackageTests/AutogenModules/Package/setup.cabal.out
+++ b/cabal-testsuite/PackageTests/AutogenModules/Package/setup.cabal.out
@@ -15,6 +15,7 @@ On test suite 'Test' an 'autogen-module' is not on 'other-modules'
 On benchmark 'Bench' an 'autogen-module' is not on 'other-modules'
 Packages using 'cabal-version: 2.0' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail.
 Packages using 'cabal-version: 2.0' and the autogenerated module PackageInfo_* must include it in 'autogen-modules' as well as 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail.
+To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. This is not possible in `cabal 3.10`. To use this feature and be able to upload your package to Hackage, download `cabal 3.12`!
 The filename './my.cabal' does not match package name (expected: 'AutogenModules.cabal')
 Note: the public hackage server would reject this package.
 Building source dist for AutogenModules-0.1...
diff --git a/cabal-testsuite/PackageTests/AutogenModules/Package/setup.out b/cabal-testsuite/PackageTests/AutogenModules/Package/setup.out
index c6203a64130..1c31921678a 100644
--- a/cabal-testsuite/PackageTests/AutogenModules/Package/setup.out
+++ b/cabal-testsuite/PackageTests/AutogenModules/Package/setup.out
@@ -15,6 +15,7 @@ On test suite 'Test' an 'autogen-module' is not on 'other-modules'
 On benchmark 'Bench' an 'autogen-module' is not on 'other-modules'
 Packages using 'cabal-version: 2.0' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail.
 Packages using 'cabal-version: 2.0' and the autogenerated module PackageInfo_* must include it in 'autogen-modules' as well as 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail.
+To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. This is not possible in `cabal 3.10`. To use this feature and be able to upload your package to Hackage, download `cabal 3.12`!
 The filename './my.cabal' does not match package name (expected: 'AutogenModules.cabal')
 Note: the public hackage server would reject this package.
 Building source dist for AutogenModules-0.1...
diff --git a/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.cabal.out b/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.cabal.out
index 774f230f1b9..96f54d60e07 100644
--- a/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.cabal.out
+++ b/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.cabal.out
@@ -1,6 +1,9 @@
 # Setup configure
 Configuring AutogenModules-0.1...
 # Setup sdist
+Distribution quality errors:
+To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. This is not possible in `cabal 3.10`. To use this feature and be able to upload your package to Hackage, download `cabal 3.12`!
+Note: the public hackage server would reject this package.
 Building source dist for AutogenModules-0.1...
 Source tarball created: setup.cabal.dist/work/dist/AutogenModules-0.1.tar.gz
 # Setup sdist
diff --git a/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.out b/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.out
index 30f213c7cb1..661c24594f9 100644
--- a/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.out
+++ b/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.out
@@ -1,6 +1,9 @@
 # Setup configure
 Configuring AutogenModules-0.1...
 # Setup sdist
+Distribution quality errors:
+To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. This is not possible in `cabal 3.10`. To use this feature and be able to upload your package to Hackage, download `cabal 3.12`!
+Note: the public hackage server would reject this package.
 Building source dist for AutogenModules-0.1...
 Source tarball created: setup.dist/work/dist/AutogenModules-0.1.tar.gz
 # Setup sdist
diff --git a/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.test.hs b/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.test.hs
index 84d702c57d2..64bf2f84446 100644
--- a/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.test.hs
+++ b/cabal-testsuite/PackageTests/AutogenModules/SrcDist/setup.test.hs
@@ -61,7 +61,6 @@ main = setupAndCabalTest $ do
         assertOutputDoesNotContain pathsAutogenMsg configureResult
 
         -- Asserts for the undesired check messages after sdist.
-        assertOutputDoesNotContain "Distribution quality errors:" sdistResult
         assertOutputDoesNotContain libAutogenMsg   sdistResult
         assertOutputDoesNotContain exeAutogenMsg   sdistResult
         assertOutputDoesNotContain testAutogenMsg  sdistResult
diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/AutoGenMods/cabal.out b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/AutoGenMods/cabal.out
index 6ed067c93ac..a98c76501b3 100644
--- a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/AutoGenMods/cabal.out
+++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/CabalVersion/AutoGenMods/cabal.out
@@ -2,4 +2,5 @@
 Warning: The following errors will cause portability problems on other environments:
 Warning: Packages using 'cabal-version: 2.0' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail.
 Warning: Packages using 'cabal-version: 2.0' and the autogenerated module PackageInfo_* must include it in 'autogen-modules' as well as 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail.
+Warning: To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. This is not possible in `cabal 3.10`. To use this feature and be able to upload your package to Hackage, download `cabal 3.12`!
 Warning: Hackage would reject this package.
diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.out b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.out
new file mode 100644
index 00000000000..3717e18e0f7
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.out
@@ -0,0 +1,4 @@
+# cabal check
+Warning: The following errors will cause portability problems on other environments:
+Warning: To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. This is not possible in `cabal 3.10`. To use this feature and be able to upload your package to Hackage, download `cabal 3.12`!
+Warning: Hackage would reject this package.
diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.test.hs b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.test.hs
new file mode 100644
index 00000000000..c9c2e56de21
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/cabal.test.hs
@@ -0,0 +1,6 @@
+import Test.Cabal.Prelude
+
+-- #9331: PackageInfo functionality should be guarded by cabal-version.
+main = cabalTest $
+  fails $ cabal "check" []
+
diff --git a/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/pkg.cabal b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/pkg.cabal
new file mode 100644
index 00000000000..aeef460f7f0
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Sanity/AutogenVersion/pkg.cabal
@@ -0,0 +1,16 @@
+cabal-version: 2.4
+name: pkg
+version: 0
+license: GPL-3.0-or-later
+maintainer: Someone
+category: Example
+synopsis: Foo
+description: FooBar
+build-type: Simple
+
+library
+    default-language: Haskell2010
+    build-depends: base <5
+    autogen-modules: PackageInfo_pkg
+    exposed-modules: PackageInfo_pkg
+
diff --git a/cabal-testsuite/PackageTests/Check/NonConfCheck/PathsExtensions/cabal.out b/cabal-testsuite/PackageTests/Check/NonConfCheck/PathsExtensions/cabal.out
index d21149b6c45..4dab53146a7 100644
--- a/cabal-testsuite/PackageTests/Check/NonConfCheck/PathsExtensions/cabal.out
+++ b/cabal-testsuite/PackageTests/Check/NonConfCheck/PathsExtensions/cabal.out
@@ -2,4 +2,6 @@
 Warning: The package will not build sanely due to these errors:
 Warning: Packages using RebindableSyntax with OverloadedStrings or OverloadedLists in default-extensions, in conjunction with the autogenerated module Paths_*, are known to cause compile failures with Cabal < 2.2. To use these default-extensions with a Paths_* autogen module, specify at least 'cabal-version: 2.2'.
 Warning: Packages using RebindableSyntax with OverloadedStrings or OverloadedLists in default-extensions, in conjunction with the autogenerated module PackageInfo_*, are known to cause compile failures with Cabal < 2.2. To use these default-extensions with a PackageInfo_* autogen module, specify at least 'cabal-version: 2.2'.
+Warning: The following errors will cause portability problems on other environments:
+Warning: To use the autogenerated module PackageInfo_* you need to specify `cabal-version: 3.12` or higher. This is not possible in `cabal 3.10`. To use this feature and be able to upload your package to Hackage, download `cabal 3.12`!
 Warning: Hackage would reject this package.
diff --git a/changelog.d/pr-9525 b/changelog.d/pr-9525
new file mode 100644
index 00000000000..2500db3e023
--- /dev/null
+++ b/changelog.d/pr-9525
@@ -0,0 +1,10 @@
+synopsis: `check`: add PackageInfo warning
+packages: cabal-install
+prs: #9525
+issues: #9331
+
+description: {
+
+`cabal check` will warn about PackageInfo_* modules and provide an upgrade path to 3.12.
+
+}

From 8af26e3af0d93232fbe0752318531a69764ca2d5 Mon Sep 17 00:00:00 2001
From: Javier Sagredo <jasataco@gmail.com>
Date: Mon, 18 Sep 2023 17:08:08 +0200
Subject: [PATCH 107/144] Set `PKG_CONFIG_ALLOW_SYSTEM_(CFLAGS|LIBS)` by
 default

(cherry picked from commit 9f1504590d4e9fa533265ae9035668a3ef4dbc9c)
---
 Cabal/src/Distribution/Simple/Program/Builtin.hs | 14 +++++++++++---
 changelog.d/pkgconfig-envvars                    |  8 ++++++++
 2 files changed, 19 insertions(+), 3 deletions(-)
 create mode 100644 changelog.d/pkgconfig-envvars

diff --git a/Cabal/src/Distribution/Simple/Program/Builtin.hs b/Cabal/src/Distribution/Simple/Program/Builtin.hs
index 5c615fd5f51..5bb324f388f 100644
--- a/Cabal/src/Distribution/Simple/Program/Builtin.hs
+++ b/Cabal/src/Distribution/Simple/Program/Builtin.hs
@@ -343,6 +343,14 @@ cppProgram :: Program
 cppProgram = simpleProgram "cpp"
 
 pkgConfigProgram :: Program
-pkgConfigProgram = (simpleProgram "pkg-config") {
-    programFindVersion = findProgramVersion "--version" id
-  }
+pkgConfigProgram =
+  (simpleProgram "pkg-config")
+    { programFindVersion = findProgramVersion "--version" id
+    , programPostConf = \_ pkgConfProg ->
+        let programOverrideEnv' =
+              programOverrideEnv pkgConfProg
+                ++ [ ("PKG_CONFIG_ALLOW_SYSTEM_CFLAGS", Just "1")
+                   , ("PKG_CONFIG_ALLOW_SYSTEM_LIBS", Just "1")
+                   ]
+         in pure $ pkgConfProg{programOverrideEnv = programOverrideEnv'}
+    }
diff --git a/changelog.d/pkgconfig-envvars b/changelog.d/pkgconfig-envvars
new file mode 100644
index 00000000000..9b570693a44
--- /dev/null
+++ b/changelog.d/pkgconfig-envvars
@@ -0,0 +1,8 @@
+synopsis: PkgConfig environment variables
+prs: #9134
+
+description: {
+
+- `cabal` invokes `pkg-config` with `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS` and `PKG_CONFIG_ALLOW_SYSTEM_LIBS` set
+
+}

From 68159bca43af9992c757fadc9a5a4116d64acae8 Mon Sep 17 00:00:00 2001
From: Francesco Ariis <fa-ml@ariis.it>
Date: Sat, 23 Dec 2023 15:56:58 +0100
Subject: [PATCH 108/144] Relax `tar` upper bound

* Add a `Compat` module to accomodate two different `tar` interfaces.
* Tweak `-Wunused-packages` conditional (thanks Phil de Joux)
---
 Cabal-tests/Cabal-tests.cabal                 |  2 +-
 cabal-install/cabal-install.cabal             |  7 +-
 .../src/Distribution/Client/Compat/Tar.hs     | 68 +++++++++++++++++++
 cabal-install/src/Distribution/Client/Tar.hs  | 36 +++-------
 .../UnitTests/Distribution/Client/Tar.hs      | 24 ++++---
 5 files changed, 95 insertions(+), 42 deletions(-)
 create mode 100644 cabal-install/src/Distribution/Client/Compat/Tar.hs

diff --git a/Cabal-tests/Cabal-tests.cabal b/Cabal-tests/Cabal-tests.cabal
index f6a8c2c1481..42e8945969e 100644
--- a/Cabal-tests/Cabal-tests.cabal
+++ b/Cabal-tests/Cabal-tests.cabal
@@ -160,7 +160,7 @@ test-suite hackage-tests
     , clock                 >=0.8      && <0.9
     , optparse-applicative  >=0.13.2.0 && <0.19
     , stm                   >=2.4.5.0  && <2.6
-    , tar                   >=0.5.0.3  && <0.6
+    , tar                   >=0.5.0.3  && <0.7
     , tree-diff             >=0.1      && <0.4
 
   ghc-options:        -Wall -rtsopts -threaded
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 344cf8249af..b0cd99ed7d3 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -42,7 +42,9 @@ common warnings
     ghc-options: -Wall -Wcompat -Wnoncanonical-monad-instances -Wincomplete-uni-patterns -Wincomplete-record-updates
     if impl(ghc < 8.8)
       ghc-options: -Wnoncanonical-monadfail-instances
-    if impl(ghc >=8.10)
+    if impl(ghc >=9.0)
+      -- Warning: even though introduced with GHC 8.10, -Wunused-packages
+      -- gives false positives with GHC 8.10.
       ghc-options: -Wunused-packages
 
 common base-dep
@@ -103,6 +105,7 @@ library
         Distribution.Client.Compat.Orphans
         Distribution.Client.Compat.Prelude
         Distribution.Client.Compat.Semaphore
+        Distribution.Client.Compat.Tar
         Distribution.Client.Config
         Distribution.Client.Configure
         Distribution.Client.Dependency
@@ -224,7 +227,7 @@ library
         process    >= 1.2.3.0  && < 1.7,
         random     >= 1.2      && < 1.3,
         stm        >= 2.0      && < 2.6,
-        tar        >= 0.5.0.3  && < 0.6,
+        tar        >= 0.5.0.3  && < 0.7,
         time       >= 1.5.0.1  && < 1.13,
         zlib       >= 0.5.3    && < 0.7,
         hackage-security >= 0.6.2.0 && < 0.7,
diff --git a/cabal-install/src/Distribution/Client/Compat/Tar.hs b/cabal-install/src/Distribution/Client/Compat/Tar.hs
new file mode 100644
index 00000000000..8597c61fede
--- /dev/null
+++ b/cabal-install/src/Distribution/Client/Compat/Tar.hs
@@ -0,0 +1,68 @@
+{-# LANGUAGE CPP #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+
+{- FOURMOLU_DISABLE -}
+module Distribution.Client.Compat.Tar
+  ( extractTarGzFile
+#if MIN_VERSION_tar(0,6,0)
+  , Tar.Entry
+  , Tar.Entries
+  , Tar.GenEntries (..)
+  , Tar.GenEntryContent (..)
+  , Tar.entryContent
+#else
+  , Tar.Entries (..)
+  , Tar.Entry (..)
+  , Tar.EntryContent (..)
+#endif
+  ) where
+{- FOURMOLU_ENABLE -}
+
+import Distribution.Client.Compat.Prelude
+import Prelude ()
+
+import qualified Codec.Archive.Tar as Tar
+import qualified Codec.Archive.Tar.Check as Tar
+#if MIN_VERSION_tar(0,6,0)
+#else
+import qualified Codec.Archive.Tar.Entry as Tar
+#endif
+import qualified Data.ByteString.Lazy as BS
+import qualified Distribution.Client.GZipUtils as GZipUtils
+
+instance (Exception a, Exception b) => Exception (Either a b) where
+  toException (Left e) = toException e
+  toException (Right e) = toException e
+
+  fromException e =
+    case fromException e of
+      Just e' -> Just (Left e')
+      Nothing -> case fromException e of
+        Just e' -> Just (Right e')
+        Nothing -> Nothing
+
+{- FOURMOLU_DISABLE -}
+extractTarGzFile
+  :: FilePath
+  -- ^ Destination directory
+  -> FilePath
+  -- ^ Expected subdir (to check for tarbombs)
+  -> FilePath
+  -- ^ Tarball
+  -> IO ()
+extractTarGzFile dir expected tar =
+#if MIN_VERSION_tar(0,6,0)
+  Tar.unpackAndCheck
+    ( \x ->
+        SomeException <$> Tar.checkEntryTarbomb expected x
+          <|> SomeException <$> Tar.checkEntrySecurity x
+    )
+    dir
+#else
+  Tar.unpack dir
+    . Tar.checkTarbomb expected
+#endif
+  . Tar.read
+  . GZipUtils.maybeDecompress
+  =<< BS.readFile tar
+{- FOURMOLU_ENABLE -}
diff --git a/cabal-install/src/Distribution/Client/Tar.hs b/cabal-install/src/Distribution/Client/Tar.hs
index d59dcf8160a..f9b146a3dd4 100644
--- a/cabal-install/src/Distribution/Client/Tar.hs
+++ b/cabal-install/src/Distribution/Client/Tar.hs
@@ -14,10 +14,11 @@
 -- Reading, writing and manipulating \"@.tar@\" archive files.
 --
 -----------------------------------------------------------------------------
-module Distribution.Client.Tar (
-  -- * @tar.gz@ operations
+
+module Distribution.Client.Tar
+  ( -- * @tar.gz@ operations
   createTarGzFile,
-  extractTarGzFile,
+  TarComp.extractTarGzFile,
 
   -- * Other local utils
   buildTreeRefTypeCode,
@@ -31,12 +32,11 @@ module Distribution.Client.Tar (
 import Distribution.Client.Compat.Prelude
 import Prelude ()
 
-import qualified Data.ByteString.Lazy    as BS
-import qualified Codec.Archive.Tar       as Tar
+import qualified Codec.Archive.Tar as Tar
 import qualified Codec.Archive.Tar.Entry as Tar
-import qualified Codec.Archive.Tar.Check as Tar
-import qualified Codec.Compression.GZip  as GZip
-import qualified Distribution.Client.GZipUtils as GZipUtils
+import qualified Codec.Compression.GZip as GZip
+import qualified Data.ByteString.Lazy as BS
+import qualified Distribution.Client.Compat.Tar as TarComp
 
 -- for foldEntries...
 import Control.Exception (throw)
@@ -52,26 +52,6 @@ createTarGzFile :: FilePath  -- ^ Full Tarball path
 createTarGzFile tar base dir =
   BS.writeFile tar . GZip.compress . Tar.write =<< Tar.pack base [dir]
 
-extractTarGzFile :: FilePath -- ^ Destination directory
-                 -> FilePath -- ^ Expected subdir (to check for tarbombs)
-                 -> FilePath -- ^ Tarball
-                -> IO ()
-extractTarGzFile dir expected tar =
-  Tar.unpack dir . Tar.checkTarbomb expected . Tar.read
-  . GZipUtils.maybeDecompress =<< BS.readFile tar
-
-instance (Exception a, Exception b) => Exception (Either a b) where
-  toException (Left  e) = toException e
-  toException (Right e) = toException e
-
-  fromException e =
-    case fromException e of
-      Just e' -> Just (Left e')
-      Nothing -> case fromException e of
-                   Just e' -> Just (Right e')
-                   Nothing -> Nothing
-
-
 -- | Type code for the local build tree reference entry type. We don't use the
 -- symbolic link entry type because it allows only 100 ASCII characters for the
 -- path.
diff --git a/cabal-install/tests/UnitTests/Distribution/Client/Tar.hs b/cabal-install/tests/UnitTests/Distribution/Client/Tar.hs
index 8b70dd89e4c..62f725e270e 100644
--- a/cabal-install/tests/UnitTests/Distribution/Client/Tar.hs
+++ b/cabal-install/tests/UnitTests/Distribution/Client/Tar.hs
@@ -2,17 +2,17 @@ module UnitTests.Distribution.Client.Tar (
   tests
   ) where
 
-import Distribution.Client.Tar ( filterEntries
-                               , filterEntriesM
-                               )
-import Codec.Archive.Tar       ( Entries(..)
-                               , foldEntries
-                               )
-import Codec.Archive.Tar.Entry ( EntryContent(..)
-                               , simpleEntry
-                               , Entry(..)
-                               , toTarPath
-                               )
+import Codec.Archive.Tar
+  ( foldEntries
+  )
+import Codec.Archive.Tar.Entry
+  ( simpleEntry
+  , toTarPath
+  )
+import Distribution.Client.Tar
+  ( filterEntries
+  , filterEntriesM
+  )
 
 import Test.Tasty
 import Test.Tasty.HUnit
@@ -21,6 +21,8 @@ import qualified Data.ByteString.Lazy as BS
 import qualified Data.ByteString.Lazy.Char8 as BS.Char8
 import Control.Monad.Writer.Lazy (runWriterT, tell)
 
+import Distribution.Client.Compat.Tar
+
 tests :: [TestTree]
 tests = [ testCase "filterEntries" filterTest
         , testCase "filterEntriesM" filterMTest

From c805ff174583652eeedd775ef5f90c9aa04d8ad4 Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Fri, 12 Jan 2024 22:15:22 +0100
Subject: [PATCH 109/144] Account for .buildinfo in repl when build-type:
 Configure (backport #9440) (#9612)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Account for .buildinfo in repl when build-type: Configure (#9440)

In `autoconfUserHooks` we were not updating the `preRepl` hook to read
additional build information from /package/@.buildinfo@.

Additionally updates `autoconfUserHooks` to read additional build info
information for the remaining pre-hooks that are not pre-conf.

Fixes #9401

(cherry picked from commit ee1e6b81cbbe30da42e5d3027536c7030af03ef5)

# Conflicts:
#	Cabal/src/Distribution/Simple.hs

* Update Simple.hs

---------

Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita@gmail.com>
Co-authored-by: Hécate Moonlight <Kleidukos@users.noreply.github.com>
---
 Cabal/src/Distribution/Simple.hs | 10 ++++++----
 changelog.d/issue-9401           | 11 +++++++++++
 2 files changed, 17 insertions(+), 4 deletions(-)
 create mode 100644 changelog.d/issue-9401

diff --git a/Cabal/src/Distribution/Simple.hs b/Cabal/src/Distribution/Simple.hs
index 77ba089fa98..52b7c4c41ce 100644
--- a/Cabal/src/Distribution/Simple.hs
+++ b/Cabal/src/Distribution/Simple.hs
@@ -576,8 +576,7 @@ simpleUserHooks =
 --
 -- * 'postConf' runs @.\/configure@, if present.
 --
--- * the pre-hooks 'preBuild', 'preClean', 'preCopy', 'preInst',
---   'preReg' and 'preUnreg' read additional build information from
+-- * the pre-hooks, except for pre-conf, read additional build information from
 --   /package/@.buildinfo@, if present.
 --
 -- Thus @configure@ can use local system information to generate
@@ -588,14 +587,17 @@ autoconfUserHooks
     = simpleUserHooks
       {
        postConf    = defaultPostConf,
-       preBuild    = readHookWithArgs buildVerbosity buildDistPref, -- buildCabalFilePath,
+       preBuild = readHookWithArgs buildVerbosity buildDistPref,
+       preRepl = readHookWithArgs replVerbosity replDistPref,
        preCopy     = readHookWithArgs copyVerbosity copyDistPref,
        preClean    = readHook cleanVerbosity cleanDistPref,
        preInst     = readHook installVerbosity installDistPref,
        preHscolour = readHook hscolourVerbosity hscolourDistPref,
        preHaddock  = readHookWithArgs haddockVerbosity haddockDistPref,
        preReg      = readHook regVerbosity regDistPref,
-       preUnreg    = readHook regVerbosity regDistPref
+       preUnreg    = readHook regVerbosity regDistPref,
+       preTest     = readHookWithArgs testVerbosity testDistPref,
+       preBench    = readHookWithArgs benchmarkVerbosity benchmarkDistPref
       }
     where defaultPostConf :: Args -> ConfigFlags -> PackageDescription
                           -> LocalBuildInfo -> IO ()
diff --git a/changelog.d/issue-9401 b/changelog.d/issue-9401
new file mode 100644
index 00000000000..40487976543
--- /dev/null
+++ b/changelog.d/issue-9401
@@ -0,0 +1,11 @@
+synopsis: Account for .buildinfo in repl, test, and bench
+packages: Cabal
+prs: #9440
+issues: #9401
+
+description: {
+
+Generated <project>.buildinfo is now respected in cabal repl, cabal test and cabal bench.
+
+}
+

From 5b2f3f74782bc18a7cd916d94f8fd5cee7350b80 Mon Sep 17 00:00:00 2001
From: brandon s allbery kf8nh <allbery.b@gmail.com>
Date: Tue, 16 Jan 2024 12:11:46 -0500
Subject: [PATCH 110/144] update jinja2 per CVE-2024-22195

(cherry picked from commit f1908283c214d9459948b48a226a3fb92821dbae)

# Conflicts:
#	doc/requirements.in
#	doc/requirements.txt
---
 doc/requirements.in  | 9 +++++++++
 doc/requirements.txt | 8 ++++++++
 2 files changed, 17 insertions(+)

diff --git a/doc/requirements.in b/doc/requirements.in
index df0b2f34d80..9d7568e3c63 100644
--- a/doc/requirements.in
+++ b/doc/requirements.in
@@ -4,5 +4,14 @@ sphinx-jsonschema
 sphinxnotes-strike
 # Pygments>=2.7.4 suggested by CVE-2021-20270 CVE-2021-27291
 Pygments >= 2.7.4
+<<<<<<< HEAD
 # Suggested by dependabot in https://github.com/haskell/cabal/pull/8807
 certifi >= 2022.12.7
+=======
+# CVE-2023-37920
+certifi >= 2023.07.22
+# CVE-2023-45803
+urllib3 >= 2.0.7
+# CVE-2024-22195
+jinja2 == 3.1.3
+>>>>>>> f1908283c (update jinja2 per CVE-2024-22195)
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 441ab0baab0..6f396792aa9 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -23,9 +23,17 @@ idna==2.10
     # via requests
 imagesize==1.4.1
     # via sphinx
+<<<<<<< HEAD
 jinja2==3.1.2
     # via sphinx
 jsonpointer==2.1
+=======
+jinja2==3.1.3
+    # via
+    #   -r requirements.in
+    #   sphinx
+jsonpointer==2.3
+>>>>>>> f1908283c (update jinja2 per CVE-2024-22195)
     # via sphinx-jsonschema
 markupsafe==2.1.2
     # via jinja2

From 8fa3eae08728b5df3e770e3577dd32c629dbc845 Mon Sep 17 00:00:00 2001
From: brandon s allbery kf8nh <allbery.b@gmail.com>
Date: Thu, 18 Jan 2024 18:09:40 -0500
Subject: [PATCH 111/144] fix conflicts

---
 doc/requirements.in  | 5 -----
 doc/requirements.txt | 6 ------
 2 files changed, 11 deletions(-)

diff --git a/doc/requirements.in b/doc/requirements.in
index 9d7568e3c63..c8a3a7692a2 100644
--- a/doc/requirements.in
+++ b/doc/requirements.in
@@ -4,14 +4,9 @@ sphinx-jsonschema
 sphinxnotes-strike
 # Pygments>=2.7.4 suggested by CVE-2021-20270 CVE-2021-27291
 Pygments >= 2.7.4
-<<<<<<< HEAD
-# Suggested by dependabot in https://github.com/haskell/cabal/pull/8807
-certifi >= 2022.12.7
-=======
 # CVE-2023-37920
 certifi >= 2023.07.22
 # CVE-2023-45803
 urllib3 >= 2.0.7
 # CVE-2024-22195
 jinja2 == 3.1.3
->>>>>>> f1908283c (update jinja2 per CVE-2024-22195)
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 6f396792aa9..b9cddab40e4 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -23,17 +23,11 @@ idna==2.10
     # via requests
 imagesize==1.4.1
     # via sphinx
-<<<<<<< HEAD
-jinja2==3.1.2
-    # via sphinx
-jsonpointer==2.1
-=======
 jinja2==3.1.3
     # via
     #   -r requirements.in
     #   sphinx
 jsonpointer==2.3
->>>>>>> f1908283c (update jinja2 per CVE-2024-22195)
     # via sphinx-jsonschema
 markupsafe==2.1.2
     # via jinja2

From 2c0ab5bb88fbe75f9bc9aa2bfb6e04268da13c71 Mon Sep 17 00:00:00 2001
From: Javier Sagredo <javier.sagredo@iohk.io>
Date: Fri, 15 Dec 2023 17:11:08 +0100
Subject: [PATCH 112/144] Fix extra-prog-path propagation in the codebase.

Extra prog paths were being handled in many different ways all thorugh
the codebase. This PR introduces a unified way to look at them.

Aiming for traceability, the addition of extra paths is now traced via
`logExtraProgramSearchPath`. All appearances of
`modifyProgramSearchPath` are replaced with `appendProgramSearchPath`
which traces the added paths.

`progInvokePathEnv` was only being set by GHC for some paths to
executables in components and only under certain circumstances. Now
every `ghcInvocation` sets the extra paths directly into `pkgInvokeEnv`.

In particular this fixes PATH issues when running MinGW cabal in
PowerShell, as usually for other OSes the system path contains most of
the expected directories.

(cherry picked from commit 46df8ba712470ef8f80ef1256861b1e0a37a0976)

# Conflicts:
#	Cabal/src/Distribution/Simple/Configure.hs
#	Cabal/src/Distribution/Simple/ConfigureScript.hs
#	Cabal/src/Distribution/Simple/GHC.hs
#	Cabal/src/Distribution/Simple/GHCJS.hs
#	Cabal/src/Distribution/Simple/Program/Db.hs
#	Cabal/src/Distribution/Simple/Program/Find.hs
#	Cabal/src/Distribution/Simple/Program/GHC.hs
#	Cabal/src/Distribution/Simple/Program/Run.hs
#	Cabal/src/Distribution/Simple/Program/Types.hs
#	cabal-install/src/Distribution/Client/CmdExec.hs
#	cabal-install/src/Distribution/Client/CmdInstall.hs
#	cabal-install/src/Distribution/Client/CmdRun.hs
#	cabal-install/src/Distribution/Client/Config.hs
#	cabal-install/src/Distribution/Client/Get.hs
#	cabal-install/src/Distribution/Client/HttpUtils.hs
#	cabal-install/src/Distribution/Client/ProjectConfig.hs
#	cabal-install/src/Distribution/Client/ProjectOrchestration.hs
#	cabal-install/src/Distribution/Client/ProjectPlanning.hs
#	cabal-install/src/Distribution/Client/SetupWrapper.hs
#	cabal-install/src/Distribution/Client/VCS.hs
#	cabal-install/tests/UnitTests/Distribution/Client/Get.hs
#	cabal-install/tests/UnitTests/Distribution/Client/VCS.hs
---
 Cabal/src/Distribution/Simple/Configure.hs    |  63 ++++++++-
 .../Distribution/Simple/ConfigureScript.hs    |   7 +
 Cabal/src/Distribution/Simple/GHC.hs          |   9 ++
 Cabal/src/Distribution/Simple/GHCJS.hs        |   7 +
 Cabal/src/Distribution/Simple/Program/Db.hs   |  49 +++++++
 Cabal/src/Distribution/Simple/Program/Find.hs |  50 +++++++
 Cabal/src/Distribution/Simple/Program/GHC.hs  |  37 ++++-
 Cabal/src/Distribution/Simple/Program/Run.hs  |  95 ++++++++++++-
 .../src/Distribution/Simple/Program/Types.hs  |  33 +++++
 .../src/Distribution/Client/CmdExec.hs        |  48 +++++++
 .../src/Distribution/Client/CmdInstall.hs     | 112 +++++++++++++++
 .../src/Distribution/Client/CmdRun.hs         | 131 ++++++++++++++++++
 .../src/Distribution/Client/Config.hs         |  37 +++++
 cabal-install/src/Distribution/Client/Get.hs  |  48 +++++++
 .../src/Distribution/Client/HttpUtils.hs      |  82 +++++++++++
 .../src/Distribution/Client/ProjectConfig.hs  |   7 +
 .../Client/ProjectOrchestration.hs            |  13 ++
 .../Distribution/Client/ProjectPlanning.hs    |  36 +++++
 .../src/Distribution/Client/SetupWrapper.hs   |  60 ++++++++
 cabal-install/src/Distribution/Client/VCS.hs  |  48 +++++++
 .../UnitTests/Distribution/Client/Get.hs      | 129 +++++++++++++++++
 .../UnitTests/Distribution/Client/VCS.hs      |  45 ++++++
 changelog.d/propagate-extra-prog-path         |  13 ++
 23 files changed, 1154 insertions(+), 5 deletions(-)
 create mode 100644 changelog.d/propagate-extra-prog-path

diff --git a/Cabal/src/Distribution/Simple/Configure.hs b/Cabal/src/Distribution/Simple/Configure.hs
index ac7bd852f0d..8e8a0acca47 100644
--- a/Cabal/src/Distribution/Simple/Configure.hs
+++ b/Cabal/src/Distribution/Simple/Configure.hs
@@ -73,11 +73,19 @@ import Distribution.PackageDescription.Configuration
 import Distribution.PackageDescription.Check hiding (doesFileExist)
 import Distribution.Simple.BuildToolDepends
 import Distribution.Simple.Program
+<<<<<<< HEAD
 import Distribution.Simple.Setup as Setup
 import Distribution.Simple.BuildTarget
 import Distribution.Simple.LocalBuildInfo
 import Distribution.Types.PackageVersionConstraint
 import Distribution.Types.LocalBuildInfo
+=======
+import Distribution.Simple.Program.Db (appendProgramSearchPath, lookupProgramByName)
+import Distribution.Simple.Setup.Common as Setup
+import Distribution.Simple.Setup.Config as Setup
+import Distribution.Simple.Utils
+import Distribution.System
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import Distribution.Types.ComponentRequestedSpec
 import Distribution.Types.GivenComponent
 import Distribution.Simple.Utils
@@ -391,6 +399,7 @@ configure (pkg_descr0, pbi) cfg = do
     let internalPackageSet :: Set LibraryName
         internalPackageSet = getInternalLibraries pkg_descr0
 
+<<<<<<< HEAD
     -- Make a data structure describing what components are enabled.
     let enabled :: ComponentRequestedSpec
         enabled = case mb_cname of
@@ -412,6 +421,23 @@ configure (pkg_descr0, pbi) cfg = do
         die' verbosity $
               "--enable-tests/--enable-benchmarks are incompatible with" ++
               " explicitly specifying a component to configure."
+=======
+  programDbPre <- mkProgramDb cfg (configPrograms cfg)
+  -- comp:            the compiler we're building with
+  -- compPlatform:    the platform we're building for
+  -- programDb:  location and args of all programs we're
+  --                  building with
+  ( comp :: Compiler
+    , compPlatform :: Platform
+    , programDb00 :: ProgramDb
+    ) <-
+    configCompilerEx
+      (flagToMaybe (configHcFlavor cfg))
+      (flagToMaybe (configHcPath cfg))
+      (flagToMaybe (configHcPkg cfg))
+      programDbPre
+      (lessVerbose verbosity)
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
     -- Some sanity checks related to dynamic/static linking.
     when (fromFlag (configDynExe cfg) && fromFlag (configFullyStaticExe cfg)) $
@@ -843,9 +869,18 @@ configure (pkg_descr0, pbi) cfg = do
     where
       verbosity = fromFlag (configVerbosity cfg)
 
-mkProgramDb :: ConfigFlags -> ProgramDb -> ProgramDb
-mkProgramDb cfg initialProgramDb = programDb
+-- | Adds the extra program paths from the flags provided to @configure@ as
+-- well as specified locations for certain known programs and their default
+-- arguments.
+mkProgramDb :: ConfigFlags -> ProgramDb -> IO ProgramDb
+mkProgramDb cfg initialProgramDb = do
+  programDb <- appendProgramSearchPath (fromFlagOrDefault normal (configVerbosity cfg)) searchpath initialProgramDb
+  pure
+    . userSpecifyArgss (configProgramArgs cfg)
+    . userSpecifyPaths (configProgramPaths cfg)
+    $ programDb
   where
+<<<<<<< HEAD
     programDb  = userSpecifyArgss (configProgramArgs cfg)
                  . userSpecifyPaths (configProgramPaths cfg)
                  . setProgramSearchPath searchpath
@@ -853,6 +888,16 @@ mkProgramDb cfg initialProgramDb = programDb
     searchpath = map ProgramSearchPathDir
                  (fromNubList $ configProgramPathExtra cfg)
                  ++ getProgramSearchPath initialProgramDb
+=======
+    searchpath = fromNubList $ configProgramPathExtra cfg
+
+-- Note. We try as much as possible to _prepend_ rather than postpend the extra-prog-path
+-- so that we can override the system path. However, in a v2-build, at this point, the "system" path
+-- has already been extended by both the built-tools-depends paths, as well as the program-path-extra
+-- so for v2 builds adding it again is entirely unnecessary. However, it needs to get added again _anyway_
+-- so as to take effect for v1 builds or standalone calls to Setup.hs
+-- In this instance, the lesser evil is to not allow it to override the system path.
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 -- -----------------------------------------------------------------------------
 -- Helper functions for configure
@@ -1700,6 +1745,7 @@ ccLdOptionsBuildInfo cflags ldflags ldflags_static =
 -- -----------------------------------------------------------------------------
 -- Determining the compiler details
 
+<<<<<<< HEAD
 configCompilerAuxEx :: ConfigFlags
                     -> IO (Compiler, Platform, ProgramDb)
 configCompilerAuxEx cfg = configCompilerEx (flagToMaybe $ configHcFlavor cfg)
@@ -1709,6 +1755,19 @@ configCompilerAuxEx cfg = configCompilerEx (flagToMaybe $ configHcFlavor cfg)
                                            (fromFlag (configVerbosity cfg))
   where
     programDb = mkProgramDb cfg defaultProgramDb
+=======
+configCompilerAuxEx
+  :: ConfigFlags
+  -> IO (Compiler, Platform, ProgramDb)
+configCompilerAuxEx cfg = do
+  programDb <- mkProgramDb cfg defaultProgramDb
+  configCompilerEx
+    (flagToMaybe $ configHcFlavor cfg)
+    (flagToMaybe $ configHcPath cfg)
+    (flagToMaybe $ configHcPkg cfg)
+    programDb
+    (fromFlag (configVerbosity cfg))
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 configCompilerEx :: Maybe CompilerFlavor -> Maybe FilePath -> Maybe FilePath
                  -> ProgramDb -> Verbosity
diff --git a/Cabal/src/Distribution/Simple/ConfigureScript.hs b/Cabal/src/Distribution/Simple/ConfigureScript.hs
index 9c3e5c8874b..91eff3b06b4 100644
--- a/Cabal/src/Distribution/Simple/ConfigureScript.hs
+++ b/Cabal/src/Distribution/Simple/ConfigureScript.hs
@@ -137,10 +137,17 @@ runConfigureScript verbosity flags lbi = do
       maybeHostFlag = if hp == buildPlatform then [] else ["--host=" ++ show (pretty hp)]
       args' = configureFile':args ++ ["CC=" ++ ccProgShort] ++ maybeHostFlag
       shProg = simpleProgram "sh"
+<<<<<<< HEAD
       progDb = modifyProgramSearchPath
                (\p -> map ProgramSearchPathDir extraPath ++ p) emptyProgramDb
   shConfiguredProg <- lookupProgram shProg
                       `fmap` configureProgram  verbosity shProg progDb
+=======
+  progDb <- appendProgramSearchPath verbosity extraPath emptyProgramDb
+  shConfiguredProg <-
+    lookupProgram shProg
+      `fmap` configureProgram verbosity shProg progDb
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   case shConfiguredProg of
       Just sh -> runProgramInvocation verbosity $
                  (programInvocation (sh {programOverrideEnv = overEnv}) args')
diff --git a/Cabal/src/Distribution/Simple/GHC.hs b/Cabal/src/Distribution/Simple/GHC.hs
index 1fbd153187f..a9e3f1e7867 100644
--- a/Cabal/src/Distribution/Simple/GHC.hs
+++ b/Cabal/src/Distribution/Simple/GHC.hs
@@ -1889,8 +1889,17 @@ libAbiHash verbosity _pkg_descr lbi lib clbi = do
         | otherwise = error "libAbiHash: Can't find an enabled library way"
 
   (ghcProg, _) <- requireProgram verbosity ghcProgram (withPrograms lbi)
+<<<<<<< HEAD
   hash <- getProgramInvocationOutput verbosity
           (ghcInvocation ghcProg comp platform ghcArgs)
+=======
+
+  hash <-
+    getProgramInvocationOutput
+      verbosity
+      =<< ghcInvocation verbosity ghcProg comp platform ghcArgs
+
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   return (takeWhile (not . isSpace) hash)
 
 componentGhcOptions :: Verbosity -> LocalBuildInfo
diff --git a/Cabal/src/Distribution/Simple/GHCJS.hs b/Cabal/src/Distribution/Simple/GHCJS.hs
index dcd5b3230d9..5aed74f5bcb 100644
--- a/Cabal/src/Distribution/Simple/GHCJS.hs
+++ b/Cabal/src/Distribution/Simple/GHCJS.hs
@@ -1601,8 +1601,15 @@ libAbiHash verbosity _pkg_descr lbi lib clbi = do
         | otherwise = error "libAbiHash: Can't find an enabled library way"
 
   (ghcjsProg, _) <- requireProgram verbosity ghcjsProgram (withPrograms lbi)
+<<<<<<< HEAD
   hash <- getProgramInvocationOutput verbosity
           (ghcInvocation ghcjsProg comp platform ghcArgs)
+=======
+  hash <-
+    getProgramInvocationOutput
+      verbosity
+      =<< ghcInvocation verbosity ghcjsProg comp platform ghcArgs
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   return (takeWhile (not . isSpace) hash)
 
 componentGhcOptions :: Verbosity -> LocalBuildInfo
diff --git a/Cabal/src/Distribution/Simple/Program/Db.hs b/Cabal/src/Distribution/Simple/Program/Db.hs
index 4657e19b059..8399d9c247f 100644
--- a/Cabal/src/Distribution/Simple/Program/Db.hs
+++ b/Cabal/src/Distribution/Simple/Program/Db.hs
@@ -32,6 +32,7 @@ module Distribution.Simple.Program.Db (
     restoreProgramDb,
 
     -- ** Query and manipulate the program db
+<<<<<<< HEAD
     addKnownProgram,
     addKnownPrograms,
     lookupKnownProgram,
@@ -48,6 +49,26 @@ module Distribution.Simple.Program.Db (
     lookupProgram,
     updateProgram,
     configuredPrograms,
+=======
+  , addKnownProgram
+  , addKnownPrograms
+  , appendProgramSearchPath
+  , lookupKnownProgram
+  , knownPrograms
+  , getProgramSearchPath
+  , setProgramSearchPath
+  , modifyProgramSearchPath
+  , userSpecifyPath
+  , userSpecifyPaths
+  , userMaybeSpecifyPath
+  , userSpecifyArgs
+  , userSpecifyArgss
+  , userSpecifiedArgs
+  , lookupProgram
+  , lookupProgramByName
+  , updateProgram
+  , configuredPrograms
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
     -- ** Query and manipulate the program db
     configureProgram,
@@ -222,6 +243,7 @@ modifyProgramSearchPath :: (ProgramSearchPath -> ProgramSearchPath)
 modifyProgramSearchPath f db =
   setProgramSearchPath (f $ getProgramSearchPath db) db
 
+<<<<<<< HEAD
 -- |User-specify this path.  Basically override any path information
 -- for this program in the configuration. If it's not a known
 -- program ignore it.
@@ -229,6 +251,33 @@ modifyProgramSearchPath f db =
 userSpecifyPath :: String   -- ^Program name
                 -> FilePath -- ^user-specified path to the program
                 -> ProgramDb -> ProgramDb
+=======
+-- | Modify the current 'ProgramSearchPath' used by the 'ProgramDb'
+-- by appending the provided extra paths. Also logs the added paths
+-- in info verbosity.
+appendProgramSearchPath
+  :: Verbosity
+  -> [FilePath]
+  -> ProgramDb
+  -> IO ProgramDb
+appendProgramSearchPath verbosity extraPaths db =
+  if not $ null extraPaths
+    then do
+      logExtraProgramSearchPath verbosity extraPaths
+      pure $ modifyProgramSearchPath (map ProgramSearchPathDir extraPaths ++) db
+    else pure db
+
+-- | User-specify this path.  Basically override any path information
+--  for this program in the configuration. If it's not a known
+--  program ignore it.
+userSpecifyPath
+  :: String
+  -- ^ Program name
+  -> FilePath
+  -- ^ user-specified path to the program
+  -> ProgramDb
+  -> ProgramDb
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 userSpecifyPath name path = updateUnconfiguredProgs $
   flip Map.update name $ \(prog, _, args) -> Just (prog, Just path, args)
 
diff --git a/Cabal/src/Distribution/Simple/Program/Find.hs b/Cabal/src/Distribution/Simple/Program/Find.hs
index 1e8497e1e1a..5602d354fdf 100644
--- a/Cabal/src/Distribution/Simple/Program/Find.hs
+++ b/Cabal/src/Distribution/Simple/Program/Find.hs
@@ -24,6 +24,7 @@
 -- So we need an extension of the usual 'findExecutable' that can look in
 -- additional locations, either before, after or instead of the normal OS
 -- locations.
+<<<<<<< HEAD
 --
 module Distribution.Simple.Program.Find (
     -- * Program search path
@@ -33,6 +34,19 @@ module Distribution.Simple.Program.Find (
     findProgramOnSearchPath,
     programSearchPathAsPATHVar,
     getSystemSearchPath,
+=======
+module Distribution.Simple.Program.Find
+  ( -- * Program search path
+    ProgramSearchPath
+  , ProgramSearchPathEntry (..)
+  , defaultProgramSearchPath
+  , findProgramOnSearchPath
+  , programSearchPathAsPATHVar
+  , logExtraProgramSearchPath
+  , getSystemSearchPath
+  , getExtraPathEnv
+  , simpleProgram
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   ) where
 
 import Prelude ()
@@ -76,8 +90,25 @@ instance Structured ProgramSearchPathEntry
 defaultProgramSearchPath :: ProgramSearchPath
 defaultProgramSearchPath = [ProgramSearchPathDefault]
 
+<<<<<<< HEAD
 findProgramOnSearchPath :: Verbosity -> ProgramSearchPath
                         -> FilePath -> IO (Maybe (FilePath, [FilePath]))
+=======
+logExtraProgramSearchPath
+  :: Verbosity
+  -> [FilePath]
+  -> IO ()
+logExtraProgramSearchPath verbosity extraPaths =
+  info verbosity . unlines $
+    "Including the following directories in PATH:"
+      : map ("- " ++) extraPaths
+
+findProgramOnSearchPath
+  :: Verbosity
+  -> ProgramSearchPath
+  -> FilePath
+  -> IO (Maybe (FilePath, [FilePath]))
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 findProgramOnSearchPath verbosity searchpath prog = do
     debug verbosity $ "Searching for " ++ prog ++ " in path."
     res <- tryPathElems [] searchpath
@@ -141,6 +172,25 @@ findProgramOnSearchPath verbosity searchpath prog = do
         Just _  -> return a
         Nothing -> firstJustM mas
 
+-- | Adds some paths to the "PATH" entry in the key-value environment provided
+-- or if there is none, looks up @$PATH@ in the real environment.
+getExtraPathEnv
+  :: Verbosity
+  -> [(String, Maybe String)]
+  -> [FilePath]
+  -> IO [(String, Maybe String)]
+getExtraPathEnv _ _ [] = return []
+getExtraPathEnv verbosity env extras = do
+  mb_path <- case lookup "PATH" env of
+    Just x -> return x
+    Nothing -> lookupEnv "PATH"
+  logExtraProgramSearchPath verbosity extras
+  let extra = intercalate [searchPathSeparator] extras
+      path' = case mb_path of
+        Nothing -> extra
+        Just path -> extra ++ searchPathSeparator : path
+  return [("PATH", Just path')]
+
 -- | Interpret a 'ProgramSearchPath' to construct a new @$PATH@ env var.
 -- Note that this is close but not perfect because on Windows the search
 -- algorithm looks at more than just the @%PATH%@.
diff --git a/Cabal/src/Distribution/Simple/Program/GHC.hs b/Cabal/src/Distribution/Simple/Program/GHC.hs
index 902422c253f..ee3f8d8bc3f 100644
--- a/Cabal/src/Distribution/Simple/Program/GHC.hs
+++ b/Cabal/src/Distribution/Simple/Program/GHC.hs
@@ -31,6 +31,12 @@ import Distribution.PackageDescription
 import Distribution.ModuleName
 import Distribution.Simple.Compiler
 import Distribution.Simple.Flag
+<<<<<<< HEAD
+=======
+import Distribution.Simple.GHC.ImplInfo
+import Distribution.Simple.Program.Find (getExtraPathEnv)
+import Distribution.Simple.Program.Run
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import Distribution.Simple.Program.Types
 import Distribution.Simple.Program.Run
 import Distribution.System
@@ -529,11 +535,21 @@ data GhcOptions = GhcOptions {
   -- | Get GHC to be quiet or verbose with what it's doing; the @ghc -v@ flag.
   ghcOptVerbosity     :: Flag Verbosity,
 
+<<<<<<< HEAD
   -- | Put the extra folders in the PATH environment variable we invoke
   -- GHC with
   ghcOptExtraPath     :: NubListR FilePath,
 
   -- | Let GHC know that it is Cabal that's calling it.
+=======
+    ghcOptVerbosity :: Flag Verbosity
+  -- ^ Get GHC to be quiet or verbose with what it's doing; the @ghc -v@ flag.
+  , ghcOptExtraPath :: NubListR FilePath
+  -- ^ Put the extra folders in the PATH environment variable we invoke
+  -- GHC with
+  , ghcOptCabal :: Flag Bool
+  -- ^ Let GHC know that it is Cabal that's calling it.
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   -- Modifies some of the GHC error messages.
   ghcOptCabal         :: Flag Bool
 
@@ -569,8 +585,9 @@ data GhcProfAuto = GhcProfAutoAll       -- ^ @-fprof-auto@
 runGHC :: Verbosity -> ConfiguredProgram -> Compiler -> Platform  -> GhcOptions
        -> IO ()
 runGHC verbosity ghcProg comp platform opts = do
-  runProgramInvocation verbosity (ghcInvocation ghcProg comp platform opts)
+  runProgramInvocation verbosity =<< ghcInvocation verbosity ghcProg comp platform opts
 
+<<<<<<< HEAD
 
 ghcInvocation :: ConfiguredProgram -> Compiler -> Platform -> GhcOptions
               -> ProgramInvocation
@@ -578,6 +595,24 @@ ghcInvocation prog comp platform opts =
     (programInvocation prog (renderGhcOptions comp platform opts)) {
         progInvokePathEnv = fromNubListR (ghcOptExtraPath opts)
     }
+=======
+ghcInvocation
+  :: Verbosity
+  -> ConfiguredProgram
+  -> Compiler
+  -> Platform
+  -> GhcOptions
+  -> IO ProgramInvocation
+ghcInvocation verbosity ghcProg comp platform opts = do
+  -- NOTE: GHC is the only program whose path we modify with more values than
+  -- the standard @extra-prog-path@, namely the folders of the executables in
+  -- the components, see @componentGhcOptions@.
+  let envOverrides = programOverrideEnv ghcProg
+  extraPath <- getExtraPathEnv verbosity envOverrides (fromNubListR (ghcOptExtraPath opts))
+  let ghcProg' = ghcProg{programOverrideEnv = envOverrides ++ extraPath}
+
+  pure $ programInvocation ghcProg' (renderGhcOptions comp platform opts)
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 renderGhcOptions :: Compiler -> Platform -> GhcOptions -> [String]
 renderGhcOptions comp _platform@(Platform _arch os) opts
diff --git a/Cabal/src/Distribution/Simple/Program/Run.hs b/Cabal/src/Distribution/Simple/Program/Run.hs
index 66ab3ac82a7..8a765582be4 100644
--- a/Cabal/src/Distribution/Simple/Program/Run.hs
+++ b/Cabal/src/Distribution/Simple/Program/Run.hs
@@ -37,8 +37,11 @@ import Distribution.Simple.Program.Types
 import Distribution.Simple.Utils
 import Distribution.Utils.Generic
 import Distribution.Verbosity
+<<<<<<< HEAD
 
 import System.FilePath (searchPathSeparator)
+=======
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 import qualified Data.ByteString.Lazy as LBS
 import qualified Data.Map             as Map
@@ -49,6 +52,7 @@ import qualified Data.Map             as Map
 -- and actually doing it. This provides the opportunity to the caller to
 -- adjust how the program will be called. These invocations can either be run
 -- directly or turned into shell or batch scripts.
+<<<<<<< HEAD
 --
 data ProgramInvocation = ProgramInvocation {
        progInvokePath  :: FilePath,
@@ -61,6 +65,18 @@ data ProgramInvocation = ProgramInvocation {
        progInvokeInputEncoding  :: IOEncoding, -- ^ TODO: remove this, make user decide when constructing 'progInvokeInput'.
        progInvokeOutputEncoding :: IOEncoding
      }
+=======
+data ProgramInvocation = ProgramInvocation
+  { progInvokePath :: FilePath
+  , progInvokeArgs :: [String]
+  , progInvokeEnv :: [(String, Maybe String)]
+  , progInvokeCwd :: Maybe FilePath
+  , progInvokeInput :: Maybe IOData
+  , progInvokeInputEncoding :: IOEncoding
+  -- ^ TODO: remove this, make user decide when constructing 'progInvokeInput'.
+  , progInvokeOutputEncoding :: IOEncoding
+  }
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 data IOEncoding = IOEncodingText   -- locale mode text
                 | IOEncodingUTF8   -- always utf8
@@ -72,6 +88,7 @@ encodeToIOData IOEncodingUTF8 (IODataText str)     = IODataBinary (toUTF8LBS str
 
 emptyProgramInvocation :: ProgramInvocation
 emptyProgramInvocation =
+<<<<<<< HEAD
   ProgramInvocation {
     progInvokePath  = "",
     progInvokeArgs  = [],
@@ -82,6 +99,17 @@ emptyProgramInvocation =
     progInvokeInputEncoding  = IOEncodingText,
     progInvokeOutputEncoding = IOEncodingText
   }
+=======
+  ProgramInvocation
+    { progInvokePath = ""
+    , progInvokeArgs = []
+    , progInvokeEnv = []
+    , progInvokeCwd = Nothing
+    , progInvokeInput = Nothing
+    , progInvokeInputEncoding = IOEncodingText
+    , progInvokeOutputEncoding = IOEncodingText
+    }
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 simpleProgramInvocation :: FilePath -> [String] -> ProgramInvocation
 simpleProgramInvocation path args =
@@ -102,6 +130,7 @@ programInvocation prog args =
 
 
 runProgramInvocation :: Verbosity -> ProgramInvocation -> IO ()
+<<<<<<< HEAD
 runProgramInvocation verbosity
   ProgramInvocation {
     progInvokePath  = path,
@@ -145,6 +174,58 @@ runProgramInvocation verbosity
                                     path args
                                     mcwd menv
                                     (Just input) IODataModeBinary
+=======
+runProgramInvocation
+  verbosity
+  ProgramInvocation
+    { progInvokePath = path
+    , progInvokeArgs = args
+    , progInvokeEnv = []
+    , progInvokeCwd = Nothing
+    , progInvokeInput = Nothing
+    } =
+    rawSystemExit verbosity path args
+runProgramInvocation
+  verbosity
+  ProgramInvocation
+    { progInvokePath = path
+    , progInvokeArgs = args
+    , progInvokeEnv = envOverrides
+    , progInvokeCwd = mcwd
+    , progInvokeInput = Nothing
+    } = do
+    menv <- getEffectiveEnvironment envOverrides
+    maybeExit $
+      rawSystemIOWithEnv
+        verbosity
+        path
+        args
+        mcwd
+        menv
+        Nothing
+        Nothing
+        Nothing
+runProgramInvocation
+  verbosity
+  ProgramInvocation
+    { progInvokePath = path
+    , progInvokeArgs = args
+    , progInvokeEnv = envOverrides
+    , progInvokeCwd = mcwd
+    , progInvokeInput = Just inputStr
+    , progInvokeInputEncoding = encoding
+    } = do
+    menv <- getEffectiveEnvironment envOverrides
+    (_, errors, exitCode) <-
+      rawSystemStdInOut
+        verbosity
+        path
+        args
+        mcwd
+        menv
+        (Just input)
+        IODataModeBinary
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
     when (exitCode /= ExitSuccess) $
       die' verbosity $ "'" ++ path ++ "' exited with an error:\n" ++ errors
   where
@@ -180,21 +261,29 @@ getProgramInvocationIODataAndErrors
 getProgramInvocationIODataAndErrors
   verbosity
   ProgramInvocation
+<<<<<<< HEAD
     { progInvokePath          = path
     , progInvokeArgs          = args
     , progInvokeEnv           = envOverrides
     , progInvokePathEnv       = extraPath
     , progInvokeCwd           = mcwd
     , progInvokeInput         = minputStr
+=======
+    { progInvokePath = path
+    , progInvokeArgs = args
+    , progInvokeEnv = envOverrides
+    , progInvokeCwd = mcwd
+    , progInvokeInput = minputStr
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
     , progInvokeInputEncoding = encoding
     }
   mode = do
-    pathOverride <- getExtraPathEnv envOverrides extraPath
-    menv <- getEffectiveEnvironment (envOverrides ++ pathOverride)
+    menv <- getEffectiveEnvironment envOverrides
     rawSystemStdInOut verbosity path args mcwd menv input mode
   where
     input = encodeToIOData encoding <$> minputStr
 
+<<<<<<< HEAD
 getExtraPathEnv :: [(String, Maybe String)] -> [FilePath] -> IO [(String, Maybe String)]
 getExtraPathEnv _ [] = return []
 getExtraPathEnv env extras = do
@@ -207,6 +296,8 @@ getExtraPathEnv env extras = do
                     Just path -> extra ++ searchPathSeparator : path
     return [("PATH", Just path')]
 
+=======
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 -- | Return the current environment extended with the given overrides.
 -- If an entry is specified twice in @overrides@, the second entry takes
 -- precedence.
diff --git a/Cabal/src/Distribution/Simple/Program/Types.hs b/Cabal/src/Distribution/Simple/Program/Types.hs
index 4078f050185..f2684922161 100644
--- a/Cabal/src/Distribution/Simple/Program/Types.hs
+++ b/Cabal/src/Distribution/Simple/Program/Types.hs
@@ -87,6 +87,39 @@ instance Show Program where
 
 type ProgArg = String
 
+<<<<<<< HEAD
+=======
+-- | A search path to use when locating executables. This is analogous
+-- to the unix @$PATH@ or win32 @%PATH%@ but with the ability to use
+-- the system default method for finding executables ('findExecutable' which
+-- on unix is simply looking on the @$PATH@ but on win32 is a bit more
+-- complicated).
+--
+-- The default to use is @[ProgSearchPathDefault]@ but you can add extra dirs
+-- either before, after or instead of the default, e.g. here we add an extra
+-- dir to search after the usual ones.
+--
+-- > ['ProgramSearchPathDefault', 'ProgramSearchPathDir' dir]
+--
+-- We also use this path to set the environment when running child processes.
+--
+-- The @ProgramDb@ is created with a @ProgramSearchPath@ to which we
+-- @appendProgramSearchPath@ to add the ones that come from cli flags and from
+-- configurations. Then each of the programs that are configured in the db
+-- inherits the same path as part of @configureProgram@.
+type ProgramSearchPath = [ProgramSearchPathEntry]
+
+data ProgramSearchPathEntry
+  = -- | A specific dir
+    ProgramSearchPathDir FilePath
+  | -- | The system default
+    ProgramSearchPathDefault
+  deriving (Eq, Generic, Typeable)
+
+instance Binary ProgramSearchPathEntry
+instance Structured ProgramSearchPathEntry
+
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 -- | Represents a program which has been configured and is thus ready to be run.
 --
 -- These are usually made by configuring a 'Program', but if you have to
diff --git a/cabal-install/src/Distribution/Client/CmdExec.hs b/cabal-install/src/Distribution/Client/CmdExec.hs
index 80220592498..961de878a49 100644
--- a/cabal-install/src/Distribution/Client/CmdExec.hs
+++ b/cabal-install/src/Distribution/Client/CmdExec.hs
@@ -27,6 +27,10 @@ import Distribution.Client.Setup
   ( ConfigFlags(configVerbosity)
   , GlobalFlags
   )
+import Distribution.Client.ProjectConfig.Types
+  ( ProjectConfig (projectConfigShared)
+  , ProjectConfigShared (projectConfigProgPathExtra)
+  )
 import Distribution.Client.ProjectFlags
   ( removeIgnoreProjectOption
   )
@@ -54,13 +58,21 @@ import Distribution.Client.ProjectPlanning
 import Distribution.Simple.Command
   ( CommandUI(..) )
 import Distribution.Simple.Program.Db
+<<<<<<< HEAD
   ( modifyProgramSearchPath
+=======
+  ( appendProgramSearchPath
+  , configuredPrograms
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   , requireProgram
   , configuredPrograms
   )
+<<<<<<< HEAD
 import Distribution.Simple.Program.Find
   ( ProgramSearchPathEntry(..)
   )
+=======
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import Distribution.Simple.Program.Run
   ( programInvocation
   , runProgramInvocation
@@ -79,13 +91,22 @@ import Distribution.Simple.Flag
   ( fromFlagOrDefault
   )
 import Distribution.Simple.Utils
+<<<<<<< HEAD
   ( die'
   , info
   , createDirectoryIfMissingVerbose
+=======
+  ( createDirectoryIfMissingVerbose
+  , dieWithException
+  , notice
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   , withTempDirectory
   , wrapText
   , notice
   )
+import Distribution.Utils.NubList
+  ( fromNubList
+  )
 import Distribution.Verbosity
   ( normal
   )
@@ -147,12 +168,24 @@ execAction flags@NixStyleFlags {..} extraArgs globalFlags = do
     mempty
 
   -- Some dependencies may have executables. Let's put those on the PATH.
+<<<<<<< HEAD
   extraPaths <- pathAdditions verbosity baseCtx buildCtx
   let programDb = modifyProgramSearchPath
                   (map ProgramSearchPathDir extraPaths ++)
                 . pkgConfigCompilerProgs
                 . elaboratedShared
                 $ buildCtx
+=======
+  let extraPaths = pathAdditions baseCtx buildCtx
+
+  programDb <-
+    appendProgramSearchPath
+      verbosity
+      extraPaths
+      . pkgConfigCompilerProgs
+      . elaboratedShared
+      $ buildCtx
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
   -- Now that we have the packages, set up the environment. We accomplish this
   -- by creating an environment file that selects the databases and packages we
@@ -235,6 +268,7 @@ withTempEnvFile verbosity baseCtx buildCtx buildStatus action = do
        buildStatus
      action envOverrides)
 
+<<<<<<< HEAD
 pathAdditions :: Verbosity -> ProjectBaseContext -> ProjectBuildContext -> IO [FilePath]
 pathAdditions verbosity ProjectBaseContext{..}ProjectBuildContext{..} = do
   info verbosity . unlines $ "Including the following directories in PATH:"
@@ -243,6 +277,20 @@ pathAdditions verbosity ProjectBaseContext{..}ProjectBuildContext{..} = do
   where
   paths = S.toList
         $ binDirectories distDirLayout elaboratedShared elaboratedPlanToExecute
+=======
+pathAdditions :: ProjectBaseContext -> ProjectBuildContext -> [FilePath]
+pathAdditions ProjectBaseContext{..} ProjectBuildContext{..} =
+  paths ++ cabalConfigPaths
+  where
+    cabalConfigPaths =
+      fromNubList
+        . projectConfigProgPathExtra
+        . projectConfigShared
+        $ projectConfig
+    paths =
+      S.toList $
+        binDirectories distDirLayout elaboratedShared elaboratedPlanToExecute
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 binDirectories
   :: DistDirLayout
diff --git a/cabal-install/src/Distribution/Client/CmdInstall.hs b/cabal-install/src/Distribution/Client/CmdInstall.hs
index 8cf8c57ccf8..4231ddfb490 100644
--- a/cabal-install/src/Distribution/Client/CmdInstall.hs
+++ b/cabal-install/src/Distribution/Client/CmdInstall.hs
@@ -39,7 +39,88 @@ import Distribution.Client.Types
          , SourcePackageDb(..) )
 import qualified Distribution.Client.InstallPlan as InstallPlan
 import Distribution.Package
+<<<<<<< HEAD
          ( Package(..), PackageName, mkPackageName, unPackageName )
+=======
+  ( Package (..)
+  , PackageName
+  , mkPackageName
+  , unPackageName
+  )
+import Distribution.Simple.BuildPaths
+  ( exeExtension
+  )
+import Distribution.Simple.Command
+  ( CommandUI (..)
+  , optionName
+  , usageAlternatives
+  )
+import Distribution.Simple.Compiler
+  ( Compiler (..)
+  , CompilerFlavor (..)
+  , CompilerId (..)
+  , PackageDB (..)
+  , PackageDBStack
+  )
+import Distribution.Simple.Configure
+  ( configCompilerEx
+  )
+import Distribution.Simple.Flag
+  ( flagElim
+  , flagToMaybe
+  , fromFlagOrDefault
+  )
+import Distribution.Simple.GHC
+  ( GhcEnvironmentFileEntry (..)
+  , GhcImplInfo (..)
+  , ParseErrorExc
+  , getGhcAppDir
+  , getImplInfo
+  , ghcPlatformAndVersionString
+  , readGhcEnvironmentFile
+  , renderGhcEnvironmentFile
+  )
+import qualified Distribution.Simple.InstallDirs as InstallDirs
+import qualified Distribution.Simple.PackageIndex as PI
+import Distribution.Simple.Program.Db
+  ( appendProgramSearchPath
+  , defaultProgramDb
+  , userSpecifyArgss
+  , userSpecifyPaths
+  )
+import Distribution.Simple.Setup
+  ( Flag (..)
+  , installDirsOptions
+  )
+import Distribution.Simple.Utils
+  ( createDirectoryIfMissingVerbose
+  , dieWithException
+  , notice
+  , ordNub
+  , safeHead
+  , warn
+  , withTempDirectory
+  , wrapText
+  )
+import Distribution.Solver.Types.PackageConstraint
+  ( PackageProperty (..)
+  )
+import Distribution.Solver.Types.PackageIndex
+  ( lookupPackageName
+  , searchByName
+  )
+import Distribution.Solver.Types.SourcePackage
+  ( SourcePackage (..)
+  )
+import Distribution.System
+  ( OS (Windows)
+  , Platform
+  , buildOS
+  )
+import Distribution.Types.InstalledPackageInfo
+  ( InstalledPackageInfo (..)
+  )
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import Distribution.Types.PackageId
          ( PackageIdentifier(..) )
 import Distribution.Client.ProjectConfig
@@ -316,6 +397,7 @@ installAction flags@NixStyleFlags { extraFlags = clientInstallFlags', .. } targe
      withProjectOrGlobalConfig verbosity ignoreProject globalConfigFlag withProject withoutProject
 
   let
+<<<<<<< HEAD
     ProjectConfig {
       projectConfigBuildOnly = ProjectConfigBuildOnly {
         projectConfigLogsDir
@@ -332,19 +414,49 @@ installAction flags@NixStyleFlags { extraFlags = clientInstallFlags', .. } targe
         packageConfigProgramPathExtra
       }
     } = config
+=======
+    ProjectConfig
+      { projectConfigBuildOnly =
+        ProjectConfigBuildOnly
+          { projectConfigLogsDir
+          }
+      , projectConfigShared =
+        ProjectConfigShared
+          { projectConfigHcFlavor
+          , projectConfigHcPath
+          , projectConfigHcPkg
+          , projectConfigStoreDir
+          , projectConfigProgPathExtra
+          }
+      , projectConfigLocalPackages =
+        PackageConfig
+          { packageConfigProgramPaths
+          , packageConfigProgramArgs
+          , packageConfigProgramPathExtra
+          }
+      } = config
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
     hcFlavor = flagToMaybe projectConfigHcFlavor
     hcPath   = flagToMaybe projectConfigHcPath
     hcPkg    = flagToMaybe projectConfigHcPkg
 
+  configProgDb <- appendProgramSearchPath verbosity ((fromNubList packageConfigProgramPathExtra) ++ (fromNubList projectConfigProgPathExtra)) defaultProgramDb
+  let
     -- ProgramDb with directly user specified paths
     preProgDb =
+<<<<<<< HEAD
         userSpecifyPaths (Map.toList (getMapLast packageConfigProgramPaths))
       . userSpecifyArgss (Map.toList (getMapMappend packageConfigProgramArgs))
       . modifyProgramSearchPath
           (++ [ ProgramSearchPathDir dir
               | dir <- fromNubList packageConfigProgramPathExtra ])
       $ defaultProgramDb
+=======
+      userSpecifyPaths (Map.toList (getMapLast packageConfigProgramPaths))
+        . userSpecifyArgss (Map.toList (getMapMappend packageConfigProgramArgs))
+        $ configProgDb
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
   -- progDb is a program database with compiler tools configured properly
   (compiler@Compiler { compilerId =
diff --git a/cabal-install/src/Distribution/Client/CmdRun.hs b/cabal-install/src/Distribution/Client/CmdRun.hs
index 85a50eec389..2fa71410b86 100644
--- a/cabal-install/src/Distribution/Client/CmdRun.hs
+++ b/cabal-install/src/Distribution/Client/CmdRun.hs
@@ -69,6 +69,110 @@ import Distribution.Verbosity
 
 import Data.List (group)
 import qualified Data.Set as Set
+<<<<<<< HEAD
+=======
+import Distribution.Client.CmdErrorMessages
+  ( plural
+  , renderListCommaAnd
+  , renderListPretty
+  , renderTargetProblem
+  , renderTargetProblemNoTargets
+  , renderTargetSelector
+  , showTargetSelector
+  , targetSelectorFilter
+  , targetSelectorPluralPkgs
+  )
+import Distribution.Client.Errors
+import Distribution.Client.GlobalFlags
+  ( defaultGlobalFlags
+  )
+import Distribution.Client.InstallPlan
+  ( foldPlanPackage
+  , toList
+  )
+import Distribution.Client.NixStyleOptions
+  ( NixStyleFlags (..)
+  , defaultNixStyleFlags
+  , nixStyleOptions
+  )
+import Distribution.Client.ProjectConfig.Types
+  ( ProjectConfig (projectConfigShared)
+  , ProjectConfigShared (projectConfigProgPathExtra)
+  )
+import Distribution.Client.ProjectOrchestration
+import Distribution.Client.ProjectPlanning
+  ( ElaboratedConfiguredPackage (..)
+  , ElaboratedInstallPlan
+  , binDirectoryFor
+  )
+import Distribution.Client.ProjectPlanning.Types
+  ( dataDirsEnvironmentForPlan
+  )
+import Distribution.Client.ScriptUtils
+  ( AcceptNoTargets (..)
+  , TargetContext (..)
+  , movedExePath
+  , updateContextAndWriteProjectFile
+  , withContextAndSelectors
+  )
+import Distribution.Client.Setup
+  ( ConfigFlags (..)
+  , GlobalFlags (..)
+  )
+import Distribution.Client.TargetProblem
+  ( TargetProblem (..)
+  )
+import Distribution.Client.Utils
+  ( giveRTSWarning
+  , occursOnlyOrBefore
+  )
+import Distribution.Simple.Command
+  ( CommandUI (..)
+  , usageAlternatives
+  )
+import Distribution.Simple.Flag
+  ( fromFlagOrDefault
+  )
+import Distribution.Simple.Program.Find
+  ( ProgramSearchPathEntry (ProgramSearchPathDir)
+  , defaultProgramSearchPath
+  , logExtraProgramSearchPath
+  , programSearchPathAsPATHVar
+  )
+import Distribution.Simple.Program.Run
+  ( ProgramInvocation (..)
+  , emptyProgramInvocation
+  , runProgramInvocation
+  )
+import Distribution.Simple.Utils
+  ( dieWithException
+  , info
+  , notice
+  , safeHead
+  , warn
+  , wrapText
+  )
+import Distribution.Types.ComponentName
+  ( componentNameRaw
+  )
+import Distribution.Types.UnitId
+  ( UnitId
+  )
+import Distribution.Types.UnqualComponentName
+  ( UnqualComponentName
+  , unUnqualComponentName
+  )
+import Distribution.Utils.NubList
+  ( fromNubList
+  )
+import Distribution.Verbosity
+  ( normal
+  , silent
+  )
+import GHC.Environment
+  ( getFullArgs
+  )
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import System.Directory
          ( doesFileExist )
 import System.FilePath
@@ -230,7 +334,19 @@ runAction flags@NixStyleFlags {..} targetAndArgs globalFlags
     let dryRun = buildSettingDryRun (buildSettings baseCtx)
               || buildSettingOnlyDownload (buildSettings baseCtx)
 
+    let extraPath =
+          fromNubList
+            . projectConfigProgPathExtra
+            . projectConfigShared
+            . projectConfig
+            $ baseCtx
+
+    logExtraProgramSearchPath verbosity extraPath
+
+    progPath <- programSearchPathAsPATHVar (map ProgramSearchPathDir extraPath ++ defaultProgramSearchPath)
+
     if dryRun
+<<<<<<< HEAD
        then notice verbosity "Running of executable suppressed by flag(s)"
        else
          runProgramInvocation
@@ -242,6 +358,21 @@ runAction flags@NixStyleFlags {..} targetAndArgs globalFlags
                                  (distDirLayout baseCtx)
                                  elaboratedPlan
            }
+=======
+      then notice verbosity "Running of executable suppressed by flag(s)"
+      else
+        runProgramInvocation
+          verbosity
+          emptyProgramInvocation
+            { progInvokePath = exePath
+            , progInvokeArgs = args
+            , progInvokeEnv =
+                ("PATH", Just $ progPath)
+                  : dataDirsEnvironmentForPlan
+                    (distDirLayout baseCtx)
+                    elaboratedPlan
+            }
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     (targetStr, args) = splitAt 1 targetAndArgs
 
diff --git a/cabal-install/src/Distribution/Client/Config.hs b/cabal-install/src/Distribution/Client/Config.hs
index d9019ea8a36..7890b2c8e26 100644
--- a/cabal-install/src/Distribution/Client/Config.hs
+++ b/cabal-install/src/Distribution/Client/Config.hs
@@ -1262,6 +1262,7 @@ parseConfig src initial = \str -> do
     -- This is a fixup, pending a full config parser rewrite, to
     -- ensure that config fields which can be comma-separated lists
     -- actually parse as comma-separated lists.
+<<<<<<< HEAD
     fixConfigMultilines conf = conf {
          savedConfigureFlags =
            let scf = savedConfigureFlags conf
@@ -1281,6 +1282,42 @@ parseConfig src initial = \str -> do
                                                 (configConfigureArgs scf)
                }
       }
+=======
+    fixConfigMultilines conf =
+      conf
+        { savedConfigureFlags =
+            let scf = savedConfigureFlags conf
+             in scf
+                  { configProgramPathExtra =
+                      toNubList $
+                        splitMultiPath
+                          (fromNubList $ configProgramPathExtra scf)
+                  , configExtraLibDirs =
+                      splitMultiPath
+                        (configExtraLibDirs scf)
+                  , configExtraLibDirsStatic =
+                      splitMultiPath
+                        (configExtraLibDirsStatic scf)
+                  , configExtraFrameworkDirs =
+                      splitMultiPath
+                        (configExtraFrameworkDirs scf)
+                  , configExtraIncludeDirs =
+                      splitMultiPath
+                        (configExtraIncludeDirs scf)
+                  , configConfigureArgs =
+                      splitMultiPath
+                        (configConfigureArgs scf)
+                  }
+        , savedGlobalFlags =
+            let sgf = savedGlobalFlags conf
+             in sgf
+                  { globalProgPathExtra =
+                      toNubList $
+                        splitMultiPath
+                          (fromNubList $ globalProgPathExtra sgf)
+                  }
+        }
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
     parse = parseFields (configFieldDescriptions src
                       ++ deprecatedFieldDescriptions) initial
diff --git a/cabal-install/src/Distribution/Client/Get.hs b/cabal-install/src/Distribution/Client/Get.hs
index d5670096991..2e16d68055e 100644
--- a/cabal-install/src/Distribution/Client/Get.hs
+++ b/cabal-install/src/Distribution/Client/Get.hs
@@ -53,7 +53,14 @@ import Distribution.PackageDescription.PrettyPrint
         ( writeGenericPackageDescription )
 
 import qualified Data.Map as Map
+<<<<<<< HEAD
 import Control.Monad ( mapM_ )
+=======
+import Distribution.Client.Errors
+import Distribution.Utils.NubList
+  ( fromNubList
+  )
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import System.Directory
          ( createDirectoryIfMissing, doesDirectoryExist, doesFileExist )
 import System.FilePath
@@ -68,9 +75,14 @@ get :: Verbosity
     -> [UserTarget]
     -> IO ()
 get verbosity _ _ _ [] =
+<<<<<<< HEAD
     notice verbosity "No packages requested. Nothing to do."
 
 get verbosity repoCtxt _ getFlags userTargets = do
+=======
+  notice verbosity "No packages requested. Nothing to do."
+get verbosity repoCtxt globalFlags getFlags userTargets = do
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   let useSourceRepo = case getSourceRepository getFlags of
                         NoFlag -> False
                         _      -> True
@@ -121,8 +133,14 @@ get verbosity repoCtxt _ getFlags userTargets = do
     prefix = fromFlagOrDefault "" (getDestDir getFlags)
 
     clone :: [UnresolvedSourcePackage] -> IO ()
+<<<<<<< HEAD
     clone = clonePackagesFromSourceRepo verbosity prefix kind
           . map (\pkg -> (packageId pkg, packageSourceRepos pkg))
+=======
+    clone =
+      clonePackagesFromSourceRepo verbosity prefix kind (fromNubList $ globalProgPathExtra globalFlags)
+        . map (\pkg -> (packageId pkg, packageSourceRepos pkg))
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
       where
         kind :: Maybe RepoKind
         kind = fromFlag . getSourceRepository $ getFlags
@@ -274,6 +292,7 @@ instance Exception ClonePackageException where
 -- | Given a bunch of package ids and their corresponding available
 -- 'SourceRepo's, pick a single 'SourceRepo' for each one and clone into
 -- new subdirs of the given directory.
+<<<<<<< HEAD
 --
 clonePackagesFromSourceRepo :: Verbosity
                             -> FilePath            -- ^ destination dir prefix
@@ -285,13 +304,42 @@ clonePackagesFromSourceRepo :: Verbosity
 clonePackagesFromSourceRepo verbosity destDirPrefix
                             preferredRepoKind pkgrepos = do
 
+=======
+clonePackagesFromSourceRepo
+  :: Verbosity
+  -> FilePath
+  -- ^ destination dir prefix
+  -> Maybe RepoKind
+  -- ^ preferred 'RepoKind'
+  -> [FilePath]
+  -- ^ Extra prog paths
+  -> [(PackageId, [PD.SourceRepo])]
+  -- ^ the packages and their
+  -- available 'SourceRepo's
+  -> IO ()
+clonePackagesFromSourceRepo
+  verbosity
+  destDirPrefix
+  preferredRepoKind
+  progPaths
+  pkgrepos = do
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
     -- Do a bunch of checks and collect the required info
     pkgrepos' <- traverse preCloneChecks pkgrepos
 
     -- Configure the VCS drivers for all the repository types we may need
+<<<<<<< HEAD
     vcss <- configureVCSs verbosity $
               Map.fromList [ (vcsRepoType vcs, vcs)
                            | (_, _, vcs, _) <- pkgrepos' ]
+=======
+    vcss <-
+      configureVCSs verbosity progPaths $
+        Map.fromList
+          [ (vcsRepoType vcs, vcs)
+          | (_, _, vcs, _) <- pkgrepos'
+          ]
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
     -- Now execute all the required commands for each repo
     sequence_
diff --git a/cabal-install/src/Distribution/Client/HttpUtils.hs b/cabal-install/src/Distribution/Client/HttpUtils.hs
index 54c88d97ea5..6fbd819b074 100644
--- a/cabal-install/src/Distribution/Client/HttpUtils.hs
+++ b/cabal-install/src/Distribution/Client/HttpUtils.hs
@@ -19,6 +19,67 @@ import Prelude ()
 import Distribution.Client.Compat.Prelude hiding (Proxy (..))
 import Distribution.Utils.Generic
 
+<<<<<<< HEAD
+=======
+import qualified Control.Exception as Exception
+import Distribution.Client.Types
+  ( RemoteRepo (..)
+  , unRepoName
+  )
+import Distribution.Client.Types.Credentials (Auth)
+import Distribution.Client.Utils
+  ( withTempFileName
+  )
+import Distribution.Client.Version
+  ( cabalInstallVersion
+  )
+import Distribution.Simple.Program
+  ( ConfiguredProgram
+  , Program
+  , ProgramInvocation (..)
+  , getProgramInvocationOutput
+  , programInvocation
+  , programPath
+  , simpleProgram
+  )
+import Distribution.Simple.Program.Db
+  ( ProgramDb
+  , addKnownPrograms
+  , appendProgramSearchPath
+  , configureAllKnownPrograms
+  , emptyProgramDb
+  , lookupProgram
+  , requireProgram
+  )
+import Distribution.Simple.Program.Run
+  ( getProgramInvocationOutputAndErrors
+  )
+import Distribution.Simple.Utils
+  ( IOData (..)
+  , copyFileVerbose
+  , debug
+  , dieWithException
+  , info
+  , notice
+  , warn
+  , withTempFile
+  )
+import Distribution.System
+  ( buildArch
+  , buildOS
+  )
+import Distribution.Utils.String (trim)
+import Network.Browser
+  ( browse
+  , request
+  , setAllowBasicAuth
+  , setAuthorityGen
+  , setErrHandler
+  , setOutHandler
+  , setProxy
+  , setUserAgent
+  )
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import Network.HTTP
          ( Request (..), Response (..), RequestMethod (..)
          , Header(..), HeaderName(..), lookupHeader )
@@ -333,6 +394,7 @@ configureTransport verbosity extraPath (Just name) =
     -- the user specifically selected a transport by name so we'll try and
     -- configure that one
 
+<<<<<<< HEAD
     case find (\(name',_,_,_) -> name' == name) supportedTransports of
       Just (_, mprog, _tls, mkTrans) -> do
 
@@ -349,11 +411,21 @@ configureTransport verbosity extraPath (Just name) =
                     ++ ". The supported transports are "
                     ++ intercalate ", "
                          [ name' | (name', _, _, _ ) <- supportedTransports ]
+=======
+  case find (\(name', _, _, _) -> name' == name) supportedTransports of
+    Just (_, mprog, _tls, mkTrans) -> do
+      baseProgDb <- appendProgramSearchPath verbosity extraPath emptyProgramDb
+      progdb <- case mprog of
+        Nothing -> return emptyProgramDb
+        Just prog -> snd <$> requireProgram verbosity prog baseProgDb
+      --      ^^ if it fails, it'll fail here
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 configureTransport verbosity extraPath Nothing = do
     -- the user hasn't selected a transport, so we'll pick the first one we
     -- can configure successfully, provided that it supports tls
 
+<<<<<<< HEAD
     -- for all the transports except plain-http we need to try and find
     -- their external executable
     let baseProgDb = modifyProgramSearchPath (\p -> map ProgramSearchPathDir extraPath ++ p) emptyProgramDb
@@ -361,6 +433,16 @@ configureTransport verbosity extraPath Nothing = do
                 addKnownPrograms
                   [ prog | (_, Just prog, _, _) <- supportedTransports ]
                   baseProgDb
+=======
+  -- for all the transports except plain-http we need to try and find
+  -- their external executable
+  baseProgDb <- appendProgramSearchPath verbosity extraPath emptyProgramDb
+  progdb <-
+    configureAllKnownPrograms verbosity $
+      addKnownPrograms
+        [prog | (_, Just prog, _, _) <- supportedTransports]
+        baseProgDb
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
     let availableTransports =
           [ (name, transport)
diff --git a/cabal-install/src/Distribution/Client/ProjectConfig.hs b/cabal-install/src/Distribution/Client/ProjectConfig.hs
index 91c12552c99..86b71209ca0 100644
--- a/cabal-install/src/Distribution/Client/ProjectConfig.hs
+++ b/cabal-install/src/Distribution/Client/ProjectConfig.hs
@@ -1149,11 +1149,18 @@ syncAndReadSourcePackagesRemoteRepos verbosity
                             [ ((rtype, rloc), [(repo, vcsRepoType vcs)])
                             | (repo, rloc, rtype, vcs) <- repos' ]
 
+<<<<<<< HEAD
     --TODO: pass progPathExtra on to 'configureVCS'
     let _progPathExtra = fromNubList projectConfigProgPathExtra
     getConfiguredVCS <- delayInitSharedResources $ \repoType ->
                           let vcs = Map.findWithDefault (error $ "Unknown VCS: " ++ prettyShow repoType) repoType knownVCSs in
                           configureVCS verbosity {-progPathExtra-} vcs
+=======
+    let progPathExtra = fromNubList projectConfigProgPathExtra
+    getConfiguredVCS <- delayInitSharedResources $ \repoType ->
+      let vcs = Map.findWithDefault (error $ "Unknown VCS: " ++ prettyShow repoType) repoType knownVCSs
+       in configureVCS verbosity progPathExtra vcs
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
     concat <$> sequenceA
       [ rerunIfChanged verbosity monitor repoGroup' $ do
diff --git a/cabal-install/src/Distribution/Client/ProjectOrchestration.hs b/cabal-install/src/Distribution/Client/ProjectOrchestration.hs
index da67b8a3ef4..257ff4b5051 100644
--- a/cabal-install/src/Distribution/Client/ProjectOrchestration.hs
+++ b/cabal-install/src/Distribution/Client/ProjectOrchestration.hs
@@ -190,6 +190,7 @@ data CurrentCommand = InstallCommand | HaddockCommand | BuildCommand | ReplComma
                     deriving (Show, Eq)
 
 -- | This holds the context of a project prior to solving: the content of the
+<<<<<<< HEAD
 -- @cabal.project@ and all the local package @.cabal@ files.
 --
 data ProjectBaseContext = ProjectBaseContext {
@@ -201,6 +202,18 @@ data ProjectBaseContext = ProjectBaseContext {
        currentCommand :: CurrentCommand,
        installedPackages :: Maybe InstalledPackageIndex
      }
+=======
+-- @cabal.project@, @cabal/config@ and all the local package @.cabal@ files.
+data ProjectBaseContext = ProjectBaseContext
+  { distDirLayout :: DistDirLayout
+  , cabalDirLayout :: CabalDirLayout
+  , projectConfig :: ProjectConfig
+  , localPackages :: [PackageSpecifier UnresolvedSourcePackage]
+  , buildSettings :: BuildTimeSettings
+  , currentCommand :: CurrentCommand
+  , installedPackages :: Maybe InstalledPackageIndex
+  }
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 establishProjectBaseContext
     :: Verbosity
diff --git a/cabal-install/src/Distribution/Client/ProjectPlanning.hs b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
index 0f09514fca4..356f31e1215 100644
--- a/cabal-install/src/Distribution/Client/ProjectPlanning.hs
+++ b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
@@ -385,6 +385,7 @@ rebuildProjectConfig verbosity
                                projectConfigBuildOnly
                              } = do
 
+<<<<<<< HEAD
       pkgLocations <- findProjectPackages distDirLayout projectConfig
       -- Create folder only if findProjectPackages did not throw a
       -- BadPackageLocations exception.
@@ -430,6 +431,31 @@ configureCompiler verbosity
             Cabal.configCompilerEx
               hcFlavor hcPath hcPkg
               progdb verbosity
+=======
+    progsearchpath <- liftIO $ getSystemSearchPath
+    rerunIfChanged
+      verbosity
+      fileMonitorCompiler
+      ( hcFlavor
+      , hcPath
+      , hcPkg
+      , progsearchpath
+      , packageConfigProgramPaths
+      , packageConfigProgramPathExtra
+      )
+      $ do
+        liftIO $ info verbosity "Compiler settings changed, reconfiguring..."
+        progdb <- liftIO $ appendProgramSearchPath verbosity (fromNubList packageConfigProgramPathExtra) defaultProgramDb
+        let progdb' = userSpecifyPaths (Map.toList (getMapLast packageConfigProgramPaths)) progdb
+        result@(_, _, progdb'') <-
+          liftIO $
+            Cabal.configCompilerEx
+              hcFlavor
+              hcPath
+              hcPkg
+              progdb'
+              verbosity
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
         -- Note that we added the user-supplied program locations and args
         -- for /all/ programs, not just those for the compiler prog and
@@ -437,6 +463,7 @@ configureCompiler verbosity
         -- the compiler will configure (and it does vary between compilers).
         -- We do know however that the compiler will only configure the
         -- programs it cares about, and those are the ones we monitor here.
+<<<<<<< HEAD
           monitorFiles (programsMonitorFiles progdb')
 
           return result
@@ -450,6 +477,15 @@ configureCompiler verbosity
               ([ ProgramSearchPathDir dir
                | dir <- fromNubList packageConfigProgramPathExtra ] ++)
           $ defaultProgramDb
+=======
+        monitorFiles (programsMonitorFiles progdb'')
+
+        return result
+    where
+      hcFlavor = flagToMaybe projectConfigHcFlavor
+      hcPath = flagToMaybe projectConfigHcPath
+      hcPkg = flagToMaybe projectConfigHcPkg
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 
 -- | Return an up-to-date elaborated install plan.
diff --git a/cabal-install/src/Distribution/Client/SetupWrapper.hs b/cabal-install/src/Distribution/Client/SetupWrapper.hs
index e4885ed07c6..7639d9bd658 100644
--- a/cabal-install/src/Distribution/Client/SetupWrapper.hs
+++ b/cabal-install/src/Distribution/Client/SetupWrapper.hs
@@ -29,6 +29,52 @@ import Distribution.Client.Compat.Prelude
 import Distribution.CabalSpecVersion (cabalSpecMinimumLibraryVersion)
 import qualified Distribution.Make as Make
 import qualified Distribution.Simple as Simple
+<<<<<<< HEAD
+=======
+import Distribution.Simple.Build.Macros
+  ( generatePackageVersionMacros
+  )
+import Distribution.Simple.BuildPaths
+  ( defaultDistPref
+  , exeExtension
+  )
+import Distribution.Simple.Compiler
+  ( Compiler (compilerId)
+  , PackageDB (..)
+  , PackageDBStack
+  , compilerFlavor
+  )
+import Distribution.Simple.Configure
+  ( configCompilerEx
+  )
+import Distribution.Simple.PackageDescription
+  ( readGenericPackageDescription
+  )
+import Distribution.Simple.PreProcess
+  ( ppUnlit
+  , runSimplePreProcessor
+  )
+import Distribution.Simple.Program
+  ( ProgramDb
+  , emptyProgramDb
+  , getDbProgramOutput
+  , getProgramSearchPath
+  , ghcProgram
+  , ghcjsProgram
+  , runDbProgram
+  )
+import Distribution.Simple.Program.Db
+  ( appendProgramSearchPath
+  )
+import Distribution.Simple.Program.Find
+  ( programSearchPathAsPATHVar
+  )
+import Distribution.Simple.Program.Run
+  ( getEffectiveEnvironment
+  )
+import qualified Distribution.Simple.Program.Strip as Strip
+import Distribution.Types.ModuleRenaming (defaultRenaming)
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import Distribution.Version
          ( Version, mkVersion, versionNumbers, VersionRange, anyVersion
          , intersectVersionRanges, orLaterVersion
@@ -443,6 +489,7 @@ invoke verbosity path args options = do
     Nothing        -> return ()
     Just logHandle -> info verbosity $ "Redirecting build log to " ++ show logHandle
 
+<<<<<<< HEAD
   searchpath <- programSearchPathAsPATHVar
                 (map ProgramSearchPathDir (useExtraPathEnv options) ++
                  getProgramSearchPath (useProgramDb options))
@@ -450,6 +497,19 @@ invoke verbosity path args options = do
                  [ ("PATH", Just searchpath)
                  , ("HASKELL_DIST_DIR", Just (useDistPref options))
                  ] ++ useExtraEnvOverrides options
+=======
+  progDb <- appendProgramSearchPath verbosity (useExtraPathEnv options) (useProgramDb options)
+
+  searchpath <-
+    programSearchPathAsPATHVar $ getProgramSearchPath progDb
+
+  env <-
+    getEffectiveEnvironment $
+      [ ("PATH", Just searchpath)
+      , ("HASKELL_DIST_DIR", Just (useDistPref options))
+      ]
+        ++ useExtraEnvOverrides options
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
   let loggingHandle = case useLoggingHandle options of
                         Nothing -> Inherit
diff --git a/cabal-install/src/Distribution/Client/VCS.hs b/cabal-install/src/Distribution/Client/VCS.hs
index aca3f4b109f..0c0a9a2e0b3 100644
--- a/cabal-install/src/Distribution/Client/VCS.hs
+++ b/cabal-install/src/Distribution/Client/VCS.hs
@@ -37,6 +37,32 @@ module Distribution.Client.VCS (
 import Prelude ()
 import Distribution.Client.Compat.Prelude
 
+<<<<<<< HEAD
+=======
+import Distribution.Client.RebuildMonad
+  ( MonitorFilePath
+  , Rebuild
+  , monitorDirectoryExistence
+  , monitorFiles
+  )
+import Distribution.Client.Types.SourceRepo (SourceRepoMaybe, SourceRepositoryPackage (..), srpToProxy)
+import qualified Distribution.PackageDescription as PD
+import Distribution.Simple.Program
+  ( ConfiguredProgram (programVersion)
+  , Program (programFindVersion)
+  , ProgramInvocation (..)
+  , emptyProgramDb
+  , findProgramVersion
+  , getProgramInvocationOutput
+  , programInvocation
+  , requireProgram
+  , runProgramInvocation
+  , simpleProgram
+  )
+import Distribution.Simple.Program.Db
+  ( appendProgramSearchPath
+  )
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import Distribution.Types.SourceRepo
          ( RepoType(..), KnownRepoType (..) )
 import Distribution.Client.Types.SourceRepo (SourceRepoMaybe, SourceRepositoryPackage (..), srpToProxy)
@@ -167,19 +193,41 @@ validateSourceRepos rs =
     validateSourceRepo' r = either (Left . (,) r) Right
                                    (validateSourceRepo r)
 
+<<<<<<< HEAD
 
 configureVCS :: Verbosity
              -> VCS Program
              -> IO (VCS ConfiguredProgram)
 configureVCS verbosity vcs@VCS{vcsProgram = prog} =
     asVcsConfigured <$> requireProgram verbosity prog emptyProgramDb
+=======
+configureVCS
+  :: Verbosity
+  -> [FilePath]
+  -- ^ Extra prog paths
+  -> VCS Program
+  -> IO (VCS ConfiguredProgram)
+configureVCS verbosity progPaths vcs@VCS{vcsProgram = prog} = do
+  progPath <- appendProgramSearchPath verbosity progPaths emptyProgramDb
+  asVcsConfigured <$> requireProgram verbosity prog progPath
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     asVcsConfigured (prog', _) = vcs { vcsProgram = prog' }
 
+<<<<<<< HEAD
 configureVCSs :: Verbosity
               -> Map RepoType (VCS Program)
               -> IO (Map RepoType (VCS ConfiguredProgram))
 configureVCSs verbosity = traverse (configureVCS verbosity)
+=======
+configureVCSs
+  :: Verbosity
+  -> [FilePath]
+  -- ^ Extra prog paths
+  -> Map RepoType (VCS Program)
+  -> IO (Map RepoType (VCS ConfiguredProgram))
+configureVCSs verbosity progPaths = traverse (configureVCS verbosity progPaths)
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 
 -- ------------------------------------------------------------
diff --git a/cabal-install/tests/UnitTests/Distribution/Client/Get.hs b/cabal-install/tests/UnitTests/Distribution/Client/Get.hs
index e5527a63647..375b1081ac4 100644
--- a/cabal-install/tests/UnitTests/Distribution/Client/Get.hs
+++ b/cabal-install/tests/UnitTests/Distribution/Client/Get.hs
@@ -61,18 +61,32 @@ pkgidfoo = PackageIdentifier (mkPackageName "foo") (mkVersion [1,0])
 
 testNoRepos :: Assertion
 testNoRepos = do
+<<<<<<< HEAD
     e <- assertException $
            clonePackagesFromSourceRepo verbosity "." Nothing pkgrepos
     e @?= ClonePackageNoSourceRepos pkgidfoo
+=======
+  e <-
+    assertException $
+      clonePackagesFromSourceRepo verbosity "." Nothing [] pkgrepos
+  e @?= ClonePackageNoSourceRepos pkgidfoo
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [])]
 
 
 testNoReposOfKind :: Assertion
 testNoReposOfKind = do
+<<<<<<< HEAD
     e <- assertException $
            clonePackagesFromSourceRepo verbosity "." repokind pkgrepos
     e @?= ClonePackageNoSourceReposOfKind pkgidfoo repokind
+=======
+  e <-
+    assertException $
+      clonePackagesFromSourceRepo verbosity "." repokind [] pkgrepos
+  e @?= ClonePackageNoSourceReposOfKind pkgidfoo repokind
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [repo])]
     repo     = emptySourceRepo RepoHead
@@ -81,9 +95,16 @@ testNoReposOfKind = do
 
 testNoRepoType :: Assertion
 testNoRepoType = do
+<<<<<<< HEAD
     e <- assertException $
            clonePackagesFromSourceRepo verbosity "." Nothing pkgrepos
     e @?= ClonePackageNoRepoType pkgidfoo repo
+=======
+  e <-
+    assertException $
+      clonePackagesFromSourceRepo verbosity "." Nothing [] pkgrepos
+  e @?= ClonePackageNoRepoType pkgidfoo repo
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [repo])]
     repo     = emptySourceRepo RepoHead
@@ -91,9 +112,16 @@ testNoRepoType = do
 
 testUnsupportedRepoType :: Assertion
 testUnsupportedRepoType = do
+<<<<<<< HEAD
     e <- assertException $
            clonePackagesFromSourceRepo verbosity "." Nothing pkgrepos
     e @?= ClonePackageUnsupportedRepoType pkgidfoo repo' repotype
+=======
+  e <-
+    assertException $
+      clonePackagesFromSourceRepo verbosity "." Nothing [] pkgrepos
+  e @?= ClonePackageUnsupportedRepoType pkgidfoo repo' repotype
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [repo])]
     repo     = (emptySourceRepo RepoHead)
@@ -113,9 +141,16 @@ testUnsupportedRepoType = do
 
 testNoRepoLocation :: Assertion
 testNoRepoLocation = do
+<<<<<<< HEAD
     e <- assertException $
            clonePackagesFromSourceRepo verbosity "." Nothing pkgrepos
     e @?= ClonePackageNoRepoLocation pkgidfoo repo
+=======
+  e <-
+    assertException $
+      clonePackagesFromSourceRepo verbosity "." Nothing [] pkgrepos
+  e @?= ClonePackageNoRepoLocation pkgidfoo repo
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [repo])]
     repo     = (emptySourceRepo RepoHead) {
@@ -130,12 +165,22 @@ testSelectRepoKind =
       [ do e <- test requestedRepoType pkgrepos
            e @?= ClonePackageNoRepoType pkgidfoo expectedRepo
 
+<<<<<<< HEAD
            e' <- test requestedRepoType (reverse pkgrepos)
            e' @?= ClonePackageNoRepoType pkgidfoo expectedRepo
       | let test rt rs = assertException $
                            clonePackagesFromSourceRepo verbosity "." rt rs
       , (requestedRepoType, expectedRepo) <- cases
       ]
+=======
+      e' <- test requestedRepoType (reverse pkgrepos)
+      e' @?= ClonePackageNoRepoType pkgidfoo expectedRepo
+    | let test rt rs =
+            assertException $
+              clonePackagesFromSourceRepo verbosity "." rt [] rs
+    , (requestedRepoType, expectedRepo) <- cases
+    ]
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [repo1, repo2, repo3])]
     repo1    = emptySourceRepo RepoThis
@@ -150,6 +195,7 @@ testSelectRepoKind =
 
 testRepoDestinationExists :: Assertion
 testRepoDestinationExists =
+<<<<<<< HEAD
     withTestDir verbosity "repos" $ \tmpdir -> do
       let pkgdir = tmpdir </> "foo"
       createDirectory pkgdir
@@ -163,6 +209,22 @@ testRepoDestinationExists =
       e2 <- assertException $
               clonePackagesFromSourceRepo verbosity tmpdir Nothing pkgrepos
       e2 @?= ClonePackageDestinationExists pkgidfoo pkgdir False {- isfile -}
+=======
+  withTestDir verbosity "repos" $ \tmpdir -> do
+    let pkgdir = tmpdir </> "foo"
+    createDirectory pkgdir
+    e1 <-
+      assertException $
+        clonePackagesFromSourceRepo verbosity tmpdir Nothing [] pkgrepos
+    e1 @?= ClonePackageDestinationExists pkgidfoo pkgdir True {- isdir -}
+    removeDirectory pkgdir
+
+    writeFile pkgdir ""
+    e2 <-
+      assertException $
+        clonePackagesFromSourceRepo verbosity tmpdir Nothing [] pkgrepos
+    e2 @?= ClonePackageDestinationExists pkgidfoo pkgdir False {- isfile -}
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [repo])]
     repo     = (emptySourceRepo RepoHead) {
@@ -173,6 +235,7 @@ testRepoDestinationExists =
 
 testGitFetchFailed :: Assertion
 testGitFetchFailed =
+<<<<<<< HEAD
     withTestDir verbosity "repos" $ \tmpdir -> do
       let srcdir   = tmpdir </> "src"
           repo     = (emptySourceRepo RepoHead) {
@@ -220,6 +283,72 @@ testNetworkGitClone =
       clonePackagesFromSourceRepo verbosity tmpdir Nothing
                                   [(mkpkgid "zlib3", [repo3])]
       assertFileContains (tmpdir </> "zlib3/zlib.cabal") ["version:", "0.5.0.0"]
+=======
+  withTestDir verbosity "repos" $ \tmpdir -> do
+    let srcdir = tmpdir </> "src"
+        repo =
+          (emptySourceRepo RepoHead)
+            { repoType = Just (KnownRepoType Git)
+            , repoLocation = Just srcdir
+            }
+        repo' =
+          SourceRepositoryPackage
+            { srpType = KnownRepoType Git
+            , srpLocation = srcdir
+            , srpTag = Nothing
+            , srpBranch = Nothing
+            , srpSubdir = Proxy
+            , srpCommand = []
+            }
+        pkgrepos = [(pkgidfoo, [repo])]
+    e1 <-
+      assertException $
+        clonePackagesFromSourceRepo verbosity tmpdir Nothing [] pkgrepos
+    e1 @?= ClonePackageFailedWithExitCode pkgidfoo repo' "git" (ExitFailure 128)
+
+testNetworkGitClone :: Assertion
+testNetworkGitClone =
+  withTestDir verbosity "repos" $ \tmpdir -> do
+    let repo1 =
+          (emptySourceRepo RepoHead)
+            { repoType = Just (KnownRepoType Git)
+            , repoLocation = Just "https://github.com/haskell/zlib.git"
+            }
+    clonePackagesFromSourceRepo
+      verbosity
+      tmpdir
+      Nothing
+      []
+      [(mkpkgid "zlib1", [repo1])]
+    assertFileContains (tmpdir </> "zlib1/zlib.cabal") ["name:", "zlib"]
+
+    let repo2 =
+          (emptySourceRepo RepoHead)
+            { repoType = Just (KnownRepoType Git)
+            , repoLocation = Just (tmpdir </> "zlib1")
+            }
+    clonePackagesFromSourceRepo
+      verbosity
+      tmpdir
+      Nothing
+      []
+      [(mkpkgid "zlib2", [repo2])]
+    assertFileContains (tmpdir </> "zlib2/zlib.cabal") ["name:", "zlib"]
+
+    let repo3 =
+          (emptySourceRepo RepoHead)
+            { repoType = Just (KnownRepoType Git)
+            , repoLocation = Just (tmpdir </> "zlib1")
+            , repoTag = Just "0.5.0.0"
+            }
+    clonePackagesFromSourceRepo
+      verbosity
+      tmpdir
+      Nothing
+      []
+      [(mkpkgid "zlib3", [repo3])]
+    assertFileContains (tmpdir </> "zlib3/zlib.cabal") ["version:", "0.5.0.0"]
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     mkpkgid nm = PackageIdentifier (mkPackageName nm) (mkVersion [])
 
diff --git a/cabal-install/tests/UnitTests/Distribution/Client/VCS.hs b/cabal-install/tests/UnitTests/Distribution/Client/VCS.hs
index b361bdd8ff3..896d53f2812 100644
--- a/cabal-install/tests/UnitTests/Distribution/Client/VCS.hs
+++ b/cabal-install/tests/UnitTests/Distribution/Client/VCS.hs
@@ -49,12 +49,47 @@ import UnitTests.TempTestDir (withTestDir, removeDirectoryRecursiveHack)
 -- checks that the working state is as expected (given the pure representation).
 --
 tests :: MTimeChange -> [TestTree]
+<<<<<<< HEAD
 tests mtimeChange = map (localOption $ QuickCheckTests 10)
   [ ignoreInWindows "See issue #8048" $
     testGroup "git"
     [ testProperty "check VCS test framework"    prop_framework_git
     , testProperty "cloneSourceRepo"             prop_cloneRepo_git
     , testProperty "syncSourceRepos"             prop_syncRepos_git
+=======
+tests mtimeChange =
+  map
+    (localOption $ QuickCheckTests 10)
+    [ ignoreInWindows "See issue #8048 and #9519" $
+        testGroup
+          "git"
+          [ testProperty "check VCS test framework" prop_framework_git
+          , testProperty "cloneSourceRepo" prop_cloneRepo_git
+          , testProperty "syncSourceRepos" prop_syncRepos_git
+          ]
+    , --
+      ignoreTestBecause "for the moment they're not yet working" $
+        testGroup
+          "darcs"
+          [ testProperty "check VCS test framework" $ prop_framework_darcs mtimeChange
+          , testProperty "cloneSourceRepo" $ prop_cloneRepo_darcs mtimeChange
+          , testProperty "syncSourceRepos" $ prop_syncRepos_darcs mtimeChange
+          ]
+    , ignoreTestBecause "for the moment they're not yet working" $
+        testGroup
+          "pijul"
+          [ testProperty "check VCS test framework" prop_framework_pijul
+          , testProperty "cloneSourceRepo" prop_cloneRepo_pijul
+          , testProperty "syncSourceRepos" prop_syncRepos_pijul
+          ]
+    , ignoreTestBecause "for the moment they're not yet working" $
+        testGroup
+          "mercurial"
+          [ testProperty "check VCS test framework" prop_framework_hg
+          , testProperty "cloneSourceRepo" prop_cloneRepo_hg
+          , testProperty "syncSourceRepos" prop_syncRepos_hg
+          ]
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
     ]
 
     --
@@ -178,6 +213,7 @@ testSetup :: VCS Program
           -> (VCSTestDriver -> FilePath -> RepoState -> IO a)
           -> IO a
 testSetup vcs mkVCSTestDriver repoRecipe theTest = do
+<<<<<<< HEAD
     -- test setup
     vcs' <- configureVCS verbosity vcs
     withTestDir verbosity "vcstest" $ \tmpdir -> do
@@ -185,6 +221,15 @@ testSetup vcs mkVCSTestDriver repoRecipe theTest = do
           submodulesPath = tmpdir </> "submodules"
           vcsDriver   = mkVCSTestDriver verbosity vcs' submodulesPath srcRepoPath
       repoState <- createRepo vcsDriver repoRecipe
+=======
+  -- test setup
+  vcs' <- configureVCS verbosity [] vcs
+  withTestDir verbosity "vcstest" $ \tmpdir -> do
+    let srcRepoPath = tmpdir </> "src"
+        submodulesPath = tmpdir </> "submodules"
+        vcsDriver = mkVCSTestDriver verbosity vcs' submodulesPath srcRepoPath
+    repoState <- createRepo vcsDriver repoRecipe
+>>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
       -- actual test
       result <- theTest vcsDriver tmpdir repoState
diff --git a/changelog.d/propagate-extra-prog-path b/changelog.d/propagate-extra-prog-path
new file mode 100644
index 00000000000..9938736f7a1
--- /dev/null
+++ b/changelog.d/propagate-extra-prog-path
@@ -0,0 +1,13 @@
+synopsis: Fix extra-prog-path propagation
+packages: cabal-install Cabal
+prs: #9527
+issues: #7649 #9519
+
+description: {
+
+- extra-prog-paths are now propagated to all commands. This in particular helps
+  when running a MinGW cabal in the PowerShell, where the MSYS2 paths are
+  usually not available in the PowerShell PATH. GHCup already sets them up for
+  us but they were sometimes lost on the way.
+
+}

From e2b045fa5870edc98da9bb76f2352a08e09ca2ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ondr=CC=8Cej=20S=CC=8Cebek?= <ondras98@icloud.com>
Date: Sat, 21 Oct 2023 22:24:04 +0200
Subject: [PATCH 113/144] Honor build-tool-depends in CmdRun

Similarly to CmdExec and CmdTest, get paths to all dependency binaries
and add those to PATH. Unlike CmdExec, add just the explicitly required
paths.

(cherry picked from commit f06195d3a533bccaced37ebfa95f4071d132c643)

# Conflicts:
#	cabal-install/src/Distribution/Client/CmdExec.hs
---
 cabal-install/src/Distribution/Client/CmdExec.hs |  5 +++++
 cabal-install/src/Distribution/Client/CmdRun.hs  | 13 ++++++++-----
 changelog.d/pr-9341                              | 11 +++++++++++
 3 files changed, 24 insertions(+), 5 deletions(-)
 create mode 100644 changelog.d/pr-9341

diff --git a/cabal-install/src/Distribution/Client/CmdExec.hs b/cabal-install/src/Distribution/Client/CmdExec.hs
index 961de878a49..519d9794265 100644
--- a/cabal-install/src/Distribution/Client/CmdExec.hs
+++ b/cabal-install/src/Distribution/Client/CmdExec.hs
@@ -268,6 +268,7 @@ withTempEnvFile verbosity baseCtx buildCtx buildStatus action = do
        buildStatus
      action envOverrides)
 
+<<<<<<< HEAD
 <<<<<<< HEAD
 pathAdditions :: Verbosity -> ProjectBaseContext -> ProjectBuildContext -> IO [FilePath]
 pathAdditions verbosity ProjectBaseContext{..}ProjectBuildContext{..} = do
@@ -278,6 +279,9 @@ pathAdditions verbosity ProjectBaseContext{..}ProjectBuildContext{..} = do
   paths = S.toList
         $ binDirectories distDirLayout elaboratedShared elaboratedPlanToExecute
 =======
+=======
+-- | Get paths to all dependency executables to be included in PATH.
+>>>>>>> f06195d3a (Honor build-tool-depends in CmdRun)
 pathAdditions :: ProjectBaseContext -> ProjectBuildContext -> [FilePath]
 pathAdditions ProjectBaseContext{..} ProjectBuildContext{..} =
   paths ++ cabalConfigPaths
@@ -292,6 +296,7 @@ pathAdditions ProjectBaseContext{..} ProjectBuildContext{..} =
         binDirectories distDirLayout elaboratedShared elaboratedPlanToExecute
 >>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
+-- | Get paths to all dependency executables to be included in PATH.
 binDirectories
   :: DistDirLayout
   -> ElaboratedSharedConfig
diff --git a/cabal-install/src/Distribution/Client/CmdRun.hs b/cabal-install/src/Distribution/Client/CmdRun.hs
index 2fa71410b86..5d651bc7eee 100644
--- a/cabal-install/src/Distribution/Client/CmdRun.hs
+++ b/cabal-install/src/Distribution/Client/CmdRun.hs
@@ -107,6 +107,7 @@ import Distribution.Client.ProjectPlanning
   )
 import Distribution.Client.ProjectPlanning.Types
   ( dataDirsEnvironmentForPlan
+  , elabExeDependencyPaths
   )
 import Distribution.Client.ScriptUtils
   ( AcceptNoTargets (..)
@@ -335,11 +336,13 @@ runAction flags@NixStyleFlags {..} targetAndArgs globalFlags
               || buildSettingOnlyDownload (buildSettings baseCtx)
 
     let extraPath =
-          fromNubList
-            . projectConfigProgPathExtra
-            . projectConfigShared
-            . projectConfig
-            $ baseCtx
+          elabExeDependencyPaths pkg
+            ++ ( fromNubList
+                  . projectConfigProgPathExtra
+                  . projectConfigShared
+                  . projectConfig
+                  $ baseCtx
+               )
 
     logExtraProgramSearchPath verbosity extraPath
 
diff --git a/changelog.d/pr-9341 b/changelog.d/pr-9341
new file mode 100644
index 00000000000..dc6c65a802d
--- /dev/null
+++ b/changelog.d/pr-9341
@@ -0,0 +1,11 @@
+synopsis: Fix run command environment
+packages: cabal-install
+prs: #9341
+issues: #8391
+
+description: {
+
+- The Run command will now add binary paths of dependencies
+  (build-tool-depends) to PATH, just like Exec and Test commands.
+
+}
\ No newline at end of file

From f8be89159bd985da3a29474e6326ac4dec9168af Mon Sep 17 00:00:00 2001
From: Javier Sagredo <jasataco@gmail.com>
Date: Fri, 19 Jan 2024 00:57:05 +0100
Subject: [PATCH 114/144] Resolve backporting conflicts

---
 Cabal/src/Distribution/Simple/Configure.hs    |  68 ++------
 .../Distribution/Simple/ConfigureScript.hs    |  12 +-
 Cabal/src/Distribution/Simple/GHC.hs          |  11 +-
 Cabal/src/Distribution/Simple/GHCJS.hs        |   9 +-
 Cabal/src/Distribution/Simple/Program/Db.hs   |  49 +-----
 Cabal/src/Distribution/Simple/Program/Find.hs |  67 +++-----
 Cabal/src/Distribution/Simple/Program/GHC.hs  |  34 +---
 Cabal/src/Distribution/Simple/Program/Run.hs  | 119 +-------------
 .../src/Distribution/Simple/Program/Types.hs  |  21 ---
 .../src/Distribution/Client/CmdExec.hs        |  41 +----
 .../src/Distribution/Client/CmdInstall.hs     | 120 +-------------
 .../src/Distribution/Client/CmdRun.hs         | 137 ++--------------
 .../src/Distribution/Client/Config.hs         |  41 +----
 cabal-install/src/Distribution/Client/Get.hs  |  60 +------
 .../src/Distribution/Client/HttpUtils.hs      |  89 +---------
 .../src/Distribution/Client/ProjectConfig.hs  |  12 +-
 .../Client/ProjectOrchestration.hs            |  15 +-
 .../Distribution/Client/ProjectPlanning.hs    |  51 +-----
 .../src/Distribution/Client/SetupWrapper.hs   |  72 +--------
 cabal-install/src/Distribution/Client/VCS.hs  |  55 +------
 .../UnitTests/Distribution/Client/Get.hs      | 153 ++----------------
 .../UnitTests/Distribution/Client/VCS.hs      |  47 +-----
 22 files changed, 117 insertions(+), 1166 deletions(-)

diff --git a/Cabal/src/Distribution/Simple/Configure.hs b/Cabal/src/Distribution/Simple/Configure.hs
index 8e8a0acca47..35f38a75a8a 100644
--- a/Cabal/src/Distribution/Simple/Configure.hs
+++ b/Cabal/src/Distribution/Simple/Configure.hs
@@ -73,23 +73,16 @@ import Distribution.PackageDescription.Configuration
 import Distribution.PackageDescription.Check hiding (doesFileExist)
 import Distribution.Simple.BuildToolDepends
 import Distribution.Simple.Program
-<<<<<<< HEAD
 import Distribution.Simple.Setup as Setup
 import Distribution.Simple.BuildTarget
 import Distribution.Simple.LocalBuildInfo
-import Distribution.Types.PackageVersionConstraint
-import Distribution.Types.LocalBuildInfo
-=======
-import Distribution.Simple.Program.Db (appendProgramSearchPath, lookupProgramByName)
-import Distribution.Simple.Setup.Common as Setup
-import Distribution.Simple.Setup.Config as Setup
+import Distribution.Simple.Program.Db (appendProgramSearchPath)
 import Distribution.Simple.Utils
 import Distribution.System
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+import Distribution.Types.PackageVersionConstraint
+import Distribution.Types.LocalBuildInfo
 import Distribution.Types.ComponentRequestedSpec
 import Distribution.Types.GivenComponent
-import Distribution.Simple.Utils
-import Distribution.System
 import Distribution.Version
 import Distribution.Verbosity
 import qualified Distribution.Compat.Graph as Graph
@@ -375,18 +368,19 @@ configure (pkg_descr0, pbi) cfg = do
             (fromFlag (configUserInstall cfg))
             (configPackageDBs cfg)
 
+    programDbPre <- mkProgramDb cfg (configPrograms cfg)
     -- comp:            the compiler we're building with
     -- compPlatform:    the platform we're building for
     -- programDb:  location and args of all programs we're
     --                  building with
-    (comp         :: Compiler,
+    (comp :: Compiler,
      compPlatform :: Platform,
-     programDb    :: ProgramDb)
+     programDb :: ProgramDb)
         <- configCompilerEx
             (flagToMaybe (configHcFlavor cfg))
             (flagToMaybe (configHcPath cfg))
             (flagToMaybe (configHcPkg cfg))
-            (mkProgramDb cfg (configPrograms cfg))
+            programDbPre
             (lessVerbose verbosity)
 
     -- The InstalledPackageIndex of all installed packages
@@ -399,7 +393,6 @@ configure (pkg_descr0, pbi) cfg = do
     let internalPackageSet :: Set LibraryName
         internalPackageSet = getInternalLibraries pkg_descr0
 
-<<<<<<< HEAD
     -- Make a data structure describing what components are enabled.
     let enabled :: ComponentRequestedSpec
         enabled = case mb_cname of
@@ -421,23 +414,6 @@ configure (pkg_descr0, pbi) cfg = do
         die' verbosity $
               "--enable-tests/--enable-benchmarks are incompatible with" ++
               " explicitly specifying a component to configure."
-=======
-  programDbPre <- mkProgramDb cfg (configPrograms cfg)
-  -- comp:            the compiler we're building with
-  -- compPlatform:    the platform we're building for
-  -- programDb:  location and args of all programs we're
-  --                  building with
-  ( comp :: Compiler
-    , compPlatform :: Platform
-    , programDb00 :: ProgramDb
-    ) <-
-    configCompilerEx
-      (flagToMaybe (configHcFlavor cfg))
-      (flagToMaybe (configHcPath cfg))
-      (flagToMaybe (configHcPkg cfg))
-      programDbPre
-      (lessVerbose verbosity)
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
     -- Some sanity checks related to dynamic/static linking.
     when (fromFlag (configDynExe cfg) && fromFlag (configFullyStaticExe cfg)) $
@@ -880,15 +856,6 @@ mkProgramDb cfg initialProgramDb = do
     . userSpecifyPaths (configProgramPaths cfg)
     $ programDb
   where
-<<<<<<< HEAD
-    programDb  = userSpecifyArgss (configProgramArgs cfg)
-                 . userSpecifyPaths (configProgramPaths cfg)
-                 . setProgramSearchPath searchpath
-                 $ initialProgramDb
-    searchpath = map ProgramSearchPathDir
-                 (fromNubList $ configProgramPathExtra cfg)
-                 ++ getProgramSearchPath initialProgramDb
-=======
     searchpath = fromNubList $ configProgramPathExtra cfg
 
 -- Note. We try as much as possible to _prepend_ rather than postpend the extra-prog-path
@@ -897,7 +864,6 @@ mkProgramDb cfg initialProgramDb = do
 -- so for v2 builds adding it again is entirely unnecessary. However, it needs to get added again _anyway_
 -- so as to take effect for v1 builds or standalone calls to Setup.hs
 -- In this instance, the lesser evil is to not allow it to override the system path.
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 -- -----------------------------------------------------------------------------
 -- Helper functions for configure
@@ -1745,29 +1711,15 @@ ccLdOptionsBuildInfo cflags ldflags ldflags_static =
 -- -----------------------------------------------------------------------------
 -- Determining the compiler details
 
-<<<<<<< HEAD
 configCompilerAuxEx :: ConfigFlags
                     -> IO (Compiler, Platform, ProgramDb)
-configCompilerAuxEx cfg = configCompilerEx (flagToMaybe $ configHcFlavor cfg)
+configCompilerAuxEx cfg = do
+  programDb <- mkProgramDb cfg defaultProgramDb
+  configCompilerEx (flagToMaybe $ configHcFlavor cfg)
                                            (flagToMaybe $ configHcPath cfg)
                                            (flagToMaybe $ configHcPkg cfg)
                                            programDb
                                            (fromFlag (configVerbosity cfg))
-  where
-    programDb = mkProgramDb cfg defaultProgramDb
-=======
-configCompilerAuxEx
-  :: ConfigFlags
-  -> IO (Compiler, Platform, ProgramDb)
-configCompilerAuxEx cfg = do
-  programDb <- mkProgramDb cfg defaultProgramDb
-  configCompilerEx
-    (flagToMaybe $ configHcFlavor cfg)
-    (flagToMaybe $ configHcPath cfg)
-    (flagToMaybe $ configHcPkg cfg)
-    programDb
-    (fromFlag (configVerbosity cfg))
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 configCompilerEx :: Maybe CompilerFlavor -> Maybe FilePath -> Maybe FilePath
                  -> ProgramDb -> Verbosity
diff --git a/Cabal/src/Distribution/Simple/ConfigureScript.hs b/Cabal/src/Distribution/Simple/ConfigureScript.hs
index 91eff3b06b4..9d5e363585d 100644
--- a/Cabal/src/Distribution/Simple/ConfigureScript.hs
+++ b/Cabal/src/Distribution/Simple/ConfigureScript.hs
@@ -137,17 +137,9 @@ runConfigureScript verbosity flags lbi = do
       maybeHostFlag = if hp == buildPlatform then [] else ["--host=" ++ show (pretty hp)]
       args' = configureFile':args ++ ["CC=" ++ ccProgShort] ++ maybeHostFlag
       shProg = simpleProgram "sh"
-<<<<<<< HEAD
-      progDb = modifyProgramSearchPath
-               (\p -> map ProgramSearchPathDir extraPath ++ p) emptyProgramDb
-  shConfiguredProg <- lookupProgram shProg
-                      `fmap` configureProgram  verbosity shProg progDb
-=======
   progDb <- appendProgramSearchPath verbosity extraPath emptyProgramDb
-  shConfiguredProg <-
-    lookupProgram shProg
-      `fmap` configureProgram verbosity shProg progDb
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+  shConfiguredProg <- lookupProgram shProg
+                      `fmap` configureProgram verbosity shProg progDb
   case shConfiguredProg of
       Just sh -> runProgramInvocation verbosity $
                  (programInvocation (sh {programOverrideEnv = overEnv}) args')
diff --git a/Cabal/src/Distribution/Simple/GHC.hs b/Cabal/src/Distribution/Simple/GHC.hs
index a9e3f1e7867..177727b587f 100644
--- a/Cabal/src/Distribution/Simple/GHC.hs
+++ b/Cabal/src/Distribution/Simple/GHC.hs
@@ -1889,17 +1889,8 @@ libAbiHash verbosity _pkg_descr lbi lib clbi = do
         | otherwise = error "libAbiHash: Can't find an enabled library way"
 
   (ghcProg, _) <- requireProgram verbosity ghcProgram (withPrograms lbi)
-<<<<<<< HEAD
   hash <- getProgramInvocationOutput verbosity
-          (ghcInvocation ghcProg comp platform ghcArgs)
-=======
-
-  hash <-
-    getProgramInvocationOutput
-      verbosity
-      =<< ghcInvocation verbosity ghcProg comp platform ghcArgs
-
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+          =<< ghcInvocation verbosity ghcProg comp platform ghcArgs
   return (takeWhile (not . isSpace) hash)
 
 componentGhcOptions :: Verbosity -> LocalBuildInfo
diff --git a/Cabal/src/Distribution/Simple/GHCJS.hs b/Cabal/src/Distribution/Simple/GHCJS.hs
index 5aed74f5bcb..3cc6c544434 100644
--- a/Cabal/src/Distribution/Simple/GHCJS.hs
+++ b/Cabal/src/Distribution/Simple/GHCJS.hs
@@ -1601,15 +1601,8 @@ libAbiHash verbosity _pkg_descr lbi lib clbi = do
         | otherwise = error "libAbiHash: Can't find an enabled library way"
 
   (ghcjsProg, _) <- requireProgram verbosity ghcjsProgram (withPrograms lbi)
-<<<<<<< HEAD
   hash <- getProgramInvocationOutput verbosity
-          (ghcInvocation ghcjsProg comp platform ghcArgs)
-=======
-  hash <-
-    getProgramInvocationOutput
-      verbosity
-      =<< ghcInvocation verbosity ghcjsProg comp platform ghcArgs
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+          =<< ghcInvocation verbose ghcjsProg comp platform ghcArgs
   return (takeWhile (not . isSpace) hash)
 
 componentGhcOptions :: Verbosity -> LocalBuildInfo
diff --git a/Cabal/src/Distribution/Simple/Program/Db.hs b/Cabal/src/Distribution/Simple/Program/Db.hs
index 8399d9c247f..b9fb61a7913 100644
--- a/Cabal/src/Distribution/Simple/Program/Db.hs
+++ b/Cabal/src/Distribution/Simple/Program/Db.hs
@@ -32,9 +32,9 @@ module Distribution.Simple.Program.Db (
     restoreProgramDb,
 
     -- ** Query and manipulate the program db
-<<<<<<< HEAD
     addKnownProgram,
     addKnownPrograms,
+    appendProgramSearchPath,
     lookupKnownProgram,
     knownPrograms,
     getProgramSearchPath,
@@ -49,26 +49,6 @@ module Distribution.Simple.Program.Db (
     lookupProgram,
     updateProgram,
     configuredPrograms,
-=======
-  , addKnownProgram
-  , addKnownPrograms
-  , appendProgramSearchPath
-  , lookupKnownProgram
-  , knownPrograms
-  , getProgramSearchPath
-  , setProgramSearchPath
-  , modifyProgramSearchPath
-  , userSpecifyPath
-  , userSpecifyPaths
-  , userMaybeSpecifyPath
-  , userSpecifyArgs
-  , userSpecifyArgss
-  , userSpecifiedArgs
-  , lookupProgram
-  , lookupProgramByName
-  , updateProgram
-  , configuredPrograms
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
     -- ** Query and manipulate the program db
     configureProgram,
@@ -243,15 +223,6 @@ modifyProgramSearchPath :: (ProgramSearchPath -> ProgramSearchPath)
 modifyProgramSearchPath f db =
   setProgramSearchPath (f $ getProgramSearchPath db) db
 
-<<<<<<< HEAD
--- |User-specify this path.  Basically override any path information
--- for this program in the configuration. If it's not a known
--- program ignore it.
---
-userSpecifyPath :: String   -- ^Program name
-                -> FilePath -- ^user-specified path to the program
-                -> ProgramDb -> ProgramDb
-=======
 -- | Modify the current 'ProgramSearchPath' used by the 'ProgramDb'
 -- by appending the provided extra paths. Also logs the added paths
 -- in info verbosity.
@@ -267,17 +238,13 @@ appendProgramSearchPath verbosity extraPaths db =
       pure $ modifyProgramSearchPath (map ProgramSearchPathDir extraPaths ++) db
     else pure db
 
--- | User-specify this path.  Basically override any path information
---  for this program in the configuration. If it's not a known
---  program ignore it.
-userSpecifyPath
-  :: String
-  -- ^ Program name
-  -> FilePath
-  -- ^ user-specified path to the program
-  -> ProgramDb
-  -> ProgramDb
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+-- |User-specify this path.  Basically override any path information
+-- for this program in the configuration. If it's not a known
+-- program ignore it.
+--
+userSpecifyPath :: String   -- ^Program name
+                -> FilePath -- ^user-specified path to the program
+                -> ProgramDb -> ProgramDb
 userSpecifyPath name path = updateUnconfiguredProgs $
   flip Map.update name $ \(prog, _, args) -> Just (prog, Just path, args)
 
diff --git a/Cabal/src/Distribution/Simple/Program/Find.hs b/Cabal/src/Distribution/Simple/Program/Find.hs
index 5602d354fdf..b53de5cab65 100644
--- a/Cabal/src/Distribution/Simple/Program/Find.hs
+++ b/Cabal/src/Distribution/Simple/Program/Find.hs
@@ -24,7 +24,6 @@
 -- So we need an extension of the usual 'findExecutable' that can look in
 -- additional locations, either before, after or instead of the normal OS
 -- locations.
-<<<<<<< HEAD
 --
 module Distribution.Simple.Program.Find (
     -- * Program search path
@@ -33,26 +32,17 @@ module Distribution.Simple.Program.Find (
     defaultProgramSearchPath,
     findProgramOnSearchPath,
     programSearchPathAsPATHVar,
+    logExtraProgramSearchPath,
     getSystemSearchPath,
-=======
-module Distribution.Simple.Program.Find
-  ( -- * Program search path
-    ProgramSearchPath
-  , ProgramSearchPathEntry (..)
-  , defaultProgramSearchPath
-  , findProgramOnSearchPath
-  , programSearchPathAsPATHVar
-  , logExtraProgramSearchPath
-  , getSystemSearchPath
-  , getExtraPathEnv
-  , simpleProgram
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+    getExtraPathEnv,
+    simpleProgram
   ) where
 
 import Prelude ()
 import Distribution.Compat.Prelude
 
 import Distribution.Verbosity
+import Distribution.Simple.Program.Types
 import Distribution.Simple.Utils
 import Distribution.System
 import Distribution.Compat.Environment
@@ -66,34 +56,9 @@ import System.FilePath as FilePath
 import qualified System.Win32 as Win32
 #endif
 
--- | A search path to use when locating executables. This is analogous
--- to the unix @$PATH@ or win32 @%PATH%@ but with the ability to use
--- the system default method for finding executables ('findExecutable' which
--- on unix is simply looking on the @$PATH@ but on win32 is a bit more
--- complicated).
---
--- The default to use is @[ProgSearchPathDefault]@ but you can add extra dirs
--- either before, after or instead of the default, e.g. here we add an extra
--- dir to search after the usual ones.
---
--- > ['ProgramSearchPathDefault', 'ProgramSearchPathDir' dir]
---
-type ProgramSearchPath = [ProgramSearchPathEntry]
-data ProgramSearchPathEntry =
-         ProgramSearchPathDir FilePath  -- ^ A specific dir
-       | ProgramSearchPathDefault       -- ^ The system default
-  deriving (Eq, Generic, Typeable)
-
-instance Binary ProgramSearchPathEntry
-instance Structured ProgramSearchPathEntry
-
 defaultProgramSearchPath :: ProgramSearchPath
 defaultProgramSearchPath = [ProgramSearchPathDefault]
 
-<<<<<<< HEAD
-findProgramOnSearchPath :: Verbosity -> ProgramSearchPath
-                        -> FilePath -> IO (Maybe (FilePath, [FilePath]))
-=======
 logExtraProgramSearchPath
   :: Verbosity
   -> [FilePath]
@@ -103,12 +68,8 @@ logExtraProgramSearchPath verbosity extraPaths =
     "Including the following directories in PATH:"
       : map ("- " ++) extraPaths
 
-findProgramOnSearchPath
-  :: Verbosity
-  -> ProgramSearchPath
-  -> FilePath
-  -> IO (Maybe (FilePath, [FilePath]))
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+findProgramOnSearchPath :: Verbosity -> ProgramSearchPath
+                        -> FilePath -> IO (Maybe (FilePath, [FilePath]))
 findProgramOnSearchPath verbosity searchpath prog = do
     debug verbosity $ "Searching for " ++ prog ++ " in path."
     res <- tryPathElems [] searchpath
@@ -246,3 +207,19 @@ findExecutable prog = do
         _     -> return mExe
 #endif
 
+
+-- | Make a simple named program.
+--
+-- By default we'll just search for it in the path and not try to find the
+-- version name. You can override these behaviours if necessary, eg:
+--
+-- > (simpleProgram "foo") { programFindLocation = ... , programFindVersion ... }
+--
+simpleProgram :: String -> Program
+simpleProgram name = Program {
+    programName         = name,
+    programFindLocation = \v p -> findProgramOnSearchPath v p name,
+    programFindVersion  = \_ _ -> return Nothing,
+    programPostConf     = \_ p -> return p,
+    programNormaliseArgs   = \_ _ -> id
+  }
diff --git a/Cabal/src/Distribution/Simple/Program/GHC.hs b/Cabal/src/Distribution/Simple/Program/GHC.hs
index ee3f8d8bc3f..3025eee7372 100644
--- a/Cabal/src/Distribution/Simple/Program/GHC.hs
+++ b/Cabal/src/Distribution/Simple/Program/GHC.hs
@@ -31,14 +31,9 @@ import Distribution.PackageDescription
 import Distribution.ModuleName
 import Distribution.Simple.Compiler
 import Distribution.Simple.Flag
-<<<<<<< HEAD
-=======
-import Distribution.Simple.GHC.ImplInfo
 import Distribution.Simple.Program.Find (getExtraPathEnv)
 import Distribution.Simple.Program.Run
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import Distribution.Simple.Program.Types
-import Distribution.Simple.Program.Run
 import Distribution.System
 import Distribution.Pretty
 import Distribution.Types.ComponentId
@@ -535,21 +530,11 @@ data GhcOptions = GhcOptions {
   -- | Get GHC to be quiet or verbose with what it's doing; the @ghc -v@ flag.
   ghcOptVerbosity     :: Flag Verbosity,
 
-<<<<<<< HEAD
   -- | Put the extra folders in the PATH environment variable we invoke
   -- GHC with
   ghcOptExtraPath     :: NubListR FilePath,
 
   -- | Let GHC know that it is Cabal that's calling it.
-=======
-    ghcOptVerbosity :: Flag Verbosity
-  -- ^ Get GHC to be quiet or verbose with what it's doing; the @ghc -v@ flag.
-  , ghcOptExtraPath :: NubListR FilePath
-  -- ^ Put the extra folders in the PATH environment variable we invoke
-  -- GHC with
-  , ghcOptCabal :: Flag Bool
-  -- ^ Let GHC know that it is Cabal that's calling it.
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   -- Modifies some of the GHC error messages.
   ghcOptCabal         :: Flag Bool
 
@@ -587,22 +572,8 @@ runGHC :: Verbosity -> ConfiguredProgram -> Compiler -> Platform  -> GhcOptions
 runGHC verbosity ghcProg comp platform opts = do
   runProgramInvocation verbosity =<< ghcInvocation verbosity ghcProg comp platform opts
 
-<<<<<<< HEAD
-
-ghcInvocation :: ConfiguredProgram -> Compiler -> Platform -> GhcOptions
-              -> ProgramInvocation
-ghcInvocation prog comp platform opts =
-    (programInvocation prog (renderGhcOptions comp platform opts)) {
-        progInvokePathEnv = fromNubListR (ghcOptExtraPath opts)
-    }
-=======
-ghcInvocation
-  :: Verbosity
-  -> ConfiguredProgram
-  -> Compiler
-  -> Platform
-  -> GhcOptions
-  -> IO ProgramInvocation
+ghcInvocation :: Verbosity -> ConfiguredProgram -> Compiler -> Platform -> GhcOptions
+              -> IO ProgramInvocation
 ghcInvocation verbosity ghcProg comp platform opts = do
   -- NOTE: GHC is the only program whose path we modify with more values than
   -- the standard @extra-prog-path@, namely the folders of the executables in
@@ -612,7 +583,6 @@ ghcInvocation verbosity ghcProg comp platform opts = do
   let ghcProg' = ghcProg{programOverrideEnv = envOverrides ++ extraPath}
 
   pure $ programInvocation ghcProg' (renderGhcOptions comp platform opts)
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 renderGhcOptions :: Compiler -> Platform -> GhcOptions -> [String]
 renderGhcOptions comp _platform@(Platform _arch os) opts
diff --git a/Cabal/src/Distribution/Simple/Program/Run.hs b/Cabal/src/Distribution/Simple/Program/Run.hs
index 8a765582be4..ef6e8972b86 100644
--- a/Cabal/src/Distribution/Simple/Program/Run.hs
+++ b/Cabal/src/Distribution/Simple/Program/Run.hs
@@ -37,11 +37,6 @@ import Distribution.Simple.Program.Types
 import Distribution.Simple.Utils
 import Distribution.Utils.Generic
 import Distribution.Verbosity
-<<<<<<< HEAD
-
-import System.FilePath (searchPathSeparator)
-=======
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 import qualified Data.ByteString.Lazy as LBS
 import qualified Data.Map             as Map
@@ -52,31 +47,16 @@ import qualified Data.Map             as Map
 -- and actually doing it. This provides the opportunity to the caller to
 -- adjust how the program will be called. These invocations can either be run
 -- directly or turned into shell or batch scripts.
-<<<<<<< HEAD
 --
 data ProgramInvocation = ProgramInvocation {
        progInvokePath  :: FilePath,
        progInvokeArgs  :: [String],
        progInvokeEnv   :: [(String, Maybe String)],
-       -- Extra paths to add to PATH
-       progInvokePathEnv :: [FilePath],
        progInvokeCwd   :: Maybe FilePath,
        progInvokeInput :: Maybe IOData,
        progInvokeInputEncoding  :: IOEncoding, -- ^ TODO: remove this, make user decide when constructing 'progInvokeInput'.
        progInvokeOutputEncoding :: IOEncoding
      }
-=======
-data ProgramInvocation = ProgramInvocation
-  { progInvokePath :: FilePath
-  , progInvokeArgs :: [String]
-  , progInvokeEnv :: [(String, Maybe String)]
-  , progInvokeCwd :: Maybe FilePath
-  , progInvokeInput :: Maybe IOData
-  , progInvokeInputEncoding :: IOEncoding
-  -- ^ TODO: remove this, make user decide when constructing 'progInvokeInput'.
-  , progInvokeOutputEncoding :: IOEncoding
-  }
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 data IOEncoding = IOEncodingText   -- locale mode text
                 | IOEncodingUTF8   -- always utf8
@@ -88,28 +68,15 @@ encodeToIOData IOEncodingUTF8 (IODataText str)     = IODataBinary (toUTF8LBS str
 
 emptyProgramInvocation :: ProgramInvocation
 emptyProgramInvocation =
-<<<<<<< HEAD
   ProgramInvocation {
     progInvokePath  = "",
     progInvokeArgs  = [],
     progInvokeEnv   = [],
-    progInvokePathEnv = [],
     progInvokeCwd   = Nothing,
     progInvokeInput = Nothing,
     progInvokeInputEncoding  = IOEncodingText,
     progInvokeOutputEncoding = IOEncodingText
   }
-=======
-  ProgramInvocation
-    { progInvokePath = ""
-    , progInvokeArgs = []
-    , progInvokeEnv = []
-    , progInvokeCwd = Nothing
-    , progInvokeInput = Nothing
-    , progInvokeInputEncoding = IOEncodingText
-    , progInvokeOutputEncoding = IOEncodingText
-    }
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 simpleProgramInvocation :: FilePath -> [String] -> ProgramInvocation
 simpleProgramInvocation path args =
@@ -130,13 +97,11 @@ programInvocation prog args =
 
 
 runProgramInvocation :: Verbosity -> ProgramInvocation -> IO ()
-<<<<<<< HEAD
 runProgramInvocation verbosity
   ProgramInvocation {
     progInvokePath  = path,
     progInvokeArgs  = args,
     progInvokeEnv   = [],
-    progInvokePathEnv = [],
     progInvokeCwd   = Nothing,
     progInvokeInput = Nothing
   } =
@@ -147,12 +112,10 @@ runProgramInvocation verbosity
     progInvokePath  = path,
     progInvokeArgs  = args,
     progInvokeEnv   = envOverrides,
-    progInvokePathEnv = extraPath,
     progInvokeCwd   = mcwd,
     progInvokeInput = Nothing
   } = do
-    pathOverride <- getExtraPathEnv envOverrides extraPath
-    menv <- getEffectiveEnvironment (envOverrides ++ pathOverride)
+    menv <- getEffectiveEnvironment envOverrides
     maybeExit $ rawSystemIOWithEnv verbosity
                                    path args
                                    mcwd menv
@@ -163,69 +126,15 @@ runProgramInvocation verbosity
     progInvokePath  = path,
     progInvokeArgs  = args,
     progInvokeEnv   = envOverrides,
-    progInvokePathEnv = extraPath,
     progInvokeCwd   = mcwd,
     progInvokeInput = Just inputStr,
     progInvokeInputEncoding = encoding
   } = do
-    pathOverride <- getExtraPathEnv envOverrides extraPath
-    menv <- getEffectiveEnvironment (envOverrides ++ pathOverride)
+    menv <- getEffectiveEnvironment envOverrides
     (_, errors, exitCode) <- rawSystemStdInOut verbosity
                                     path args
                                     mcwd menv
                                     (Just input) IODataModeBinary
-=======
-runProgramInvocation
-  verbosity
-  ProgramInvocation
-    { progInvokePath = path
-    , progInvokeArgs = args
-    , progInvokeEnv = []
-    , progInvokeCwd = Nothing
-    , progInvokeInput = Nothing
-    } =
-    rawSystemExit verbosity path args
-runProgramInvocation
-  verbosity
-  ProgramInvocation
-    { progInvokePath = path
-    , progInvokeArgs = args
-    , progInvokeEnv = envOverrides
-    , progInvokeCwd = mcwd
-    , progInvokeInput = Nothing
-    } = do
-    menv <- getEffectiveEnvironment envOverrides
-    maybeExit $
-      rawSystemIOWithEnv
-        verbosity
-        path
-        args
-        mcwd
-        menv
-        Nothing
-        Nothing
-        Nothing
-runProgramInvocation
-  verbosity
-  ProgramInvocation
-    { progInvokePath = path
-    , progInvokeArgs = args
-    , progInvokeEnv = envOverrides
-    , progInvokeCwd = mcwd
-    , progInvokeInput = Just inputStr
-    , progInvokeInputEncoding = encoding
-    } = do
-    menv <- getEffectiveEnvironment envOverrides
-    (_, errors, exitCode) <-
-      rawSystemStdInOut
-        verbosity
-        path
-        args
-        mcwd
-        menv
-        (Just input)
-        IODataModeBinary
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
     when (exitCode /= ExitSuccess) $
       die' verbosity $ "'" ++ path ++ "' exited with an error:\n" ++ errors
   where
@@ -261,20 +170,11 @@ getProgramInvocationIODataAndErrors
 getProgramInvocationIODataAndErrors
   verbosity
   ProgramInvocation
-<<<<<<< HEAD
     { progInvokePath          = path
     , progInvokeArgs          = args
     , progInvokeEnv           = envOverrides
-    , progInvokePathEnv       = extraPath
     , progInvokeCwd           = mcwd
     , progInvokeInput         = minputStr
-=======
-    { progInvokePath = path
-    , progInvokeArgs = args
-    , progInvokeEnv = envOverrides
-    , progInvokeCwd = mcwd
-    , progInvokeInput = minputStr
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
     , progInvokeInputEncoding = encoding
     }
   mode = do
@@ -283,21 +183,6 @@ getProgramInvocationIODataAndErrors
   where
     input = encodeToIOData encoding <$> minputStr
 
-<<<<<<< HEAD
-getExtraPathEnv :: [(String, Maybe String)] -> [FilePath] -> IO [(String, Maybe String)]
-getExtraPathEnv _ [] = return []
-getExtraPathEnv env extras = do
-    mb_path <- case lookup "PATH" env of
-                Just x  -> return x
-                Nothing -> lookupEnv "PATH"
-    let extra = intercalate [searchPathSeparator] extras
-        path' = case mb_path of
-                    Nothing   -> extra
-                    Just path -> extra ++ searchPathSeparator : path
-    return [("PATH", Just path')]
-
-=======
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 -- | Return the current environment extended with the given overrides.
 -- If an entry is specified twice in @overrides@, the second entry takes
 -- precedence.
diff --git a/Cabal/src/Distribution/Simple/Program/Types.hs b/Cabal/src/Distribution/Simple/Program/Types.hs
index f2684922161..e90290d77ee 100644
--- a/Cabal/src/Distribution/Simple/Program/Types.hs
+++ b/Cabal/src/Distribution/Simple/Program/Types.hs
@@ -25,7 +25,6 @@ module Distribution.Simple.Program.Types (
     Program(..),
     ProgramSearchPath,
     ProgramSearchPathEntry(..),
-    simpleProgram,
 
     -- * Configured program and related functions
     ConfiguredProgram(..),
@@ -40,7 +39,6 @@ import Prelude ()
 import Distribution.Compat.Prelude
 
 import Distribution.PackageDescription
-import Distribution.Simple.Program.Find
 import Distribution.Version
 import Distribution.Verbosity
 
@@ -87,8 +85,6 @@ instance Show Program where
 
 type ProgArg = String
 
-<<<<<<< HEAD
-=======
 -- | A search path to use when locating executables. This is analogous
 -- to the unix @$PATH@ or win32 @%PATH%@ but with the ability to use
 -- the system default method for finding executables ('findExecutable' which
@@ -119,7 +115,6 @@ data ProgramSearchPathEntry
 instance Binary ProgramSearchPathEntry
 instance Structured ProgramSearchPathEntry
 
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 -- | Represents a program which has been configured and is thus ready to be run.
 --
 -- These are usually made by configuring a 'Program', but if you have to
@@ -190,22 +185,6 @@ programPath = locationPath . programLocation
 suppressOverrideArgs :: ConfiguredProgram -> ConfiguredProgram
 suppressOverrideArgs prog = prog { programOverrideArgs = [] }
 
--- | Make a simple named program.
---
--- By default we'll just search for it in the path and not try to find the
--- version name. You can override these behaviours if necessary, eg:
---
--- > (simpleProgram "foo") { programFindLocation = ... , programFindVersion ... }
---
-simpleProgram :: String -> Program
-simpleProgram name = Program {
-    programName         = name,
-    programFindLocation = \v p -> findProgramOnSearchPath v p name,
-    programFindVersion  = \_ _ -> return Nothing,
-    programPostConf     = \_ p -> return p,
-    programNormaliseArgs   = \_ _ -> id
-  }
-
 -- | Make a simple 'ConfiguredProgram'.
 --
 -- > simpleConfiguredProgram "foo" (FoundOnSystem path)
diff --git a/cabal-install/src/Distribution/Client/CmdExec.hs b/cabal-install/src/Distribution/Client/CmdExec.hs
index 519d9794265..4c0ea639ded 100644
--- a/cabal-install/src/Distribution/Client/CmdExec.hs
+++ b/cabal-install/src/Distribution/Client/CmdExec.hs
@@ -58,21 +58,13 @@ import Distribution.Client.ProjectPlanning
 import Distribution.Simple.Command
   ( CommandUI(..) )
 import Distribution.Simple.Program.Db
-<<<<<<< HEAD
-  ( modifyProgramSearchPath
-=======
   ( appendProgramSearchPath
   , configuredPrograms
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   , requireProgram
   , configuredPrograms
   )
-<<<<<<< HEAD
 import Distribution.Simple.Program.Find
-  ( ProgramSearchPathEntry(..)
-  )
-=======
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+  ( simpleProgram )
 import Distribution.Simple.Program.Run
   ( programInvocation
   , runProgramInvocation
@@ -81,7 +73,6 @@ import Distribution.Simple.Program.Types
   ( programOverrideEnv
   , programDefaultArgs
   , programPath
-  , simpleProgram
   , ConfiguredProgram
   )
 import Distribution.Simple.GHC
@@ -91,15 +82,8 @@ import Distribution.Simple.Flag
   ( fromFlagOrDefault
   )
 import Distribution.Simple.Utils
-<<<<<<< HEAD
   ( die'
-  , info
   , createDirectoryIfMissingVerbose
-=======
-  ( createDirectoryIfMissingVerbose
-  , dieWithException
-  , notice
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   , withTempDirectory
   , wrapText
   , notice
@@ -168,14 +152,6 @@ execAction flags@NixStyleFlags {..} extraArgs globalFlags = do
     mempty
 
   -- Some dependencies may have executables. Let's put those on the PATH.
-<<<<<<< HEAD
-  extraPaths <- pathAdditions verbosity baseCtx buildCtx
-  let programDb = modifyProgramSearchPath
-                  (map ProgramSearchPathDir extraPaths ++)
-                . pkgConfigCompilerProgs
-                . elaboratedShared
-                $ buildCtx
-=======
   let extraPaths = pathAdditions baseCtx buildCtx
 
   programDb <-
@@ -185,7 +161,6 @@ execAction flags@NixStyleFlags {..} extraArgs globalFlags = do
       . pkgConfigCompilerProgs
       . elaboratedShared
       $ buildCtx
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
   -- Now that we have the packages, set up the environment. We accomplish this
   -- by creating an environment file that selects the databases and packages we
@@ -268,20 +243,7 @@ withTempEnvFile verbosity baseCtx buildCtx buildStatus action = do
        buildStatus
      action envOverrides)
 
-<<<<<<< HEAD
-<<<<<<< HEAD
-pathAdditions :: Verbosity -> ProjectBaseContext -> ProjectBuildContext -> IO [FilePath]
-pathAdditions verbosity ProjectBaseContext{..}ProjectBuildContext{..} = do
-  info verbosity . unlines $ "Including the following directories in PATH:"
-                           : paths
-  return paths
-  where
-  paths = S.toList
-        $ binDirectories distDirLayout elaboratedShared elaboratedPlanToExecute
-=======
-=======
 -- | Get paths to all dependency executables to be included in PATH.
->>>>>>> f06195d3a (Honor build-tool-depends in CmdRun)
 pathAdditions :: ProjectBaseContext -> ProjectBuildContext -> [FilePath]
 pathAdditions ProjectBaseContext{..} ProjectBuildContext{..} =
   paths ++ cabalConfigPaths
@@ -294,7 +256,6 @@ pathAdditions ProjectBaseContext{..} ProjectBuildContext{..} =
     paths =
       S.toList $
         binDirectories distDirLayout elaboratedShared elaboratedPlanToExecute
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 -- | Get paths to all dependency executables to be included in PATH.
 binDirectories
diff --git a/cabal-install/src/Distribution/Client/CmdInstall.hs b/cabal-install/src/Distribution/Client/CmdInstall.hs
index 4231ddfb490..203b90c6b60 100644
--- a/cabal-install/src/Distribution/Client/CmdInstall.hs
+++ b/cabal-install/src/Distribution/Client/CmdInstall.hs
@@ -39,88 +39,7 @@ import Distribution.Client.Types
          , SourcePackageDb(..) )
 import qualified Distribution.Client.InstallPlan as InstallPlan
 import Distribution.Package
-<<<<<<< HEAD
          ( Package(..), PackageName, mkPackageName, unPackageName )
-=======
-  ( Package (..)
-  , PackageName
-  , mkPackageName
-  , unPackageName
-  )
-import Distribution.Simple.BuildPaths
-  ( exeExtension
-  )
-import Distribution.Simple.Command
-  ( CommandUI (..)
-  , optionName
-  , usageAlternatives
-  )
-import Distribution.Simple.Compiler
-  ( Compiler (..)
-  , CompilerFlavor (..)
-  , CompilerId (..)
-  , PackageDB (..)
-  , PackageDBStack
-  )
-import Distribution.Simple.Configure
-  ( configCompilerEx
-  )
-import Distribution.Simple.Flag
-  ( flagElim
-  , flagToMaybe
-  , fromFlagOrDefault
-  )
-import Distribution.Simple.GHC
-  ( GhcEnvironmentFileEntry (..)
-  , GhcImplInfo (..)
-  , ParseErrorExc
-  , getGhcAppDir
-  , getImplInfo
-  , ghcPlatformAndVersionString
-  , readGhcEnvironmentFile
-  , renderGhcEnvironmentFile
-  )
-import qualified Distribution.Simple.InstallDirs as InstallDirs
-import qualified Distribution.Simple.PackageIndex as PI
-import Distribution.Simple.Program.Db
-  ( appendProgramSearchPath
-  , defaultProgramDb
-  , userSpecifyArgss
-  , userSpecifyPaths
-  )
-import Distribution.Simple.Setup
-  ( Flag (..)
-  , installDirsOptions
-  )
-import Distribution.Simple.Utils
-  ( createDirectoryIfMissingVerbose
-  , dieWithException
-  , notice
-  , ordNub
-  , safeHead
-  , warn
-  , withTempDirectory
-  , wrapText
-  )
-import Distribution.Solver.Types.PackageConstraint
-  ( PackageProperty (..)
-  )
-import Distribution.Solver.Types.PackageIndex
-  ( lookupPackageName
-  , searchByName
-  )
-import Distribution.Solver.Types.SourcePackage
-  ( SourcePackage (..)
-  )
-import Distribution.System
-  ( OS (Windows)
-  , Platform
-  , buildOS
-  )
-import Distribution.Types.InstalledPackageInfo
-  ( InstalledPackageInfo (..)
-  )
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import Distribution.Types.PackageId
          ( PackageIdentifier(..) )
 import Distribution.Client.ProjectConfig
@@ -140,11 +59,9 @@ import Distribution.Client.ProjectConfig.Types
          , projectConfigConfigFile )
 import Distribution.Simple.Program.Db
          ( userSpecifyPaths, userSpecifyArgss, defaultProgramDb
-         , modifyProgramSearchPath )
+         , appendProgramSearchPath )
 import Distribution.Simple.BuildPaths
          ( exeExtension )
-import Distribution.Simple.Program.Find
-         ( ProgramSearchPathEntry(..) )
 import Distribution.Client.Config
          ( defaultInstallPath, loadConfig, SavedConfig(..) )
 import qualified Distribution.Simple.PackageIndex as PI
@@ -397,7 +314,6 @@ installAction flags@NixStyleFlags { extraFlags = clientInstallFlags', .. } targe
      withProjectOrGlobalConfig verbosity ignoreProject globalConfigFlag withProject withoutProject
 
   let
-<<<<<<< HEAD
     ProjectConfig {
       projectConfigBuildOnly = ProjectConfigBuildOnly {
         projectConfigLogsDir
@@ -406,7 +322,8 @@ installAction flags@NixStyleFlags { extraFlags = clientInstallFlags', .. } targe
         projectConfigHcFlavor,
         projectConfigHcPath,
         projectConfigHcPkg,
-        projectConfigStoreDir
+        projectConfigStoreDir,
+        projectConfigProgPathExtra
       },
       projectConfigLocalPackages = PackageConfig {
         packageConfigProgramPaths,
@@ -414,28 +331,6 @@ installAction flags@NixStyleFlags { extraFlags = clientInstallFlags', .. } targe
         packageConfigProgramPathExtra
       }
     } = config
-=======
-    ProjectConfig
-      { projectConfigBuildOnly =
-        ProjectConfigBuildOnly
-          { projectConfigLogsDir
-          }
-      , projectConfigShared =
-        ProjectConfigShared
-          { projectConfigHcFlavor
-          , projectConfigHcPath
-          , projectConfigHcPkg
-          , projectConfigStoreDir
-          , projectConfigProgPathExtra
-          }
-      , projectConfigLocalPackages =
-        PackageConfig
-          { packageConfigProgramPaths
-          , packageConfigProgramArgs
-          , packageConfigProgramPathExtra
-          }
-      } = config
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
     hcFlavor = flagToMaybe projectConfigHcFlavor
     hcPath   = flagToMaybe projectConfigHcPath
@@ -445,18 +340,9 @@ installAction flags@NixStyleFlags { extraFlags = clientInstallFlags', .. } targe
   let
     -- ProgramDb with directly user specified paths
     preProgDb =
-<<<<<<< HEAD
-        userSpecifyPaths (Map.toList (getMapLast packageConfigProgramPaths))
-      . userSpecifyArgss (Map.toList (getMapMappend packageConfigProgramArgs))
-      . modifyProgramSearchPath
-          (++ [ ProgramSearchPathDir dir
-              | dir <- fromNubList packageConfigProgramPathExtra ])
-      $ defaultProgramDb
-=======
       userSpecifyPaths (Map.toList (getMapLast packageConfigProgramPaths))
         . userSpecifyArgss (Map.toList (getMapMappend packageConfigProgramArgs))
         $ configProgDb
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
   -- progDb is a program database with compiler tools configured properly
   (compiler@Compiler { compilerId =
diff --git a/cabal-install/src/Distribution/Client/CmdRun.hs b/cabal-install/src/Distribution/Client/CmdRun.hs
index 5d651bc7eee..e416e7e2948 100644
--- a/cabal-install/src/Distribution/Client/CmdRun.hs
+++ b/cabal-install/src/Distribution/Client/CmdRun.hs
@@ -34,12 +34,14 @@ import Distribution.Client.InstallPlan
          ( toList, foldPlanPackage )
 import Distribution.Client.NixStyleOptions
          ( NixStyleFlags (..), nixStyleOptions, defaultNixStyleFlags )
+import Distribution.Client.ProjectConfig.Types
 import Distribution.Client.ProjectOrchestration
 import Distribution.Client.ProjectPlanning
          ( ElaboratedConfiguredPackage(..)
-         , ElaboratedInstallPlan, binDirectoryFor )
+         , ElaboratedInstallPlan, binDirectoryFor
+         )
 import Distribution.Client.ProjectPlanning.Types
-         ( dataDirsEnvironmentForPlan )
+         ( dataDirsEnvironmentForPlan, elabExeDependencyPaths )
 import Distribution.Client.ScriptUtils
          ( AcceptNoTargets(..), TargetContext(..)
          , updateContextAndWriteProjectFile, withContextAndSelectors
@@ -52,6 +54,10 @@ import Distribution.Simple.Command
          ( CommandUI(..), usageAlternatives )
 import Distribution.Simple.Flag
          ( fromFlagOrDefault )
+import Distribution.Simple.Program.Find
+         ( ProgramSearchPathEntry(..), defaultProgramSearchPath,
+           programSearchPathAsPATHVar, logExtraProgramSearchPath
+         )
 import Distribution.Simple.Program.Run
          ( runProgramInvocation, ProgramInvocation(..),
            emptyProgramInvocation )
@@ -61,6 +67,8 @@ import Distribution.Types.ComponentName
          ( componentNameRaw )
 import Distribution.Types.UnitId
          ( UnitId )
+import Distribution.Utils.NubList
+         ( fromNubList )
 
 import Distribution.Types.UnqualComponentName
          ( UnqualComponentName, unUnqualComponentName )
@@ -69,111 +77,7 @@ import Distribution.Verbosity
 
 import Data.List (group)
 import qualified Data.Set as Set
-<<<<<<< HEAD
-=======
-import Distribution.Client.CmdErrorMessages
-  ( plural
-  , renderListCommaAnd
-  , renderListPretty
-  , renderTargetProblem
-  , renderTargetProblemNoTargets
-  , renderTargetSelector
-  , showTargetSelector
-  , targetSelectorFilter
-  , targetSelectorPluralPkgs
-  )
-import Distribution.Client.Errors
-import Distribution.Client.GlobalFlags
-  ( defaultGlobalFlags
-  )
-import Distribution.Client.InstallPlan
-  ( foldPlanPackage
-  , toList
-  )
-import Distribution.Client.NixStyleOptions
-  ( NixStyleFlags (..)
-  , defaultNixStyleFlags
-  , nixStyleOptions
-  )
-import Distribution.Client.ProjectConfig.Types
-  ( ProjectConfig (projectConfigShared)
-  , ProjectConfigShared (projectConfigProgPathExtra)
-  )
-import Distribution.Client.ProjectOrchestration
-import Distribution.Client.ProjectPlanning
-  ( ElaboratedConfiguredPackage (..)
-  , ElaboratedInstallPlan
-  , binDirectoryFor
-  )
-import Distribution.Client.ProjectPlanning.Types
-  ( dataDirsEnvironmentForPlan
-  , elabExeDependencyPaths
-  )
-import Distribution.Client.ScriptUtils
-  ( AcceptNoTargets (..)
-  , TargetContext (..)
-  , movedExePath
-  , updateContextAndWriteProjectFile
-  , withContextAndSelectors
-  )
-import Distribution.Client.Setup
-  ( ConfigFlags (..)
-  , GlobalFlags (..)
-  )
-import Distribution.Client.TargetProblem
-  ( TargetProblem (..)
-  )
-import Distribution.Client.Utils
-  ( giveRTSWarning
-  , occursOnlyOrBefore
-  )
-import Distribution.Simple.Command
-  ( CommandUI (..)
-  , usageAlternatives
-  )
-import Distribution.Simple.Flag
-  ( fromFlagOrDefault
-  )
-import Distribution.Simple.Program.Find
-  ( ProgramSearchPathEntry (ProgramSearchPathDir)
-  , defaultProgramSearchPath
-  , logExtraProgramSearchPath
-  , programSearchPathAsPATHVar
-  )
-import Distribution.Simple.Program.Run
-  ( ProgramInvocation (..)
-  , emptyProgramInvocation
-  , runProgramInvocation
-  )
-import Distribution.Simple.Utils
-  ( dieWithException
-  , info
-  , notice
-  , safeHead
-  , warn
-  , wrapText
-  )
-import Distribution.Types.ComponentName
-  ( componentNameRaw
-  )
-import Distribution.Types.UnitId
-  ( UnitId
-  )
-import Distribution.Types.UnqualComponentName
-  ( UnqualComponentName
-  , unUnqualComponentName
-  )
-import Distribution.Utils.NubList
-  ( fromNubList
-  )
-import Distribution.Verbosity
-  ( normal
-  , silent
-  )
-import GHC.Environment
-  ( getFullArgs
-  )
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+
 import System.Directory
          ( doesFileExist )
 import System.FilePath
@@ -349,7 +253,6 @@ runAction flags@NixStyleFlags {..} targetAndArgs globalFlags
     progPath <- programSearchPathAsPATHVar (map ProgramSearchPathDir extraPath ++ defaultProgramSearchPath)
 
     if dryRun
-<<<<<<< HEAD
        then notice verbosity "Running of executable suppressed by flag(s)"
        else
          runProgramInvocation
@@ -357,25 +260,11 @@ runAction flags@NixStyleFlags {..} targetAndArgs globalFlags
            emptyProgramInvocation {
              progInvokePath  = exePath,
              progInvokeArgs  = args,
-             progInvokeEnv   = dataDirsEnvironmentForPlan
+             progInvokeEnv   = ("PATH", Just $ progPath)
+                             : dataDirsEnvironmentForPlan
                                  (distDirLayout baseCtx)
                                  elaboratedPlan
            }
-=======
-      then notice verbosity "Running of executable suppressed by flag(s)"
-      else
-        runProgramInvocation
-          verbosity
-          emptyProgramInvocation
-            { progInvokePath = exePath
-            , progInvokeArgs = args
-            , progInvokeEnv =
-                ("PATH", Just $ progPath)
-                  : dataDirsEnvironmentForPlan
-                    (distDirLayout baseCtx)
-                    elaboratedPlan
-            }
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     (targetStr, args) = splitAt 1 targetAndArgs
 
diff --git a/cabal-install/src/Distribution/Client/Config.hs b/cabal-install/src/Distribution/Client/Config.hs
index 7890b2c8e26..0dc3079f5e4 100644
--- a/cabal-install/src/Distribution/Client/Config.hs
+++ b/cabal-install/src/Distribution/Client/Config.hs
@@ -1262,7 +1262,6 @@ parseConfig src initial = \str -> do
     -- This is a fixup, pending a full config parser rewrite, to
     -- ensure that config fields which can be comma-separated lists
     -- actually parse as comma-separated lists.
-<<<<<<< HEAD
     fixConfigMultilines conf = conf {
          savedConfigureFlags =
            let scf = savedConfigureFlags conf
@@ -1281,43 +1280,15 @@ parseConfig src initial = \str -> do
                    , configConfigureArgs      = splitMultiPath
                                                 (configConfigureArgs scf)
                }
-      }
-=======
-    fixConfigMultilines conf =
-      conf
-        { savedConfigureFlags =
-            let scf = savedConfigureFlags conf
-             in scf
-                  { configProgramPathExtra =
-                      toNubList $
-                        splitMultiPath
-                          (fromNubList $ configProgramPathExtra scf)
-                  , configExtraLibDirs =
-                      splitMultiPath
-                        (configExtraLibDirs scf)
-                  , configExtraLibDirsStatic =
-                      splitMultiPath
-                        (configExtraLibDirsStatic scf)
-                  , configExtraFrameworkDirs =
-                      splitMultiPath
-                        (configExtraFrameworkDirs scf)
-                  , configExtraIncludeDirs =
-                      splitMultiPath
-                        (configExtraIncludeDirs scf)
-                  , configConfigureArgs =
-                      splitMultiPath
-                        (configConfigureArgs scf)
-                  }
-        , savedGlobalFlags =
-            let sgf = savedGlobalFlags conf
-             in sgf
-                  { globalProgPathExtra =
+       , savedGlobalFlags =
+           let sgf = savedGlobalFlags conf
+           in sgf {
+                    globalProgPathExtra =
                       toNubList $
                         splitMultiPath
                           (fromNubList $ globalProgPathExtra sgf)
-                  }
-        }
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+               }
+      }
 
     parse = parseFields (configFieldDescriptions src
                       ++ deprecatedFieldDescriptions) initial
diff --git a/cabal-install/src/Distribution/Client/Get.hs b/cabal-install/src/Distribution/Client/Get.hs
index 2e16d68055e..c35b1ebd473 100644
--- a/cabal-install/src/Distribution/Client/Get.hs
+++ b/cabal-install/src/Distribution/Client/Get.hs
@@ -37,6 +37,8 @@ import Distribution.Simple.Program
          ( programName )
 import Distribution.Types.SourceRepo (RepoKind (..))
 import Distribution.Client.Types.SourceRepo (SourceRepositoryPackage (..), SourceRepoProxy, srpToProxy)
+import Distribution.Utils.NubList
+         ( fromNubList )
 
 import Distribution.Client.Setup
          ( GlobalFlags(..), GetFlags(..), RepoContext(..) )
@@ -53,14 +55,8 @@ import Distribution.PackageDescription.PrettyPrint
         ( writeGenericPackageDescription )
 
 import qualified Data.Map as Map
-<<<<<<< HEAD
 import Control.Monad ( mapM_ )
-=======
-import Distribution.Client.Errors
-import Distribution.Utils.NubList
-  ( fromNubList
-  )
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+
 import System.Directory
          ( createDirectoryIfMissing, doesDirectoryExist, doesFileExist )
 import System.FilePath
@@ -75,14 +71,9 @@ get :: Verbosity
     -> [UserTarget]
     -> IO ()
 get verbosity _ _ _ [] =
-<<<<<<< HEAD
     notice verbosity "No packages requested. Nothing to do."
 
-get verbosity repoCtxt _ getFlags userTargets = do
-=======
-  notice verbosity "No packages requested. Nothing to do."
 get verbosity repoCtxt globalFlags getFlags userTargets = do
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   let useSourceRepo = case getSourceRepository getFlags of
                         NoFlag -> False
                         _      -> True
@@ -133,14 +124,8 @@ get verbosity repoCtxt globalFlags getFlags userTargets = do
     prefix = fromFlagOrDefault "" (getDestDir getFlags)
 
     clone :: [UnresolvedSourcePackage] -> IO ()
-<<<<<<< HEAD
-    clone = clonePackagesFromSourceRepo verbosity prefix kind
+    clone = clonePackagesFromSourceRepo verbosity prefix kind (fromNubList $ globalProgPathExtra globalFlags)
           . map (\pkg -> (packageId pkg, packageSourceRepos pkg))
-=======
-    clone =
-      clonePackagesFromSourceRepo verbosity prefix kind (fromNubList $ globalProgPathExtra globalFlags)
-        . map (\pkg -> (packageId pkg, packageSourceRepos pkg))
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
       where
         kind :: Maybe RepoKind
         kind = fromFlag . getSourceRepository $ getFlags
@@ -292,54 +277,25 @@ instance Exception ClonePackageException where
 -- | Given a bunch of package ids and their corresponding available
 -- 'SourceRepo's, pick a single 'SourceRepo' for each one and clone into
 -- new subdirs of the given directory.
-<<<<<<< HEAD
 --
 clonePackagesFromSourceRepo :: Verbosity
                             -> FilePath            -- ^ destination dir prefix
                             -> Maybe RepoKind      -- ^ preferred 'RepoKind'
+                            -> [FilePath]          -- ^ Extra prog paths
                             -> [(PackageId, [PD.SourceRepo])]
                                                    -- ^ the packages and their
                                                    -- available 'SourceRepo's
                             -> IO ()
 clonePackagesFromSourceRepo verbosity destDirPrefix
-                            preferredRepoKind pkgrepos = do
-
-=======
-clonePackagesFromSourceRepo
-  :: Verbosity
-  -> FilePath
-  -- ^ destination dir prefix
-  -> Maybe RepoKind
-  -- ^ preferred 'RepoKind'
-  -> [FilePath]
-  -- ^ Extra prog paths
-  -> [(PackageId, [PD.SourceRepo])]
-  -- ^ the packages and their
-  -- available 'SourceRepo's
-  -> IO ()
-clonePackagesFromSourceRepo
-  verbosity
-  destDirPrefix
-  preferredRepoKind
-  progPaths
-  pkgrepos = do
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+                            preferredRepoKind progPaths pkgrepos = do
+
     -- Do a bunch of checks and collect the required info
     pkgrepos' <- traverse preCloneChecks pkgrepos
 
     -- Configure the VCS drivers for all the repository types we may need
-<<<<<<< HEAD
-    vcss <- configureVCSs verbosity $
+    vcss <- configureVCSs verbosity progPaths $
               Map.fromList [ (vcsRepoType vcs, vcs)
                            | (_, _, vcs, _) <- pkgrepos' ]
-=======
-    vcss <-
-      configureVCSs verbosity progPaths $
-        Map.fromList
-          [ (vcsRepoType vcs, vcs)
-          | (_, _, vcs, _) <- pkgrepos'
-          ]
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
     -- Now execute all the required commands for each repo
     sequence_
diff --git a/cabal-install/src/Distribution/Client/HttpUtils.hs b/cabal-install/src/Distribution/Client/HttpUtils.hs
index 6fbd819b074..67aa55a18ee 100644
--- a/cabal-install/src/Distribution/Client/HttpUtils.hs
+++ b/cabal-install/src/Distribution/Client/HttpUtils.hs
@@ -19,67 +19,6 @@ import Prelude ()
 import Distribution.Client.Compat.Prelude hiding (Proxy (..))
 import Distribution.Utils.Generic
 
-<<<<<<< HEAD
-=======
-import qualified Control.Exception as Exception
-import Distribution.Client.Types
-  ( RemoteRepo (..)
-  , unRepoName
-  )
-import Distribution.Client.Types.Credentials (Auth)
-import Distribution.Client.Utils
-  ( withTempFileName
-  )
-import Distribution.Client.Version
-  ( cabalInstallVersion
-  )
-import Distribution.Simple.Program
-  ( ConfiguredProgram
-  , Program
-  , ProgramInvocation (..)
-  , getProgramInvocationOutput
-  , programInvocation
-  , programPath
-  , simpleProgram
-  )
-import Distribution.Simple.Program.Db
-  ( ProgramDb
-  , addKnownPrograms
-  , appendProgramSearchPath
-  , configureAllKnownPrograms
-  , emptyProgramDb
-  , lookupProgram
-  , requireProgram
-  )
-import Distribution.Simple.Program.Run
-  ( getProgramInvocationOutputAndErrors
-  )
-import Distribution.Simple.Utils
-  ( IOData (..)
-  , copyFileVerbose
-  , debug
-  , dieWithException
-  , info
-  , notice
-  , warn
-  , withTempFile
-  )
-import Distribution.System
-  ( buildArch
-  , buildOS
-  )
-import Distribution.Utils.String (trim)
-import Network.Browser
-  ( browse
-  , request
-  , setAllowBasicAuth
-  , setAuthorityGen
-  , setErrHandler
-  , setOutHandler
-  , setProxy
-  , setUserAgent
-  )
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import Network.HTTP
          ( Request (..), Response (..), RequestMethod (..)
          , Header(..), HeaderName(..), lookupHeader )
@@ -115,13 +54,12 @@ import System.IO.Error
 import Distribution.Simple.Program
          ( Program, simpleProgram, ConfiguredProgram, programPath
          , ProgramInvocation(..), programInvocation
-         , ProgramSearchPathEntry(..)
          , getProgramInvocationOutput )
 import Distribution.Simple.Program.Db
          ( ProgramDb, emptyProgramDb, addKnownPrograms
          , configureAllKnownPrograms
          , requireProgram, lookupProgram
-         , modifyProgramSearchPath )
+         , appendProgramSearchPath )
 import Distribution.Simple.Program.Run
          ( getProgramInvocationOutputAndErrors )
 import Numeric (showHex)
@@ -394,11 +332,10 @@ configureTransport verbosity extraPath (Just name) =
     -- the user specifically selected a transport by name so we'll try and
     -- configure that one
 
-<<<<<<< HEAD
     case find (\(name',_,_,_) -> name' == name) supportedTransports of
       Just (_, mprog, _tls, mkTrans) -> do
 
-        let baseProgDb = modifyProgramSearchPath (\p -> map ProgramSearchPathDir extraPath ++ p) emptyProgramDb
+        baseProgDb <- appendProgramSearchPath verbosity extraPath emptyProgramDb
         progdb <- case mprog of
           Nothing   -> return emptyProgramDb
           Just prog -> snd <$> requireProgram verbosity prog baseProgDb
@@ -411,38 +348,18 @@ configureTransport verbosity extraPath (Just name) =
                     ++ ". The supported transports are "
                     ++ intercalate ", "
                          [ name' | (name', _, _, _ ) <- supportedTransports ]
-=======
-  case find (\(name', _, _, _) -> name' == name) supportedTransports of
-    Just (_, mprog, _tls, mkTrans) -> do
-      baseProgDb <- appendProgramSearchPath verbosity extraPath emptyProgramDb
-      progdb <- case mprog of
-        Nothing -> return emptyProgramDb
-        Just prog -> snd <$> requireProgram verbosity prog baseProgDb
-      --      ^^ if it fails, it'll fail here
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 configureTransport verbosity extraPath Nothing = do
     -- the user hasn't selected a transport, so we'll pick the first one we
     -- can configure successfully, provided that it supports tls
 
-<<<<<<< HEAD
     -- for all the transports except plain-http we need to try and find
     -- their external executable
-    let baseProgDb = modifyProgramSearchPath (\p -> map ProgramSearchPathDir extraPath ++ p) emptyProgramDb
+    baseProgDb <- appendProgramSearchPath verbosity extraPath emptyProgramDb
     progdb <- configureAllKnownPrograms  verbosity $
                 addKnownPrograms
                   [ prog | (_, Just prog, _, _) <- supportedTransports ]
                   baseProgDb
-=======
-  -- for all the transports except plain-http we need to try and find
-  -- their external executable
-  baseProgDb <- appendProgramSearchPath verbosity extraPath emptyProgramDb
-  progdb <-
-    configureAllKnownPrograms verbosity $
-      addKnownPrograms
-        [prog | (_, Just prog, _, _) <- supportedTransports]
-        baseProgDb
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
     let availableTransports =
           [ (name, transport)
diff --git a/cabal-install/src/Distribution/Client/ProjectConfig.hs b/cabal-install/src/Distribution/Client/ProjectConfig.hs
index 86b71209ca0..9d15c4d5137 100644
--- a/cabal-install/src/Distribution/Client/ProjectConfig.hs
+++ b/cabal-install/src/Distribution/Client/ProjectConfig.hs
@@ -1149,18 +1149,10 @@ syncAndReadSourcePackagesRemoteRepos verbosity
                             [ ((rtype, rloc), [(repo, vcsRepoType vcs)])
                             | (repo, rloc, rtype, vcs) <- repos' ]
 
-<<<<<<< HEAD
-    --TODO: pass progPathExtra on to 'configureVCS'
-    let _progPathExtra = fromNubList projectConfigProgPathExtra
-    getConfiguredVCS <- delayInitSharedResources $ \repoType ->
-                          let vcs = Map.findWithDefault (error $ "Unknown VCS: " ++ prettyShow repoType) repoType knownVCSs in
-                          configureVCS verbosity {-progPathExtra-} vcs
-=======
     let progPathExtra = fromNubList projectConfigProgPathExtra
     getConfiguredVCS <- delayInitSharedResources $ \repoType ->
-      let vcs = Map.findWithDefault (error $ "Unknown VCS: " ++ prettyShow repoType) repoType knownVCSs
-       in configureVCS verbosity progPathExtra vcs
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+                          let vcs = Map.findWithDefault (error $ "Unknown VCS: " ++ prettyShow repoType) repoType knownVCSs in
+                          configureVCS verbosity progPathExtra vcs
 
     concat <$> sequenceA
       [ rerunIfChanged verbosity monitor repoGroup' $ do
diff --git a/cabal-install/src/Distribution/Client/ProjectOrchestration.hs b/cabal-install/src/Distribution/Client/ProjectOrchestration.hs
index 257ff4b5051..3e77ae346ca 100644
--- a/cabal-install/src/Distribution/Client/ProjectOrchestration.hs
+++ b/cabal-install/src/Distribution/Client/ProjectOrchestration.hs
@@ -190,8 +190,7 @@ data CurrentCommand = InstallCommand | HaddockCommand | BuildCommand | ReplComma
                     deriving (Show, Eq)
 
 -- | This holds the context of a project prior to solving: the content of the
-<<<<<<< HEAD
--- @cabal.project@ and all the local package @.cabal@ files.
+-- @cabal.project@, @cabal/config@ and all the local package @.cabal@ files.
 --
 data ProjectBaseContext = ProjectBaseContext {
        distDirLayout  :: DistDirLayout,
@@ -202,18 +201,6 @@ data ProjectBaseContext = ProjectBaseContext {
        currentCommand :: CurrentCommand,
        installedPackages :: Maybe InstalledPackageIndex
      }
-=======
--- @cabal.project@, @cabal/config@ and all the local package @.cabal@ files.
-data ProjectBaseContext = ProjectBaseContext
-  { distDirLayout :: DistDirLayout
-  , cabalDirLayout :: CabalDirLayout
-  , projectConfig :: ProjectConfig
-  , localPackages :: [PackageSpecifier UnresolvedSourcePackage]
-  , buildSettings :: BuildTimeSettings
-  , currentCommand :: CurrentCommand
-  , installedPackages :: Maybe InstalledPackageIndex
-  }
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 establishProjectBaseContext
     :: Verbosity
diff --git a/cabal-install/src/Distribution/Client/ProjectPlanning.hs b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
index 356f31e1215..2126c942803 100644
--- a/cabal-install/src/Distribution/Client/ProjectPlanning.hs
+++ b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
@@ -385,7 +385,6 @@ rebuildProjectConfig verbosity
                                projectConfigBuildOnly
                              } = do
 
-<<<<<<< HEAD
       pkgLocations <- findProjectPackages distDirLayout projectConfig
       -- Create folder only if findProjectPackages did not throw a
       -- BadPackageLocations exception.
@@ -427,35 +426,12 @@ configureCompiler verbosity
                         packageConfigProgramPathExtra) $ do
 
           liftIO $ info verbosity "Compiler settings changed, reconfiguring..."
-          result@(_, _, progdb') <- liftIO $
+          progdb <- liftIO $ appendProgramSearchPath verbosity (fromNubList packageConfigProgramPathExtra) defaultProgramDb
+          let progdb' = userSpecifyPaths (Map.toList (getMapLast packageConfigProgramPaths)) progdb
+          result@(_, _, progdb'') <- liftIO $
             Cabal.configCompilerEx
               hcFlavor hcPath hcPkg
-              progdb verbosity
-=======
-    progsearchpath <- liftIO $ getSystemSearchPath
-    rerunIfChanged
-      verbosity
-      fileMonitorCompiler
-      ( hcFlavor
-      , hcPath
-      , hcPkg
-      , progsearchpath
-      , packageConfigProgramPaths
-      , packageConfigProgramPathExtra
-      )
-      $ do
-        liftIO $ info verbosity "Compiler settings changed, reconfiguring..."
-        progdb <- liftIO $ appendProgramSearchPath verbosity (fromNubList packageConfigProgramPathExtra) defaultProgramDb
-        let progdb' = userSpecifyPaths (Map.toList (getMapLast packageConfigProgramPaths)) progdb
-        result@(_, _, progdb'') <-
-          liftIO $
-            Cabal.configCompilerEx
-              hcFlavor
-              hcPath
-              hcPkg
-              progdb'
-              verbosity
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+              progdb' verbosity
 
         -- Note that we added the user-supplied program locations and args
         -- for /all/ programs, not just those for the compiler prog and
@@ -463,29 +439,14 @@ configureCompiler verbosity
         -- the compiler will configure (and it does vary between compilers).
         -- We do know however that the compiler will only configure the
         -- programs it cares about, and those are the ones we monitor here.
-<<<<<<< HEAD
-          monitorFiles (programsMonitorFiles progdb')
+          monitorFiles (programsMonitorFiles progdb'')
 
           return result
       where
         hcFlavor = flagToMaybe projectConfigHcFlavor
         hcPath   = flagToMaybe projectConfigHcPath
         hcPkg    = flagToMaybe projectConfigHcPkg
-        progdb   =
-            userSpecifyPaths (Map.toList (getMapLast packageConfigProgramPaths))
-          . modifyProgramSearchPath
-              ([ ProgramSearchPathDir dir
-               | dir <- fromNubList packageConfigProgramPathExtra ] ++)
-          $ defaultProgramDb
-=======
-        monitorFiles (programsMonitorFiles progdb'')
-
-        return result
-    where
-      hcFlavor = flagToMaybe projectConfigHcFlavor
-      hcPath = flagToMaybe projectConfigHcPath
-      hcPkg = flagToMaybe projectConfigHcPkg
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+
 
 
 -- | Return an up-to-date elaborated install plan.
diff --git a/cabal-install/src/Distribution/Client/SetupWrapper.hs b/cabal-install/src/Distribution/Client/SetupWrapper.hs
index 7639d9bd658..23a788a8997 100644
--- a/cabal-install/src/Distribution/Client/SetupWrapper.hs
+++ b/cabal-install/src/Distribution/Client/SetupWrapper.hs
@@ -29,52 +29,7 @@ import Distribution.Client.Compat.Prelude
 import Distribution.CabalSpecVersion (cabalSpecMinimumLibraryVersion)
 import qualified Distribution.Make as Make
 import qualified Distribution.Simple as Simple
-<<<<<<< HEAD
-=======
-import Distribution.Simple.Build.Macros
-  ( generatePackageVersionMacros
-  )
-import Distribution.Simple.BuildPaths
-  ( defaultDistPref
-  , exeExtension
-  )
-import Distribution.Simple.Compiler
-  ( Compiler (compilerId)
-  , PackageDB (..)
-  , PackageDBStack
-  , compilerFlavor
-  )
-import Distribution.Simple.Configure
-  ( configCompilerEx
-  )
-import Distribution.Simple.PackageDescription
-  ( readGenericPackageDescription
-  )
-import Distribution.Simple.PreProcess
-  ( ppUnlit
-  , runSimplePreProcessor
-  )
-import Distribution.Simple.Program
-  ( ProgramDb
-  , emptyProgramDb
-  , getDbProgramOutput
-  , getProgramSearchPath
-  , ghcProgram
-  , ghcjsProgram
-  , runDbProgram
-  )
-import Distribution.Simple.Program.Db
-  ( appendProgramSearchPath
-  )
-import Distribution.Simple.Program.Find
-  ( programSearchPathAsPATHVar
-  )
-import Distribution.Simple.Program.Run
-  ( getEffectiveEnvironment
-  )
-import qualified Distribution.Simple.Program.Strip as Strip
-import Distribution.Types.ModuleRenaming (defaultRenaming)
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+
 import Distribution.Version
          ( Version, mkVersion, versionNumbers, VersionRange, anyVersion
          , intersectVersionRanges, orLaterVersion
@@ -105,9 +60,10 @@ import Distribution.Simple.Program
          ( ProgramDb, emptyProgramDb
          , getProgramSearchPath, getDbProgramOutput, runDbProgram, ghcProgram
          , ghcjsProgram )
+import Distribution.Simple.Program.Db
+         ( appendProgramSearchPath )
 import Distribution.Simple.Program.Find
-         ( programSearchPathAsPATHVar
-         , ProgramSearchPathEntry(ProgramSearchPathDir) )
+         ( programSearchPathAsPATHVar )
 import Distribution.Simple.Program.Run
          ( getEffectiveEnvironment )
 import qualified Distribution.Simple.Program.Strip as Strip
@@ -489,27 +445,13 @@ invoke verbosity path args options = do
     Nothing        -> return ()
     Just logHandle -> info verbosity $ "Redirecting build log to " ++ show logHandle
 
-<<<<<<< HEAD
-  searchpath <- programSearchPathAsPATHVar
-                (map ProgramSearchPathDir (useExtraPathEnv options) ++
-                 getProgramSearchPath (useProgramDb options))
+  progDb <- appendProgramSearchPath verbosity (useExtraPathEnv options) (useProgramDb options)
+
+  searchpath <- programSearchPathAsPATHVar $ getProgramSearchPath progDb
   env       <- getEffectiveEnvironment $
                  [ ("PATH", Just searchpath)
                  , ("HASKELL_DIST_DIR", Just (useDistPref options))
                  ] ++ useExtraEnvOverrides options
-=======
-  progDb <- appendProgramSearchPath verbosity (useExtraPathEnv options) (useProgramDb options)
-
-  searchpath <-
-    programSearchPathAsPATHVar $ getProgramSearchPath progDb
-
-  env <-
-    getEffectiveEnvironment $
-      [ ("PATH", Just searchpath)
-      , ("HASKELL_DIST_DIR", Just (useDistPref options))
-      ]
-        ++ useExtraEnvOverrides options
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
   let loggingHandle = case useLoggingHandle options of
                         Nothing -> Inherit
diff --git a/cabal-install/src/Distribution/Client/VCS.hs b/cabal-install/src/Distribution/Client/VCS.hs
index 0c0a9a2e0b3..04803c6a4f5 100644
--- a/cabal-install/src/Distribution/Client/VCS.hs
+++ b/cabal-install/src/Distribution/Client/VCS.hs
@@ -37,32 +37,6 @@ module Distribution.Client.VCS (
 import Prelude ()
 import Distribution.Client.Compat.Prelude
 
-<<<<<<< HEAD
-=======
-import Distribution.Client.RebuildMonad
-  ( MonitorFilePath
-  , Rebuild
-  , monitorDirectoryExistence
-  , monitorFiles
-  )
-import Distribution.Client.Types.SourceRepo (SourceRepoMaybe, SourceRepositoryPackage (..), srpToProxy)
-import qualified Distribution.PackageDescription as PD
-import Distribution.Simple.Program
-  ( ConfiguredProgram (programVersion)
-  , Program (programFindVersion)
-  , ProgramInvocation (..)
-  , emptyProgramDb
-  , findProgramVersion
-  , getProgramInvocationOutput
-  , programInvocation
-  , requireProgram
-  , runProgramInvocation
-  , simpleProgram
-  )
-import Distribution.Simple.Program.Db
-  ( appendProgramSearchPath
-  )
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 import Distribution.Types.SourceRepo
          ( RepoType(..), KnownRepoType (..) )
 import Distribution.Client.Types.SourceRepo (SourceRepoMaybe, SourceRepositoryPackage (..), srpToProxy)
@@ -76,6 +50,8 @@ import Distribution.Simple.Program
          , simpleProgram, findProgramVersion
          , ProgramInvocation(..), programInvocation, runProgramInvocation, getProgramInvocationOutput
          , emptyProgramDb, requireProgram )
+import Distribution.Simple.Program.Db
+         ( appendProgramSearchPath )
 import Distribution.Version
          ( mkVersion )
 import qualified Distribution.PackageDescription as PD
@@ -193,41 +169,22 @@ validateSourceRepos rs =
     validateSourceRepo' r = either (Left . (,) r) Right
                                    (validateSourceRepo r)
 
-<<<<<<< HEAD
 
 configureVCS :: Verbosity
+             -> [FilePath] -- ^ Extra prog paths
              -> VCS Program
              -> IO (VCS ConfiguredProgram)
-configureVCS verbosity vcs@VCS{vcsProgram = prog} =
-    asVcsConfigured <$> requireProgram verbosity prog emptyProgramDb
-=======
-configureVCS
-  :: Verbosity
-  -> [FilePath]
-  -- ^ Extra prog paths
-  -> VCS Program
-  -> IO (VCS ConfiguredProgram)
 configureVCS verbosity progPaths vcs@VCS{vcsProgram = prog} = do
-  progPath <- appendProgramSearchPath verbosity progPaths emptyProgramDb
-  asVcsConfigured <$> requireProgram verbosity prog progPath
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
+    progPath <- appendProgramSearchPath verbosity progPaths emptyProgramDb
+    asVcsConfigured <$> requireProgram verbosity prog progPath
   where
     asVcsConfigured (prog', _) = vcs { vcsProgram = prog' }
 
-<<<<<<< HEAD
 configureVCSs :: Verbosity
+              -> [FilePath] -- ^ Extra prog paths
               -> Map RepoType (VCS Program)
               -> IO (Map RepoType (VCS ConfiguredProgram))
-configureVCSs verbosity = traverse (configureVCS verbosity)
-=======
-configureVCSs
-  :: Verbosity
-  -> [FilePath]
-  -- ^ Extra prog paths
-  -> Map RepoType (VCS Program)
-  -> IO (Map RepoType (VCS ConfiguredProgram))
 configureVCSs verbosity progPaths = traverse (configureVCS verbosity progPaths)
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
 
 -- ------------------------------------------------------------
diff --git a/cabal-install/tests/UnitTests/Distribution/Client/Get.hs b/cabal-install/tests/UnitTests/Distribution/Client/Get.hs
index 375b1081ac4..eae8f76dc65 100644
--- a/cabal-install/tests/UnitTests/Distribution/Client/Get.hs
+++ b/cabal-install/tests/UnitTests/Distribution/Client/Get.hs
@@ -61,32 +61,18 @@ pkgidfoo = PackageIdentifier (mkPackageName "foo") (mkVersion [1,0])
 
 testNoRepos :: Assertion
 testNoRepos = do
-<<<<<<< HEAD
     e <- assertException $
-           clonePackagesFromSourceRepo verbosity "." Nothing pkgrepos
+           clonePackagesFromSourceRepo verbosity "." Nothing [] pkgrepos
     e @?= ClonePackageNoSourceRepos pkgidfoo
-=======
-  e <-
-    assertException $
-      clonePackagesFromSourceRepo verbosity "." Nothing [] pkgrepos
-  e @?= ClonePackageNoSourceRepos pkgidfoo
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [])]
 
 
 testNoReposOfKind :: Assertion
 testNoReposOfKind = do
-<<<<<<< HEAD
     e <- assertException $
-           clonePackagesFromSourceRepo verbosity "." repokind pkgrepos
+           clonePackagesFromSourceRepo verbosity "." repokind [] pkgrepos
     e @?= ClonePackageNoSourceReposOfKind pkgidfoo repokind
-=======
-  e <-
-    assertException $
-      clonePackagesFromSourceRepo verbosity "." repokind [] pkgrepos
-  e @?= ClonePackageNoSourceReposOfKind pkgidfoo repokind
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [repo])]
     repo     = emptySourceRepo RepoHead
@@ -95,16 +81,9 @@ testNoReposOfKind = do
 
 testNoRepoType :: Assertion
 testNoRepoType = do
-<<<<<<< HEAD
     e <- assertException $
-           clonePackagesFromSourceRepo verbosity "." Nothing pkgrepos
+           clonePackagesFromSourceRepo verbosity "." Nothing []pkgrepos
     e @?= ClonePackageNoRepoType pkgidfoo repo
-=======
-  e <-
-    assertException $
-      clonePackagesFromSourceRepo verbosity "." Nothing [] pkgrepos
-  e @?= ClonePackageNoRepoType pkgidfoo repo
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [repo])]
     repo     = emptySourceRepo RepoHead
@@ -112,16 +91,9 @@ testNoRepoType = do
 
 testUnsupportedRepoType :: Assertion
 testUnsupportedRepoType = do
-<<<<<<< HEAD
     e <- assertException $
-           clonePackagesFromSourceRepo verbosity "." Nothing pkgrepos
+           clonePackagesFromSourceRepo verbosity "." Nothing [] pkgrepos
     e @?= ClonePackageUnsupportedRepoType pkgidfoo repo' repotype
-=======
-  e <-
-    assertException $
-      clonePackagesFromSourceRepo verbosity "." Nothing [] pkgrepos
-  e @?= ClonePackageUnsupportedRepoType pkgidfoo repo' repotype
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [repo])]
     repo     = (emptySourceRepo RepoHead)
@@ -141,16 +113,9 @@ testUnsupportedRepoType = do
 
 testNoRepoLocation :: Assertion
 testNoRepoLocation = do
-<<<<<<< HEAD
     e <- assertException $
-           clonePackagesFromSourceRepo verbosity "." Nothing pkgrepos
+           clonePackagesFromSourceRepo verbosity "." Nothing [] pkgrepos
     e @?= ClonePackageNoRepoLocation pkgidfoo repo
-=======
-  e <-
-    assertException $
-      clonePackagesFromSourceRepo verbosity "." Nothing [] pkgrepos
-  e @?= ClonePackageNoRepoLocation pkgidfoo repo
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [repo])]
     repo     = (emptySourceRepo RepoHead) {
@@ -165,22 +130,12 @@ testSelectRepoKind =
       [ do e <- test requestedRepoType pkgrepos
            e @?= ClonePackageNoRepoType pkgidfoo expectedRepo
 
-<<<<<<< HEAD
            e' <- test requestedRepoType (reverse pkgrepos)
            e' @?= ClonePackageNoRepoType pkgidfoo expectedRepo
       | let test rt rs = assertException $
-                           clonePackagesFromSourceRepo verbosity "." rt rs
+                           clonePackagesFromSourceRepo verbosity "." rt [] rs
       , (requestedRepoType, expectedRepo) <- cases
       ]
-=======
-      e' <- test requestedRepoType (reverse pkgrepos)
-      e' @?= ClonePackageNoRepoType pkgidfoo expectedRepo
-    | let test rt rs =
-            assertException $
-              clonePackagesFromSourceRepo verbosity "." rt [] rs
-    , (requestedRepoType, expectedRepo) <- cases
-    ]
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [repo1, repo2, repo3])]
     repo1    = emptySourceRepo RepoThis
@@ -195,36 +150,19 @@ testSelectRepoKind =
 
 testRepoDestinationExists :: Assertion
 testRepoDestinationExists =
-<<<<<<< HEAD
     withTestDir verbosity "repos" $ \tmpdir -> do
       let pkgdir = tmpdir </> "foo"
       createDirectory pkgdir
       e1 <- assertException $
-              clonePackagesFromSourceRepo verbosity tmpdir Nothing pkgrepos
+              clonePackagesFromSourceRepo verbosity tmpdir Nothing [] pkgrepos
       e1 @?= ClonePackageDestinationExists pkgidfoo pkgdir True {- isdir -}
 
       removeDirectory pkgdir
 
       writeFile pkgdir ""
       e2 <- assertException $
-              clonePackagesFromSourceRepo verbosity tmpdir Nothing pkgrepos
+              clonePackagesFromSourceRepo verbosity tmpdir Nothing [] pkgrepos
       e2 @?= ClonePackageDestinationExists pkgidfoo pkgdir False {- isfile -}
-=======
-  withTestDir verbosity "repos" $ \tmpdir -> do
-    let pkgdir = tmpdir </> "foo"
-    createDirectory pkgdir
-    e1 <-
-      assertException $
-        clonePackagesFromSourceRepo verbosity tmpdir Nothing [] pkgrepos
-    e1 @?= ClonePackageDestinationExists pkgidfoo pkgdir True {- isdir -}
-    removeDirectory pkgdir
-
-    writeFile pkgdir ""
-    e2 <-
-      assertException $
-        clonePackagesFromSourceRepo verbosity tmpdir Nothing [] pkgrepos
-    e2 @?= ClonePackageDestinationExists pkgidfoo pkgdir False {- isfile -}
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     pkgrepos = [(pkgidfoo, [repo])]
     repo     = (emptySourceRepo RepoHead) {
@@ -235,7 +173,6 @@ testRepoDestinationExists =
 
 testGitFetchFailed :: Assertion
 testGitFetchFailed =
-<<<<<<< HEAD
     withTestDir verbosity "repos" $ \tmpdir -> do
       let srcdir   = tmpdir </> "src"
           repo     = (emptySourceRepo RepoHead) {
@@ -252,7 +189,7 @@ testGitFetchFailed =
                      }
           pkgrepos = [(pkgidfoo, [repo])]
       e1 <- assertException $
-              clonePackagesFromSourceRepo verbosity tmpdir Nothing pkgrepos
+              clonePackagesFromSourceRepo verbosity tmpdir Nothing [] pkgrepos
       e1 @?= ClonePackageFailedWithExitCode pkgidfoo repo' "git" (ExitFailure 128)
 
 
@@ -263,7 +200,7 @@ testNetworkGitClone =
                     repoType     = Just (KnownRepoType Git),
                     repoLocation = Just "https://github.com/haskell/zlib.git"
                   }
-      clonePackagesFromSourceRepo verbosity tmpdir Nothing
+      clonePackagesFromSourceRepo verbosity tmpdir Nothing []
                                   [(mkpkgid "zlib1", [repo1])]
       assertFileContains (tmpdir </> "zlib1/zlib.cabal") ["name:", "zlib"]
 
@@ -271,7 +208,7 @@ testNetworkGitClone =
                     repoType     = Just (KnownRepoType Git),
                     repoLocation = Just (tmpdir </> "zlib1")
                   }
-      clonePackagesFromSourceRepo verbosity tmpdir Nothing
+      clonePackagesFromSourceRepo verbosity tmpdir Nothing []
                                   [(mkpkgid "zlib2", [repo2])]
       assertFileContains (tmpdir </> "zlib2/zlib.cabal") ["name:", "zlib"]
 
@@ -280,75 +217,9 @@ testNetworkGitClone =
                     repoLocation = Just (tmpdir </> "zlib1"),
                     repoTag      = Just "0.5.0.0"
                   }
-      clonePackagesFromSourceRepo verbosity tmpdir Nothing
+      clonePackagesFromSourceRepo verbosity tmpdir Nothing []
                                   [(mkpkgid "zlib3", [repo3])]
       assertFileContains (tmpdir </> "zlib3/zlib.cabal") ["version:", "0.5.0.0"]
-=======
-  withTestDir verbosity "repos" $ \tmpdir -> do
-    let srcdir = tmpdir </> "src"
-        repo =
-          (emptySourceRepo RepoHead)
-            { repoType = Just (KnownRepoType Git)
-            , repoLocation = Just srcdir
-            }
-        repo' =
-          SourceRepositoryPackage
-            { srpType = KnownRepoType Git
-            , srpLocation = srcdir
-            , srpTag = Nothing
-            , srpBranch = Nothing
-            , srpSubdir = Proxy
-            , srpCommand = []
-            }
-        pkgrepos = [(pkgidfoo, [repo])]
-    e1 <-
-      assertException $
-        clonePackagesFromSourceRepo verbosity tmpdir Nothing [] pkgrepos
-    e1 @?= ClonePackageFailedWithExitCode pkgidfoo repo' "git" (ExitFailure 128)
-
-testNetworkGitClone :: Assertion
-testNetworkGitClone =
-  withTestDir verbosity "repos" $ \tmpdir -> do
-    let repo1 =
-          (emptySourceRepo RepoHead)
-            { repoType = Just (KnownRepoType Git)
-            , repoLocation = Just "https://github.com/haskell/zlib.git"
-            }
-    clonePackagesFromSourceRepo
-      verbosity
-      tmpdir
-      Nothing
-      []
-      [(mkpkgid "zlib1", [repo1])]
-    assertFileContains (tmpdir </> "zlib1/zlib.cabal") ["name:", "zlib"]
-
-    let repo2 =
-          (emptySourceRepo RepoHead)
-            { repoType = Just (KnownRepoType Git)
-            , repoLocation = Just (tmpdir </> "zlib1")
-            }
-    clonePackagesFromSourceRepo
-      verbosity
-      tmpdir
-      Nothing
-      []
-      [(mkpkgid "zlib2", [repo2])]
-    assertFileContains (tmpdir </> "zlib2/zlib.cabal") ["name:", "zlib"]
-
-    let repo3 =
-          (emptySourceRepo RepoHead)
-            { repoType = Just (KnownRepoType Git)
-            , repoLocation = Just (tmpdir </> "zlib1")
-            , repoTag = Just "0.5.0.0"
-            }
-    clonePackagesFromSourceRepo
-      verbosity
-      tmpdir
-      Nothing
-      []
-      [(mkpkgid "zlib3", [repo3])]
-    assertFileContains (tmpdir </> "zlib3/zlib.cabal") ["version:", "0.5.0.0"]
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
   where
     mkpkgid nm = PackageIdentifier (mkPackageName nm) (mkVersion [])
 
diff --git a/cabal-install/tests/UnitTests/Distribution/Client/VCS.hs b/cabal-install/tests/UnitTests/Distribution/Client/VCS.hs
index 896d53f2812..9b4cd6e4511 100644
--- a/cabal-install/tests/UnitTests/Distribution/Client/VCS.hs
+++ b/cabal-install/tests/UnitTests/Distribution/Client/VCS.hs
@@ -49,47 +49,12 @@ import UnitTests.TempTestDir (withTestDir, removeDirectoryRecursiveHack)
 -- checks that the working state is as expected (given the pure representation).
 --
 tests :: MTimeChange -> [TestTree]
-<<<<<<< HEAD
 tests mtimeChange = map (localOption $ QuickCheckTests 10)
   [ ignoreInWindows "See issue #8048" $
     testGroup "git"
     [ testProperty "check VCS test framework"    prop_framework_git
     , testProperty "cloneSourceRepo"             prop_cloneRepo_git
     , testProperty "syncSourceRepos"             prop_syncRepos_git
-=======
-tests mtimeChange =
-  map
-    (localOption $ QuickCheckTests 10)
-    [ ignoreInWindows "See issue #8048 and #9519" $
-        testGroup
-          "git"
-          [ testProperty "check VCS test framework" prop_framework_git
-          , testProperty "cloneSourceRepo" prop_cloneRepo_git
-          , testProperty "syncSourceRepos" prop_syncRepos_git
-          ]
-    , --
-      ignoreTestBecause "for the moment they're not yet working" $
-        testGroup
-          "darcs"
-          [ testProperty "check VCS test framework" $ prop_framework_darcs mtimeChange
-          , testProperty "cloneSourceRepo" $ prop_cloneRepo_darcs mtimeChange
-          , testProperty "syncSourceRepos" $ prop_syncRepos_darcs mtimeChange
-          ]
-    , ignoreTestBecause "for the moment they're not yet working" $
-        testGroup
-          "pijul"
-          [ testProperty "check VCS test framework" prop_framework_pijul
-          , testProperty "cloneSourceRepo" prop_cloneRepo_pijul
-          , testProperty "syncSourceRepos" prop_syncRepos_pijul
-          ]
-    , ignoreTestBecause "for the moment they're not yet working" $
-        testGroup
-          "mercurial"
-          [ testProperty "check VCS test framework" prop_framework_hg
-          , testProperty "cloneSourceRepo" prop_cloneRepo_hg
-          , testProperty "syncSourceRepos" prop_syncRepos_hg
-          ]
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
     ]
 
     --
@@ -213,23 +178,13 @@ testSetup :: VCS Program
           -> (VCSTestDriver -> FilePath -> RepoState -> IO a)
           -> IO a
 testSetup vcs mkVCSTestDriver repoRecipe theTest = do
-<<<<<<< HEAD
     -- test setup
-    vcs' <- configureVCS verbosity vcs
+    vcs' <- configureVCS verbosity [] vcs
     withTestDir verbosity "vcstest" $ \tmpdir -> do
       let srcRepoPath = tmpdir </> "src"
           submodulesPath = tmpdir </> "submodules"
           vcsDriver   = mkVCSTestDriver verbosity vcs' submodulesPath srcRepoPath
       repoState <- createRepo vcsDriver repoRecipe
-=======
-  -- test setup
-  vcs' <- configureVCS verbosity [] vcs
-  withTestDir verbosity "vcstest" $ \tmpdir -> do
-    let srcRepoPath = tmpdir </> "src"
-        submodulesPath = tmpdir </> "submodules"
-        vcsDriver = mkVCSTestDriver verbosity vcs' submodulesPath srcRepoPath
-    repoState <- createRepo vcsDriver repoRecipe
->>>>>>> 46df8ba71 (Fix extra-prog-path propagation in the codebase.)
 
       -- actual test
       result <- theTest vcsDriver tmpdir repoState

From db41660ff43a0f4f325495e05fdab7d677561ab1 Mon Sep 17 00:00:00 2001
From: brandon s allbery kf8nh <allbery.b@gmail.com>
Date: Tue, 23 Jan 2024 21:39:24 -0500
Subject: [PATCH 115/144] Allow containers-0.7

Closes: #9289
(cherry picked from commit 12eeb79)
---
 Cabal/Cabal.cabal                               | 2 +-
 cabal-install-solver/cabal-install-solver.cabal | 2 +-
 cabal-install/cabal-install.cabal               | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index 6d1a67a720d..5b5713d2762 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -38,7 +38,7 @@ library
     array      >= 0.4.0.1  && < 0.6,
     base       >= 4.9      && < 5,
     bytestring >= 0.10.0.0 && < 0.13,
-    containers >= 0.5.0.0  && < 0.7,
+    containers >= 0.5.0.0  && < 0.8,
     deepseq    >= 1.3.0.1  && < 1.6,
     directory  >= 1.2      && < 1.4,
     filepath   >= 1.3.0.1  && < 1.6,
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index 87a7d787a45..ef8b2dd241a 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -109,7 +109,7 @@ library
     , bytestring    >=0.10.6.0 && <0.13
     , Cabal         ^>=3.10
     , Cabal-syntax  ^>=3.10
-    , containers    >=0.5.6.2  && <0.7
+    , containers    >=0.5.6.2  && <0.8
     , edit-distance ^>= 0.2.2
     , filepath      ^>=1.4.0.0 || ^>=1.5.0.0
     , mtl           >=2.0      && <2.4
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index b0cd99ed7d3..24149ed97bb 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -212,7 +212,7 @@ library
         base16-bytestring >= 0.1.1 && < 1.1.0.0,
         binary     >= 0.7.3    && < 0.9,
         bytestring >= 0.10.6.0 && < 0.13,
-        containers >= 0.5.6.2  && < 0.7,
+        containers >= 0.5.6.2  && < 0.8,
         cryptohash-sha256 >= 0.11 && < 0.12,
         directory  >= 1.3.7.0  && < 1.4,
         echo       >= 0.1.3    && < 0.2,

From 53e8c38cb898e55ad374984fd5e21350cb7ec7f7 Mon Sep 17 00:00:00 2001
From: Francesco Ariis <fa-ml@ariis.it>
Date: Mon, 22 Jan 2024 08:44:24 +0100
Subject: [PATCH 116/144] Relax `containers` upper bound

(cherry picked from commit 09596775ee50d334b17ca31b72f5ef09b22ae5a0)
---
 Cabal-syntax/Cabal-syntax.cabal | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index 6ea32530910..5a4429ecdd3 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -32,7 +32,7 @@ library
     base       >= 4.9      && < 5,
     binary     >= 0.7      && < 0.9,
     bytestring >= 0.10.0.0 && < 0.13,
-    containers >= 0.5.0.0  && < 0.7,
+    containers >= 0.5.0.0  && < 0.8,
     deepseq    >= 1.3.0.1  && < 1.6,
     directory  >= 1.2      && < 1.4,
     filepath   >= 1.3.0.1  && < 1.6,

From d4dff6369ce754b95ee2d6ac827a10f05d6ee143 Mon Sep 17 00:00:00 2001
From: Tom Smeding <tomsmeding@users.noreply.github.com>
Date: Thu, 25 Jan 2024 04:25:36 +0100
Subject: [PATCH 117/144] Ignore invalid Unicode in pkg-config descriptions
 (#9609)

* Ignore invalid Unicode in pkg-config descriptions

Previously, if any of the pkg-config packages on the system had invalid
Unicode in their description fields (like the Intel vpl package has at
the time of writing, 2024-01-11, see #9608), cabal would crash because
it tried to interpret the entire `pkg-config --list-all` output as
Unicode.

This change, as suggested by gbaz in
  https://github.com/haskell/cabal/issues/9608#issuecomment-1886120831
switches to using a lazy ByteString for reading in the output, splitting
on the first space in byte land, and then parsing only the package
_name_ to a String.

For further future-proofing, package names that don't parse as valid
Unicode don't crash Cabal, but are instead ignored.

* Add changelog entry

* cabal-install-solver: Add bounds on 'text'

* No literal ASCII values, use 'ord'

* Address review comments re invalid unicode from pkg-config

* Add test for invalid unicode from pkg-config

* Compatibility with text-1.2.5.0

* Align imports

* Handle different exception type

* Use only POSIX shell syntax

* Add invalid-input handler in pkg-config shim

This is to appease shellcheck

* Actually implement all required stuff in the pkg-config shim

* Less exception dance

* Fix shebang lines

MacOS doesn't have /usr/bin/sh, and /bin/sh is the standard (for a POSIX
shell) anyway

* Don't expect a particular representation of invalid characters

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 0b34b4eaac65fb5a5ece8f7846077c4a3d627520)
---
 Cabal/src/Distribution/Simple/Program/Run.hs  | 34 ++++++-----
 .../cabal-install-solver.cabal                |  1 +
 .../Distribution/Solver/Types/PkgConfigDb.hs  | 61 ++++++++++++++++---
 .../PackageTests/ExtraProgPath/pkg-config     |  2 +-
 .../PackageTests/PkgConfigParse/MyLibrary.hs  |  1 +
 .../PackageTests/PkgConfigParse/cabal.project |  1 +
 .../PackageTests/PkgConfigParse/my.cabal      | 19 ++++++
 .../PackageTests/PkgConfigParse/pkg-config    | 49 +++++++++++++++
 .../PackageTests/PkgConfigParse/setup.out     |  1 +
 .../PackageTests/PkgConfigParse/setup.test.hs |  9 +++
 changelog.d/pr-9609                           | 12 ++++
 11 files changed, 166 insertions(+), 24 deletions(-)
 create mode 100644 cabal-testsuite/PackageTests/PkgConfigParse/MyLibrary.hs
 create mode 100644 cabal-testsuite/PackageTests/PkgConfigParse/cabal.project
 create mode 100644 cabal-testsuite/PackageTests/PkgConfigParse/my.cabal
 create mode 100755 cabal-testsuite/PackageTests/PkgConfigParse/pkg-config
 create mode 100644 cabal-testsuite/PackageTests/PkgConfigParse/setup.out
 create mode 100644 cabal-testsuite/PackageTests/PkgConfigParse/setup.test.hs
 create mode 100644 changelog.d/pr-9609

diff --git a/Cabal/src/Distribution/Simple/Program/Run.hs b/Cabal/src/Distribution/Simple/Program/Run.hs
index ef6e8972b86..c5858350b7a 100644
--- a/Cabal/src/Distribution/Simple/Program/Run.hs
+++ b/Cabal/src/Distribution/Simple/Program/Run.hs
@@ -13,20 +13,19 @@
 -- This module provides a data type for program invocations and functions to
 -- run them.
 
-module Distribution.Simple.Program.Run (
-    ProgramInvocation(..),
-    IOEncoding(..),
-    emptyProgramInvocation,
-    simpleProgramInvocation,
-    programInvocation,
-    multiStageProgramInvocation,
-
-    runProgramInvocation,
-    getProgramInvocationOutput,
-    getProgramInvocationLBS,
-    getProgramInvocationOutputAndErrors,
-
-    getEffectiveEnvironment,
+module Distribution.Simple.Program.Run
+  ( ProgramInvocation (..)
+  , IOEncoding (..)
+  , emptyProgramInvocation
+  , simpleProgramInvocation
+  , programInvocation
+  , multiStageProgramInvocation
+  , runProgramInvocation
+  , getProgramInvocationOutput
+  , getProgramInvocationLBS
+  , getProgramInvocationOutputAndErrors
+  , getProgramInvocationLBSAndErrors
+  , getEffectiveEnvironment
   ) where
 
 import Distribution.Compat.Prelude
@@ -164,6 +163,13 @@ getProgramInvocationOutputAndErrors verbosity inv = case progInvokeOutputEncodin
         (output', errors, exitCode) <- getProgramInvocationIODataAndErrors verbosity inv IODataModeBinary
         return (normaliseLineEndings (fromUTF8LBS output'), errors, exitCode)
 
+getProgramInvocationLBSAndErrors
+  :: Verbosity
+  -> ProgramInvocation
+  -> IO (LBS.ByteString, String, ExitCode)
+getProgramInvocationLBSAndErrors verbosity inv =
+  getProgramInvocationIODataAndErrors verbosity inv IODataModeBinary
+
 getProgramInvocationIODataAndErrors
     :: KnownIODataMode mode => Verbosity -> ProgramInvocation -> IODataMode mode
     -> IO (mode, String, ExitCode)
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index ef8b2dd241a..f0a71911b29 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -115,6 +115,7 @@ library
     , mtl           >=2.0      && <2.4
     , pretty        ^>=1.1
     , transformers  >=0.4.2.0  && <0.7
+    , text          (>= 1.2.3.0  && < 1.3) || (>= 2.0 && < 2.2)
 
   if flag(debug-expensive-assertions)
     cpp-options: -DDEBUG_EXPENSIVE_ASSERTIONS
diff --git a/cabal-install-solver/src/Distribution/Solver/Types/PkgConfigDb.hs b/cabal-install-solver/src/Distribution/Solver/Types/PkgConfigDb.hs
index 418f716c21c..2cf6ddbe51b 100644
--- a/cabal-install-solver/src/Distribution/Solver/Types/PkgConfigDb.hs
+++ b/cabal-install-solver/src/Distribution/Solver/Types/PkgConfigDb.hs
@@ -1,5 +1,6 @@
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE LambdaCase         #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Distribution.Solver.Types.PkgConfigDb
@@ -23,17 +24,23 @@ module Distribution.Solver.Types.PkgConfigDb
 import Distribution.Solver.Compat.Prelude
 import Prelude ()
 
-import           Control.Exception (handle)
-import           Control.Monad     (mapM)
-import qualified Data.Map          as M
-import           System.FilePath   (splitSearchPath)
+import           Control.Exception        (handle)
+import           Control.Monad            (mapM)
+import           Data.ByteString          (ByteString)
+import qualified Data.ByteString.Lazy     as LBS
+import qualified Data.Map                 as M
+import qualified Data.Text                as T
+import qualified Data.Text.Encoding       as T
+import qualified Data.Text.Encoding.Error as T
+import           System.FilePath          (splitSearchPath)
 
 import Distribution.Compat.Environment          (lookupEnv)
 import Distribution.Package                     (PkgconfigName, mkPkgconfigName)
 import Distribution.Parsec
 import Distribution.Simple.Program
        (ProgramDb, getProgramOutput, pkgConfigProgram, needProgram, ConfiguredProgram)
-import Distribution.Simple.Program.Run          (getProgramInvocationOutputAndErrors, programInvocation)
+import Distribution.Simple.Program.Run
+       (getProgramInvocationOutputAndErrors, programInvocation, getProgramInvocationLBSAndErrors)
 import Distribution.Simple.Utils                (info)
 import Distribution.Types.PkgconfigVersion
 import Distribution.Types.PkgconfigVersionRange
@@ -63,10 +70,37 @@ readPkgConfigDb verbosity progdb = handle ioErrorHandler $ do
     case mpkgConfig of
       Nothing             -> noPkgConfig "Cannot find pkg-config program"
       Just (pkgConfig, _) -> do
-        pkgList <- lines <$> getProgramOutput verbosity pkgConfig ["--list-all"]
-        -- The output of @pkg-config --list-all@ also includes a description
-        -- for each package, which we do not need.
-        let pkgNames = map (takeWhile (not . isSpace)) pkgList
+        -- To prevent malformed Unicode in the descriptions from crashing cabal,
+        -- read without interpreting any encoding first. (#9608)
+        (listAllOutput, listAllErrs, listAllExitcode) <-
+          getProgramInvocationLBSAndErrors verbosity (programInvocation pkgConfig ["--list-all"])
+        when (listAllExitcode /= ExitSuccess) $
+          ioError (userError ("pkg-config --list-all failed: " ++ listAllErrs))
+        let pkgList = LBS.split (fromIntegral (ord '\n')) listAllOutput
+        -- Now decode the package *names* to a String. The ones where decoding
+        -- failed end up in 'failedPkgNames'.
+        let (failedPkgNames, pkgNames) =
+              partitionEithers
+              -- Drop empty package names. This will handle empty lines
+              -- in pkg-config's output, including the spurious one
+              -- after the last newline (because of LBS.split).
+              . filter (either (const True) (not . null))
+              -- Try decoding strictly; if it fails, put the lenient
+              -- decoding in a Left for later reporting.
+              . map (\bsname ->
+                       let sbsname = LBS.toStrict bsname
+                       in case T.decodeUtf8' sbsname of
+                            Left _ -> Left (T.unpack (decodeUtf8LenientCompat sbsname))
+                            Right name -> Right (T.unpack name))
+              -- The output of @pkg-config --list-all@ also includes a
+              -- description for each package, which we do not need.
+              -- We don't use Data.Char.isSpace because that would also
+              -- include 0xA0, the non-breaking space, which can occur
+              -- in multi-byte UTF-8 sequences.
+              . map (LBS.takeWhile (not . isAsciiSpace))
+              $ pkgList
+        when (not (null failedPkgNames)) $
+          info verbosity ("Some pkg-config packages have names containing invalid unicode: " ++ intercalate ", " failedPkgNames)
         (outs, _errs, exitCode) <-
                      getProgramInvocationOutputAndErrors verbosity
                        (programInvocation pkgConfig ("--modversion" : pkgNames))
@@ -104,6 +138,15 @@ readPkgConfigDb verbosity progdb = handle ioErrorHandler $ do
          ExitSuccess -> Just (pkg, pkgVersion)
          _ -> Nothing
 
+    isAsciiSpace :: Word8 -> Bool
+    isAsciiSpace c = c `elem` map (fromIntegral . ord) " \t"
+
+    -- The decodeUtf8Lenient function is defined starting with text-2.0.1; this
+    -- function simply reimplements it. When the minimum supported GHC version
+    -- is >= 9.4, switch to decodeUtf8Lenient.
+    decodeUtf8LenientCompat :: ByteString -> T.Text
+    decodeUtf8LenientCompat = T.decodeUtf8With T.lenientDecode
+
 -- | Create a `PkgConfigDb` from a list of @(packageName, version)@ pairs.
 pkgConfigDbFromList :: [(String, String)] -> PkgConfigDb
 pkgConfigDbFromList pairs = (PkgConfigDb . M.fromList . map convert) pairs
diff --git a/cabal-testsuite/PackageTests/ExtraProgPath/pkg-config b/cabal-testsuite/PackageTests/ExtraProgPath/pkg-config
index 7c5fafbf0ca..195df7c2c41 100755
--- a/cabal-testsuite/PackageTests/ExtraProgPath/pkg-config
+++ b/cabal-testsuite/PackageTests/ExtraProgPath/pkg-config
@@ -1,3 +1,3 @@
-#!/usr/bin/sh
+#!/bin/sh
 
 exit 1;
diff --git a/cabal-testsuite/PackageTests/PkgConfigParse/MyLibrary.hs b/cabal-testsuite/PackageTests/PkgConfigParse/MyLibrary.hs
new file mode 100644
index 00000000000..a51c414bcd2
--- /dev/null
+++ b/cabal-testsuite/PackageTests/PkgConfigParse/MyLibrary.hs
@@ -0,0 +1 @@
+module MyLibrary () where
diff --git a/cabal-testsuite/PackageTests/PkgConfigParse/cabal.project b/cabal-testsuite/PackageTests/PkgConfigParse/cabal.project
new file mode 100644
index 00000000000..5a93e28e878
--- /dev/null
+++ b/cabal-testsuite/PackageTests/PkgConfigParse/cabal.project
@@ -0,0 +1 @@
+packages: *.cabal
\ No newline at end of file
diff --git a/cabal-testsuite/PackageTests/PkgConfigParse/my.cabal b/cabal-testsuite/PackageTests/PkgConfigParse/my.cabal
new file mode 100644
index 00000000000..38b7020b8a1
--- /dev/null
+++ b/cabal-testsuite/PackageTests/PkgConfigParse/my.cabal
@@ -0,0 +1,19 @@
+name: PkgConfigParse
+version: 0.1
+license: BSD3
+author: Tom Smeding
+maintainer: Tom Smeding
+synopsis: Pkg Config Parse
+category: PackageTests
+build-type: Simple
+cabal-version: 2.0
+
+description:
+    Check that Cabal does not crash when pkg-config outputs invalid Unicode.
+
+Library
+    pkgconfig-depends: vpl
+    default-language: Haskell2010
+    build-depends: base <5.0
+    exposed-modules:
+        MyLibrary
diff --git a/cabal-testsuite/PackageTests/PkgConfigParse/pkg-config b/cabal-testsuite/PackageTests/PkgConfigParse/pkg-config
new file mode 100755
index 00000000000..183d08e0a00
--- /dev/null
+++ b/cabal-testsuite/PackageTests/PkgConfigParse/pkg-config
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+set -eu
+
+# ugly, but "good enough" for this test
+# This will need to be updated whenever cabal invokes pkg-config
+# in new ways
+case "$*" in
+  '--version')
+    echo 2.1.0  # whatever
+    ;;
+
+  '--variable pc_path pkg-config')
+    echo '.'
+    ;;
+
+  '--list-all')
+    printf 'zlib   zlib - zlib compression library\n'
+    # \256 = \xAE is the iso-8859-1 (latin-1) encoded version of U+00AE,
+    # i.e. the "registered sign": ®
+    # This resulted in problems, see #9608
+    printf 'vpl    Intel\256 Video Processing Library - Accelerated video decode, encode, and frame processing capabilities on Intel\256 GPUs\n'
+    # \360 = \xF0 is latin-1 for ð; this is orð, Icelandic for "word"/"words".
+    printf 'or\360   Icelandic characters\n'
+    ;;
+
+  '--modversion '*)
+    shift  # drop the --modversion
+    for arg; do
+      case "$arg" in
+        zlib) echo 1.3; ;;  # whatever
+        vpl) echo 2.10; ;;  # whatever
+        # No entry for orð here; let's not even try to match on that
+        *)
+          echo >&2 "Package $arg was not found in the pkg-config search path."
+          exit 1
+      esac
+    done
+    ;;
+
+  # Ignore some stuff we're not implementing
+  '--cflags '*) ;;
+  '--libs '*) ;;
+
+  *)
+    echo >&2 "pkg-config: unrecognised arguments $* (this is an incomplete shim)"
+    exit 1
+    ;;
+esac
diff --git a/cabal-testsuite/PackageTests/PkgConfigParse/setup.out b/cabal-testsuite/PackageTests/PkgConfigParse/setup.out
new file mode 100644
index 00000000000..92fd8204a40
--- /dev/null
+++ b/cabal-testsuite/PackageTests/PkgConfigParse/setup.out
@@ -0,0 +1 @@
+# cabal v2-build
diff --git a/cabal-testsuite/PackageTests/PkgConfigParse/setup.test.hs b/cabal-testsuite/PackageTests/PkgConfigParse/setup.test.hs
new file mode 100644
index 00000000000..0f860ab637a
--- /dev/null
+++ b/cabal-testsuite/PackageTests/PkgConfigParse/setup.test.hs
@@ -0,0 +1,9 @@
+import Test.Cabal.Prelude
+
+-- Test that invalid unicode in pkg-config output doesn't trip up cabal very much
+main = cabalTest $ do
+  -- skipped on windows because using a script to dummy up an executable doesn't work the same.
+  skipIfWindows
+  cdir <- testCurrentDir `fmap` getTestEnv
+  res <- cabal' "v2-build" ["--extra-prog-path="++cdir, "-v2"]
+  assertOutputContains "Some pkg-config packages have names containing invalid unicode: or" res
diff --git a/changelog.d/pr-9609 b/changelog.d/pr-9609
new file mode 100644
index 00000000000..c156706ef03
--- /dev/null
+++ b/changelog.d/pr-9609
@@ -0,0 +1,12 @@
+synopsis: Ignore invalid Unicode in pkg-config descriptions
+packages: cabal-install-solver
+prs: #9609
+issues: #9608
+
+description: {
+
+Previously, cabal-install would crash when `pkg-config --list-all` contained
+invalid Unicode. With this change, invalid unicode in package descriptions is
+ignored, and unparseable package names are considered nonexistent.
+
+}

From 40f90736b2d609f49fdf5355a016da32fd7ba97a Mon Sep 17 00:00:00 2001
From: Rodrigo Mesquita <rodrigo.m.mesquita@gmail.com>
Date: Wed, 15 Nov 2023 18:22:28 +0000
Subject: [PATCH 118/144] Add extraLibDirs to runtime lib search paths of
 library

Runtime search paths are hard. Here's the current picture to understand
why this patch exists:

* When linking a shared library, GHC will include in the rpath entries
  of the shared library all the paths listed in the library dirs section
  of the installed package info of all packages the shared library
  depends on.
    * On darwin, GHC has special logic to inject the library dirs listed
      in the installed dependent packages info into the rpath section
      instead of passing the dirs as -rpath flags to the linker.
      However, only the dirs where used libraries are found are
      actually injected. The others are ignored. This works around
      limitations of the darwin loader.

* Cabal, in addition, passes directly to the linker (via
  -optl-Wl,-rpath,...) the library dirs of packages the
  shared library for the package being built depends on.
    * In a vanilla cabal installation, this will typically only be the
      path to the cabal store and the path to the installed GHC's boot
      libraries store.
    * When using nix there will a different library dir per installed
      package. Since these lib dirs are passed directly to the linker as
      rpaths, we bypass the darwin loader logic and, for very big
      packages, on darwin, we could end up reaching the load command
      limit and fail linking. We don't address this situation in this MR.

When we specify `extra-lib-dirs` in Cabal, these extra-lib-dirs will be
added to the library dirs listed in the installed package info of the
library they were specified for. Furthermore, when building a shared
library, extra-lib-dirs will be passed as `-L` flags to the linker
invocation. However, the same extra-lib-dirs will not be passed as
`-rpath` to the linker.

The end situation is as follows:

    1. The shared library `libA` built for a package `A` will be linked
       against some libraries `libExtra` found in extra-lib-dirs
       `extraA`.

    2. The RPATH section of `A` will NOT contain `extraA`, because we
       don't pass -rpath extra-lib-dirs when linking the library, but it
       will depend on `libExtra`.

    3. The installed package info of that package `A` will contain, in
       the library dirs section, the extra-lib-dirs `extraA` and the
       path to `libA`.

    4. When a package `B` depends on package `A`, it will include in the
       RPATH section of the shared library `libB` the lib dirs from the
       installed package info of `A`, i.e. `/path/to/libA` and `extraA`,
       and depends on `libA` and, transitively, on `libExtra`.

The conclusion is:

    5. When we load `libB`, we will load `libA`, which is found in
       `/path/to/libA`, and, transitively, load `libExtra` which is
       found in `extraA` -- they are both found because both
       `/path/to/libA` and `extraA` are listed in the RPATH entries.

    6. However, if we load `libA` directly we will /NOT/ find
       `libExtra`, because `extraA` is not included in the RPATH
       entries.

So, ultimately, what this commit fixes, is the failure described in (6),
caused by the incorrect behaviour of (2), by specifying `-rpath
extra-lib-dirs` when linking the shared library of a package, to include
the extra lib dirs in the RPATH entries of that shared library (even
though dependents of this library would already get the extra-lib-dirs
in their RPATH, the library itself didn't, resulting in cabal#7339 and
ghc#19350)

Fixes #7339
Fixes ghc#19350
---
 Cabal/src/Distribution/Simple/GHC.hs          |  4 +-
 .../LinkerOptions/T7339/T19350.script         |  3 +
 .../LinkerOptions/T7339/clib/lib.c            |  6 ++
 .../LinkerOptions/T7339/lib/Hello.hs          |  3 +
 .../LinkerOptions/T7339/lib/Setup.hs          |  2 +
 .../LinkerOptions/T7339/lib/T7339.cabal       | 11 +++
 .../LinkerOptions/T7339/setup.out             |  6 ++
 .../LinkerOptions/T7339/setup.test.hs         | 67 +++++++++++++++++++
 8 files changed, 100 insertions(+), 2 deletions(-)
 create mode 100644 cabal-testsuite/PackageTests/LinkerOptions/T7339/T19350.script
 create mode 100644 cabal-testsuite/PackageTests/LinkerOptions/T7339/clib/lib.c
 create mode 100644 cabal-testsuite/PackageTests/LinkerOptions/T7339/lib/Hello.hs
 create mode 100644 cabal-testsuite/PackageTests/LinkerOptions/T7339/lib/Setup.hs
 create mode 100644 cabal-testsuite/PackageTests/LinkerOptions/T7339/lib/T7339.cabal
 create mode 100644 cabal-testsuite/PackageTests/LinkerOptions/T7339/setup.out
 create mode 100644 cabal-testsuite/PackageTests/LinkerOptions/T7339/setup.test.hs

diff --git a/Cabal/src/Distribution/Simple/GHC.hs b/Cabal/src/Distribution/Simple/GHC.hs
index 177727b587f..a9c5141401c 100644
--- a/Cabal/src/Distribution/Simple/GHC.hs
+++ b/Cabal/src/Distribution/Simple/GHC.hs
@@ -935,7 +935,7 @@ buildOrReplLib mReplFlags verbosity numJobs pkg_descr lbi lib clbi = do
                 ghcOptLinkFrameworks     = toNubListR $ PD.frameworks libBi,
                 ghcOptLinkFrameworkDirs  =
                   toNubListR $ PD.extraFrameworkDirs libBi,
-                ghcOptRPaths             = rpaths
+                ghcOptRPaths             = rpaths <> toNubListR (extraLibDirs libBi)
               }
           ghcStaticLinkArgs =
               mempty {
@@ -1436,7 +1436,7 @@ gbuild verbosity numJobs pkg_descr lbi bm clbi = do
                                              [tmpDir </> x | x <- cLikeObjs ++ cxxObjs]
                     }
       dynLinkerOpts = mempty {
-                      ghcOptRPaths         = rpaths,
+                      ghcOptRPaths         = rpaths <> toNubListR (extraLibDirs bnfo),
                       ghcOptInputFiles     = toNubListR
                                              [tmpDir </> x | x <- cLikeObjs ++ cxxObjs]
                    }
diff --git a/cabal-testsuite/PackageTests/LinkerOptions/T7339/T19350.script b/cabal-testsuite/PackageTests/LinkerOptions/T7339/T19350.script
new file mode 100644
index 00000000000..d5b619f7bff
--- /dev/null
+++ b/cabal-testsuite/PackageTests/LinkerOptions/T7339/T19350.script
@@ -0,0 +1,3 @@
+import Hello
+hello
+:q
diff --git a/cabal-testsuite/PackageTests/LinkerOptions/T7339/clib/lib.c b/cabal-testsuite/PackageTests/LinkerOptions/T7339/clib/lib.c
new file mode 100644
index 00000000000..556c1dcb748
--- /dev/null
+++ b/cabal-testsuite/PackageTests/LinkerOptions/T7339/clib/lib.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+void hello_world(void) {
+  printf("hello world!");
+}
+
diff --git a/cabal-testsuite/PackageTests/LinkerOptions/T7339/lib/Hello.hs b/cabal-testsuite/PackageTests/LinkerOptions/T7339/lib/Hello.hs
new file mode 100644
index 00000000000..0dd0de66f74
--- /dev/null
+++ b/cabal-testsuite/PackageTests/LinkerOptions/T7339/lib/Hello.hs
@@ -0,0 +1,3 @@
+module Hello (hello) where
+
+foreign import ccall "hello_world" hello :: IO ()
diff --git a/cabal-testsuite/PackageTests/LinkerOptions/T7339/lib/Setup.hs b/cabal-testsuite/PackageTests/LinkerOptions/T7339/lib/Setup.hs
new file mode 100644
index 00000000000..9a994af677b
--- /dev/null
+++ b/cabal-testsuite/PackageTests/LinkerOptions/T7339/lib/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/cabal-testsuite/PackageTests/LinkerOptions/T7339/lib/T7339.cabal b/cabal-testsuite/PackageTests/LinkerOptions/T7339/lib/T7339.cabal
new file mode 100644
index 00000000000..d4ea571a2c0
--- /dev/null
+++ b/cabal-testsuite/PackageTests/LinkerOptions/T7339/lib/T7339.cabal
@@ -0,0 +1,11 @@
+cabal-version: >=1.10
+name: T7339
+version: 1.0
+build-type: Simple
+
+library
+  build-depends: base
+  exposed-modules: Hello
+  default-language: Haskell2010
+  extra-libraries: hello
+
diff --git a/cabal-testsuite/PackageTests/LinkerOptions/T7339/setup.out b/cabal-testsuite/PackageTests/LinkerOptions/T7339/setup.out
new file mode 100644
index 00000000000..39707500a5e
--- /dev/null
+++ b/cabal-testsuite/PackageTests/LinkerOptions/T7339/setup.out
@@ -0,0 +1,6 @@
+# Setup configure
+# Setup build
+Preprocessing library for T7339-1.0..
+Building library for T7339-1.0..
+# Setup register
+Registering library for T7339-1.0..
diff --git a/cabal-testsuite/PackageTests/LinkerOptions/T7339/setup.test.hs b/cabal-testsuite/PackageTests/LinkerOptions/T7339/setup.test.hs
new file mode 100644
index 00000000000..a46921de895
--- /dev/null
+++ b/cabal-testsuite/PackageTests/LinkerOptions/T7339/setup.test.hs
@@ -0,0 +1,67 @@
+-- Test for #19350, #7339 originally by @bgamari
+-- =============================================
+--
+-- The plan
+-- ---------
+-- We build a C shared library (`libhello`, contained in ./clib) and then build
+-- a Haskell library (`T19350-lib`, in ./lib) which depends upon it via `foreign
+-- import`. We make sure that the libhello shared object can only be found via
+-- the extra-lib-dirs from the package database registration (which we do by
+-- moving libhello.so from its original place).
+--
+-- Finally, we enter GHCi, load the Haskell library, and try to use it to call
+-- into libhello.
+
+import System.Directory
+import Distribution.System
+import Test.Cabal.Prelude
+
+
+main = setupTest $ do
+
+  skipIfWindows
+  skipUnlessGhcVersion ">= 8.4"
+
+  withPackageDb $ do
+    cwd  <- takeDirectory . testCurrentDir <$> getTestEnv
+    plat <- testPlatform <$> getTestEnv
+    let libExt = case plat of
+          Platform _ OSX     -> "dylib"
+          Platform _ Windows -> "dll"
+          Platform _ _other  -> "so"
+
+
+    -- Link a C program against the library
+    _ <- runProgramM ghcProgram
+        [ "-fPIC", "-c", "clib/lib.c"
+        , "-o", "clib/lib.o" ]
+        Nothing
+    _ <- runProgramM ghcProgram
+        [ "-shared", "-no-hs-main", "clib/lib.o"
+        , "-o", "clib/libhello" <.> libExt ]
+        Nothing
+
+    withDirectory "lib" $ do
+      setup "configure" ["-v0"
+                        , "--extra-lib-dirs=" ++ (cwd </> "clib")
+                        , "--extra-lib-dirs=" ++ (cwd </> "clib-install")
+                        , "--disable-library-vanilla"
+                        , "--enable-shared"]
+      setup "build" []
+      setup "register" ["--inplace"]
+
+    -- Move libhello from its original place to ensure it isn't found via RPATH
+    liftIO $ do
+      createDirectoryIfMissing False (cwd </> "clib-install")
+      copyFile (cwd </> "clib/libhello" <.> libExt) ( cwd </> "clib-install/libhello" <.> libExt)
+      removeFile (cwd </> "clib/libhello" <.> libExt)
+
+    pkgDb <- testPackageDbDir <$> getTestEnv
+    ghciScript <- liftIO $ readFile (cwd </> "T19350.script")
+    _ <- runProgramM ghcProgram
+         [ "--interactive"
+         , "-package", "T7339"
+         , "-package-db", pkgDb
+         ] (Just ghciScript)
+
+    return ()

From 1972a17336f15ab502c26f00bd0461336cc55a94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Wed, 31 Jan 2024 16:29:44 +0100
Subject: [PATCH 119/144] Generate changelogs for 3.10.3.0 (#9661)

* Generate changelogs
---
 Cabal-syntax/ChangeLog.md               |  2 +-
 Cabal/ChangeLog.md                      |  3 ++
 cabal-install-solver/ChangeLog.md       |  2 +-
 cabal-install/changelog                 |  3 ++
 changelog.d/base16-script-cache         |  9 -----
 changelog.d/issue-6268                  | 19 -----------
 changelog.d/issue-8577                  | 13 -------
 changelog.d/issue-8841                  | 15 ---------
 changelog.d/issue-8843                  | 15 ---------
 changelog.d/issue-8892                  | 11 ------
 changelog.d/issue-8951                  |  3 --
 changelog.d/issue-9122                  |  4 ---
 changelog.d/issue-9401                  | 11 ------
 changelog.d/pkgconfig-envvars           |  8 -----
 changelog.d/pr-8819                     |  9 -----
 changelog.d/pr-8878                     |  9 -----
 changelog.d/pr-8903                     |  9 -----
 changelog.d/pr-9004                     | 11 ------
 changelog.d/pr-9049                     | 13 -------
 changelog.d/pr-9068                     | 12 -------
 changelog.d/pr-9242                     |  3 --
 changelog.d/pr-9341                     | 11 ------
 changelog.d/pr-9391                     |  4 ---
 changelog.d/pr-9503                     | 11 ------
 changelog.d/pr-9525                     | 10 ------
 changelog.d/pr-9609                     | 12 -------
 changelog.d/propagate-extra-prog-path   | 13 -------
 release-notes/Cabal-3.10.3.0.md         | 15 +++++++++
 release-notes/cabal-install-3.10.3.0.md | 45 +++++++++++++++++++++++++
 29 files changed, 68 insertions(+), 237 deletions(-)
 delete mode 100644 changelog.d/base16-script-cache
 delete mode 100644 changelog.d/issue-6268
 delete mode 100644 changelog.d/issue-8577
 delete mode 100644 changelog.d/issue-8841
 delete mode 100644 changelog.d/issue-8843
 delete mode 100644 changelog.d/issue-8892
 delete mode 100644 changelog.d/issue-8951
 delete mode 100644 changelog.d/issue-9122
 delete mode 100644 changelog.d/issue-9401
 delete mode 100644 changelog.d/pkgconfig-envvars
 delete mode 100644 changelog.d/pr-8819
 delete mode 100644 changelog.d/pr-8878
 delete mode 100644 changelog.d/pr-8903
 delete mode 100644 changelog.d/pr-9004
 delete mode 100644 changelog.d/pr-9049
 delete mode 100644 changelog.d/pr-9068
 delete mode 100644 changelog.d/pr-9242
 delete mode 100644 changelog.d/pr-9341
 delete mode 100644 changelog.d/pr-9391
 delete mode 100644 changelog.d/pr-9503
 delete mode 100644 changelog.d/pr-9525
 delete mode 100644 changelog.d/pr-9609
 delete mode 100644 changelog.d/propagate-extra-prog-path
 create mode 100644 release-notes/Cabal-3.10.3.0.md
 create mode 100644 release-notes/cabal-install-3.10.3.0.md

diff --git a/Cabal-syntax/ChangeLog.md b/Cabal-syntax/ChangeLog.md
index 58c8379eb44..7706be32368 100644
--- a/Cabal-syntax/ChangeLog.md
+++ b/Cabal-syntax/ChangeLog.md
@@ -1 +1 @@
-Please see See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.2.0.md
+Please see See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.3.0.md
diff --git a/Cabal/ChangeLog.md b/Cabal/ChangeLog.md
index 34d046cc098..08d6aa838dc 100644
--- a/Cabal/ChangeLog.md
+++ b/Cabal/ChangeLog.md
@@ -1,3 +1,6 @@
+# 3.10.3.0 [Hécate](mailto:hecate+github@glitchbra.in) January 2024
+* See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.3.0.md
+
 # 3.10.2.1 [Hécate](mailto:hecate+github@glitchbra.in) October 2023
 * See https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.2.1.md
 
diff --git a/cabal-install-solver/ChangeLog.md b/cabal-install-solver/ChangeLog.md
index 7af34641df0..3bfdd653afe 100644
--- a/cabal-install-solver/ChangeLog.md
+++ b/cabal-install-solver/ChangeLog.md
@@ -1 +1 @@
-Please see https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.10.2.0.md
+Please see https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.10.3.0.md
diff --git a/cabal-install/changelog b/cabal-install/changelog
index f98fcfe1932..2d742052eeb 100644
--- a/cabal-install/changelog
+++ b/cabal-install/changelog
@@ -1,5 +1,8 @@
 -*-change-log-*-
 
+3.10.3.0 Hécate <hecate+github@glitchbra.in> January 2024
+	* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.10.3.0.md
+
 3.10.2.1 Hécate <hecate+github@glitchbra.in> November 2023
 	* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.10.2.1.md
 
diff --git a/changelog.d/base16-script-cache b/changelog.d/base16-script-cache
deleted file mode 100644
index b395f946a09..00000000000
--- a/changelog.d/base16-script-cache
+++ /dev/null
@@ -1,9 +0,0 @@
-synopsis: Script cache dir is the base16 hash of the canonical path of the script.
-prs: #9459
-packages: cabal-install
-
-description: {
-
-Script cache dir is the base16 hash of the canonical path of the script.
-
-}
diff --git a/changelog.d/issue-6268 b/changelog.d/issue-6268
deleted file mode 100644
index cc78eecf884..00000000000
--- a/changelog.d/issue-6268
+++ /dev/null
@@ -1,19 +0,0 @@
-synopsis: Fix parsing of password-command option
-packages: cabal-install
-prs: #9002
-issuesa: #6268
-
-description: {
-
-The password-command option did not parse its value correctly.
-Quotes were ignored, making many kinds of commands impossible to
-express (e.g.  `sh -c "foo | bar"`).  Also, `cabal user-config`
-treated the argument list as a *list of option values*, rather than a
-*value that is a list*.  As a consequence, `cabal user-config
-update` corrupted the value in the config file.
-
-Fixed these issues by parsing the command as a space separated list
-of tokens (which may be enclosed in double quotes), and treating the
-parsed list-of-token as one value (not multiple).
-
-}
diff --git a/changelog.d/issue-8577 b/changelog.d/issue-8577
deleted file mode 100644
index b7890c261ba..00000000000
--- a/changelog.d/issue-8577
+++ /dev/null
@@ -1,13 +0,0 @@
-synopsis: Existence of $XDG_CONFIG_HOME/cabal/config now overrides existence of $HOME/.cabal
-packages: cabal-install
-issues: #8577
-
-description: {
-
-To avoid pre-XDG backwards compatibility from triggering due to other
-tools accidentally creating a $HOME/.cabal directory, the presence of
-$XDG_CONFIG_HOME/cabal/config now disables pre-XDG backwards
-compatibility.  Presumably $XDG_CONFIG_HOME/cabal/config will never be
-created by accident.
-
-}
diff --git a/changelog.d/issue-8841 b/changelog.d/issue-8841
deleted file mode 100644
index b0bc13c1bc2..00000000000
--- a/changelog.d/issue-8841
+++ /dev/null
@@ -1,15 +0,0 @@
-synopsis: Shorten script-builds paths
-packages: Cabal cabal-install
-prs: #8898
-issues: #8841
-
-description: {
-
-- Use Base64 hash truncated to 26 chars for script-build cache directories.
-- Use the cache directory as the dist directory.
-- Use script-<your-sanitized-script-name> as the component name instead of cabal-script-<...>.
-- Use cabal-script-<your-actual-script-name> for the executable name.
-- This change is incompatible with previous cabal versions in terms of cache location,
-  you should manually remove your old caches once you no longer need them.
-
-}
diff --git a/changelog.d/issue-8843 b/changelog.d/issue-8843
deleted file mode 100644
index fa1c93141fa..00000000000
--- a/changelog.d/issue-8843
+++ /dev/null
@@ -1,15 +0,0 @@
-synopsis: changes to haddock-project command
-
-packages: cabal-install
-prs: #8919
-issues: #8843 #8958
-description: {
-
-- cabal haddock-project by default creates self contained
-  documentation (formerly it required `--local` switch, which is removed).
-- `--gen-contents`, `--gen-index`, `--quickjump` and `--hyperlinked-source`
-  options where removed as they are always passed to haddock.
-- Fixes a bug which prevented to use `haddock-project` with
-  packages containing sublibraries.
-
-}
diff --git a/changelog.d/issue-8892 b/changelog.d/issue-8892
deleted file mode 100644
index 4e08b86494c..00000000000
--- a/changelog.d/issue-8892
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: Regenerate Lexer.hs to avoid out-of-bound array access due to a bug in Alex
-packages: Cabal-syntax
-prs: #8896
-issues: #8892
-
-description: {
-
-- Regenerate Cabal-syntax's Lexer.hs with Alex 3.2.7.3 which includes a fix for
-  an out-of-bound array access (only noticeable with GHC's JavaScript backend).
-
-}
diff --git a/changelog.d/issue-8951 b/changelog.d/issue-8951
deleted file mode 100644
index 38bc8c7503b..00000000000
--- a/changelog.d/issue-8951
+++ /dev/null
@@ -1,3 +0,0 @@
-synopsis: Don't add `extra-prog-path: ~/.local/bin` when initially creating `~/.config/cabal/config`
-packages: cabal-install
-issues: #8951
diff --git a/changelog.d/issue-9122 b/changelog.d/issue-9122
deleted file mode 100644
index c8d82af1d86..00000000000
--- a/changelog.d/issue-9122
+++ /dev/null
@@ -1,4 +0,0 @@
-synopsis: Fix dependency on an external package when an internal library with the same name exists
-packages: Cabal
-issues: #9122
-prs: #9132
diff --git a/changelog.d/issue-9401 b/changelog.d/issue-9401
deleted file mode 100644
index 40487976543..00000000000
--- a/changelog.d/issue-9401
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: Account for .buildinfo in repl, test, and bench
-packages: Cabal
-prs: #9440
-issues: #9401
-
-description: {
-
-Generated <project>.buildinfo is now respected in cabal repl, cabal test and cabal bench.
-
-}
-
diff --git a/changelog.d/pkgconfig-envvars b/changelog.d/pkgconfig-envvars
deleted file mode 100644
index 9b570693a44..00000000000
--- a/changelog.d/pkgconfig-envvars
+++ /dev/null
@@ -1,8 +0,0 @@
-synopsis: PkgConfig environment variables
-prs: #9134
-
-description: {
-
-- `cabal` invokes `pkg-config` with `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS` and `PKG_CONFIG_ALLOW_SYSTEM_LIBS` set
-
-}
diff --git a/changelog.d/pr-8819 b/changelog.d/pr-8819
deleted file mode 100644
index 1398a2ca648..00000000000
--- a/changelog.d/pr-8819
+++ /dev/null
@@ -1,9 +0,0 @@
-synopsis: Use compiler flags for caching project config
-packages: cabal-install
-prs: #8819
-
-description: {
-
-This ensures that cached project configs with conditionals re-execute the conditional logic when the compiler changes.
-
-}
diff --git a/changelog.d/pr-8878 b/changelog.d/pr-8878
deleted file mode 100644
index af3dcce15de..00000000000
--- a/changelog.d/pr-8878
+++ /dev/null
@@ -1,9 +0,0 @@
-synopsis: Fix default Nix configuration option in generated ~/.cabal/config file
-packages: cabal-install
-prs: #8878
-
-description: {
-
-Fixes the default for ~/.cabal/config file. The nix option should now be commented out by default.
-
-}
diff --git a/changelog.d/pr-8903 b/changelog.d/pr-8903
deleted file mode 100644
index 67b1bdb19ce..00000000000
--- a/changelog.d/pr-8903
+++ /dev/null
@@ -1,9 +0,0 @@
-synopsis: add base to cabal install --lib default env file
-packages: cabal-install
-prs: #8903
-
-description: {
-
-This adds base by default to the env file created by `cabal install --lib`. Further it ensures that packagedbs have been created before adding them to the env file.
-
-}
diff --git a/changelog.d/pr-9004 b/changelog.d/pr-9004
deleted file mode 100644
index 6ff90746475..00000000000
--- a/changelog.d/pr-9004
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: Do not check PVP on internal targets
-packages: cabal-install
-prs: #9004
-issues: #8361
-
-description: {
-
-- `cabal check` will not check for dependencies upper bounds in internal
-  targets (i.e. test-suites and benchmarks)
-
-}
diff --git a/changelog.d/pr-9049 b/changelog.d/pr-9049
deleted file mode 100644
index 41fcd0a5bb7..00000000000
--- a/changelog.d/pr-9049
+++ /dev/null
@@ -1,13 +0,0 @@
-synopsis: Do not always pass --quickjump to haddock #9049
-packages: Cabal
-prs: #9049
-issues: #9060
-description: {
-
-6d8adf13101 caused `cabal` to always pass the `--quickjump` flag to Haddock.
-Not only does this waste memory for a service that user hasn't asked for,
-but also leads to a failure with Haddocks shipped with GHC 9.0 and 9.2,
-which had a separate bug (fixed in later versions but not backported) when
-Haddock does not pass `--quickjump` recursively to the package dependencies.
-
-}
diff --git a/changelog.d/pr-9068 b/changelog.d/pr-9068
deleted file mode 100644
index cd590c76e85..00000000000
--- a/changelog.d/pr-9068
+++ /dev/null
@@ -1,12 +0,0 @@
-synopsis: Add new Hackage root keys to bootstrap set
-packages: cabal-install
-prs: #9068
-
-description: {
-
-The two new [Hackage root keyholders](https://github.com/haskell-infra/hackage-root-keys/tree/master/root-keys) were added to the bootstrap set.
-
-- Added Hackage root key for Joachim Breitner
-- Added Hackage root key for Mathieu Boespflug
-
-}
diff --git a/changelog.d/pr-9242 b/changelog.d/pr-9242
deleted file mode 100644
index dfabc5fd982..00000000000
--- a/changelog.d/pr-9242
+++ /dev/null
@@ -1,3 +0,0 @@
-synopsis: Support text-2.1 in Cabal and Cabal-syntax
-packages: Cabal Cabal-syntax
-prs: #9242
diff --git a/changelog.d/pr-9341 b/changelog.d/pr-9341
deleted file mode 100644
index dc6c65a802d..00000000000
--- a/changelog.d/pr-9341
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: Fix run command environment
-packages: cabal-install
-prs: #9341
-issues: #8391
-
-description: {
-
-- The Run command will now add binary paths of dependencies
-  (build-tool-depends) to PATH, just like Exec and Test commands.
-
-}
\ No newline at end of file
diff --git a/changelog.d/pr-9391 b/changelog.d/pr-9391
deleted file mode 100644
index 517c94ed127..00000000000
--- a/changelog.d/pr-9391
+++ /dev/null
@@ -1,4 +0,0 @@
-synopsis: fix pkgconfig-depends for pkgconf-1.9
-packages: cabal-install-solver
-prs: #9391
-issues: #8923
diff --git a/changelog.d/pr-9503 b/changelog.d/pr-9503
deleted file mode 100644
index d53e09fae9e..00000000000
--- a/changelog.d/pr-9503
+++ /dev/null
@@ -1,11 +0,0 @@
-synopsis: Make `check` recognise `TypeAbstractions`
-packages: cabal-install
-prs: #9503
-issues: #9496
-
-description: {
-
-- `cabal check` will not complain about “Unknown extension” when
-  finding `TypeAbstractions`.
-
-}
diff --git a/changelog.d/pr-9525 b/changelog.d/pr-9525
deleted file mode 100644
index 2500db3e023..00000000000
--- a/changelog.d/pr-9525
+++ /dev/null
@@ -1,10 +0,0 @@
-synopsis: `check`: add PackageInfo warning
-packages: cabal-install
-prs: #9525
-issues: #9331
-
-description: {
-
-`cabal check` will warn about PackageInfo_* modules and provide an upgrade path to 3.12.
-
-}
diff --git a/changelog.d/pr-9609 b/changelog.d/pr-9609
deleted file mode 100644
index c156706ef03..00000000000
--- a/changelog.d/pr-9609
+++ /dev/null
@@ -1,12 +0,0 @@
-synopsis: Ignore invalid Unicode in pkg-config descriptions
-packages: cabal-install-solver
-prs: #9609
-issues: #9608
-
-description: {
-
-Previously, cabal-install would crash when `pkg-config --list-all` contained
-invalid Unicode. With this change, invalid unicode in package descriptions is
-ignored, and unparseable package names are considered nonexistent.
-
-}
diff --git a/changelog.d/propagate-extra-prog-path b/changelog.d/propagate-extra-prog-path
deleted file mode 100644
index 9938736f7a1..00000000000
--- a/changelog.d/propagate-extra-prog-path
+++ /dev/null
@@ -1,13 +0,0 @@
-synopsis: Fix extra-prog-path propagation
-packages: cabal-install Cabal
-prs: #9527
-issues: #7649 #9519
-
-description: {
-
-- extra-prog-paths are now propagated to all commands. This in particular helps
-  when running a MinGW cabal in the PowerShell, where the MSYS2 paths are
-  usually not available in the PowerShell PATH. GHCup already sets them up for
-  us but they were sometimes lost on the way.
-
-}
diff --git a/release-notes/Cabal-3.10.3.0.md b/release-notes/Cabal-3.10.3.0.md
new file mode 100644
index 00000000000..3488616b920
--- /dev/null
+++ b/release-notes/Cabal-3.10.3.0.md
@@ -0,0 +1,15 @@
+Cabal and Cabal-syntax 3.10.3.0 changelog and release notes
+---
+
+## Release 3.10.3.0 is strictly a bug-fix release, with the fixes listed below
+
+- PkgConfig environment variables [#9134](https://github.com/haskell/cabal/pull/9134)
+  - `cabal` invokes `pkg-config` with `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS` and `PKG_CONFIG_ALLOW_SYSTEM_LIBS` set
+
+- Support text-2.1 in Cabal and Cabal-syntax [#9242](https://github.com/haskell/cabal/pull/9242)
+
+- Fix extra-prog-path propagation [#7649](https://github.com/haskell/cabal/issues/7649) [#9519](https://github.com/haskell/cabal/issues/9519) [#9527](https://github.com/haskell/cabal/pull/9527)
+  - extra-prog-paths are now propagated to all commands. This in particular helps
+    when running a MinGW cabal in the PowerShell, where the MSYS2 paths are
+    usually not available in the PowerShell PATH. GHCup already sets them up for
+    us but they were sometimes lost on the way.
diff --git a/release-notes/cabal-install-3.10.3.0.md b/release-notes/cabal-install-3.10.3.0.md
new file mode 100644
index 00000000000..f057eb4ca53
--- /dev/null
+++ b/release-notes/cabal-install-3.10.3.0.md
@@ -0,0 +1,45 @@
+cabal-install and cabal-install-solver 3.10.3.0 changelog and release notes
+---
+
+## Release 3.10.3.0 is strictly a bug-fix release, with the fixes listed below
+
+- PkgConfig individual calls [#9134](https://github.com/haskell/cabal/pull/9134)
+
+  - `cabal` invokes `pkg-config` individually for each lib if querying for all doesn't return the expected result
+
+- Use compiler flags for caching project config [#8819](https://github.com/haskell/cabal/pull/8819)
+
+  This ensures that cached project configs with conditionals re-execute the conditional logic when the compiler changes.
+
+- Make `check` recognise `TypeAbstractions` [#9496](https://github.com/haskell/cabal/issues/9496) [#9503](https://github.com/haskell/cabal/pull/9503)
+
+  - `cabal check` will not complain about “Unknown extension” when
+    finding `TypeAbstractions`.
+
+- `check`: add PackageInfo warning [#9331](https://github.com/haskell/cabal/issues/9331) [#9525](https://github.com/haskell/cabal/pull/9525)
+
+  `cabal check` will warn about PackageInfo_* modules and provide an upgrade path to 3.12.
+
+- Fix extra-prog-path propagation [#7649](https://github.com/haskell/cabal/issues/7649) [#9519](https://github.com/haskell/cabal/issues/9519) [#9527](https://github.com/haskell/cabal/pull/9527)
+
+  - extra-prog-paths are now propagated to all commands. This in particular helps
+    when running a MinGW cabal in the PowerShell, where the MSYS2 paths are
+    usually not available in the PowerShell PATH. GHCup already sets them up for
+    us but they were sometimes lost on the way.
+
+- fix pkgconfig-depends for pkgconf-1.9 [#8923](https://github.com/haskell/cabal/issues/8923) [#9391](https://github.com/haskell/cabal/pull/9391)
+
+- Ignore invalid Unicode in pkg-config descriptions [#9608](https://github.com/haskell/cabal/issues/9608) [#9609](https://github.com/haskell/cabal/pull/9609)
+
+  Previously, cabal-install would crash when `pkg-config --list-all` contained
+  invalid Unicode. With this change, invalid unicode in package descriptions is
+  ignored, and unparseable package names are considered nonexistent.
+
+- Script cache dir is the base16 hash of the canonical path of the script. [#9459](https://github.com/haskell/cabal/pull/9459)
+
+  Script cache dir is the base16 hash of the canonical path of the script.
+
+- Fix run command environment [#8391](https://github.com/haskell/cabal/issues/8391) [#9341](https://github.com/haskell/cabal/pull/9341)
+
+  - The Run command will now add binary paths of dependencies
+    (build-tool-depends) to PATH, just like Exec and Test commands.

From 5ba05c273eae8a79e3e6b47fdea911e32e8383ad Mon Sep 17 00:00:00 2001
From: Ben Gamari <ben@smart-cactus.org>
Date: Wed, 31 Jan 2024 14:53:29 -0500
Subject: [PATCH 120/144] Cabal: Allow Win32-2.14

(cherry picked from commit ec71ed5b44d7a35e3b421c0d3f1f9f52cc434992)
---
 Cabal/Cabal.cabal | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index 5b5713d2762..d0087dd2236 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -47,7 +47,7 @@ library
     time       >= 1.4.0.1  && < 1.13
 
   if os(windows)
-    build-depends: Win32 >= 2.3.0.0 && < 2.14
+    build-depends: Win32 >= 2.3.0.0 && < 2.15
   else
     build-depends: unix  >= 2.6.0.0 && < 2.9
 

From 098036bc8b7ba6a738cefb2a435487c2b1e2bab9 Mon Sep 17 00:00:00 2001
From: Francesco Ariis <fa-ml@ariis.it>
Date: Thu, 1 Feb 2024 20:31:18 +0100
Subject: [PATCH 121/144] Bump a number of dependencies

(cherry picked from commit 2869473365e8bf6eba9ba5250cad7b9d117958bb)
---
 Cabal-tests/Cabal-tests.cabal         | 2 +-
 cabal-install/cabal-install.cabal     | 6 +++---
 cabal-testsuite/cabal-testsuite.cabal | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Cabal-tests/Cabal-tests.cabal b/Cabal-tests/Cabal-tests.cabal
index 42e8945969e..b818b7e6cab 100644
--- a/Cabal-tests/Cabal-tests.cabal
+++ b/Cabal-tests/Cabal-tests.cabal
@@ -203,4 +203,4 @@ test-suite no-thunks-test
   -- this is test is buildable on old GHCs
   -- but it doesn't do anything.
   if impl(ghc >=8.6)
-    build-depends: nothunks >=0.1.1.0 && <0.2
+    build-depends: nothunks >=0.1.1.0 && <0.3
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 24149ed97bb..d59ed142191 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -364,7 +364,7 @@ test-suite mem-use-tests
   build-depends:
         cabal-install,
         containers,
-        tasty >= 1.2.3 && <1.5,
+        tasty >= 1.2.3 && <1.6,
         tasty-hunit >= 0.10
 
 
@@ -384,7 +384,7 @@ test-suite integration-tests2
         containers,
         directory,
         filepath,
-        tasty >= 1.2.3 && <1.5,
+        tasty >= 1.2.3 && <1.6,
         tasty-hunit >= 0.10,
         tagged
 
@@ -420,7 +420,7 @@ test-suite long-tests
         network-uri >= 2.6.2.0 && <2.7,
         random,
         tagged,
-        tasty >= 1.2.3 && <1.5,
+        tasty >= 1.2.3 && <1.6,
         tasty-expected-failure,
         tasty-hunit >= 0.10,
         tasty-quickcheck,
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index 2b292851885..da6b49c3ef6 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -62,7 +62,7 @@ library
     , attoparsec            ^>= 0.13.2.2 || ^>=0.14.1
     , base16-bytestring     ^>= 0.1.1.5 || ^>= 1.0
     , bytestring            ^>= 0.10.0.2 || ^>= 0.11.0.0 || ^>= 0.12.0.0
-    , containers            ^>= 0.5.0.0 || ^>= 0.6.0.1
+    , containers            ^>= 0.5.0.0 || ^>= 0.6.0.1 || ^>= 0.7
     , cryptohash-sha256     ^>= 0.11.101.0
     , directory             ^>= 1.2.0.1 || ^>= 1.3.0.0
     , exceptions            ^>= 0.10.0

From 1666013459a35c00adbb7068a532566234d4dbd0 Mon Sep 17 00:00:00 2001
From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com>
Date: Tue, 13 Feb 2024 20:36:30 +0100
Subject: [PATCH 122/144] Allow zlib-0.7 (backport #9703) (#9709)

(cherry picked from commit 8674b74d8f2ee1448e115361daad6e87c586985d)

Co-authored-by: Bodigrim <andrew.lelechenko@gmail.com>
---
 cabal-install/cabal-install.cabal | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index d59ed142191..00119fea4bc 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -229,7 +229,7 @@ library
         stm        >= 2.0      && < 2.6,
         tar        >= 0.5.0.3  && < 0.7,
         time       >= 1.5.0.1  && < 1.13,
-        zlib       >= 0.5.3    && < 0.7,
+        zlib       >= 0.5.3    && < 0.8,
         hackage-security >= 0.6.2.0 && < 0.7,
         text       >= 1.2.3    && < 1.3 || >= 2.0 && < 2.2,
         parsec     >= 3.1.13.0 && < 3.2,

From 34b75586be13f7a96e03acf5620d22b12ba1a7c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= <hecate+github@glitchbra.in>
Date: Tue, 20 Feb 2024 11:40:37 +0100
Subject: [PATCH 123/144] Bump version numbers to 3.10.3.0

---
 Cabal-syntax/Cabal-syntax.cabal                 | 2 +-
 Cabal/Cabal.cabal                               | 2 +-
 Cabal/Makefile                                  | 2 +-
 bootstrap/cabal-bootstrap-gen.cabal             | 2 +-
 cabal-install-solver/cabal-install-solver.cabal | 2 +-
 cabal-install/cabal-install.cabal               | 2 +-
 cabal-testsuite/cabal-testsuite.cabal           | 8 ++++----
 doc/conf.py                                     | 2 +-
 8 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index 5a4429ecdd3..cb943ac4295 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal-syntax
-version:       3.10.2.0
+version:       3.10.3.0
 copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index d0087dd2236..29ec0efcbac 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal
-version:       3.10.2.1
+version:       3.10.3.0
 copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
diff --git a/Cabal/Makefile b/Cabal/Makefile
index 7c85b735a4c..cb81a960208 100644
--- a/Cabal/Makefile
+++ b/Cabal/Makefile
@@ -1,4 +1,4 @@
-VERSION=3.10.2.1
+VERSION=3.10.3.0
 
 #KIND=devel
 KIND=rc
diff --git a/bootstrap/cabal-bootstrap-gen.cabal b/bootstrap/cabal-bootstrap-gen.cabal
index df75818beaa..e3b0df660ee 100644
--- a/bootstrap/cabal-bootstrap-gen.cabal
+++ b/bootstrap/cabal-bootstrap-gen.cabal
@@ -11,7 +11,7 @@ executable cabal-bootstrap-gen
     , aeson                  ^>=1.5.2.0  || ^>=2.0.3.0 || ^>=2.1.0.0
     , base                   ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0 || ^>=4.15.0.0 || ^>=4.16.0.0 || ^>=4.17.0.0
     , bytestring             ^>=0.10.8.2 || ^>=0.11.0.0
-    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0 || ^>=3.8.1.0 || ^>=3.10.2.1
+    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0 || ^>=3.8.1.0 || ^>=3.10.3
     , Cabal-syntax           ^>=3.8.1.0 || ^>=3.10.2.0
     , cabal-install-parsers  ^>=0.3.0.1  || ^>=0.4.5 || ^>=0.6
     , cabal-plan             ^>=0.7.0.0
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index f0a71911b29..29c733c61be 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          cabal-install-solver
-version:       3.10.2.1
+version:       3.10.3.0
 synopsis:      The command-line interface for Cabal and Hackage.
 description:
   The solver component used in cabal-install command-line program
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 00119fea4bc..f843033259a 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -1,7 +1,7 @@
 Cabal-Version:      2.2
 
 Name:               cabal-install
-Version:            3.10.2.1
+Version:            3.10.3.0
 Synopsis:           The command-line interface for Cabal and Hackage.
 Description:
     The \'cabal\' command-line program simplifies the process of managing
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index da6b49c3ef6..056502af4b1 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -28,8 +28,8 @@ common shared
   build-depends:
     , base >= 4.9 && <4.20
     -- this needs to match the in-tree lib:Cabal version
-    , Cabal ^>= 3.10.2.1
-    , Cabal-syntax ^>= 3.10.2.0
+    , Cabal ^>= 3.10.3.0
+    , Cabal-syntax ^>= 3.10.3.0
 
   ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
 
@@ -115,6 +115,6 @@ custom-setup
   -- and due to Custom complexity and ConstraintSetupCabalMaxVersion
   -- it has to be the latest release version plus
   -- you have to use the latest cabal-install release
-  setup-depends: Cabal == 3.10.2.1,
-                 Cabal-syntax == 3.10.2.0,
+  setup-depends: Cabal == 3.10.3.0,
+                 Cabal-syntax == 3.10.3.0,
                  base, filepath, directory
diff --git a/doc/conf.py b/doc/conf.py
index 4d4161ed809..a7f63111174 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -13,7 +13,7 @@
 sys.path.insert(0, os.path.abspath('.'))
 import cabaldomain
 
-version = "3.10.2.1"
+version = "3.10.3.0"
 
 extensions = [
     'sphinx.ext.extlinks',

From 3d88dab16acb1fda809bf0ea488cfc59797771cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= <hecate+github@glitchbra.in>
Date: Tue, 20 Feb 2024 11:42:00 +0100
Subject: [PATCH 124/144] Revert "Bump version numbers to 3.10.3.0"

This reverts commit 34b75586be13f7a96e03acf5620d22b12ba1a7c0.
---
 Cabal-syntax/Cabal-syntax.cabal                 | 2 +-
 Cabal/Cabal.cabal                               | 2 +-
 Cabal/Makefile                                  | 2 +-
 bootstrap/cabal-bootstrap-gen.cabal             | 2 +-
 cabal-install-solver/cabal-install-solver.cabal | 2 +-
 cabal-install/cabal-install.cabal               | 2 +-
 cabal-testsuite/cabal-testsuite.cabal           | 8 ++++----
 doc/conf.py                                     | 2 +-
 8 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index cb943ac4295..5a4429ecdd3 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal-syntax
-version:       3.10.3.0
+version:       3.10.2.0
 copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index 29ec0efcbac..d0087dd2236 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal
-version:       3.10.3.0
+version:       3.10.2.1
 copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
diff --git a/Cabal/Makefile b/Cabal/Makefile
index cb81a960208..7c85b735a4c 100644
--- a/Cabal/Makefile
+++ b/Cabal/Makefile
@@ -1,4 +1,4 @@
-VERSION=3.10.3.0
+VERSION=3.10.2.1
 
 #KIND=devel
 KIND=rc
diff --git a/bootstrap/cabal-bootstrap-gen.cabal b/bootstrap/cabal-bootstrap-gen.cabal
index e3b0df660ee..df75818beaa 100644
--- a/bootstrap/cabal-bootstrap-gen.cabal
+++ b/bootstrap/cabal-bootstrap-gen.cabal
@@ -11,7 +11,7 @@ executable cabal-bootstrap-gen
     , aeson                  ^>=1.5.2.0  || ^>=2.0.3.0 || ^>=2.1.0.0
     , base                   ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0 || ^>=4.15.0.0 || ^>=4.16.0.0 || ^>=4.17.0.0
     , bytestring             ^>=0.10.8.2 || ^>=0.11.0.0
-    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0 || ^>=3.8.1.0 || ^>=3.10.3
+    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0 || ^>=3.8.1.0 || ^>=3.10.2.1
     , Cabal-syntax           ^>=3.8.1.0 || ^>=3.10.2.0
     , cabal-install-parsers  ^>=0.3.0.1  || ^>=0.4.5 || ^>=0.6
     , cabal-plan             ^>=0.7.0.0
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index 29c733c61be..f0a71911b29 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          cabal-install-solver
-version:       3.10.3.0
+version:       3.10.2.1
 synopsis:      The command-line interface for Cabal and Hackage.
 description:
   The solver component used in cabal-install command-line program
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index f843033259a..00119fea4bc 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -1,7 +1,7 @@
 Cabal-Version:      2.2
 
 Name:               cabal-install
-Version:            3.10.3.0
+Version:            3.10.2.1
 Synopsis:           The command-line interface for Cabal and Hackage.
 Description:
     The \'cabal\' command-line program simplifies the process of managing
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index 056502af4b1..da6b49c3ef6 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -28,8 +28,8 @@ common shared
   build-depends:
     , base >= 4.9 && <4.20
     -- this needs to match the in-tree lib:Cabal version
-    , Cabal ^>= 3.10.3.0
-    , Cabal-syntax ^>= 3.10.3.0
+    , Cabal ^>= 3.10.2.1
+    , Cabal-syntax ^>= 3.10.2.0
 
   ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
 
@@ -115,6 +115,6 @@ custom-setup
   -- and due to Custom complexity and ConstraintSetupCabalMaxVersion
   -- it has to be the latest release version plus
   -- you have to use the latest cabal-install release
-  setup-depends: Cabal == 3.10.3.0,
-                 Cabal-syntax == 3.10.3.0,
+  setup-depends: Cabal == 3.10.2.1,
+                 Cabal-syntax == 3.10.2.0,
                  base, filepath, directory
diff --git a/doc/conf.py b/doc/conf.py
index a7f63111174..4d4161ed809 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -13,7 +13,7 @@
 sys.path.insert(0, os.path.abspath('.'))
 import cabaldomain
 
-version = "3.10.3.0"
+version = "3.10.2.1"
 
 extensions = [
     'sphinx.ext.extlinks',

From 1da02f166fa51922456ea7dcbe945eb196f43689 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Wed, 21 Feb 2024 13:58:53 +0100
Subject: [PATCH 125/144] Bump version numbers to 3.10.3.0 (#9728)

* Bump version numbers to 3.10.3.0

* Update bootstrap and CI for latest minor 9.4

* Regenerate the bootstrap files

* Disable windows runner for GHC 9.0.2
---
 .github/workflows/bootstrap.yml               |   2 +-
 .github/workflows/validate.yml                |   5 +-
 Cabal-syntax/Cabal-syntax.cabal               |   2 +-
 Cabal/Cabal.cabal                             |   2 +-
 Cabal/Makefile                                |   2 +-
 Makefile                                      |   4 +-
 bootstrap/cabal-bootstrap-gen.cabal           |   2 +-
 bootstrap/linux-8.10.7.json                   | 124 +++++++++---------
 bootstrap/linux-9.0.2.json                    | 124 +++++++++---------
 bootstrap/linux-9.2.8.json                    | 118 ++++++++---------
 .../{linux-9.4.5.json => linux-9.4.8.json}    | 112 ++++++++--------
 .../cabal-install-solver.cabal                |   2 +-
 cabal-install/cabal-install.cabal             |   2 +-
 cabal-testsuite/cabal-testsuite.cabal         |   8 +-
 doc/conf.py                                   |   2 +-
 15 files changed, 257 insertions(+), 254 deletions(-)
 rename bootstrap/{linux-9.4.5.json => linux-9.4.8.json} (75%)

diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml
index 97d66a8ccda..0aacfc1e14c 100644
--- a/.github/workflows/bootstrap.yml
+++ b/.github/workflows/bootstrap.yml
@@ -19,7 +19,7 @@ jobs:
     strategy:
       matrix:
         os: [ubuntu-latest]
-        ghc: ["8.10.7", "9.0.2", "9.2.8", "9.4.5"]
+        ghc: ["8.10.7", "9.0.2", "9.2.8", "9.4.8"]
         include:
           - os: macos-latest
             ghc: "9.2.8"
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 16ddf6c3bba..abc6655b2e1 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -38,8 +38,11 @@ jobs:
     strategy:
       matrix:
         os: ["ubuntu-20.04", "macos-latest", "windows-latest"]
-        ghc: ["9.4.5", "9.2.8", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"]
+        ghc: ["9.4.8", "9.2.8", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"]
         exclude:
+          # Run takes 4+ hours
+          - os: "windows-latest"
+            ghc: "9.0.2"
           # corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356
           - os: "windows-latest"
             ghc: "8.10.7"
diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index 5a4429ecdd3..cb943ac4295 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal-syntax
-version:       3.10.2.0
+version:       3.10.3.0
 copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index d0087dd2236..29ec0efcbac 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          Cabal
-version:       3.10.2.1
+version:       3.10.3.0
 copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
 license:       BSD-3-Clause
 license-file:  LICENSE
diff --git a/Cabal/Makefile b/Cabal/Makefile
index 7c85b735a4c..cb81a960208 100644
--- a/Cabal/Makefile
+++ b/Cabal/Makefile
@@ -1,4 +1,4 @@
-VERSION=3.10.2.1
+VERSION=3.10.3.0
 
 #KIND=devel
 KIND=rc
diff --git a/Makefile b/Makefile
index 3e6a43fed68..6dc6b6c26cc 100644
--- a/Makefile
+++ b/Makefile
@@ -189,13 +189,13 @@ tags :
 ##############################################################################
 
 bootstrap-json-%: phony
-	cabal v2-build --project=cabal.project.release --with-compiler=ghc-$* --dry-run cabal-install:exe:cabal
+	cabal v2-build --project-file=cabal.project.release --with-compiler=ghc-$* --dry-run cabal-install:exe:cabal
 	cp dist-newstyle/cache/plan.json bootstrap/linux-$*.plan.json
 	@# -v0 to avoid build output on stdout
 	cd bootstrap && cabal v2-run -v0 cabal-bootstrap-gen -- linux-$*.plan.json \
 		| python3 -m json.tool > linux-$*.json
 
-BOOTSTRAP_GHC_VERSIONS := 8.10.7 9.0.2 9.2.8 9.4.5
+BOOTSTRAP_GHC_VERSIONS := 8.10.7 9.0.2 9.2.8 9.4.8
 
 bootstrap-jsons: $(BOOTSTRAP_GHC_VERSIONS:%=bootstrap-json-%)
 
diff --git a/bootstrap/cabal-bootstrap-gen.cabal b/bootstrap/cabal-bootstrap-gen.cabal
index df75818beaa..f185356e047 100644
--- a/bootstrap/cabal-bootstrap-gen.cabal
+++ b/bootstrap/cabal-bootstrap-gen.cabal
@@ -11,7 +11,7 @@ executable cabal-bootstrap-gen
     , aeson                  ^>=1.5.2.0  || ^>=2.0.3.0 || ^>=2.1.0.0
     , base                   ^>=4.12.0.0 || ^>=4.13.0.0 || ^>=4.14.0.0 || ^>=4.15.0.0 || ^>=4.16.0.0 || ^>=4.17.0.0
     , bytestring             ^>=0.10.8.2 || ^>=0.11.0.0
-    , Cabal                  ^>=3.2.0.0  || ^>=3.4.1.0  || ^>=3.6.3.0 || ^>=3.8.1.0 || ^>=3.10.2.1
+    , Cabal                  ^>=3.8.1.0 || ^>=3.10.3
     , Cabal-syntax           ^>=3.8.1.0 || ^>=3.10.2.0
     , cabal-install-parsers  ^>=0.3.0.1  || ^>=0.4.5 || ^>=0.6
     , cabal-plan             ^>=0.7.0.0
diff --git a/bootstrap/linux-8.10.7.json b/bootstrap/linux-8.10.7.json
index f40dc2263ca..74a3fb3f5bf 100644
--- a/bootstrap/linux-8.10.7.json
+++ b/bootstrap/linux-8.10.7.json
@@ -87,10 +87,10 @@
     ],
     "dependencies": [
         {
-            "cabal_sha256": "1125a0a4be3aafc8da208940f219d4e4df8a0db87d892cc42bb369071855c590",
+            "cabal_sha256": "7d16bf127fb303bd69d9c433bb146c5815f9690933af1d5a6ee45dea2e536dc5",
             "flags": [],
             "package": "directory",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "dc2785d6548cec2e80700fab007d3e9467f65d3c58ab3efa21b34d9017cf0efd",
             "version": "1.3.7.1"
@@ -102,16 +102,16 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.1"
+            "version": "3.10.3.0"
         },
         {
-            "cabal_sha256": "49d8a7f372d35363011591b253cae4c8db8b9ec594590448e20b7bed7acaee98",
+            "cabal_sha256": "8b4bce2749e4f61a440049e6088487003e8023c720e2019345e399d50888594f",
             "flags": [],
             "package": "process",
-            "revision": 0,
+            "revision": 2,
             "source": "hackage",
-            "src_sha256": "4c5c454e0f5c864c79b9fabd850307b26d8ac4037e45a6a39ab87e20b583bf06",
-            "version": "1.6.17.0"
+            "src_sha256": "aa5f4c4fe4974f89f5ab998c7509daa4bda3926cfb06daacd5eba892aad8a37e",
+            "version": "1.6.18.0"
         },
         {
             "cabal_sha256": null,
@@ -120,39 +120,39 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.1"
+            "version": "3.10.3.0"
         },
         {
-            "cabal_sha256": "d50e055f45bd09a8238200ec64ffa0f17492c32cdb5807487894388ce1c2f839",
+            "cabal_sha256": "e152cdb03243afb52bbc740cfbe96905ca298a6f6342f0c47b3f2e227ff19def",
             "flags": [
                 "-devel"
             ],
             "package": "network",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "b452a2afac95d9207357eb3820c719c7c7d27871ef4b6ed7bfcd03a036b9158e",
             "version": "3.1.4.0"
         },
         {
-            "cabal_sha256": "e5ae7c083ef3a22248558f8451669bb1c55ea8090f5908b86b9033743c161730",
+            "cabal_sha256": "f5f2c679ecc1c1b83d2d68db6cc564e5c78d53425e69e1b9e36784820e122d37",
             "flags": [],
             "package": "th-compat",
-            "revision": 2,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8",
             "version": "0.1.4"
         },
         {
-            "cabal_sha256": "1fde59abf5d82a9666b4415bc2b2e9e33f6c1309074fda12d50410c7dbd95f3b",
+            "cabal_sha256": "6fffb57373962b5651a2db8b0af732098b3bf029a7ced76a9855615de2026588",
             "flags": [],
             "package": "network-uri",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "9c188973126e893250b881f20e8811dca06c223c23402b06f7a1f2e995797228",
             "version": "2.6.4.2"
         },
         {
-            "cabal_sha256": "d9220cc1b8c1f287248d650910710b96e62e54530772e3bcd19dbdec6547f8ae",
+            "cabal_sha256": "0e37572590743e49d7a610f472e1618a594dc861410846f64d9f2347923c4f5b",
             "flags": [
                 "-conduit10",
                 "+network-uri",
@@ -160,31 +160,31 @@
                 "-warp-tests"
             ],
             "package": "HTTP",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
             "version": "4000.4.1"
         },
         {
-            "cabal_sha256": "0bdd3486d3a1bcbed0513b46af4a13ca74b395313fa5b6e0068d6b7413b76a04",
+            "cabal_sha256": "c4733d09f798fc4304e936924a1a7d9fc2425aefad6c46ad4592035254b46051",
             "flags": [],
             "package": "base-orphans",
             "revision": 0,
             "source": "hackage",
-            "src_sha256": "613ed4d8241ed5a648a59ae6569a6962990bb545711d020d49fb83fa12d16e62",
-            "version": "0.9.0"
+            "src_sha256": "5bbf2da382c5b212d6a8be2f8c49edee0eba30f272a15fd32c13e6e4091ef172",
+            "version": "0.9.1"
         },
         {
-            "cabal_sha256": "2ef1bd3511e82ba56f7f23cd793dd2da84338a1e7c2cbea5b151417afe3baada",
+            "cabal_sha256": "ad89e28b2b046175698fbf542af2ce43e5d2af50aae9f48d12566b1bb3de1d3c",
             "flags": [],
             "package": "data-array-byte",
-            "revision": 1,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "1bb6eca0b3e02d057fe7f4e14c81ef395216f421ab30fdaa1b18017c9c025600",
             "version": "0.1.0.1"
         },
         {
-            "cabal_sha256": "585792335d5541dba78fa8dfcb291a89cd5812a281825ff7a44afa296ab5d58a",
+            "cabal_sha256": "f3bf68acfa0df7a064a378ef2cdcfeb55e6fb96100675f4c593556dcbf3d7194",
             "flags": [
                 "+integer-gmp",
                 "-random-initial-seed"
@@ -192,54 +192,54 @@
             "package": "hashable",
             "revision": 1,
             "source": "hackage",
-            "src_sha256": "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8",
-            "version": "1.4.2.0"
+            "src_sha256": "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5",
+            "version": "1.4.3.0"
         },
         {
-            "cabal_sha256": "46367dc0c8326dcbeb7b93f200b567491c2f6029bccf822b8bb26ee660397e08",
+            "cabal_sha256": "9b8ceefce014e490f9e1335fa5f511161309926c55d01cec795016f4363b5d2d",
             "flags": [
                 "-bench"
             ],
             "package": "async",
-            "revision": 3,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
             "version": "2.2.4"
         },
         {
-            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
+            "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd",
             "flags": [],
             "package": "base16-bytestring",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
             "version": "1.0.2.0"
         },
         {
-            "cabal_sha256": "50ec0e229255d4c45cbdd568da011311b8887f304b931564886016f4984334d8",
+            "cabal_sha256": "45305ccf8914c66d385b518721472c7b8c858f1986945377f74f85c1e0d49803",
             "flags": [],
             "package": "base64-bytestring",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
             "version": "1.2.1.0"
         },
         {
-            "cabal_sha256": "db25c2e17967aa6b6046ab8b1b96ba3f344ca59a62b60fb6113d51ea305a3d8e",
+            "cabal_sha256": "bac0ae8d46a04e410666b0c8081cff63f060f29157983b569ca86ddb6e6e0dc6",
             "flags": [
                 "-optimised-mixer"
             ],
             "package": "splitmix",
-            "revision": 2,
+            "revision": 0,
             "source": "hackage",
-            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
-            "version": "0.1.0.4"
+            "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002",
+            "version": "0.1.0.5"
         },
         {
-            "cabal_sha256": "dea1f11e5569332dc6c8efaad1cb301016a5587b6754943a49f9de08ae0e56d9",
+            "cabal_sha256": "e7c1f881159d5cc788619c9ee8b8f340ba2ff0db571cdf3d1a1968ebc5108789",
             "flags": [],
             "package": "random",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
             "version": "1.2.1.1"
@@ -264,16 +264,16 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.3.0"
         },
         {
-            "cabal_sha256": "72ce9095872eae653addca5f412ac8070d6282d8e1c8578c2237c33f2cbbf4bc",
+            "cabal_sha256": "03db065161987f614a3a2bbcd16264f78e47efe231fb5bd161be2043eaf20488",
             "flags": [
                 "-exe",
                 "+use-cbits"
             ],
             "package": "cryptohash-sha256",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
             "version": "0.11.102.1"
@@ -290,7 +290,7 @@
             "version": "0.1.4"
         },
         {
-            "cabal_sha256": "3db04d7c18b9e68ba5eef3fa7eeca05e1e248958dd182290c8e6b010c81ef73e",
+            "cabal_sha256": "48383789821af5cc624498f3ee1d0939a070cda9468c0bfe63c951736be81c75",
             "flags": [
                 "+no-donna",
                 "+test-doctests",
@@ -298,49 +298,49 @@
                 "+test-properties"
             ],
             "package": "ed25519",
-            "revision": 7,
+            "revision": 8,
             "source": "hackage",
             "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
             "version": "0.0.5.0"
         },
         {
-            "cabal_sha256": "9ab54ee4f80bbd8a3fddd639ea142b7039ee2deb27f7df031a93de1819e34146",
+            "cabal_sha256": "17786545dce60c4d5783ba6125c0a6499a1abddd3d7417b15500ccd767c35f07",
             "flags": [
                 "+ofd-locking"
             ],
             "package": "lukko",
-            "revision": 4,
+            "revision": 5,
             "source": "hackage",
             "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
             "version": "0.1.1.3"
         },
         {
-            "cabal_sha256": "63dbcb0f507273a8331363e4c13a1fe91f4ea0c495883cf65f314629582a2630",
+            "cabal_sha256": "aaf5dd3ef327aaf203b1cb199760efd463fac2256453dd0e05d5cd707cdbd6e1",
             "flags": [
                 "-old-bytestring",
                 "-old-time"
             ],
             "package": "tar",
-            "revision": 6,
+            "revision": 10,
             "source": "hackage",
             "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "version": "0.5.1.1"
         },
         {
-            "cabal_sha256": "9adce39e4ca0b7a87d45df0a243134816c57059a08e28cff5469c98ae1f54dfc",
+            "cabal_sha256": "19eb7759af71957811d5ec10ddb1e2f4c98700ddb9c0da6860c0441d811f0e6d",
             "flags": [
                 "-bundled-c-zlib",
                 "-non-blocking-ffi",
                 "-pkg-config"
             ],
             "package": "zlib",
-            "revision": 1,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
             "version": "0.6.3.0"
         },
         {
-            "cabal_sha256": "5b225c2d82f0b8f4168a6124840bae353e6b462b90fd1e07c846211ae9bcb5ed",
+            "cabal_sha256": "2b2e560ac449e49f86a10d79957b2409da5be4b77edabd7425696780334cf3bf",
             "flags": [
                 "+base48",
                 "+cabal-syntax",
@@ -350,48 +350,48 @@
                 "+use-network-uri"
             ],
             "package": "hackage-security",
-            "revision": 3,
+            "revision": 8,
             "source": "hackage",
             "src_sha256": "52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066",
             "version": "0.6.2.3"
         },
         {
-            "cabal_sha256": "4ff4425c710cddf440dfbac6cd52310bb6b23e17902390ff71c9fc7eaafc4fcc",
+            "cabal_sha256": "0322b2fcd1358f3355e0c8608efa60d27b14d1c9d476451dbcb9181363bd8b27",
             "flags": [],
             "package": "regex-base",
-            "revision": 1,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
             "version": "0.94.0.2"
         },
         {
-            "cabal_sha256": "9dbba4b65a3bb6975d9740814be5593c6b2d2d6a0b3febc8ec940edb9a9bbdf4",
+            "cabal_sha256": "816d6acc560cb86672f347a7bef8129578dde26ed760f9e79b4976ed9bd7b9fd",
             "flags": [
                 "-_regex-posix-clib"
             ],
             "package": "regex-posix",
-            "revision": 1,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
             "version": "0.96.0.1"
         },
         {
-            "cabal_sha256": "a1f7edb255edae85ccb9d8001b26fea760f846aee0c6302b177eb59d613214e2",
+            "cabal_sha256": "4868265ab5760d2fdeb96625b138c8df25d41b9ee2651fa299ed019a69403045",
             "flags": [],
             "package": "resolv",
-            "revision": 6,
+            "revision": 3,
             "source": "hackage",
-            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
-            "version": "0.1.2.0"
+            "src_sha256": "880d283df9132a7375fa28670f71e86480a4f49972256dc2a204c648274ae74b",
+            "version": "0.2.0.2"
         },
         {
-            "cabal_sha256": "6e9b1b233af80cc0aa17ea858d2641ba146fb11cbcc5970a52649e89d77282e2",
+            "cabal_sha256": "8bb7261bd54bd58acfcb154be6a161fb6d0d31a1852aadc8e927d2ad2d7651d1",
             "flags": [],
             "package": "safe-exceptions",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
-            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
-            "version": "0.1.7.3"
+            "src_sha256": "3c51d8d50c9b60ff8bf94f942fd92e3bea9e62c5afa778dfc9f707b79da41ef6",
+            "version": "0.1.7.4"
         },
         {
             "cabal_sha256": null,
@@ -403,7 +403,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.1"
+            "version": "3.10.3.0"
         }
     ]
 }
diff --git a/bootstrap/linux-9.0.2.json b/bootstrap/linux-9.0.2.json
index 787917300e7..83075a0541b 100644
--- a/bootstrap/linux-9.0.2.json
+++ b/bootstrap/linux-9.0.2.json
@@ -87,10 +87,10 @@
     ],
     "dependencies": [
         {
-            "cabal_sha256": "1125a0a4be3aafc8da208940f219d4e4df8a0db87d892cc42bb369071855c590",
+            "cabal_sha256": "7d16bf127fb303bd69d9c433bb146c5815f9690933af1d5a6ee45dea2e536dc5",
             "flags": [],
             "package": "directory",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "dc2785d6548cec2e80700fab007d3e9467f65d3c58ab3efa21b34d9017cf0efd",
             "version": "1.3.7.1"
@@ -102,16 +102,16 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.1"
+            "version": "3.10.3.0"
         },
         {
-            "cabal_sha256": "49d8a7f372d35363011591b253cae4c8db8b9ec594590448e20b7bed7acaee98",
+            "cabal_sha256": "8b4bce2749e4f61a440049e6088487003e8023c720e2019345e399d50888594f",
             "flags": [],
             "package": "process",
-            "revision": 0,
+            "revision": 2,
             "source": "hackage",
-            "src_sha256": "4c5c454e0f5c864c79b9fabd850307b26d8ac4037e45a6a39ab87e20b583bf06",
-            "version": "1.6.17.0"
+            "src_sha256": "aa5f4c4fe4974f89f5ab998c7509daa4bda3926cfb06daacd5eba892aad8a37e",
+            "version": "1.6.18.0"
         },
         {
             "cabal_sha256": null,
@@ -120,39 +120,39 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.1"
+            "version": "3.10.3.0"
         },
         {
-            "cabal_sha256": "d50e055f45bd09a8238200ec64ffa0f17492c32cdb5807487894388ce1c2f839",
+            "cabal_sha256": "e152cdb03243afb52bbc740cfbe96905ca298a6f6342f0c47b3f2e227ff19def",
             "flags": [
                 "-devel"
             ],
             "package": "network",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "b452a2afac95d9207357eb3820c719c7c7d27871ef4b6ed7bfcd03a036b9158e",
             "version": "3.1.4.0"
         },
         {
-            "cabal_sha256": "e5ae7c083ef3a22248558f8451669bb1c55ea8090f5908b86b9033743c161730",
+            "cabal_sha256": "f5f2c679ecc1c1b83d2d68db6cc564e5c78d53425e69e1b9e36784820e122d37",
             "flags": [],
             "package": "th-compat",
-            "revision": 2,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8",
             "version": "0.1.4"
         },
         {
-            "cabal_sha256": "1fde59abf5d82a9666b4415bc2b2e9e33f6c1309074fda12d50410c7dbd95f3b",
+            "cabal_sha256": "6fffb57373962b5651a2db8b0af732098b3bf029a7ced76a9855615de2026588",
             "flags": [],
             "package": "network-uri",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "9c188973126e893250b881f20e8811dca06c223c23402b06f7a1f2e995797228",
             "version": "2.6.4.2"
         },
         {
-            "cabal_sha256": "d9220cc1b8c1f287248d650910710b96e62e54530772e3bcd19dbdec6547f8ae",
+            "cabal_sha256": "0e37572590743e49d7a610f472e1618a594dc861410846f64d9f2347923c4f5b",
             "flags": [
                 "-conduit10",
                 "+network-uri",
@@ -160,31 +160,31 @@
                 "-warp-tests"
             ],
             "package": "HTTP",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
             "version": "4000.4.1"
         },
         {
-            "cabal_sha256": "0bdd3486d3a1bcbed0513b46af4a13ca74b395313fa5b6e0068d6b7413b76a04",
+            "cabal_sha256": "c4733d09f798fc4304e936924a1a7d9fc2425aefad6c46ad4592035254b46051",
             "flags": [],
             "package": "base-orphans",
             "revision": 0,
             "source": "hackage",
-            "src_sha256": "613ed4d8241ed5a648a59ae6569a6962990bb545711d020d49fb83fa12d16e62",
-            "version": "0.9.0"
+            "src_sha256": "5bbf2da382c5b212d6a8be2f8c49edee0eba30f272a15fd32c13e6e4091ef172",
+            "version": "0.9.1"
         },
         {
-            "cabal_sha256": "2ef1bd3511e82ba56f7f23cd793dd2da84338a1e7c2cbea5b151417afe3baada",
+            "cabal_sha256": "ad89e28b2b046175698fbf542af2ce43e5d2af50aae9f48d12566b1bb3de1d3c",
             "flags": [],
             "package": "data-array-byte",
-            "revision": 1,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "1bb6eca0b3e02d057fe7f4e14c81ef395216f421ab30fdaa1b18017c9c025600",
             "version": "0.1.0.1"
         },
         {
-            "cabal_sha256": "585792335d5541dba78fa8dfcb291a89cd5812a281825ff7a44afa296ab5d58a",
+            "cabal_sha256": "f3bf68acfa0df7a064a378ef2cdcfeb55e6fb96100675f4c593556dcbf3d7194",
             "flags": [
                 "+integer-gmp",
                 "-random-initial-seed"
@@ -192,54 +192,54 @@
             "package": "hashable",
             "revision": 1,
             "source": "hackage",
-            "src_sha256": "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8",
-            "version": "1.4.2.0"
+            "src_sha256": "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5",
+            "version": "1.4.3.0"
         },
         {
-            "cabal_sha256": "46367dc0c8326dcbeb7b93f200b567491c2f6029bccf822b8bb26ee660397e08",
+            "cabal_sha256": "9b8ceefce014e490f9e1335fa5f511161309926c55d01cec795016f4363b5d2d",
             "flags": [
                 "-bench"
             ],
             "package": "async",
-            "revision": 3,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
             "version": "2.2.4"
         },
         {
-            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
+            "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd",
             "flags": [],
             "package": "base16-bytestring",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
             "version": "1.0.2.0"
         },
         {
-            "cabal_sha256": "50ec0e229255d4c45cbdd568da011311b8887f304b931564886016f4984334d8",
+            "cabal_sha256": "45305ccf8914c66d385b518721472c7b8c858f1986945377f74f85c1e0d49803",
             "flags": [],
             "package": "base64-bytestring",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
             "version": "1.2.1.0"
         },
         {
-            "cabal_sha256": "db25c2e17967aa6b6046ab8b1b96ba3f344ca59a62b60fb6113d51ea305a3d8e",
+            "cabal_sha256": "bac0ae8d46a04e410666b0c8081cff63f060f29157983b569ca86ddb6e6e0dc6",
             "flags": [
                 "-optimised-mixer"
             ],
             "package": "splitmix",
-            "revision": 2,
+            "revision": 0,
             "source": "hackage",
-            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
-            "version": "0.1.0.4"
+            "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002",
+            "version": "0.1.0.5"
         },
         {
-            "cabal_sha256": "dea1f11e5569332dc6c8efaad1cb301016a5587b6754943a49f9de08ae0e56d9",
+            "cabal_sha256": "e7c1f881159d5cc788619c9ee8b8f340ba2ff0db571cdf3d1a1968ebc5108789",
             "flags": [],
             "package": "random",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
             "version": "1.2.1.1"
@@ -264,16 +264,16 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.3.0"
         },
         {
-            "cabal_sha256": "72ce9095872eae653addca5f412ac8070d6282d8e1c8578c2237c33f2cbbf4bc",
+            "cabal_sha256": "03db065161987f614a3a2bbcd16264f78e47efe231fb5bd161be2043eaf20488",
             "flags": [
                 "-exe",
                 "+use-cbits"
             ],
             "package": "cryptohash-sha256",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
             "version": "0.11.102.1"
@@ -290,7 +290,7 @@
             "version": "0.1.4"
         },
         {
-            "cabal_sha256": "3db04d7c18b9e68ba5eef3fa7eeca05e1e248958dd182290c8e6b010c81ef73e",
+            "cabal_sha256": "48383789821af5cc624498f3ee1d0939a070cda9468c0bfe63c951736be81c75",
             "flags": [
                 "+no-donna",
                 "+test-doctests",
@@ -298,49 +298,49 @@
                 "+test-properties"
             ],
             "package": "ed25519",
-            "revision": 7,
+            "revision": 8,
             "source": "hackage",
             "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
             "version": "0.0.5.0"
         },
         {
-            "cabal_sha256": "9ab54ee4f80bbd8a3fddd639ea142b7039ee2deb27f7df031a93de1819e34146",
+            "cabal_sha256": "17786545dce60c4d5783ba6125c0a6499a1abddd3d7417b15500ccd767c35f07",
             "flags": [
                 "+ofd-locking"
             ],
             "package": "lukko",
-            "revision": 4,
+            "revision": 5,
             "source": "hackage",
             "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
             "version": "0.1.1.3"
         },
         {
-            "cabal_sha256": "63dbcb0f507273a8331363e4c13a1fe91f4ea0c495883cf65f314629582a2630",
+            "cabal_sha256": "aaf5dd3ef327aaf203b1cb199760efd463fac2256453dd0e05d5cd707cdbd6e1",
             "flags": [
                 "-old-bytestring",
                 "-old-time"
             ],
             "package": "tar",
-            "revision": 6,
+            "revision": 10,
             "source": "hackage",
             "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "version": "0.5.1.1"
         },
         {
-            "cabal_sha256": "9adce39e4ca0b7a87d45df0a243134816c57059a08e28cff5469c98ae1f54dfc",
+            "cabal_sha256": "19eb7759af71957811d5ec10ddb1e2f4c98700ddb9c0da6860c0441d811f0e6d",
             "flags": [
                 "-bundled-c-zlib",
                 "-non-blocking-ffi",
                 "-pkg-config"
             ],
             "package": "zlib",
-            "revision": 1,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
             "version": "0.6.3.0"
         },
         {
-            "cabal_sha256": "5b225c2d82f0b8f4168a6124840bae353e6b462b90fd1e07c846211ae9bcb5ed",
+            "cabal_sha256": "2b2e560ac449e49f86a10d79957b2409da5be4b77edabd7425696780334cf3bf",
             "flags": [
                 "+base48",
                 "+cabal-syntax",
@@ -350,48 +350,48 @@
                 "+use-network-uri"
             ],
             "package": "hackage-security",
-            "revision": 3,
+            "revision": 8,
             "source": "hackage",
             "src_sha256": "52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066",
             "version": "0.6.2.3"
         },
         {
-            "cabal_sha256": "4ff4425c710cddf440dfbac6cd52310bb6b23e17902390ff71c9fc7eaafc4fcc",
+            "cabal_sha256": "0322b2fcd1358f3355e0c8608efa60d27b14d1c9d476451dbcb9181363bd8b27",
             "flags": [],
             "package": "regex-base",
-            "revision": 1,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
             "version": "0.94.0.2"
         },
         {
-            "cabal_sha256": "9dbba4b65a3bb6975d9740814be5593c6b2d2d6a0b3febc8ec940edb9a9bbdf4",
+            "cabal_sha256": "816d6acc560cb86672f347a7bef8129578dde26ed760f9e79b4976ed9bd7b9fd",
             "flags": [
                 "-_regex-posix-clib"
             ],
             "package": "regex-posix",
-            "revision": 1,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
             "version": "0.96.0.1"
         },
         {
-            "cabal_sha256": "a1f7edb255edae85ccb9d8001b26fea760f846aee0c6302b177eb59d613214e2",
+            "cabal_sha256": "4868265ab5760d2fdeb96625b138c8df25d41b9ee2651fa299ed019a69403045",
             "flags": [],
             "package": "resolv",
-            "revision": 6,
+            "revision": 3,
             "source": "hackage",
-            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
-            "version": "0.1.2.0"
+            "src_sha256": "880d283df9132a7375fa28670f71e86480a4f49972256dc2a204c648274ae74b",
+            "version": "0.2.0.2"
         },
         {
-            "cabal_sha256": "6e9b1b233af80cc0aa17ea858d2641ba146fb11cbcc5970a52649e89d77282e2",
+            "cabal_sha256": "8bb7261bd54bd58acfcb154be6a161fb6d0d31a1852aadc8e927d2ad2d7651d1",
             "flags": [],
             "package": "safe-exceptions",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
-            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
-            "version": "0.1.7.3"
+            "src_sha256": "3c51d8d50c9b60ff8bf94f942fd92e3bea9e62c5afa778dfc9f707b79da41ef6",
+            "version": "0.1.7.4"
         },
         {
             "cabal_sha256": null,
@@ -403,7 +403,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.1"
+            "version": "3.10.3.0"
         }
     ]
 }
diff --git a/bootstrap/linux-9.2.8.json b/bootstrap/linux-9.2.8.json
index 4b1a641f25c..5fa41795110 100644
--- a/bootstrap/linux-9.2.8.json
+++ b/bootstrap/linux-9.2.8.json
@@ -87,10 +87,10 @@
     ],
     "dependencies": [
         {
-            "cabal_sha256": "1125a0a4be3aafc8da208940f219d4e4df8a0db87d892cc42bb369071855c590",
+            "cabal_sha256": "7d16bf127fb303bd69d9c433bb146c5815f9690933af1d5a6ee45dea2e536dc5",
             "flags": [],
             "package": "directory",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "dc2785d6548cec2e80700fab007d3e9467f65d3c58ab3efa21b34d9017cf0efd",
             "version": "1.3.7.1"
@@ -102,16 +102,16 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.1"
+            "version": "3.10.3.0"
         },
         {
-            "cabal_sha256": "49d8a7f372d35363011591b253cae4c8db8b9ec594590448e20b7bed7acaee98",
+            "cabal_sha256": "8b4bce2749e4f61a440049e6088487003e8023c720e2019345e399d50888594f",
             "flags": [],
             "package": "process",
-            "revision": 0,
+            "revision": 2,
             "source": "hackage",
-            "src_sha256": "4c5c454e0f5c864c79b9fabd850307b26d8ac4037e45a6a39ab87e20b583bf06",
-            "version": "1.6.17.0"
+            "src_sha256": "aa5f4c4fe4974f89f5ab998c7509daa4bda3926cfb06daacd5eba892aad8a37e",
+            "version": "1.6.18.0"
         },
         {
             "cabal_sha256": null,
@@ -120,39 +120,39 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.1"
+            "version": "3.10.3.0"
         },
         {
-            "cabal_sha256": "d50e055f45bd09a8238200ec64ffa0f17492c32cdb5807487894388ce1c2f839",
+            "cabal_sha256": "e152cdb03243afb52bbc740cfbe96905ca298a6f6342f0c47b3f2e227ff19def",
             "flags": [
                 "-devel"
             ],
             "package": "network",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "b452a2afac95d9207357eb3820c719c7c7d27871ef4b6ed7bfcd03a036b9158e",
             "version": "3.1.4.0"
         },
         {
-            "cabal_sha256": "e5ae7c083ef3a22248558f8451669bb1c55ea8090f5908b86b9033743c161730",
+            "cabal_sha256": "f5f2c679ecc1c1b83d2d68db6cc564e5c78d53425e69e1b9e36784820e122d37",
             "flags": [],
             "package": "th-compat",
-            "revision": 2,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8",
             "version": "0.1.4"
         },
         {
-            "cabal_sha256": "1fde59abf5d82a9666b4415bc2b2e9e33f6c1309074fda12d50410c7dbd95f3b",
+            "cabal_sha256": "6fffb57373962b5651a2db8b0af732098b3bf029a7ced76a9855615de2026588",
             "flags": [],
             "package": "network-uri",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "9c188973126e893250b881f20e8811dca06c223c23402b06f7a1f2e995797228",
             "version": "2.6.4.2"
         },
         {
-            "cabal_sha256": "d9220cc1b8c1f287248d650910710b96e62e54530772e3bcd19dbdec6547f8ae",
+            "cabal_sha256": "0e37572590743e49d7a610f472e1618a594dc861410846f64d9f2347923c4f5b",
             "flags": [
                 "-conduit10",
                 "+network-uri",
@@ -160,22 +160,22 @@
                 "-warp-tests"
             ],
             "package": "HTTP",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
             "version": "4000.4.1"
         },
         {
-            "cabal_sha256": "2ef1bd3511e82ba56f7f23cd793dd2da84338a1e7c2cbea5b151417afe3baada",
+            "cabal_sha256": "ad89e28b2b046175698fbf542af2ce43e5d2af50aae9f48d12566b1bb3de1d3c",
             "flags": [],
             "package": "data-array-byte",
-            "revision": 1,
+            "revision": 2,
             "source": "hackage",
             "src_sha256": "1bb6eca0b3e02d057fe7f4e14c81ef395216f421ab30fdaa1b18017c9c025600",
             "version": "0.1.0.1"
         },
         {
-            "cabal_sha256": "585792335d5541dba78fa8dfcb291a89cd5812a281825ff7a44afa296ab5d58a",
+            "cabal_sha256": "f3bf68acfa0df7a064a378ef2cdcfeb55e6fb96100675f4c593556dcbf3d7194",
             "flags": [
                 "+integer-gmp",
                 "-random-initial-seed"
@@ -183,54 +183,54 @@
             "package": "hashable",
             "revision": 1,
             "source": "hackage",
-            "src_sha256": "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8",
-            "version": "1.4.2.0"
+            "src_sha256": "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5",
+            "version": "1.4.3.0"
         },
         {
-            "cabal_sha256": "46367dc0c8326dcbeb7b93f200b567491c2f6029bccf822b8bb26ee660397e08",
+            "cabal_sha256": "9b8ceefce014e490f9e1335fa5f511161309926c55d01cec795016f4363b5d2d",
             "flags": [
                 "-bench"
             ],
             "package": "async",
-            "revision": 3,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
             "version": "2.2.4"
         },
         {
-            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
+            "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd",
             "flags": [],
             "package": "base16-bytestring",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
             "version": "1.0.2.0"
         },
         {
-            "cabal_sha256": "50ec0e229255d4c45cbdd568da011311b8887f304b931564886016f4984334d8",
+            "cabal_sha256": "45305ccf8914c66d385b518721472c7b8c858f1986945377f74f85c1e0d49803",
             "flags": [],
             "package": "base64-bytestring",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
             "version": "1.2.1.0"
         },
         {
-            "cabal_sha256": "db25c2e17967aa6b6046ab8b1b96ba3f344ca59a62b60fb6113d51ea305a3d8e",
+            "cabal_sha256": "bac0ae8d46a04e410666b0c8081cff63f060f29157983b569ca86ddb6e6e0dc6",
             "flags": [
                 "-optimised-mixer"
             ],
             "package": "splitmix",
-            "revision": 2,
+            "revision": 0,
             "source": "hackage",
-            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
-            "version": "0.1.0.4"
+            "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002",
+            "version": "0.1.0.5"
         },
         {
-            "cabal_sha256": "dea1f11e5569332dc6c8efaad1cb301016a5587b6754943a49f9de08ae0e56d9",
+            "cabal_sha256": "e7c1f881159d5cc788619c9ee8b8f340ba2ff0db571cdf3d1a1968ebc5108789",
             "flags": [],
             "package": "random",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
             "version": "1.2.1.1"
@@ -255,16 +255,16 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.3.0"
         },
         {
-            "cabal_sha256": "72ce9095872eae653addca5f412ac8070d6282d8e1c8578c2237c33f2cbbf4bc",
+            "cabal_sha256": "03db065161987f614a3a2bbcd16264f78e47efe231fb5bd161be2043eaf20488",
             "flags": [
                 "-exe",
                 "+use-cbits"
             ],
             "package": "cryptohash-sha256",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
             "version": "0.11.102.1"
@@ -281,7 +281,7 @@
             "version": "0.1.4"
         },
         {
-            "cabal_sha256": "3db04d7c18b9e68ba5eef3fa7eeca05e1e248958dd182290c8e6b010c81ef73e",
+            "cabal_sha256": "48383789821af5cc624498f3ee1d0939a070cda9468c0bfe63c951736be81c75",
             "flags": [
                 "+no-donna",
                 "+test-doctests",
@@ -289,49 +289,49 @@
                 "+test-properties"
             ],
             "package": "ed25519",
-            "revision": 7,
+            "revision": 8,
             "source": "hackage",
             "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
             "version": "0.0.5.0"
         },
         {
-            "cabal_sha256": "9ab54ee4f80bbd8a3fddd639ea142b7039ee2deb27f7df031a93de1819e34146",
+            "cabal_sha256": "17786545dce60c4d5783ba6125c0a6499a1abddd3d7417b15500ccd767c35f07",
             "flags": [
                 "+ofd-locking"
             ],
             "package": "lukko",
-            "revision": 4,
+            "revision": 5,
             "source": "hackage",
             "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
             "version": "0.1.1.3"
         },
         {
-            "cabal_sha256": "63dbcb0f507273a8331363e4c13a1fe91f4ea0c495883cf65f314629582a2630",
+            "cabal_sha256": "aaf5dd3ef327aaf203b1cb199760efd463fac2256453dd0e05d5cd707cdbd6e1",
             "flags": [
                 "-old-bytestring",
                 "-old-time"
             ],
             "package": "tar",
-            "revision": 6,
+            "revision": 10,
             "source": "hackage",
             "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "version": "0.5.1.1"
         },
         {
-            "cabal_sha256": "9adce39e4ca0b7a87d45df0a243134816c57059a08e28cff5469c98ae1f54dfc",
+            "cabal_sha256": "19eb7759af71957811d5ec10ddb1e2f4c98700ddb9c0da6860c0441d811f0e6d",
             "flags": [
                 "-bundled-c-zlib",
                 "-non-blocking-ffi",
                 "-pkg-config"
             ],
             "package": "zlib",
-            "revision": 1,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
             "version": "0.6.3.0"
         },
         {
-            "cabal_sha256": "5b225c2d82f0b8f4168a6124840bae353e6b462b90fd1e07c846211ae9bcb5ed",
+            "cabal_sha256": "2b2e560ac449e49f86a10d79957b2409da5be4b77edabd7425696780334cf3bf",
             "flags": [
                 "+base48",
                 "+cabal-syntax",
@@ -341,48 +341,48 @@
                 "+use-network-uri"
             ],
             "package": "hackage-security",
-            "revision": 3,
+            "revision": 8,
             "source": "hackage",
             "src_sha256": "52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066",
             "version": "0.6.2.3"
         },
         {
-            "cabal_sha256": "4ff4425c710cddf440dfbac6cd52310bb6b23e17902390ff71c9fc7eaafc4fcc",
+            "cabal_sha256": "0322b2fcd1358f3355e0c8608efa60d27b14d1c9d476451dbcb9181363bd8b27",
             "flags": [],
             "package": "regex-base",
-            "revision": 1,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
             "version": "0.94.0.2"
         },
         {
-            "cabal_sha256": "9dbba4b65a3bb6975d9740814be5593c6b2d2d6a0b3febc8ec940edb9a9bbdf4",
+            "cabal_sha256": "816d6acc560cb86672f347a7bef8129578dde26ed760f9e79b4976ed9bd7b9fd",
             "flags": [
                 "-_regex-posix-clib"
             ],
             "package": "regex-posix",
-            "revision": 1,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
             "version": "0.96.0.1"
         },
         {
-            "cabal_sha256": "a1f7edb255edae85ccb9d8001b26fea760f846aee0c6302b177eb59d613214e2",
+            "cabal_sha256": "4868265ab5760d2fdeb96625b138c8df25d41b9ee2651fa299ed019a69403045",
             "flags": [],
             "package": "resolv",
-            "revision": 6,
+            "revision": 3,
             "source": "hackage",
-            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
-            "version": "0.1.2.0"
+            "src_sha256": "880d283df9132a7375fa28670f71e86480a4f49972256dc2a204c648274ae74b",
+            "version": "0.2.0.2"
         },
         {
-            "cabal_sha256": "6e9b1b233af80cc0aa17ea858d2641ba146fb11cbcc5970a52649e89d77282e2",
+            "cabal_sha256": "8bb7261bd54bd58acfcb154be6a161fb6d0d31a1852aadc8e927d2ad2d7651d1",
             "flags": [],
             "package": "safe-exceptions",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
-            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
-            "version": "0.1.7.3"
+            "src_sha256": "3c51d8d50c9b60ff8bf94f942fd92e3bea9e62c5afa778dfc9f707b79da41ef6",
+            "version": "0.1.7.4"
         },
         {
             "cabal_sha256": null,
@@ -394,7 +394,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.1"
+            "version": "3.10.3.0"
         }
     ]
 }
diff --git a/bootstrap/linux-9.4.5.json b/bootstrap/linux-9.4.8.json
similarity index 75%
rename from bootstrap/linux-9.4.5.json
rename to bootstrap/linux-9.4.8.json
index 0302f82e5b6..914b2ee43c4 100644
--- a/bootstrap/linux-9.4.5.json
+++ b/bootstrap/linux-9.4.8.json
@@ -6,7 +6,7 @@
         },
         {
             "package": "ghc-prim",
-            "version": "0.9.0"
+            "version": "0.9.1"
         },
         {
             "package": "ghc-bignum",
@@ -14,7 +14,7 @@
         },
         {
             "package": "base",
-            "version": "4.17.1.0"
+            "version": "4.17.2.1"
         },
         {
             "package": "array",
@@ -26,7 +26,7 @@
         },
         {
             "package": "ghc-boot-th",
-            "version": "9.4.5"
+            "version": "9.4.8"
         },
         {
             "package": "pretty",
@@ -38,7 +38,7 @@
         },
         {
             "package": "bytestring",
-            "version": "0.11.4.0"
+            "version": "0.11.5.3"
         },
         {
             "package": "containers",
@@ -82,7 +82,7 @@
         },
         {
             "package": "process",
-            "version": "1.6.16.0"
+            "version": "1.6.18.0"
         },
         {
             "package": "stm",
@@ -101,7 +101,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.1"
+            "version": "3.10.3.0"
         },
         {
             "cabal_sha256": null,
@@ -110,39 +110,39 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.1"
+            "version": "3.10.3.0"
         },
         {
-            "cabal_sha256": "d50e055f45bd09a8238200ec64ffa0f17492c32cdb5807487894388ce1c2f839",
+            "cabal_sha256": "e152cdb03243afb52bbc740cfbe96905ca298a6f6342f0c47b3f2e227ff19def",
             "flags": [
                 "-devel"
             ],
             "package": "network",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "b452a2afac95d9207357eb3820c719c7c7d27871ef4b6ed7bfcd03a036b9158e",
             "version": "3.1.4.0"
         },
         {
-            "cabal_sha256": "e5ae7c083ef3a22248558f8451669bb1c55ea8090f5908b86b9033743c161730",
+            "cabal_sha256": "f5f2c679ecc1c1b83d2d68db6cc564e5c78d53425e69e1b9e36784820e122d37",
             "flags": [],
             "package": "th-compat",
-            "revision": 2,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "d8f97ac14ab47b6b8a7b0fdb4ff95426322ec56badd01652ac15da4a44d4bab8",
             "version": "0.1.4"
         },
         {
-            "cabal_sha256": "1fde59abf5d82a9666b4415bc2b2e9e33f6c1309074fda12d50410c7dbd95f3b",
+            "cabal_sha256": "6fffb57373962b5651a2db8b0af732098b3bf029a7ced76a9855615de2026588",
             "flags": [],
             "package": "network-uri",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "9c188973126e893250b881f20e8811dca06c223c23402b06f7a1f2e995797228",
             "version": "2.6.4.2"
         },
         {
-            "cabal_sha256": "d9220cc1b8c1f287248d650910710b96e62e54530772e3bcd19dbdec6547f8ae",
+            "cabal_sha256": "0e37572590743e49d7a610f472e1618a594dc861410846f64d9f2347923c4f5b",
             "flags": [
                 "-conduit10",
                 "+network-uri",
@@ -150,13 +150,13 @@
                 "-warp-tests"
             ],
             "package": "HTTP",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "df31d8efec775124dab856d7177ddcba31be9f9e0836ebdab03d94392f2dd453",
             "version": "4000.4.1"
         },
         {
-            "cabal_sha256": "585792335d5541dba78fa8dfcb291a89cd5812a281825ff7a44afa296ab5d58a",
+            "cabal_sha256": "f3bf68acfa0df7a064a378ef2cdcfeb55e6fb96100675f4c593556dcbf3d7194",
             "flags": [
                 "+integer-gmp",
                 "-random-initial-seed"
@@ -164,54 +164,54 @@
             "package": "hashable",
             "revision": 1,
             "source": "hackage",
-            "src_sha256": "1b4000ea82b81f69d46d0af4152c10c6303873510738e24cfc4767760d30e3f8",
-            "version": "1.4.2.0"
+            "src_sha256": "32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5",
+            "version": "1.4.3.0"
         },
         {
-            "cabal_sha256": "46367dc0c8326dcbeb7b93f200b567491c2f6029bccf822b8bb26ee660397e08",
+            "cabal_sha256": "9b8ceefce014e490f9e1335fa5f511161309926c55d01cec795016f4363b5d2d",
             "flags": [
                 "-bench"
             ],
             "package": "async",
-            "revision": 3,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "484df85be0e76c4fed9376451e48e1d0c6e97952ce79735b72d54297e7e0a725",
             "version": "2.2.4"
         },
         {
-            "cabal_sha256": "64abad7816ab8cabed8489e29f807b3a6f828e0b2cec0eae404323d69d36df9a",
+            "cabal_sha256": "a694e88f9ec9fc79f0b03f233d3fea592b68f70a34aac2ddb5bcaecb6562e2fd",
             "flags": [],
             "package": "base16-bytestring",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "1d5a91143ef0e22157536093ec8e59d226a68220ec89378d5dcaeea86472c784",
             "version": "1.0.2.0"
         },
         {
-            "cabal_sha256": "50ec0e229255d4c45cbdd568da011311b8887f304b931564886016f4984334d8",
+            "cabal_sha256": "45305ccf8914c66d385b518721472c7b8c858f1986945377f74f85c1e0d49803",
             "flags": [],
             "package": "base64-bytestring",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "fbf8ed30edde271eb605352021431d8f1b055f95a56af31fe2eacf6bdfdc49c9",
             "version": "1.2.1.0"
         },
         {
-            "cabal_sha256": "db25c2e17967aa6b6046ab8b1b96ba3f344ca59a62b60fb6113d51ea305a3d8e",
+            "cabal_sha256": "bac0ae8d46a04e410666b0c8081cff63f060f29157983b569ca86ddb6e6e0dc6",
             "flags": [
                 "-optimised-mixer"
             ],
             "package": "splitmix",
-            "revision": 2,
+            "revision": 0,
             "source": "hackage",
-            "src_sha256": "6d065402394e7a9117093dbb4530a21342c9b1e2ec509516c8a8d0ffed98ecaa",
-            "version": "0.1.0.4"
+            "src_sha256": "9df07a9611ef45f1b1258a0b412f4d02c920248f69d2e2ce8ccda328f7e13002",
+            "version": "0.1.0.5"
         },
         {
-            "cabal_sha256": "dea1f11e5569332dc6c8efaad1cb301016a5587b6754943a49f9de08ae0e56d9",
+            "cabal_sha256": "e7c1f881159d5cc788619c9ee8b8f340ba2ff0db571cdf3d1a1968ebc5108789",
             "flags": [],
             "package": "random",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
             "src_sha256": "3e1272f7ed6a4d7bd1712b90143ec326fee9b225789222379fea20a9c90c9b76",
             "version": "1.2.1.1"
@@ -236,16 +236,16 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.1.0"
+            "version": "3.10.3.0"
         },
         {
-            "cabal_sha256": "72ce9095872eae653addca5f412ac8070d6282d8e1c8578c2237c33f2cbbf4bc",
+            "cabal_sha256": "03db065161987f614a3a2bbcd16264f78e47efe231fb5bd161be2043eaf20488",
             "flags": [
                 "-exe",
                 "+use-cbits"
             ],
             "package": "cryptohash-sha256",
-            "revision": 2,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "73a7dc7163871a80837495039a099967b11f5c4fe70a118277842f7a713c6bf6",
             "version": "0.11.102.1"
@@ -262,7 +262,7 @@
             "version": "0.1.4"
         },
         {
-            "cabal_sha256": "3db04d7c18b9e68ba5eef3fa7eeca05e1e248958dd182290c8e6b010c81ef73e",
+            "cabal_sha256": "48383789821af5cc624498f3ee1d0939a070cda9468c0bfe63c951736be81c75",
             "flags": [
                 "+no-donna",
                 "+test-doctests",
@@ -270,49 +270,49 @@
                 "+test-properties"
             ],
             "package": "ed25519",
-            "revision": 7,
+            "revision": 8,
             "source": "hackage",
             "src_sha256": "d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d",
             "version": "0.0.5.0"
         },
         {
-            "cabal_sha256": "9ab54ee4f80bbd8a3fddd639ea142b7039ee2deb27f7df031a93de1819e34146",
+            "cabal_sha256": "17786545dce60c4d5783ba6125c0a6499a1abddd3d7417b15500ccd767c35f07",
             "flags": [
                 "+ofd-locking"
             ],
             "package": "lukko",
-            "revision": 4,
+            "revision": 5,
             "source": "hackage",
             "src_sha256": "a80efb60cfa3dae18682c01980d76d5f7e413e191cd186992e1bf7388d48ab1f",
             "version": "0.1.1.3"
         },
         {
-            "cabal_sha256": "63dbcb0f507273a8331363e4c13a1fe91f4ea0c495883cf65f314629582a2630",
+            "cabal_sha256": "aaf5dd3ef327aaf203b1cb199760efd463fac2256453dd0e05d5cd707cdbd6e1",
             "flags": [
                 "-old-bytestring",
                 "-old-time"
             ],
             "package": "tar",
-            "revision": 6,
+            "revision": 10,
             "source": "hackage",
             "src_sha256": "b384449f62b2b0aa3e6d2cb1004b8060b01f21ec93e7b63e7af6d8fad8a9f1de",
             "version": "0.5.1.1"
         },
         {
-            "cabal_sha256": "9adce39e4ca0b7a87d45df0a243134816c57059a08e28cff5469c98ae1f54dfc",
+            "cabal_sha256": "19eb7759af71957811d5ec10ddb1e2f4c98700ddb9c0da6860c0441d811f0e6d",
             "flags": [
                 "-bundled-c-zlib",
                 "-non-blocking-ffi",
                 "-pkg-config"
             ],
             "package": "zlib",
-            "revision": 1,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "9eaa989ad4534438b5beb51c1d3a4c8f6a088fdff0b259a5394fbf39aaee04da",
             "version": "0.6.3.0"
         },
         {
-            "cabal_sha256": "5b225c2d82f0b8f4168a6124840bae353e6b462b90fd1e07c846211ae9bcb5ed",
+            "cabal_sha256": "2b2e560ac449e49f86a10d79957b2409da5be4b77edabd7425696780334cf3bf",
             "flags": [
                 "+base48",
                 "+cabal-syntax",
@@ -322,48 +322,48 @@
                 "+use-network-uri"
             ],
             "package": "hackage-security",
-            "revision": 3,
+            "revision": 8,
             "source": "hackage",
             "src_sha256": "52ee0576971955571d846b8e6c09638f89f4f7881f4a95173e44ccc0d856a066",
             "version": "0.6.2.3"
         },
         {
-            "cabal_sha256": "4ff4425c710cddf440dfbac6cd52310bb6b23e17902390ff71c9fc7eaafc4fcc",
+            "cabal_sha256": "0322b2fcd1358f3355e0c8608efa60d27b14d1c9d476451dbcb9181363bd8b27",
             "flags": [],
             "package": "regex-base",
-            "revision": 1,
+            "revision": 4,
             "source": "hackage",
             "src_sha256": "7b99408f580f5bb67a1c413e0bc735886608251331ad36322020f2169aea2ef1",
             "version": "0.94.0.2"
         },
         {
-            "cabal_sha256": "9dbba4b65a3bb6975d9740814be5593c6b2d2d6a0b3febc8ec940edb9a9bbdf4",
+            "cabal_sha256": "816d6acc560cb86672f347a7bef8129578dde26ed760f9e79b4976ed9bd7b9fd",
             "flags": [
                 "-_regex-posix-clib"
             ],
             "package": "regex-posix",
-            "revision": 1,
+            "revision": 3,
             "source": "hackage",
             "src_sha256": "c7827c391919227711e1cff0a762b1678fd8739f9c902fc183041ff34f59259c",
             "version": "0.96.0.1"
         },
         {
-            "cabal_sha256": "a1f7edb255edae85ccb9d8001b26fea760f846aee0c6302b177eb59d613214e2",
+            "cabal_sha256": "4868265ab5760d2fdeb96625b138c8df25d41b9ee2651fa299ed019a69403045",
             "flags": [],
             "package": "resolv",
-            "revision": 6,
+            "revision": 3,
             "source": "hackage",
-            "src_sha256": "81a2bafad484db123cf8d17a02d98bb388a127fd0f822fa022589468a0e64671",
-            "version": "0.1.2.0"
+            "src_sha256": "880d283df9132a7375fa28670f71e86480a4f49972256dc2a204c648274ae74b",
+            "version": "0.2.0.2"
         },
         {
-            "cabal_sha256": "6e9b1b233af80cc0aa17ea858d2641ba146fb11cbcc5970a52649e89d77282e2",
+            "cabal_sha256": "8bb7261bd54bd58acfcb154be6a161fb6d0d31a1852aadc8e927d2ad2d7651d1",
             "flags": [],
             "package": "safe-exceptions",
-            "revision": 0,
+            "revision": 1,
             "source": "hackage",
-            "src_sha256": "91ce28d8f8a6efd31788d4827ed5cdcb9a546ad4053a86c56f7947c66a30b5bf",
-            "version": "0.1.7.3"
+            "src_sha256": "3c51d8d50c9b60ff8bf94f942fd92e3bea9e62c5afa778dfc9f707b79da41ef6",
+            "version": "0.1.7.4"
         },
         {
             "cabal_sha256": null,
@@ -375,7 +375,7 @@
             "revision": null,
             "source": "local",
             "src_sha256": null,
-            "version": "3.10.2.1"
+            "version": "3.10.3.0"
         }
     ]
 }
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index f0a71911b29..29c733c61be 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.2
 name:          cabal-install-solver
-version:       3.10.2.1
+version:       3.10.3.0
 synopsis:      The command-line interface for Cabal and Hackage.
 description:
   The solver component used in cabal-install command-line program
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index 00119fea4bc..f843033259a 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -1,7 +1,7 @@
 Cabal-Version:      2.2
 
 Name:               cabal-install
-Version:            3.10.2.1
+Version:            3.10.3.0
 Synopsis:           The command-line interface for Cabal and Hackage.
 Description:
     The \'cabal\' command-line program simplifies the process of managing
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index da6b49c3ef6..056502af4b1 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -28,8 +28,8 @@ common shared
   build-depends:
     , base >= 4.9 && <4.20
     -- this needs to match the in-tree lib:Cabal version
-    , Cabal ^>= 3.10.2.1
-    , Cabal-syntax ^>= 3.10.2.0
+    , Cabal ^>= 3.10.3.0
+    , Cabal-syntax ^>= 3.10.3.0
 
   ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
 
@@ -115,6 +115,6 @@ custom-setup
   -- and due to Custom complexity and ConstraintSetupCabalMaxVersion
   -- it has to be the latest release version plus
   -- you have to use the latest cabal-install release
-  setup-depends: Cabal == 3.10.2.1,
-                 Cabal-syntax == 3.10.2.0,
+  setup-depends: Cabal == 3.10.3.0,
+                 Cabal-syntax == 3.10.3.0,
                  base, filepath, directory
diff --git a/doc/conf.py b/doc/conf.py
index 4d4161ed809..a7f63111174 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -13,7 +13,7 @@
 sys.path.insert(0, os.path.abspath('.'))
 import cabaldomain
 
-version = "3.10.2.1"
+version = "3.10.3.0"
 
 extensions = [
     'sphinx.ext.extlinks',

From b333a7e36e39cead61eed94d437c72fbd3dce459 Mon Sep 17 00:00:00 2001
From: Francesco Ariis <fa-ml@ariis.it>
Date: Fri, 1 Mar 2024 10:29:23 +0100
Subject: [PATCH 126/144] Update .cabal files

`extra-doc-files` and `no-autogen-paths` warnings.

(cherry picked from commit 28daab12b85a2d9de80486d272a8176ed0d92d7b)
---
 Cabal-syntax/Cabal-syntax.cabal                 | 2 +-
 Cabal/Cabal.cabal                               | 2 +-
 cabal-install-solver/cabal-install-solver.cabal | 2 +-
 cabal-install/cabal-install.cabal               | 5 ++++-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal
index cb943ac4295..ae63957eebd 100644
--- a/Cabal-syntax/Cabal-syntax.cabal
+++ b/Cabal-syntax/Cabal-syntax.cabal
@@ -15,7 +15,7 @@ description:
 category:       Distribution
 build-type:     Simple
 
-extra-source-files:
+extra-doc-files:
   README.md ChangeLog.md
 
 source-repository head
diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal
index 29ec0efcbac..5acc930e475 100644
--- a/Cabal/Cabal.cabal
+++ b/Cabal/Cabal.cabal
@@ -21,7 +21,7 @@ build-type:     Simple
 -- If we use a new Cabal feature, this needs to be changed to Custom so
 -- we can bootstrap.
 
-extra-source-files:
+extra-doc-files:
   README.md ChangeLog.md
 
 source-repository head
diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index 29c733c61be..85cebe70d6d 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -14,7 +14,7 @@ maintainer:    Cabal Development Team <cabal-devel@haskell.org>
 copyright:     2003-2023, Cabal Development Team
 category:      Distribution
 build-type:    Simple
-Extra-Source-Files:
+extra-doc-files:
   ChangeLog.md
 
 source-repository head
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
index f843033259a..5110e6a3c20 100644
--- a/cabal-install/cabal-install.cabal
+++ b/cabal-install/cabal-install.cabal
@@ -17,8 +17,9 @@ Copyright:          2003-2023, Cabal Development Team
 Category:           Distribution
 Build-type:         Simple
 Extra-Source-Files:
-  README.md
   bash-completion/cabal
+extra-doc-files:
+  README.md
   changelog
 
 source-repository head
@@ -65,6 +66,8 @@ library
     default-extensions: TypeOperators
 
     hs-source-dirs:   src
+    autogen-modules:
+        Paths_cabal_install
     other-modules:
         Paths_cabal_install
     exposed-modules:

From ce72f63b6565e692727d21f0a987d92dd67b14db Mon Sep 17 00:00:00 2001
From: Rodrigo Mesquita <rodrigo.m.mesquita@gmail.com>
Date: Mon, 11 Mar 2024 12:23:34 +0000
Subject: [PATCH 127/144] backport: Find build-tool installed programs before
 programs in path (#9767)

* Find build-tool installed programs before programs in path (BP)

A backport of 443c8906581e4a985185a9a32de2e6c7cc63dde1 (#9762)

---------

Co-authored-by: brandon s allbery kf8nh <allbery.b@gmail.com>
Co-authored-by: Gershom Bazerman <gershom@arista.com>
---
 Cabal/src/Distribution/Simple/Configure.hs    |  6 +++--
 .../Distribution/Client/ProjectPlanning.hs    |  5 +++-
 .../PackageTests/Regression/T9756/OK.hs       | 14 ++++++++++
 .../T9756/cabal-bug-build-tool.cabal          | 10 +++++++
 .../PackageTests/Regression/T9756/cabal.out   | 27 +++++++++++++++++++
 .../Regression/T9756/cabal.project            |  1 +
 .../Regression/T9756/cabal.test.hs            | 13 +++++++++
 .../T9756/repo/mybuilder-0.1.0.0/CHANGELOG.md |  5 ++++
 .../T9756/repo/mybuilder-0.1.0.0/app/Main.hs  |  4 +++
 .../repo/mybuilder-0.1.0.0/mybuilder.cabal    | 18 +++++++++++++
 .../T9756/repo/mybuilder-0.2.0.0/CHANGELOG.md |  5 ++++
 .../T9756/repo/mybuilder-0.2.0.0/app/Main.hs  |  4 +++
 .../repo/mybuilder-0.2.0.0/mybuilder.cabal    | 18 +++++++++++++
 13 files changed, 127 insertions(+), 3 deletions(-)
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9756/OK.hs
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9756/cabal-bug-build-tool.cabal
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9756/cabal.out
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9756/cabal.project
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9756/cabal.test.hs
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.1.0.0/CHANGELOG.md
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.1.0.0/app/Main.hs
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.1.0.0/mybuilder.cabal
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.2.0.0/CHANGELOG.md
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.2.0.0/app/Main.hs
 create mode 100644 cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.2.0.0/mybuilder.cabal

diff --git a/Cabal/src/Distribution/Simple/Configure.hs b/Cabal/src/Distribution/Simple/Configure.hs
index 35f38a75a8a..74daa6660ac 100644
--- a/Cabal/src/Distribution/Simple/Configure.hs
+++ b/Cabal/src/Distribution/Simple/Configure.hs
@@ -76,7 +76,7 @@ import Distribution.Simple.Program
 import Distribution.Simple.Setup as Setup
 import Distribution.Simple.BuildTarget
 import Distribution.Simple.LocalBuildInfo
-import Distribution.Simple.Program.Db (appendProgramSearchPath)
+import Distribution.Simple.Program.Db (appendProgramSearchPath, modifyProgramSearchPath)
 import Distribution.Simple.Utils
 import Distribution.System
 import Distribution.Types.PackageVersionConstraint
@@ -850,7 +850,9 @@ configure (pkg_descr0, pbi) cfg = do
 -- arguments.
 mkProgramDb :: ConfigFlags -> ProgramDb -> IO ProgramDb
 mkProgramDb cfg initialProgramDb = do
-  programDb <- appendProgramSearchPath (fromFlagOrDefault normal (configVerbosity cfg)) searchpath initialProgramDb
+  programDb <-
+    modifyProgramSearchPath (getProgramSearchPath initialProgramDb ++)
+      <$> appendProgramSearchPath (fromFlagOrDefault normal (configVerbosity cfg)) searchpath initialProgramDb
   pure
     . userSpecifyArgss (configProgramArgs cfg)
     . userSpecifyPaths (configProgramPaths cfg)
diff --git a/cabal-install/src/Distribution/Client/ProjectPlanning.hs b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
index 2126c942803..395e5e9dcb3 100644
--- a/cabal-install/src/Distribution/Client/ProjectPlanning.hs
+++ b/cabal-install/src/Distribution/Client/ProjectPlanning.hs
@@ -3394,7 +3394,10 @@ setupHsScriptOptions (ReadyPackage elab@ElaboratedConfiguredPackage{..})
       useDistPref              = builddir,
       useLoggingHandle         = Nothing, -- this gets set later
       useWorkingDir            = Just srcdir,
-      useExtraPathEnv          = elabExeDependencyPaths elab,
+      useExtraPathEnv = elabExeDependencyPaths elab ++ elabProgramPathExtra,
+        -- note that the above adds the extra-prog-path directly following the elaborated
+        -- dep paths, so that it overrides the normal path, but _not_ the elaborated extensions
+        -- for build-tools-depends.
       useExtraEnvOverrides     = dataDirsEnvironmentForPlan distdir plan,
       useWin32CleanHack        = False,   --TODO: [required eventually]
       forceExternalSetupMethod = isParallelBuild,
diff --git a/cabal-testsuite/PackageTests/Regression/T9756/OK.hs b/cabal-testsuite/PackageTests/Regression/T9756/OK.hs
new file mode 100644
index 00000000000..1846f8c9d0e
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9756/OK.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE TemplateHaskell #-}
+module OK where
+
+import Data.List
+import System.Process
+import Language.Haskell.TH
+
+$(do
+    out <- runIO $ readProcess "mybuilder" [] ""
+    if "0.2.0.0" `isInfixOf` out then
+       [d| x = () |]
+    else
+      error ("Expecting Version 0.2.0.0, but got: " ++ out)
+ )
diff --git a/cabal-testsuite/PackageTests/Regression/T9756/cabal-bug-build-tool.cabal b/cabal-testsuite/PackageTests/Regression/T9756/cabal-bug-build-tool.cabal
new file mode 100644
index 00000000000..941ac8fbca6
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9756/cabal-bug-build-tool.cabal
@@ -0,0 +1,10 @@
+cabal-version:  1.12
+name:           cabal-bug-build-tool
+version:        0
+build-type:     Simple
+
+library
+  exposed-modules:  OK
+  default-language: Haskell2010
+  build-depends:    base, template-haskell, process
+  build-tool-depends: mybuilder:mybuilder >=0.2.0.0
diff --git a/cabal-testsuite/PackageTests/Regression/T9756/cabal.out b/cabal-testsuite/PackageTests/Regression/T9756/cabal.out
new file mode 100644
index 00000000000..e00a7105944
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9756/cabal.out
@@ -0,0 +1,27 @@
+# cabal v2-update
+Downloading the latest package list from test-local-repo
+# cabal v2-install
+Resolving dependencies...
+Build profile: -w ghc-<GHCVER> -O1
+In order, the following will be built:
+ - mybuilder-0.1.0.0 (exe:mybuilder) (requires build)
+Configuring executable 'mybuilder' for mybuilder-0.1.0.0..
+Preprocessing executable 'mybuilder' for mybuilder-0.1.0.0..
+Building executable 'mybuilder' for mybuilder-0.1.0.0..
+Installing executable mybuilder in <PATH>
+Warning: The directory <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>/incoming/new-<RAND><ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>/<PACKAGE>-<HASH>/bin is not in the system search path.
+Symlinking 'mybuilder' to '<ROOT>/cabal.dist/install/mybuilder'
+# cabal v2-build
+Resolving dependencies...
+Build profile: -w ghc-<GHCVER> -O1
+In order, the following will be built:
+ - mybuilder-0.2.0.0 (exe:mybuilder) (requires build)
+ - cabal-bug-build-tool-0 (lib) (first run)
+Configuring executable 'mybuilder' for mybuilder-0.2.0.0..
+Preprocessing executable 'mybuilder' for mybuilder-0.2.0.0..
+Building executable 'mybuilder' for mybuilder-0.2.0.0..
+Installing executable mybuilder in <PATH>
+Warning: The directory <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>/incoming/new-<RAND><ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>/<PACKAGE>-<HASH>/bin is not in the system search path.
+Configuring library for cabal-bug-build-tool-0..
+Preprocessing library for cabal-bug-build-tool-0..
+Building library for cabal-bug-build-tool-0..
diff --git a/cabal-testsuite/PackageTests/Regression/T9756/cabal.project b/cabal-testsuite/PackageTests/Regression/T9756/cabal.project
new file mode 100644
index 00000000000..e6fdbadb439
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9756/cabal.project
@@ -0,0 +1 @@
+packages: .
diff --git a/cabal-testsuite/PackageTests/Regression/T9756/cabal.test.hs b/cabal-testsuite/PackageTests/Regression/T9756/cabal.test.hs
new file mode 100644
index 00000000000..65b1acb5b70
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9756/cabal.test.hs
@@ -0,0 +1,13 @@
+import Test.Cabal.Prelude
+
+-- We are testing if the build-tools program is found in path before programs e.g. in extra-prog-path or the system path
+-- For that, we need
+--  * A repo with a build tool that is up to date
+--  * An older version of the build tool in the extra-prog-path
+--  * A project that requires the more up-to-date version of the build-tool
+
+main = cabalTest $ withRepo "repo" $ do
+  dir <- testWorkDir <$> getTestEnv
+  cabal "v2-install" ["mybuilder-0.1.0.0", "--installdir=" ++ dir ++ "/install", "--overwrite-policy=always"]
+  cabal "v2-build" ["cabal-bug-build-tool", "--extra-prog-path=" ++ dir ++ "/install"]
+
diff --git a/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.1.0.0/CHANGELOG.md b/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.1.0.0/CHANGELOG.md
new file mode 100644
index 00000000000..60a3351b163
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.1.0.0/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Revision history for mybuilder0100
+
+## 0.1.0.0 -- YYYY-mm-dd
+
+* First version. Released on an unsuspecting world.
diff --git a/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.1.0.0/app/Main.hs b/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.1.0.0/app/Main.hs
new file mode 100644
index 00000000000..7de3bfe00bb
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.1.0.0/app/Main.hs
@@ -0,0 +1,4 @@
+module Main where
+
+main :: IO ()
+main = putStrLn "0.1.0.0"
diff --git a/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.1.0.0/mybuilder.cabal b/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.1.0.0/mybuilder.cabal
new file mode 100644
index 00000000000..0649d81c4e0
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.1.0.0/mybuilder.cabal
@@ -0,0 +1,18 @@
+cabal-version:   3.0
+name:            mybuilder
+version:         0.1.0.0
+license:         NONE
+author:          Rodrigo Mesquita
+maintainer:      rodrigo.m.mesquita@gmail.com
+build-type:      Simple
+extra-doc-files: CHANGELOG.md
+
+common warnings
+    ghc-options: -Wall
+
+executable mybuilder
+    import:           warnings
+    main-is:          Main.hs
+    build-depends:    base
+    hs-source-dirs:   app
+    default-language: Haskell2010
diff --git a/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.2.0.0/CHANGELOG.md b/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.2.0.0/CHANGELOG.md
new file mode 100644
index 00000000000..60a3351b163
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.2.0.0/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Revision history for mybuilder0100
+
+## 0.1.0.0 -- YYYY-mm-dd
+
+* First version. Released on an unsuspecting world.
diff --git a/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.2.0.0/app/Main.hs b/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.2.0.0/app/Main.hs
new file mode 100644
index 00000000000..3550f30bd2f
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.2.0.0/app/Main.hs
@@ -0,0 +1,4 @@
+module Main where
+
+main :: IO ()
+main = putStrLn "0.2.0.0"
diff --git a/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.2.0.0/mybuilder.cabal b/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.2.0.0/mybuilder.cabal
new file mode 100644
index 00000000000..c98f493aa14
--- /dev/null
+++ b/cabal-testsuite/PackageTests/Regression/T9756/repo/mybuilder-0.2.0.0/mybuilder.cabal
@@ -0,0 +1,18 @@
+cabal-version:   3.0
+name:            mybuilder
+version:         0.2.0.0
+license:         NONE
+author:          Rodrigo Mesquita
+maintainer:      rodrigo.m.mesquita@gmail.com
+build-type:      Simple
+extra-doc-files: CHANGELOG.md
+
+common warnings
+    ghc-options: -Wall
+
+executable mybuilder
+    import:           warnings
+    main-is:          Main.hs
+    build-depends:    base
+    hs-source-dirs:   app
+    default-language: Haskell2010

From 256f85d735310196d437ede86046f2a86efedc6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9cate=20Moonlight?=
 <Kleidukos@users.noreply.github.com>
Date: Tue, 12 Mar 2024 09:15:46 +0100
Subject: [PATCH 128/144] Backport of #9443 "Use linker capability detection to
 improve linker use" (#9797)

---
 Cabal/src/Distribution/Simple/Configure.hs    | 53 +++++++++----------
 Cabal/src/Distribution/Simple/GHC/Internal.hs |  4 +-
 .../Distribution/Simple/Program/Builtin.hs    | 44 +++++++++++++--
 Cabal/src/Distribution/Simple/Program/Db.hs   |  6 ++-
 changelog.d/pr-9443                           | 11 ++++
 5 files changed, 83 insertions(+), 35 deletions(-)
 create mode 100644 changelog.d/pr-9443

diff --git a/Cabal/src/Distribution/Simple/Configure.hs b/Cabal/src/Distribution/Simple/Configure.hs
index 74daa6660ac..bc8e5f5d289 100644
--- a/Cabal/src/Distribution/Simple/Configure.hs
+++ b/Cabal/src/Distribution/Simple/Configure.hs
@@ -76,7 +76,7 @@ import Distribution.Simple.Program
 import Distribution.Simple.Setup as Setup
 import Distribution.Simple.BuildTarget
 import Distribution.Simple.LocalBuildInfo
-import Distribution.Simple.Program.Db (appendProgramSearchPath, modifyProgramSearchPath)
+import Distribution.Simple.Program.Db (appendProgramSearchPath, modifyProgramSearchPath, lookupProgramByName)
 import Distribution.Simple.Utils
 import Distribution.System
 import Distribution.Types.PackageVersionConstraint
@@ -102,7 +102,8 @@ import qualified Distribution.Simple.HaskellSuite as HaskellSuite
 import Control.Exception
     ( try )
 import Distribution.Utils.Structured ( structuredDecodeOrFailIO, structuredEncode )
-import Distribution.Compat.Directory ( listDirectory )
+import Distribution.Compat.Directory
+    ( listDirectory, doesPathExist )
 import Data.ByteString.Lazy          ( ByteString )
 import qualified Data.ByteString            as BS
 import qualified Data.ByteString.Lazy.Char8 as BLC8
@@ -115,8 +116,6 @@ import System.Directory
     , getTemporaryDirectory, removeFile)
 import System.FilePath
     ( (</>), isAbsolute, takeDirectory )
-import Distribution.Compat.Directory
-    ( doesPathExist )
 import qualified System.Info
     ( compilerName, compilerVersion )
 import System.IO
@@ -639,21 +638,16 @@ configure (pkg_descr0, pbi) cfg = do
                                       "--enable-split-objs; ignoring")
                                 return False
 
-    let compilerSupportsGhciLibs :: Bool
-        compilerSupportsGhciLibs =
-          case compilerId comp of
-            CompilerId GHC version
-              | version > mkVersion [9,3] && windows ->
-                False
-            CompilerId GHC _ ->
-                True
-            CompilerId GHCJS _ ->
-                True
-            _ -> False
-          where
-            windows = case compPlatform of
-              Platform _ Windows -> True
-              Platform _ _ -> False
+    -- Basically yes/no/unknown.
+    let linkerSupportsRelocations :: Maybe Bool
+        linkerSupportsRelocations =
+          case lookupProgramByName "ld" programDb'' of
+            Nothing -> Nothing
+            Just ld ->
+              case Map.lookup "Supports relocatable output" $ programProperties ld of
+                Just "YES" -> Just True
+                Just "NO" -> Just False
+                _other -> Nothing
 
     let ghciLibByDefault =
           case compilerId comp of
@@ -673,10 +667,12 @@ configure (pkg_descr0, pbi) cfg = do
 
     withGHCiLib_ <-
       case fromFlagOrDefault ghciLibByDefault (configGHCiLib cfg) of
-        True | not compilerSupportsGhciLibs -> do
+        -- NOTE: If linkerSupportsRelocations is Nothing this may still fail if the
+        -- linker does not support -r.
+        True | not (fromMaybe True linkerSupportsRelocations) -> do
           warn verbosity $
-                "--enable-library-for-ghci is no longer supported on Windows with"
-              ++ " GHC 9.4 and later; ignoring..."
+            "--enable-library-for-ghci is not supported with the current"
+            ++ "  linker; ignoring..."
           return False
         v -> return v
 
@@ -951,11 +947,11 @@ dependencySatisfiable
         then internalDepSatisfiable
         else
           -- Backward compatibility for the old sublibrary syntax
-          (sublibs == mainLibSet
+          sublibs == mainLibSet
             && Map.member
                  (pn, CLibName $ LSubLibName $
                       packageNameToUnqualComponentName depName)
-                 requiredDepsMap)
+                 requiredDepsMap
 
           || all visible sublibs
 
@@ -982,7 +978,7 @@ dependencySatisfiable
     internalDepSatisfiable =
         Set.isSubsetOf (NES.toSet sublibs) packageLibraries
     internalDepSatisfiableExternally =
-        all (\ln -> not $ null $ PackageIndex.lookupInternalDependency installedPackageSet pn vr ln) sublibs
+        all (not . null . PackageIndex.lookupInternalDependency installedPackageSet pn vr) sublibs
 
     -- Check whether a library exists and is visible.
     -- We don't disambiguate between dependency on non-existent or private
@@ -1451,8 +1447,7 @@ getInstalledPackagesMonitorFiles verbosity comp packageDBs progdb platform =
 -- flag into a single package db stack.
 --
 interpretPackageDbFlags :: Bool -> [Maybe PackageDB] -> PackageDBStack
-interpretPackageDbFlags userInstall specificDBs =
-    extra initialStack specificDBs
+interpretPackageDbFlags userInstall = extra initialStack
   where
     initialStack | userInstall = [GlobalPackageDB, UserPackageDB]
                  | otherwise   = [GlobalPackageDB]
@@ -1698,8 +1693,8 @@ ccLdOptionsBuildInfo cflags ldflags ldflags_static =
   let (includeDirs',  cflags')   = partition ("-I" `isPrefixOf`) cflags
       (extraLibs',    ldflags')  = partition ("-l" `isPrefixOf`) ldflags
       (extraLibDirs', ldflags'') = partition ("-L" `isPrefixOf`) ldflags'
-      (extraLibsStatic')         = filter ("-l" `isPrefixOf`) ldflags_static
-      (extraLibDirsStatic')      = filter ("-L" `isPrefixOf`) ldflags_static
+      extraLibsStatic'         = filter ("-l" `isPrefixOf`) ldflags_static
+      extraLibDirsStatic'      = filter ("-L" `isPrefixOf`) ldflags_static
   in mempty {
        includeDirs  = map (drop 2) includeDirs',
        extraLibs    = map (drop 2) extraLibs',
diff --git a/Cabal/src/Distribution/Simple/GHC/Internal.hs b/Cabal/src/Distribution/Simple/GHC/Internal.hs
index 507831f3cab..6b595b75f3a 100644
--- a/Cabal/src/Distribution/Simple/GHC/Internal.hs
+++ b/Cabal/src/Distribution/Simple/GHC/Internal.hs
@@ -101,7 +101,9 @@ configureToolchain _implInfo ghcProg ghcInfo =
     }
   . addKnownProgram ldProgram {
       programFindLocation = findProg ldProgramName extraLdPath,
-      programPostConf     = configureLd
+      programPostConf = \v cp ->
+        -- Call any existing configuration first and then add any new configuration
+        configureLd v =<< programPostConf ldProgram v cp
     }
   . addKnownProgram arProgram {
       programFindLocation = findProg arProgramName extraArPath
diff --git a/Cabal/src/Distribution/Simple/Program/Builtin.hs b/Cabal/src/Distribution/Simple/Program/Builtin.hs
index 5bb324f388f..81aee4b93d6 100644
--- a/Cabal/src/Distribution/Simple/Program/Builtin.hs
+++ b/Cabal/src/Distribution/Simple/Program/Builtin.hs
@@ -256,8 +256,7 @@ arProgram = simpleProgram "ar"
 
 stripProgram :: Program
 stripProgram = (simpleProgram "strip") {
-    programFindVersion = \verbosity ->
-      findProgramVersion "--version" stripExtractVersion (lessVerbose verbosity)
+    programFindVersion = findProgramVersion "--version" stripExtractVersion . lessVerbose
   }
 
 hsc2hsProgram :: Program
@@ -322,7 +321,44 @@ greencardProgram :: Program
 greencardProgram = simpleProgram "greencard"
 
 ldProgram :: Program
-ldProgram = simpleProgram "ld"
+ldProgram = (simpleProgram "ld")
+    { programPostConf = \verbosity ldProg -> do
+        -- The `lld` linker cannot create merge (relocatable) objects so we
+        -- want to detect this.
+        -- If the linker does support relocatable objects, we want to use that
+        -- to create partially pre-linked objects for GHCi, so we get much
+        -- faster loading as we do not have to do the separate loading and
+        -- in-memory linking the static linker in GHC does, but can offload
+        -- parts of this process to a pre-linking step.
+        -- However this requires the linker to support this features. Not all
+        -- linkers do, and notably as of this writing `lld` which is a popular
+        -- choice for windows linking does not support this feature. However
+        -- if using binutils ld or another linker that supports --relocatable,
+        -- we should still be good to generate pre-linked objects.
+        ldHelpOutput <-
+          getProgramInvocationOutput
+            verbosity
+            (programInvocation ldProg ["--help"])
+            -- In case the linker does not support '--help'. Eg the LLVM linker,
+            -- `lld` only accepts `-help`.
+            `catchIO` (\_ -> return "")
+        let k = "Supports relocatable output"
+            -- Standard GNU `ld` uses `--relocatable` while `ld.gold` uses
+            -- `-relocatable` (single `-`).
+            v
+              | "-relocatable" `isInfixOf` ldHelpOutput = "YES"
+              -- ld64 on macOS has this lovely response for "--help"
+              --
+              --   ld64: For information on command line options please use 'man ld'.
+              --
+              -- it does however support -r, if you read the manpage
+              -- (e.g. https://www.manpagez.com/man/1/ld64/)
+              | "ld64:" `isPrefixOf` ldHelpOutput = "YES"
+              | otherwise = "NO"
+
+            m = Map.insert k v (programProperties ldProg)
+        return $ ldProg{programProperties = m}
+    }
 
 tarProgram :: Program
 tarProgram = (simpleProgram "tar") {
@@ -334,7 +370,7 @@ tarProgram = (simpleProgram "tar") {
                       -- Some versions of tar don't support '--help'.
                       `catchIO` (\_ -> return "")
      let k = "Supports --format"
-         v = if ("--format" `isInfixOf` tarHelpOutput) then "YES" else "NO"
+         v = if "--format" `isInfixOf` tarHelpOutput then "YES" else "NO"
          m = Map.insert k v (programProperties tarProg)
      return $ tarProg { programProperties = m }
   }
diff --git a/Cabal/src/Distribution/Simple/Program/Db.hs b/Cabal/src/Distribution/Simple/Program/Db.hs
index b9fb61a7913..b1edb84499f 100644
--- a/Cabal/src/Distribution/Simple/Program/Db.hs
+++ b/Cabal/src/Distribution/Simple/Program/Db.hs
@@ -47,6 +47,7 @@ module Distribution.Simple.Program.Db (
     userSpecifyArgss,
     userSpecifiedArgs,
     lookupProgram,
+    lookupProgramByName,
     updateProgram,
     configuredPrograms,
 
@@ -309,8 +310,11 @@ userSpecifiedArgs prog =
 
 -- | Try to find a configured program
 lookupProgram :: Program -> ProgramDb -> Maybe ConfiguredProgram
-lookupProgram prog = Map.lookup (programName prog) . configuredProgs
+lookupProgram = lookupProgramByName . programName
 
+-- | Try to find a configured program
+lookupProgramByName :: String -> ProgramDb -> Maybe ConfiguredProgram
+lookupProgramByName name = Map.lookup name . configuredProgs
 
 -- | Update a configured program in the database.
 updateProgram :: ConfiguredProgram -> ProgramDb
diff --git a/changelog.d/pr-9443 b/changelog.d/pr-9443
new file mode 100644
index 00000000000..353f1fb8cbd
--- /dev/null
+++ b/changelog.d/pr-9443
@@ -0,0 +1,11 @@
+synopsis: Use linker capability detection to improve linker use
+packages: Cabal
+prs: #9443
+
+description: {
+
+- Previously the GHC version number and platform were used as a proxy for whether
+  the linker can generate relocatable objects.
+- Now, the ability of the linker to create relocatable objects is detected.
+
+}

From 38499c6c77b61c64aa6e9c1238b5cbcdeb2d524f Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Mon, 13 Nov 2023 17:40:07 +0800
Subject: [PATCH 129/144] Migrate release CI back to github

---
 .cirrus.yml                              |  31 ++
 .github/scripts/brew.sh                  |  28 ++
 .github/scripts/build.sh                 |  66 ++++
 .github/scripts/common.sh                | 110 ++++++
 .github/scripts/env.sh                   |  38 +++
 .github/workflows/release.yaml           | 414 +++++++++++++++++++++++
 scripts/release/create-yaml-snippet.sh   | 123 +++++++
 scripts/release/download-gh-artifacts.sh |  35 ++
 8 files changed, 845 insertions(+)
 create mode 100644 .cirrus.yml
 create mode 100644 .github/scripts/brew.sh
 create mode 100644 .github/scripts/build.sh
 create mode 100644 .github/scripts/common.sh
 create mode 100644 .github/scripts/env.sh
 create mode 100644 .github/workflows/release.yaml
 create mode 100755 scripts/release/create-yaml-snippet.sh
 create mode 100755 scripts/release/download-gh-artifacts.sh

diff --git a/.cirrus.yml b/.cirrus.yml
new file mode 100644
index 00000000000..624088f2a04
--- /dev/null
+++ b/.cirrus.yml
@@ -0,0 +1,31 @@
+# release CI for FreeBSD
+compute_engine_instance:
+  image_project: freebsd-org-cloud-dev
+  image: family/freebsd-13-2
+  platform: freebsd
+  disk: 100 # Gb
+
+build_task:
+  timeout_in: 120m
+  only_if: $CIRRUS_TAG != ''
+  env:
+    ADD_CABAL_ARGS: "--enable-split-sections"
+    ARCH: 64
+    ARTIFACT: "x86_64-portbld-freebsd"
+    CIRRUS_CLONE_SUBMODULES: true
+    DISTRO: na
+    GHC_VERSION: 9.2.8
+    GITHUB_WORKSPACE: ${CIRRUS_WORKING_DIR}
+    RUNNER_OS: FreeBSD
+    TARBALL_EXT: tar.xz
+    TZ: Asia/Singapore
+  install_script:
+    - sed -i.bak -e 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
+    - pkg install -y ghc hs-cabal-install git bash misc/compat10x misc/compat11x misc/compat12x gmake llvm14 patchelf tree gmp libiconv
+  script:
+    - tzsetup Etc/GMT
+    - adjkerntz -a
+    - bash .github/scripts/build.sh
+  binaries_artifacts:
+    path: "out/*"
+
diff --git a/.github/scripts/brew.sh b/.github/scripts/brew.sh
new file mode 100644
index 00000000000..e05ffb7421c
--- /dev/null
+++ b/.github/scripts/brew.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -eux
+
+# shellcheck disable=SC1091
+. .github/scripts/env.sh
+
+if [ -e "$HOME/.brew" ] ; then
+	(
+	cd "$HOME/.brew"
+	git fetch --depth 1
+	git reset --hard origin/master
+	)
+else
+	git clone --depth=1 https://github.com/Homebrew/brew "$HOME/.brew"
+fi
+export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$PATH"
+
+mkdir -p "$CI_PROJECT_DIR/.brew_cache"
+export HOMEBREW_CACHE="$CI_PROJECT_DIR/.brew_cache"
+mkdir -p "$CI_PROJECT_DIR/.brew_logs"
+export HOMEBREW_LOGS="$CI_PROJECT_DIR/.brew_logs"
+mkdir -p /private/tmp/.brew_tmp
+export HOMEBREW_TEMP=/private/tmp/.brew_tmp
+
+#brew update
+brew install ${1+"$@"}
+
diff --git a/.github/scripts/build.sh b/.github/scripts/build.sh
new file mode 100644
index 00000000000..c0b2ad0ac20
--- /dev/null
+++ b/.github/scripts/build.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+set -eux
+
+# shellcheck disable=SC1091
+. .github/scripts/env.sh
+# shellcheck disable=SC1091
+. .github/scripts/common.sh
+
+uname -a
+uname -p
+uname
+pwd
+env
+
+# ensure ghcup
+install_ghcup
+
+# build
+ghcup install ghc "${GHC_VERSION}"
+ghcup set ghc "${GHC_VERSION}"
+sed -i.bak -e '/DELETE MARKER FOR CI/,/END DELETE/d' cabal.project # see comment in cabal.project
+ecabal update
+ecabal user-config diff
+ecabal user-config init -f
+"ghc-${GHC_VERSION}" --info
+"ghc" --info
+
+# https://github.com/haskell/cabal/issues/7313#issuecomment-811851884
+if [ "$(getconf LONG_BIT)" == "32" ] || [ "${DISTRO}" == "CentOS" ] ; then
+    echo 'constraints: lukko -ofd-locking' >> cabal.project.release.local
+fi
+
+# shellcheck disable=SC2206
+args=(
+    -w "ghc-$GHC_VERSION"
+    --disable-profiling
+    --enable-executable-stripping
+    --project-file=cabal.project.release
+    ${ADD_CABAL_ARGS}
+)
+
+run cabal v2-build "${args[@]}" cabal-install
+
+mkdir -p "$CI_PROJECT_DIR/out"
+# shellcheck disable=SC2154
+cp "$(cabal list-bin "${args[@]}" cabal-install:exe:cabal)" "$CI_PROJECT_DIR/out/cabal$ext"
+cp dist-newstyle/cache/plan.json "$CI_PROJECT_DIR/out/plan.json"
+cd "$CI_PROJECT_DIR/out/"
+
+# create tarball/zip
+TARBALL_PREFIX="cabal-install-$("$CI_PROJECT_DIR/out/cabal" --numeric-version)"
+case "${TARBALL_EXT}" in
+    zip)
+        zip "${TARBALL_PREFIX}-${ARTIFACT}.${TARBALL_EXT}" "cabal${ext}" plan.json
+        ;;
+    tar.xz)
+        tar caf "${TARBALL_PREFIX}-${ARTIFACT}.${TARBALL_EXT}" "cabal${ext}" plan.json
+        ;;
+    *)
+        fail "Unknown TARBALL_EXT: ${TARBALL_EXT}"
+        ;;
+esac
+
+rm cabal plan.json
+
diff --git a/.github/scripts/common.sh b/.github/scripts/common.sh
new file mode 100644
index 00000000000..cff91ea6bb5
--- /dev/null
+++ b/.github/scripts/common.sh
@@ -0,0 +1,110 @@
+#!/bin/bash
+
+# shellcheck disable=SC1091
+. .github/scripts/env.sh
+
+# Colors
+RED="0;31"
+LT_BROWN="1;33"
+LT_BLUE="1;34"
+
+ecabal() {
+	cabal "$@"
+}
+
+nonfatal() {
+	"$@" || "$* failed"
+}
+
+sha_sum() {
+	if [ "${RUNNER_OS}" = "FreeBSD" ] ; then
+		sha256 "$@"
+	else
+		sha256sum "$@"
+	fi
+}
+
+git_describe() {
+	git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*"
+	git describe --always
+}
+
+install_ghcup() {
+	# find "$GHCUP_INSTALL_BASE_PREFIX"
+	mkdir -p "$GHCUP_BIN"
+	mkdir -p "$GHCUP_BIN"/../cache
+
+	if [ "${RUNNER_OS}" = "FreeBSD" ] ; then
+		curl -o ghcup https://downloads.haskell.org/ghcup/tmp/x86_64-portbld-freebsd-ghcup-0.1.18.1
+		chmod +x ghcup
+		mv ghcup "$HOME/.local/bin/ghcup"
+	else
+		curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_MINIMAL=1 sh
+		source "$(dirname "${GHCUP_BIN}")/env"
+		ghcup install cabal --set "${BOOTSTRAP_HASKELL_CABAL_VERSION}"
+	fi
+}
+
+strip_binary() {
+	(
+	set -e
+	local binary=$1
+	case "$(uname -s)" in
+		"Darwin"|"darwin")
+			;;
+		MSYS_*|MINGW*)
+			;;
+		*)
+			strip -s "${binary}"
+		   ;;
+   esac
+	)
+}
+
+# GitLab Pipelines log section delimiters
+# https://gitlab.com/gitlab-org/gitlab-foss/issues/14664
+start_section() {
+  name="$1"
+  echo -e "section_start:$(date +%s):$name\015\033[0K"
+}
+
+end_section() {
+  name="$1"
+  echo -e "section_end:$(date +%s):$name\015\033[0K"
+}
+
+echo_color() {
+  local color="$1"
+  local msg="$2"
+  echo -e "\033[${color}m${msg}\033[0m"
+}
+
+error() { echo_color "${RED}" "$1"; }
+warn() { echo_color "${LT_BROWN}" "$1"; }
+info() { echo_color "${LT_BLUE}" "$1"; }
+
+fail() { error "error: $1"; exit 1; }
+
+run() {
+  info "Running $*..."
+  "$@" || ( error "$* failed"; return 1; )
+}
+
+emake() {
+	if command -v gmake >/dev/null 2>&1 ; then
+		gmake "$@"
+	else
+		make "$@"
+	fi
+}
+
+mktempdir() {
+	case "$(uname -s)" in
+		"Darwin"|"darwin")
+			mktemp -d -t cabal_ci.XXXXXXX
+			;;
+		*)
+			mktemp -d
+			;;
+	esac
+}
diff --git a/.github/scripts/env.sh b/.github/scripts/env.sh
new file mode 100644
index 00000000000..2d8c697dd3d
--- /dev/null
+++ b/.github/scripts/env.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+mkdir -p "$HOME"/.local/bin
+
+if [ "${RUNNER_OS}" = "Windows" ] ; then
+	ext=".exe"
+else
+	# shellcheck disable=SC2034
+	ext=''
+fi
+
+export PATH="$HOME/.local/bin:$PATH"
+
+export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
+export BOOTSTRAP_HASKELL_CABAL_VERSION="${CABAL_VER:-3.8.1.0}"
+export BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=no
+export BOOTSTRAP_HASKELL_INSTALL_NO_STACK=yes
+export BOOTSTRAP_HASKELL_ADJUST_BASHRC=1
+
+if [ "${RUNNER_OS}" = "Windows" ] ; then
+    # on windows use pwd to get unix style path
+    CI_PROJECT_DIR="$(pwd)"
+    export CI_PROJECT_DIR
+    export GHCUP_INSTALL_BASE_PREFIX="/c"
+    export GHCUP_BIN="$GHCUP_INSTALL_BASE_PREFIX/ghcup/bin"
+    export PATH="$GHCUP_BIN:$PATH"
+    export CABAL_DIR="C:\\Users\\runneradmin\\AppData\\Roaming\\cabal"
+else
+    export CI_PROJECT_DIR="${GITHUB_WORKSPACE}"
+    export GHCUP_INSTALL_BASE_PREFIX="$CI_PROJECT_DIR"
+    export GHCUP_BIN="$GHCUP_INSTALL_BASE_PREFIX/.ghcup/bin"
+    export PATH="$GHCUP_BIN:$PATH"
+    export CABAL_DIR="$CI_PROJECT_DIR/cabal"
+    export CABAL_CACHE="$CI_PROJECT_DIR/cabal-cache"
+fi
+
+export DEBIAN_FRONTEND=noninteractive
+export TZ=Asia/Singapore
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
new file mode 100644
index 00000000000..1574588f325
--- /dev/null
+++ b/.github/workflows/release.yaml
@@ -0,0 +1,414 @@
+name: Build and release
+
+on:
+  push:
+    tags:
+      - 'cabal-install-*'
+  schedule:
+    - cron: '0 2 * * *'
+
+jobs:
+  build-linux:
+    name: Build linux binaries
+    runs-on: ubuntu-latest
+    env:
+      TARBALL_EXT: tar.xz
+      ARCH: 64
+      DEBIAN_FRONTEND: noninteractive
+      TZ: Asia/Singapore
+      GHC_VERSION: 9.2.8
+    strategy:
+      fail-fast: false
+      matrix:
+        platform: [ { image: "debian:9"
+                    , installCmd: "sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list && sed -i /-updates/d /etc/apt/sources.list && apt-get update && apt-get install -y"
+                    , toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
+                    , DISTRO: "Debian"
+                    , ARTIFACT: "x86_64-linux-deb9"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "debian:10"
+                    , installCmd: "apt-get update && apt-get install -y"
+                    , toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
+                    , DISTRO: "Debian"
+                    , ARTIFACT: "x86_64-linux-deb10"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "debian:11"
+                    , installCmd: "apt-get update && apt-get install -y"
+                    , toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
+                    , DISTRO: "Debian"
+                    , ARTIFACT: "x86_64-linux-deb11"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "ubuntu:18.04"
+                    , installCmd: "apt-get update && apt-get install -y"
+                    , toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
+                    , DISTRO: "Ubuntu"
+                    , ARTIFACT: "x86_64-linux-ubuntu18.04"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "ubuntu:20.04"
+                    , installCmd: "apt-get update && apt-get install -y"
+                    , toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
+                    , DISTRO: "Ubuntu"
+                    , ARTIFACT: "x86_64-linux-ubuntu20.04"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "ubuntu:22.04"
+                    , installCmd: "apt-get update && apt-get install -y"
+                    , toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
+                    , DISTRO: "Ubuntu"
+                    , ARTIFACT: "x86_64-linux-ubuntu22.04"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "linuxmintd/mint20-amd64"
+                    , installCmd: "apt-get update && apt-get install -y"
+                    , toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
+                    , DISTRO: "Mint"
+                    , ARTIFACT: "x86_64-linux-mint20"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "linuxmintd/mint21-amd64"
+                    , installCmd: "apt-get update && apt-get install -y"
+                    , toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
+                    , DISTRO: "Mint"
+                    , ARTIFACT: "x86_64-linux-mint21"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "fedora:27"
+                    , installCmd: "dnf install -y"
+                    , toolRequirements: "autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf"
+                    , DISTRO: "Fedora"
+                    , ARTIFACT: "x86_64-linux-fedora27"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "fedora:33"
+                    , installCmd: "dnf install -y"
+                    , toolRequirements: "autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf"
+                    , DISTRO: "Fedora"
+                    , ARTIFACT: "x86_64-linux-fedora33"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "fedora:37"
+                    , installCmd: "dnf install -y"
+                    , toolRequirements: "autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf"
+                    , DISTRO: "Fedora"
+                    , ARTIFACT: "x86_64-linux-fedora37"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "centos:7"
+                    , installCmd: "yum -y install epel-release && yum install -y"
+                    , toolRequirements: "autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf"
+                    , DISTRO: "CentOS"
+                    , ARTIFACT: "x86_64-linux-centos7"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "rockylinux:8"
+                    , installCmd: "yum -y install epel-release && yum install -y --allowerasing"
+                    , toolRequirements: "autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf"
+                    , DISTRO: "Unknown"
+                    , ARTIFACT: "x86_64-linux-rocky8"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "rockylinux:9"
+                    , installCmd: "yum -y install epel-release && yum install -y --allowerasing"
+                    , toolRequirements: "autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf"
+                    , DISTRO: "Unknown"
+                    , ARTIFACT: "x86_64-linux-rocky9"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "alpine:latest"
+                    , installCmd: "apk update && apk add"
+                    , toolRequirements: "binutils-gold curl gcc g++ gmp-dev libc-dev libffi-dev make musl-dev ncurses-dev perl tar xz autoconf automake bzip2 coreutils elfutils-dev findutils git jq bzip2-dev  patch  python3 sqlite sudo wget which zlib-dev patchelf zlib zlib-dev zlib-static"
+                    , DISTRO: "Unknown"
+                    , ARTIFACT: "x86_64-linux-unknown"
+                    , ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"
+                    },
+                    { image: "alpine:3.12"
+                    , installCmd: "apk update && apk add"
+                    , toolRequirements: "binutils-gold curl gcc g++ gmp-dev libc-dev libffi-dev make musl-dev ncurses-dev perl tar xz autoconf automake bzip2 coreutils elfutils-dev findutils git jq bzip2-dev  patch  python3 sqlite sudo wget which zlib-dev patchelf zlib zlib-dev zlib-static"
+                    , DISTRO: "Unknown"
+                    , ARTIFACT: "x86_64-linux-alpine312"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "alpine:3.19"
+                    , installCmd: "apk update && apk add"
+                    , toolRequirements: "binutils-gold curl gcc g++ gmp-dev libc-dev libffi-dev make musl-dev ncurses-dev perl tar xz autoconf automake bzip2 coreutils elfutils-dev findutils git jq bzip2-dev  patch  python3 sqlite sudo wget which zlib-dev patchelf zlib zlib-dev zlib-static"
+                    , DISTRO: "Unknown"
+                    , ARTIFACT: "x86_64-linux-alpine319"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "ghcr.io/void-linux/void-glibc:latest"
+                    , installCmd: "xbps-install -Sy"
+                    , toolRequirements: "ncurses-libtinfo-libs autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils findutils gcc gmp gmp-devel jq lbzip2 make ncurses ncurses-devel openssh patch perl python3 sqlite sudo wget which xz zlib-devel patchelf"
+                    , DISTRO: "Unknown"
+                    , ARTIFACT: "x86_64-linux-void-glibc"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    },
+                    { image: "ghcr.io/void-linux/void-musl:latest"
+                    , installCmd: "xbps-install -Sy"
+                    , toolRequirements: "ncurses-libtinfo-libs autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils findutils gcc gmp gmp-devel jq lbzip2 make ncurses ncurses-devel openssh patch perl python3 sqlite sudo wget which xz zlib-devel patchelf"
+                    , DISTRO: "Unknown"
+                    , ARTIFACT: "x86_64-linux-void-musl"
+                    , ADD_CABAL_ARGS: "--enable-split-sections"
+                    }
+                  ]
+    container:
+      image: ${{ matrix.platform.image }}
+    steps:
+      - name: Install requirements
+        shell: sh
+        run: |
+          ${{ matrix.platform.installCmd }} curl bash git ${{ matrix.platform.toolRequirements }}
+
+      - uses: actions/checkout@v3
+
+      - name: Run build
+        run: |
+          bash .github/scripts/build.sh
+
+        env:
+          ARTIFACT: ${{ matrix.platform.ARTIFACT }}
+          DISTRO: ${{ matrix.platform.DISTRO }}
+          ADD_CABAL_ARGS: ${{ matrix.platform.ADD_CABAL_ARGS }}
+
+      - if: always()
+        name: Upload artifact
+        uses: actions/upload-artifact@v3
+        with:
+          if-no-files-found: error
+          retention-days: 2
+          name: artifacts
+          path: |
+            ./out/*
+
+  build-linux-32bit:
+    name: Build linux binaries (32bit)
+    runs-on: ubuntu-latest
+    env:
+      TARBALL_EXT: tar.xz
+      ARCH: 32
+      TZ: Asia/Singapore
+      GHC_VERSION: 9.2.8
+      DISTRO: "Unknown"
+      ARTIFACT: "i386-linux-unknown"
+      ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"
+
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v3
+        with:
+          submodules: 'true'
+
+      - name: Run build (32 bit linux)
+        uses: docker://hasufell/i386-alpine-haskell:3.12
+        with:
+          args: sh -c "apk update && apk add bash binutils-gold curl gcc g++ gmp-dev libc-dev libffi-dev make musl-dev ncurses-dev perl tar xz autoconf automake bzip2 coreutils elfutils-dev findutils git jq bzip2-dev  patch  python3 sqlite sudo wget which zlib-dev patchelf zlib zlib-dev zlib-static && bash .github/scripts/build.sh"
+
+      - if: always()
+        name: Upload artifact
+        uses: actions/upload-artifact@v3
+        with:
+          if-no-files-found: error
+          retention-days: 2
+          name: artifacts
+          path: |
+            ./out/*
+
+  build-arm:
+    name: Build ARM binary
+    runs-on: ${{ matrix.os }}
+    env:
+      TARBALL_EXT: tar.xz
+      ADD_CABAL_ARGS: ""
+      DEBIAN_FRONTEND: noninteractive
+      TZ: Asia/Singapore
+      ARCH: ARM64
+      DISTRO: Ubuntu
+      GHC_VERSION: 9.2.8
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - os: [self-hosted, Linux, ARM64]
+            ARCH: ARM
+            ARTIFACT: "armv7-linux-ubuntu20"
+          - os: [self-hosted, Linux, ARM64]
+            ARCH: ARM64
+            ARTIFACT: "aarch64-linux-ubuntu20"
+    steps:
+      - uses: docker://arm64v8/ubuntu:focal
+        name: Cleanup (aarch64 linux)
+        with:
+          args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
+
+      - name: git config
+        run: |
+          git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*"
+        shell: bash
+
+      - name: Checkout code
+        uses: actions/checkout@v3
+
+      - if: matrix.ARCH == 'ARM'
+        uses: docker://hasufell/arm32v7-ubuntu-haskell:focal
+        name: Run build (armv7 linux)
+        with:
+          args: bash .github/scripts/build.sh
+        env:
+          ARTIFACT: ${{ matrix.ARTIFACT }}
+
+      - if: matrix.ARCH == 'ARM64'
+        uses: docker://hasufell/arm64v8-ubuntu-haskell:focal
+        name: Run build (aarch64 linux)
+        with:
+          args: bash .github/scripts/build.sh
+        env:
+          ARTIFACT: ${{ matrix.ARTIFACT }}
+
+      - if: always()
+        name: Upload artifact
+        uses: actions/upload-artifact@v3
+        with:
+          if-no-files-found: error
+          retention-days: 2
+          name: artifacts
+          path: |
+            ./out/*
+
+  build-mac-x86_64:
+    name: Build binary (Mac x86_64)
+    runs-on: macOS-11
+    env:
+      MACOSX_DEPLOYMENT_TARGET: 10.13
+      ADD_CABAL_ARGS: ""
+      ARTIFACT: "x86_64-apple-darwin"
+      ARCH: 64
+      TARBALL_EXT: tar.xz
+      DISTRO: na
+      GHC_VERSION: 9.2.8
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v3
+
+      - name: Run build
+        run: |
+          brew install coreutils tree
+          bash .github/scripts/build.sh
+
+      - if: always()
+        name: Upload artifact
+        uses: actions/upload-artifact@v3
+        with:
+          if-no-files-found: error
+          retention-days: 2
+          name: artifacts
+          path: |
+            ./out/*
+
+  build-mac-aarch64:
+    name: Build binary (Mac aarch64)
+    runs-on: [self-hosted, macOS, ARM64]
+    env:
+      MACOSX_DEPLOYMENT_TARGET: 10.13
+      ADD_CABAL_ARGS: ""
+      ARTIFACT: "aarch64-apple-darwin"
+      ARCH: ARM64
+      TARBALL_EXT: tar.xz
+      DISTRO: na
+      HOMEBREW_CHANGE_ARCH_TO_ARM: 1
+      GHC_VERSION: 9.2.8
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v3
+
+      - name: Run build
+        run: |
+          bash .github/scripts/brew.sh git coreutils autoconf automake tree
+          export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$PATH"
+          export LD=ld
+          bash .github/scripts/build.sh
+
+      - if: always()
+        name: Upload artifact
+        uses: actions/upload-artifact@v3
+        with:
+          if-no-files-found: error
+          retention-days: 2
+          name: artifacts
+          path: |
+            ./out/*
+
+  build-win:
+    name: Build binary (Win)
+    runs-on: windows-latest
+    env:
+      ADD_CABAL_ARGS: ""
+      ARTIFACT: "x86_64-mingw64"
+      ARCH: 64
+      TARBALL_EXT: "zip"
+      DISTRO: na
+      GHC_VERSION: 9.2.8
+    steps:
+      - name: install windows deps
+        shell: pwsh
+        run: |
+          C:\msys64\usr\bin\bash -lc "pacman --disable-download-timeout --noconfirm -Syuu"
+          C:\msys64\usr\bin\bash -lc "pacman --disable-download-timeout --noconfirm -Syuu"
+          C:\msys64\usr\bin\bash -lc "pacman --disable-download-timeout --noconfirm -S make mingw-w64-x86_64-clang curl autoconf mingw-w64-x86_64-pkgconf ca-certificates base-devel gettext autoconf make libtool automake python p7zip patch unzip zip git"
+          taskkill /F /FI "MODULES eq msys-2.0.dll"
+
+      - name: Checkout code
+        uses: actions/checkout@v3
+
+      - name: Run build (windows)
+        run: |
+          $env:CHERE_INVOKING = 1
+          $env:MSYS2_PATH_TYPE = "inherit"
+          $ErrorActionPreference = "Stop"
+          C:\msys64\usr\bin\bash -lc "bash .github/scripts/build.sh"
+        shell: pwsh
+
+      - if: always()
+        name: Upload artifact
+        uses: actions/upload-artifact@v3
+        with:
+          if-no-files-found: error
+          retention-days: 2
+          name: artifacts
+          path: |
+            ./out/*
+
+  release:
+    name: release
+    needs: ["build-linux", "build-linux-32bit", "build-arm", "build-mac-x86_64", "build-mac-aarch64", "build-win"]
+    runs-on: ubuntu-latest
+    if: startsWith(github.ref, 'refs/tags/')
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v3
+
+      - name: Download artifacts
+        uses: actions/download-artifact@v3
+        with:
+          name: artifacts
+          path: ./out
+
+      - name: Install requirements
+        run: |
+          sudo apt-get update && sudo apt-get install -y tar xz-utils
+        shell: bash
+
+      - name: build sdists
+        run: |
+          cabal sdist -o out all
+        shell: bash
+
+      - name: Release
+        uses: softprops/action-gh-release@v1
+        with:
+          draft: true
+          files: |
+            ./out/*
+
diff --git a/scripts/release/create-yaml-snippet.sh b/scripts/release/create-yaml-snippet.sh
new file mode 100755
index 00000000000..b6ea90410c6
--- /dev/null
+++ b/scripts/release/create-yaml-snippet.sh
@@ -0,0 +1,123 @@
+#!/bin/bash
+
+set -eu
+set -o pipefail
+
+RELEASE=$1
+VERSION=${RELEASE#cabal-install-v}
+
+cd "gh-release-artifacts/cabal-${VERSION}"
+BASE_URL=https://downloads.haskell.org/~cabal/cabal-install-$VERSION
+
+cat <<EOF > /dev/stdout
+    $VERSION:
+      viTags:
+        - Latest
+      viChangeLog: https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-$VERSION.md
+      viArch:
+        A_64:
+          Linux_Debian:
+            '< 10': &cabal-${VERSION//./}-64-deb9
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-deb9.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-deb9.tar.xz" | awk '{ print $1 }')
+            '(>= 10 && < 11)': &cabal-${VERSION//./}-64-deb10
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-deb10.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-deb10.tar.xz" | awk '{ print $1 }')
+            '( >= 11)': &cabal-${VERSION//./}-64-deb11
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-deb11.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-deb11.tar.xz" | awk '{ print $1 }')
+            unknown_versioning: *cabal-${VERSION//./}-64-deb9
+          Linux_Ubuntu:
+            '( >= 16 && < 19 )': &cabal-${VERSION//./}-64-ubuntu18
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-ubuntu18.04.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-ubuntu18.04.tar.xz" | awk '{ print $1 }')
+            '( >= 20 && < 22 )': &cabal-${VERSION//./}-64-ubuntu20
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-ubuntu20.04.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-ubuntu20.04.tar.xz" | awk '{ print $1 }')
+            '( >= 22 )': &cabal-${VERSION//./}-64-ubuntu22
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-ubuntu22.04.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-ubuntu22.04.tar.xz" | awk '{ print $1 }')
+            unknown_versioning: *cabal-${VERSION//./}-64-ubuntu18
+          Linux_Mint:
+            '(>= 20 && < 21)': &cabal-${VERSION//./}-64-mint20
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-mint20.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-mint20.tar.xz" | awk '{ print $1 }')
+            '>= 21': &cabal-${VERSION//./}-64-mint21
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-mint21.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-mint21.tar.xz" | awk '{ print $1 }')
+            unknown_versioning: *cabal-${VERSION//./}-64-mint20
+          Linux_Fedora:
+            '< 33': &cabal-${VERSION//./}-64-fedora27
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-fedora27.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-fedora27.tar.xz" | awk '{ print $1 }')
+			'(>= 33 && < 37)': &cabal-${VERSION//./}-64-fedora33
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-fedora33.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-fedora33.tar.xz" | awk '{ print $1 }')
+			'>= 37': &cabal-${VERSION//./}-64-fedora37
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-fedora37.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-fedora37.tar.xz" | awk '{ print $1 }')
+            unknown_versioning: *cabal-${VERSION//./}-64-fedora27
+          Linux_CentOS:
+            '( >= 7 && < 8 )': &cabal-${VERSION//./}-64-centos
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-centos7.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-centos7.tar.xz" | awk '{ print $1 }')
+            unknown_versioning: *cabal-${VERSION//./}-64-centos
+          Linux_Rocky:
+            '( >= 8 && < 9 )': &cabal-${VERSION//./}-64-rocky8
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-rocky8.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-rocky8.tar.xz" | awk '{ print $1 }')
+            '( >= 9 )': &cabal-${VERSION//./}-64-rocky9
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-rocky9.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-rocky9.tar.xz" | awk '{ print $1 }')
+            unknown_versioning: *cabal-${VERSION//./}-64-rocky8
+          Linux_RedHat:
+            unknown_versioning: *cabal-${VERSION//./}-64-centos
+          Linux_UnknownLinux:
+            unknown_versioning: &cabal-${VERSION//./}-64-unknown
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-unknown.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-unknown.tar.xz" | awk '{ print $1 }')
+          Linux_Alpine:
+            '( >= 3.12 && < 3.19 )': &cabal-${VERSION//./}-64-alpine312
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-alpine312.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-alpine312.tar.xz" | awk '{ print $1 }')
+            '( >= 3.19 )': &cabal-${VERSION//./}-64-alpine319
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-alpine319.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-alpine319.tar.xz" | awk '{ print $1 }')
+            unknown_versioning: *cabal-${VERSION//./}-64-unknown
+          Linux_Void:
+            unknown_versioning: *cabal-${VERSION//./}-64-unknown
+          Darwin:
+            unknown_versioning:
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-apple-darwin.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-apple-darwin.tar.xz" | awk '{ print $1 }')
+          Windows:
+            unknown_versioning:
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-mingw64.zip
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-mingw64.zip" | awk '{ print $1 }')
+          FreeBSD:
+            unknown_versioning:
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-freebsd.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-freebsd.tar.xz" | awk '{ print $1 }')
+        A_32:
+          Linux_UnknownLinux:
+            unknown_versioning: &cabal-${VERSION//./}-32-unknown
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-i386-linux-unknown.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-i386-linux-unknown.tar.xz" | awk '{ print $1 }')
+          Linux_Alpine:
+            unknown_versioning: *cabal-${VERSION//./}-32-unknown
+        A_ARM64:
+          Linux_UnknownLinux:
+            unknown_versioning:
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-aarch64-linux-ubuntu20.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-aarch64-linux-ubuntu20.tar.xz" | awk '{ print $1 }')
+          Darwin:
+            unknown_versioning:
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-aarch64-apple-darwin.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-aarch64-apple-darwin.tar.xz" | awk '{ print $1 }')
+        A_ARM:
+          Linux_UnknownLinux:
+            unknown_versioning:
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-armv7-linux-ubuntu20.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-armv7-linux-ubuntu20.tar.xz" | awk '{ print $1 }')
+EOF
+
diff --git a/scripts/release/download-gh-artifacts.sh b/scripts/release/download-gh-artifacts.sh
new file mode 100755
index 00000000000..efe77d1a720
--- /dev/null
+++ b/scripts/release/download-gh-artifacts.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+set -eu
+set -o pipefail
+
+RELEASE=$1
+VERSION=${RELEASE#cabal-install-v}
+SIGNER=$2
+
+echo "RELEASE: $RELEASE"
+echo "SIGNER: $SIGNER"
+
+for com in gh gpg curl sha256sum ; do
+	command -V ${com} >/dev/null 2>&1
+done
+
+[ ! -e "gh-release-artifacts/cabal-${VERSION}" ]
+
+mkdir -p "gh-release-artifacts/cabal-${VERSION}"
+
+cd "gh-release-artifacts/cabal-${VERSION}"
+
+# github
+gh release download "$RELEASE"
+
+# cirrus
+curl --fail -L -o "cabal-install-${VERSION}-x86_64-portbld-freebsd.tar.xz" \
+	"https://api.cirrus-ci.com/v1/artifact/github/haskell/cabal/build/binaries/out/cabal-install-${VERSION}-x86_64-portbld-freebsd.tar.xz?branch=${RELEASE}"
+
+
+sha256sum ./* > SHA256SUMS
+gpg --detach-sign -u "${SIGNER}" SHA256SUMS
+
+gh release upload "$RELEASE" "cabal-install-${VERSION}-x86_64-portbld-freebsd.tar.xz" SHA256SUMS SHA256SUMS.sig
+

From d955fc6e504b49cb8c1e15a7e85a22d3cbb6fd37 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Thu, 4 Jan 2024 19:20:38 +0800
Subject: [PATCH 130/144] Use cabal 3.6.2.0-p1 since the armv7 binary is better

---
 .github/scripts/env.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/scripts/env.sh b/.github/scripts/env.sh
index 2d8c697dd3d..7c163766d3c 100644
--- a/.github/scripts/env.sh
+++ b/.github/scripts/env.sh
@@ -12,7 +12,7 @@ fi
 export PATH="$HOME/.local/bin:$PATH"
 
 export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
-export BOOTSTRAP_HASKELL_CABAL_VERSION="${CABAL_VER:-3.8.1.0}"
+export BOOTSTRAP_HASKELL_CABAL_VERSION="${CABAL_VER:-3.6.2.0-p1}"
 export BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=no
 export BOOTSTRAP_HASKELL_INSTALL_NO_STACK=yes
 export BOOTSTRAP_HASKELL_ADJUST_BASHRC=1

From 086b810604004e43329a9676c520111740be8711 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Thu, 4 Jan 2024 19:22:38 +0800
Subject: [PATCH 131/144] Use GHC 9.2.1 on alpine 32bit, because 9.2.8 bindist
 doesn't install

---
 .github/workflows/release.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 1574588f325..4513412ced9 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -190,7 +190,7 @@ jobs:
       TARBALL_EXT: tar.xz
       ARCH: 32
       TZ: Asia/Singapore
-      GHC_VERSION: 9.2.8
+      GHC_VERSION: 9.2.1
       DISTRO: "Unknown"
       ARTIFACT: "i386-linux-unknown"
       ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"

From 16c7866298482829114176ddd5ce81340c61c203 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Thu, 4 Jan 2024 19:23:29 +0800
Subject: [PATCH 132/144] Remove void musl

---
 .github/workflows/release.yaml | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 4513412ced9..574fef911b9 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -145,13 +145,6 @@ jobs:
                     , DISTRO: "Unknown"
                     , ARTIFACT: "x86_64-linux-void-glibc"
                     , ADD_CABAL_ARGS: "--enable-split-sections"
-                    },
-                    { image: "ghcr.io/void-linux/void-musl:latest"
-                    , installCmd: "xbps-install -Sy"
-                    , toolRequirements: "ncurses-libtinfo-libs autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils findutils gcc gmp gmp-devel jq lbzip2 make ncurses ncurses-devel openssh patch perl python3 sqlite sudo wget which xz zlib-devel patchelf"
-                    , DISTRO: "Unknown"
-                    , ARTIFACT: "x86_64-linux-void-musl"
-                    , ADD_CABAL_ARGS: "--enable-split-sections"
                     }
                   ]
     container:

From 372eceefe7dc1bebf95c9a959ea723987477d525 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Thu, 4 Jan 2024 19:26:07 +0800
Subject: [PATCH 133/144] Install tar on void

---
 .github/workflows/release.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 574fef911b9..c6b33d4bdd4 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -141,7 +141,7 @@ jobs:
                     },
                     { image: "ghcr.io/void-linux/void-glibc:latest"
                     , installCmd: "xbps-install -Sy"
-                    , toolRequirements: "ncurses-libtinfo-libs autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils findutils gcc gmp gmp-devel jq lbzip2 make ncurses ncurses-devel openssh patch perl python3 sqlite sudo wget which xz zlib-devel patchelf"
+                    , toolRequirements: "ncurses-libtinfo-libs autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils findutils gcc gmp gmp-devel jq lbzip2 make ncurses ncurses-devel openssh patch perl python3 sqlite sudo wget which xz tar zlib-devel patchelf"
                     , DISTRO: "Unknown"
                     , ARTIFACT: "x86_64-linux-void-glibc"
                     , ADD_CABAL_ARGS: "--enable-split-sections"

From a50e354e3bfb495ac806768c2295b7336de733db Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Thu, 4 Jan 2024 20:03:57 +0800
Subject: [PATCH 134/144] Fix yaml snippet script

---
 scripts/release/create-yaml-snippet.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/scripts/release/create-yaml-snippet.sh b/scripts/release/create-yaml-snippet.sh
index b6ea90410c6..df072d4de3b 100755
--- a/scripts/release/create-yaml-snippet.sh
+++ b/scripts/release/create-yaml-snippet.sh
@@ -96,8 +96,8 @@ cat <<EOF > /dev/stdout
               dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-mingw64.zip" | awk '{ print $1 }')
           FreeBSD:
             unknown_versioning:
-              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-freebsd.tar.xz
-              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-freebsd.tar.xz" | awk '{ print $1 }')
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-portbld-freebsd.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-portbld-freebsd.tar.xz" | awk '{ print $1 }')
         A_32:
           Linux_UnknownLinux:
             unknown_versioning: &cabal-${VERSION//./}-32-unknown
@@ -108,8 +108,8 @@ cat <<EOF > /dev/stdout
         A_ARM64:
           Linux_UnknownLinux:
             unknown_versioning:
-              dlUri: ${BASE_URL}/cabal-install-$VERSION-aarch64-linux-ubuntu20.tar.xz
-              dlHash: $(sha256sum "cabal-install-$VERSION-aarch64-linux-ubuntu20.tar.xz" | awk '{ print $1 }')
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-aarch64-linux-deb10.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-aarch64-linux-deb10.tar.xz" | awk '{ print $1 }')
           Darwin:
             unknown_versioning:
               dlUri: ${BASE_URL}/cabal-install-$VERSION-aarch64-apple-darwin.tar.xz
@@ -117,7 +117,7 @@ cat <<EOF > /dev/stdout
         A_ARM:
           Linux_UnknownLinux:
             unknown_versioning:
-              dlUri: ${BASE_URL}/cabal-install-$VERSION-armv7-linux-ubuntu20.tar.xz
-              dlHash: $(sha256sum "cabal-install-$VERSION-armv7-linux-ubuntu20.tar.xz" | awk '{ print $1 }')
+              dlUri: ${BASE_URL}/cabal-install-$VERSION-armv7-linux-deb10.tar.xz
+              dlHash: $(sha256sum "cabal-install-$VERSION-armv7-linux-deb10.tar.xz" | awk '{ print $1 }')
 EOF
 

From b7c7cabea63f92068e0aac478d693d3c1a9afba2 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Tue, 19 Mar 2024 20:58:18 +0800
Subject: [PATCH 135/144] Set constraints to fix bugs in dependencies

---
 cabal.project.release | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/cabal.project.release b/cabal.project.release
index 8d171824287..c9db703ef91 100644
--- a/cabal.project.release
+++ b/cabal.project.release
@@ -6,3 +6,9 @@ tests: False
 benchmarks: False
 optimization: True
 index-state: hackage.haskell.org 2023-10-13T10:16:13Z
+constraints: tar >= 0.6.2.0,
+             bzlib-conduit >= 0.3.0.3,
+             bz2 >= 1.0.1.1,
+             bzlib >= 0.5.2.0,
+             directory >= 1.3.8.3,
+             filepath == 1.4.101.0 || == 1.4.300.1 || >= 1.5.2.0

From 18c4cab930076cc9fae39c29a4d450d621c05ee5 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Tue, 19 Mar 2024 21:07:01 +0800
Subject: [PATCH 136/144] Update actions and docker images

---
 .github/workflows/release.yaml | 43 +++++++++++++++-------------------
 1 file changed, 19 insertions(+), 24 deletions(-)

diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index c6b33d4bdd4..dd7eda1aa85 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -155,7 +155,7 @@ jobs:
         run: |
           ${{ matrix.platform.installCmd }} curl bash git ${{ matrix.platform.toolRequirements }}
 
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
 
       - name: Run build
         run: |
@@ -168,7 +168,7 @@ jobs:
 
       - if: always()
         name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           if-no-files-found: error
           retention-days: 2
@@ -190,7 +190,7 @@ jobs:
 
     steps:
       - name: Checkout code
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
         with:
           submodules: 'true'
 
@@ -201,7 +201,7 @@ jobs:
 
       - if: always()
         name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           if-no-files-found: error
           retention-days: 2
@@ -218,7 +218,7 @@ jobs:
       DEBIAN_FRONTEND: noninteractive
       TZ: Asia/Singapore
       ARCH: ARM64
-      DISTRO: Ubuntu
+      DISTRO: Debian
       GHC_VERSION: 9.2.8
     strategy:
       fail-fast: false
@@ -226,26 +226,21 @@ jobs:
         include:
           - os: [self-hosted, Linux, ARM64]
             ARCH: ARM
-            ARTIFACT: "armv7-linux-ubuntu20"
+            ARTIFACT: "armv7-linux-debian10"
           - os: [self-hosted, Linux, ARM64]
             ARCH: ARM64
-            ARTIFACT: "aarch64-linux-ubuntu20"
+            ARTIFACT: "aarch64-linux-debian10"
     steps:
-      - uses: docker://arm64v8/ubuntu:focal
-        name: Cleanup (aarch64 linux)
-        with:
-          args: "find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +"
-
       - name: git config
         run: |
           git config --global --get-all safe.directory | grep '^\*$' || git config --global --add safe.directory "*"
         shell: bash
 
       - name: Checkout code
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - if: matrix.ARCH == 'ARM'
-        uses: docker://hasufell/arm32v7-ubuntu-haskell:focal
+        uses: docker://hasufell/arm32v7-debian-haskell:10
         name: Run build (armv7 linux)
         with:
           args: bash .github/scripts/build.sh
@@ -253,7 +248,7 @@ jobs:
           ARTIFACT: ${{ matrix.ARTIFACT }}
 
       - if: matrix.ARCH == 'ARM64'
-        uses: docker://hasufell/arm64v8-ubuntu-haskell:focal
+        uses: docker://hasufell/arm64v8-debian-haskell:10
         name: Run build (aarch64 linux)
         with:
           args: bash .github/scripts/build.sh
@@ -262,7 +257,7 @@ jobs:
 
       - if: always()
         name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           if-no-files-found: error
           retention-days: 2
@@ -283,7 +278,7 @@ jobs:
       GHC_VERSION: 9.2.8
     steps:
       - name: Checkout code
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - name: Run build
         run: |
@@ -292,7 +287,7 @@ jobs:
 
       - if: always()
         name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           if-no-files-found: error
           retention-days: 2
@@ -314,7 +309,7 @@ jobs:
       GHC_VERSION: 9.2.8
     steps:
       - name: Checkout code
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - name: Run build
         run: |
@@ -325,7 +320,7 @@ jobs:
 
       - if: always()
         name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           if-no-files-found: error
           retention-days: 2
@@ -353,7 +348,7 @@ jobs:
           taskkill /F /FI "MODULES eq msys-2.0.dll"
 
       - name: Checkout code
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - name: Run build (windows)
         run: |
@@ -365,7 +360,7 @@ jobs:
 
       - if: always()
         name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           if-no-files-found: error
           retention-days: 2
@@ -380,10 +375,10 @@ jobs:
     if: startsWith(github.ref, 'refs/tags/')
     steps:
       - name: Checkout code
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - name: Download artifacts
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
           name: artifacts
           path: ./out

From b2713942b1fe8f9f68aef42c9c96e49ec4aeaa47 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Tue, 19 Mar 2024 21:12:26 +0800
Subject: [PATCH 137/144] Updates/fixes

---
 .github/workflows/release.yaml | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index dd7eda1aa85..8e060950bea 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -4,8 +4,6 @@ on:
   push:
     tags:
       - 'cabal-install-*'
-  schedule:
-    - cron: '0 2 * * *'
 
 jobs:
   build-linux:
@@ -226,10 +224,10 @@ jobs:
         include:
           - os: [self-hosted, Linux, ARM64]
             ARCH: ARM
-            ARTIFACT: "armv7-linux-debian10"
+            ARTIFACT: "armv7-linux-deb10"
           - os: [self-hosted, Linux, ARM64]
             ARCH: ARM64
-            ARTIFACT: "aarch64-linux-debian10"
+            ARTIFACT: "aarch64-linux-deb10"
     steps:
       - name: git config
         run: |

From f270d8d75ea454d1a5e2154b6cdf2f8df82f4510 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Tue, 19 Mar 2024 21:17:12 +0800
Subject: [PATCH 138/144] Fixes

---
 .github/workflows/release.yaml | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 8e060950bea..a7f559a0b1a 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -153,7 +153,7 @@ jobs:
         run: |
           ${{ matrix.platform.installCmd }} curl bash git ${{ matrix.platform.toolRequirements }}
 
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v3
 
       - name: Run build
         run: |
@@ -166,7 +166,7 @@ jobs:
 
       - if: always()
         name: Upload artifact
-        uses: actions/upload-artifact@v4
+        uses: actions/upload-artifact@v3
         with:
           if-no-files-found: error
           retention-days: 2
@@ -188,7 +188,7 @@ jobs:
 
     steps:
       - name: Checkout code
-        uses: actions/checkout@v4
+        uses: actions/checkout@v3
         with:
           submodules: 'true'
 
@@ -199,7 +199,7 @@ jobs:
 
       - if: always()
         name: Upload artifact
-        uses: actions/upload-artifact@v4
+        uses: actions/upload-artifact@v3
         with:
           if-no-files-found: error
           retention-days: 2
@@ -222,10 +222,10 @@ jobs:
       fail-fast: false
       matrix:
         include:
-          - os: [self-hosted, Linux, ARM64]
+          - os: [self-hosted, Linux, ARM64, maerwald]
             ARCH: ARM
             ARTIFACT: "armv7-linux-deb10"
-          - os: [self-hosted, Linux, ARM64]
+          - os: [self-hosted, Linux, ARM64, maerwald]
             ARCH: ARM64
             ARTIFACT: "aarch64-linux-deb10"
     steps:
@@ -235,7 +235,7 @@ jobs:
         shell: bash
 
       - name: Checkout code
-        uses: actions/checkout@v4
+        uses: actions/checkout@v3
 
       - if: matrix.ARCH == 'ARM'
         uses: docker://hasufell/arm32v7-debian-haskell:10
@@ -255,7 +255,7 @@ jobs:
 
       - if: always()
         name: Upload artifact
-        uses: actions/upload-artifact@v4
+        uses: actions/upload-artifact@v3
         with:
           if-no-files-found: error
           retention-days: 2
@@ -276,7 +276,7 @@ jobs:
       GHC_VERSION: 9.2.8
     steps:
       - name: Checkout code
-        uses: actions/checkout@v4
+        uses: actions/checkout@v3
 
       - name: Run build
         run: |
@@ -285,7 +285,7 @@ jobs:
 
       - if: always()
         name: Upload artifact
-        uses: actions/upload-artifact@v4
+        uses: actions/upload-artifact@v3
         with:
           if-no-files-found: error
           retention-days: 2
@@ -307,7 +307,7 @@ jobs:
       GHC_VERSION: 9.2.8
     steps:
       - name: Checkout code
-        uses: actions/checkout@v4
+        uses: actions/checkout@v3
 
       - name: Run build
         run: |
@@ -318,7 +318,7 @@ jobs:
 
       - if: always()
         name: Upload artifact
-        uses: actions/upload-artifact@v4
+        uses: actions/upload-artifact@v3
         with:
           if-no-files-found: error
           retention-days: 2
@@ -346,7 +346,7 @@ jobs:
           taskkill /F /FI "MODULES eq msys-2.0.dll"
 
       - name: Checkout code
-        uses: actions/checkout@v4
+        uses: actions/checkout@v3
 
       - name: Run build (windows)
         run: |
@@ -358,7 +358,7 @@ jobs:
 
       - if: always()
         name: Upload artifact
-        uses: actions/upload-artifact@v4
+        uses: actions/upload-artifact@v3
         with:
           if-no-files-found: error
           retention-days: 2
@@ -373,10 +373,10 @@ jobs:
     if: startsWith(github.ref, 'refs/tags/')
     steps:
       - name: Checkout code
-        uses: actions/checkout@v4
+        uses: actions/checkout@v3
 
       - name: Download artifacts
-        uses: actions/download-artifact@v4
+        uses: actions/download-artifact@v3
         with:
           name: artifacts
           path: ./out

From 546537f70f3cf031dd9bf36d2c1cea1452123c55 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Tue, 19 Mar 2024 21:32:07 +0800
Subject: [PATCH 139/144] Build against recent deps

---
 cabal-install-solver/cabal-install-solver.cabal | 2 +-
 cabal-testsuite/cabal-testsuite.cabal           | 2 +-
 cabal.project.release                           | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal
index 85cebe70d6d..6e5d72ca478 100644
--- a/cabal-install-solver/cabal-install-solver.cabal
+++ b/cabal-install-solver/cabal-install-solver.cabal
@@ -111,7 +111,7 @@ library
     , Cabal-syntax  ^>=3.10
     , containers    >=0.5.6.2  && <0.8
     , edit-distance ^>= 0.2.2
-    , filepath      ^>=1.4.0.0 || ^>=1.5.0.0
+    , filepath      >= 1.3.0.1  && < 1.6
     , mtl           >=2.0      && <2.4
     , pretty        ^>=1.1
     , transformers  >=0.4.2.0  && <0.7
diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal
index 056502af4b1..1d544e0d368 100644
--- a/cabal-testsuite/cabal-testsuite.cabal
+++ b/cabal-testsuite/cabal-testsuite.cabal
@@ -66,7 +66,7 @@ library
     , cryptohash-sha256     ^>= 0.11.101.0
     , directory             ^>= 1.2.0.1 || ^>= 1.3.0.0
     , exceptions            ^>= 0.10.0
-    , filepath              ^>= 1.3.0.1 || ^>= 1.4.0.0 || ^>= 1.5.0.0
+    , filepath              >= 1.3.0.1  && < 1.6
     , network-wait          ^>= 0.1.2.0 || ^>= 0.2.0.0
     , optparse-applicative  ^>= 0.14.3.0 || ^>=0.15.1.0 || ^>=0.16.0.0 || ^>= 0.17.0.0 || ^>= 0.18.1.0
     , process               ^>= 1.2.1.0 || ^>= 1.4.2.0 || ^>= 1.6.1.0
diff --git a/cabal.project.release b/cabal.project.release
index c9db703ef91..c2138c4ac3e 100644
--- a/cabal.project.release
+++ b/cabal.project.release
@@ -5,7 +5,6 @@ packages: cabal-install/
 tests: False
 benchmarks: False
 optimization: True
-index-state: hackage.haskell.org 2023-10-13T10:16:13Z
 constraints: tar >= 0.6.2.0,
              bzlib-conduit >= 0.3.0.3,
              bz2 >= 1.0.1.1,

From 85ae7ec6ef926120840d843f6604a9bc818753ca Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Tue, 19 Mar 2024 21:40:01 +0800
Subject: [PATCH 140/144] Fix zlib

---
 cabal.project.release | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cabal.project.release b/cabal.project.release
index c2138c4ac3e..82289e18c82 100644
--- a/cabal.project.release
+++ b/cabal.project.release
@@ -11,3 +11,7 @@ constraints: tar >= 0.6.2.0,
              bzlib >= 0.5.2.0,
              directory >= 1.3.8.3,
              filepath == 1.4.101.0 || == 1.4.300.1 || >= 1.5.2.0
+
+package zlib
+  flags: -pkg-config +bundled-c-zlib
+

From 6aade43145a0572019cf0881664526e53b8baf69 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Tue, 19 Mar 2024 21:47:11 +0800
Subject: [PATCH 141/144] Update validate pipeline

---
 .github/workflows/validate.yml | 110 +--------------------------------
 cabal.project.validate         |  11 ++++
 2 files changed, 13 insertions(+), 108 deletions(-)

diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index abc6655b2e1..ef09f6f8997 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -6,11 +6,6 @@ defaults:
   run:
     shell: bash
 
-# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
-concurrency:
-  group: ${{ github.ref }}-${{ github.workflow }}
-  cancel-in-progress: true
-
 on:
   push:
     branches:
@@ -19,6 +14,7 @@ on:
   release:
     types:
       - created
+  workflow_dispatch:
 
 env:
   # We choose a stable ghc version across all os's
@@ -38,23 +34,7 @@ jobs:
     strategy:
       matrix:
         os: ["ubuntu-20.04", "macos-latest", "windows-latest"]
-        ghc: ["9.4.8", "9.2.8", "9.0.2", "8.10.7", "8.8.4", "8.6.5", "8.4.4"]
-        exclude:
-          # Run takes 4+ hours
-          - os: "windows-latest"
-            ghc: "9.0.2"
-          # corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356
-          - os: "windows-latest"
-            ghc: "8.10.7"
-          # lot of segfaults caused by ghc bugs
-          - os: "windows-latest"
-            ghc: "8.8.4"
-          # it also throws segfaults randomly
-          - os: "windows-latest"
-            ghc: "8.4.4"
-          # it often randomly does "C:\Users\RUNNER~1\AppData\Local\Temp\ghcFEDE.c: DeleteFile "\\\\?\\C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\ghcFEDE.c": permission denied (Access is denied.)"
-          - os: "windows-latest"
-            ghc: "8.6.5"
+        ghc: ["9.2.8"]
 
     steps:
 
@@ -321,76 +301,6 @@ jobs:
         if: ( runner.os != 'Windows' ) && ( matrix.cli != 'false' )
         run: sh validate.sh $FLAGS -s cli-suite
 
-  validate-old-ghcs:
-    name: Validate old ghcs ${{ matrix.extra-ghc }}
-    runs-on: ubuntu-20.04
-    needs: validate
-    # This job needs an older ubuntu (16.04) cause
-    # the required old ghcs using the `-dyn` flavour
-    # are not installable from ppa/hvr in newer ones
-    # see https://github.com/haskell/cabal/issues/8011
-    container:
-      image: phadej/ghc:8.8.4-xenial
-
-    strategy:
-      matrix:
-        # Newer ghc versions than 8.8.4 have to be installed with ghcup cause
-        # they are not available in ppa/hvr. The ghcup installation
-        # needs `sudo` which is not available in the xenial container
-        ghc: ["8.8.4"]
-        extra-ghc: ["7.10.3", "7.8.4", "7.6.3", "7.4.2", "7.2.2", "7.0.4"]
-
-    steps:
-
-      # We can't use actions/checkout with the xenial docker container
-      # cause it does not work with the git version included in it, see:
-      # https://github.com/actions/checkout/issues/170
-      # https://github.com/actions/checkout/issues/295
-      # - uses: actions/checkout@v3
-      - name: Checkout
-        run: |
-          echo $GITHUB_REF $GITHUB_SHA
-          git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
-          git fetch origin $GITHUB_SHA:temporary-ci-branch
-          git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
-
-      - name: Install extra compiler
-        run: |
-          apt-get update
-          apt-get install -y ghc-${{ matrix.extra-ghc }}-dyn
-
-      - uses: haskell-actions/setup@v2
-        id: setup-haskell
-        with:
-          ghc-version: ${{ matrix.ghc }}
-          # Make sure this bindist works in this old environment
-          cabal-version: 3.10.1.0
-
-      # As we are reusing the cached build dir from the previous step
-      # the generated artifacts are available here,
-      # including the cabal executable and the test suite
-      - uses: actions/cache@v3
-        with:
-          path: |
-            ${{ steps.setup-haskell.outputs.cabal-store }}
-            dist-*
-          key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
-          restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419-
-
-      - name: Install cabal-plan
-        run: |
-          cd $(mktemp -d)
-          cabal install cabal-plan --constraint='cabal-plan +exe'
-          echo "$HOME/.cabal/bin" >> $GITHUB_PATH
-
-      - name: Validate build
-        run: sh validate.sh ${{ env.COMMON_FLAGS }} -s build
-
-      - name: "Validate lib-suite-extras --extra-hc ghc-${{ matrix.extra-ghc }}"
-        env:
-          EXTRA_GHC: "/opt/ghc/${{ matrix.extra-ghc }}/bin/ghc-${{ matrix.extra-ghc }}"
-        run: sh validate.sh ${{ env.COMMON_FLAGS }} --lib-only -s lib-suite-extras --extra-hc ${{ env.EXTRA_GHC }}
-
   # The previous jobs use a released version of cabal to build cabal HEAD itself
   # This one uses the cabal HEAD generated executable in the previous step
   # to build itself again, as sanity check
@@ -448,19 +358,3 @@ jobs:
       - name: Build using cabal HEAD
         run: sh validate.sh ${{ env.COMMON_FLAGS }} --with-cabal ./cabal-head/cabal -s build
 
-  # We use this job as a summary of the workflow
-  # It will fail if any of the previous jobs does it
-  # This way we can use it exclusively in branch protection rules
-  # and abstract away the concrete jobs of the workflow, including their names
-  validate-post-job:
-    if: always()
-    name: Validate post job
-    runs-on: ubuntu-20.04
-    # IMPORTANT! Any job added to the workflow should be added here too
-    needs: [validate, validate-old-ghcs, dogfooding]
-
-    steps:
-      - run: |
-          echo "jobs info: ${{ toJSON(needs) }}"
-      - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
-        run: exit 1
diff --git a/cabal.project.validate b/cabal.project.validate
index 66e823f62b1..2eb9e3558aa 100644
--- a/cabal.project.validate
+++ b/cabal.project.validate
@@ -30,3 +30,14 @@ package cabal-testsuite
   ghc-options: -Werror
 package cabal-install
   ghc-options: -Werror
+
+constraints: tar >= 0.6.2.0,
+             bzlib-conduit >= 0.3.0.3,
+             bz2 >= 1.0.1.1,
+             bzlib >= 0.5.2.0,
+             directory >= 1.3.8.3,
+             filepath == 1.4.101.0 || == 1.4.300.1 || >= 1.5.2.0
+
+package zlib
+  flags: -pkg-config +bundled-c-zlib
+

From 0ed0328ead278cef9117b9124ef9dea8e2037f85 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Tue, 19 Mar 2024 22:56:57 +0800
Subject: [PATCH 142/144] Add FreeBSD

---
 .github/scripts/env.sh         |  4 ++++
 .github/workflows/release.yaml | 35 +++++++++++++++++++++++++++++++++-
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/.github/scripts/env.sh b/.github/scripts/env.sh
index 7c163766d3c..ec351f75f86 100644
--- a/.github/scripts/env.sh
+++ b/.github/scripts/env.sh
@@ -17,6 +17,10 @@ export BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=no
 export BOOTSTRAP_HASKELL_INSTALL_NO_STACK=yes
 export BOOTSTRAP_HASKELL_ADJUST_BASHRC=1
 
+if [ "${RUNNER_OS}" = "freebsd" ] ; then
+    export RUNNER_OS=FreeBSD
+fi
+
 if [ "${RUNNER_OS}" = "Windows" ] ; then
     # on windows use pwd to get unix style path
     CI_PROJECT_DIR="$(pwd)"
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index a7f559a0b1a..35f43b2680e 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -366,9 +366,42 @@ jobs:
           path: |
             ./out/*
 
+  build-freebsd-x86_64:
+    name: Build FreeBSD x86_64
+    runs-on: [self-hosted, FreeBSD, X64]
+    env:
+      ADD_CABAL_ARGS: ""
+      ARTIFACT: "x86_64-portbld-freebsd"
+      ARCH: 64
+      TARBALL_EXT: tar.xz
+      DISTRO: na
+      GHC_VERSION: 9.2.8
+      RUNNER_OS: FreeBSD
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v3
+
+      - name: Run build
+        run: |
+          sed -i.bak -e 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
+          pkg install -y ghc hs-cabal-install git bash misc/compat10x misc/compat11x misc/compat12x gmake llvm14 libiconv
+          tzsetup Etc/GMT
+          adjkerntz -a
+          bash .github/scripts/build.sh
+
+      - if: always()
+        name: Upload artifact
+        uses: actions/upload-artifact@v3
+        with:
+          if-no-files-found: error
+          retention-days: 2
+          name: artifacts
+          path: |
+            ./out/*
+
   release:
     name: release
-    needs: ["build-linux", "build-linux-32bit", "build-arm", "build-mac-x86_64", "build-mac-aarch64", "build-win"]
+    needs: ["build-linux", "build-linux-32bit", "build-arm", "build-mac-x86_64", "build-mac-aarch64", "build-win", "build-freebsd-x86_64"]
     runs-on: ubuntu-latest
     if: startsWith(github.ref, 'refs/tags/')
     steps:

From 589a066a3e454175c8ce4a25bfe956cf71542535 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Tue, 19 Mar 2024 23:41:50 +0800
Subject: [PATCH 143/144] Update release scripts

---
 scripts/release/download-gh-artifacts.sh | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/scripts/release/download-gh-artifacts.sh b/scripts/release/download-gh-artifacts.sh
index efe77d1a720..beb6550a5f8 100755
--- a/scripts/release/download-gh-artifacts.sh
+++ b/scripts/release/download-gh-artifacts.sh
@@ -18,18 +18,15 @@ done
 
 mkdir -p "gh-release-artifacts/cabal-${VERSION}"
 
+git archive --format=tar.gz -o "gh-release-artifacts/${RELEASE}/cabal-${TAG}-src.tar.gz" --prefix="cabal-${TAG}/" HEAD
+
 cd "gh-release-artifacts/cabal-${VERSION}"
 
 # github
 gh release download "$RELEASE"
 
-# cirrus
-curl --fail -L -o "cabal-install-${VERSION}-x86_64-portbld-freebsd.tar.xz" \
-	"https://api.cirrus-ci.com/v1/artifact/github/haskell/cabal/build/binaries/out/cabal-install-${VERSION}-x86_64-portbld-freebsd.tar.xz?branch=${RELEASE}"
-
-
 sha256sum ./* > SHA256SUMS
 gpg --detach-sign -u "${SIGNER}" SHA256SUMS
 
-gh release upload "$RELEASE" "cabal-install-${VERSION}-x86_64-portbld-freebsd.tar.xz" SHA256SUMS SHA256SUMS.sig
+gh release upload "$RELEASE" "cabal-${TAG}-src.tar.gz" SHA256SUMS SHA256SUMS.sig
 

From 05fe81241c1ad3576fb59ee4df461d87bc0e035b Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Tue, 19 Mar 2024 23:54:31 +0800
Subject: [PATCH 144/144] Fixes

---
 scripts/release/create-yaml-snippet.sh   | 6 +++---
 scripts/release/download-gh-artifacts.sh | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/release/create-yaml-snippet.sh b/scripts/release/create-yaml-snippet.sh
index df072d4de3b..1cfeda5f997 100755
--- a/scripts/release/create-yaml-snippet.sh
+++ b/scripts/release/create-yaml-snippet.sh
@@ -7,7 +7,7 @@ RELEASE=$1
 VERSION=${RELEASE#cabal-install-v}
 
 cd "gh-release-artifacts/cabal-${VERSION}"
-BASE_URL=https://downloads.haskell.org/~cabal/cabal-install-$VERSION
+BASE_URL=https://downloads.haskell.org/ghcup/unofficial-bindists/cabal/$VERSION
 
 cat <<EOF > /dev/stdout
     $VERSION:
@@ -50,10 +50,10 @@ cat <<EOF > /dev/stdout
             '< 33': &cabal-${VERSION//./}-64-fedora27
               dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-fedora27.tar.xz
               dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-fedora27.tar.xz" | awk '{ print $1 }')
-			'(>= 33 && < 37)': &cabal-${VERSION//./}-64-fedora33
+            '(>= 33 && < 37)': &cabal-${VERSION//./}-64-fedora33
               dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-fedora33.tar.xz
               dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-fedora33.tar.xz" | awk '{ print $1 }')
-			'>= 37': &cabal-${VERSION//./}-64-fedora37
+            '>= 37': &cabal-${VERSION//./}-64-fedora37
               dlUri: ${BASE_URL}/cabal-install-$VERSION-x86_64-linux-fedora37.tar.xz
               dlHash: $(sha256sum "cabal-install-$VERSION-x86_64-linux-fedora37.tar.xz" | awk '{ print $1 }')
             unknown_versioning: *cabal-${VERSION//./}-64-fedora27
diff --git a/scripts/release/download-gh-artifacts.sh b/scripts/release/download-gh-artifacts.sh
index beb6550a5f8..38c57169187 100755
--- a/scripts/release/download-gh-artifacts.sh
+++ b/scripts/release/download-gh-artifacts.sh
@@ -18,7 +18,7 @@ done
 
 mkdir -p "gh-release-artifacts/cabal-${VERSION}"
 
-git archive --format=tar.gz -o "gh-release-artifacts/${RELEASE}/cabal-${TAG}-src.tar.gz" --prefix="cabal-${TAG}/" HEAD
+git archive --format=tar.gz -o "gh-release-artifacts/cabal-${VERSION}/cabal-${VERSION}-src.tar.gz" --prefix="cabal-${VERSION}/" HEAD
 
 cd "gh-release-artifacts/cabal-${VERSION}"
 
@@ -28,5 +28,5 @@ gh release download "$RELEASE"
 sha256sum ./* > SHA256SUMS
 gpg --detach-sign -u "${SIGNER}" SHA256SUMS
 
-gh release upload "$RELEASE" "cabal-${TAG}-src.tar.gz" SHA256SUMS SHA256SUMS.sig
+gh release upload "$RELEASE" "cabal-${VERSION}-src.tar.gz" SHA256SUMS SHA256SUMS.sig