Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions alpine/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ SRCDIR= nginx$(BASE_SUFFIX)-$(BASE_VERSION)
MODULE_SRCDIR= $(SRCDIR)
MODSRC_PREFIX= ../

NGINX_PLUS_MAJOR_MINOR = $(word 1,$(subst ., ,$(NGINX_PLUS_VERSION))).$(word 2,$(subst ., ,$(NGINX_PLUS_VERSION)))

RELSTRING=
ifeq ($(shell test $(PLUS_RELEASE) -gt 1; echo $$?),0)
RELSTRING=-p$(shell expr $(PLUS_RELEASE) - 1 )
endif

BUILD_SUFFIX ?=

ifeq ($(MODULE_TARGET), oss)
APKBUILD_TEMPLATE= alpine/APKBUILD-module.in
MODULE_SUMMARY_PREFIX=nginx
Expand All @@ -35,7 +44,7 @@ else
APKBUILD_TEMPLATE= alpine-$(MODULE_TARGET)/APKBUILD-$(MODULE_TARGET)-module.in
MODULE_SUFFIX= -$(MODULE_TARGET)
MODULE_SUMMARY_PREFIX=NGINX Plus
TARGET_VERSION=$(PLUS_VERSION)
TARGET_VERSION=$(NGINX_PLUS_MAJOR_MINOR)
endif

MODULE_TARGET_PREFIX=$(TARGET_VERSION).
Expand Down Expand Up @@ -96,17 +105,20 @@ BASE_CONFIGURE_ARGS=\

ifneq ($(BASE_TARGET), oss)
BASE_CONFIGURE_ARGS+=\
--build=nginx-$(BASE_TARGET)-r$(PLUS_VERSION) \
--mgmt-id-path=/var/lib/nginx/nginx.id \
--build=nginx-$(BASE_TARGET)-r$(PLUS_VERSION)$(RELSTRING)$(BUILD_SUFFIX) \
--state-path=/var/lib/nginx/state \
--with-control-api \
--with-http_auth_jwt_module \
--with-http_f4f_module \
--with-http_hls_module \
--with-http_oidc_module \
--with-http_proxy_protocol_vendor_module \
--with-http_session_log_module \
--with-mgmt \
--with-stream_mqtt_filter_module \
--with-stream_mqtt_preread_module \
--with-stream_proxy_protocol_vendor_module
--with-stream_proxy_protocol_vendor_module \
--system-ca-bundle=/etc/ssl/cert.pem
endif

include $(CONTRIB)/attestation.mak
Expand Down Expand Up @@ -181,6 +193,7 @@ abuild-base: $(BASE_SRC)
-e 's#%%BASE_RELEASE%%#$(BASE_RELEASE)#g' \
-e 's#%%PLUS_VERSION%%#$(PLUS_VERSION)#g' \
-e 's#%%PLUS_RELEASE%%#$(PLUS_RELEASE)#g' \
-e 's#%%NGINX_PLUS_MAJOR_MINOR%%#$(NGINX_PLUS_MAJOR_MINOR)#g' \
-e "s#%%BASE_PATCHES%%#$$patches#g" \
-e 's#%%BASE_CONFIGURE_ARGS%%#$(BASE_CONFIGURE_ARGS)#g' \
> abuild-base/APKBUILD ; \
Expand Down Expand Up @@ -231,6 +244,7 @@ abuild-module-%: $(BASE_SRC) .deps-module-%
-e "s#%%BASE_RELEASE%%#$(BASE_RELEASE)#g" \
-e 's#%%BASE_CONFIGURE_ARGS%%#$(BASE_CONFIGURE_ARGS)#g' \
-e "s#%%PLUS_VERSION%%#$(PLUS_VERSION)#g" \
-e 's#%%NGINX_PLUS_MAJOR_MINOR%%#$(NGINX_PLUS_MAJOR_MINOR)#g' \
-e "s#%%MODULE_VERSION%%#$(MODULE_VERSION_$(call modname, $*))#g" \
-e "s#%%MODULE_RELEASE%%#$(MODULE_RELEASE_$(call modname, $*))#g" \
-e "s#%%MODULE_VERSION_PREFIX%%#$(MODULE_VERSION_PREFIX_$(call modname, $*))#g" \
Expand Down
6 changes: 1 addition & 5 deletions alpine/Makefile.module-ndk
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ prerequisites-for-module-ndk:
MODULE_CC_OPT_ndk=-DNDK_SET_VAR -DNDK_UPSTREAM_LIST
MODULE_CC_OPT_DEBUG_ndk=$(MODULE_CC_OPT_ndk)

