forked from systemd/mkosi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
117 lines (105 loc) · 3.23 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: setup-mkosi
description: Install mkosi and all its dependencies
runs:
using: composite
steps:
- name: Permit unprivileged access to kvm, vhost-vsock and vhost-net devices
shell: bash
run: |
sudo sed -i '/kvm/s/0660/0666/g' /usr/lib/tmpfiles.d/static-nodes-permissions.conf
sudo sed -i '/vhost/s/0660/0666/g' /usr/lib/tmpfiles.d/static-nodes-permissions.conf
sudo modprobe kvm
sudo modprobe vhost_vsock
sudo modprobe vhost_net
[[ -e /dev/kvm ]] && sudo chmod 666 /dev/kvm
sudo chmod 666 /dev/vhost-vsock
sudo chmod 666 /dev/vhost-net
lsmod
[[ -e /dev/kvm ]] && ls -l /dev/kvm
ls -l /dev/vhost-*
- name: Dependencies
shell: bash
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 \
archlinux-keyring \
btrfs-progs \
bubblewrap \
debian-archive-keyring \
dnf \
e2fsprogs \
erofs-utils \
mtools \
ovmf \
pacman-package-manager \
python3-pefile \
python3-pyelftools \
qemu-system-x86 \
squashfs-tools \
swtpm \
systemd-container \
xfsprogs \
zypper
sudo pacman-key --init
sudo pacman-key --populate archlinux
- name: Update systemd
shell: bash
working-directory: ${{ github.action_path }}
run: |
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 build-dep systemd
sudo apt-get install --assume-yes --no-install-recommends libfdisk-dev libtss2-dev
git clone https://github.com/systemd/systemd --depth=1
meson setup systemd/build systemd \
-D repart=true \
-D efi=true \
-D bootloader=true \
-D ukify=true \
-D firstboot=true \
-D blkid=true \
-D openssl=true \
-D tpm2=true
BINARIES=(
bootctl
systemctl
systemd-dissect
systemd-firstboot
systemd-measure
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
$BINARY --version
done
# Make sure we have mkfs.xfs that can handle spaces in protofiles.
# TODO: Drop when we move to the next Ubuntu LTS.
- name: Update xfsprogs
shell: bash
working-directory: ${{ github.action_path }}
run: |
sudo apt-get install --assume-yes --no-install-recommends \
make \
gcc \
autoconf \
automake \
libtool \
libdevmapper-dev \
libblkid-dev \
libicu-dev \
libedit-dev \
libinih-dev \
liburcu-dev \
uuid-dev
git clone --single-branch --branch v6.4.0 https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git
cd xfsprogs-dev
make -j $(nproc)
sudo make install
- name: Install
shell: bash
run: sudo ln -svf ${{ github.action_path }}/bin/mkosi /usr/bin/mkosi