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
21 changes: 14 additions & 7 deletions srcpkgs/nginx/files/ngx_auto_config.h.aarch64
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
31 changes: 19 additions & 12 deletions srcpkgs/nginx/files/ngx_auto_config.h.armv6l
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -85,11 +85,6 @@
#endif


#ifndef NGX_ALIGNMENT
#define NGX_ALIGNMENT 16
#endif


#ifndef NGX_HAVE_BPF
#define NGX_HAVE_BPF 1
#endif
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
31 changes: 19 additions & 12 deletions srcpkgs/nginx/files/ngx_auto_config.h.riscv64
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -85,11 +85,6 @@
#endif


#ifndef NGX_ALIGNMENT
#define NGX_ALIGNMENT 16
#endif


#ifndef NGX_HAVE_BPF
#define NGX_HAVE_BPF 1
#endif
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
54 changes: 54 additions & 0 deletions srcpkgs/nginx/patches/config.patch
Original file line number Diff line number Diff line change
@@ -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;
# }
#}
45 changes: 22 additions & 23 deletions srcpkgs/nginx/template
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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|\<user\s\+\w\+;|user html;|g' \
-e '44s|html|/usr/share/nginx/html|' \
-e '54s|html|/usr/share/nginx/html|' \
-i "$DESTDIR/etc/nginx/nginx.conf"
rm -- "$DESTDIR"/etc/nginx/*.default

vmkdir usr/share/nginx
Expand Down