ports/157702: [PATCH] databases/pgbouncer: update to 1.4.1

Martin Matuska mm at FreeBSD.org
Wed Jun 8 11:30:12 UTC 2011


>Number:         157702
>Category:       ports
>Synopsis:       [PATCH] databases/pgbouncer: update to 1.4.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 08 11:30:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Martin Matuska
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD neo.vx.sk 8.2-STABLE FreeBSD 8.2-STABLE #2 r222851M: Wed Jun  8 07:24:58
>Description:
- Update to 1.4.1
- Use USERS= and GROUPS=
- Fix some messages

Removed file(s):
- files/patch-lib-usual-endian.h

Port maintainer (skv at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- pgbouncer-1.4.1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/databases/pgbouncer/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- Makefile	15 Jan 2011 00:06:46 -0000	1.13
+++ Makefile	8 Jun 2011 11:21:18 -0000
@@ -6,9 +6,9 @@
 #
 
 PORTNAME=	pgbouncer
-PORTVERSION=	1.4
+PORTVERSION=	1.4.1
 CATEGORIES=	databases
-MASTER_SITES=	http://pgfoundry.org/frs/download.php/2912/
+MASTER_SITES=	http://pgfoundry.org/frs/download.php/2987/
 
 MAINTAINER=	skv at FreeBSD.org
 COMMENT=	Lightweight connection pooler for PostgreSQL
@@ -17,6 +17,9 @@
 
 PORTSCOUT=	site:http://pgfoundry.org/frs/?group_id=1000258
 
+USERS=		pgbouncer
+GROUPS=		pgbouncer
+
 USE_RC_SUBR=	pgbouncer.sh
 SUB_FILES=	pkg-message pkg-install pkg-deinstall
 
@@ -29,6 +32,8 @@
 .endif
 
 CONFIGURE_ARGS=	--with-libevent=${LOCALBASE}
+CONFIGURE_ENV+=	PTHREAD_CFLAGS=${PTHREAD_CFLAGS} \
+		PTHREAD_LIBS=${PTHREAD_LIBS}
 
 PKGINSTALL=	${WRKDIR}/pkg-install
 PKGDEINSTALL=	${WRKDIR}/pkg-deinstall
@@ -44,28 +49,8 @@
 
 .include <bsd.port.pre.mk>
 
-# Parse ${PORTSDIR}/UIDs and GIDs for the defaults
-USER!=	${GREP} -E '^${PGBOUNCER_USER}:' ${PORTSDIR}/UIDs | \
-		${SED} -Ee 's/^([^:]*):([^:]*):([^:]*):([^:]*)::0:0:([^:]*):([^:]*):([^:]*)$$/USER="\1" UID="\3" GECOS="\5" HOME="\6" SHELL="\7"/'
-GROUP!=	${GREP} -E '^${PGBOUNCER_GROUP}:' ${PORTSDIR}/GIDs | \
-		${SED} -Ee 's/^([^:]*):([^:]*):([^:]*):$$/GROUP="\1" GID="\3"/'
-
-# Apply the defaults where necessary
-PGBOUNCER_USER?=	${USER:MUSER*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-PGBOUNCER_UID?=		${USER:MUID*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-PGBOUNCER_GECOS?=	${USER:MGECOS*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-PGBOUNCER_HOME?=	${USER:MHOME*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-PGBOUNCER_SHELL?=	${USER:MSHELL*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-PGBOUNCER_GROUP?=	${GROUP:MGROUP*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-PGBOUNCER_GID?=		${GROUP:MGID*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-
-SUB_LIST+=	PGBOUNCER_USER="${PGBOUNCER_USER}" \
-		PGBOUNCER_UID="${PGBOUNCER_UID}" \
-		PGBOUNCER_GECOS="${PGBOUNCER_GECOS}" \
-		PGBOUNCER_HOME="${PGBOUNCER_HOME}" \
-		PGBOUNCER_SHELL="${PGBOUNCER_SHELL}" \
-		PGBOUNCER_GROUP="${PGBOUNCER_GROUP}" \
-		PGBOUNCER_GID="${PGBOUNCER_GID}" \
+SUB_LIST+=	PGBOUNCER_USER="${USERS}" \
+		PGBOUNCER_GROUP="${GROUPS}" \
 		PGBOUNCER_LOGDIR="${PGBOUNCER_LOGDIR}" \
 		PGBOUNCER_RUNDIR="${PGBOUNCER_RUNDIR}" \
 		CHMOD="${CHMOD}" CHOWN="${CHOWN}" MKDIR="${MKDIR}" PW="${PW}"
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/databases/pgbouncer/distinfo,v
retrieving revision 1.9
diff -u -r1.9 distinfo
--- distinfo	15 Jan 2011 00:06:46 -0000	1.9
+++ distinfo	8 Jun 2011 11:21:18 -0000
@@ -1,2 +1,2 @@
-SHA256 (pgbouncer-1.4.tar.gz) = e94a8e7edd6de4ae6978e8f485bbc6a610195b56b1f5fe95a49bfd70959628fb
-SIZE (pgbouncer-1.4.tar.gz) = 231691
+SHA256 (pgbouncer-1.4.1.tar.gz) = 24cd8fdeb6725bec260e5efbd21ba1e0a3f14b741b7003285760d178d6505672
+SIZE (pgbouncer-1.4.1.tar.gz) = 282728
Index: files/patch-lib-usual-endian.h
===================================================================
RCS file: files/patch-lib-usual-endian.h
diff -N files/patch-lib-usual-endian.h
--- files/patch-lib-usual-endian.h	15 Jan 2011 00:06:46 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
---- lib/usual/endian.h.orig	2010-12-14 07:35:50.000000000 +0100
-+++ lib/usual/endian.h	2011-01-12 16:01:08.148625395 +0100
-@@ -157,6 +157,7 @@
- /*
-  * Read LE/BE values from memory.
-  */
-+#ifndef __FreeBSD__
- 
- #define _DEC(name, typ, decode) \
- static inline typ name(const void *p) { \
-@@ -173,10 +174,14 @@
- _DEC(le64dec, uint64_t, le64toh)
- #undef _DEC
- 
-+#endif
-+
- /*
-  * Write LE/BE values to memory.
-  */
- 
-+#ifndef __FreeBSD__
-+
- #define _ENC(name, typ, encode) \
- static inline void name(void *p, typ val) { \
- 	typ tmp = encode(val); \
-@@ -190,4 +195,6 @@
- _ENC(le64enc, uint64_t, htole64)
- #undef _ENC
- 
-+#endif
-+
- #endif	/* _USUAL_ENDIAN_H_ */
Index: files/pkg-deinstall.in
===================================================================
RCS file: /home/pcvs/ports/databases/pgbouncer/files/pkg-deinstall.in,v
retrieving revision 1.1
diff -u -r1.1 pkg-deinstall.in
--- files/pkg-deinstall.in	11 Aug 2008 20:09:15 -0000	1.1
+++ files/pkg-deinstall.in	8 Jun 2011 11:21:18 -0000
@@ -13,18 +13,9 @@
 
 PW="%%PW%%"
 
-if ${PW} usershow "${pgbouncer_user}" 2>/dev/null 1>&2; then
-	echo "To delete ${pgbouncer_user} user permanently, use the following command:"
-	echo "${PW} userdel \"${pgbouncer_user}\""
-fi
-if ${PW} groupshow "${pgbouncer_group}" 2>/dev/null 1>&2; then
-	echo "To delete ${pgbouncer_group} group permanently, use the following command:"
-	echo "${PW} groupdel \"${pgbouncer_group}\""
-fi
 for DIR in ${PGBOUNCER_RUNDIR} ${PGBOUNCER_LOGDIR}; do
 	if test -d "${DIR}"; then
-		echo "You may want to remove the no longer required directory:"
-		echo "${DIR}"
+		echo "==> You should manually remove the directory: ${DIR}"
 	fi
 done
 exit 0
Index: files/pkg-install.in
===================================================================
RCS file: /home/pcvs/ports/databases/pgbouncer/files/pkg-install.in,v
retrieving revision 1.1
diff -u -r1.1 pkg-install.in
--- files/pkg-install.in	11 Aug 2008 20:09:15 -0000	1.1
+++ files/pkg-install.in	8 Jun 2011 11:21:18 -0000
@@ -1,17 +1,12 @@
 #! /bin/sh
-# $FreeBSD#
+# $FreeBSD$
 
 if [ "$2" != "POST-INSTALL" ]; then
         exit 0
 fi
 
 pgbouncer_user="%%PGBOUNCER_USER%%"
-pgbouncer_uid="%%PGBOUNCER_UID%%"
 pgbouncer_group="%%PGBOUNCER_GROUP%%"
-pgbouncer_gid="%%PGBOUNCER_GID%%"
-pgbouncer_gecos="%%PGBOUNCER_GECOS%%"
-pgbouncer_home="%%PGBOUNCER_HOME%%"
-pgbouncer_shell="%%PGBOUNCER_SHELL%%"
 
 PGBOUNCER_RUNDIR="%%PGBOUNCER_RUNDIR%%"
 PGBOUNCER_LOGDIR="%%PGBOUNCER_LOGDIR%%"
@@ -21,78 +16,11 @@
 MKDIR="%%MKDIR%%"
 PW=%%PW%%
 
-create_group() {
-    local group gid
-
-    group=$1
-    gid=$2
-
-
-    if ${PW} group show -n $group >/dev/null 2>&1 ; then
-        echo "===> Using existing group $group"
-    else
-        if ${PW} groupadd -n $group -g $gid ; then
-            echo "===> Created group $group"
-        else
-            cat <<-EOERRORMSG
-*** Failed to create group $group.
-
-Please add user $user and group $group
-manually with the following commands:
-
-    ${PW} groupadd -n $group -g $gid
-    ${PW} useradd -n $user -u $uid -g $group -c "$gecos" \\
-        -d $home -s $shell -h -
-
-and retry installing this package.
-EOERRORMSG
-            exit 1
-        fi
-    fi
-
-}
-
-
-create_user() {
-    local user uid group gecos home shell
-
-    user=$1
-    uid=$2
-    group=$3
-    gecos=$4
-    home=$5
-    shell=$6
-
-    if ${PW} user show -n $user >/dev/null 2>&1 ; then
-        echo "===> Using existing user $user"
-    else
-        if ${PW} useradd -n $user -u $uid -g $group -c "$gecos" \
-            -d "$home" -s "$shell" -h - ; then
-            echo "===> Created user $user"
-        else
-            cat <<-EOERRORMSG
-*** Failed to create user $user.
-
-Please add user $user manually with the following command:
-
-    ${PW} useradd -n $user -u $uid -g $group -c "$gecos" \\
-       -d $home -s $shell -h -
-
-and retry installing this package.
-EOERRORMSG
-            exit 1
-        fi
-    fi
-}
-
-create_group $pgbouncer_group $pgbouncer_gid
-create_user  $pgbouncer_user $pgbouncer_uid $pgbouncer_group \
-    "$pgbouncer_gecos" "$pgbouncer_home" "$pgbouncer_shell"
 for DIR in ${PGBOUNCER_RUNDIR} ${PGBOUNCER_LOGDIR}; do
-		echo "===> Creating directory ${DIR}"
+		echo "==> Creating directory ${DIR}"
  		${MKDIR} ${DIR}
-		echo "===> Changing ownership of ${DIR}"
+		echo "==> Changing ownership of ${DIR}"
 		${CHOWN} -R ${pgbouncer_user}:${pgbouncer_group} ${DIR}
-		echo "===> Changing permissions of ${DIR}"
+		echo "==> Changing permissions of ${DIR}"
 		${CHMOD} -R 770 ${DIR}
 done
--- pgbouncer-1.4.1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list