flatcar-scripts/build_library/sysext_mangle_containerd-flatcar
James Le Cuirot b930444366
build_library: Drop debug symbols and other noise from some sysexts
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>
2025-11-13 10:46:36 +00:00

24 lines
652 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
rootfs="${1}"
pushd "${rootfs}"
# No manpages on Flatcar, no need to ship "stress" tool
rm -rf ./usr/{bin/{containerd-stress,gen-manpages},lib/debug/}
dir=$(dirname "${BASH_SOURCE[0]}")
files_dir="${dir}/../sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd"
echo ">>> NOTICE $0: installing extra files from '${files_dir}'"
# ATTENTION: don't preserve ownership as repo is owned by sdk user
cp -vdR --preserve=mode,timestamps "${files_dir}/"* ./
install -D -m0644 /dev/stdin ./usr/lib/systemd/system/multi-user.target.d/10-containerd-service.conf <<EOF
[Unit]
Upholds=containerd.service
EOF
popd