aboutsummaryrefslogtreecommitdiffstats
path: root/community/unit/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/unit/APKBUILD')
-rw-r--r--community/unit/APKBUILD98
1 files changed, 77 insertions, 21 deletions
diff --git a/community/unit/APKBUILD b/community/unit/APKBUILD
index a99358aacba..bafac597830 100644
--- a/community/unit/APKBUILD
+++ b/community/unit/APKBUILD
@@ -1,45 +1,66 @@
# Contributor: André Klitzing <aklitzing@gmail.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
-# Maintainer: André Klitzing <aklitzing@gmail.com>
+# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=unit
-pkgver=1.23.0
+pkgver=1.32.1
pkgrel=2
pkgdesc="NGINX Unit is a dynamic web application server"
url="https://unit.nginx.org/"
arch="all"
license="Apache-2.0"
-_phpver=7
-makedepends="perl-dev php$_phpver-dev php$_phpver-embed python3-dev ruby-dev openssl-dev"
+_phpver2=82
+_phpver3=83
+makedepends="
+ linux-headers
+ openssl-dev>3
+ perl-dev
+ php$_phpver2-dev
+ php$_phpver2-embed
+ php$_phpver3-dev
+ php$_phpver3-embed
+ python3-dev
+ ruby-dev
+ "
+checkdepends="procps-ng
+ py3-pytest py3-openssl
+ php$_phpver2-opcache php$_phpver3-opcache
+ "
+options="net" # ruby tests require rack
+pkgusers="$pkgname"
+pkggroups="$pkgname"
install="$pkgname.pre-install"
-subpackages="$pkgname-openrc"
-source="https://unit.nginx.org/download/unit-$pkgver.tar.gz
+subpackages="$pkgname-dev $pkgname-openrc $pkgname-tools::noarch $pkgname-doc"
+source="https://sources.nginx.org/unit/unit-$pkgver.tar.gz
$pkgname.initd
$pkgname.confd
- $pkgname.logrotate"
+ $pkgname.logrotate
+ phpver.patch
+ fix-tls-tests.patch
+ "
-for _mod in perl php$_phpver python3 ruby; do
+for _mod in perl php$_phpver2 php$_phpver3 python3 ruby; do
subpackages="$subpackages $pkgname-$_mod:_module"
done
_modules_dir="/usr/lib/unit/modules"
build() {
- # Needed for building perl module.
- export CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
-
./configure \
--prefix="/usr" \
- --state="/var/lib/unit" \
+ --localstatedir="/var" \
+ --statedir="/var/lib/unit" \
--control="unix:/run/control.unit.sock" \
--pid="/run/unit.pid" \
--log="/var/log/unit.log" \
- --modules="$_modules_dir" \
+ --tmpdir=/tmp \
+ --modulesdir="$_modules_dir" \
--openssl \
--user=unit \
--group=unit \
--tests
./configure perl
- ./configure php --module=php$_phpver --config=php-config$_phpver
+ ./configure php --module=php$_phpver2 --config=php-config$_phpver2
+ ./configure php --module=php$_phpver3 --config=php-config$_phpver3
./configure python --config=python3-config
./configure ruby
@@ -50,17 +71,48 @@ build() {
check() {
./build/tests
- # FIXME: Some tests are broken.
- #make install DESTDIR=".dest"
- #./test/run.py
+ local _ruby="$srcdir/ruby-rack"
+ gem install rack -i $_ruby --no-document
+
+ # 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
+ GEM_PATH=$_ruby pytest test --fds-threshold=$_fds -k "
+ not java and not go and not node \
+ and not njs \
+ and not test_static_mount \
+ and not test_php_isolation \
+ and not test_php_application_forbidden \
+ and not test_php_application_shared_opcache \
+ and not test_python_isolation \
+ and not test_python_user_group \
+ and not test_ruby_isolation \
+ and not test_settings_send_timeout \
+ " || [ "$_allow_fail" = yes ]
}
package() {
- make unitd-install DESTDIR="$pkgdir"
+ make unitd-install manpage-install libunit-install DESTDIR="$pkgdir"
install -D -m 755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -D -m 644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
install -D -m 644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname
+
+ install -D -m 755 tools/setup-unit "$pkgdir"/usr/bin/setup-unit
+ install -D -m 755 tools/unitc "$pkgdir"/usr/bin/unitc
+ install -D -m 644 tools/README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
+}
+
+tools() {
+ pkgdesc="Configuration scripts for Unit"
+ depends="bash curl"
+
+ amove usr/bin/setup-unit
+ amove usr/bin/unitc
+ amove usr/share/doc/$pkgname/README.md
}
openrc() {
@@ -69,7 +121,7 @@ openrc() {
}
_module() {
- local modname=${subpkgname#$pkgname-}
+ local modname=${subpkgname#"$pkgname"-}
pkgdesc="$modname module for NGINX Unit"
depends="$pkgname=$pkgver-r$pkgrel"
@@ -77,7 +129,11 @@ _module() {
make $modname-install DESTDIR="$subpkgdir"
}
-sha512sums="f21bef8f796428426a1673c8cc9b1fc5a266c253ce51df64fbffff084bdfe87117e3f53d5c5b56de1530edf3be0a8bdaca49325e9983705a39c015b61dab6035 unit-1.23.0.tar.gz
+sha512sums="
+159b36f7afb8857188c9b64ee192e18d6990da3733caafcfb684b98e3f5182a7589ed2439f32af0cd3c763a3fa73f061f5a73ef01894182b1c12a4cd324c528a unit-1.32.1.tar.gz
76ca55b0b697361c9799a57414d88c36bc59458af8154f7c4275302ad7694bef4ba4a295685956dd5472d8508bac8e1d1977ff7ff4f46cc443f63ea3e3c35d55 unit.initd
f85112726dfcace2b6d94b10669615fef517f5aa10ac858890dd9f5c868a6e2569500f7411f758fcb24c98c9630760d36a74bd33ea510ab0f8ca8cd6cb1fb1e8 unit.confd
-723e465162dfdb31881680200221542add414e54ef4f4f1fc57e91b7b57777dfb21c2eee4727ecbba0c1943bb77a2597cc0225b16e334c38258c296d15b1df74 unit.logrotate"
+723e465162dfdb31881680200221542add414e54ef4f4f1fc57e91b7b57777dfb21c2eee4727ecbba0c1943bb77a2597cc0225b16e334c38258c296d15b1df74 unit.logrotate
+2fe9966f54fd5d23316810b0260d966e2093c303d8a9ecea693971fe2243c579ed5db0e41e01fc01e56801387bd19cc72f5b26c45d21e5d48084e9ded384965b phpver.patch
+aae610dd2e8056d278397af708926a8e24f282158dc539182f9dfd44582f6b8bba1a57df7769539572f4268db305d84f12eb9fe07dfeec9a8781a6f66ca28386 fix-tls-tests.patch
+"