From: Daan De Meyer Date: Thu, 28 Jul 2022 16:43:23 +0000 (+0200) Subject: action: Download archlinux-keyring from Michel Salim's kernel-utils PPA X-Git-Tag: v14~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec66e9ceaad2425af11f37bb2bc222449b03cb8b;p=thirdparty%2Fmkosi.git action: Download archlinux-keyring from Michel Salim's kernel-utils PPA Pending availability in Ubuntu itself, let's download the archlinux-keyring from the kernel-utils PPA maintained by Michel Salim. This means we can update the Archlinux keyring without having to commit to mkosi itself which means that users of the action will pick up the keyring updates automatically. --- diff --git a/action.yaml b/action.yaml index 092292be2..79fa4e748 100644 --- a/action.yaml +++ b/action.yaml @@ -5,29 +5,19 @@ runs: using: composite steps: - - name: Copy /etc/os-release - shell: bash - run: | - cp /etc/os-release $GITHUB_WORKSPACE - # hashFiles() only works on files inside $GITHUB_WORKSPACE so let's copy /etc/os-release to that - # location. - cat os-release - - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: build - key: ${{ hashFiles('os-release', 'action/setup-pacman.sh') }} - - name: Dependencies shell: bash - working-directory: ${{ github.action_path }} run: | + # For archlinux-keyring and pacman + sudo add-apt-repository ppa:michel-slm/kernel-utils sudo apt-get update sudo apt-get install --assume-yes --no-install-recommends \ debootstrap \ zypper \ dnf \ + pacman-package-manager \ + archlinux-keyring \ + makepkg \ systemd-container \ qemu-system-x86 \ ovmf \ @@ -36,17 +26,9 @@ runs: squashfs-tools \ btrfs-progs - mkdir -p $BUILDDIR - - sudo -E action/setup-pacman.sh - sudo chown -R $USER: $BUILDDIR - sudo pacman-key --init sudo pacman-key --populate archlinux - env: - BUILDDIR: build - # Try to eliminate "Failed to dissect image: Connection timed out" errors from nspawn by compiling # systemd-nspawn from v251 from source. - name: Update systemd-nspawn diff --git a/action/mkosi.default b/action/mkosi.default deleted file mode 100644 index 0033357d3..000000000 --- a/action/mkosi.default +++ /dev/null @@ -1,30 +0,0 @@ -[Distribution] -Distribution=ubuntu -Release=jammy - -[Content] -Cache=../mkosi.cache/ubuntu~jammy -BuildScript=setup-pacman.sh -WithNetwork=yes -Repositories=main,universe -Autologin=yes -Bootable=yes -Password= -Packages=debootstrap - zypper - dnf - systemd-container - qemu-system-x86 - ovmf - squashfs-tools - e2fsprogs - xfsprogs - btrfs-progs -SourceFileTransferFinal=copy-git-others -BuildSources=.. - -[Validation] -QemuHeadless=yes - -[Host] -Netdev=yes diff --git a/action/setup-pacman.sh b/action/setup-pacman.sh deleted file mode 100755 index 457478606..000000000 --- a/action/setup-pacman.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -set -e - -PACMAN_VERSION="6.0.1" -ARCHLINUX_KEYRING_VERSION="20220713" - -apt-get --assume-yes --no-install-recommends install \ - gcc \ - git \ - libarchive-dev \ - libgpgme-dev \ - libssl-dev \ - libcurl4-openssl-dev \ - make \ - meson \ - pkgconf \ - sq - -cd "$BUILDDIR" - -if [ ! -f pacman-$PACMAN_VERSION.tar.xz ]; then - wget https://sources.archlinux.org/other/pacman/pacman-$PACMAN_VERSION.tar.xz - tar xf pacman-$PACMAN_VERSION.tar.xz -fi - -if [ ! -f pacman-$PACMAN_VERSION-build/build.ninja ]; then - meson \ - --buildtype=release \ - --prefix /usr \ - --libdir lib/x86_64-linux-gnu \ - -Ddoc=disabled \ - -Dscriptlet-shell=/usr/bin/bash \ - -Dldconfig=/usr/bin/ldconfig \ - pacman-$PACMAN_VERSION-build \ - pacman-$PACMAN_VERSION -fi - -meson install -C pacman-$PACMAN_VERSION-build - -# Ubuntu 22.04 doesn't ship the python-is-python3 package anymore so we manually create the symlink instead. -if [ ! -f /usr/bin/python ]; then - ln -s /usr/bin/python3 /usr/bin/python -fi - -if [ ! -d archlinux-keyring-$ARCHLINUX_KEYRING_VERSION ]; then - git clone \ - --branch $ARCHLINUX_KEYRING_VERSION \ - --depth 1 \ - https://gitlab.archlinux.org/archlinux/archlinux-keyring.git \ - archlinux-keyring-$ARCHLINUX_KEYRING_VERSION -fi - -make -C archlinux-keyring-$ARCHLINUX_KEYRING_VERSION PREFIX=/usr install