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

docker: Remove Arch support from Debian-based container #484

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ jobs:
test: { name: "debian (arm64)", case: "debian", variables: "-t architecture:arm64" }
- backend: kvm
test: { name: "debian (armhf)", case: "debian", variables: "-t architecture:armhf" }
- backend: kvm
test: { name: "arch", case: "arch" }
# TODO Arch tests are disabled; waiting for https://github.com/go-debos/debos/issues/483
#- backend: kvm
# test: { name: "arch", case: "arch" }
- backend: kvm
test: { name: "apertis", case: "apertis" }
name: ${{matrix.test.name}} on ${{matrix.backend}}
Expand Down
29 changes: 1 addition & 28 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,6 @@ COPY . $GOPATH/src/github.com/go-debos/debos
WORKDIR $GOPATH/src/github.com/go-debos/debos/cmd/debos
RUN go install ./...

# Install the latest archlinux-keyring, since the one in Debian is bound
# to get outdated sooner or later.
# WARNING: returning to the debian package will break the pacstrap action
RUN apt-get update && \
apt-get install -y --no-install-recommends \
pkgconf \
python3-all \
sq \
systemd \
make && \
rm -rf /var/lib/apt/lists/*

RUN git clone https://gitlab.archlinux.org/archlinux/archlinux-keyring && \
Copy link
Member

Choose a reason for hiding this comment

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

the problem is not so much arch; the problem is trying to rebuild their keyring. The debian packaging for this simply uses the prebuild keyrings instead (part of every release)

Copy link
Member Author

Choose a reason for hiding this comment

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

right so it seems like a prebuilt version is available at https://gitlab.archlinux.org/archlinux/archlinux-keyring/-/releases/20240208 , but there is no endpoint for latest release.
I could either:

  1. download the git repo, use the latest tag & hope it has a release
  2. use the gitlab API to get the latest release (e.g https://forum.gitlab.com/t/gitlab-api-get-latest-release-version/48608)
  3. revert the arch bits in the docker container and build a separate docker image for arch

My preference was to do 3, but I could look at 2.

FYI the debian package archlinux-keyring is far too old (currently 0~20221220-2~bpo11+1 in backports)

cd archlinux-keyring && \
git checkout master && \
make build && \
make PREFIX=/usr KEYRING_TARGET_DIR=/usr/share/keyrings/ DESTDIR=/arch-keyring install

### second stage - runner ###
FROM debian:bookworm-slim as runner

Expand Down Expand Up @@ -92,7 +74,6 @@ RUN apt-get update && \
linux-image-amd64 \
openssh-client \
parted \
pkg-config \
qemu-system-x86 \
qemu-user-static \
qemu-utils \
Expand All @@ -105,10 +86,7 @@ RUN apt-get update && \
user-mode-linux \
xfsprogs \
xz-utils \
zip \
makepkg \
pacman-package-manager \
arch-install-scripts && \
zip && \
rm -rf /var/lib/apt/lists/*

# debian's qemu-user-static package no longer registers binfmts
Expand All @@ -119,9 +97,4 @@ RUN for arch in aarch64 alpha arm armeb cris hexagon hppa m68k microblaze mips m

COPY --from=builder $GOPATH/bin/debos /usr/local/bin/debos

# Install the latest archlinux-keyring, since the one in Debian is bound
# to get outdated sooner or later.
# WARNING: returning to the debian package will break the pacstrap action
COPY --from=builder /arch-keyring/usr/share/keyrings /usr/share/keyrings

ENTRYPOINT ["/usr/local/bin/debos"]