mirror of
https://github.com/flatcar/scripts.git
synced 2026-02-13 11:42:13 +01:00
These were present in containerd, incus, and overlaybd. Also restore SLSA to the podman sysext as we normally include this. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
28 lines
586 B
Bash
Executable File
28 lines
586 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
rootfs="${1}"
|
|
|
|
pushd "${rootfs}"
|
|
|
|
rm -rf ./usr/{lib/debug,lib64/pkgconfig,include}/
|
|
|
|
pushd ./usr/lib/systemd/system
|
|
mkdir -p "multi-user.target.d"
|
|
{ echo "[Unit]"; echo "Upholds=incus.service"; } > "multi-user.target.d/10-incus.conf"
|
|
popd
|
|
|
|
mkdir -p ./usr/lib/tmpfiles.d
|
|
pushd ./usr/lib/tmpfiles.d
|
|
cat <<EOF >./10-incus.conf
|
|
d /var/lib/lxc/rootfs 0755 root root - -
|
|
EOF
|
|
popd
|
|
|
|
# Add 'core' user to 'incus-admin' group to avoid prefixing
|
|
# all commands with sudo.
|
|
mkdir -p ./usr/lib/userdb/
|
|
echo " " > ./usr/lib/userdb/core:incus-admin.membership
|
|
|
|
popd
|