ifeq ($(MODULE_TARGET), plus)
NDK_DEPENDENCY_TAG=nginx-plus-module-ndk nginx-plus-module-ndk-r$(PLUS_VERSION)
else
NDK_DEPENDENCY_TAG=nginx-module-ndk nginx-module-ndk-r$(BASE_VERSION)
endif
NDK_DEPENDENCY_TAG=nginx$(MODULE_SUFFIX)-module-ndk nginx$(MODULE_SUFFIX)-module-ndk-r$(TARGET_VERSION)

define MODULE_POST_ndk
cat <<BANNER
Expand Down
6 changes: 4 additions & 2 deletions alpine/alpine-plus/APKBUILD-plus-module.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
_base_version=%%BASE_VERSION%%
_base_release=%%BASE_RELEASE%%
_plus_version=%%PLUS_VERSION%%
_plus_major_minor=%%NGINX_PLUS_MAJOR_MINOR%%

pkgname=nginx-plus-module-%%MODULE%%
pkgver=%%MODULE_VERSION_PREFIX%%%%MODULE_VERSION%%
Expand All @@ -12,9 +13,9 @@ pkgdesc="%%SUMMARY%%"
url="https://www.nginx.com/"
arch="all"
license="Proprietary (EULA included)"
depends="nginx-plus~$_plus_version nginx-plus-r$_plus_version %%MODULE_DEPENDS%%"
depends="nginx-plus~$_plus_major_minor nginx-plus-r$_plus_major_minor %%MODULE_DEPENDS%%"
makedepends="linux-headers openssl-dev pcre2-dev zlib-dev %%MODULE_BUILD_DEPENDS%%"
provides="$pkgname-r$_plus_version %%MODULE_PROVIDES%%"
provides="$pkgname-r$_plus_major_minor %%MODULE_PROVIDES%%"
%%ADD_CONTROL_TAGS%%

