Compare commits

...

10 Commits

Author SHA1 Message Date
Fijxu 1ff55af5e6 Adapt it to ubuntu makedeb 2023-04-01 23:21:01 -03:00
DasSkelett fae0a3cd97
Update to nginx 1.23.3 2022-12-17 21:28:32 +01:00
DasSkelett 0535a853da
Update to nginx 1.23.2 2022-10-20 18:44:28 +02:00
DasSkelett 2b8d4651b8
Update to nginx 1.23.1 2022-07-27 01:04:17 +02:00
DasSkelett 03f27e3bd4
Update to nginx 1.23.0 2022-06-23 13:03:31 +02:00
DasSkelett 0d40d5383c
Revert "Update to nginx 1.22.0"
This reverts commit 619a86a80c.

We are tracking mainline, not stable. Let's hope there will be a new mainline release soon as well.
2022-05-29 13:58:16 +02:00
DasSkelett 619a86a80c
Update to nginx 1.22.0 2022-05-29 11:58:58 +02:00
DasSkelett 809d821dfa
Add -Wno-array-bounds CFLAG to unbreak build with GCC 12.1 2022-05-21 15:30:11 +02:00
DasSkelett b37728f1be
Exclude .hg directory from src package 2022-02-01 15:13:09 +01:00
DasSkelett 3757959950
Update to nginx 1.21.6 2022-01-26 01:38:56 +01:00
3 changed files with 70 additions and 40 deletions

View File

@ -1,7 +1,7 @@
pkgbase = nginx-quic pkgbase = nginx-quic
pkgdesc = Lightweight HTTP server and IMAP/POP3 proxy server, HTTP/3 QUIC branch pkgdesc = Lightweight HTTP server and IMAP/POP3 proxy server, HTTP/3 QUIC branch
pkgver = 1.21.5 pkgver = 1.23.3
pkgrel = 2 pkgrel = 1
url = https://nginx.org url = https://nginx.org
install = nginx.install install = nginx.install
arch = i686 arch = i686
@ -28,8 +28,8 @@ pkgbase = nginx-quic
backup = etc/nginx/uwsgi_params backup = etc/nginx/uwsgi_params
backup = etc/nginx/win-utf backup = etc/nginx/win-utf
backup = etc/logrotate.d/nginx backup = etc/logrotate.d/nginx
source = hg+https://hg.nginx.org/nginx-quic#revision=c31d95fdaf65 source = hg+https://hg.nginx.org/nginx-quic#revision=91ad1abfb285
source = git+https://boringssl.googlesource.com/boringssl#commit=9bcc12d540c3b844ba317f042c731d64142af725 source = git+https://boringssl.googlesource.com/boringssl#commit=1740ff90a7da10408e6175b516946b392ec8f11f
source = service source = service
source = logrotate source = logrotate
sha256sums = SKIP sha256sums = SKIP
@ -40,7 +40,7 @@ pkgbase = nginx-quic
pkgname = nginx-quic pkgname = nginx-quic
pkgname = nginx-quic-src pkgname = nginx-quic-src
pkgdesc = Source code of nginx-quic 1.21.5, useful for building modules pkgdesc = Source code of nginx-quic 1.23.3, useful for building modules
arch = any arch = any
depends = depends =
provides = nginx-src provides = nginx-src

View File

