Skip to content

Commit 61e18a9

Browse files
winmillwilladelbertcdan-ri
authored andcommitted
Fix header generation issues on new GKE clusters
- build: add flex and bison packages to init container - fix: google container os detection Co-authored-by: Adelbert Chang <[email protected]> Co-authored-by: Will Milton <[email protected]> Co-authored-by: dan <[email protected]>
1 parent adae952 commit 61e18a9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

build/Dockerfile.initcontainer

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ RUN apk add --update \
33
bash \
44
bc \
55
build-base \
6+
bison \
7+
flex \
68
curl \
79
elfutils-dev \
810
linux-headers \

build/init/fetch-linux-headers.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fetch_generic_linux_sources()
5656
install_cos_linux_headers()
5757
{
5858
if grep -q CHROMEOS_RELEASE_VERSION "${LSB_FILE}" >/dev/null; then
59-
BUILD_ID=$(awk '/CHROMEOS_RELEASE_VERSION =/ { print $3 }' "${LSB_FILE}")
59+
BUILD_ID=$(awk '/CHROMEOS_RELEASE_VERSION *= */ { gsub(/^CHROMEOS_RELEASE_VERSION *= */, ""); print }' "${LSB_FILE}")
6060
BUILD_DIR="/linux-lakitu-${BUILD_ID}"
6161
SOURCES_DIR="${TARGET_DIR}/linux-lakitu-${BUILD_ID}"
6262

@@ -88,7 +88,7 @@ install_generic_linux_headers()
8888

8989
install_headers()
9090
{
91-
distro="$(awk '/^NAME =/ { print $3 }' "${OS_RELEASE_FILE}")"
91+
distro="$(awk '/^NAME *= */ { gsub(/^NAME *= */, ""); print }' "${OS_RELEASE_FILE}")"
9292

9393
case $distro in
9494
*"Container-Optimized OS"*)

0 commit comments

Comments
 (0)