Skip to content

Commit

Permalink
fix(arch): fix GnuPG issues during AUR update
Browse files Browse the repository at this point in the history
Installing packages with ghcr.io/quick-lint/quick-lint-js-dist-arch:v8
fails:

    error: rhash: signature from "Johannes Löthberg <[email protected]>" is unknown trust
    :: File /var/cache/pacman/pkg/rhash-1.4.4-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: libisl: signature from "Frederik Schwan <[email protected]>" is unknown trust
    :: File /var/cache/pacman/pkg/libisl-0.26-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: gcc: signature from "Frederik Schwan <[email protected]>" is unknown trust
    :: File /var/cache/pacman/pkg/gcc-13.2.1-3-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: failed to commit transaction (invalid or corrupted package)
    Errors occurred, no packages were upgraded.
    ==> ERROR: 'pacman' failed to install missing dependencies.
    ==> Missing dependencies:
      -> cmake
      -> gcc
      -> ninja
    ==> ERROR: Could not resolve all dependencies.

Fix this by updating archlinux:base and rebuilding the Docker image.

Updating exposed another issue. The built image contains a lock file,
and that lock file causes GnuPG to hang. Work around the hang by
deleting the lock file from the image.
  • Loading branch information
strager committed Jan 15, 2024
1 parent c18562c commit 66d8f76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions dist/arch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ USER qljs-builder
# $ tar ch -C dist/arch/ . | docker build -
COPY quick-lint-js.gpg.key /tmp/quick-lint-js.gpg.key
RUN gpg --import /tmp/quick-lint-js.gpg.key
# HACK(strager): For some reason, if the lock file remains, using
# GnuPG to verify signatures hangs. Avoid these hangs by deleting the
# lock file now.
RUN gpgconf --kill gpg-agent && \
rm -f ~/.gnupg/public-keys.d/pubring.db.lock

# quick-lint-js finds bugs in JavaScript programs.
# Copyright (C) 2020 Matthew "strager" Glazar
Expand Down
2 changes: 1 addition & 1 deletion dist/arch/update-aur.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ docker=0
test=0
qljsaur=

docker_image=ghcr.io/quick-lint/quick-lint-js-dist-arch:v8
docker_image=ghcr.io/quick-lint/quick-lint-js-dist-arch:v11

while [ "${#}" -ne 0 ]; do
case "${1}" in
Expand Down

0 comments on commit 66d8f76

Please sign in to comment.