Skip to content

Commit 886b997

Browse files
authored
Merge pull request #1655 from flatcar/tormath1/exp-incus
sysext: add built-in Incus sysext image
2 parents 1e00a26 + 7ccc2f4 commit 886b997

File tree

72 files changed

+3396
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+3396
-4
lines changed

.github/workflows/portage-stable-packages-list

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ acct-group/disk
88
acct-group/dnsmasq
99
acct-group/docker
1010
acct-group/floppy
11+
acct-group/incus
12+
acct-group/incus-admin
1113
acct-group/input
1214
acct-group/kmem
1315
acct-group/kvm
1416
acct-group/lp
17+
acct-group/lxc
1518
acct-group/man
1619
acct-group/messagebus
1720
acct-group/named
@@ -45,6 +48,7 @@ acct-group/video
4548
acct-group/wheel
4649

4750
acct-user/dnsmasq
51+
acct-user/lxc
4852
acct-user/man
4953
acct-user/messagebus
5054
acct-user/named
@@ -116,6 +120,8 @@ app-containers/crun
116120
app-containers/docker
117121
app-containers/docker-buildx
118122
app-containers/docker-cli
123+
app-containers/incus
124+
app-containers/lxc
119125
app-containers/netavark
120126
app-containers/podman
121127
app-containers/runc
@@ -226,6 +232,7 @@ dev-lang/tcl
226232
dev-lang/yasm
227233

228234
dev-libs/cJSON
235+
dev-libs/cowsql
229236
dev-libs/cyrus-sasl
230237
dev-libs/dbus-glib
231238
dev-libs/ding-libs
@@ -278,6 +285,7 @@ dev-libs/opensc
278285
dev-libs/openssl
279286
dev-libs/popt
280287
dev-libs/protobuf
288+
dev-libs/raft
281289
dev-libs/tree-sitter
282290
dev-libs/tree-sitter-bash
283291
dev-libs/userspace-rcu
@@ -371,6 +379,7 @@ dev-util/perf
371379
dev-util/pkgcheck
372380
dev-util/pkgconf
373381
dev-util/re2c
382+
dev-util/xdelta
374383

375384
dev-vcs/git
376385

@@ -658,6 +667,7 @@ sys-fs/fuse-common
658667
sys-fs/fuse-overlayfs
659668
sys-fs/lsscsi
660669
sys-fs/lvm2
670+
sys-fs/lxcfs
661671
sys-fs/mdadm
662672
sys-fs/mtools
663673
sys-fs/multipath-tools

build_library/extra_sysexts.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
EXTRA_SYSEXTS=(
2-
"zfs|sys-fs/zfs"
3-
"podman|app-containers/podman,net-misc/passt"
4-
"python|dev-lang/python,dev-python/pip"
2+
"incus|app-containers/incus"
53
"nvidia-drivers-535|x11-drivers/nvidia-drivers:0/535|-kernel-open persistenced|amd64"
64
"nvidia-drivers-535-open|x11-drivers/nvidia-drivers:0/535|kernel-open persistenced|amd64"
75
"nvidia-drivers-550|x11-drivers/nvidia-drivers:0/550|-kernel-open persistenced|amd64"
86
"nvidia-drivers-550-open|x11-drivers/nvidia-drivers:0/550|kernel-open persistenced|amd64"
97
"nvidia-drivers-570|x11-drivers/nvidia-drivers:0/570|-kernel-open persistenced|amd64"
108
"nvidia-drivers-570-open|x11-drivers/nvidia-drivers:0/570|kernel-open persistenced|amd64"
9+
"podman|app-containers/podman,net-misc/passt"
10+
"python|dev-lang/python,dev-python/pip"
11+
"zfs|sys-fs/zfs"
1112
)
1213

1314
_get_unversioned_sysext_packages_unsorted() {
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
rootfs="${1}"
5+
6+
pushd "${rootfs}"
7+
8+
pushd ./usr/lib/systemd/system
9+
mkdir -p "multi-user.target.d"
10+
{ echo "[Unit]"; echo "Upholds=incus.service"; } > "multi-user.target.d/10-incus.conf"
11+
popd
12+
13+
mkdir -p ./usr/lib/tmpfiles.d
14+
pushd ./usr/lib/tmpfiles.d
15+
cat <<EOF >./10-incus.conf
16+
d /var/lib/lxc/rootfs 0755 root root - -
17+
w+ /etc/subuid - - - - root:1065536:65536
18+
w+ /etc/subgid - - - - root:1065536:65536
19+
EOF
20+
popd
21+
22+
# Add 'core' user to 'incus-admin' group to avoid prefixing
23+
# all commands with sudo.
24+
mkdir -p ./usr/lib/userdb/
25+
echo " " > ./usr/lib/userdb/core:incus-admin.membership
26+
27+
popd
28+

changelog/changes/2025-05-14-incus.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Provided an Incus Flatcar extension as optional systemd-sysext image with the release. Write 'incus' to `/etc/flatcar/enabled-sysext.conf` through Ignition and the sysext will be installed during provisioning. ([scripts#1655](https://github.com/flatcar/scripts/pull/1655))

sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ RDEPEND="
3030
sys-boot/shim-signed
3131
app-containers/containerd
3232
app-containers/docker
33-
app-containers/docker-cli
3433
app-containers/docker-buildx
34+
app-containers/docker-cli
35+
app-containers/incus
3536
app-emulation/amazon-ssm-agent
3637
app-emulation/hv-daemons
3738
app-emulation/wa-linux-agent
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is used to convert regular user / group entries to
2+
# userdb entries (in JSON format) to later be consumed by userdbd
3+
# when loading the sysext image on the instance.
4+
# The user / groups will be created dynamically and if the sysext image is
5+
# removed the entries will be removed as well.
6+
cros_post_src_install_add_userdb_record(){
7+
insinto /usr/lib/userdb
8+
newins - ${ACCT_GROUP_NAME}.group < <(
9+
printf '{"groupName":"%q","gid":%q}\n' \
10+
"${ACCT_GROUP_NAME}" \
11+
"${_ACCT_GROUP_ID/#-*/-}"
12+
)
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is used to convert regular user / group entries to
2+
# userdb entries (in JSON format) to later be consumed by userdbd
3+
# when loading the sysext image on the instance.
4+
# The user / groups will be created dynamically and if the sysext image is
5+
# removed the entries will be removed as well.
6+
cros_post_src_install_add_userdb_record(){
7+
insinto /usr/lib/userdb
8+
newins - ${ACCT_GROUP_NAME}.group < <(
9+
printf '{"groupName":"%q","gid":%q}\n' \
10+
"${ACCT_GROUP_NAME}" \
11+
"${_ACCT_GROUP_ID/#-*/-}"
12+
)
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is used to convert regular user / group entries to
2+
# userdb entries (in JSON format) to later be consumed by userdbd
3+
# when loading the sysext image on the instance.
4+
# The user / groups will be created dynamically and if the sysext image is
5+
# removed the entries will be removed as well.
6+
cros_post_src_install_add_userdb_record(){
7+
insinto /usr/lib/userdb
8+
newins - ${ACCT_GROUP_NAME}.group < <(
9+
printf '{"groupName":"%q","gid":%q}\n' \
10+
"${ACCT_GROUP_NAME}" \
11+
"${_ACCT_GROUP_ID/#-*/-}"
12+
)
13+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cros_pre_src_compile_pkgconfig() {
2+
export PKG_CONFIG="$(tc-getPKG_CONFIG)"
3+
}

0 commit comments

Comments
 (0)