[csw-devel] SF.net SVN: gar:[15029] csw/mgar/pkg/libevent/branches/libevent-2.0.x

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Sun Jul 10 11:51:57 CEST 2011


Revision: 15029
          http://gar.svn.sourceforge.net/gar/?rev=15029&view=rev
Author:   dmichelsen
Date:     2011-07-10 09:51:57 +0000 (Sun, 10 Jul 2011)

Log Message:
-----------
libevent2: Update to 2.0.12

Modified Paths:
--------------
    csw/mgar/pkg/libevent/branches/libevent-2.0.x/Makefile
    csw/mgar/pkg/libevent/branches/libevent-2.0.x/checksums

Added Paths:
-----------
    csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Fix-wrong-check-of-sockaddr.patch

Removed Paths:
-------------
    csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Detect-broken-unsetenv-at-unit-test-runtime.patch
    csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Detect-setenv-unsetenv-skip-main-base_environ-test.patch
    csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Fix-getaddrinfo-with-protocol-unset-on-Solaris-9.patch

Modified: csw/mgar/pkg/libevent/branches/libevent-2.0.x/Makefile
===================================================================
--- csw/mgar/pkg/libevent/branches/libevent-2.0.x/Makefile	2011-07-09 16:25:10 UTC (rev 15028)
+++ csw/mgar/pkg/libevent/branches/libevent-2.0.x/Makefile	2011-07-10 09:51:57 UTC (rev 15029)
@@ -1,5 +1,5 @@
 NAME = libevent
-VERSION = 2.0.10
+VERSION = 2.0.12
 CATEGORIES = lib
 
 DESCRIPTION = Event notification library
@@ -14,41 +14,36 @@
 DISTNAME = $(NAME)-$(VERSION)-stable
 DISTFILES += $(DISTNAME).tar.gz
 
-# We define upstream file regex so we can be notifed of new upstream software release
-UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*)-stable.tar.gz
+# Use this patch until bug is fixed:
+#   http://sourceforge.net/tracker/?func=detail&aid=3361614&group_id=50884&atid=461322
+PATCHFILES += 0001-Fix-wrong-check-of-sockaddr.patch
 
+VENDOR_URL = http://www.monkey.org/~provos/libevent/
+LICENSE = LICENSE
+
+BUILD_DEP_PKGS += CSWossldevel
+
 PACKAGES += CSWlibevent2-0-5
-CATALOGNAME_CSWlibevent2-0-5 = libevent2_0_5
 SPKG_DESC_CSWlibevent2-0-5 = Event notification library 2.0, libevent*-2.0.so.5
+PKGFILES_CSWlibevent2-0-5 = $(PKGFILES_RT)
 RUNTIME_DEP_PKGS_CSWlibevent2-0-5 += CSWosslrt
 
+PACKAGES += CSWlibevent-dev
+SPKG_DESC_CSWlibevent-dev = Development files for libevent*-2.0.so.5
+RUNTIME_DEP_PKGS_CSWlibevent-dev += CSWlibevent2-0-5
+RUNTIME_DEP_PKGS_CSWlibevent-dev += CSWpython
+OBSOLETED_BY_CSWlibevent-dev += CSWlibevent-devel
 
-PACKAGES += CSWlibevent-devel
-CATALOGNAME_CSWlibevent-devel = libevent_devel
-SPKG_DESC_CSWlibevent-devel = Development files for libevent 2.0
-RUNTIME_DEP_PKGS_CSWlibevent-devel += CSWlibevent2-0-5
-RUNTIME_DEP_PKGS_CSWlibevent-devel += CSWpython
-
-VENDOR_URL = http://www.monkey.org/~provos/libevent/
-LICENSE = LICENSE
-
 # We don't need it and if defined the test breaks
 NOISALIST = 1
 LD_OPTIONS =
 EXTRA_LINKER_FLAGS = $(RUNPATH_LINKER_FLAGS)
 
 BUILD64 = 1
-NOISAEXEC = 1
-CONFIGURE_ARGS  = $(DIRPATHS) 
 
 TEST_TARGET = verify
 
-PKGFILES_CSWlibevent2-0-5 = $(PKGFILES_RT)
-
-# These will go away after package release as the files have been moved from CSWlibevent to *-devel
-CHECKPKG_OVERRIDES_CSWlibevent-devel += file-collision
-
-# The package name guessing has a bug, overwrite for now.
+# This is a unified package with all libraries in there
 CHECKPKG_OVERRIDES_CSWlibevent2-0-5 += shared-lib-pkgname-mismatch
 
 include gar/category.mk

