Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Feb 2012 18:11:21 +0100 (CET)
From:      Martin Matuska <mm@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        chifeng@gmail.com
Subject:   ports/165103: [PATCH] mail/sqlgrey: update
Message-ID:  <20120213171121.6363110F21@neo.vx.sk>
Resent-Message-ID: <201202131720.q1DHKAkC039750@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         165103
>Category:       ports
>Synopsis:       [PATCH] mail/sqlgrey: update
>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:   Mon Feb 13 17:20:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Martin Matuska
>Release:        FreeBSD 9.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD neo.vx.sk 9.0-STABLE FreeBSD 9.0-STABLE #14 r231187M: Wed Feb  8 08:19:42
>Description:
Update to 1.8.0
Use UIDs/GIDs infrastructure (uid/gid 226)
Use pidfile command line argument in rc script

As I am now a developer of sqlgrey, I would like to
take over maintainership of this port.

Port maintainer (chifeng@gmail.com) is cc'd.

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

--- sqlgrey-1.8.0.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/mail/sqlgrey/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- Makefile	3 Jun 2011 11:25:11 -0000	1.19
+++ Makefile	13 Feb 2012 17:08:54 -0000
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	sqlgrey
-DISTVERSION=	1.8.0-rc2
+PORTVERSION=	1.8.0
 CATEGORIES=	mail
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-1.8%20%28stable%29
 
@@ -22,12 +22,12 @@
 NO_BUILD=	yes
 
 ETCFILES=	clients_fqdn_whitelist clients_ip_whitelist dyn_fqdn.regexp smtp_server.regexp sqlgrey.conf
-SGY_USERNAME?=	sqlgrey
-SGY_GROUPNAME?=	${SGY_USERNAME}
+USERS=		sqlgrey
+GROUPS=		${USERS}
 ETCDIR?=	etc/sqlgrey
 
 SUB_FILES=	pkg-install
-MY_SUB_LIST=	ETCDIR=${ETCDIR} ETCFILES="${ETCFILES}" USER=${SGY_USERNAME} GROUP=${SGY_GROUPNAME} PERL=${PERL}
+MY_SUB_LIST=	ETCDIR=${ETCDIR} ETCFILES="${ETCFILES}" USER=${USERS} GROUP=${GROUPS} PERL=${PERL}
 SUB_LIST+=	${MY_SUB_LIST}
 PLIST_SUB=	TOUCH=${TOUCH} ${MY_SUB_LIST}
 
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/mail/sqlgrey/distinfo,v
retrieving revision 1.9
diff -u -r1.9 distinfo
--- distinfo	3 Jun 2011 11:25:11 -0000	1.9
+++ distinfo	13 Feb 2012 17:08:54 -0000
@@ -1,2 +1,2 @@
-SHA256 (sqlgrey-1.8.0-rc2.tar.gz) = c109aab28c9dcf798beb708d1efa37facfb3dfacd0f15fa87b5f6c1f023d2068
-SIZE (sqlgrey-1.8.0-rc2.tar.gz) = 68821
+SHA256 (sqlgrey-1.8.0.tar.gz) = 94e0fa191b30d672b748e934728ca73383bf9b36e4b17618b01adaaba40280e2
+SIZE (sqlgrey-1.8.0.tar.gz) = 69476
Index: files/pkg-install.in
===================================================================
RCS file: /home/pcvs/ports/mail/sqlgrey/files/pkg-install.in,v
retrieving revision 1.2
diff -u -r1.2 pkg-install.in
--- files/pkg-install.in	6 Nov 2006 19:46:25 -0000	1.2
+++ files/pkg-install.in	13 Feb 2012 17:08:54 -0000
@@ -15,23 +15,6 @@
 	    exit 1
 	fi
 
