From fc8f78ff0fed241dda96b0c0a68e9f47b1735046 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sat, 19 Nov 2022 04:02:17 +0000 Subject: [PATCH] Fix Dockerfile.auto inline with others --- Dockerfile.auto | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/Dockerfile.auto b/Dockerfile.auto index f5b3528..3572a27 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -53,23 +53,40 @@ ARG SCROT # OPTIONAL: Arch Linux server mirrors for super fast builds # set RANKMIRRORS to any value other that nothing, e.g. -e RANKMIRRORS=true +RUN perl -i -p -e s/^\#Color/Color$'\n'ParallelDownloads\ =\ 30/g /etc/pacman.conf ARG RANKMIRRORS ARG MIRROR_COUNTRY=US ARG MIRROR_COUNT=10 +RUN tee /etc/pacman.d/mirrorlist <<< 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' \ + && tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch' \ + && tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch' + +# Fixes issue with invalid GPG keys: update the archlinux-keyring package to get the latest keys, then remove and regenerate gnupg keys +RUN pacman -Sy archlinux-keyring --noconfirm \ + && rm -rf /etc/pacman.d/gnupg \ + && pacman-key --init \ + && pacman-key --populate archlinux + RUN if [[ "${RANKMIRRORS}" ]]; then \ { pacman -Sy wget --noconfirm || pacman -Syu wget --noconfirm ; } \ - ; wget -O ./rankmirrors "https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/rankmirrors" \ + ; wget -O ./rankmirrors "https://raw.githubusercontent.com/sickcodes/Docker-OSX/${BRANCH:=master}/rankmirrors" \ ; wget -O- "https://www.archlinux.org/mirrorlist/?country=${MIRROR_COUNTRY:-US}&protocol=https&use_mirror_status=on" \ | sed -e 's/^#Server/Server/' -e '/^#/d' \ | head -n "$((${MIRROR_COUNT:-10}+1))" \ | bash ./rankmirrors --verbose --max-time 5 - > /etc/pacman.d/mirrorlist \ - && tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirrors.evowise.com/archlinux/$repo/os/$arch' \ - && tee -a /etc/pacman.d/mirrorlist <<< 'Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch' \ - && tee -a /etc/pacman.d/mirrorlist <<< 'Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch' \ + + + && cat /etc/pacman.d/mirrorlist \ - ; fi \ - ; yes | pacman -Scc + ; fi + + +RUN tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkp://keyserver.ubuntu.com' \ + && tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://hkps.pool.sks-keyservers.net:443' \ + && tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkp://pgp.mit.edu:11371' \ + && tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://keys.openpgp.org' \ + && tee -a /etc/pacman.d/gnupg/gpg.conf <<< 'keyserver hkps://keys.mailvelope.com' RUN pacman -Syu xorg-server-xvfb wget xterm xorg-xhost xorg-xrandr --noconfirm \ && if [[ "${SCROT}" ]]; then \