diff options
author | pav <pav@FreeBSD.org> | 2006-12-01 17:39:34 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2006-12-01 17:39:34 +0800 |
commit | 75f21bcaeb84751e875e8197c2d14786c6572db6 (patch) | |
tree | 5b3095504a742b99b2965cf62d6a5f251cafcd02 /mail | |
parent | 1b55bda2eb1c5b37407826d57d51259c21e7e329 (diff) | |
download | freebsd-ports-gnome-75f21bcaeb84751e875e8197c2d14786c6572db6.tar.gz freebsd-ports-gnome-75f21bcaeb84751e875e8197c2d14786c6572db6.tar.zst freebsd-ports-gnome-75f21bcaeb84751e875e8197c2d14786c6572db6.zip |
- Update to 1.0 rc15
- Use UID/GID 143
PR: ports/105899
Submitted by: Robin Breathe <robin@isometry.net> (maintainer)
Diffstat (limited to 'mail')
-rw-r--r-- | mail/dovecot-devel/Makefile | 2 | ||||
-rw-r--r-- | mail/dovecot-devel/distinfo | 6 | ||||
-rw-r--r-- | mail/dovecot-devel/pkg-deinstall | 16 | ||||
-rw-r--r-- | mail/dovecot-devel/pkg-install | 72 | ||||
-rw-r--r-- | mail/dovecot/Makefile | 2 | ||||
-rw-r--r-- | mail/dovecot/distinfo | 6 | ||||
-rw-r--r-- | mail/dovecot/pkg-deinstall | 16 | ||||
-rw-r--r-- | mail/dovecot/pkg-install | 72 |
8 files changed, 112 insertions, 80 deletions
diff --git a/mail/dovecot-devel/Makefile b/mail/dovecot-devel/Makefile index c1c702ca2c44..f05e628b213b 100644 --- a/mail/dovecot-devel/Makefile +++ b/mail/dovecot-devel/Makefile @@ -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 --git a/mail/dovecot-devel/distinfo b/mail/dovecot-devel/distinfo index f1b79e555c20..089cfac3a8e4 100644 --- a/mail/dovecot-devel/distinfo +++ b/mail/dovecot-devel/distinfo @@ -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 --git a/mail/dovecot-devel/pkg-deinstall b/mail/dovecot-devel/pkg-deinstall index 21c58498bdbe..b48d69d0a2e9 100644 --- a/mail/dovecot-devel/pkg-deinstall +++ b/mail/dovecot-devel/pkg-deinstall @@ -29,13 +29,15 @@ yesno() { } 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 @@ DEINSTALL) fi fi - delete_account dovecot + delete_account Dovecot dovecot:143 dovecot:143 base=/var/run/dovecot DIRLIST="${base}/login ${base}" diff --git a/mail/dovecot-devel/pkg-install b/mail/dovecot-devel/pkg-install index bbb0c9d31956..e6cba076921b 100644 --- a/mail/dovecot-devel/pkg-install +++ b/mail/dovecot-devel/pkg-install @@ -30,46 +30,60 @@ yesno() { 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) diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile index c1c702ca2c44..f05e628b213b 100644 --- a/mail/dovecot/Makefile +++ b/mail/dovecot/Makefile @@ -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 --git a/mail/dovecot/distinfo b/mail/dovecot/distinfo index f1b79e555c20..089cfac3a8e4 100644 --- a/mail/dovecot/distinfo +++ b/mail/dovecot/distinfo @@ -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 --git a/mail/dovecot/pkg-deinstall b/mail/dovecot/pkg-deinstall index 21c58498bdbe..b48d69d0a2e9 100644 --- a/mail/dovecot/pkg-deinstall +++ b/mail/dovecot/pkg-deinstall @@ -29,13 +29,15 @@ yesno() { } 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 @@ DEINSTALL) fi fi - delete_account dovecot + delete_account Dovecot dovecot:143 dovecot:143 base=/var/run/dovecot DIRLIST="${base}/login ${base}" diff --git a/mail/dovecot/pkg-install b/mail/dovecot/pkg-install index bbb0c9d31956..e6cba076921b 100644 --- a/mail/dovecot/pkg-install +++ b/mail/dovecot/pkg-install @@ -30,46 +30,60 @@ yesno() { 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) |