diff --git a/Dockerfile b/Dockerfile index 6501472..e7bc73d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/bedrock/alpine:3.19.1 AS base +FROM quay.io/bedrock/alpine:3.20.0 AS base RUN apk add \ nginx \ diff --git a/build_spnego_module.sh b/build_spnego_module.sh index 0438a71..4465748 100755 --- a/build_spnego_module.sh +++ b/build_spnego_module.sh @@ -20,11 +20,26 @@ tar -xzC /usr/src -f "${SPNEGO_TAR}" cd "${NGINX_SRC}" +# Hack to ensure the module compile options match the server. +export CFLAGS=-DNGX_HTTP_HEADERS=1 + # shellcheck disable=SC2086 ./configure ${NGINX_CONFIG} --add-dynamic-module="${SPNEGO_SRC}" make modules +MODULE_SIGNATURE="$(strings "objs/${MODULE_NAME}" | grep -E '[01]{30,}')" +SERVER_SIGNATURE="$(strings /usr/sbin/nginx | grep -E '[01]{30,}')" + +if [ "${MODULE_SIGNATURE}" != "${SERVER_SIGNATURE}" ]; then + echo "The configured module options do not match the server:" + echo "Module: ${MODULE_SIGNATURE}" + echo "Server: ${SERVER_SIGNATURE}" + echo "See https://github.com/nginx/nginx/blob/release-${NGINX_VERSION}/src/core/ngx_module.h to decode the signature." + echo "The mismatch could be due to configuration options or missing dependencies." + exit 1 +fi + cp "objs/${MODULE_NAME}" "${MODULE_DIR}" echo "load_module ${MODULE_DIR}/${MODULE_NAME};" > /usr/src/nginx.conf diff --git a/constraints.txt b/constraints.txt index 204362e..75a67ab 100644 --- a/constraints.txt +++ b/constraints.txt @@ -6,7 +6,7 @@ click==8.1.7 decorator==5.1.1 flasgger==0.9.7.1 Flask==3.0.3 -greenlet==2.0.2 +greenlet==3.0.3 gunicorn==22.0.0 httpbin==0.10.2 itsdangerous==2.2.0 @@ -15,7 +15,7 @@ jsonschema==4.22.0 jsonschema-specifications==2023.12.1 MarkupSafe==2.1.5 mistune==3.0.2 -packaging==24.0 +packaging==24.1 pycparser==2.22 PyYAML==6.0.1 referencing==0.35.1