options="!check"
Expand Down Expand Up @@ -96,6 +97,7 @@ unpack() {
test -n "$sndir" && ln -s ${sndir} ${sn} ||: )
fi
done
cd "$srcdir"
bs=`echo nginx*-$_base_version`
ln -s $bs ${bs%-*}
}
Expand Down
10 changes: 6 additions & 4 deletions build_module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# Obtains pkg-oss tool, creates packaging files and copies in module source.
#
# CHANGELOG
# v0.20 [05-May-2026] Accept new versioning for NGINX Plus releases
# v0.19 [03-Sep-2024] Moved to GitHub
# v0.18 [29-Apr-2021] Added -V option to specify module version
# v0.17 [11-Nov-2020] Fixed bashisms and made /bin/sh default interpreter
Expand Down Expand Up @@ -63,7 +64,7 @@ if [ $# -eq 0 ]; then
echo " -s | --skip-depends # Skip dependecies check/install"
echo " -y | --non-interactive # Automatically install dependencies and overwrite files"
echo " -f | --force-dynamic # Attempt to convert static configuration to dynamic module"
echo " -r <NGINX Plus release number> # Build against the corresponding OSS version for this release"
echo " -r <NGINX Plus release number> # Build against the corresponding OSS version for this release (NN[pN] or NN.N[.N])"
echo " -v [NGINX OSS version number] # Build against this OSS version [current mainline] (default)"
echo " -o <package output directory> # Create package(s) in this directory (default: $OUTPUT_DIR)"
echo ""
Expand Down Expand Up @@ -109,14 +110,15 @@ while [ $# -gt 1 ]; do
;;
"-r")
BUILD_PLATFORM=Plus
if [ `echo -n $2 | tr -d '[0-9p]' | wc -c` -gt 0 ]; then
echo "$ME: ERROR: NGINX Plus release must be in the format NN[pN] - quitting"
if [ `echo -n $2 | tr -d '[0-9p.]' | wc -c` -gt 0 ]; then
echo "$ME: ERROR: NGINX Plus release must be in the format NN[pN] or NN.N[.N] - quitting"
exit 1
elif [ "`echo "10^$2" | tr '^' '\n' | sort -nr | head -1`" = "10" ]; then
echo "$ME: ERROR: NGINX Plus release must be at least 11 to support dynamic modules - quitting"
exit 1
fi
PLUS_REL=$2
# Normalize NN.N.N to NN.N for git branch naming
PLUS_REL=`echo $2 | sed 's/^\([0-9]*\.[0-9]*\)\.[0-9]*$/\1/'`
shift; shift
;;
"-v")
Expand Down
2 changes: 1 addition & 1 deletion contrib/src/nginx/version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NGINX_VERSION := 1.31.0
NGINX_PLUS_VERSION := 37
NGINX_PLUS_VERSION := 37.0.0
1 change: 0 additions & 1 deletion contrib/src/spnego-http-auth-nginx-module/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ $(TARBALLS)/spnego-http-auth-nginx-module-$(SPNEGO_HTTP_AUTH_NGINX_MODULE_GITHAS

spnego-http-auth-nginx-module: spnego-http-auth-nginx-module-$(SPNEGO_HTTP_AUTH_NGINX_MODULE_GITHASH).tar.gz .sum-spnego-http-auth-nginx-module
$(UNPACK)
$(APPLY) $(SRC)/spnego-http-auth-nginx-module/extra-patch-ngx_http_auth_spnego_module.c
$(MOVE)

.spnego-http-auth-nginx-module: spnego-http-auth-nginx-module
Expand Down
24 changes: 20 additions & 4 deletions debian/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,20 @@ BASE_SRC= nginx$(BASE_SUFFIX)-$(BASE_VERSION).tar.gz
SRCDIR= nginx$(BASE_SUFFIX)-$(BASE_VERSION)
BUILD_ENV_PATH= ${HOME}/debuild


NGINX_PLUS_MAJOR_MINOR = $(word 1,$(subst ., ,$(NGINX_PLUS_VERSION))).$(word 2,$(subst ., ,$(NGINX_PLUS_VERSION)))

RELSTRING=
ifeq ($(shell test $(PLUS_RELEASE) -gt 1; echo $$?),0)
RELSTRING=-p$(shell expr $(PLUS_RELEASE) - 1 )
endif

BUILD_SUFFIX ?=

ifeq ($(MODULE_TARGET), plus)
MODULE_SUFFIX= -plus
MODULE_SUMMARY_PREFIX=NGINX Plus
TARGET_VERSION=$(PLUS_VERSION)
TARGET_VERSION=$(NGINX_PLUS_MAJOR_MINOR)
BASE_ORIG_NAME=nginx-plus_$(PLUS_VERSION).orig.tar.gz
MODULE_PACKAGE_URL= https://www.nginx.com/
else
Expand Down Expand Up @@ -98,17 +108,20 @@ BASE_CONFIGURE_ARGS=\

ifeq ($(BASE_TARGET), plus)
BASE_CONFIGURE_ARGS+= \
--build=nginx-plus-r$(PLUS_VERSION) \
--mgmt-id-path=/var/lib/nginx/nginx.id \
--build=nginx-plus-r$(PLUS_VERSION)$(RELSTRING)$(BUILD_SUFFIX) \
--state-path=/var/lib/nginx/state \
--with-control-api \
--with-http_auth_jwt_module \
--with-http_f4f_module \
--with-http_hls_module \
--with-http_oidc_module \
--with-http_proxy_protocol_vendor_module \
--with-http_session_log_module \
--with-mgmt \
--with-stream_mqtt_filter_module \
--with-stream_mqtt_preread_module \
--with-stream_proxy_protocol_vendor_module
--with-stream_proxy_protocol_vendor_module \
--system-ca-bundle=/etc/ssl/certs/ca-certificates.crt
endif

include $(CONTRIB)/attestation.mak
Expand Down Expand Up @@ -187,6 +200,7 @@ rules-base: $(BASE_SRC) nginx.deb-changelog
-e "s#%%PACKAGE_VENDOR%%#$(PACKAGE_VENDOR)#g" \
-e 's#%%BASE_VERSION%%#$(BASE_VERSION)#g' \
-e 's#%%PLUS_VERSION%%#$(PLUS_VERSION)#g' \
-e 's#%%NGINX_PLUS_MAJOR_MINOR%%#$(NGINX_PLUS_MAJOR_MINOR)#g' \
> debuild-base/$(SRCDIR)/debian/control ; \
if [ "$(BASE_TARGET)" = "plus" ]; then \
cp $(DOCS)/EULA-TRIAL \
Expand Down Expand Up @@ -300,6 +314,7 @@ rules-module-%: $(BASE_SRC) nginx-module-%.deb-changelog .deps-module-%
-e "s#%%BASE_VERSION%%#$(BASE_VERSION)#g" \
-e "s#%%BASE_RELEASE%%#$(BASE_RELEASE)#g" \
-e "s#%%PLUS_VERSION%%#$(PLUS_VERSION)#g" \
-e 's#%%NGINX_PLUS_MAJOR_MINOR%%#$(NGINX_PLUS_MAJOR_MINOR)#g' \
-e "s#%%VERSION_PREFIX%%#$(MODULE_VERSION_PREFIX_$(call modname, $*))#g" \
-e "s#%%MODULE_VERSION%%#$(MODULE_VERSION_$(call modname, $*))#g" \
-e "s#%%MODULE_RELEASE%%#$(MODULE_RELEASE_$(call modname, $*))#g" \
Expand All @@ -312,6 +327,7 @@ rules-module-%: $(BASE_SRC) nginx-module-%.deb-changelog .deps-module-%
-e "s#%%BASE_VERSION%%#$(BASE_VERSION)#g" \
-e "s#%%BASE_RELEASE%%#$(BASE_RELEASE)#g" \
-e "s#%%PLUS_VERSION%%#$(PLUS_VERSION)#g" \
-e 's#%%NGINX_PLUS_MAJOR_MINOR%%#$(NGINX_PLUS_MAJOR_MINOR)#g' \
-e "s#%%MODULE%%#$${module_asis}#g" \
-e "s#%%CODENAME%%#$(CODENAME)#g" \
-e "s#%%VERSION_PREFIX%%#$(MODULE_VERSION_PREFIX_$(call modname, $*))#g" \
Expand Down
2 changes: 1 addition & 1 deletion debian/Makefile.module-ndk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MODULE_CC_OPT_ndk=-DNDK_SET_VAR -DNDK_UPSTREAM_LIST
MODULE_CC_OPT_DEBUG_ndk=$(MODULE_CC_OPT_ndk)

ifeq ($(MODULE_TARGET), plus)
NDK_DEPENDENCY_TAG= nginx-plus-module-ndk-r$(PLUS_VERSION)
NDK_DEPENDENCY_TAG= nginx-plus-module-ndk-r$(NGINX_PLUS_MAJOR_MINOR)
else
NDK_DEPENDENCY_TAG= nginx-module-ndk-r$(BASE_VERSION)
endif
Expand Down
6 changes: 3 additions & 3 deletions debian/debian-plus/nginx-plus-module.control.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ Package: nginx-plus-module-%%MODULE%%
Architecture: any
Depends: ${misc:Depends},
${shlibs:Depends},
nginx-plus-r%%PLUS_VERSION%%%%MODULE_DEPENDS%%%%ADD_CONTROL_TAGS%%
Provides: nginx-plus-module-%%MODULE%%-r%%PLUS_VERSION%%
nginx-plus-r%%NGINX_PLUS_MAJOR_MINOR%%%%MODULE_DEPENDS%%%%ADD_CONTROL_TAGS%%
Provides: nginx-plus-module-%%MODULE%%-r%%NGINX_PLUS_MAJOR_MINOR%%
Description: %%SUMMARY%%
%%SHORT_SUMMARY%% for NGINX Plus

Package: nginx-plus-module-%%MODULE%%-dbg
Architecture: any
Section: debug
Priority: optional
Depends: nginx-plus-r%%PLUS_VERSION%%,
Depends: nginx-plus-r%%NGINX_PLUS_MAJOR_MINOR%%,
nginx-plus-module-%%MODULE%% (= %%VERSION_PREFIX%%%%MODULE_VERSION%%-%%MODULE_RELEASE%%~%%CODENAME%%),
${misc:Depends}
Description: debug symbols for the nginx-plus-module-%%MODULE%%
Expand Down
29 changes: 25 additions & 4 deletions rpm/SPECS/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,18 @@ BUILD_ENV_PATH= ${HOME}/rpmbuild
MODSRC_PREFIX=
BUILD_DIR= %{bdir}

NGINX_PLUS_MAJOR_MINOR = $(word 1,$(subst ., ,$(NGINX_PLUS_VERSION))).$(word 2,$(subst ., ,$(NGINX_PLUS_VERSION)))

RELSTRING=
ifeq ($(shell test $(PLUS_RELEASE) -gt 1; echo $$?),0)
RELSTRING=-p$(shell expr $(PLUS_RELEASE) - 1 )
endif

BUILD_SUFFIX ?=

ifeq ($(MODULE_TARGET), plus)
MODULE_SUMMARY_PREFIX= NGINX Plus
TARGET_VERSION=$(PLUS_VERSION)
TARGET_VERSION=$(NGINX_PLUS_MAJOR_MINOR)
MODULE_SUFFIX=-plus
MODULE_PACKAGE_URL= https://www.nginx.com/
MODULE_PACKAGE_LICENSE= Proprietary (EULA included)
Expand Down Expand Up @@ -100,17 +109,25 @@ fi; \

ifeq ($(BASE_TARGET), plus)
BASE_CONFIGURE_ARGS+= \
--build=nginx-plus-r$(PLUS_VERSION) \
--mgmt-id-path=/var/lib/nginx/nginx.id \
--build=nginx-plus-r$(PLUS_VERSION)$(RELSTRING)$(BUILD_SUFFIX) \
--state-path=/var/lib/nginx/state \
--with-control-api \
--with-http_auth_jwt_module \
--with-http_f4f_module \
--with-http_hls_module \
--with-http_oidc_module \
--with-http_proxy_protocol_vendor_module \
--with-http_session_log_module \
--with-mgmt \
--with-stream_mqtt_filter_module \
--with-stream_mqtt_preread_module \
--with-stream_proxy_protocol_vendor_module
--with-stream_proxy_protocol_vendor_module \
$$( if [ 0%{?suse_version} -gt 0 ]; then \
echo "--system-ca-bundle=/etc/ssl/ca-bundle.pem"; \
else \
echo "--system-ca-bundle=/etc/ssl/certs/ca-bundle.crt"; \
fi;\
)
endif

include $(CONTRIB)/attestation.mak
Expand Down Expand Up @@ -180,6 +197,7 @@ endif
-e 's#%%BASE_RELEASE%%#$(BASE_RELEASE)#g' \
-e 's#%%PLUS_VERSION%%#$(PLUS_VERSION)#g' \
-e 's#%%PLUS_RELEASE%%#$(PLUS_RELEASE)#g' \
-e 's#%%NGINX_PLUS_MAJOR_MINOR%%#$(NGINX_PLUS_MAJOR_MINOR)#g' \
-e "s#%%BASE_PATCHES%%#$$patches#g" \
-e 's#%%BASE_CONFIGURE_ARGS%%#$(BASE_CONFIGURE_ARGS)#g' \
> nginx$(BASE_SUFFIX).spec ; \
Expand All @@ -188,6 +206,7 @@ endif
-e 's#%%BASE_RELEASE%%#$(BASE_RELEASE)#g' \
-e 's#%%PLUS_VERSION%%#$(PLUS_VERSION)#g' \
-e 's#%%PLUS_RELEASE%%#$(PLUS_RELEASE)#g' \
-e 's#%%NGINX_PLUS_MAJOR_MINOR%%#$(NGINX_PLUS_MAJOR_MINOR)#g' \
>> nginx$(BASE_SUFFIX).spec ; \
}

