community/unit: upgrade to 1.33.0

This commit is contained in:
Andy Postnikov 2024-04-24 23:33:07 +02:00
parent 639ab3092b
commit 93d8300765
2 changed files with 6 additions and 49 deletions

View file

@ -2,8 +2,8 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=unit
pkgver=1.32.1
pkgrel=4
pkgver=1.33.0
pkgrel=0
pkgdesc="NGINX Unit is a dynamic web application server"
url="https://unit.nginx.org/"
arch="all"
@ -30,12 +30,12 @@ pkgusers="$pkgname"
pkggroups="$pkgname"
install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-openrc $pkgname-tools::noarch $pkgname-doc"
source="https://sources.nginx.org/unit/unit-$pkgver.tar.gz
#source="https://sources.nginx.org/unit/unit-$pkgver.tar.gz
source="$pkgname-$pkgver.tar.gz::https://github.com/nginx/unit/archive/refs/tags/$pkgver.tar.gz
$pkgname.initd
$pkgname.confd
$pkgname.logrotate
phpver.patch
fix-tls-tests.patch
"
for _mod in perl php$_phpver2 php$_phpver3 python3 ruby; do
@ -48,6 +48,7 @@ build() {
./configure \
--prefix="/usr" \
--localstatedir="/var" \
--runstatedir="/run" \
--statedir="/var/lib/unit" \
--control="unix:/run/control.unit.sock" \
--pid="/run/unit.pid" \
@ -104,9 +105,6 @@ package() {
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
# abuild 3.13.0 adds checks prohibiting packages from creating /var/run
rmdir "$pkgdir"/var/run/unit "$pkgdir"/var/run
}
tools() {
@ -133,10 +131,9 @@ _module() {
}
sha512sums="
159b36f7afb8857188c9b64ee192e18d6990da3733caafcfb684b98e3f5182a7589ed2439f32af0cd3c763a3fa73f061f5a73ef01894182b1c12a4cd324c528a unit-1.32.1.tar.gz
2135fc9f6b1ae6e764c7da770e1a924cd8223f6a042229ac41cf84086f748e11503ad2bf84684dc0f141bcc1846b8fec7d03df49129a63df930d14c8afec98aa unit-1.33.0.tar.gz
76ca55b0b697361c9799a57414d88c36bc59458af8154f7c4275302ad7694bef4ba4a295685956dd5472d8508bac8e1d1977ff7ff4f46cc443f63ea3e3c35d55 unit.initd
f85112726dfcace2b6d94b10669615fef517f5aa10ac858890dd9f5c868a6e2569500f7411f758fcb24c98c9630760d36a74bd33ea510ab0f8ca8cd6cb1fb1e8 unit.confd
723e465162dfdb31881680200221542add414e54ef4f4f1fc57e91b7b57777dfb21c2eee4727ecbba0c1943bb77a2597cc0225b16e334c38258c296d15b1df74 unit.logrotate
2fe9966f54fd5d23316810b0260d966e2093c303d8a9ecea693971fe2243c579ed5db0e41e01fc01e56801387bd19cc72f5b26c45d21e5d48084e9ded384965b phpver.patch
aae610dd2e8056d278397af708926a8e24f282158dc539182f9dfd44582f6b8bba1a57df7769539572f4268db305d84f12eb9fe07dfeec9a8781a6f66ca28386 fix-tls-tests.patch
"

View file

@ -1,40 +0,0 @@
Patch-Source: https://github.com/nginx/unit/commit/a625a0b1f0d822b3224b7b29565fe9733b634afd
From a625a0b1f0d822b3224b7b29565fe9733b634afd Mon Sep 17 00:00:00 2001
From: Andrei Zeliankou <zelenkov@nginx.com>
Date: Mon, 8 Apr 2024 02:18:37 +0100
Subject: [PATCH] Tests: compatibility with OpenSSL 3.2.0
OpenSSL 3.2.0 generates X.509v3 certificates by default. These
certificates, even self-signed, cannot sign other certificates unless
"CA:TRUE" is explicitly set in the basicConstraints extension.
As a result, tests attempting this are currently failing.
Fix is to provide "CA:TRUE" in the basicConstraints for self-signed root
certificates used in "openssl ca" commands.
Closes: https://github.com/nginx/unit/issues/1202
Tested-by: Andrew Clayton <a.clayton@nginx.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
---
test/unit/applications/tls.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/unit/applications/tls.py b/test/unit/applications/tls.py
index 75354dd91..b48293be6 100644
--- a/test/unit/applications/tls.py
+++ b/test/unit/applications/tls.py
@@ -85,9 +85,13 @@ def openssl_conf(self, rewrite=False, alt_names=None):
default_bits = 2048
encrypt_key = no
distinguished_name = req_distinguished_name
+x509_extensions = myca_extensions
{a_sec if alt_names else ""}
-[ req_distinguished_name ]'''
+[ req_distinguished_name ]
+
+[ myca_extensions ]
+basicConstraints = critical,CA:TRUE'''
)
def load(self, script, name=None):