Page MenuHomeVyOS Platform

Kernel package build scripts iterate patches by parsing ls
Open, NormalPublic

Description

Five scripts in scripts/package-build/linux-kernel/ (build-kernel.sh, build-ipt-netflow.sh, build-accel-ppp-ng.sh, build-intel-nic.sh, build-mellanox-ofed.sh) loop over patches with for patch in $(ls ${PATCH_DIR}) (shellcheck SC2045). A patch file name with whitespace is split into several words and the patch is not applied.

Fix: iterate with a glob ("${PATCH_DIR}"/*), skipping the literal pattern when the directory is empty.

Details

Version
rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)