diff options
-rw-r--r-- | .SRCINFO | 60 | ||||
-rw-r--r-- | PKGBUILD | 134 | ||||
-rw-r--r-- | nginx.conf | 1 | ||||
-rw-r--r-- | nginx.logrotate | 8 | ||||
-rw-r--r-- | nginx.service | 18 | ||||
-rw-r--r-- | openssl.patch | 16 |
6 files changed, 237 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c82c99e542fa --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,60 @@ +# Generated by mksrcinfo v8 +# Tue Mar 1 00:47:24 UTC 2016 +pkgbase = nginx-mainline-mod4679 + pkgdesc = lightweight HTTP server, statically linked against BoringSSL,with ngx_http_google_filter_module,nginx-ct. + pkgver = 1.9.12 + pkgrel = 2 + url = http://nginx.org + arch = i686 + arch = x86_64 + license = custom + makedepends = libxslt + makedepends = gd + makedepends = git + makedepends = cmake + depends = pcre + depends = zlib + depends = pam + depends = gd + depends = hardening-wrapper + depends = libxslt + depends = go + provides = nginx + conflicts = nginx + conflicts = nginx-libressl + conflicts = nginx-unstable + conflicts = nginx-svn + conflicts = nginx-devel + conflicts = nginx-custom-dev + conflicts = nginx-full + backup = etc/nginx/nginx.conf + backup = etc/nginx/koi-win + backup = etc/nginx/koi-utf + backup = etc/nginx/win-utf + backup = etc/nginx/mime.types + backup = etc/nginx/fastcgi.conf + backup = etc/nginx/fastcgi_params + backup = etc/nginx/scgi_params + backup = etc/nginx/uwsgi_params + backup = etc/logrotate.d/nginx + source = nginx.conf + source = nginx.logrotate + source = nginx.service + source = http://nginx.org/download/nginx-1.9.12.tar.gz + source = openssl.patch + source = git+https://boringssl.googlesource.com/boringssl + source = ngx_http_google_filter_module-0.2.0.tar.gz::https://github.com/cuber/ngx_http_google_filter_module/archive/0.2.0.tar.gz + source = ngx_http_substitutions_filter_module-0.6.4.tar.gz::https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/v0.6.4.tar.gz + source = nginx-ct-1.2.0.tar.gz::https://github.com/grahamedgecombe/nginx-ct/archive/v1.2.0.tar.gz + sha256sums = 8d8e314da10411b29157066ea313fc080a145d2075df0c99a1d500ffc7e8b7d1 + sha256sums = adcf6507abb2d4edbc50bd92f498ba297927eed0460d71633df94f79637aa786 + sha256sums = 225228970d779e1403ba4314e3cd8d0d7d16f8c6d48d7a22f8384db040eb0bdf + sha256sums = 1af2eb956910ed4b11aaf525a81bc37e135907e7127948f9179f5410337da042 + sha256sums = dc1ea1a0323759d49a7dc2c6173811bda319c36aa4a14b775d6f589fe9c6a4c2 + sha256sums = SKIP + sha256sums = 9cd68c8e092efb1a419e1087bb9ca23aab1ff8650c400c0aa815d461d79385de + sha256sums = ed4ddbcf0c434f4a1e97b61251a63ace759792764bd5cb79ff20efe348db8db3 + sha256sums = 63e6dcb16a7860520513598ff67bdcd3e978b5fcd96d63b2afb08a0cfd29f232 + +pkgname = nginx-mainline-mod4679 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..35373fe4b3b2 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,134 @@ +#base on aur/nginx-mainline-libressl + +_pkgname="nginx" +_user="html" +_group="users" +_doc_root="/usr/share/${_pkgname}/http" +_sysconf_path="etc" +_conf_path="${_sysconf_path}/${_pkgname}" +_tmp_path="/var/spool/${_pkgname}" +_pid_path="/run" +_lock_path="/var/lock" +_log_path="/var/log/${_pkgname}" +_mod1=ngx_http_google_filter_module +_mod1ver=0.2.0 +_mod2=ngx_http_substitutions_filter_module +_mod2ver=0.6.4 +_mod3=nginx-ct +_mod3ver=1.2.0 + +pkgname=nginx-mainline-mod4679 +pkgver=1.9.12 +pkgrel=2 +pkgdesc="lightweight HTTP server, statically linked against BoringSSL,with ngx_http_google_filter_module,nginx-ct." +arch=('i686' 'x86_64') + +depends=('pcre' 'zlib' 'pam' 'gd' 'hardening-wrapper' 'libxslt' 'go') +makedepends=( + 'libxslt' + 'gd' + 'git' + 'cmake' +) + +url="http://nginx.org" +license=('custom') +conflicts=('nginx' 'nginx-libressl' 'nginx-unstable' 'nginx-svn' 'nginx-devel' 'nginx-custom-dev' 'nginx-full') +provides=('nginx') +backup=("${_conf_path}/nginx.conf" + "${_conf_path}/koi-win" + "${_conf_path}/koi-utf" + "${_conf_path}/win-utf" + "${_conf_path}/mime.types" + "${_conf_path}/fastcgi.conf" + "${_conf_path}/fastcgi_params" + "${_conf_path}/scgi_params" + "${_conf_path}/uwsgi_params" + "etc/logrotate.d/nginx") + +source=( "nginx.conf" + "nginx.logrotate" + "nginx.service" + "http://nginx.org/download/nginx-$pkgver.tar.gz" + "openssl.patch" + "git+https://boringssl.googlesource.com/boringssl" + "${_mod1}-${_mod1ver}.tar.gz::https://github.com/cuber/${_mod1}/archive/${_mod1ver}.tar.gz" + "${_mod2}-${_mod2ver}.tar.gz::https://github.com/yaoweibin/${_mod2}/archive/v${_mod2ver}.tar.gz" + "${_mod3}-${_mod3ver}.tar.gz::https://github.com/grahamedgecombe/${_mod3}/archive/v${_mod3ver}.tar.gz" +) + +sha256sums=('8d8e314da10411b29157066ea313fc080a145d2075df0c99a1d500ffc7e8b7d1' + 'adcf6507abb2d4edbc50bd92f498ba297927eed0460d71633df94f79637aa786' + '225228970d779e1403ba4314e3cd8d0d7d16f8c6d48d7a22f8384db040eb0bdf' + '1af2eb956910ed4b11aaf525a81bc37e135907e7127948f9179f5410337da042' + 'dc1ea1a0323759d49a7dc2c6173811bda319c36aa4a14b775d6f589fe9c6a4c2' + 'SKIP' + '9cd68c8e092efb1a419e1087bb9ca23aab1ff8650c400c0aa815d461d79385de' + 'ed4ddbcf0c434f4a1e97b61251a63ace759792764bd5cb79ff20efe348db8db3' + '63e6dcb16a7860520513598ff67bdcd3e978b5fcd96d63b2afb08a0cfd29f232') + +build() { + local _src_dir="${srcdir}/${_pkgname}-${pkgver}" + + export CFLAGS="-Wno-error -fPIC" + cd ${srcdir}/boringssl + mkdir build && cd build && cmake ../ && make && cd ${srcdir}/boringssl + mkdir -p .openssl/lib && cd .openssl && ln -s ../include . && cd ../ + cp ${srcdir}/boringssl/build/crypto/libcrypto.a ${srcdir}/boringssl/build/ssl/libssl.a .openssl/lib && cd .. + + cd $_src_dir + + ./configure \ + --prefix="/${_conf_path}" \ + --conf-path="/${_conf_path}/nginx.conf" \ + --sbin-path="/usr/bin/${_pkgname}" \ + --pid-path="${_pid_path}/${_pkgname}.pid" \ + --lock-path=${_pid_path}/${_pkgname}.lock \ + --http-client-body-temp-path=${_tmp_path}/client_body_temp \ + --http-proxy-temp-path=${_tmp_path}/proxy_temp \ + --http-fastcgi-temp-path=${_tmp_path}/fastcgi_temp \ + --http-uwsgi-temp-path=${_tmp_path}/uwsgi_temp \ + --http-scgi-temp-path=${_tmp_path}scgi_temp \ + --http-log-path=${_log_path}/access.log \ + --error-log-path=${_log_path}/error.log \ + --user=${_user} \ + --group=${_group} \ + --with-ipv6 \ + --with-openssl=../boringssl \ + --with-threads \ + --with-http_ssl_module \ + --with-http_gzip_static_module \ + --with-http_realip_module \ + --with-http_v2_module \ + --with-file-aio \ + --with-pcre-jit \ + --with-stream \ + --add-module=../${_mod1}-${_mod1ver} \ + --add-module=../${_mod2}-${_mod2ver} \ + --add-module=../${_mod3}-${_mod3ver} + + touch ${srcdir}/boringssl/.openssl/include/openssl/ssl.h + patch -p0 < ../openssl.patch + + make +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + make DESTDIR="$pkgdir/" install + + sed -i -e "s/\<user\s\+\w\+;/user $_user;/g" ${pkgdir}/$_conf_path/nginx.conf + mkdir -p ${pkgdir}/$_conf_path/sites-available/ + + install -d "${pkgdir}/${_tmp_path}" + install -d "${pkgdir}/${_doc_root}" + + mv "${pkgdir}/${_conf_path}/html/"* "${pkgdir}/${_doc_root}" + rm -rf "${pkgdir}/${_conf_path}/html" + + install -D -m644 "${srcdir}/nginx.logrotate" "${pkgdir}/etc/logrotate.d/${_pkgname}" + install -D -m644 "${srcdir}/nginx.conf" "${pkgdir}/etc/conf.d/${_pkgname}" + install -D -m644 "${srcdir}/nginx.service" "${pkgdir}/usr/lib/systemd/system/nginx.service" + install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" + install -D -m644 "man/nginx.8" "${pkgdir}/usr/share/man/man8/nginx.8" +} diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 000000000000..1b748a007e17 --- /dev/null +++ b/nginx.conf @@ -0,0 +1 @@ +NGINX_CONFIG=/etc/nginx/nginx.conf diff --git a/nginx.logrotate b/nginx.logrotate new file mode 100644 index 000000000000..e4dddfc528ee --- /dev/null +++ b/nginx.logrotate @@ -0,0 +1,8 @@ + /var/log/nginx/*log { + daily + create 640 http log + compress + postrotate + [ ! -f /run/nginx.pid ] || kill -USR1 `cat /run/nginx.pid` + endscript + } diff --git a/nginx.service b/nginx.service new file mode 100644 index 000000000000..c237fd3051da --- /dev/null +++ b/nginx.service @@ -0,0 +1,18 @@ +[Unit] +Description=A high performance web server and a reverse proxy server +After=network.target + +[Service] +Type=forking +PIDFile=/run/nginx.pid +PrivateDevices=yes +SyslogLevel=err + +ExecStartPre=/usr/bin/nginx -t -q -g 'pid /run/nginx.pid; error_log stderr;' +ExecStart=/usr/bin/nginx -g 'pid /run/nginx.pid; error_log stderr;' +ExecReload=/usr/bin/kill -HUP $MAINPID +KillSignal=SIGQUIT +KillMode=mixed + +[Install] +WantedBy=multi-user.target diff --git a/openssl.patch b/openssl.patch new file mode 100644 index 000000000000..3dad00740100 --- /dev/null +++ b/openssl.patch @@ -0,0 +1,16 @@ +--- src/event/ngx_event_openssl.c 2016-01-10 02:38:56.405000000 +0000 ++++ src/event/ngx_event_openssl.c.mod 2016-01-10 02:40:10.388000000 +0000 +@@ -1909,13 +1909,11 @@ + + /* handshake failures */ + if (n == SSL_R_BAD_CHANGE_CIPHER_SPEC /* 103 */ +- || n == SSL_R_BLOCK_CIPHER_PAD_IS_WRONG /* 129 */ + || n == SSL_R_DIGEST_CHECK_FAILED /* 149 */ + || n == SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST /* 151 */ + || n == SSL_R_EXCESSIVE_MESSAGE_SIZE /* 152 */ + || n == SSL_R_LENGTH_MISMATCH /* 159 */ + || n == SSL_R_NO_CIPHERS_PASSED /* 182 */ +- || n == SSL_R_NO_CIPHERS_SPECIFIED /* 183 */ + || n == SSL_R_NO_COMPRESSION_SPECIFIED /* 187 */ + || n == SSL_R_NO_SHARED_CIPHER /* 193 */ + || n == SSL_R_RECORD_LENGTH_MISMATCH /* 213 */ |