Modified: csw/mgar/pkg/libevent/branches/libevent-2.0.x/checksums
===================================================================
--- csw/mgar/pkg/libevent/branches/libevent-2.0.x/checksums	2011-07-09 16:25:10 UTC (rev 15028)
+++ csw/mgar/pkg/libevent/branches/libevent-2.0.x/checksums	2011-07-10 09:51:57 UTC (rev 15029)
@@ -1 +1 @@
-a37401d26cbbf28185211d582741a3d4  libevent-2.0.10-stable.tar.gz
+42986228baf95e325778ed328a93e070  libevent-2.0.12-stable.tar.gz

Deleted: csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Detect-broken-unsetenv-at-unit-test-runtime.patch
===================================================================
--- csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Detect-broken-unsetenv-at-unit-test-runtime.patch	2011-07-09 16:25:10 UTC (rev 15028)
+++ csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Detect-broken-unsetenv-at-unit-test-runtime.patch	2011-07-10 09:51:57 UTC (rev 15029)
@@ -1,37 +0,0 @@
-From 3a003733e6c8081c07fec51a77f65d3d5d8a1094 Mon Sep 17 00:00:00 2001
-From: Nick Mathewson <nickm at torproject.org>
-Date: Wed, 21 Apr 2010 12:25:29 -0400
-Subject: [PATCH] Detect broken unsetenv at unit-test runtime
-
-If we have an unsetenv function that doesn't work, we can't run the
-main/base_environ unit test, so we should skip it.
----
- test/regress.c |   12 ++++++++++++
- 1 files changed, 12 insertions(+), 0 deletions(-)
-
-diff --git a/test/regress.c b/test/regress.c
-index 513c3c8..cda0892 100644
---- a/test/regress.c
-+++ b/test/regress.c
-@@ -1830,6 +1830,18 @@ test_base_environ(void *arg)
- 	int i, n_methods=0;
- 	const char *defaultname;
- 
-+	/* See if unsetenv works before we rely on it. */
-+	setenv("EVENT_NOWAFFLES", "1", 1);
-+	unsetenv("EVENT_NOWAFFLES");
-+	if (getenv("EVENT_NOWAFFLES") != NULL) {
-+#ifndef _EVENT_HAVE_UNSETENV
-+		TT_DECLARE("NOTE", ("Can't fake unsetenv; skipping test"));
-+#else
-+		TT_DECLARE("NOTE", ("unsetenv doesn't work; skipping test"));
-+#endif
-+		tt_skip();
-+	}
-+
- 	basenames = event_get_supported_methods();
- 	for (i = 0; basenames[i]; ++i) {
- 		methodname_to_envvar(basenames[i], varbuf, sizeof(varbuf));
--- 
-1.6.6.1
-

Deleted: csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Detect-setenv-unsetenv-skip-main-base_environ-test.patch
===================================================================
--- csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Detect-setenv-unsetenv-skip-main-base_environ-test.patch	2011-07-09 16:25:10 UTC (rev 15028)
+++ csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Detect-setenv-unsetenv-skip-main-base_environ-test.patch	2011-07-10 09:51:57 UTC (rev 15029)
@@ -1,120 +0,0 @@
-From b76470ed69b4b7875d5f764cc0f0d0577ef8b21f Mon Sep 17 00:00:00 2001
-From: Nick Mathewson <nickm at torproject.org>
-Date: Tue, 29 Dec 2009 16:38:03 -0500
-Subject: [PATCH] Detect setenv/unsetenv; skip main/base_environ test if we can't fake them.
-
-Previously, we assumed that we would have setenv/unsetenv everywhere
-but WIN32, where we could fake them with putenv.  This isn't so: some
-other non-windows systems lack setenv/unsetenv, and some of them lack
-putenv too.
-
-The first part of the solution, then, is to detect setenv/unsetenv/
-putenv from configure.in, and to fake setenv/unsetenv with putenv
-whenever we have the latter but not one of the former.
-
-But what should we do when we don't even have putenv?  We could do
-elaborate tricks to manipulate the environ pointer, but since we're
-only doing this for the unit tests, let's just skip the one test in
-question that uses setenv/unsetenv.
----
- configure.in   |    3 +--
- test/regress.c |   42 +++++++++++++++++++++++++++++-------------
- 2 files changed, 30 insertions(+), 15 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 67f0816..76bf85b 100644
---- a/configure.in
-+++ b/configure.in
-@@ -180,8 +180,7 @@ AC_C_INLINE
- AC_HEADER_TIME
- 
- dnl Checks for library functions.
--AC_CHECK_FUNCS(gettimeofday vasprintf fcntl clock_gettime strtok_r strsep getaddrinfo getnameinfo strlcpy inet_ntop inet_pton signal sigaction strtoll inet_aton pipe eventfd sendfile mmap splice arc4random issetugid geteuid getegid getservbyname getprotobynumber)
--
-+AC_CHECK_FUNCS(gettimeofday vasprintf fcntl clock_gettime strtok_r strsep getaddrinfo getnameinfo strlcpy inet_ntop inet_pton signal sigaction strtoll inet_aton pipe eventfd sendfile mmap splice arc4random issetugid geteuid getegid getservbyname getprotobynumber setenv unsetenv putenv)
- 
- # Check for gethostbyname_r in all its glorious incompatible versions.
- #   (This is cut-and-pasted from Tor, which based its logic on
-diff --git a/test/regress.c b/test/regress.c
-index 4e4e11b..f34890a 100644
---- a/test/regress.c
-+++ b/test/regress.c
-@@ -1683,39 +1683,52 @@ end:
- 		event_config_free(cfg);
- }
- 
--static void
--methodname_to_envvar(const char *mname, char *buf, size_t buflen)
--{
--	char *cp;
--	evutil_snprintf(buf, buflen, "EVENT_NO%s", mname);
--	for (cp = buf; *cp; ++cp) {
--		*cp = toupper(*cp);
--	}
--}
--
--#ifdef WIN32
-+#ifdef _EVENT_HAVE_SETENV
-+#define SETENV_OK
-+#elif !defined(_EVENT_HAVE_SETENV) && defined(_EVENT_HAVE_PUTENV)
- static void setenv(const char *k, const char *v, int _o)
- {
- 	char b[256];
- 	evutil_snprintf(b, sizeof(b), "%s=%s",k,v);
- 	putenv(b);
- }
-+#define SETENV_OK
-+#endif
-+
-+#ifdef _EVENT_HAVE_UNSETENV
-+#define UNSETENV_OK
-+#elif !defined(_EVENT_HAVE_UNSETENV) && defined(_EVENT_HAVE_PUTENV)
- static void unsetenv(const char *k)
- {
- 	char b[256];
- 	evutil_snprintf(b, sizeof(b), "%s=",k);
- 	putenv(b);
- }
-+#define UNSETENV_OK
-+#endif
-+
-+#if defined(SETENV_OK) && defined(UNSETENV_OK)
-+static void
-+methodname_to_envvar(const char *mname, char *buf, size_t buflen)
-+{
-+	char *cp;
-+	evutil_snprintf(buf, buflen, "EVENT_NO%s", mname);
-+	for (cp = buf; *cp; ++cp) {
-+		*cp = toupper(*cp);
-+	}
-+}
- #endif
- 
- static void
- test_base_environ(void *arg)
- {
-+	struct event_base *base = NULL;
-+	struct event_config *cfg = NULL;
-+
-+#if defined(SETENV_OK) && defined(UNSETENV_OK)
- 	const char **basenames;
- 	char varbuf[128];
- 	int i, n_methods=0;
--	struct event_base *base = NULL;
--	struct event_config *cfg = NULL;
- 	const char *defaultname;
- 
- 	basenames = event_get_supported_methods();
-@@ -1757,6 +1770,9 @@ test_base_environ(void *arg)
- 	base = event_base_new_with_config(cfg);
- 	tt_assert(base);
- 	tt_str_op(defaultname, ==, event_base_get_method(base));
-+#else
-+	tt_skip();
-+#endif
- 
- end:
- 	if (base)
--- 
-1.6.0.5
-

Deleted: csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Fix-getaddrinfo-with-protocol-unset-on-Solaris-9.patch
===================================================================
--- csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Fix-getaddrinfo-with-protocol-unset-on-Solaris-9.patch	2011-07-09 16:25:10 UTC (rev 15028)
+++ csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Fix-getaddrinfo-with-protocol-unset-on-Solaris-9.patch	2011-07-10 09:51:57 UTC (rev 15029)
@@ -1,115 +0,0 @@
-From af71b4553549bced3cae1b51cc17c42ce8dc2bb0 Mon Sep 17 00:00:00 2001
-From: Nick Mathewson <nickm at torproject.org>
-Date: Wed, 21 Apr 2010 11:57:55 -0400
-Subject: [PATCH] Fix getaddrinfo with protocol unset on Solaris 9.  Found by Dagobert Michelsen
-
-Apparently when you call Solaris 9's getaddrinfo() with socktype set,
-but protocol unset, it likes to leave ai_protocol unset in the result.
-This is no way to behave, if I'm reading RFC3493 right.
-
-This patch makes us check for a getaddrinfo() that's broken in this way,
-and work around it by trying to infer socktype and protocol from one
-another.
-
-Possible partial bugfix for 2987542
----
- evutil.c |   46 ++++++++++++++++++++++++++++++++++++----------
- 1 files changed, 36 insertions(+), 10 deletions(-)
-
-diff --git a/evutil.c b/evutil.c
-index 2509f17..9d36941 100644
---- a/evutil.c
-+++ b/evutil.c
-@@ -959,6 +959,10 @@ evutil_adjust_hints_for_addrconfig(struct evutil_addrinfo *hints)
- }
- 
- #ifdef USE_NATIVE_GETADDRINFO
-+static int need_numeric_port_hack_=0;
-+static int need_socktype_protocol_hack_=0;
-+static int tested_for_getaddrinfo_hacks=0;
-+
- /* Some older BSDs (like OpenBSD up to 4.6) used to believe that
-    giving a numeric port without giving an ai_socktype was verboten.
-    We test for this so we can apply an appropriate workaround.  If it
-@@ -973,17 +977,17 @@ evutil_adjust_hints_for_addrconfig(struct evutil_addrinfo *hints)
- 
-    We test for this bug at runtime, since otherwise we can't have the
-    same binary run on multiple BSD versions.
-+
-+   - Some versions of Solaris believe that if the protocol field isn't
-+   specified, it's nice to leave it as 0. We test for this so we can apply an
-+   appropriate workaround.
- */
--static int
--need_numeric_port_hack(void)
-+static void
-+test_for_getaddrinfo_hacks(void)
- {
--	static int tested=0;
--	static int need_hack=0;
- 	int r, r2;
- 	struct evutil_addrinfo *ai=NULL, *ai2=NULL;
- 	struct evutil_addrinfo hints;
--	if (tested)
--		return need_hack;
- 
- 	memset(&hints,0,sizeof(hints));
- 	hints.ai_family = PF_UNSPEC;
-@@ -999,21 +1003,40 @@ need_numeric_port_hack(void)
- 	hints.ai_socktype = SOCK_STREAM;
- 	r2 = getaddrinfo("1.2.3.4", "80", &hints, &ai2);
- 	if (r2 == 0 && r != 0) {
--		need_hack=1;
-+		need_numeric_port_hack_=1;
-+	}
-+	if (ai2 && ai2->ai_protocol == 0) {
-+		need_socktype_protocol_hack_=1;
- 	}
-+
- 	if (ai)
- 		freeaddrinfo(ai);
- 	if (ai2)
- 		freeaddrinfo(ai2);
--	tested = 1;
--	return need_hack;
-+	tested_for_getaddrinfo_hacks=1;
-+}
-+
-+static inline int
-+need_numeric_port_hack(void)
-+{
-+	if (!tested_for_getaddrinfo_hacks)
-+		test_for_getaddrinfo_hacks();
-+	return need_numeric_port_hack_;
-+}
-+
-+static inline int
-+need_socktype_protocol_hack(void)
-+{
-+	if (!tested_for_getaddrinfo_hacks)
-+		test_for_getaddrinfo_hacks();
-+	return need_socktype_protocol_hack_;
- }
- 
- static void
- apply_numeric_port_hack(int port, struct evutil_addrinfo **ai)
- {
- 	/* Now we run through the list and set the ports on all of the
--	 * results where ports */
-+	 * results where ports would make sense. */
- 	for ( ; *ai; ai = &(*ai)->ai_next) {
- 		struct sockaddr *sa = (*ai)->ai_addr;
- 		if (sa && sa->sa_family == AF_INET) {
-@@ -1100,6 +1123,9 @@ evutil_getaddrinfo(const char *nodename, const char *servname,
- 		servname = NULL;
- 	}
- 
-+	if (need_socktype_protocol_hack())
-+		evutil_getaddrinfo_infer_protocols(&hints);
-+
- 	/* Make sure that we didn't actually steal any AI_FLAGS values that
- 	 * the system is using.  (This is a constant expression, and should ge
- 	 * optimized out.)
--- 
-1.6.6.1
-

Added: csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Fix-wrong-check-of-sockaddr.patch
===================================================================
--- csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Fix-wrong-check-of-sockaddr.patch	                        (rev 0)
+++ csw/mgar/pkg/libevent/branches/libevent-2.0.x/files/0001-Fix-wrong-check-of-sockaddr.patch	2011-07-10 09:51:57 UTC (rev 15029)
@@ -0,0 +1,25 @@
+From 866fdd0d769e1a6c2187b9bdc94c475e8094b42c Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Sun, 10 Jul 2011 10:40:38 +0200
+Subject: [PATCH] Fix wrong check of sockaddr
+
+---
+ util-internal.h |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/util-internal.h b/util-internal.h
+index fe9ff35..eb22946 100644
+--- a/util-internal.h
++++ b/util-internal.h
+@@ -207,7 +207,7 @@ long _evutil_weakrand(void);
+ #define EVUTIL_FAILURE_CHECK(cond) EVUTIL_UNLIKELY(cond)
+ #endif
+ 
+-#ifndef _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE
++#if 0
+ /* Replacement for sockaddr storage that we can use internally on platforms
+  * that lack it.  It is not space-efficient, but neither is sockaddr_storage.
+  */
+-- 
+1.7.6
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list