[testing] -> [core] 'libevent-2.1.12-1' move

master
artoo 2 years ago
parent e6f8ea3877
commit 2a9cb92614
  1. 31
      x86_64/core/0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch
  2. 21
      x86_64/core/PKGBUILD
  3. 35
      x86_64/testing/PKGBUILD

@ -1,31 +0,0 @@
From 497ef904d544ac51de43934549dbeccce8e6e8f8 Mon Sep 17 00:00:00 2001
From: Azat Khuzhin <azat@libevent.org>
Date: Mon, 1 Jul 2019 23:54:02 +0300
Subject: [PATCH] Warn if forked from the event loop during event_reinit()
Calling fork() from the event loop is not a great idea, since at least
it shares some internal pipes (for handling signals) before
event_reinit() call
Closes: #833
---
event.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/event.c b/event.c
index fa4f2802e..aa6c6fba3 100644
--- a/event.c
+++ b/event.c
@@ -1003,6 +1003,12 @@ event_reinit(struct event_base *base)
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ if (base->running_loop) {
+ event_warnx("%s: forked from the event_loop.", __func__);
+ res = -1;
+ goto done;
+ }
+
evsel = base->evsel;
/* check if this event mechanism requires reinit on the backend */

@ -2,8 +2,8 @@
# Contributor: Judd <jvinet@zeroflux.org>
pkgname=libevent
pkgver=2.1.11
pkgrel=5
pkgver=2.1.12
pkgrel=1
pkgdesc="An event notification library"
arch=('x86_64')
url="https://libevent.org/"
@ -11,23 +11,12 @@ license=('BSD')
depends=('openssl')
makedepends=('cmake' 'python')
optdepends=('python: to use event_rpcgen.py')
source=(https://github.com/libevent/libevent/releases/download/release-$pkgver-stable/$pkgname-$pkgver-stable.tar.gz{,.asc}
https://raw.githubusercontent.com/libevent/libevent/release-2.1.11-stable/cmake/Uninstall.cmake.in
0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch)
sha256sums=('a65bac6202ea8c5609fd5c7e480e6d25de467ea1917c08290c521752f147283d'
'SKIP'
'1584d6e36642d930ac99d014a485fe886ec705b3f998d128c6d6f227e0454b72'
'436e56c74c0af0b70c43eaae6bd32b760601d2d5fa98b8d2d026ffad18474e13')
source=(https://github.com/libevent/libevent/releases/download/release-$pkgver-stable/$pkgname-$pkgver-stable.tar.gz{,.asc})
sha256sums=('92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb'
'SKIP')
validpgpkeys=('B35BF85BF19489D04E28C33C21194EBB165733EA'
'9E3AC83A27974B84D1B3401DB86086848EF8686D')
prepare() {
cd ${pkgname}-${pkgver}-stable
patch -Np1 -R < ../0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch
cp -n ../Uninstall.cmake.in cmake # https://github.com/libevent/libevent/issues/914
}
build() {
cd ${pkgname}-${pkgver}-stable
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DEVENT__LIBRARY_TYPE=SHARED -S . -B build

@ -1,35 +0,0 @@
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Judd <jvinet@zeroflux.org>
pkgname=libevent
pkgver=2.1.12
pkgrel=1
pkgdesc="An event notification library"
arch=('x86_64')
url="https://libevent.org/"
license=('BSD')
depends=('openssl')
makedepends=('cmake' 'python')
optdepends=('python: to use event_rpcgen.py')
source=(https://github.com/libevent/libevent/releases/download/release-$pkgver-stable/$pkgname-$pkgver-stable.tar.gz{,.asc})
sha256sums=('92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb'
'SKIP')
validpgpkeys=('B35BF85BF19489D04E28C33C21194EBB165733EA'
'9E3AC83A27974B84D1B3401DB86086848EF8686D')
build() {
cd ${pkgname}-${pkgver}-stable
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DEVENT__LIBRARY_TYPE=SHARED -S . -B build
cmake --build build
}
check() {
cd ${pkgname}-${pkgver}-stable
cmake --build build --target test
}
package() {
cd ${pkgname}-${pkgver}-stable
cmake --build build --target install -- DESTDIR="$pkgdir"
install -Dm 644 LICENSE "${pkgdir}"/usr/share/licenses/libevent/LICENSE
}
Loading…
Cancel
Save