Expand Down Expand Up @@ -279,6 +298,7 @@ nginx-module-%.spec: nginx-module-%.rpm-changelog
-e "s#%%BASE_VERSION%%#$(BASE_VERSION)#g" \
-e "s#%%BASE_RELEASE%%#$(BASE_RELEASE)#g" \
-e "s#%%PLUS_VERSION%%#$(PLUS_VERSION)#g" \
-e 's#%%NGINX_PLUS_MAJOR_MINOR%%#$(NGINX_PLUS_MAJOR_MINOR)#g' \
-e "s#%%VERSION_PREFIX%%#$(MODULE_VERSION_PREFIX_$(call modname, $*))#g" \
-e "s#%%VERSION%%#$(MODULE_VERSION_$(call modname, $*))#g" \
-e "s#%%RELEASE%%#$(MODULE_RELEASE_$(call modname, $*))#g" \
Expand Down Expand Up @@ -306,6 +326,7 @@ nginx-module-%.spec: nginx-module-%.rpm-changelog
-e 's#%%BASE_VERSION%%#$(BASE_VERSION)#g' \
-e 's#%%BASE_RELEASE%%#$(BASE_RELEASE)#g' \
-e "s#%%PLUS_VERSION%%#$(PLUS_VERSION)#g" \
-e 's#%%NGINX_PLUS_MAJOR_MINOR%%#$(NGINX_PLUS_MAJOR_MINOR)#g' \
-e "s#%%MODULE_VERSION%%#$(MODULE_VERSION_$(call modname, $*))#g" \
-e "s#%%MODULE_RELEASE%%#$(MODULE_RELEASE_$(call modname, $*))#g" \
>> $@.tmp && \
Expand Down
4 changes: 2 additions & 2 deletions rpm/SPECS/Makefile.module-ndk
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ MODULE_CC_OPT_ndk=-DNDK_SET_VAR -DNDK_UPSTREAM_LIST
MODULE_CC_OPT_DEBUG_ndk=$(MODULE_CC_OPT_ndk)