-	# Create group if required
-	if /usr/sbin/pw group show "%%GROUP%%" >/dev/null 2>&1; then
-	    echo "---> Using existing group \"%%GROUP%%\""
-	else
-	    echo "---> Adding group \"%%GROUP%%\""
-	    /usr/sbin/pw groupadd %%GROUP%% || exit 1
-	fi
-
-	# Create user if required
-	if /usr/sbin/pw user show "%%USER%%" >/dev/null 2>&1; then
-	    echo "---> Using existing user \"%%USER%%\""
-	else
-	    echo "---> Adding user \"%%USER%%\""
-	    /usr/sbin/pw useradd "%%USER%%" -g "%%GROUP%%" -h - \
-	    -d "%%DATADIR%%" -s "/sbin/nologin" -c "Sqlgrey Owner" || exit 1
-	fi
-
 	# Create home directory if required
 	if [ -d "%%DATADIR%%" ]; then
 	    echo "---> Using existing Sqlgrey database directory (%%DATADIR%%)"
@@ -47,14 +30,8 @@
 
     POST-DEINSTALL)
 
-	echo "---> Please, remember to remove the user and the group with :"
-	if /usr/sbin/pw user show "%%USER%%" >/dev/null 2>&1; then
-	    echo "       /usr/sbin/pw userdel -n %%USER%%"
-	fi
-	if /usr/sbin/pw group show "%%GROUP%%" >/dev/null 2>&1; then
-	    echo "       /usr/sbin/pw groupdel -n %%GROUP%%"
-	fi
-	echo "     as well as the databases."
+	echo "---> Please, remember to remove the database directory:"
+	echo "     %%DATADIR%%"
 	echo "     If you're only updating, you can leave the things as they are."
     ;;
 
Index: files/sqlgrey.in
===================================================================
RCS file: /home/pcvs/ports/mail/sqlgrey/files/sqlgrey.in,v
retrieving revision 1.3
diff -u -r1.3 sqlgrey.in
--- files/sqlgrey.in	14 Jan 2012 08:56:05 -0000	1.3
+++ files/sqlgrey.in	13 Feb 2012 17:08:54 -0000
@@ -24,16 +24,17 @@
 
 stop_postcmd=${name}_poststop
 
-sqlgrey_poststop()
-{
-	rm -f $pidfile
-}
-
 load_rc_config $name
 
 sqlgrey_enable=${sqlgrey_enable-"NO"}
 required_files=${sqlgrey_config-"%%PREFIX%%/%%ETCDIR%%/sqlgrey.conf"}
+pidfile=${sqlgrey_pidfile-"/var/run/sqlgrey.pid"}
 
-command_args="--configfile=${required_files} --daemonize"
+command_args="--configfile=${required_files} --pidfile=${pidfile} --daemonize"
+
+sqlgrey_poststop()
+{
+	rm -f $pidfile
+}
 
 run_rc_command "$1"
Index: ports/UIDs
===================================================================
RCS file: /home/pcvs/ports/UIDs,v
retrieving revision 1.185
diff -u -r1.185 UIDs
--- ports/UIDs	2 Feb 2012 13:05:18 -0000	1.185
+++ ports/UIDs	13 Feb 2012 17:08:22 -0000
@@ -116,6 +116,7 @@
 drizzle:*:213:213::0:0:Drizzle daemon:/var/db/drizzle:/usr/sbin/nologin
 bs:*:220:220::0:0:Big Sister:/usr/local/bigsister:/bin/sh
 postgrey:*:225:225::0:0:Postgrey Owner:/nonexistent:/usr/sbin/nologin
+sqlgrey:*:226:226::0:0:SQLgrey Owner:/nonexistent:/usr/sbin/nologin
 aprsd:*:240:240::0:0:aprsd:/nonexistent:/bin/sh
 tnc:*:241:241::0:0:aprsd:/nonexistent:/bin/sh
 prosody:*:242:242::0:0:Prosody Jabber Server:/nonexistent:/usr/sbin/nologin
Index: ports/GIDs
===================================================================
RCS file: /home/pcvs/ports/GIDs,v
retrieving revision 1.163
diff -u -r1.163 GIDs
--- ports/GIDs	12 Jan 2012 13:14:44 -0000	1.163
+++ ports/GIDs	13 Feb 2012 17:08:22 -0000
@@ -109,6 +109,7 @@
 drizzle:*:213:
 bs:*:220:
 postgrey:*:225:
+sqlgrey:*:226:
 kismet:*:229:
 aprsd:*:240:
 tnc:*:241:
--- sqlgrey-1.8.0.patch ends here ---

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120213171121.6363110F21>