forked from jsonn/pkgsrc
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #552 from fac/2016Q4_backport_libevent
Backport libevent from 2017Q4 for security fixes
- Loading branch information
Showing
11 changed files
with
102 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
# $NetBSD: Makefile.common,v 1.2 2015/02/04 08:04:34 spz Exp $ | ||
|
||
# $NetBSD: Makefile.common,v 1.3 2017/02/15 17:34:37 adam Exp $ | ||
# | ||
# used by devel/libevent/Makefile | ||
# used by devel/py-libevent-rpcgen/Makefile | ||
|
||
LIBEVENT_VERSION= 2.0.22 | ||
DISTNAME= libevent-2.1.8-stable | ||
CATEGORIES= devel | ||
MASTER_SITES= ${MASTER_SITE_GITHUB:=libevent/} | ||
|
||
MAINTAINER?= pkgsrc-users@NetBSD.org | ||
HOMEPAGE= http://libevent.org/ | ||
LICENSE= modified-bsd | ||
|
||
GITHUB_PROJECT= libevent | ||
GITHUB_RELEASE= release-${PKGVERSION_NOREV}-stable | ||
|
||
DISTNAME= libevent-${LIBEVENT_VERSION}-stable | ||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=levent/} | ||
DISTINFO_FILE= ${.CURDIR}/../../devel/libevent/distinfo | ||
PATCHDIR= ${.CURDIR}/../../devel/libevent/patches |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
$NetBSD: distinfo,v 1.32 2015/11/03 03:27:40 agc Exp $ | ||
$NetBSD: distinfo,v 1.37 2017/09/26 17:57:36 gson Exp $ | ||
|
||
SHA1 (libevent-2.0.22-stable.tar.gz) = a586882bc93a208318c70fc7077ed8fca9862864 | ||
RMD160 (libevent-2.0.22-stable.tar.gz) = 6a7e8e3ebcfd2227fa807a604b5c773c90c8b8cc | ||
SHA512 (libevent-2.0.22-stable.tar.gz) = 990637f12e890bfa7f86c194c8b112701436e92b60afb829194879efb85d558b986261e6508fe29bde73981feada874438e2d442cec8ea5730c889954f9bc907 | ||
Size (libevent-2.0.22-stable.tar.gz) = 854987 bytes | ||
SHA1 (patch-Makefile.am) = 4bada3e2ddb6cff34edf92abbe22e5d9a64b8ee8 | ||
SHA1 (patch-Makefile.in) = 8fcd6f893c3c967599fa4f528953e449e85ac8f0 | ||
SHA1 (patch-evutil__rand.c) = e8e0bbccd27ccbb7a9cf077352a8c56a35e87b47 | ||
SHA1 (libevent-2.1.8-stable.tar.gz) = 2a1b8bb7a262d3fd0ed6a080a20991a6eed675ec | ||
RMD160 (libevent-2.1.8-stable.tar.gz) = 6c7ce8cb51279f9b6b8d8897192db6a2da3d6797 | ||
SHA512 (libevent-2.1.8-stable.tar.gz) = a2fd3dd111e73634e4aeb1b29d06e420b15c024d7b47778883b5f8a4ff320b5057a8164c6d50b53bd196c79d572ce2639fe6265e03a93304b09c22b41e4c2a17 | ||
Size (libevent-2.1.8-stable.tar.gz) = 1026485 bytes | ||
SHA1 (patch-Makefile.in) = 09c7524eb8657e1f76232db97273806a8c900219 | ||
SHA1 (patch-evutil__rand.c) = 2b51e719d25181e03b5afb7df0bf443f1d62a8f1 | ||
SHA1 (patch-http.c) = f878714bf4d894d0026580bbed2a93927543eae8 | ||
SHA1 (patch-signal.c) = 1058566e7a6e0ffb709fbd2a3440cac86e188657 | ||
SHA1 (patch-test_bench__cascade.c) = 58bd32fe0cddc468fda57386283b5298b28ef93e |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,15 @@ | ||
$NetBSD: patch-Makefile.in,v 1.2 2015/10/13 14:21:13 jperkin Exp $ | ||
$NetBSD: patch-Makefile.in,v 1.3 2017/02/15 17:34:37 adam Exp $ | ||
|
||
Don't install event_rpcgen.py. | ||
|
||
--- Makefile.in.orig 2015-01-05 14:31:14.000000000 +0000 | ||
--- Makefile.in.orig 2017-01-29 18:41:28.000000000 +0000 | ||
+++ Makefile.in | ||
@@ -210,7 +210,7 @@ libevent_pthreads_la_LINK = $(LIBTOOL) - | ||
@INSTALL_LIBEVENT_FALSE@@PTHREADS_TRUE@am_libevent_pthreads_la_rpath = | ||
@INSTALL_LIBEVENT_TRUE@@PTHREADS_TRUE@am_libevent_pthreads_la_rpath = \ | ||
@INSTALL_LIBEVENT_TRUE@@PTHREADS_TRUE@ -rpath $(libdir) | ||
-am__dist_bin_SCRIPTS_DIST = event_rpcgen.py | ||
+am__dist_bin_SCRIPTS_DIST = | ||
SCRIPTS = $(dist_bin_SCRIPTS) | ||
DEFAULT_INCLUDES = -I.@am__isrc@ | ||
depcomp = $(SHELL) $(top_srcdir)/depcomp | ||
@@ -511,7 +511,7 @@ VERSION_INFO = 6:9:1 | ||
@@ -1003,7 +1003,7 @@ VERSION_INFO = 6:2:0 | ||
# nice and rare. For the next couple of years, though, 'struct event' | ||
# is user-visible, and so we can pretty much guarantee that release | ||
# series won't be binary-compatible. | ||
-@INSTALL_LIBEVENT_TRUE@dist_bin_SCRIPTS = event_rpcgen.py | ||
+@INSTALL_LIBEVENT_TRUE@dist_bin_SCRIPTS = | ||
+@INSTALL_LIBEVENT_TRUE@dist_bin_SCRIPTS = | ||
pkgconfigdir = $(libdir)/pkgconfig | ||
LIBEVENT_PKGCONFIG = libevent.pc $(am__append_2) $(am__append_4) | ||
|
||
LIBEVENT_PKGCONFIG = libevent.pc libevent_core.pc libevent_extra.pc \ | ||
$(am__append_2) $(am__append_4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
$NetBSD: patch-evutil__rand.c,v 1.1 2015/10/13 14:21:13 jperkin Exp $ | ||
$NetBSD: patch-evutil__rand.c,v 1.4 2017/09/22 02:58:50 maya Exp $ | ||
|
||
Native illumos arc4random(3C) imported the latest OpenBSD API which | ||
does not have arc4random_addrandom(). | ||
|
||
--- evutil_rand.c.orig 2013-11-01 18:18:57.000000000 +0000 | ||
--- evutil_rand.c.orig 2016-10-04 19:55:31.000000000 +0000 | ||
+++ evutil_rand.c | ||
@@ -174,7 +174,9 @@ evutil_secure_rng_get_bytes(void *buf, s | ||
@@ -195,8 +195,10 @@ evutil_secure_rng_get_bytes(void *buf, s | ||
void | ||
evutil_secure_rng_add_bytes(const char *buf, size_t n) | ||
{ | ||
+#if !(defined(_EVENT_HAVE_ARC4RANDOM) && defined(__sun)) | ||
+#if !(defined(EVENT__HAVE_ARC4RANDOM) && defined(__sun)) | ||
arc4random_addrandom((unsigned char*)buf, | ||
n>(size_t)INT_MAX ? INT_MAX : (int)n); | ||
+#endif | ||
} | ||
|
||
void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
$NetBSD: patch-http.c,v 1.1 2017/09/26 17:57:36 gson Exp $ | ||
|
||
Do not crash when evhttp_send_reply_start() is called after | ||
a timeout. Fixes https://github.com/libevent/libevent/issues/509. | ||
|
||
--- http.c.orig 2016-12-18 21:56:34.000000000 +0000 | ||
+++ http.c | ||
@@ -2820,6 +2820,10 @@ evhttp_send_reply_start(struct evhttp_re | ||
const char *reason) | ||
{ | ||
evhttp_response_code_(req, code, reason); | ||
+ | ||
+ if (req->evcon == NULL) | ||
+ return; | ||
+ | ||
if (evhttp_find_header(req->output_headers, "Content-Length") == NULL && | ||
REQ_VERSION_ATLEAST(req, 1, 1) && | ||
evhttp_response_needs_body(req)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
$NetBSD: patch-signal.c,v 1.1 2017/09/23 03:24:55 maya Exp $ | ||
|
||
Provide a fallback definition of SA_RESTART for QNX 6.5 | ||
|
||
--- signal.c.orig 2016-10-04 19:55:31.000000000 +0000 | ||
+++ signal.c | ||
@@ -88,6 +88,10 @@ | ||
#define __cdecl | ||
#endif | ||
|
||
+#ifndef SA_RESTART /* Absent in QNX 6.5 */ | ||
+#define SA_RESTART 0 | ||
+#endif | ||
+ | ||
static int evsig_add(struct event_base *, evutil_socket_t, short, short, void *); | ||
static int evsig_del(struct event_base *, evutil_socket_t, short, short, void *); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$NetBSD: patch-test_bench__cascade.c,v 1.1 2017/09/22 02:58:50 maya Exp $ | ||
|
||
Remove redundant include (absent in QNX 6.5) | ||
|
||
--- test/bench_cascade.c.orig 2016-10-04 19:55:31.000000000 +0000 | ||
+++ test/bench_cascade.c | ||
@@ -48,7 +48,6 @@ | ||
#include <unistd.h> | ||
#endif | ||
#include <errno.h> | ||
-#include <getopt.h> | ||
#include <event.h> | ||
#include <evutil.h> | ||
|