Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bullseye variant of 9.6.6 images #137

Merged
merged 7 commits into from
Aug 12, 2024

Conversation

jhrcek
Copy link
Collaborator

@jhrcek jhrcek commented Aug 10, 2024

I'm trying to emulate what was done for 9.10 in #134

I basically copy-pasted buster dockerfiles, and just changed deb10 -> deb11 (+ updated checksums).
After noticing that deb11 variant of 9.6.6 ghc binaries don't exist, I asked on ghc matrix and Julian Osphald (ghcup dev) told me it shouldn't matter, because deb10 binaries should be binary compatible with deb11, so I should use those insead.

Here's the output of git diff --no-index 9.6/slim-buster/Dockerfile 9.6/slim-bullseye/Dockerfile which makes it clearer how the new bullseye images differ from buster ones.

diff --git a/9.6/slim-buster/Dockerfile b/9.6/slim-bullseye/Dockerfile
index 66d2100..837726b 100644
--- a/9.6/slim-buster/Dockerfile
+++ b/9.6/slim-bullseye/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian:buster-slim
+FROM debian:bullseye-slim
 
 ENV LANG C.UTF-8
 
@@ -63,16 +63,16 @@ ARG CABAL_INSTALL_RELEASE_KEY=EAF2A9A722C0C96F2B431CA511AAD8CEDEE0CAEF
 RUN set -eux; \
     cd /tmp; \
     ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \
-    CABAL_INSTALL_TAR="cabal-install-$CABAL_INSTALL-$ARCH-linux-deb10.tar.xz"; \
+    CABAL_INSTALL_TAR="cabal-install-$CABAL_INSTALL-$ARCH-linux-deb11.tar.xz"; \
     CABAL_INSTALL_URL="https://downloads.haskell.org/~cabal/cabal-install-$CABAL_INSTALL/$CABAL_INSTALL_TAR"; \
     CABAL_INSTALL_SHA256SUMS_URL="https://downloads.haskell.org/~cabal/cabal-install-$CABAL_INSTALL/SHA256SUMS"; \
     # sha256 from https://downloads.haskell.org/~cabal/cabal-install-$CABAL_INSTALL/SHA256SUMS
     case "$ARCH" in \
         'aarch64') \
-            CABAL_INSTALL_SHA256='92d341620c60294535f03098bff796ef6de2701de0c4fcba249cde18a2923013'; \
+            CABAL_INSTALL_SHA256='e0b6604d3596c5e5b7236e79ff4f5aa8af337792bf69ac4a90634c761f1b9ed5'; \
             ;; \
         'x86_64') \
-            CABAL_INSTALL_SHA256='1d7a7131402295b01f25be5373fde095a404c45f9b5a5508fb7474bb0d3d057a'; \
+            CABAL_INSTALL_SHA256='12d018bdd07efed470f278f22d94b33655c4fcbc44d28d97b5ebb7944d5607c5'; \
             ;; \
         *) echo >&2 "error: unsupported architecture '$ARCH'"; exit 1 ;; \
     esac; \
@@ -100,14 +100,17 @@ ARG GHC_RELEASE_KEY=88B57FCF7DB53B4DB3BFA4B1588764FBE22D19C4
 RUN set -eux; \
     cd /tmp; \
     ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \
-    GHC_URL="https://downloads.haskell.org/~ghc/$GHC/ghc-$GHC-$ARCH-deb10-linux.tar.xz"; \
     # sha256 from https://downloads.haskell.org/~ghc/$GHC/SHA256SUMS
     case "$ARCH" in \
         'aarch64') \
+            # Note: the 'aarch64-deb11' (bullseye) variant of images doesn't exist in https://downloads.haskell.org/~ghc/9.6.6/
+            # But deb10 (buster) images should be binary compatible with deb11, so using deb10 instead
+            GHC_URL="https://downloads.haskell.org/~ghc/$GHC/ghc-$GHC-$ARCH-deb10-linux.tar.xz"; \
             GHC_SHA256='58d5ce65758ec5179b448e4e1a2f835924b4ada96cf56af80d011bed87d91fef'; \
             ;; \
         'x86_64') \
-            GHC_SHA256='15ee68cede5d114a672fb468b9545700edd70a68724ab4e9122c8a23aba8570b'; \
+            GHC_URL="https://downloads.haskell.org/~ghc/$GHC/ghc-$GHC-$ARCH-deb11-linux.tar.xz"; \
+            GHC_SHA256='a34bdfc1f65b000135d9c8eb12d69670026a64043a8b33ef5ba24b0f8e28d046'; \
             ;; \
         *) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \
     esac; \

@jhrcek jhrcek changed the title Add bullseye variant of 9.6 images Add bullseye variant of 9.6.6 images Aug 12, 2024
@jhrcek jhrcek force-pushed the jan/9.6.6-bullseye branch 2 times, most recently from 54e875a to e1e194b Compare August 12, 2024 06:01
@develop7
Copy link
Collaborator

develop7 commented Aug 12, 2024

Hi, I still can't see any 9.6.6-bullseye jobs on aarch64 so far

@jhrcek
Copy link
Collaborator Author

jhrcek commented Aug 12, 2024

There you go, added 9.10 and 9.6 aarch64 jobs.
Do you find the "deb10 ghc binaries in bullseye" workaround acceptable?

@jhrcek jhrcek marked this pull request as ready for review August 12, 2024 07:55
@develop7
Copy link
Collaborator

As long as it passes tests, yes, it's probably fine. I've tried it myself, but it failed for some reason.

Copy link
Collaborator

@develop7 develop7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix deps (my bad originally, for which I'm sorry)

9.6/bullseye/Dockerfile Show resolved Hide resolved
@jhrcek
Copy link
Collaborator Author

jhrcek commented Aug 12, 2024

I've tried it myself, but it failed for some reason.

Looking at your PR (which I didn't notice exists 😅 ) I see you got the same error as me

WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested
25l[+] Building 0.0s (0/0) docker:default
25hERROR: "" is an invalid component of "linux/": platform specifier component must match "^[A-Za-z0-9_-]+$": invalid argument

..which I fixed by adding explicit docker_platform argument here

Copy link
Collaborator

@develop7 develop7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@develop7 develop7 merged commit 45be610 into haskell:master Aug 12, 2024
25 checks passed
@develop7
Copy link
Collaborator

which I fixed by adding explicit docker_platform argument here

oh that's how it's done. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants