Skip to content

Commit

Permalink
Fix header generation issues on new GKE clusters
Browse files Browse the repository at this point in the history
- 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]>
  • Loading branch information
3 people authored and fntlnz committed Jun 16, 2020
1 parent adae952 commit 61e18a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions build/Dockerfile.initcontainer
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ RUN apk add --update \
bash \
bc \
build-base \
bison \
flex \
curl \
elfutils-dev \
linux-headers \
Expand Down
4 changes: 2 additions & 2 deletions build/init/fetch-linux-headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fetch_generic_linux_sources()
install_cos_linux_headers()
{
if grep -q CHROMEOS_RELEASE_VERSION "${LSB_FILE}" >/dev/null; then
BUILD_ID=$(awk '/CHROMEOS_RELEASE_VERSION =/ { print $3 }' "${LSB_FILE}")
BUILD_ID=$(awk '/CHROMEOS_RELEASE_VERSION *= */ { gsub(/^CHROMEOS_RELEASE_VERSION *= */, ""); print }' "${LSB_FILE}")
BUILD_DIR="/linux-lakitu-${BUILD_ID}"
SOURCES_DIR="${TARGET_DIR}/linux-lakitu-${BUILD_ID}"

Expand Down Expand Up @@ -88,7 +88,7 @@ install_generic_linux_headers()

install_headers()
{
distro="$(awk '/^NAME =/ { print $3 }' "${OS_RELEASE_FILE}")"
distro="$(awk '/^NAME *= */ { gsub(/^NAME *= */, ""); print }' "${OS_RELEASE_FILE}")"

case $distro in
*"Container-Optimized OS"*)
Expand Down

0 comments on commit 61e18a9

Please sign in to comment.