diff options
author | wxs <wxs@FreeBSD.org> | 2008-11-28 22:38:26 +0800 |
---|---|---|
committer | wxs <wxs@FreeBSD.org> | 2008-11-28 22:38:26 +0800 |
commit | bbc8318742e390e4c4b19222f61e1121fc368fff (patch) | |
tree | e65f24d3bdc72cfaa0e4abacd5e61313301e3dd4 /mail/dovecot | |
parent | e2ba79d982b40c667619a1e5ad3958fcf075453b (diff) | |
download | freebsd-ports-gnome-bbc8318742e390e4c4b19222f61e1121fc368fff.tar.gz freebsd-ports-gnome-bbc8318742e390e4c4b19222f61e1121fc368fff.tar.zst freebsd-ports-gnome-bbc8318742e390e4c4b19222f61e1121fc368fff.zip |
Version update to dovecot-1.1.7 and dovecot-1.1.7-managesieve-0.10.4
'statedir' set to /var/db/dovecot instead of defaulting to /var/lib/dovecot
Users should manually rm -rf /var/lib/dovecot
Removed stale code from files/pkg-deinstall.in and files/pkg-install.in
Reworked files/dovecot.sh.in to accept dovecot_config and handle creating
and tearing down runtime directories upon startup and shutdown.
Rediffed files/patch-dovecot-example.conf to clean up line offsets.
PR: ports/129230
Submitted by: Yarema <yds@CoolRat.org> (maintainer)
Diffstat (limited to 'mail/dovecot')
-rw-r--r-- | mail/dovecot/Makefile | 7 | ||||
-rw-r--r-- | mail/dovecot/distinfo | 12 | ||||
-rw-r--r-- | mail/dovecot/files/dovecot.sh.in | 42 | ||||
-rw-r--r-- | mail/dovecot/files/patch-dovecot-example.conf | 42 | ||||
-rw-r--r-- | mail/dovecot/files/pkg-deinstall.in | 16 | ||||
-rw-r--r-- | mail/dovecot/files/pkg-install.in | 11 |
6 files changed, 65 insertions, 65 deletions
diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile index 0fe6ebd5b288..b27d95740097 100644 --- a/mail/dovecot/Makefile +++ b/mail/dovecot/Makefile @@ -6,8 +6,7 @@ # PORTNAME= dovecot -PORTVERSION= 1.1.6 -PORTREVISION= 1 +PORTVERSION= 1.1.7 CATEGORIES= mail ipv6 MASTER_SITES= http://www.dovecot.org/releases/1.1/ @@ -19,7 +18,9 @@ USE_RC_SUBR= dovecot.sh GNU_CONFIGURE= yes CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ARGS= --localstatedir=/var --without-shadow +CONFIGURE_ARGS= --localstatedir=/var \ + --with-statedir=/var/db/dovecot \ + --without-shadow CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" USE_LDCONFIG= ${PREFIX}/lib/dovecot \ diff --git a/mail/dovecot/distinfo b/mail/dovecot/distinfo index ba9a3e6150bf..91db5e342bec 100644 --- a/mail/dovecot/distinfo +++ b/mail/dovecot/distinfo @@ -1,6 +1,6 @@ -MD5 (dovecot-1.1.6.tar.gz) = ccbfcfcb5e6d19a3228885a2f7eae2dd -SHA256 (dovecot-1.1.6.tar.gz) = 91ab9b78e2ed4230d96faa89aecde3e6c42ad7e2ef4858c292c5988b195cbbec -SIZE (dovecot-1.1.6.tar.gz) = 2320875 -MD5 (dovecot-1.1.6-managesieve-0.10.3.diff.gz) = 0450151b4515afb036b4c94ac9e912fc -SHA256 (dovecot-1.1.6-managesieve-0.10.3.diff.gz) = 4a9612f788796d1c18653bc0aa5cc9269b3365d4a0358b3f6bf05cda206c139f -SIZE (dovecot-1.1.6-managesieve-0.10.3.diff.gz) = 5912 +MD5 (dovecot-1.1.7.tar.gz) = ea83ea2000a5b2e1744c7c97eb5585d1 +SHA256 (dovecot-1.1.7.tar.gz) = 915cae7684438c6335d0472ff20ec2fe44d620aa61f404ce91fd02a27434cf9f +SIZE (dovecot-1.1.7.tar.gz) = 2325617 +MD5 (dovecot-1.1.7-managesieve-0.10.4.diff.gz) = 57a751fb10ac3fcb700d5cc434546be2 +SHA256 (dovecot-1.1.7-managesieve-0.10.4.diff.gz) = dc13a3c231c7bd29a452e16f3654c941bfc2a89c31e6b392ac76ca47cd897a76 +SIZE (dovecot-1.1.7-managesieve-0.10.4.diff.gz) = 5912 diff --git a/mail/dovecot/files/dovecot.sh.in b/mail/dovecot/files/dovecot.sh.in index 57a8dabd5f4a..edf7033e0ab0 100644 --- a/mail/dovecot/files/dovecot.sh.in +++ b/mail/dovecot/files/dovecot.sh.in @@ -7,34 +7,44 @@ # REQUIRE: %%REQUIRE%% # KEYWORD: shutdown -# Define these dovecot_* variables in one of these files: +# Define dovecot_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/dovecot -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# -: ${dovecot_enable:="NO"} . %%RC_SUBR%% name=dovecot rcvar=`set_rcvar` -command=%%PREFIX%%/sbin/${name} -required_files=%%PREFIX%%/etc/${name}.conf -start_precmd="${name}_prestart" +# read configuration and set defaults +load_rc_config ${name} +: ${dovecot_enable:="NO"} + +command="%%PREFIX%%/sbin/${name}" +command_args="-c ${dovecot_config:="%%PREFIX%%/etc/${name}.conf"}" +required_files="${dovecot_config}" +start_precmd="start_precmd" +stop_postcmd="stop_postcmd" extra_commands="restart" -dovecot_prestart() +base_dir=$(${command} ${command_args} -a | /usr/bin/awk -F ': ' '/^base_dir:/ { print $2 }') +login_dir=$(${command} ${command_args} -a | /usr/bin/awk -F ': ' '/^login_dir:/ { print $2 }') +login_user=$(${command} ${command_args} -a | /usr/bin/awk -F ': ' '/^login_user:/ { print $2 }') + +pidfile="${base_dir}/master.pid" + +start_precmd() { # Ensure runtime directories exist with correct permissions - local base user gid - base=/var/run/${name} - user=$(/usr/bin/awk -F '[[:space:]]*=[[:space:]]*' '/^[[:space:]]*login_user[[:space:]]*=/ { print $2 }' ${required_files}) - gid=$(/usr/sbin/pw usershow -n "${user:-${name}}" 2>/dev/null | /usr/bin/cut -d: -f4) - /usr/bin/install -o root -g wheel -m 0755 -d ${base} - /usr/bin/install -o root -g ${gid} -m 0750 -d ${base}/login + local gid + gid=$(/usr/sbin/pw usershow -n "${login_user}" 2>/dev/null | /usr/bin/cut -d: -f4) + /usr/bin/install -o root -g wheel -m 0755 -d ${base_dir} + /usr/bin/install -o root -g ${gid} -m 0750 -d ${login_dir} +} + +stop_postcmd() +{ # Cleanup runtime directories + rm -rf ${base_dir} 2>/dev/null } -load_rc_config ${name} run_rc_command "$1" diff --git a/mail/dovecot/files/patch-dovecot-example.conf b/mail/dovecot/files/patch-dovecot-example.conf index ec434b3af8ec..d6f4519ee045 100644 --- a/mail/dovecot/files/patch-dovecot-example.conf +++ b/mail/dovecot/files/patch-dovecot-example.conf @@ -1,5 +1,5 @@ ---- dovecot-example.conf.orig 2008-10-26 11:00:45.000000000 -0400 -+++ dovecot-example.conf 2008-10-26 11:00:45.000000000 -0400 +--- dovecot-example.conf.orig 2008-11-23 16:53:53.000000000 -0500 ++++ dovecot-example.conf 2008-11-23 16:53:53.000000000 -0500 @@ -20,7 +20,7 @@ # Protocols we want to be serving: imap imaps pop3 pop3s @@ -18,7 +18,7 @@ # Should all IMAP and POP3 processes be killed when Dovecot master process # shuts down. Setting this to "no" means that Dovecot can be upgraded without -@@ -211,7 +211,7 @@ +@@ -213,7 +213,7 @@ # # <doc/wiki/MailLocation.txt> # @@ -27,7 +27,7 @@ # If you need to set multiple mailbox locations or want to change default # namespace settings, you can do it by defining namespace sections. -@@ -271,7 +271,7 @@ +@@ -273,7 +273,7 @@ # Group to enable temporarily for privileged operations. Currently this is # used only with INBOX when either its initial creation or dotlocking fails. # Typically this is set to "mail" to give access to /var/mail. @@ -36,7 +36,7 @@ # Grant access to these supplementary groups for mail processes. Typically # these are used to set up access to shared mailboxes. Note that it may be -@@ -310,7 +310,7 @@ +@@ -312,7 +312,7 @@ # Rely on O_EXCL to work when creating dotlock files. NFS supports O_EXCL # since version 3, so this should be safe to use nowadays by default. @@ -45,7 +45,7 @@ # Don't use fsync() or fdatasync() calls. This makes the performance better # at the cost of potential data loss if the server (or the file server) -@@ -338,20 +338,20 @@ +@@ -340,20 +340,20 @@ # Show more verbose process titles (in ps). Currently shows user name and # IP address. Useful for seeing who are actually using the IMAP processes # (eg. shared mailboxes or if same uid is used for multiple accounts). @@ -69,7 +69,7 @@ #last_valid_gid = 0 # Maximum number of running mail processes. When this limit is reached, -@@ -418,7 +418,7 @@ +@@ -420,7 +420,7 @@ # When copying a message, do it with hard links whenever possible. This makes # the performance much better, and it's unlikely to have any side effects. @@ -78,7 +78,7 @@ # When copying a message, try to preserve the base filename. Only if the # destination mailbox already contains the same name (ie. the mail is being -@@ -533,7 +533,7 @@ +@@ -535,7 +535,7 @@ # Send IMAP capabilities in greeting message. This makes it unnecessary for # clients to request it with CAPABILITY command, so it saves one round-trip. # Many clients however don't understand it and ask the CAPABILITY anyway. @@ -87,7 +87,7 @@ # IMAP logout format string: # %i - total number of bytes read from client -@@ -562,7 +562,7 @@ +@@ -564,7 +564,7 @@ # but not both. Thunderbird separates these two by forcing server to # accept '/' suffix in mailbox names in subscriptions list. # The list is space-separated. @@ -96,7 +96,7 @@ } ## -@@ -614,7 +614,7 @@ +@@ -616,7 +616,7 @@ # Dovecot's default, so if you're building a new server it would be a good # idea to change this. %08Xu%08Xv should be pretty fail-safe. # @@ -105,7 +105,7 @@ # POP3 logout format string: # %i - total number of bytes read from client -@@ -645,7 +645,7 @@ +@@ -647,7 +647,7 @@ # Outlook Express and Netscape Mail breaks if end of headers-line is # missing. This option simply sends it if it's missing. # The list is space-separated. @@ -114,7 +114,7 @@ } ## -@@ -736,7 +736,7 @@ +@@ -738,7 +738,7 @@ # the standard variables here, eg. %Lu would lowercase the username, %n would # drop away the domain if it was given, or "%n-AT-%d" would change the '@' into # "-AT-". This translation is done after auth_username_translation changes. @@ -123,7 +123,7 @@ # If you want to allow master users to log in by specifying the master # username within the normal username string (ie. not using SASL mechanism's -@@ -792,7 +792,7 @@ +@@ -794,7 +794,7 @@ # plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey # gss-spnego # NOTE: See also disable_plaintext_auth setting. @@ -132,7 +132,7 @@ # # Password database is used to verify user's password (and nothing more). -@@ -854,6 +854,7 @@ +@@ -856,6 +856,7 @@ # args = session=yes %Ls # args = cache_key=%u dovecot #args = dovecot @@ -140,7 +140,7 @@ } # System users (NSS, /etc/passwd, or similiar) -@@ -897,14 +898,16 @@ +@@ -899,14 +900,16 @@ # SQL database <doc/wiki/AuthDatabase.SQL.txt> #passdb sql { @@ -161,7 +161,7 @@ #} # vpopmail authentication <doc/wiki/AuthDatabase.VPopMail.txt> -@@ -931,7 +934,7 @@ +@@ -933,7 +936,7 @@ # proceses. Useful with remote NSS lookups that may block. # NOTE: Be sure to use this setting with nss_ldap or users might get # logged in as each others! @@ -170,7 +170,7 @@ } # passwd-like file with specified location -@@ -960,14 +963,16 @@ +@@ -962,14 +965,16 @@ # SQL database <doc/wiki/AuthDatabase.SQL.txt> #userdb sql { @@ -191,7 +191,7 @@ #} # vpopmail <doc/wiki/AuthDatabase.VPopMail.txt> -@@ -1007,25 +1012,25 @@ +@@ -1009,25 +1014,25 @@ #ssl_username_from_cert = no # It's possible to export the authentication interface to other programs: @@ -227,7 +227,7 @@ } # If you wish to use another authentication server than dovecot-auth, you can -@@ -1055,8 +1060,9 @@ +@@ -1057,8 +1062,9 @@ #quota = mysql:/etc/dovecot-dict-quota.conf } @@ -239,7 +239,7 @@ ## ## Plugin settings -@@ -1093,8 +1099,8 @@ +@@ -1095,8 +1101,8 @@ # Each quota root has separate limits. Only the command for the first # exceeded limit is excecuted, so put the highest limit first. # Note that % needs to be escaped as %%, otherwise "% " expands to empty. @@ -250,7 +250,7 @@ #quota = maildir # ACL plugin. vfile backend reads ACLs from "dovecot-acl" file from maildir -@@ -1131,7 +1137,7 @@ +@@ -1133,7 +1139,7 @@ # you must set up: # dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool #expire = Trash 7 Spam 30 diff --git a/mail/dovecot/files/pkg-deinstall.in b/mail/dovecot/files/pkg-deinstall.in index 30ae84752a39..d4192f7efbed 100644 --- a/mail/dovecot/files/pkg-deinstall.in +++ b/mail/dovecot/files/pkg-deinstall.in @@ -1,8 +1,9 @@ #! /bin/sh # -# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-deinstall.in,v 1.1 2008-09-08 06:42:28 beech Exp $ +# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-deinstall.in,v 1.2 2008-11-28 14:38:26 wxs Exp $ # -# ex:ts=4 + +PKG_PREFIX=${PKG_PREFIX:=/usr/local} ask() { local question default answer @@ -48,7 +49,7 @@ case $2 in DEINSTALL) if ps -axc | grep -qw dovecot; then if yesno "Dovecot is still running. Shall I stop it?" y; then - killall dovecot + ${PKG_PREFIX}/etc/rc.d/dovecot stop sleep 2 else echo "OK ... I hope you know what you are doing." @@ -57,14 +58,7 @@ DEINSTALL) delete_account Dovecot dovecot:${DOVECOT_UID:-%%DOVECOT_UID%%} dovecot:${DOVECOT_GID:-%%DOVECOT_GID%%} - echo "Also manually rm -rf /var/db/dovecot if anything was stored there." - - base=/var/run/dovecot - DIRLIST="${base}/login ${base}" - echo "Cleaning up \"${base}\"." - for directory in ${DIRLIST}; do - rmdir ${directory} 2>/dev/null || : - done + echo "Also manually 'rm -rf /var/db/dovecot' if anything was stored there." ;; esac diff --git a/mail/dovecot/files/pkg-install.in b/mail/dovecot/files/pkg-install.in index 93faa0f3e36f..d1b52d5d8941 100644 --- a/mail/dovecot/files/pkg-install.in +++ b/mail/dovecot/files/pkg-install.in @@ -1,8 +1,9 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-install.in,v 1.1 2008-09-08 06:42:28 beech Exp $ +# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-install.in,v 1.2 2008-11-28 14:38:26 wxs Exp $ # -# ex:ts=4 + +PKG_PREFIX=${PKG_PREFIX:=/usr/local} ask() { local question default answer @@ -88,10 +89,4 @@ PRE-INSTALL) create_account Dovecot dovecot:${DOVECOT_UID:-%%DOVECOT_UID%%} dovecot:${DOVECOT_GID:-%%DOVECOT_GID%%} "Dovecot User" /var/empty /usr/sbin/nologin ;; -POST-INSTALL) - base=/var/run/dovecot - /usr/bin/install -o root -g wheel -m 0755 -d ${base} - /usr/bin/install -o root -g dovecot -m 0750 -d ${base}/login - ;; - esac |