mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-11 17:04:22 -05:00
576b48c8b7
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
name: Setup mkosi
|
|
description: Install mkosi and all its dependencies
|
|
inputs:
|
|
version:
|
|
description: "Version (commit hash) of mkosi to install."
|
|
required: true
|
|
systemdVersion:
|
|
description: "Version (commit hash) of systemd to install."
|
|
required: true
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Dependencies
|
|
shell: bash
|
|
run: |
|
|
echo "::group::Dependencies"
|
|
echo "deb-src http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
|
|
sudo apt-get update
|
|
sudo apt-get install --assume-yes --no-install-recommends \
|
|
bubblewrap \
|
|
dnf \
|
|
e2fsprogs \
|
|
libfdisk-dev \
|
|
mtools \
|
|
ovmf \
|
|
python3-pefile \
|
|
python3-pyelftools \
|
|
python3-setuptools \
|
|
qemu-system-x86 \
|
|
squashfs-tools \
|
|
systemd-container
|
|
echo "::endgroup::"
|
|
|
|
- name: Checkout systemd
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
|
with:
|
|
repository: systemd/systemd
|
|
path: ${{ github.action_path }}/systemd
|
|
ref: ${{ inputs.systemdVersion }}
|
|
|
|
- name: Update systemd tools
|
|
shell: bash
|
|
working-directory: ${{ github.action_path }}
|
|
run: |
|
|
echo "::group::Update systemd tools"
|
|
sudo apt-get build-dep systemd
|
|
meson systemd/build systemd -Drepart=true -Defi=true -Dbootloader=true
|
|
|
|
BINARIES=(
|
|
bootctl
|
|
systemctl
|
|
systemd-analyze
|
|
systemd-dissect
|
|
systemd-nspawn
|
|
systemd-repart
|
|
ukify
|
|
)
|
|
|
|
ninja -C systemd/build ${BINARIES[@]}
|
|
for BINARY in "${BINARIES[@]}"; do
|
|
sudo ln -svf $PWD/systemd/build/$BINARY /usr/bin/$BINARY
|
|
done
|
|
echo "::endgroup::"
|
|
|
|
- name: Install
|
|
shell: bash
|
|
run: sudo python3 -m pip install git+https://github.com/systemd/mkosi.git@${{ inputs.version }}
|