From e9d5c0be15ceb4c0df454920c1ecf0d7edbba0de Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Thu, 12 Dec 2024 10:40:27 +0000 Subject: [PATCH 1/5] fix(images/base): work around broken packagekit on armv7 --- images/base/git-core-ubuntu-ppa-noble.sources | 34 +++++++++++++++++++ images/base/ubuntu.Dockerfile | 11 ++++-- 2 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 images/base/git-core-ubuntu-ppa-noble.sources diff --git a/images/base/git-core-ubuntu-ppa-noble.sources b/images/base/git-core-ubuntu-ppa-noble.sources new file mode 100644 index 0000000..bf4b6a2 --- /dev/null +++ b/images/base/git-core-ubuntu-ppa-noble.sources @@ -0,0 +1,34 @@ +Types: deb +URIs: https://ppa.launchpadcontent.net/git-core/ppa/ubuntu/ +Suites: noble +Components: main +Signed-By: + -----BEGIN PGP PUBLIC KEY BLOCK----- + . + mQINBGYo2OYBEADVRjI+o29u9izslaVr0Xqj8hpmo/2su/Iey1PgoS6A3hMxR4R4 + eZ3u9dRh/gRHXNjxqRMfKj88G6ciqa/7ty8Vfc1eKl3z7yjL1pWOEzcGLKaSB8qd + MmsxCw31nFNEbzlymgK0+KPubQ5OrIzeSikpfDVGT4HLgO42ppGY+cVy2/bbNv6O + mmPXcw8gkxRCWFiGAO5jJYG1SyGbhr9Krbf6o+LDUJeDYPTQRMf702IYZ8Bp00ix + HyK2YOUNM14rr7092o2dw9GKxnJszF4cET+LxRddrREuB3sBlAZav/I0hZtQsKZ3 + QTvpStf2MwIy8Ymj94+BsZaktP0d36wigGn8RWJHrhSVyjujS8YxWRWdjrLUI1ra + 42pyIYZi39IXtsTM71rihQVrsEHbMQ7a5HGRK6eYyHVPrtsXXykNqhVPekLNiFWm + IekoSH1EwMsQv8y+k3nkCwTCkTHJaueB7awee0Zs5QBwbCm+qPyqCXoVDLEwdQOr + CHKAfNADtsFQsk/yiTC/+Lmtur/okp38VpJWXg8DphHFjd1KwqQ5E9qZi+tXs/JD + UXd93VBUdoGGaHK9fj/URxUBOVopGaOXGVYtGFWPn9q8MaNcrESZ48sXDfsVgUVD + RJ4puKLHjIUtDlCnMQO6lekIhEo4sxtbDnwIUmQp7B9l+U99u+uzBI96cQARAQAB + tChMYXVuY2hwYWQgUFBBIGZvciBVYnVudHUgR2l0IE1haW50YWluZXJziQJOBBMB + CgA4FiEE+RGrGEMXYwxZlwlz42PJD48bYhcFAmYo2OYCGwMFCwkIBwIGFQoJCAsC + BBYCAwECHgECF4AACgkQ42PJD48bYhdwUQ//UFR3i/6zpizJMTA9mpz7hGC9IJV8 + UDoWoaVgl+OR1Ldfz+jvr3K55LZyIMU1o6bbLqbEnoWa2VpRv2za/SCbPqo1igio + p97EJ2irGytFOhCDd+o3s0djfsXpA7jygAK6COnMx3ejnPhaBA194HbYDhp7KA5b + gZcqvYeRN1qk9QL99voFYeUWAPnqkLLrNuAcq9qTotmyYZQI61rdAH8P4odgMtU7 + UiS4yLirkAiNCqT+TK07EXvaWSXcqZhgt1HmP+BZhrx/vLT4FlH52CCjamQWeFA2 + mLKX/RSx/JTux1UDroX6L9JdUyMzOrLk22Zz9Tb3FK2ysHy72jRKmUv87ctIMcgD + u8BY3Mfe/Rw8vPMuBEaAsVfvWl7uYSt81dzjkxtt6ZvIFF5PBR2IhFJVosDbpSnk + g9/b22Ipjta3ULW8oOaNZjdcRNQ5StpApzZIUoZoP83ZWafwQoSrW7Rz3KvwYAdL + d3OAfuiW9i7YdLCkvaujBt6KA4tn56fcsp14FzLZrgcj+7XUpW4/yEJFHCCu5f2l + NWvN37suUTfzbMLZVS6rC1s3qrjOD+C3dvL/dCUlcTfrrsTcs/UnaVXFq0V6NLhA + ZZxOIVUedn7nGKbaecwTt6taIjpxj0jCBxWy6RcysIkv2xluRcl2UY+HapB8x1Dx + 8giHUSvkXHr4c7I= + =yxbG + -----END PGP PUBLIC KEY BLOCK----- \ No newline at end of file diff --git a/images/base/ubuntu.Dockerfile b/images/base/ubuntu.Dockerfile index 2744e93..d0424ad 100644 --- a/images/base/ubuntu.Dockerfile +++ b/images/base/ubuntu.Dockerfile @@ -30,16 +30,21 @@ RUN apt-get update && \ pipx \ python3 \ python3-pip \ - software-properties-common \ + # software-properties-common \ sudo \ systemd \ systemd-sysv \ unzip \ vim \ wget \ - rsync && \ + rsync + # Install latest Git using their official PPA - add-apt-repository ppa:git-core/ppa && \ +# Note: due to a dependency issue with the armv7 `software-properties-common` package, +# we can't use `add-apt-repository` here. Instead, we'll add the Git PPA +# manually. TODO: remove this workaround when the issue is resolved. +COPY git-core-ubuntu-ppa-noble.sources /etc/apt/sources.list.d/git-core-ubuntu-ppa-noble.sources +RUN apt-get update && \ apt-get install --yes git \ && rm -rf /var/lib/apt/lists/* From 45f5261f9a6956beb972c6bb4843ef1984e8a258 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Thu, 12 Dec 2024 10:57:47 +0000 Subject: [PATCH 2/5] add reference to upstream launchpad issue --- images/base/ubuntu.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/images/base/ubuntu.Dockerfile b/images/base/ubuntu.Dockerfile index d0424ad..b8eda12 100644 --- a/images/base/ubuntu.Dockerfile +++ b/images/base/ubuntu.Dockerfile @@ -43,6 +43,7 @@ RUN apt-get update && \ # Note: due to a dependency issue with the armv7 `software-properties-common` package, # we can't use `add-apt-repository` here. Instead, we'll add the Git PPA # manually. TODO: remove this workaround when the issue is resolved. +# Ref: https://bugs.launchpad.net/cloud-images/+bug/2091619 COPY git-core-ubuntu-ppa-noble.sources /etc/apt/sources.list.d/git-core-ubuntu-ppa-noble.sources RUN apt-get update && \ apt-get install --yes git \ From 6ca365167cc45ee0ec3a693d5b87625c2232db5b Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Thu, 12 Dec 2024 11:01:40 +0000 Subject: [PATCH 3/5] fmt --- images/base/ubuntu.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/base/ubuntu.Dockerfile b/images/base/ubuntu.Dockerfile index b8eda12..461f0a6 100644 --- a/images/base/ubuntu.Dockerfile +++ b/images/base/ubuntu.Dockerfile @@ -30,7 +30,7 @@ RUN apt-get update && \ pipx \ python3 \ python3-pip \ - # software-properties-common \ +# software-properties-common \ sudo \ systemd \ systemd-sysv \ From a5c319047aa9ee4a53499c635cbc06ac7f0ab4ac Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Thu, 12 Dec 2024 11:12:39 +0000 Subject: [PATCH 4/5] ensure compat --- images/base/ubuntu.Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/images/base/ubuntu.Dockerfile b/images/base/ubuntu.Dockerfile index 461f0a6..0b1b2e6 100644 --- a/images/base/ubuntu.Dockerfile +++ b/images/base/ubuntu.Dockerfile @@ -39,6 +39,9 @@ RUN apt-get update && \ wget \ rsync +# Compat: on non-armv7 architectures, install `software-properties-common` +RUN [[ "$(dpkg --print-architecture)" != "armhf" ]] && apt-get install --yes software-properties-common || echo "WARN: Skipping software-properties-common installation on armhf" + # Install latest Git using their official PPA # Note: due to a dependency issue with the armv7 `software-properties-common` package, # we can't use `add-apt-repository` here. Instead, we'll add the Git PPA From f8f1b4b837e6c3af61ebd23e37834a570b44f7d9 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Thu, 12 Dec 2024 11:24:23 +0000 Subject: [PATCH 5/5] add suggestions from review --- images/base/ubuntu.Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/images/base/ubuntu.Dockerfile b/images/base/ubuntu.Dockerfile index 0b1b2e6..579cad0 100644 --- a/images/base/ubuntu.Dockerfile +++ b/images/base/ubuntu.Dockerfile @@ -37,10 +37,16 @@ RUN apt-get update && \ unzip \ vim \ wget \ - rsync + rsync && \ + rm -rf /var/lib/apt/lists/* # Compat: on non-armv7 architectures, install `software-properties-common` -RUN [[ "$(dpkg --print-architecture)" != "armhf" ]] && apt-get install --yes software-properties-common || echo "WARN: Skipping software-properties-common installation on armhf" +RUN [[ "$(dpkg --print-architecture)" != "armhf" ]] && \ + ( \ + apt-get update && \ + apt-get install --yes software-properties-common && \ + rm -rf /var/lib/apt/lists/* \ + ) || echo "WARN: Skipping software-properties-common installation on armhf" # Install latest Git using their official PPA # Note: due to a dependency issue with the armv7 `software-properties-common` package,