From e8fc1a0dcf6901f19f26e5277ed32d626c20cf08 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 30 Jan 2017 20:26:55 +0100 Subject: gnu: libevent: Update to 2.1.8 [security fixes]. * gnu/packages/libevent.scm (libevent): Update to 2.1.8. [inputs]: Change 'python-wrapper' to 'python-2'. Move 'which' to ... [native-inputs]: ... here. New field. (libevent-2.0): New variable. * gnu/packages/patches/libevent-2.1-dns-tests.patch, gnu/packages/patches/libevent-2.0-evdns-fix-remote-stack-overread.patch gnu/packages/patches/libevent-2.0-evdns-fix-searching-empty-hostnames.patch gnu/packages/patches/libevent-2.0-evutil-fix-buffer-overflow.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/gnuzilla.scm (icecat)[inputs]: Change 'libevent' to 'libevent-2.0'. --- gnu/packages/libevent.scm | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'gnu/packages/libevent.scm') diff --git a/gnu/packages/libevent.scm b/gnu/packages/libevent.scm index cb76915ef7..ca59db390c 100644 --- a/gnu/packages/libevent.scm +++ b/gnu/packages/libevent.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2016 David Thompson +;;; Copyright © 2017 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,7 +34,7 @@ (define-public libevent (package (name "libevent") - (version "2.0.22") + (version "2.1.8") (source (origin (method url-fetch) (uri (string-append @@ -41,13 +42,13 @@ version "-stable/libevent-" version "-stable.tar.gz")) (sha256 (base32 - "18qz9qfwrkakmazdlwxvjmw8p76g70n3faikwvdwznns1agw9hki")) - (patches (search-patches "libevent-dns-tests.patch")))) + "1hhxnxlr0fsdv7bdmzsnhdz16fxf3jg2r6vyljcl3kj6pflcap4n")) + (patches (search-patches "libevent-2.1-dns-tests.patch")))) (build-system gnu-build-system) (inputs - `(;; Dependencies used for the tests and for `event_rpcgen.py'. - ("which" ,which) - ("python" ,python-wrapper))) + `(("python" ,python-2))) ; for 'event_rpcgen.py' + (native-inputs + `(("which" ,which))) (home-page "http://libevent.org/") (synopsis "Event notification library") (description @@ -62,6 +63,24 @@ then add or remove events dynamically without having to change the event loop.") (license bsd-3))) +(define-public libevent-2.0 + (package + (inherit libevent) + (version "2.0.22") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/libevent/libevent/releases/download/release-" + version "-stable/libevent-" version "-stable.tar.gz")) + (sha256 + (base32 + "18qz9qfwrkakmazdlwxvjmw8p76g70n3faikwvdwznns1agw9hki")) + (patches (search-patches + "libevent-dns-tests.patch" + "libevent-2.0-evdns-fix-remote-stack-overread.patch" + "libevent-2.0-evutil-fix-buffer-overflow.patch" + "libevent-2.0-evdns-fix-searching-empty-hostnames.patch")))))) + (define-public libev (package (name "libev") -- cgit 1.4.1 From fd05d7ecd9f021b6c52a6d27669188b44305c79d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 1 Feb 2017 18:28:45 +0100 Subject: gnu: libevent: Skip tests that fail on 32bit. * gnu/packages/patches/libevent-2.1-skip-failing-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/libevent.scm (libevent)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/libevent.scm | 5 ++++- .../patches/libevent-2.1-skip-failing-test.patch | 24 ++++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libevent-2.1-skip-failing-test.patch (limited to 'gnu/packages/libevent.scm') diff --git a/gnu/local.mk b/gnu/local.mk index da4dbb0d24..ac167b23fa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -676,6 +676,7 @@ dist_patch_DATA = \ %D%/packages/patches/libevent-2.0-evdns-fix-searching-empty-hostnames.patch \ %D%/packages/patches/libevent-2.0-evutil-fix-buffer-overflow.patch \ %D%/packages/patches/libevent-2.1-dns-tests.patch \ + %D%/packages/patches/libevent-2.1-skip-failing-test.patch \ %D%/packages/patches/libextractor-ffmpeg-3.patch \ %D%/packages/patches/libjxr-fix-function-signature.patch \ %D%/packages/patches/libjxr-fix-typos.patch \ diff --git a/gnu/packages/libevent.scm b/gnu/packages/libevent.scm index ca59db390c..bef09f9538 100644 --- a/gnu/packages/libevent.scm +++ b/gnu/packages/libevent.scm @@ -43,7 +43,10 @@ (sha256 (base32 "1hhxnxlr0fsdv7bdmzsnhdz16fxf3jg2r6vyljcl3kj6pflcap4n")) - (patches (search-patches "libevent-2.1-dns-tests.patch")))) + (patches (search-patches "libevent-2.1-dns-tests.patch" + ;; XXX: Try removing this for > 2.1.8. + ;; https://github.com/libevent/libevent/issues/452 + "libevent-2.1-skip-failing-test.patch")))) (build-system gnu-build-system) (inputs `(("python" ,python-2))) ; for 'event_rpcgen.py' diff --git a/gnu/packages/patches/libevent-2.1-skip-failing-test.patch b/gnu/packages/patches/libevent-2.1-skip-failing-test.patch new file mode 100644 index 0000000000..d9ea1d422d --- /dev/null +++ b/gnu/packages/patches/libevent-2.1-skip-failing-test.patch @@ -0,0 +1,24 @@ +These fail on 32-bit due to an overflow bug in the test program. + +See test/regress_util.c:1448. + +Upstream bug URL: + +https://github.com/libevent/libevent/issues/452 + +diff --git a/test/regress_util.c b/test/regress_util.c +index ef6a1487..4de501fc 100644 +--- a/test/regress_util.c ++++ b/test/regress_util.c +@@ -1413,9 +1413,9 @@ static struct date_rfc1123_case { + { 1323648000, "Mon, 12 Dec 2011 00:00:00 GMT"}, + #ifndef _WIN32 + /** In win32 case we have max "23:59:59 January 18, 2038, UTC" for time32 */ +- { 4294967296, "Sun, 07 Feb 2106 06:28:16 GMT"} /* 2^32 */, ++ //{ 4294967296, "Sun, 07 Feb 2106 06:28:16 GMT"} /* 2^32 */, + /** In win32 case we have max "23:59:59, December 31, 3000, UTC" for time64 */ +- {253402300799, "Fri, 31 Dec 9999 23:59:59 GMT"} /* long long future no one can imagine */, ++ //{253402300799, "Fri, 31 Dec 9999 23:59:59 GMT"} /* long long future no one can imagine */, + { 1456704000, "Mon, 29 Feb 2016 00:00:00 GMT"} /* leap year */, + #endif + { 1435708800, "Wed, 01 Jul 2015 00:00:00 GMT"} /* leap second */, -- cgit 1.4.1