@ -6,29 +6,30 @@
_pkgbase=nginx _pkgbase=nginx
pkgbase=nginx-quic pkgbase=nginx-quic
_pkgrev=5f1d05a21287
pkgname=(nginx-quic nginx-quic-src) pkgname=(nginx-quic nginx-quic-src)
pkgver=1.21.5 pkgver=1.23.4
pkgrel=2 pkgrel=1
pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server, HTTP/3 QUIC branch' pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server, HTTP/3 QUIC branch'
arch=('i686' 'x86_64') arch=('amd64')
url='https://nginx.org' url='https://nginx.org'
license=('custom') license=('custom')
depends=('geoip' 'libxcrypt' 'mailcap' 'pcre2' 'zlib') depends=('libgeoip-dev' 'libxcrypt-source' 'mailcap' 'libpcre2-dev' 'zlib1g-dev')
makedepends=('cmake' 'git' 'go' 'mercurial') makedepends=('cmake' 'git' 'golang')
backup=('etc/nginx/fastcgi.conf' backup=('/etc/nginx/fastcgi.conf'
'etc/nginx/fastcgi_params' '/etc/nginx/fastcgi_params'
'etc/nginx/koi-win' '/etc/nginx/koi-win'
'etc/nginx/koi-utf' '/etc/nginx/koi-utf'
'etc/nginx/nginx.conf' '/etc/nginx/nginx.conf'
'etc/nginx/scgi_params' '/etc/nginx/scgi_params'
'etc/nginx/uwsgi_params' '/etc/nginx/uwsgi_params'
'etc/nginx/win-utf' '/etc/nginx/win-utf'
'etc/logrotate.d/nginx') '/etc/logrotate.d/nginx')
install=nginx.install install=nginx.install
provides=('nginx' 'nginx-mainline') provides=('nginx' 'nginx-mainline')
conflicts=('nginx') conflicts=('nginx')
source=("hg+https://hg.nginx.org/nginx-quic#revision=c31d95fdaf65" source=("git+https://git.zzls.xyz/Fijxu/nginx-quic#branch=quic"
"git+https://boringssl.googlesource.com/boringssl#commit=9bcc12d540c3b844ba317f042c731d64142af725" "git+https://boringssl.googlesource.com/boringssl"
"service" "service"
"logrotate") "logrotate")
sha256sums=('SKIP' sha256sums=('SKIP'
@ -83,12 +84,23 @@ prepare() {
build() { build() {
# Clear -D_FORTIFY_SOURCE from C++ build flags, it causes Boringssl tests to fail to compile # Clear -D_FORTIFY_SOURCE from C++ build flags, it causes Boringssl tests to fail to compile
export CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=[1-9]/-D_FORTIFY_SOURCE=0} #export CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=[1-9]/-D_FORTIFY_SOURCE=0}
export CXXFLAGS=${CXXFLAGS/-D_FORTIFY_SOURCE=[1-9]/-D_FORTIFY_SOURCE=0} #export CXXFLAGS=${CXXFLAGS/-D_FORTIFY_SOURCE=[1-9]/-D_FORTIFY_SOURCE=0}
export CXXFLAGS="$CXXFLAGS -fPIC" export CXXFLAGS="$CXXFLAGS -fPIC"
# Disable some warnings that make Boringssl fail to compile due to a forced -Werror in CMakeLists.txt export CFLAGS="$CFLAGS -fPIC"
export CFLAGS="$CFLAGS -fPIC -Wno-stringop-overflow -Wno-array-parameter"
if [[ $CC == "clang" ]];then
_cc_opt="-flto"
_ld_opt="-flto -fuse-ld=lld"
else
_cc_opt=""
_ld_opt=""
# Disable some warnings that make Boringssl fail to compile due to a forced -Werror in CMakeLists.txt
# -Wno-array-bounds: 2022-05-21 for compatiblity with GCC 12.1 (https://bugs.chromium.org/p/boringssl/issues/detail?id=492&sort=-modified)
export CFLAGS="$CFLAGS -Wno-stringop-overflow -Wno-array-parameter -Wno-array-bounds"
fi
cd ${srcdir}/boringssl cd ${srcdir}/boringssl
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ../ && make crypto ssl mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ../ && make crypto ssl
@ -98,23 +110,24 @@ build() {
cd ${srcdir}/$pkgname cd ${srcdir}/$pkgname
./auto/configure \ ./auto/configure \
--prefix=/etc/nginx \ --prefix=/usr/share/nginx \
--conf-path=/etc/nginx/nginx.conf \ --conf-path=/etc/nginx/nginx.conf \
--sbin-path=/usr/bin/nginx \ --sbin-path=/usr/sbin/nginx \
--pid-path=/run/nginx.pid \ --pid-path=/run/nginx.pid \
--lock-path=/run/lock/nginx.lock \ --lock-path=/var/lock/nginx.lock \
--user=http \ --modules-path=/usr/lib/nginx/modules \
--group=http \ --user=www-data \
--group=www-data \
--http-log-path=/var/log/nginx/access.log \ --http-log-path=/var/log/nginx/access.log \
--error-log-path=stderr \ --error-log-path=/var/log/nginx/error.log \
--http-client-body-temp-path=/var/lib/nginx/client-body \ --http-client-body-temp-path=/var/lib/nginx/body \
--http-proxy-temp-path=/var/lib/nginx/proxy \ --http-proxy-temp-path=/var/lib/nginx/proxy \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \ --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
--http-scgi-temp-path=/var/lib/nginx/scgi \ --http-scgi-temp-path=/var/lib/nginx/scgi \
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \ --http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
--with-openssl=${srcdir}/boringssl \ --with-openssl=${srcdir}/boringssl \
--with-cc-opt="-I../boringssl/include" \ --with-cc-opt="${_cc_opt} -I../boringssl/include" \
--with-ld-opt="-L../boringssl/build/ssl -L../boringssl/build/crypto" \ --with-ld-opt="${_ld_opt} -L../boringssl/build/ssl -L../boringssl/build/crypto" \
${_common_flags[@]} \ ${_common_flags[@]} \
${_mainline_flags[@]} \ ${_mainline_flags[@]} \
${_quic_flags[@]} ${_quic_flags[@]}
@ -142,7 +155,7 @@ package_nginx-quic() {
chown root:root "$pkgdir"/var/log/nginx chown root:root "$pkgdir"/var/log/nginx
install -d "$pkgdir"/usr/share/nginx install -d "$pkgdir"/usr/share/nginx
mv "$pkgdir"/etc/nginx/html/ "$pkgdir"/usr/share/nginx #mv "$pkgdir"/etc/nginx/html/ "$pkgdir"/usr/share/nginx
install -Dm644 ../logrotate "$pkgdir"/etc/logrotate.d/nginx install -Dm644 ../logrotate "$pkgdir"/etc/logrotate.d/nginx
install -Dm644 ../service "$pkgdir"/usr/lib/systemd/system/nginx.service install -Dm644 ../service "$pkgdir"/usr/lib/systemd/system/nginx.service
@ -171,6 +184,8 @@ package_nginx-quic-src() {
install -d "$pkgdir/usr/src" install -d "$pkgdir/usr/src"
test -d "$pkgdir/usr/src/nginx" && rm -r "$pkgdir/usr/src/nginx" test -d "$pkgdir/usr/src/nginx" && rm -r "$pkgdir/usr/src/nginx"
cp -r ${srcdir}/${pkgname} "$pkgdir/usr/src/nginx" cp -r ${srcdir}/${pkgname} "$pkgdir/usr/src/nginx"
# Delete the .hg directory, it is huge and not needed
#rm -r ${pkgdir}/usr/src/nginx/{.hg,.hgtags}
# Link the 'configure' script to its location in release tarballs, # Link the 'configure' script to its location in release tarballs,
# as this is where modules expect it # as this is where modules expect it
ln -s /usr/src/nginx/auto/configure "$pkgdir/usr/src/nginx" ln -s /usr/src/nginx/auto/configure "$pkgdir/usr/src/nginx"

25
service
View File

@ -1,14 +1,29 @@
# Stop dance for nginx
# =======================
#
# ExecStop sends SIGSTOP (graceful stop) to the nginx process.
# If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control
# and sends SIGTERM (fast shutdown) to the main process.
# After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends
# SIGKILL to all the remaining processes in the process group (KillMode=mixed).
#
# nginx signals reference doc:
# http://nginx.org/en/docs/control.html
#
[Unit] [Unit]
Description=A high performance web server and a reverse proxy server Description=A high performance web server and a reverse proxy server
After=syslog.target network.target Documentation=man:nginx(8)
After=network.target nss-lookup.target
[Service] [Service]
Type=forking Type=forking
PIDFile=/run/nginx.pid PIDFile=/run/nginx.pid
ExecStartPre=/usr/bin/nginx -t -q -g 'pid /run/nginx.pid; daemon on; master_process on;' ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
ExecStart=/usr/bin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;' ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
ExecReload=/usr/bin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;' -s reload ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
ExecStop=/usr/bin/nginx -g 'pid /run/nginx.pid;' -s quit ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid
TimeoutStopSec=5
KillMode=mixed
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target