File tree Expand file tree Collapse file tree
crates/openshell-vm/runtime/kernel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,6 +116,9 @@ CONFIG_CGROUP_CPUACCT=y
116116CONFIG_CGROUP_PIDS=y
117117CONFIG_MEMCG=y
118118
119+ # ── Disable kernel headers archive (avoids cpio issues in CI) ──────────
120+ # CONFIG_IKHEADERS is not set
121+
119122# ── Security features required by the sandbox runtime ───────────────────
120123CONFIG_SECURITY_LANDLOCK=y
121124CONFIG_SECCOMP_FILTER=y
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ install_deps() {
6666
6767 if command -v apt-get & > /dev/null; then
6868 # Debian/Ubuntu
69- DEPS=" build-essential git python3 python3-pyelftools flex bison libelf-dev libssl-dev bc curl libclang-dev"
69+ DEPS=" build-essential git python3 python3-pip python3- pyelftools flex bison libelf-dev libssl-dev bc curl libclang-dev cpio "
7070 MISSING=" "
7171 for dep in $DEPS ; do
7272 if ! dpkg -s " $dep " & > /dev/null; then
@@ -83,14 +83,22 @@ install_deps() {
8383
8484 elif command -v dnf & > /dev/null; then
8585 # Fedora/RHEL
86- DEPS=" make git python3 python3-pyelftools gcc flex bison elfutils-libelf-devel openssl-devel bc glibc-static curl clang-devel"
86+ DEPS=" make git python3 python3-pyelftools gcc flex bison elfutils-libelf-devel openssl-devel bc glibc-static curl clang-devel cpio "
8787 echo " Installing dependencies via dnf..."
8888 $SUDO dnf install -y $DEPS
8989
9090 else
9191 echo " Warning: Unknown package manager. Please install manually:" >&2
9292 echo " build-essential git python3 python3-pyelftools flex bison" >&2
93- echo " libelf-dev libssl-dev bc curl" >&2
93+ echo " libelf-dev libssl-dev bc curl cpio" >&2
94+ fi
95+
96+ # Ensure pyelftools is importable by the Python that will run bin2cbundle.py.
97+ # The apt package may install to a different Python than the default python3.
98+ if ! python3 -c " import elftools" & > /dev/null; then
99+ echo " pyelftools not importable, installing via pip..."
100+ python3 -m pip install --break-system-packages pyelftools 2> /dev/null || \
101+ python3 -m pip install pyelftools || true
94102 fi
95103}
96104
You can’t perform that action at this time.
0 commit comments