mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-12 18:59:50 +03:00
testing/unit-php85: new aport
This commit is contained in:
parent
3b32e0f28b
commit
55d9fa60ea
2 changed files with 89 additions and 0 deletions
73
testing/unit-php85/APKBUILD
Normal file
73
testing/unit-php85/APKBUILD
Normal file
|
@ -0,0 +1,73 @@
|
|||
# Contributor: André Klitzing <aklitzing@gmail.com>
|
||||
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
||||
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
|
||||
pkgname=unit-php85
|
||||
pkgver=1.34.2
|
||||
pkgrel=0
|
||||
pkgdesc="PHP 8.5 module for NGINX Unit"
|
||||
url="https://unit.nginx.org/"
|
||||
arch="all"
|
||||
license="Apache-2.0"
|
||||
_phpver=85
|
||||
depends="unit"
|
||||
makedepends="
|
||||
linux-headers
|
||||
openssl-dev>3
|
||||
php$_phpver-dev
|
||||
php$_phpver-embed
|
||||
php$_phpver-opcache
|
||||
"
|
||||
checkdepends="procps-ng
|
||||
py3-openssl
|
||||
py3-pytest
|
||||
php$_phpver-opcache
|
||||
"
|
||||
#source="https://unit.nginx.org/download/unit-$pkgver.tar.gz
|
||||
source="unit-$pkgver.tar.gz::https://github.com/nginx/unit/archive/refs/tags/$pkgver.tar.gz
|
||||
fix-ssl-shutdown.patch
|
||||
"
|
||||
builddir="$srcdir/unit-$pkgver"
|
||||
|
||||
build() {
|
||||
./configure \
|
||||
--prefix="/usr" \
|
||||
--localstatedir="/var" \
|
||||
--runstatedir="/run" \
|
||||
--statedir="/var/lib/unit" \
|
||||
--control="unix:/run/control.unit.sock" \
|
||||
--pid="/run/unit.pid" \
|
||||
--log="/var/log/unit.log" \
|
||||
--tmpdir=/tmp \
|
||||
--modulesdir="/usr/lib/unit/modules" \
|
||||
--openssl \
|
||||
--user=unit \
|
||||
--group=unit \
|
||||
--tests
|
||||
./configure php --module=php$_phpver --config=php-config$_phpver --lib-path=/usr/lib/php$_phpver
|
||||
|
||||
make
|
||||
make php$_phpver tests
|
||||
}
|
||||
|
||||
check() {
|
||||
# FIXME: some tests fail in CI or locally in checkroot too
|
||||
local _fds=160 # fds leaking in tests
|
||||
local _allow_fail=no
|
||||
case "$CARCH" in
|
||||
armhf | armv7) _allow_fail=yes ;; # segfault
|
||||
esac
|
||||
pytest test --fds-threshold=$_fds -k "
|
||||
test_php \
|
||||
and not test_php_isolation \
|
||||
and not test_php_application_forbidden \
|
||||
" || [ "$_allow_fail" = yes ]
|
||||
}
|
||||
|
||||
package() {
|
||||
make php$_phpver-install DESTDIR="$pkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f30f54d00d1d0fd2e2378574c365bf464bbd9c1b4d14d69aada2bc3b7c2cec3467a499374cd655f2deb098486d4f2c64be5fd75d9ec4cab2973bb81a2c43097f unit-1.34.2.tar.gz
|
||||
42d8c510419868cc13c997e8c340a0143d6f667a90f162adc18c11f56f85de393b3034702686c12e5a96f52350681e6092e4b25a4d8d7ba746f9ad1116c08e70 fix-ssl-shutdown.patch
|
||||
"
|
16
testing/unit-php85/fix-ssl-shutdown.patch
Normal file
16
testing/unit-php85/fix-ssl-shutdown.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
Patch-Source: https://github.com/nginx/unit/pull/1601
|
||||
--- a/src/nxt_openssl.c
|
||||
+++ b/src/nxt_openssl.c
|
||||
@@ -1586,6 +1586,12 @@
|
||||
|
||||
nxt_debug(task, "ERR_peek_error(): %l", lib_err);
|
||||
|
||||
+ /* Treat a broken pipe on shutdown as a normal close */
|
||||
+ if (sys_err == EPIPE) {
|
||||
+ c->socket.closed = 1;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (sys_err != 0 || lib_err != 0) {
|
||||
c->socket.error = sys_err;
|
||||
return NXT_ERROR;
|
Loading…
Add table
Add a link
Reference in a new issue