Date: Tue, 24 Jan 2012 11:24:34 GMT From: "Mikhail T." <m.tsatsenko@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/164442: [maintainer] [patch] databases/memcacheq: some small fixes Message-ID: <201201241124.q0OBOYb4022454@red.freebsd.org> Resent-Message-ID: <201201241130.q0OBU91R072383@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 164442 >Category: ports >Synopsis: [maintainer] [patch] databases/memcacheq: some small fixes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jan 24 11:30:09 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Mikhail T. >Release: 9.0 >Organization: >Environment: >Description: - Integrate a upstream patch to fix lock bug when creating queue and switch to DB5 - Add a patch to fix configure to proper handling of --enable-threads - Add LICENSE - Bump PORTREVISION >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/databases/memcacheq/Makefile,v retrieving revision 1.4 diff -u -r1.4 Makefile --- Makefile 19 Nov 2011 15:44:00 -0000 1.4 +++ Makefile 24 Jan 2012 11:22:43 -0000 @@ -7,7 +7,7 @@ PORTNAME= memcacheq PORTVERSION= 0.2.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} \ ${MASTER_SITE_GENTOO} @@ -16,6 +16,8 @@ MAINTAINER= m.tsatsenko@gmail.com COMMENT= Simple queue service over Memcache +LICENSE= BSD + LIB_DEPENDS= event-1.4:${PORTSDIR}/devel/libevent USE_CSTD= gnu89 @@ -23,7 +25,7 @@ LDFLAGS+= -l"${BDB_LIB_NAME}" -L"${LOCALBASE}/lib" USE_RC_SUBR= memcacheq -USE_BDB= 47+ +USE_BDB= 5 GNU_CONFIGURE= YES CONFIGURE_ARGS= --with-libevent=${LOCALBASE} --with-bdb=${LOCALBASE} --enable-threads cvs diff: Diffing files Index: files/patch-bdb.c =================================================================== RCS file: files/patch-bdb.c diff -N files/patch-bdb.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-bdb.c 24 Jan 2012 11:22:43 -0000 @@ -0,0 +1,41 @@ +--- bdb.c.orig 2012-01-24 14:49:12.248201883 +0400 ++++ bdb.c 2012-01-24 14:50:35.801194396 +0400 +@@ -264,8 +264,6 @@ + } + + int bdb_create_queue(char *queue_name) { +- pthread_rwlock_wrlock(&qlist_ht_lock); +- + char *k = strdup(queue_name); + assert(k != NULL); + queue_t *q = (queue_t *)calloc(1, sizeof(queue_t)); +@@ -309,14 +307,12 @@ + CHECK_DB_RET(ret); + int result = hashtable_insert(qlist_htp, (void *)k, (void *)q); + assert(result != 0); +- pthread_rwlock_unlock(&qlist_ht_lock); + return 0; + dberr: + if (txnp != NULL){ + txnp->abort(txnp); + } + fprintf(stderr, "bdb_create_queue: %s %s\n", queue_name, db_strerror(ret)); +- pthread_rwlock_unlock(&qlist_ht_lock); + return -1; + } + +@@ -554,12 +550,13 @@ + + if (NULL == q) { + pthread_rwlock_unlock(&qlist_ht_lock); ++ /* switch to write lock */ ++ pthread_rwlock_wrlock(&qlist_ht_lock); + ret = bdb_create_queue(key); + if (0 != ret){ + return -1; + } + /* search again */ +- pthread_rwlock_rdlock(&qlist_ht_lock); + q = (queue_t *)hashtable_search(qlist_htp, (void *)key); + } + Index: files/patch-configure =================================================================== RCS file: files/patch-configure diff -N files/patch-configure --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-configure 24 Jan 2012 11:22:43 -0000 @@ -0,0 +1,11 @@ +--- configure.orig 2011-10-14 14:34:47.367393592 +0400 ++++ configure 2011-10-14 14:34:57.769420421 +0400 +@@ -5505,7 +5505,7 @@ + enableval=$enable_threads; + fi + +-if test "x$enable_threads" == "xyes"; then ++if test "x$enable_threads" = "xyes"; then + { echo "$as_me:$LINENO: checking for library containing pthread_create" >&5 + echo $ECHO_N "checking for library containing pthread_create... $ECHO_C" >&6; } + if test "${ac_cv_search_pthread_create+set}" = set; then >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201241124.q0OBOYb4022454>