From e50ca7c6ab22957ca5e204b4bb80b7cbc7805b1f Mon Sep 17 00:00:00 2001
From: Francesco Gazzetta <fgaz@fgaz.me>
Date: Fri, 15 Mar 2024 11:05:05 +0100
Subject: [PATCH 1/2] changelog-d moved to codeberg

(cherry picked from commit 067967e2107c6b4809d75150e31e1bd084a51b9a)
---
 .github/workflows/changelogs.yml | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/changelogs.yml b/.github/workflows/changelogs.yml
index c0ec46a6d1b..152c4a86e6c 100644
--- a/.github/workflows/changelogs.yml
+++ b/.github/workflows/changelogs.yml
@@ -48,12 +48,14 @@ jobs:
           ghcup set ghc recommended
       - name: Update Hackage index
         run: cabal v2-update
-      # Cannot install it from tarball due to
+      # Cannot install it directly from remote tarball due to
       # https://github.com/haskell/cabal/issues/7360
-      - uses: actions/checkout@v4
-        with:
-          repository: "fgaz/changelog-d"
-          path: "changelog-d"
+      - name: Fetch changelog-d
+        run: |
+          changelog_d_latest="$(curl https://codeberg.org/api/v1/repos/fgaz/changelog-d/branches/master | jq -r .commit.id)"
+          echo "Using changelog-d revision $changelog_d_latest"
+          curl "https://codeberg.org/fgaz/changelog-d/archive/$changelog_d_latest.tar.gz" -o changelog-d.tar.gz
+          tar -xf changelog-d.tar.gz
       - name: Install changelog-d
         run: |
           pushd changelog-d

From 89191ac627d4a7b25a784458daa8df88e93a6759 Mon Sep 17 00:00:00 2001
From: Francesco Gazzetta <fgaz@fgaz.me>
Date: Fri, 15 Mar 2024 10:46:56 +0100
Subject: [PATCH 2/2] Add required-fields to changelog.d config

(cherry picked from commit 5168b01c1c9934adc711284f67e6333f0491972b)

# Conflicts:
#	changelog.d/issue-8680
#	changelog.d/issue-9098-lexbraces
#	changelog.d/issue-9678
#	changelog.d/issue-9736
#	changelog.d/pkgconfig-once
---
 changelog.d/config               |  1 +
 changelog.d/issue-8680           | 10 ++++++++++
 changelog.d/issue-9098-lexbraces | 19 +++++++++++++++++++
 changelog.d/issue-9678           | 17 +++++++++++++++++
 changelog.d/issue-9736           | 12 ++++++++++++
 changelog.d/pkgconfig-once       |  9 +++++++++
 6 files changed, 68 insertions(+)
 create mode 100644 changelog.d/issue-8680
 create mode 100644 changelog.d/issue-9098-lexbraces
 create mode 100644 changelog.d/issue-9678
 create mode 100644 changelog.d/issue-9736
 create mode 100644 changelog.d/pkgconfig-once

diff --git a/changelog.d/config b/changelog.d/config
index c78b5f5e3f3..f4f1b9e5f57 100644
--- a/changelog.d/config
+++ b/changelog.d/config
@@ -1,2 +1,3 @@
 organization: haskell
 repository:   cabal
+required-fields: packages prs
diff --git a/changelog.d/issue-8680 b/changelog.d/issue-8680
new file mode 100644
index 00000000000..0511f26fe9d
--- /dev/null
+++ b/changelog.d/issue-8680
@@ -0,0 +1,10 @@
+synopsis: `cabal init` should not suggest Cabal < 2.0
+packages: Cabal
+issues: #8680
+prs: #8700
+
+description: {
+
+'cabal init' no longer suggests users to set cabal-version to less than 2.0
+
+}
diff --git a/changelog.d/issue-9098-lexbraces b/changelog.d/issue-9098-lexbraces
new file mode 100644
index 00000000000..b637c08a34b
--- /dev/null
+++ b/changelog.d/issue-9098-lexbraces
@@ -0,0 +1,19 @@
+synopsis: Add LexBraces lexer warning
+packages: Cabal-syntax
+issues: #9098
+prs: #9099
+
+description: {
+
+LexBraces warning is issued when brace delimiting syntax is used.
+This way, using `readFields'`, a low-lever consumer may decide
+whether braces were used.
+
+(Looking for a brace character in the input is imprecise, as braces can occur inside field content).
+
+This warning is not propagated to parser warnings,
+so e.g. readGenericPackageDescription doesn't warn about it.
+This is because all parser warnings prevent uploads to Hackage,
+and using braces (or not) is opinionated choice.
+
+}
diff --git a/changelog.d/issue-9678 b/changelog.d/issue-9678
new file mode 100644
index 00000000000..cdcf8405311
--- /dev/null
+++ b/changelog.d/issue-9678
@@ -0,0 +1,17 @@
+synopsis: Clarify the semantics of the -package-db flag
+packages: cabal-install
+prs:
+issues: #9678
+prs: #9683
+
+description: {
+
+The `--package-db` flag now only applies to the default
+immutable initial package stack rather than also applying to the store
+package database.
+
+This fixes an assertion failure which was triggered when using -package-db and also
+clarifies how it should interact with `--store-dir` and `--dist-dir` flags.
+
+}
+
diff --git a/changelog.d/issue-9736 b/changelog.d/issue-9736
new file mode 100644
index 00000000000..f5a9dc1abee
--- /dev/null
+++ b/changelog.d/issue-9736
@@ -0,0 +1,12 @@
+synopsis: Add support for `GHC2024`
+packages: Cabal cabal-install
+issues: #9736
+prs: #9791
+
+description: {
+
+Support for the `GHC2024` language edition, introduced by GHC 9.10, has been
+added. It can now be used in the `default-language` and `other-languages`
+fields, and will be offered as an option by `cabal init`.
+
+}
diff --git a/changelog.d/pkgconfig-once b/changelog.d/pkgconfig-once
new file mode 100644
index 00000000000..bdb8e4b511b
--- /dev/null
+++ b/changelog.d/pkgconfig-once
@@ -0,0 +1,9 @@
+synopsis: PkgConfig individual calls
+prs: #9134
+packages: cabal-install-solver
+
+description: {
+
+- `cabal` invokes `pkg-config` individually for each lib if querying for all doesn't return the expected result
+
+}