ports/105899: Maintainer Update: ports/dovecot to 1.0.r15
Robin Breathe
robin at isometry.net
Mon Nov 27 00:50:12 UTC 2006
>Number: 105899
>Category: ports
>Synopsis: Maintainer Update: ports/dovecot to 1.0.r15
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 27 00:50:11 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Robin Breathe
>Release: FreeBSD 6.2-RC1 i386
>Organization:
>Environment:
>Description:
Update dovecot to the latest 1.0.rc15 release.
- Full release notes: http://dovecot.org/list/dovecot-news/2006-November/000024.html
- Amongst other things, fix a security bug with mmap_disable=yes (*not* in the default configuration).
- Register UID 143, GID 143 for the dovecot user in ports/UIDs, ports/GIDs; use these and reduce interactive component of install script.
>How-To-Repeat:
>Fix:
Apply the patch below at the base of the ports tree:
--- dovecot-1.0.r15.diff begins here ---
diff -ruN ports.orig/GIDs ports/GIDs
--- ports.orig/GIDs Mon Nov 27 00:12:12 2006
+++ ports/GIDs Mon Nov 27 00:12:44 2006
@@ -53,6 +53,7 @@
vchat:*:128:
_bgpd:*:130:
_ospfd:*:131:
+dovecot:*:143:
rbldns:*:153:
sfs:*:171:
agk:*:172:
diff -ruN ports.orig/UIDs ports/UIDs
--- ports.orig/UIDs Mon Nov 27 00:12:08 2006
+++ ports/UIDs Mon Nov 27 00:14:17 2006
@@ -62,6 +62,7 @@
vchat:*:128:128:VChat Conferencing System:/nonexistent:/sbin/nologin
_bgpd:*:130:130:BGP Daemon:/var/empty:/sbin/nologin
_ospfd:*:131:131:OSPF Daemon:/var/empty:/sbin/nologin
+dovecot:*:143:143:Dovecot User:/var/empty:/sbin/nologin
rbldns:*:153:153:rbldnsd pseudo-user:/nonexistent:/sbin/nologin
sfs:*:171:171:Self-Certifying File System:/nonexistent:/sbin/nologin
agk:*:172:172:AquaGateKeeper:/nonexistent:/nonexistent
diff -ruN ports.orig/mail/dovecot/Makefile ports/mail/dovecot/Makefile
--- ports.orig/mail/dovecot/Makefile Fri Nov 10 20:25:35 2006
+++ ports/mail/dovecot/Makefile Sun Nov 26 22:32:06 2006
@@ -7,7 +7,7 @@
#
PORTNAME= dovecot
-DISTVERSION= 1.0.rc13
+DISTVERSION= 1.0.rc15
CATEGORIES= mail ipv6
MASTER_SITES= http://www.dovecot.org/releases/
diff -ruN ports.orig/mail/dovecot/distinfo ports/mail/dovecot/distinfo
--- ports.orig/mail/dovecot/distinfo Fri Nov 10 20:25:36 2006
+++ ports/mail/dovecot/distinfo Sun Nov 26 22:32:19 2006
@@ -1,3 +1,3 @@
-MD5 (dovecot-1.0.rc13.tar.gz) = 47e86f3ee779e805ffca7b923dc50b19
-SHA256 (dovecot-1.0.rc13.tar.gz) = a653939eae55a6ddea7c97e6ddfcdafdfcbdb56727640d61761fc9bbfca62834
-SIZE (dovecot-1.0.rc13.tar.gz) = 1459922
+MD5 (dovecot-1.0.rc15.tar.gz) = 26f3d2b075856b1b1d180146363819e6
+SHA256 (dovecot-1.0.rc15.tar.gz) = e1e42e5c808301c5a709d54c5949cd8c1d3c43861e4e918548ded5841865487f
+SIZE (dovecot-1.0.rc15.tar.gz) = 1463069
diff -ruN ports.orig/mail/dovecot/pkg-deinstall ports/mail/dovecot/pkg-deinstall
--- ports.orig/mail/dovecot/pkg-deinstall Wed Jul 28 12:18:11 2004
+++ ports/mail/dovecot/pkg-deinstall Mon Nov 27 00:19:03 2006
@@ -29,13 +29,15 @@
}
delete_account() {
- local u
+ local port user uid group gid
- u=$1
- if yesno "Do you want me to remove user \"${u}\"" n; then
- pw userdel -n ${u}
- echo "Done."
- fi
+ port=$1
+ user=${2%:*}
+ uid=${2#*:}
+ group=${3%:*}
+ gid=${3#*:}
+
+ echo "If you do not intend to reinstall ${port}, you should manually remove the user '${user}' (uid='${uid}') and the group '${group}' (gid='${gid}')."
}
case $2 in
@@ -50,7 +52,7 @@
fi
fi
- delete_account dovecot
+ delete_account Dovecot dovecot:143 dovecot:143
base=/var/run/dovecot
DIRLIST="${base}/login ${base}"
diff -ruN ports.orig/mail/dovecot/pkg-install ports/mail/dovecot/pkg-install
--- ports.orig/mail/dovecot/pkg-install Mon Jul 24 16:29:10 2006
+++ ports/mail/dovecot/pkg-install Mon Nov 27 00:29:59 2006
@@ -30,46 +30,60 @@
done
}
-make_account() {
- local u g gcos
+create_account() {
+ local port user uid group gid gcos home shell
- u=$1
- g=$2
- gcos=$3
+ port=$1
+ user=${2%:*}
+ uid=${2#*:}
+ group=${3%:*}
+ gid=${3#*:}
+ gcos=$4
+ home=$5
+ shell=$6
- if pw group show "${g}" >/dev/null 2>&1; then
- echo "You already have a group \"${g}\", so I will use it."
+ pw_user_uid=$(pw usershow -n "${user}" 2>/dev/null | cut -d: -f3)
+ pw_uid_user=$(pw usershow -u "${uid}" 2>/dev/null | cut -d: -f1)
+ pw_group_gid=$(pw groupshow -n "${group}" 2>/dev/null | cut -d: -f3)
+ pw_gid_group=$(pw groupshow -g "${gid}" 2>/dev/null | cut -d: -f1)
+
+ if [ -z "${pw_group_gid}" -a -z "${pw_gid_group}" ]; then
+ echo "You need a ${group} group; creating it..."
+ pw groupadd "${group}" -g "${gid}" || exit
+ echo "Done."
+ elif [ "${gid}" = "${pw_group_gid}" -a "${group}" = "${pw_gid_group}" ]; then
+ echo "Using existing ${group} group."
else
- echo "You need a group \"${g}\"."
- if which -s pw && yesno "Would you like me to create it" y
- then
- pw groupadd ${g} || exit
- echo "Done."
- else
- echo "Please create it, and try again."
- exit 1
- fi
+ echo "${port} has reserved the groupname '${group}' and gid '${gid}':"
+ [ -n "${pw_group_gid}" -a "${gid}" != "${pw_group_gid}" ] \
+ && echo "ERROR: groupname '${group}' already in use by gid '${pw_group_gid}'"
+ [ -n "${pw_gid_group}" -a "${group}" != "${pw_gid_group}" ] \
+ && echo "ERROR: gid '${gid}' already in use by group '${pw_gid_group}'"
+ echo "Please resolve these issues and try again."
+ exit 1
fi
-
- if pw user show "${u}" >/dev/null 2>&1; then
- echo "You already have a user \"${u}\", so I will use it."
+
+ if [ -z "${pw_user_uid}" -a -z "${pw_uid_user}" ]; then
+ echo "You need a ${user} user; creating it..."
+ pw useradd "${user}" -u "${uid}" -g "${group}" -c "${gcos}" -d "${home}" -s "${shell}"
+ echo "Done."
+ elif [ "${uid}" = "${pw_user_uid}" -a "${user}" = "${pw_uid_user}" ]; then
+ echo "Using existing ${user} user."
else
- echo "You need a user \"${u}\"."
- if which -s pw && yesno "Would you like me to create it" y
- then
- pw useradd ${u} -g ${g} -c "${gcos}" -d /nonexistent -s /sbin/nologin -h - || exit
- echo "Done."
- else
- echo "Please create it, and try again."
- exit 1
- fi
+ echo "${port} has reserved the username '${user}' and uid '${uid}':"
+ [ -n "${pw_user_uid}" -a "${uid}" != "${pw_user_uid}" ] \
+ && echo "ERROR: username '${user}' already in use by uid '${pw_user_uid}'"
+ [ -n "${pw_uid_user}" -a "${user}" != "${pw_uid_user}" ] \
+ && echo "ERROR: uid '${uid}' already in use by user '${pw_uid_user}'"
+ echo "Please resolve these issues and try again."
+ exit 1
fi
}
case $2 in
PRE-INSTALL)
- make_account dovecot dovecot "Dovecot"
+ create_account Dovecot dovecot:143 dovecot:143 "Dovecot User" /var/empty /sbin/nologin
;;
POST-INSTALL)
--- dovecot-1.0.r15.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list