diff --git a/.github/workflows/users-guide.yml b/.github/workflows/users-guide.yml index ac6d65baedb..8047ede1031 100644 --- a/.github/workflows/users-guide.yml +++ b/.github/workflows/users-guide.yml @@ -54,7 +54,7 @@ jobs: submodules: recursive - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.gitignore b/.gitignore index 4ade63478ab..cce07e87bea 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,8 @@ bench.html # I'm unsure how to ignore these generated golden files cabal-testsuite/PackageTests/NewUpdate/RejectFutureIndexStates/cabal.out + +## Release Scripts + +# ignore the downloaded binary files +scripts/release/binary-downloads/ diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal index 8a230ba5e2a..bf1f9e3fcfe 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 49426b34169..6cfbf819b25 100644 --- a/Cabal/Cabal.cabal +++ b/Cabal/Cabal.cabal @@ -41,7 +41,7 @@ library 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.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 b4bfa668702..fe440a78963 100644 --- a/cabal-install-solver/cabal-install-solver.cabal +++ b/cabal-install-solver/cabal-install-solver.cabal @@ -106,7 +106,7 @@ library , Cabal-syntax ^>=3.11 , containers >=0.5.6.2 && <0.8 , 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 eb520c7ff2d..3cb68deb661 100644 --- a/cabal-install/cabal-install.cabal +++ b/cabal-install/cabal-install.cabal @@ -218,7 +218,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 680a77e86f2..677fcdce098 100644 --- a/cabal-testsuite/cabal-testsuite.cabal +++ b/cabal-testsuite/cabal-testsuite.cabal @@ -67,7 +67,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 diff --git a/scripts/release/create-release-metadata-for-ghcup.sh b/scripts/release/create-release-metadata-for-ghcup.sh new file mode 100755 index 00000000000..c8683c2b85c --- /dev/null +++ b/scripts/release/create-release-metadata-for-ghcup.sh @@ -0,0 +1,125 @@ +#!/usr/bin/env bash + +# This script, when passed the cabal release number as the first and only argument +# generates the metadata in the correct format to be useable as is by GHCup +# for eg:- +# $ create-release-metadata-for-ghcup.sh 3.10.2.0 or "3.10.2.0" + +# Note:- Please run ./download-cabal-install-release-binaries.sh before running this script. +set -eu +set -o pipefail + +RELEASE=$1 +## FixMe:// What dir to use here? + +if [ -d "binary-downloads/cabal-install-${RELEASE}-binaries" ]; then + echo "binary downloads folder for release ${RELEASE} found, starting generating GHCup metadata..." +else + echo "The binary downloads for release ${RELEASE} not found." + echo "Please run the script to download them first." +fi + +cd "binary-downloads/cabal-install-${RELEASE}-binaries" + +cat < /dev/stdout + $RELEASE: + viTags: + - Latest + viChangeLog: https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-$RELEASE.md + viPostInstall: *cabal-${RELEASE//./}-post-install + viArch: + A_64: + Linux_UnknownLinux: + unknown_versioning: &cabal-${RELEASE//./}-64 + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-alpine3_12.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-alpine3_12.tar.xz" | awk '{ print $1 }') + Linux_Alpine: + unknown_versioning: &cabal-${RELEASE//./}-64 + Linux_CentOS: + unknown_versioning: &cabal-${RELEASE//./}-64-centos7 + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-centos7.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-centos7.tar.xz" | awk '{ print $1 }') + Linux_Debian: + ' ( >= 9 && < 10)': &cabal-${RELEASE//./}-64-debian + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-deb9.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-deb9.tar.xz" | awk '{ print $1 }') + ' ( == 10 && < 11)': + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-deb10.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-deb10.tar.xz" | awk '{ print $1 }') + ' ( >= 11)': + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-deb11.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-deb11.tar.xz" | awk '{ print $1 }') + unknown_versioning: &cabal-${RELEASE//./}-64-debian + Linux_Fedora: + '>= 33': + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-fedora33.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-fedora33.tar.xz" | awk '{ print $1 }') + unknown_versioning: &cabal-${RELEASE//./}-64-centos7 + Linux_Ubuntu: + '< 20': &cabal-${RELEASE//./}-64-ubuntu18 + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-ubuntu18_04.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-ubuntu18_04.tar.xz" | awk '{ print $1 }') + '>= 20': &cabal-${RELEASE//./}-64-ubuntu20 + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-linux-ubuntu20_04.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-linux-ubuntu20_04.tar.xz" | awk '{ print $1 }') + unknown_versioning: *cabal-${RELEASE//./}-64-ubuntu18 + Linux_Mint: + '< 20': *cabal-${RELEASE//./}-64-ubuntu18 + '>= 20': *cabal-${RELEASE//./}-64-ubuntu20 + unknown_versioning: *cabal-${RELEASE//./}-64-ubuntu18 + Darwin: + unknown_versioning: + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-darwin.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-darwin.tar.xz" | awk '{ print $1 }') + Windows: + unknown_versioning: + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-windows.zip + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-windows.zip" | awk '{ print $1 }') + FreeBSD: + unknown_versioning: + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-x86_64-freebsd.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-x86_64-freebsd.tar.xz" | awk '{ print $1 }') + A_32: + Linux_UnknownLinux: + unknown_versioning: &cabal-${RELEASE//./}-32 + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-i386-linux-alpine3_12.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-i386-linux-alpine3_12.tar.xz" | awk '{ print $1 }') + Linux_Alpine: + unknown_versioning: *cabal-${RELEASE//./}-32 + Linux_Debian: + '( >= 9 )': + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-i386-linux-deb9.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-i386-linux-deb9.tar.xz" | awk '{ print $1 }') + unknown_versioning: *cabal-${RELEASE//./}-32 + A_ARM64: + Darwin: + unknown_versioning: + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-aarch64-darwin.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-aarch64-darwin.tar.xz" | awk '{ print $1 }') + Linux_Debian: + '( >= 10 && < 11)': &cabal-31020-arm64 + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-aarch64-linux-deb10.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-aarch64-linux-deb10.tar.xz" | awk '{ print $1 }') + '( >= 11)': + dlUri: https://downloads.haskell.org/~cabal/cabal-install-$RELEASE/cabal-install-$RELEASE-aarch64-linux-deb11.tar.xz + dlSubdir: cabal-install-$RELEASE + dlHash: $(sha256sum "cabal-install-$RELEASE-aarch64-linux-deb11.tar.xz" | awk '{ print $1 }') + unknown_versioning: *cabal-${RELEASE//./}-arm64 + Linux_UnknownLinux: + unknown_versioning: *cabal-${RELEASE//./}-arm64 +EOF diff --git a/scripts/release/download-cabal-install-release-binaries.sh b/scripts/release/download-cabal-install-release-binaries.sh new file mode 100755 index 00000000000..4547fd910e8 --- /dev/null +++ b/scripts/release/download-cabal-install-release-binaries.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +# A script to download the release binary files for a given cabal release +# from upstream "downlods.haskell.org". +# It accepts the first and only argument as the release number. +# +# useage:- +# $ download-cabal-install-release-binaries.sh "3.10.1.0" +# +# This was initally made to be used with ./create-release-metadata-for-ghcup.sh + +set -eu +set -o pipefail + +RELEASE=$1 + +echo "RELEASE: $RELEASE" + +for com in wget sha256sum ; do + command -V ${com} >/dev/null 2>&1 +done + +[ ! -d "binary-downloads/cabal-install-${RELEASE}-binaries" ] + +mkdir -p "binary-downloads/cabal-install-${RELEASE}-binaries" + +cd "binary-downloads/cabal-install-${RELEASE}-binaries" + +## Download release files +echo "Downloading form: \"https://downloads.haskell.org/~cabal/cabal-install-${RELEASE}/\"" +wget --no-parent -r --reject "index.html*" --no-directories "https://downloads.haskell.org/~cabal/cabal-install-${RELEASE}/" + +## Verify that sha256 sums of downloaded files match the ones mentioned in the upstream SHA256SUMS file +echo "verifying checksums for downloaded files..." + +if sha256sum --check ./SHA256SUMS; then + echo "All checksums match!" + echo "Successfully downloaded binaries for release: ${RELEASE}" +else + echo "checksums of downloaded files do no match the ones listed in upstream SHA256SUMS file." + echo "please try deleting \"binary-downloads/cabal-install-${RELEASE}-binaries\" folder and downloading again." +fi