ifeq ($(MODULE_TARGET), plus)
NDK_DEPENDENCY_TAG= nginx-plus-module-ndk-r$(PLUS_VERSION)
NDK_DEPENDENCY_TAG= nginx-plus-module-ndk-r$(NGINX_PLUS_MAJOR_MINOR)
else
NDK_DEPENDENCY_TAG= nginx-module-ndk-r$(BASE_VERSION)
NDK_DEPENDENCY_TAG= nginx-module-ndk-r$(NGINX_PLUS_MAJOR_MINOR)
endif

define MODULE_POST_ndk
Expand Down
5 changes: 3 additions & 2 deletions rpm/SPECS/nginx-plus-module.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Epoch: %{epoch}
%endif
%define base_release %%BASE_RELEASE%%%{?dist}.ngx
%define plus_version %%PLUS_VERSION%%
%define nginx_plus_major_minor %%NGINX_PLUS_MAJOR_MINOR%%

%define bdir %{_builddir}/%{name}-%{base_version}

Expand All @@ -82,8 +83,8 @@ License: %%MODULE_PACKAGE_LICENSE%%
BuildRoot: %{_tmppath}/%{name}-%{base_version}-%{base_release}-root
BuildRequires: zlib-devel
BuildRequires: pcre2-devel
Requires: nginx-plus-r%{plus_version}
Provides: %{name}-r%{plus_version}
Requires: nginx-plus-r%{nginx_plus_major_minor}
Provides: %{name}-r%{nginx_plus_major_minor}

%description
NGINX Plus: %%SHORT_SUMMARY%%.
Expand Down
Loading