From 7eb6f4b243b55f3da54fe2aacf453cb500171ff5 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Thu, 6 Nov 2025 18:18:26 -0800 Subject: [PATCH 1/5] debian: specify per-module dependencies And use them to compute .deps-module-* targets --- contrib/src/nginx-acme/Makefile | 13 +++---------- debian/Makefile | 3 +++ debian/Makefile.module-acme | 8 +++----- debian/Makefile.module-auth-spnego | 8 +++----- debian/Makefile.module-brotli | 8 +++----- debian/Makefile.module-encrypted-session | 12 ++++-------- debian/Makefile.module-fips-check | 8 +++----- debian/Makefile.module-geoip2 | 8 +++----- debian/Makefile.module-headers-more | 8 +++----- debian/Makefile.module-lua | 24 ++++++++---------------- debian/Makefile.module-ndk | 8 +++----- debian/Makefile.module-njs | 12 ++++-------- debian/Makefile.module-otel | 24 ++++++++---------------- debian/Makefile.module-passenger | 8 +++----- debian/Makefile.module-rtmp | 8 +++----- debian/Makefile.module-set-misc | 12 ++++-------- debian/Makefile.module-subs-filter | 8 +++----- 17 files changed, 64 insertions(+), 116 deletions(-) diff --git a/contrib/src/nginx-acme/Makefile b/contrib/src/nginx-acme/Makefile index 34cb2353..3f61ebd8 100644 --- a/contrib/src/nginx-acme/Makefile +++ b/contrib/src/nginx-acme/Makefile @@ -9,15 +9,14 @@ CARGO := $(shell command -v cargo 2> /dev/null) ifdef CARGO PKGS += nginx-acme -PKGS += vendor-nginx-acme endif -DEPS_nginx-acme = vendor-nginx-acme $(DEPS_vendor-nginx-acme) +DEPS_nginx-acme = $(TARBALLS)/nginx-acme-$(NGINX_ACME_VERSION).tar.gz: $(call download_pkg,$(NGINX_ACME_URL),nginx-acme) -.sum-nginx-acme: nginx-acme-$(NGINX_ACME_VERSION).tar.gz +.sum-nginx-acme: nginx-acme-$(NGINX_ACME_VERSION).tar.gz nginx-acme-$(NGINX_ACME_VERSION)-vendor.tar.gz TAR_COMMAND = $(shell if tar --version 2>/dev/null | grep -q "GNU"; then \ echo 'tar -zcf "../../$${name}.tar.gz" vendor --transform "s,vendor,$${name},"'; \ @@ -38,15 +37,9 @@ cargo_vendor_archive = \ rm -rf $${TMP_DIR} ; \ mv $${name}.tar.gz $(TARBALLS)/ ; -$(TARBALLS)/nginx-acme-$(NGINX_ACME_VERSION)-vendor.tar.gz: nginx-acme-$(NGINX_ACME_VERSION).tar.gz .sum-nginx-acme +nginx-acme-$(NGINX_ACME_VERSION)-vendor.tar.gz: nginx-acme-$(NGINX_ACME_VERSION).tar.gz $(call cargo_vendor_archive,$<) -.sum-vendor-nginx-acme: nginx-acme-$(NGINX_ACME_VERSION)-vendor.tar.gz - touch $@ - -.vendor-nginx-acme: .sum-vendor-nginx-acme - touch $@ - nginx-acme: nginx-acme-$(NGINX_ACME_VERSION).tar.gz .sum-nginx-acme $(UNPACK) $(MOVE) diff --git a/debian/Makefile b/debian/Makefile index 8aba827e..098620fe 100644 --- a/debian/Makefile +++ b/debian/Makefile @@ -341,6 +341,9 @@ rules-module-%: $(BASE_SRC) nginx-module-%.deb-changelog .deps-module-% } .deps-module-%: + if [ -n "$(MODULE_CONTRIB_DEPS_$*)" ]; then \ + cd $(CONTRIB) && make $(foreach dep,$(MODULE_CONTRIB_DEPS_$*),.sum-$(dep)); \ + fi; \ touch $@ nginx-tests: diff --git a/debian/Makefile.module-acme b/debian/Makefile.module-acme index 65b8cb77..183d67d8 100644 --- a/debian/Makefile.module-acme +++ b/debian/Makefile.module-acme @@ -2,7 +2,9 @@ MODULES+= acme MODULE_SUMMARY_acme= nginx-acme -include $(CONTRIB)/src/nginx-acme/version +MODULE_CONTRIB_DEPS_acme= nginx-acme + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_acme),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_acme= $(NGINX_ACME_VERSION) MODULE_RELEASE_acme= 1 @@ -14,10 +16,6 @@ MODULE_SOURCES_acme= nginx-acme-$(NGINX_ACME_VERSION).tar.gz \ MODULE_CONFARGS_acme= --add-dynamic-module=$(MODSRC_PREFIX)nginx-acme-$(NGINX_ACME_VERSION) -.deps-module-acme: - cd $(CONTRIB) && make .sum-nginx-acme .sum-vendor-nginx-acme - touch $@ - # since our build system uses rustup-provided rustc/cargo, # we need clang from the system repos MODULE_BUILD_DEPENDS_acme=,clang diff --git a/debian/Makefile.module-auth-spnego b/debian/Makefile.module-auth-spnego index e3b1a07c..7b5b7f77 100644 --- a/debian/Makefile.module-auth-spnego +++ b/debian/Makefile.module-auth-spnego @@ -2,7 +2,9 @@ MODULES+= auth-spnego MODULE_SUMMARY_auth_spnego= 3rd-party kerberos authentication dynamic module -include $(CONTRIB)/src/spnego-http-auth-nginx-module/version +MODULE_CONTRIB_DEPS_auth-spnego= spnego-http-auth-nginx-module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_auth-spnego),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_auth_spnego= $(SPNEGO_HTTP_AUTH_NGINX_MODULE_VERSION) MODULE_RELEASE_auth_spnego= 1 @@ -15,10 +17,6 @@ MODULE_PATCHES_auth_spnego= MODULE_CONFARGS_auth_spnego= --add-dynamic-module=$(MODSRC_PREFIX)spnego-http-auth-nginx-module-$(SPNEGO_HTTP_AUTH_NGINX_MODULE_GITHASH) -.deps-module-auth-spnego: - cd $(CONTRIB) && make .sum-spnego-http-auth-nginx-module - touch $@ - MODULE_BUILD_DEPENDS_auth_spnego=,libkrb5-dev define MODULE_POST_auth_spnego diff --git a/debian/Makefile.module-brotli b/debian/Makefile.module-brotli index 589c8cba..b10bfca7 100644 --- a/debian/Makefile.module-brotli +++ b/debian/Makefile.module-brotli @@ -2,7 +2,9 @@ MODULES+= brotli MODULE_SUMMARY_brotli= 3rd-party brotli compression dynamic modules -include $(CONTRIB)/src/ngx_brotli/version +MODULE_CONTRIB_DEPS_brotli= ngx_brotli + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_brotli),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_brotli= $(NGX_BROTLI_VERSION) MODULE_RELEASE_brotli= 1 @@ -13,10 +15,6 @@ MODULE_SOURCES_brotli= ngx_brotli-$(NGX_BROTLI_VERSION).tar.gz MODULE_CONFARGS_brotli= --add-dynamic-module=$(MODSRC_PREFIX)ngx_brotli-$(NGX_BROTLI_VERSION)rc -.deps-module-brotli: - cd $(CONTRIB) && make .sum-ngx_brotli - touch $@ - MODULE_BUILD_DEPENDS_brotli=,libbrotli-dev define MODULE_POST_brotli diff --git a/debian/Makefile.module-encrypted-session b/debian/Makefile.module-encrypted-session index 34dcedd5..89709b61 100644 --- a/debian/Makefile.module-encrypted-session +++ b/debian/Makefile.module-encrypted-session @@ -2,8 +2,10 @@ MODULES+= encrypted-session MODULE_SUMMARY_encrypted_session= 3rd-party encrypted session dynamic module -include $(CONTRIB)/src/ngx_devel_kit/version -include $(CONTRIB)/src/encrypted-session-nginx-module/version +MODULE_CONTRIB_DEPS_encrypted-session= ngx_devel_kit \ + encrypted-session-nginx-module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_encrypted-session),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_encrypted_session= $(ENCRYPTED_SESSION_NGINX_MODULE_VERSION) MODULE_RELEASE_encrypted_session= 1 @@ -16,12 +18,6 @@ MODULE_SOURCES_encrypted_session= ngx_devel_kit-$(NGX_DEVEL_KIT_VERSION).tar.gz MODULE_CONFARGS_encrypted_session= --add-dynamic-module=$(MODSRC_PREFIX)ngx_devel_kit-$(NGX_DEVEL_KIT_VERSION) \ --add-dynamic-module=$(MODSRC_PREFIX)encrypted-session-nginx-module-$(ENCRYPTED_SESSION_NGINX_MODULE_VERSION) -.deps-module-encrypted-session: - cd $(CONTRIB) && make \ - .sum-ngx_devel_kit \ - .sum-encrypted-session-nginx-module - touch $@ - MODULE_DEPENDS_encrypted_session=,$(NDK_DEPENDENCY_TAG) define MODULE_PREINSTALL_encrypted_session diff --git a/debian/Makefile.module-fips-check b/debian/Makefile.module-fips-check index c008a2af..d215d46b 100644 --- a/debian/Makefile.module-fips-check +++ b/debian/Makefile.module-fips-check @@ -2,7 +2,9 @@ MODULES+= fips-check MODULE_SUMMARY_fips_check= 3rd-party FIPS status check dynamic module -include $(CONTRIB)/src/nginx-fips-check-module/version +MODULE_CONTRIB_DEPS_fips-check= nginx-fips-check-module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_fips-check),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_fips_check= $(NGINX_FIPS_CHECK_MODULE_VERSION) MODULE_RELEASE_fips_check= 1 @@ -15,10 +17,6 @@ MODULE_PATCHES_fips_check= $(CONTRIB)/src/nginx-fips-check-module/0001-Added-sup MODULE_CONFARGS_fips_check= --add-dynamic-module=$(MODSRC_PREFIX)nginx-fips-check-module-$(NGINX_FIPS_CHECK_MODULE_VERSION) -.deps-module-fips-check: - cd $(CONTRIB) && make .sum-nginx-fips-check-module - touch $@ - define MODULE_POST_fips_check cat < Date: Thu, 6 Nov 2025 20:21:25 -0800 Subject: [PATCH 2/5] rpm: specify per-module dependencies And use them to compute .deps-module-* targets --- rpm/SPECS/Makefile | 3 +++ rpm/SPECS/Makefile.module-acme | 9 +++----- rpm/SPECS/Makefile.module-auth-spnego | 8 +++---- rpm/SPECS/Makefile.module-brotli | 8 +++---- rpm/SPECS/Makefile.module-encrypted-session | 12 ++++------- rpm/SPECS/Makefile.module-fips-check | 8 +++---- rpm/SPECS/Makefile.module-geoip2 | 8 +++---- rpm/SPECS/Makefile.module-headers-more | 8 +++---- rpm/SPECS/Makefile.module-lua | 24 +++++++-------------- rpm/SPECS/Makefile.module-ndk | 8 +++---- rpm/SPECS/Makefile.module-njs | 12 ++++------- rpm/SPECS/Makefile.module-otel | 24 +++++++-------------- rpm/SPECS/Makefile.module-passenger | 8 +++---- rpm/SPECS/Makefile.module-rtmp | 8 +++---- rpm/SPECS/Makefile.module-set-misc | 12 ++++------- rpm/SPECS/Makefile.module-subs-filter | 8 +++---- 16 files changed, 61 insertions(+), 107 deletions(-) diff --git a/rpm/SPECS/Makefile b/rpm/SPECS/Makefile index 8ec329ca..b8d5e007 100644 --- a/rpm/SPECS/Makefile +++ b/rpm/SPECS/Makefile @@ -190,6 +190,9 @@ endif } .deps-module-%: + if [ -n "$(MODULE_CONTRIB_DEPS_$*)" ]; then \ + cd $(CONTRIB) && make $(foreach dep,$(MODULE_CONTRIB_DEPS_$*),.sum-$(dep)); \ + fi; \ touch $@ module-%: nginx-module-%.spec check-compat-% $(SRCPATH)/$(BASE_SRC) .deps-module-% diff --git a/rpm/SPECS/Makefile.module-acme b/rpm/SPECS/Makefile.module-acme index 6a361515..9f08893c 100644 --- a/rpm/SPECS/Makefile.module-acme +++ b/rpm/SPECS/Makefile.module-acme @@ -2,7 +2,9 @@ MODULES+= acme MODULE_SUMMARY_acme= nginx-acme -include $(CONTRIB)/src/nginx-acme/version +MODULE_CONTRIB_DEPS_acme= nginx-acme + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_acme),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_acme= $(NGINX_ACME_VERSION) MODULE_RELEASE_acme= 1 @@ -16,11 +18,6 @@ MODULE_PATCHES_acme= MODULE_CONFARGS_acme= --add-dynamic-module=nginx-acme-$(NGINX_ACME_VERSION)/ -.deps-module-acme: - cd $(CONTRIB) && make \ - .sum-nginx-acme .sum-vendor-nginx-acme - touch $@ - # since our build system uses rustup-provided rustc/cargo, # we need clang from the system repos define MODULE_DEFINITIONS_acme diff --git a/rpm/SPECS/Makefile.module-auth-spnego b/rpm/SPECS/Makefile.module-auth-spnego index e61d8d4a..4a70b306 100644 --- a/rpm/SPECS/Makefile.module-auth-spnego +++ b/rpm/SPECS/Makefile.module-auth-spnego @@ -2,7 +2,9 @@ MODULES+= auth-spnego MODULE_SUMMARY_auth_spnego= 3rd-party kerberos authentication dynamic module -include $(CONTRIB)/src/spnego-http-auth-nginx-module/version +MODULE_CONTRIB_DEPS_auth-spnego= spnego-http-auth-nginx-module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_auth-spnego),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_auth_spnego= $(SPNEGO_HTTP_AUTH_NGINX_MODULE_VERSION) MODULE_RELEASE_auth_spnego= 1 @@ -15,10 +17,6 @@ MODULE_PATCHES_auth_spnego= MODULE_CONFARGS_auth_spnego= --add-dynamic-module=spnego-http-auth-nginx-module-$(SPNEGO_HTTP_AUTH_NGINX_MODULE_GITHASH) -.deps-module-auth-spnego: - cd $(CONTRIB) && make .sum-spnego-http-auth-nginx-module - touch $@ - define MODULE_DEFINITIONS_auth_spnego BuildRequires: krb5-devel endef diff --git a/rpm/SPECS/Makefile.module-brotli b/rpm/SPECS/Makefile.module-brotli index 6e28d692..7128ed30 100644 --- a/rpm/SPECS/Makefile.module-brotli +++ b/rpm/SPECS/Makefile.module-brotli @@ -2,7 +2,9 @@ MODULES+= brotli MODULE_SUMMARY_brotli= 3rd-party brotli compression dynamic modules -include $(CONTRIB)/src/ngx_brotli/version +MODULE_CONTRIB_DEPS_brotli= ngx_brotli + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_brotli),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_brotli= $(NGX_BROTLI_VERSION) MODULE_RELEASE_brotli= 1 @@ -13,10 +15,6 @@ MODULE_SOURCES_brotli= ngx_brotli-$(NGX_BROTLI_VERSION).tar.gz MODULE_CONFARGS_brotli= --add-dynamic-module=ngx_brotli-$(NGX_BROTLI_VERSION)rc -.deps-module-brotli: - cd $(CONTRIB) && make .sum-ngx_brotli - touch $@ - define MODULE_DEFINITIONS_brotli %if 0%{?suse_version} == 0 BuildRequires: brotli-devel diff --git a/rpm/SPECS/Makefile.module-encrypted-session b/rpm/SPECS/Makefile.module-encrypted-session index a1895fe8..e7bedddc 100644 --- a/rpm/SPECS/Makefile.module-encrypted-session +++ b/rpm/SPECS/Makefile.module-encrypted-session @@ -2,8 +2,10 @@ MODULES+= encrypted-session MODULE_SUMMARY_encrypted_session= 3rd-party encrypted session dynamic module -include $(CONTRIB)/src/ngx_devel_kit/version -include $(CONTRIB)/src/encrypted-session-nginx-module/version +MODULE_CONTRIB_DEPS_encrypted-session= ngx_devel_kit \ + encrypted-session-nginx-module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_encrypted-session),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_encrypted_session= $(ENCRYPTED_SESSION_NGINX_MODULE_VERSION) MODULE_RELEASE_encrypted_session= 1 @@ -16,12 +18,6 @@ MODULE_SOURCES_encrypted_session= ngx_devel_kit-$(NGX_DEVEL_KIT_VERSION).tar.gz MODULE_CONFARGS_encrypted_session= --add-dynamic-module=ngx_devel_kit-$(NGX_DEVEL_KIT_VERSION) \ --add-dynamic-module=encrypted-session-nginx-module-$(ENCRYPTED_SESSION_NGINX_MODULE_VERSION) -.deps-module-encrypted-session: - cd $(CONTRIB) && make \ - .sum-ngx_devel_kit \ - .sum-encrypted-session-nginx-module - touch $@ - define MODULE_DEFINITIONS_encrypted_session Requires: $(NDK_DEPENDENCY_TAG) endef diff --git a/rpm/SPECS/Makefile.module-fips-check b/rpm/SPECS/Makefile.module-fips-check index 11fa7aca..29b5786a 100644 --- a/rpm/SPECS/Makefile.module-fips-check +++ b/rpm/SPECS/Makefile.module-fips-check @@ -2,7 +2,9 @@ MODULES+= fips-check MODULE_SUMMARY_fips_check= 3rd-party FIPS status check dynamic module -include $(CONTRIB)/src/nginx-fips-check-module/version +MODULE_CONTRIB_DEPS_fips-check= nginx-fips-check-module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_fips-check),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_fips_check= $(NGINX_FIPS_CHECK_MODULE_VERSION) MODULE_RELEASE_fips_check= 1 @@ -15,10 +17,6 @@ MODULE_PATCHES_fips_check= $(CONTRIB)/src/nginx-fips-check-module/0001-Added-sup MODULE_CONFARGS_fips_check= --add-dynamic-module=nginx-fips-check-module-$(NGINX_FIPS_CHECK_MODULE_VERSION) -.deps-module-fips-check: - cd $(CONTRIB) && make .sum-nginx-fips-check-module - touch $@ - define MODULE_POST_fips_check cat < Date: Thu, 6 Nov 2025 20:30:46 -0800 Subject: [PATCH 3/5] alpine: specify per-module dependencies And use them to compute .deps-module-* targets --- alpine/Makefile | 3 +++ alpine/Makefile.module-acme | 8 +++----- alpine/Makefile.module-auth-spnego | 8 +++----- alpine/Makefile.module-brotli | 8 +++----- alpine/Makefile.module-encrypted-session | 12 ++++-------- alpine/Makefile.module-fips-check | 8 +++----- alpine/Makefile.module-geoip2 | 8 +++----- alpine/Makefile.module-headers-more | 8 +++----- alpine/Makefile.module-lua | 24 ++++++++---------------- alpine/Makefile.module-ndk | 8 +++----- alpine/Makefile.module-njs | 12 ++++-------- alpine/Makefile.module-otel | 20 ++++++++------------ alpine/Makefile.module-passenger | 8 +++----- alpine/Makefile.module-rtmp | 8 +++----- alpine/Makefile.module-set-misc | 12 ++++-------- alpine/Makefile.module-subs-filter | 8 +++----- 16 files changed, 61 insertions(+), 102 deletions(-) diff --git a/alpine/Makefile b/alpine/Makefile index 583934df..2ec1476a 100644 --- a/alpine/Makefile +++ b/alpine/Makefile @@ -253,6 +253,9 @@ abuild-module-%: $(BASE_SRC) .deps-module-% } .deps-module-%: + if [ -n "$(MODULE_CONTRIB_DEPS_$*)" ]; then \ + cd $(CONTRIB) && make $(foreach dep,$(MODULE_CONTRIB_DEPS_$*),.sum-$(dep)); \ + fi; \ touch $@ nginx-tests: diff --git a/alpine/Makefile.module-acme b/alpine/Makefile.module-acme index fb6c6ccd..7da30a96 100644 --- a/alpine/Makefile.module-acme +++ b/alpine/Makefile.module-acme @@ -2,7 +2,9 @@ MODULES+= acme MODULE_SUMMARY_acme= nginx-acme -include $(CONTRIB)/src/nginx-acme/version +MODULE_CONTRIB_DEPS_acme= nginx-acme + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_acme),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_acme= $(NGINX_ACME_VERSION) MODULE_RELEASE_acme= 1 @@ -14,10 +16,6 @@ MODULE_SOURCES_acme= nginx-acme-$(NGINX_ACME_VERSION).tar.gz \ MODULE_CONFARGS_acme= --add-dynamic-module=$(MODSRC_PREFIX)nginx-acme-$(NGINX_ACME_VERSION) -.deps-module-acme: - cd $(CONTRIB) && make .sum-nginx-acme .sum-vendor-nginx-acme - touch $@ - prerequisites-for-module-acme: # fixes module dependencies build using rustup-provided rustc/cargo diff --git a/alpine/Makefile.module-auth-spnego b/alpine/Makefile.module-auth-spnego index a14bd8d3..e7b6016f 100644 --- a/alpine/Makefile.module-auth-spnego +++ b/alpine/Makefile.module-auth-spnego @@ -2,7 +2,9 @@ MODULES+= auth-spnego MODULE_SUMMARY_auth_spnego= 3rd-party kerberos authentication dynamic module -include $(CONTRIB)/src/spnego-http-auth-nginx-module/version +MODULE_CONTRIB_DEPS_auth-spnego= spnego-http-auth-nginx-module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_auth-spnego),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_auth_spnego= $(SPNEGO_HTTP_AUTH_NGINX_MODULE_VERSION) MODULE_RELEASE_auth_spnego= 1 @@ -15,10 +17,6 @@ MODULE_PATCHES_auth_spnego= MODULE_CONFARGS_auth_spnego= --add-dynamic-module=$(MODSRC_PREFIX)spnego-http-auth-nginx-module-$(SPNEGO_HTTP_AUTH_NGINX_MODULE_GITHASH) -.deps-module-auth-spnego: - cd $(CONTRIB) && make .sum-spnego-http-auth-nginx-module - touch $@ - prerequisites-for-module-auth-spnego: MODULE_BUILD_DEPENDS_auth_spnego=krb5-dev diff --git a/alpine/Makefile.module-brotli b/alpine/Makefile.module-brotli index 6645b568..84a3a232 100644 --- a/alpine/Makefile.module-brotli +++ b/alpine/Makefile.module-brotli @@ -2,7 +2,9 @@ MODULES+= brotli MODULE_SUMMARY_brotli= 3rd-party brotli compression dynamic modules -include $(CONTRIB)/src/ngx_brotli/version +MODULE_CONTRIB_DEPS_brotli= ngx_brotli + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_brotli),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_brotli= $(NGX_BROTLI_VERSION) MODULE_RELEASE_brotli= 1 @@ -13,10 +15,6 @@ MODULE_SOURCES_brotli= ngx_brotli-$(NGX_BROTLI_VERSION).tar.gz MODULE_CONFARGS_brotli= --add-dynamic-module=$(MODSRC_PREFIX)ngx_brotli-$(NGX_BROTLI_VERSION)rc -.deps-module-brotli: - cd $(CONTRIB) && make .sum-ngx_brotli - touch $@ - MODULE_BUILD_DEPENDS_brotli=brotli-dev define MODULE_POST_brotli diff --git a/alpine/Makefile.module-encrypted-session b/alpine/Makefile.module-encrypted-session index 1ea5fae4..8d251aea 100644 --- a/alpine/Makefile.module-encrypted-session +++ b/alpine/Makefile.module-encrypted-session @@ -2,8 +2,10 @@ MODULES+= encrypted-session MODULE_SUMMARY_encrypted_session= 3rd-party encrypted session dynamic module -include $(CONTRIB)/src/ngx_devel_kit/version -include $(CONTRIB)/src/encrypted-session-nginx-module/version +MODULE_CONTRIB_DEPS_encrypted-session= ngx_devel_kit \ + encrypted-session-nginx-module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_encrypted-session),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_encrypted_session= $(ENCRYPTED_SESSION_NGINX_MODULE_VERSION) MODULE_RELEASE_encrypted_session= 1 @@ -16,12 +18,6 @@ MODULE_SOURCES_encrypted_session= ngx_devel_kit-$(NGX_DEVEL_KIT_VERSION).tar.gz MODULE_CONFARGS_encrypted_session= --add-dynamic-module=$(MODSRC_PREFIX)ngx_devel_kit-$(NGX_DEVEL_KIT_VERSION) \ --add-dynamic-module=$(MODSRC_PREFIX)encrypted-session-nginx-module-$(ENCRYPTED_SESSION_NGINX_MODULE_VERSION) -.deps-module-encrypted-session: - cd $(CONTRIB) && make \ - .sum-ngx_devel_kit \ - .sum-encrypted-session-nginx-module - touch $@ - prerequisites-for-module-encrypted-session: module-ndk MODULE_DEPENDS_encrypted_session=$(NDK_DEPENDENCY_TAG) diff --git a/alpine/Makefile.module-fips-check b/alpine/Makefile.module-fips-check index 983d7487..d0d1378c 100644 --- a/alpine/Makefile.module-fips-check +++ b/alpine/Makefile.module-fips-check @@ -2,7 +2,9 @@ MODULES+= fips-check MODULE_SUMMARY_fips_check= 3rd-party FIPS status check dynamic module -include $(CONTRIB)/src/nginx-fips-check-module/version +MODULE_CONTRIB_DEPS_fips-check= nginx-fips-check-module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_fips-check),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_fips_check= $(NGINX_FIPS_CHECK_MODULE_VERSION) MODULE_RELEASE_fips_check= 1 @@ -15,10 +17,6 @@ MODULE_PATCHES_fips_check= $(CONTRIB)/src/nginx-fips-check-module/0001-Added-sup MODULE_CONFARGS_fips_check= --add-dynamic-module=$(MODSRC_PREFIX)nginx-fips-check-module-$(NGINX_FIPS_CHECK_MODULE_VERSION) -.deps-module-fips-check: - cd $(CONTRIB) && make .sum-nginx-fips-check-module - touch $@ - prerequisites-for-module-fips-check: define MODULE_POST_fips_check diff --git a/alpine/Makefile.module-geoip2 b/alpine/Makefile.module-geoip2 index 3c12d56a..b562599d 100644 --- a/alpine/Makefile.module-geoip2 +++ b/alpine/Makefile.module-geoip2 @@ -2,7 +2,9 @@ MODULES+= geoip2 MODULE_SUMMARY_geoip2= 3rd-party GeoIP2 dynamic modules -include $(CONTRIB)/src/ngx_http_geoip2_module/version +MODULE_CONTRIB_DEPS_geoip2= ngx_http_geoip2_module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_geoip2),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_geoip2= $(GEOIP2_NGINX_MODULE_VERSION) MODULE_RELEASE_geoip2= 1 @@ -13,10 +15,6 @@ MODULE_SOURCES_geoip2= ngx_http_geoip2_module-$(GEOIP2_NGINX_MODULE_VERSION).tar MODULE_CONFARGS_geoip2= --add-dynamic-module=$(MODSRC_PREFIX)ngx_http_geoip2_module-$(GEOIP2_NGINX_MODULE_VERSION) -.deps-module-geoip2: - cd $(CONTRIB) && make .sum-ngx_http_geoip2_module - touch $@ - prerequisites-for-module-geoip2: MODULE_BUILD_DEPENDS_geoip2=libmaxminddb-dev diff --git a/alpine/Makefile.module-headers-more b/alpine/Makefile.module-headers-more index ce447d8c..53b68cbe 100644 --- a/alpine/Makefile.module-headers-more +++ b/alpine/Makefile.module-headers-more @@ -2,7 +2,9 @@ MODULES+= headers-more MODULE_SUMMARY_headers_more= 3rd-party headers-more dynamic module -include $(CONTRIB)/src/headers-more-nginx-module/version +MODULE_CONTRIB_DEPS_headers-more= headers-more-nginx-module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_headers-more),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_headers_more= $(HEADERS_MORE_NGINX_MODULE_VERSION) MODULE_RELEASE_headers_more= 1 @@ -13,10 +15,6 @@ MODULE_SOURCES_headers_more= headers-more-nginx-module-$(HEADERS_MORE_NGINX_MODU MODULE_CONFARGS_headers_more= --add-dynamic-module=$(MODSRC_PREFIX)headers-more-nginx-module-$(HEADERS_MORE_NGINX_MODULE_GITHASH) -.deps-module-headers-more: - cd $(CONTRIB) && make .sum-headers-more-nginx-module - touch $@ - prerequisites-for-module-headers-more: define MODULE_POST_headers_more diff --git a/alpine/Makefile.module-lua b/alpine/Makefile.module-lua index 787ed805..8039d7ea 100644 --- a/alpine/Makefile.module-lua +++ b/alpine/Makefile.module-lua @@ -2,12 +2,14 @@ MODULES+= lua MODULE_SUMMARY_lua= 3rd-party Lua dynamic modules -include $(CONTRIB)/src/luajit2/version -include $(CONTRIB)/src/ngx_devel_kit/version -include $(CONTRIB)/src/lua-nginx-module/version -include $(CONTRIB)/src/stream-lua-nginx-module/version -include $(CONTRIB)/src/lua-resty-core/version -include $(CONTRIB)/src/lua-resty-lrucache/version +MODULE_CONTRIB_DEPS_lua= luajit2 \ + ngx_devel_kit \ + lua-nginx-module \ + stream-lua-nginx-module \ + lua-resty-core \ + lua-resty-lrucache + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_lua),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_lua= $(LUA_NGINX_MODULE_VERSION) MODULE_RELEASE_lua= 1 @@ -31,16 +33,6 @@ MODULE_CONFARGS_lua= --add-dynamic-module=$(MODSRC_PREFIX)ngx_devel_kit-$(NGX_DE --add-dynamic-module=$(MODSRC_PREFIX)lua-nginx-module-$(LUA_NGINX_MODULE_VERSION) \ --add-dynamic-module=$(MODSRC_PREFIX)stream-lua-nginx-module-$(STREAM_LUA_NGINX_MODULE_VERSION) -.deps-module-lua: - cd $(CONTRIB) && make \ - .sum-luajit2 \ - .sum-ngx_devel_kit \ - .sum-lua-nginx-module \ - .sum-stream-lua-nginx-module \ - .sum-lua-resty-core \ - .sum-lua-resty-lrucache - touch $@ - prerequisites-for-module-lua: module-ndk MODULE_DEPENDS_lua=$(NDK_DEPENDENCY_TAG) diff --git a/alpine/Makefile.module-ndk b/alpine/Makefile.module-ndk index a6923f2f..3fe7d4bd 100644 --- a/alpine/Makefile.module-ndk +++ b/alpine/Makefile.module-ndk @@ -2,7 +2,9 @@ MODULES+= ndk MODULE_SUMMARY_ndk= 3rd-party NDK dynamic module -include $(CONTRIB)/src/ngx_devel_kit/version +MODULE_CONTRIB_DEPS_ndk= ngx_devel_kit + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_ndk),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_ndk= $(NGX_DEVEL_KIT_VERSION) MODULE_RELEASE_ndk= 1 @@ -13,10 +15,6 @@ MODULE_SOURCES_ndk= ngx_devel_kit-$(NGX_DEVEL_KIT_VERSION).tar.gz MODULE_CONFARGS_ndk= --add-dynamic-module=$(MODSRC_PREFIX)ngx_devel_kit-$(NGX_DEVEL_KIT_VERSION) -.deps-module-ndk: - cd $(CONTRIB) && make .sum-ngx_devel_kit - touch $@ - prerequisites-for-module-ndk: MODULE_CC_OPT_ndk=-DNDK_SET_VAR -DNDK_UPSTREAM_LIST diff --git a/alpine/Makefile.module-njs b/alpine/Makefile.module-njs index 611c0e71..8d4d4ff2 100644 --- a/alpine/Makefile.module-njs +++ b/alpine/Makefile.module-njs @@ -2,8 +2,10 @@ MODULES+= njs MODULE_SUMMARY_njs= njs dynamic modules -include $(CONTRIB)/src/njs/version -include $(CONTRIB)/src/quickjs/version +MODULE_CONTRIB_DEPS_njs= njs \ + quickjs + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_njs),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_njs= $(NJS_VERSION) MODULE_RELEASE_njs= 1 @@ -16,12 +18,6 @@ MODULE_CONFARGS_njs= --add-dynamic-module=$(MODSRC_PREFIX)njs-$(NJS_VERSION)/ngi MODULE_PATCHES_njs= $(CONTRIB)/src/quickjs/quickjs.makefile.patch -.deps-module-njs: - cd $(CONTRIB) && make \ - .sum-njs \ - .sum-quickjs - touch $@ - MODULE_VERSION_PREFIX_njs=$(MODULE_TARGET_PREFIX) MODULE_BUILD_DEPENDS_njs=libedit-dev libxml2-dev libxslt-dev diff --git a/alpine/Makefile.module-otel b/alpine/Makefile.module-otel index d8bc94cb..147cc853 100644 --- a/alpine/Makefile.module-otel +++ b/alpine/Makefile.module-otel @@ -2,10 +2,14 @@ MODULES+= otel MODULE_SUMMARY_otel= OpenTelemetry dynamic module -include $(CONTRIB)/src/nginx-otel/version -include $(CONTRIB)/src/opentelemetry-cpp/version -include $(CONTRIB)/src/opentelemetry-proto/version -include $(CONTRIB)/src/protobuf/version +MODULE_CONTRIB_DEPS_otel= nginx-otel \ + abseil-cpp \ + grpc \ + opentelemetry-cpp \ + opentelemetry-proto \ + protobuf + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_otel),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_otel= $(NGINX_OTEL_VERSION) MODULE_RELEASE_otel= 1 @@ -21,14 +25,6 @@ MODULE_PATCHES_otel= MODULE_CONFARGS_otel= --add-dynamic-module=$(MODSRC_PREFIX)/nginx-otel-$(NGINX_OTEL_GITHASH)/ -.deps-module-otel: - cd $(CONTRIB) && make \ - .sum-opentelemetry-cpp \ - .sum-opentelemetry-proto \ - .sum-protobuf \ - .sum-nginx-otel - touch $@ - prerequisites-for-module-otel: MODULE_BUILD_DEPENDS_otel=cmake protobuf-dev grpc-dev diff --git a/alpine/Makefile.module-passenger b/alpine/Makefile.module-passenger index f3a72746..e152c228 100644 --- a/alpine/Makefile.module-passenger +++ b/alpine/Makefile.module-passenger @@ -2,7 +2,9 @@ MODULES+= passenger MODULE_SUMMARY_passenger= 3rd-party Passenger dynamic module -include $(CONTRIB)/src/passenger/version +MODULE_CONTRIB_DEPS_passenger= passenger + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_passenger),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_passenger= $(PASSENGER_VERSION) MODULE_RELEASE_passenger= 1 @@ -16,10 +18,6 @@ MODULE_PATCHES_passenger= $(CONTRIB)/src/passenger/build-nginx.rb.patch \ MODULE_CONFARGS_passenger= --add-dynamic-module=$(MODSRC_PREFIX)passenger-$(PASSENGER_VERSION)/src/nginx_module -.deps-module-passenger: - cd $(CONTRIB) && make .sum-passenger - touch $@ - prerequisites-for-module-passenger: MODULE_BUILD_DEPENDS_passenger=ruby-dev ruby-rake ruby-etc diff --git a/alpine/Makefile.module-rtmp b/alpine/Makefile.module-rtmp index 5f550fe5..f571a339 100644 --- a/alpine/Makefile.module-rtmp +++ b/alpine/Makefile.module-rtmp @@ -2,7 +2,9 @@ MODULES+= rtmp MODULE_SUMMARY_rtmp= 3rd-party RTMP dynamic module -include $(CONTRIB)/src/nginx-rtmp-module/version +MODULE_CONTRIB_DEPS_rtmp= nginx-rtmp-module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_rtmp),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_rtmp= $(NGINX_RTMP_MODULE_VERSION) MODULE_RELEASE_rtmp= 1 @@ -13,10 +15,6 @@ MODULE_SOURCES_rtmp= nginx-rtmp-module-$(NGINX_RTMP_MODULE_VERSION).tar.gz MODULE_CONFARGS_rtmp= --add-dynamic-module=$(MODSRC_PREFIX)nginx-rtmp-module-$(NGINX_RTMP_MODULE_VERSION) -.deps-module-rtmp: - cd $(CONTRIB) && make .sum-nginx-rtmp-module - touch $@ - prerequisites-for-module-rtmp: define MODULE_POST_rtmp diff --git a/alpine/Makefile.module-set-misc b/alpine/Makefile.module-set-misc index b668a45e..7401cb57 100644 --- a/alpine/Makefile.module-set-misc +++ b/alpine/Makefile.module-set-misc @@ -2,8 +2,10 @@ MODULES+= set-misc MODULE_SUMMARY_set_misc= 3rd-party set-misc dynamic module -include $(CONTRIB)/src/ngx_devel_kit/version -include $(CONTRIB)/src/set-misc-nginx-module/version +MODULE_CONTRIB_DEPS_set-misc= ngx_devel_kit \ + set-misc-nginx-module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_set-misc),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_set_misc= $(SET_MISC_NGINX_MODULE_VERSION) MODULE_RELEASE_set_misc= 1 @@ -16,12 +18,6 @@ MODULE_SOURCES_set_misc= ngx_devel_kit-$(NGX_DEVEL_KIT_VERSION).tar.gz \ MODULE_CONFARGS_set_misc= --add-dynamic-module=$(MODSRC_PREFIX)ngx_devel_kit-$(NGX_DEVEL_KIT_VERSION) \ --add-dynamic-module=$(MODSRC_PREFIX)set-misc-nginx-module-$(SET_MISC_NGINX_MODULE_VERSION) -.deps-module-set-misc: - cd $(CONTRIB) && make \ - .sum-ngx_devel_kit \ - .sum-set-misc-nginx-module - touch $@ - prerequisites-for-module-set-misc: module-ndk MODULE_DEPENDS_set_misc=$(NDK_DEPENDENCY_TAG) diff --git a/alpine/Makefile.module-subs-filter b/alpine/Makefile.module-subs-filter index 6a6fee85..2bb14de1 100644 --- a/alpine/Makefile.module-subs-filter +++ b/alpine/Makefile.module-subs-filter @@ -2,7 +2,9 @@ MODULES+= subs-filter MODULE_SUMMARY_subs_filter= 3rd-party substitution dynamic module -include $(CONTRIB)/src/ngx_http_substitutions_filter_module/version +MODULE_CONTRIB_DEPS_subs-filter= ngx_http_substitutions_filter_module + +include $(foreach dep,$(MODULE_CONTRIB_DEPS_subs-filter),$(CONTRIB)/src/$(dep)/version) MODULE_VERSION_subs_filter= $(SUBSTITUTIONS_FILTER_NGINX_MODULE_VERSION) MODULE_RELEASE_subs_filter= 1 @@ -13,10 +15,6 @@ MODULE_SOURCES_subs_filter= ngx_http_substitutions_filter_module-$(SUBSTITUTIONS MODULE_CONFARGS_subs_filter= --add-dynamic-module=$(MODSRC_PREFIX)ngx_http_substitutions_filter_module-$(SUBSTITUTIONS_FILTER_NGINX_MODULE_GITHASH) -.deps-module-subs-filter: - cd $(CONTRIB) && make .sum-ngx_http_substitutions_filter_module - touch $@ - prerequisites-for-module-subs-filter: define MODULE_POST_subs_filter From 6a62f913ada55cf811f9bf4684ccd683b3b50596 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Thu, 6 Nov 2025 21:56:05 -0800 Subject: [PATCH 4/5] Make variables consistent with names of contribs --- alpine/Makefile.module-geoip2 | 6 +++--- alpine/Makefile.module-subs-filter | 6 +++--- contrib/src/abseil-cpp/Makefile | 10 +++++----- contrib/src/abseil-cpp/version | 2 +- contrib/src/grpc/version | 2 +- contrib/src/ngx_http_geoip2_module/Makefile | 10 +++++----- contrib/src/ngx_http_geoip2_module/version | 2 +- .../src/ngx_http_substitutions_filter_module/Makefile | 10 +++++----- .../src/ngx_http_substitutions_filter_module/version | 4 ++-- contrib/src/opentelemetry-cpp/version | 2 +- contrib/src/opentelemetry-proto/version | 2 +- contrib/src/protobuf/version | 2 +- debian/Makefile.module-geoip2 | 6 +++--- debian/Makefile.module-otel | 4 ++-- debian/Makefile.module-subs-filter | 6 +++--- rpm/SPECS/Makefile.module-geoip2 | 6 +++--- rpm/SPECS/Makefile.module-otel | 4 ++-- rpm/SPECS/Makefile.module-subs-filter | 6 +++--- 18 files changed, 45 insertions(+), 45 deletions(-) diff --git a/alpine/Makefile.module-geoip2 b/alpine/Makefile.module-geoip2 index b562599d..46837df7 100644 --- a/alpine/Makefile.module-geoip2 +++ b/alpine/Makefile.module-geoip2 @@ -6,14 +6,14 @@ MODULE_CONTRIB_DEPS_geoip2= ngx_http_geoip2_module include $(foreach dep,$(MODULE_CONTRIB_DEPS_geoip2),$(CONTRIB)/src/$(dep)/version) -MODULE_VERSION_geoip2= $(GEOIP2_NGINX_MODULE_VERSION) +MODULE_VERSION_geoip2= $(NGX_HTTP_GEOIP2_MODULE_VERSION) MODULE_RELEASE_geoip2= 1 MODULE_VERSION_PREFIX_geoip2=$(MODULE_TARGET_PREFIX) -MODULE_SOURCES_geoip2= ngx_http_geoip2_module-$(GEOIP2_NGINX_MODULE_VERSION).tar.gz +MODULE_SOURCES_geoip2= ngx_http_geoip2_module-$(NGX_HTTP_GEOIP2_MODULE_VERSION).tar.gz -MODULE_CONFARGS_geoip2= --add-dynamic-module=$(MODSRC_PREFIX)ngx_http_geoip2_module-$(GEOIP2_NGINX_MODULE_VERSION) +MODULE_CONFARGS_geoip2= --add-dynamic-module=$(MODSRC_PREFIX)ngx_http_geoip2_module-$(NGX_HTTP_GEOIP2_MODULE_VERSION) prerequisites-for-module-geoip2: diff --git a/alpine/Makefile.module-subs-filter b/alpine/Makefile.module-subs-filter index 2bb14de1..62d7a0a1 100644 --- a/alpine/Makefile.module-subs-filter +++ b/alpine/Makefile.module-subs-filter @@ -6,14 +6,14 @@ MODULE_CONTRIB_DEPS_subs-filter= ngx_http_substitutions_filter_module include $(foreach dep,$(MODULE_CONTRIB_DEPS_subs-filter),$(CONTRIB)/src/$(dep)/version) -MODULE_VERSION_subs_filter= $(SUBSTITUTIONS_FILTER_NGINX_MODULE_VERSION) +MODULE_VERSION_subs_filter= $(NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_VERSION) MODULE_RELEASE_subs_filter= 1 MODULE_VERSION_PREFIX_subs_filter=$(MODULE_TARGET_PREFIX) -MODULE_SOURCES_subs_filter= ngx_http_substitutions_filter_module-$(SUBSTITUTIONS_FILTER_NGINX_MODULE_GITHASH).tar.gz +MODULE_SOURCES_subs_filter= ngx_http_substitutions_filter_module-$(NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_GITHASH).tar.gz -MODULE_CONFARGS_subs_filter= --add-dynamic-module=$(MODSRC_PREFIX)ngx_http_substitutions_filter_module-$(SUBSTITUTIONS_FILTER_NGINX_MODULE_GITHASH) +MODULE_CONFARGS_subs_filter= --add-dynamic-module=$(MODSRC_PREFIX)ngx_http_substitutions_filter_module-$(NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_GITHASH) prerequisites-for-module-subs-filter: diff --git a/contrib/src/abseil-cpp/Makefile b/contrib/src/abseil-cpp/Makefile index 1da02400..5442023b 100644 --- a/contrib/src/abseil-cpp/Makefile +++ b/contrib/src/abseil-cpp/Makefile @@ -1,16 +1,16 @@ # abseil-cpp include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/version -ABSEIL_URL := $(GITHUB)/abseil/abseil-cpp/archive/refs/tags/$(ABSEIL_VERSION).tar.gz +ABSEIL_CPP_URL := $(GITHUB)/abseil/abseil-cpp/archive/refs/tags/$(ABSEIL_CPP_VERSION).tar.gz PKGS += abseil-cpp -$(TARBALLS)/abseil-cpp-$(ABSEIL_VERSION).tar.gz: - $(call download_pkg,$(ABSEIL_URL),abseil-cpp) +$(TARBALLS)/abseil-cpp-$(ABSEIL_CPP_VERSION).tar.gz: + $(call download_pkg,$(ABSEIL_CPP_URL),abseil-cpp) -.sum-abseil-cpp: abseil-cpp-$(ABSEIL_VERSION).tar.gz +.sum-abseil-cpp: abseil-cpp-$(ABSEIL_CPP_VERSION).tar.gz -abseil-cpp: abseil-cpp-$(ABSEIL_VERSION).tar.gz .sum-abseil-cpp +abseil-cpp: abseil-cpp-$(ABSEIL_CPP_VERSION).tar.gz .sum-abseil-cpp $(UNPACK) $(APPLY) $(SRC)/abseil-cpp/b957f0ccd00481cd4fd663d8320aa02ae0564f18.patch $(APPLY) $(SRC)/abseil-cpp/4500c2fada4e952037c59bd65e8be1ba0b29f21e.patch diff --git a/contrib/src/abseil-cpp/version b/contrib/src/abseil-cpp/version index 255d1347..07cd3c69 100644 --- a/contrib/src/abseil-cpp/version +++ b/contrib/src/abseil-cpp/version @@ -1 +1 @@ -ABSEIL_VERSION=20211102.0 +ABSEIL_CPP_VERSION := 20211102.0 diff --git a/contrib/src/grpc/version b/contrib/src/grpc/version index 2c3ec51e..f056ebea 100644 --- a/contrib/src/grpc/version +++ b/contrib/src/grpc/version @@ -1 +1 @@ -GRPC_VERSION=1.46.7 +GRPC_VERSION := 1.46.7 diff --git a/contrib/src/ngx_http_geoip2_module/Makefile b/contrib/src/ngx_http_geoip2_module/Makefile index 2810d2e5..ed70d8b0 100644 --- a/contrib/src/ngx_http_geoip2_module/Makefile +++ b/contrib/src/ngx_http_geoip2_module/Makefile @@ -1,16 +1,16 @@ # ngx_http_geoip2_module include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/version -GEOIP2_NGINX_MODULE_URL := $(GITHUB)/leev/ngx_http_geoip2_module/archive/$(GEOIP2_NGINX_MODULE_VERSION).tar.gz +NGX_HTTP_GEOIP2_MODULE_URL := $(GITHUB)/leev/ngx_http_geoip2_module/archive/$(NGX_HTTP_GEOIP2_MODULE_VERSION).tar.gz PKGS += ngx_http_geoip2_module -$(TARBALLS)/ngx_http_geoip2_module-$(GEOIP2_NGINX_MODULE_VERSION).tar.gz: - $(call download_pkg,$(GEOIP2_NGINX_MODULE_URL),ngx_http_geoip2_module) +$(TARBALLS)/ngx_http_geoip2_module-$(NGX_HTTP_GEOIP2_MODULE_VERSION).tar.gz: + $(call download_pkg,$(NGX_HTTP_GEOIP2_MODULE_URL),ngx_http_geoip2_module) -.sum-ngx_http_geoip2_module: ngx_http_geoip2_module-$(GEOIP2_NGINX_MODULE_VERSION).tar.gz +.sum-ngx_http_geoip2_module: ngx_http_geoip2_module-$(NGX_HTTP_GEOIP2_MODULE_VERSION).tar.gz -ngx_http_geoip2_module: ngx_http_geoip2_module-$(GEOIP2_NGINX_MODULE_VERSION).tar.gz .sum-ngx_http_geoip2_module +ngx_http_geoip2_module: ngx_http_geoip2_module-$(NGX_HTTP_GEOIP2_MODULE_VERSION).tar.gz .sum-ngx_http_geoip2_module $(UNPACK) $(MOVE) diff --git a/contrib/src/ngx_http_geoip2_module/version b/contrib/src/ngx_http_geoip2_module/version index 7e839a20..986acdf2 100644 --- a/contrib/src/ngx_http_geoip2_module/version +++ b/contrib/src/ngx_http_geoip2_module/version @@ -1 +1 @@ -GEOIP2_NGINX_MODULE_VERSION := 3.4 +NGX_HTTP_GEOIP2_MODULE_VERSION := 3.4 diff --git a/contrib/src/ngx_http_substitutions_filter_module/Makefile b/contrib/src/ngx_http_substitutions_filter_module/Makefile index 32bc27f2..996910ce 100644 --- a/contrib/src/ngx_http_substitutions_filter_module/Makefile +++ b/contrib/src/ngx_http_substitutions_filter_module/Makefile @@ -1,16 +1,16 @@ # ngx_http_substitutions_filter_module include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/version -SUBSTITUTIONS_FILTER_NGINX_MODULE_URL := $(GITHUB)/yaoweibin/ngx_http_substitutions_filter_module/archive/$(SUBSTITUTIONS_FILTER_NGINX_MODULE_GITHASH).tar.gz +NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_URL := $(GITHUB)/yaoweibin/ngx_http_substitutions_filter_module/archive/$(NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_GITHASH).tar.gz PKGS += ngx_http_substitutions_filter_module -$(TARBALLS)/ngx_http_substitutions_filter_module-$(SUBSTITUTIONS_FILTER_NGINX_MODULE_GITHASH).tar.gz: - $(call download_pkg,$(SUBSTITUTIONS_FILTER_NGINX_MODULE_URL),ngx_http_substitutions_filter_module) +$(TARBALLS)/ngx_http_substitutions_filter_module-$(NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_GITHASH).tar.gz: + $(call download_pkg,$(NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_URL),ngx_http_substitutions_filter_module) -.sum-ngx_http_substitutions_filter_module: ngx_http_substitutions_filter_module-$(SUBSTITUTIONS_FILTER_NGINX_MODULE_GITHASH).tar.gz +.sum-ngx_http_substitutions_filter_module: ngx_http_substitutions_filter_module-$(NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_GITHASH).tar.gz -ngx_http_substitutions_filter_module: ngx_http_substitutions_filter_module-$(SUBSTITUTIONS_FILTER_NGINX_MODULE_GITHASH).tar.gz .sum-ngx_http_substitutions_filter_module +ngx_http_substitutions_filter_module: ngx_http_substitutions_filter_module-$(NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_GITHASH).tar.gz .sum-ngx_http_substitutions_filter_module $(UNPACK) $(MOVE) diff --git a/contrib/src/ngx_http_substitutions_filter_module/version b/contrib/src/ngx_http_substitutions_filter_module/version index 907abb51..05e4c163 100644 --- a/contrib/src/ngx_http_substitutions_filter_module/version +++ b/contrib/src/ngx_http_substitutions_filter_module/version @@ -1,2 +1,2 @@ -SUBSTITUTIONS_FILTER_NGINX_MODULE_VERSION := 0.6.4 -SUBSTITUTIONS_FILTER_NGINX_MODULE_GITHASH := c6f825fa592acc29275c2eb4d1ab1eccab9de19e +NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_VERSION := 0.6.4 +NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_GITHASH := c6f825fa592acc29275c2eb4d1ab1eccab9de19e diff --git a/contrib/src/opentelemetry-cpp/version b/contrib/src/opentelemetry-cpp/version index 16b7116a..d7ecb01a 100644 --- a/contrib/src/opentelemetry-cpp/version +++ b/contrib/src/opentelemetry-cpp/version @@ -1 +1 @@ -OPENTELEMETRY_CPP_VERSION=1.23.0 +OPENTELEMETRY_CPP_VERSION := 1.23.0 diff --git a/contrib/src/opentelemetry-proto/version b/contrib/src/opentelemetry-proto/version index 3bc60c9a..efe74e6e 100644 --- a/contrib/src/opentelemetry-proto/version +++ b/contrib/src/opentelemetry-proto/version @@ -1 +1 @@ -OPENTELEMETRY_PROTO_VERSION=1.8.0 +OPENTELEMETRY_PROTO_VERSION := 1.8.0 diff --git a/contrib/src/protobuf/version b/contrib/src/protobuf/version index d6387083..9b1941cd 100644 --- a/contrib/src/protobuf/version +++ b/contrib/src/protobuf/version @@ -1 +1 @@ -PROTOBUF_VERSION=3.19.5 +PROTOBUF_VERSION := 3.19.5 diff --git a/debian/Makefile.module-geoip2 b/debian/Makefile.module-geoip2 index 6a03e289..e9bdb049 100644 --- a/debian/Makefile.module-geoip2 +++ b/debian/Makefile.module-geoip2 @@ -6,14 +6,14 @@ MODULE_CONTRIB_DEPS_geoip2= ngx_http_geoip2_module include $(foreach dep,$(MODULE_CONTRIB_DEPS_geoip2),$(CONTRIB)/src/$(dep)/version) -MODULE_VERSION_geoip2= $(GEOIP2_NGINX_MODULE_VERSION) +MODULE_VERSION_geoip2= $(NGX_HTTP_GEOIP2_MODULE_VERSION) MODULE_RELEASE_geoip2= 1 MODULE_VERSION_PREFIX_geoip2=$(MODULE_TARGET_PREFIX) -MODULE_SOURCES_geoip2= ngx_http_geoip2_module-$(GEOIP2_NGINX_MODULE_VERSION).tar.gz +MODULE_SOURCES_geoip2= ngx_http_geoip2_module-$(NGX_HTTP_GEOIP2_MODULE_VERSION).tar.gz -MODULE_CONFARGS_geoip2= --add-dynamic-module=$(MODSRC_PREFIX)ngx_http_geoip2_module-$(GEOIP2_NGINX_MODULE_VERSION) +MODULE_CONFARGS_geoip2= --add-dynamic-module=$(MODSRC_PREFIX)ngx_http_geoip2_module-$(NGX_HTTP_GEOIP2_MODULE_VERSION) MODULE_BUILD_DEPENDS_geoip2=, libmaxminddb-dev diff --git a/debian/Makefile.module-otel b/debian/Makefile.module-otel index e3d95926..0b622c01 100644 --- a/debian/Makefile.module-otel +++ b/debian/Makefile.module-otel @@ -17,7 +17,7 @@ MODULE_RELEASE_otel= 1 MODULE_VERSION_PREFIX_otel=$(MODULE_TARGET_PREFIX) MODULE_SOURCES_otel= nginx-otel-$(NGINX_OTEL_VERSION)-$(NGINX_OTEL_GITHASH).tar.gz \ - abseil-cpp-$(ABSEIL_VERSION).tar.gz \ + abseil-cpp-$(ABSEIL_CPP_VERSION).tar.gz \ grpc-$(GRPC_VERSION).tar.gz \ opentelemetry-cpp-$(OPENTELEMETRY_CPP_VERSION).tar.gz \ opentelemetry-proto-$(OPENTELEMETRY_PROTO_VERSION).tar.gz \ @@ -35,7 +35,7 @@ define MODULE_PREBUILD_otel set -ex \&\& \ export PATH=$$builddir/prebuilt/bin/:$$$$PATH \&\& \ export CMAKE_PREFIX_PATH=$$builddir/prebuilt/ \&\& \ - cd $$(BUILDDIR_nginx)/extra/abseil-cpp-$(ABSEIL_VERSION) \&\& mkdir build \&\& cd build \&\& \ + cd $$(BUILDDIR_nginx)/extra/abseil-cpp-$(ABSEIL_CPP_VERSION) \&\& mkdir build \&\& cd build \&\& \ cmake \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_CXX_EXTENSIONS=OFF \ diff --git a/debian/Makefile.module-subs-filter b/debian/Makefile.module-subs-filter index 095495ac..a5ed95b0 100644 --- a/debian/Makefile.module-subs-filter +++ b/debian/Makefile.module-subs-filter @@ -6,14 +6,14 @@ MODULE_CONTRIB_DEPS_subs-filter= ngx_http_substitutions_filter_module include $(foreach dep,$(MODULE_CONTRIB_DEPS_subs-filter),$(CONTRIB)/src/$(dep)/version) -MODULE_VERSION_subs_filter= $(SUBSTITUTIONS_FILTER_NGINX_MODULE_VERSION) +MODULE_VERSION_subs_filter= $(NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_VERSION) MODULE_RELEASE_subs_filter= 1 MODULE_VERSION_PREFIX_subs_filter=$(MODULE_TARGET_PREFIX) -MODULE_SOURCES_subs_filter= ngx_http_substitutions_filter_module-$(SUBSTITUTIONS_FILTER_NGINX_MODULE_GITHASH).tar.gz +MODULE_SOURCES_subs_filter= ngx_http_substitutions_filter_module-$(NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_GITHASH).tar.gz -MODULE_CONFARGS_subs_filter= --add-dynamic-module=$(MODSRC_PREFIX)ngx_http_substitutions_filter_module-$(SUBSTITUTIONS_FILTER_NGINX_MODULE_GITHASH) +MODULE_CONFARGS_subs_filter= --add-dynamic-module=$(MODSRC_PREFIX)ngx_http_substitutions_filter_module-$(NGX_HTTP_SUBSTITUTIONS_FILTER_MODULE_GITHASH) define MODULE_POST_subs_filter cat < Date: Thu, 6 Nov 2025 18:20:22 -0800 Subject: [PATCH 5/5] Added attestation targets --- alpine/Makefile | 8 +++++--- contrib/attestation.mak | 17 +++++++++++++++++ debian/Makefile | 7 +++++-- rpm/SPECS/Makefile | 7 +++++-- 4 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 contrib/attestation.mak diff --git a/alpine/Makefile b/alpine/Makefile index 2ec1476a..d81aea91 100644 --- a/alpine/Makefile +++ b/alpine/Makefile @@ -109,6 +109,8 @@ BASE_CONFIGURE_ARGS+=\ --with-stream_proxy_protocol_vendor_module endif +include $(CONTRIB)/attestation.mak + export CR=\\n modname = $(shell echo $1 | tr '-' '_') @@ -145,7 +147,7 @@ modules: base $(addprefix module-, $(MODULES)) abuild: abuild-base $(addprefix abuild-module-, $(MODULES)) -base: ${HOME}/.abuild/abuild.conf | abuild-base +base: ${HOME}/.abuild/abuild.conf | abuild-base attest-base @echo "===> Building base package" ; \ /usr/bin/time -p $(SHELL) -c "cd abuild-base/ && abuild checksum && abuild unpack && abuild prepare && abuild -K build && abuild rootpkg" && \ ln -s abuild-base/pkg/nginx$(BASE_SUFFIX)/usr/sbin base && \ @@ -184,7 +186,7 @@ abuild-base: $(BASE_SRC) > abuild-base/APKBUILD ; \ } -module-%: ${HOME}/.abuild/abuild.conf | abuild-module-% +module-%: ${HOME}/.abuild/abuild.conf | abuild-module-% attest-module-% @echo "===> Building nginx$(MODULE_SUFFIX)-$@ package" @/usr/bin/time -p $(SHELL) -c "cd abuild-$@/ && abuild checksum && abuild unpack && abuild prepare && abuild -K build && abuild rootpkg" && \ ln -s abuild-$@/pkg/nginx$(MODULE_SUFFIX)-module-$*/usr/lib/nginx/modules $@ @@ -372,7 +374,7 @@ check-modules: } clean: - @rm -rf base abuild-base abuild-module-* module-* $(BASE_SRC) nginx-tests .deps-module-* + @rm -rf base abuild-base abuild-module-* module-* $(BASE_SRC) nginx-tests .deps-module-* attest-base attest-module-* .PHONY: default all modules abuild test test-debug check-modules clean diff --git a/contrib/attestation.mak b/contrib/attestation.mak new file mode 100644 index 00000000..76d53d28 --- /dev/null +++ b/contrib/attestation.mak @@ -0,0 +1,17 @@ +toupper = $(shell echo $1 | tr '[:lower:]-' '[:upper:]_' ) +dep_v = $(shell echo $(call toupper,$1)_VERSION ) +dep_h = $(shell echo $(call toupper,$1)_GITHASH ) +dep_checksum = $(shell test -f "$(CONTRIB)/src/$1/SHA512SUMS" && \ + awk '( index($$2,"$($(call dep_v,$1))") > 1 || index($$2,"$($(call dep_h,$1))") > 1 ) {print $$1}' "$(CONTRIB)/src/$1/SHA512SUMS" ) +attest_version = $(shell test -n '$($(call dep_h,$1))' && echo $($(call dep_v,$1))-$($(call dep_h,$1)) || echo $($(call dep_v,$1))) + +attest-module-%: + @$(foreach dep,$(MODULE_CONTRIB_DEPS_$*),echo $(dep) $(call attest_version,$(dep)) $(call dep_checksum,$(dep)) >> attest-module-$* ;) + +attest: attest-base $(addprefix attest-module-, $(MODULES)) + +attest-base: + if [ "$(BASE_TARGET)" = "oss" ]; then \ + checksum=$$(grep "$(BASE_VERSION)" "$(CONTRIB)/src/nginx/SHA512SUMS" | cut -d' ' -f1) ; \ + printf "%s %s %s\n" "nginx" "$(BASE_VERSION)" "$$checksum" >> "$@"; \ + fi diff --git a/debian/Makefile b/debian/Makefile index 098620fe..e7eed9b5 100644 --- a/debian/Makefile +++ b/debian/Makefile @@ -111,6 +111,8 @@ BASE_CONFIGURE_ARGS+= \ --with-stream_proxy_protocol_vendor_module endif +include $(CONTRIB)/attestation.mak + export CR=\\n modname = $(shell echo $1 | tr '-' '_') @@ -139,7 +141,7 @@ modules: $(addprefix module-, $(MODULES)) rules: rules-base $(addprefix rules-module-, $(MODULES)) -base: rules-base +base: rules-base attest-base @echo "===> Building base package" ; \ $(SHELL) -c "cd debuild-base/$(SRCDIR) ; export DEB_BUILD_OPTIONS=parallel=$(NPROC) ; time -p debuild -us -uc" && \ find debuild-base/ -maxdepth 1 -type f -exec cp {} ../../ \; && \ @@ -207,7 +209,7 @@ rules-base: $(BASE_SRC) nginx.deb-changelog ln -s debuild-base/$(SRCDIR)/debian/rules rules-base ; \ } -module-%: rules-module-% check-compat-% +module-%: rules-module-% check-compat-% attest-module-% @if [ -e nginx-$@.skip ]; then \ echo "---> Skipping nginx-$@ package (`cat nginx-$@.skip`)" ; \ else \ @@ -462,6 +464,7 @@ check-modules: clean: @rm -rf base module-* rules-base rules-module-* debuild-base debuild-module-* nginx-tests $(BASE_SRC) .deps-module-* @rm -f nginx.deb-changelog nginx-*.deb-changelog nginx-module-*.deb-changelog nginx-module-*.skip + @rm -f attest-base attest-module-* .PHONY: default list list-base list-all-modules list-base-modules all modules rules test test-debug check-modules clean diff --git a/rpm/SPECS/Makefile b/rpm/SPECS/Makefile index b8d5e007..0937dbc1 100644 --- a/rpm/SPECS/Makefile +++ b/rpm/SPECS/Makefile @@ -113,6 +113,8 @@ BASE_CONFIGURE_ARGS+= \ --with-stream_proxy_protocol_vendor_module endif +include $(CONTRIB)/attestation.mak + export CR=\\n modname = $(shell echo $1 | tr '-' '_') @@ -145,7 +147,7 @@ $(SRCPATH)/$(BASE_SRC): cd $(CONTRIB) && make .sum-nginx$(BASE_SUFFIX) cd $(SRCPATH) && ln -s $(CONTRIB)/tarballs/$(BASE_SRC) $(BASE_SRC) -base: nginx.spec $(SRCPATH)/$(BASE_SRC) +base: nginx.spec $(SRCPATH)/$(BASE_SRC) attest-base @echo "===> Building base package" ; \ BUILDROOT=`rpmbuild -bc --short-circuit -D "_topdir \`pwd\`/../" -D "__spec_build_pre echo bdir=%{_builddir}; exit 0" nginx$(BASE_SUFFIX).spec | grep ^bdir= | cut -d'=' -f 2` ; \ $(SHELL) -c "time -p rpmbuild --noclean -D \"_topdir `pwd`/../\" -ba nginx$(BASE_SUFFIX).spec" && \ @@ -195,7 +197,7 @@ endif fi; \ touch $@ -module-%: nginx-module-%.spec check-compat-% $(SRCPATH)/$(BASE_SRC) .deps-module-% +module-%: nginx-module-%.spec check-compat-% $(SRCPATH)/$(BASE_SRC) .deps-module-% attest-module-% @if [ -e nginx-$@.skip ]; then \ echo "---> Skipping nginx-$@ package (`cat nginx-$@.skip`)" ; \ else \ @@ -447,6 +449,7 @@ clean: @rm -f $(BASE_SRC) $(SRCPATH)/$(BASE_SRC) @rm -f nginx.rpm-changelog nginx-*.rpm-changelog nginx-module-*.rpm-changelog @rm -f .deps-module-* + @rm -f attest-base attest-module-* @find $(SRCPATH)/ -type l -delete .PHONY: default list list-base list-all-modules list-base-modules all modules specs test test-debug clean