community/haproxy to 2.0.5-1

This commit is contained in:
Kevin Mihelich 2019-09-06 23:40:09 +00:00
parent 9868edc914
commit 75dd9fe41a
2 changed files with 6 additions and 47 deletions

View file

@ -1,30 +0,0 @@
From a4d80f898f63614ee523b301ad3a66c6ff37ee0a Mon Sep 17 00:00:00 2001
From: Olivier Houchard <cognet@ci0.org>
Date: Tue, 21 May 2019 14:05:45 +0200
Subject: [PATCH] BUG/MEDIUM: threads: Fix build for 32bits arch with dwcas.
_HA_ATOMIC_DWCAS() only exists in 2.0, not in 1.9, so use HA_ATOMIC_DWCAS.
This should fix build on 32bits arches that have a double-word CAS
implemented (currently only armv7).
This is a direct commit to 1.9, as the problem doesn't exist in 2.0, and
it shouldn't be backported to 1.8.
---
src/fd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/fd.c b/src/fd.c
index 05caa019..769e10ed 100644
--- a/src/fd.c
+++ b/src/fd.c
@@ -264,7 +264,7 @@ lock_self:
#ifdef HA_CAS_IS_8B
unlikely(!HA_ATOMIC_CAS(((void **)(void *)&_GET_NEXT(fd, off)), ((void **)(void *)&cur_list), (*(void **)(void *)&next_list))))
#else
- unlikely(!_HA_ATOMIC_DWCAS(((void **)(void *)&_GET_NEXT(fd, off)), ((void **)(void *)&cur_list), (*(void **)(void *)&next_list))))
+ unlikely(!HA_ATOMIC_DWCAS(((void **)(void *)&_GET_NEXT(fd, off)), ((void **)(void *)&cur_list), (*(void **)(void *)&next_list))))
#endif
;
next = cur_list.next;
--
2.21.0

View file

@ -3,10 +3,9 @@
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - explicitly link v5/v6 with libatomic
# - upstream armv7 fix
pkgname=haproxy
pkgver=1.9.8
pkgver=2.0.5
pkgrel=1
pkgdesc='Reliable, high performance TCP/HTTP load balancer'
@ -23,20 +22,17 @@ install=haproxy.install
source=(https://haproxy.org/download/${pkgver%.*}/src/haproxy-$pkgver.tar.gz
haproxy.cfg
haproxy.sysusers
0001-Use-CFLAGS-and-LDFLAGS-when-building-contrib.patch
0001-BUG-MEDIUM-threads-Fix-build-for-32bits-arch-with-dw.patch)
0001-Use-CFLAGS-and-LDFLAGS-when-building-contrib.patch)
md5sums=('efd17947e2c6d1fb26a0987968b1bc6a'
md5sums=('497c716adf4b056484601a887f34d152'
'27941f31d25d5629f4bdef6bc4b2555a'
'2f00e81ee2f3f6e51a0cd9acc6f3ff3e'
'5343b0563c2e0e59110a84e2e611d94f'
'16b654df6333fee3a04e1f55038950e9')
'5343b0563c2e0e59110a84e2e611d94f')
prepare() {
cd haproxy-$pkgver
patch -p1 <"$srcdir"/0001-Use-CFLAGS-and-LDFLAGS-when-building-contrib.patch
patch -p1 <"$srcdir"/0001-BUG-MEDIUM-threads-Fix-build-for-32bits-arch-with-dw.patch
}
build() {
@ -45,7 +41,7 @@ build() {
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && ADDLIB="-latomic"
make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
CPU=generic \
TARGET=linux2628 \
TARGET=linux-glibc \
USE_GETADDRINFO=1 \
USE_OPENSSL=1 \
USE_PCRE=1 USE_PCRE_JIT=1 \
@ -75,12 +71,5 @@ package() {
install -Dm644 ../haproxy.cfg "$pkgdir"/etc/haproxy/haproxy.cfg
install -Dm644 contrib/systemd/haproxy.service \
"$pkgdir"/usr/lib/systemd/system/haproxy.service
install -d "$pkgdir"/usr/share/haproxy/examples/errorfiles
install -m644 examples/*.cfg "$pkgdir"/usr/share/haproxy/examples/
install -m644 examples/errorfiles/*.http \
"$pkgdir"/usr/share/haproxy/examples/errorfiles/
install -Dm644 examples/haproxy.vim \
"$pkgdir"/usr/share/vim/vimfiles/syntax/haproxy.vim
cp -r examples "$pkgdir"/usr/share/haproxy/examples
}