diff --git a/srcpkgs/nginx/files/ngx_auto_config.h.aarch64 b/srcpkgs/nginx/files/ngx_auto_config.h.aarch64 index b573d0c9adc253..40edbb8e00be8c 100644 --- a/srcpkgs/nginx/files/ngx_auto_config.h.aarch64 +++ b/srcpkgs/nginx/files/ngx_auto_config.h.aarch64 @@ -1,4 +1,4 @@ -#define NGX_CONFIGURE " --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/bin/nginx --modules-path=/usr/lib/nginx/modules --pid-path=/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=nginx --group=nginx --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/tmp/client-body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --with-compat --with-file-aio --with-http_auth_request_module --with-http_dav_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module --with-http_slice_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_v3_module --with-http_xslt_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-openssl-opt=enable-ktls --with-stream=dynamic --with-stream_geoip_module=dynamic --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-mail --with-mail_ssl_module --with-pcre-jit --with-threads --add-dynamic-module=../njs-0.8.4/nginx" +#define NGX_CONFIGURE " --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/bin/nginx --modules-path=/usr/lib/nginx/modules --pid-path=/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=nginx --group=nginx --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/tmp/client-body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --with-compat --with-file-aio --with-http_auth_request_module --with-http_dav_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module --with-http_slice_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_v3_module --with-http_xslt_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-openssl-opt=enable-ktls --with-stream=dynamic --with-stream_geoip_module=dynamic --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-mail --with-mail_ssl_module --with-pcre-jit --with-threads --add-dynamic-module=njs/nginx" #ifndef NGX_HAVE_GCC_ATOMIC #define NGX_HAVE_GCC_ATOMIC 1 @@ -110,7 +110,9 @@ #endif -#define NGX_KQUEUE_UDATA_T (void *) +#ifndef NGX_HAVE_CRYPT +#define NGX_HAVE_CRYPT 1 +#endif #ifndef NGX_HAVE_POSIX_FADVISE @@ -473,6 +475,16 @@ #endif +#ifndef NGX_HTTP_UPSTREAM_STICKY +#define NGX_HTTP_UPSTREAM_STICKY 1 +#endif + + +#ifndef NGX_HTTP_UPSTREAM_SID +#define NGX_HTTP_UPSTREAM_SID 1 +#endif + + #ifndef NGX_STAT_STUB #define NGX_STAT_STUB 1 #endif @@ -573,11 +585,6 @@ #endif -#ifndef NGX_QUIC_OPENSSL_COMPAT -#define NGX_QUIC_OPENSSL_COMPAT 1 -#endif - - #ifndef NGX_QUIC #define NGX_QUIC 1 #endif diff --git a/srcpkgs/nginx/files/ngx_auto_config.h.armv6l b/srcpkgs/nginx/files/ngx_auto_config.h.armv6l index 3a8aa6e3e47888..4007f0f772ed1e 100644 --- a/srcpkgs/nginx/files/ngx_auto_config.h.armv6l +++ b/srcpkgs/nginx/files/ngx_auto_config.h.armv6l @@ -1,4 +1,4 @@ -#define NGX_CONFIGURE " --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/bin/nginx --modules-path=/usr/lib/nginx/modules --pid-path=/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=nginx --group=nginx --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/tmp/client-body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --with-compat --with-file-aio --with-http_auth_request_module --with-http_dav_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module --with-http_slice_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_v3_module --with-http_xslt_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-openssl-opt=enable-ktls --with-stream=dynamic --with-stream_geoip_module=dynamic --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-mail --with-mail_ssl_module --with-pcre-jit --with-threads --add-dynamic-module=../njs-0.8.4/nginx" +#define NGX_CONFIGURE " --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/bin/nginx --modules-path=/usr/lib/nginx/modules --pid-path=/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=nginx --group=nginx --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/tmp/client-body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --with-compat --with-file-aio --with-http_auth_request_module --with-http_dav_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module --with-http_slice_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_v3_module --with-http_xslt_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-openssl-opt=enable-ktls --with-stream=dynamic --with-stream_geoip_module=dynamic --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-mail --with-mail_ssl_module --with-pcre-jit --with-threads --add-dynamic-module=njs/nginx" #ifndef NGX_HAVE_GCC_ATOMIC #define NGX_HAVE_GCC_ATOMIC 1 @@ -85,11 +85,6 @@ #endif -#ifndef NGX_ALIGNMENT -#define NGX_ALIGNMENT 16 -#endif - - #ifndef NGX_HAVE_BPF #define NGX_HAVE_BPF 1 #endif @@ -105,12 +100,19 @@ #endif +#ifndef NGX_ALIGNMENT +#define NGX_ALIGNMENT 16 +#endif + + #ifndef NGX_CPU_CACHE_LINE #define NGX_CPU_CACHE_LINE 32 #endif -#define NGX_KQUEUE_UDATA_T (void *) +#ifndef NGX_HAVE_CRYPT +#define NGX_HAVE_CRYPT 1 +#endif #ifndef NGX_HAVE_POSIX_FADVISE @@ -473,6 +475,16 @@ #endif +#ifndef NGX_HTTP_UPSTREAM_STICKY +#define NGX_HTTP_UPSTREAM_STICKY 1 +#endif + + +#ifndef NGX_HTTP_UPSTREAM_SID +#define NGX_HTTP_UPSTREAM_SID 1 +#endif + + #ifndef NGX_STAT_STUB #define NGX_STAT_STUB 1 #endif @@ -573,11 +585,6 @@ #endif -#ifndef NGX_QUIC_OPENSSL_COMPAT -#define NGX_QUIC_OPENSSL_COMPAT 1 -#endif - - #ifndef NGX_QUIC #define NGX_QUIC 1 #endif diff --git a/srcpkgs/nginx/files/ngx_auto_config.h.riscv64 b/srcpkgs/nginx/files/ngx_auto_config.h.riscv64 index ff007aa4e90d1a..f0cef85321ffee 100644 --- a/srcpkgs/nginx/files/ngx_auto_config.h.riscv64 +++ b/srcpkgs/nginx/files/ngx_auto_config.h.riscv64 @@ -1,4 +1,4 @@ -#define NGX_CONFIGURE " --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/bin/nginx --modules-path=/usr/lib/nginx/modules --pid-path=/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=nginx --group=nginx --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/tmp/client-body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --with-compat --with-file-aio --with-http_auth_request_module --with-http_dav_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module --with-http_slice_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_v3_module --with-http_xslt_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-openssl-opt=enable-ktls --with-stream=dynamic --with-stream_geoip_module=dynamic --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-mail --with-mail_ssl_module --with-pcre-jit --with-threads --add-dynamic-module=../njs-0.8.4/nginx" +#define NGX_CONFIGURE " --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/bin/nginx --modules-path=/usr/lib/nginx/modules --pid-path=/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=nginx --group=nginx --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/tmp/client-body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --with-compat --with-file-aio --with-http_auth_request_module --with-http_dav_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module --with-http_slice_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_v3_module --with-http_xslt_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-openssl-opt=enable-ktls --with-stream=dynamic --with-stream_geoip_module=dynamic --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-mail --with-mail_ssl_module --with-pcre-jit --with-threads --add-dynamic-module=njs/nginx" #ifndef NGX_HAVE_GCC_ATOMIC #define NGX_HAVE_GCC_ATOMIC 1 @@ -85,11 +85,6 @@ #endif -#ifndef NGX_ALIGNMENT -#define NGX_ALIGNMENT 16 -#endif - - #ifndef NGX_HAVE_BPF #define NGX_HAVE_BPF 1 #endif @@ -105,12 +100,19 @@ #endif +#ifndef NGX_ALIGNMENT +#define NGX_ALIGNMENT 16 +#endif + + #ifndef NGX_CPU_CACHE_LINE #define NGX_CPU_CACHE_LINE 32 #endif -#define NGX_KQUEUE_UDATA_T (void *) +#ifndef NGX_HAVE_CRYPT +#define NGX_HAVE_CRYPT 1 +#endif #ifndef NGX_HAVE_POSIX_FADVISE @@ -473,6 +475,16 @@ #endif +#ifndef NGX_HTTP_UPSTREAM_STICKY +#define NGX_HTTP_UPSTREAM_STICKY 1 +#endif + + +#ifndef NGX_HTTP_UPSTREAM_SID +#define NGX_HTTP_UPSTREAM_SID 1 +#endif + + #ifndef NGX_STAT_STUB #define NGX_STAT_STUB 1 #endif @@ -573,11 +585,6 @@ #endif -#ifndef NGX_QUIC_OPENSSL_COMPAT -#define NGX_QUIC_OPENSSL_COMPAT 1 -#endif - - #ifndef NGX_QUIC #define NGX_QUIC 1 #endif diff --git a/srcpkgs/nginx/patches/config.patch b/srcpkgs/nginx/patches/config.patch new file mode 100644 index 00000000000000..72b3b717c68049 --- /dev/null +++ b/srcpkgs/nginx/patches/config.patch @@ -0,0 +1,54 @@ +--- a/conf/nginx.conf ++++ b/conf/nginx.conf +@@ -1,5 +1,5 @@ + +-#user nobody; ++#user nginx; + worker_processes 1; + + #error_log logs/error.log; +@@ -39,7 +39,7 @@ + #access_log logs/host.access.log main; + + location / { +- root html; ++ root /usr/share/nginx/html; + index index.html index.htm; + } + +@@ -49,7 +49,7 @@ + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { +- root html; ++ root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 +@@ -61,7 +61,7 @@ + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { +- # root html; ++ # root /usr/share/nginx/html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; +@@ -85,7 +85,7 @@ + # server_name somename alias another.alias; + + # location / { +- # root html; ++ # root /usr/share/nginx/html; + # index index.html index.htm; + # } + #} +@@ -107,7 +107,7 @@ + # ssl_prefer_server_ciphers on; + + # location / { +- # root html; ++ # root /usr/share/nginx/html; + # index index.html index.htm; + # } + #} diff --git a/srcpkgs/nginx/template b/srcpkgs/nginx/template index 30f79c74f999e6..deb951c28404b6 100644 --- a/srcpkgs/nginx/template +++ b/srcpkgs/nginx/template @@ -3,12 +3,10 @@ # Consider using mime.types from mime-types package # See comments in mime-types template pkgname=nginx -version=1.28.3 +version=1.30.0 revision=1 -_tests_commit=cf90a22921652731302e8a4dc2a88049c723377d +_tests_commit=0f72f59c40de9977bd8f3deff5d200e761b8b683 _njs_version=0.9.6 -create_wrksrc=yes -build_wrksrc="nginx-${version}" build_style=gnu-makefile _cfgdir=/etc/nginx _tmpdir=/var/lib/nginx/tmp @@ -53,9 +51,8 @@ configure_args="--prefix=${_cfgdir} --with-mail_ssl_module --with-pcre-jit --with-threads - --add-dynamic-module=../njs-${_njs_version}/nginx" -hostmakedepends="geoip geoip-devel openssl-devel pcre2-devel perl libxslt-devel - which" + --add-dynamic-module=njs/nginx" +hostmakedepends="perl geoip-devel openssl-devel pcre2-devel libxslt-devel" makedepends="${hostmakedepends}" checkdepends="perl perl-IO-Socket-SSL perl-GD perl-FCGI perl-CryptX which uwsgi uwsgi-python3" short_desc="High performance web and reverse proxy server" @@ -64,12 +61,14 @@ license="BSD-2-Clause" homepage="https://nginx.org" changelog="https://nginx.org/en/CHANGES-${version%.*}" distfiles="https://nginx.org/download/nginx-${version}.tar.gz - https://github.com/nginx/nginx-tests/archive/${_tests_commit}.tar.gz - https://github.com/nginx/njs/archive/refs/tags/${_njs_version}.tar.gz" -checksum="2c96a946bfb0882a21744ed429770a2123ae1828c7c48665092993ddee91a918 - 862b88bb86675546df9fb391f0ffb9a55fc4212c22097017e44c9d1b33f4d358 + https://github.com/nginx/nginx-tests/archive/${_tests_commit}.tar.gz>nginx-tests-${_tests_commit}.tar.gz + https://github.com/nginx/njs/archive/refs/tags/${_njs_version}.tar.gz>njs-${_njs_version}.tar.gz" +checksum="058188c64bf22baecaa72b809a6318a4f9ba623889c554feab03f7cb853ab31b + fb990b56c03a0923bf46e002dcc2701a0d79fb62564cb595f24955c8b00cbdbd 713e931d1ffcd337f6304dc55e512dcf2099ba4cc3a996c9ea14f22d5d9cdd79" +skip_extraction="nginx-tests-${_tests_commit}.tar.gz njs-${_njs_version}.tar.gz" + # Tests fail when nginx run as root and there is no nginx user make_check=ci-skip @@ -97,6 +96,11 @@ make_dirs="/var/log/nginx 0750 root root /var/lib/nginx 1777 root root /var/lib/nginx/tmp 0750 nginx root" +post_extract() { + vsrcextract -C tests "nginx-tests-${_tests_commit}.tar.gz" + vsrcextract -C njs "njs-${_njs_version}.tar.gz" +} + do_configure() { if [ "$CROSS_BUILD" ]; then # fake configure run on host @@ -119,24 +123,24 @@ do_configure() { fi ./configure ${configure_args} - ( cd ../njs-${_njs_version} && ./configure ) + ( cd njs && ./configure ) } pre_build() { if [ "$CROSS_BUILD" ]; then - mkdir -p ../njs-${_njs_version}/build + mkdir -p njs/build case "$XBPS_TARGET_MACHINE" in arm*) cp "${FILESDIR}/ngx_auto_config.h.armv6l" objs/ngx_auto_config.h - cp "${FILESDIR}/njs_auto_config.h.armv6l" ../njs-${_njs_version}/build/njs_auto_config.h + cp "${FILESDIR}/njs_auto_config.h.armv6l" njs/build/njs_auto_config.h ;; aarch64*) cp "${FILESDIR}/ngx_auto_config.h.aarch64" objs/ngx_auto_config.h - cp "${FILESDIR}/njs_auto_config.h.aarch64" ../njs-${_njs_version}/build/njs_auto_config.h + cp "${FILESDIR}/njs_auto_config.h.aarch64" njs/build/njs_auto_config.h ;; riscv64*) cp "${FILESDIR}/ngx_auto_config.h.riscv64" objs/ngx_auto_config.h - cp "${FILESDIR}/njs_auto_config.h.riscv64" ../njs-${_njs_version}/build/njs_auto_config.h + cp "${FILESDIR}/njs_auto_config.h.riscv64" njs/build/njs_auto_config.h ;; esac @@ -148,22 +152,17 @@ pre_build() { export LD="$CC" ( - cd ../njs-${_njs_version} + cd njs make ${makejobs} NJS_CC="$CC" NJS_CFLAGS="$CFLAGS -fPIC" \ NJS_STATIC_LINK="$AR -r -c" NJS_LINK="$CC -O" ) } do_check() { - TEST_NGINX_BINARY="$PWD/objs/nginx" \ - prove -j ${XBPS_MAKEJOBS} "../${pkgname}-tests-${_tests_commit}" + TEST_NGINX_BINARY="$PWD/objs/nginx" prove -j ${XBPS_MAKEJOBS} tests } post_install() { - sed -e 's|\