From 8ea8699957b0f71867b2c0dffee4a8ae49c124ae Mon Sep 17 00:00:00 2001 From: Alvin Vilaythong Date: Tue, 15 Sep 2026 08:10:27 +1000 Subject: [PATCH] Fix tests: reset pacman.conf, correct CachyOS mirror URL format --- .gitea/workflows/tests.yaml | 38 +++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/tests.yaml b/.gitea/workflows/tests.yaml index 9349bd4..294e491 100644 --- a/.gitea/workflows/tests.yaml +++ b/.gitea/workflows/tests.yaml @@ -12,22 +12,45 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Install prerequisites + - name: Reset pacman.conf to stock run: | - pacman -Syu --noconfirm --needed shellcheck yamllint + cat > /etc/pacman.conf << 'STOCKCONF' + [options] + DisableSandbox + HoldPkg = pacman glibc + Architecture = auto + CheckSpace + ParallelDownloads = 5 + SigLevel = Required DatabaseOptional + LocalFileSigLevel = Optional + + [core] + Include = /etc/pacman.d/mirrorlist + + [extra] + Include = /etc/pacman.d/mirrorlist + STOCKCONF + sed -i 's/^ //' /etc/pacman.conf + + # Remove stale sync databases for custom repos + rm -f /var/lib/pacman/sync/cachyos* /var/lib/pacman/sync/chaotic* + + - name: Install prerequisites + run: pacman -Syu --noconfirm --needed shellcheck yamllint - name: Set up CachyOS repo run: | - # Import CachyOS key pacman-key --recv-keys F3B607488DB35A47 --keyserver keyserver.ubuntu.com pacman-key --lsign-key F3B607488DB35A47 - # Install keyring and mirrorlist packages pacman -U --noconfirm \ 'https://mirror.cachyos.org/repo/x86_64/cachyos/cachyos-keyring-20240331-1-any.pkg.tar.zst' \ 'https://mirror.cachyos.org/repo/x86_64/cachyos/cachyos-mirrorlist-27-1-any.pkg.tar.zst' - # Add CachyOS repo to pacman.conf + # Fix the mirrorlist URL (pacnew has wrong format) + printf '%s\n' 'Server = https://mirror.cachyos.org/repo/$arch/$repo' \ + > /etc/pacman.d/cachyos-mirrorlist + printf '\n[cachyos]\nInclude = /etc/pacman.d/cachyos-mirrorlist\n' \ >> /etc/pacman.conf @@ -35,11 +58,6 @@ jobs: - name: Set up chaotic-aur repo run: | - # Import chaotic-aur key - pacman-key --recv-keys 3056513887B78A2F --keyserver keyserver.ubuntu.com - pacman-key --lsign-key 3056513887B78A2F - - # Install keyring and mirrorlist packages pacman -U --noconfirm \ 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' \ 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'