ports/165036: [PATCH] mail/sqlgrey: use UID and GID from ports
Martin Matuska
mm at FreeBSD.org
Sun Feb 12 15:10:04 UTC 2012
>Number: 165036
>Category: ports
>Synopsis: [PATCH] mail/sqlgrey: use UID and GID from ports
>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: Sun Feb 12 15:10:03 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:
Use the UIDs/GIDs framework from ports. Assign default UID/GID 226.
Port maintainer (chifeng at gmail.com) is cc'd.
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- sqlgrey-1.8.0.r2.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 12 Feb 2012 14:49:43 -0000
@@ -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: 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 12 Feb 2012 14:49:43 -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: UIDs
===================================================================
RCS file: /home/pcvs/ports/UIDs,v
retrieving revision 1.185
diff -u -r1.185 UIDs
--- UIDs 2 Feb 2012 13:05:18 -0000 1.185
+++ UIDs 12 Feb 2012 14:51:07 -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: GIDs
===================================================================
RCS file: /home/pcvs/ports/GIDs,v
retrieving revision 1.163
diff -u -r1.163 GIDs
--- GIDs 12 Jan 2012 13:14:44 -0000 1.163
+++ GIDs 12 Feb 2012 14:51:07 -0000
@@ -109,6 +109,7 @@
drizzle:*:213:
bs:*:220:
postgrey:*:225:
+sqlgrey:*:226:
kismet:*:229:
aprsd:*:240:
tnc:*:241:
--- sqlgrey-1.8.0.r2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list