scripts/iso-to-oci line 146 has the glob inside double quotes:
rm -rf "${UNSQUASHFS}/lib/modules/*-vyos"Bash does not expand a glob inside quotes. rm gets the literal path .../lib/modules/*-vyos, which does not exist, and with -f it exits 0. The build does not notice.
It came in with 819e3c63 (T8602, "use xorriso to unpack squashfs instead of mounting ISO filesystem").
Observed on a make oci image built from a rolling generic ISO:
== mb tarball: usr/lib/modules entries 1880 ./usr/lib/modules/6.18.62-1-vyos/ kernel .ko files: 1489
The modules take about 60 MiB uncompressed. They include wireguard, l2tp_*, nft_nat, jool, ipt_NETFLOW and nf_nat_ftp.
Effect seen at runtime: I ran this image under podman with --privileged, without bind-mounting /lib/modules, on a host running the same kernel (6.18.62-1-vyos). There, modprobe inside the container loaded modules from the image's copy into the host kernel. Commits for wireguard, L2TPv3 and NAT succeeded that way although the host had not loaded those modules. On a host with a different kernel version the directory name does not match uname -r, and I saw no effect apart from the size.
Same quoting: line 145 ("${UNSQUASHFS}/usr/lib/x86_64-linux-gnu/libwireshark.so*") is also quoted. The current ISO has no libwireshark files, so that line has nothing to remove today.
check-oci-container lists the rootfs changes it asserts (locale, login banner, /config symlink, removed CLI nodes). The absence of /usr/lib/modules is not among them.