]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
action: Download archlinux-keyring from Michel Salim's kernel-utils PPA
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 28 Jul 2022 16:43:23 +0000 (18:43 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 2 Aug 2022 00:14:36 +0000 (02:14 +0200)
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.

action.yaml
action/mkosi.default [deleted file]
action/setup-pacman.sh [deleted file]

index 092292be2d14632d695dd4366f6f939be8617c6a..79fa4e74802ed67c0dab17bb596eee643e0eed7d 100644 (file)
@@ -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 (file)
index 0033357..0000000
+++ /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 (executable)
index 4574786..0000000
+++ /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