Tue, 07 Apr 2009 19:52:45 +0200
Import package vendor original specs for necessary manipulations.
dovecot/dovecot.patch | file | annotate | diff | comparison | revisions | |
dovecot/dovecot.spec | file | annotate | diff | comparison | revisions | |
dovecot/fsl.dovecot | file | annotate | diff | comparison | revisions | |
dovecot/rc.dovecot | file | annotate | diff | comparison | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dovecot/dovecot.patch Tue Apr 07 19:52:45 2009 +0200 1.3 @@ -0,0 +1,392 @@ 1.4 +Index: configure.in 1.5 +--- configure.in.orig 2009-03-13 23:06:16 +0100 1.6 ++++ configure.in 2009-03-14 09:11:12 +0100 1.7 +@@ -1962,14 +1962,14 @@ 1.8 + 1.9 + if test $want_pgsql != no; then 1.10 + # based on code from PHP 1.11 +- for i in /usr /usr/local /usr/local/pgsql; do 1.12 +- for j in include include/pgsql include/postgres include/postgresql ""; do 1.13 ++ for i in @l_prefix@; do 1.14 ++ for j in include/postgresql; do 1.15 + if test -r "$i/$j/libpq-fe.h"; then 1.16 + PGSQL_INCLUDE=$i/$j 1.17 + fi 1.18 + done 1.19 +- for lib in lib lib64; do 1.20 +- for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do 1.21 ++ for lib in lib; do 1.22 ++ for j in $lib; do 1.23 + if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then 1.24 + PGSQL_LIBDIR=$i/$j 1.25 + fi 1.26 +Index: configure 1.27 +--- configure.orig 2009-03-13 23:06:32 +0100 1.28 ++++ configure 2009-03-14 09:11:12 +0100 1.29 +@@ -27966,14 +27966,14 @@ 1.30 + 1.31 + if test $want_pgsql != no; then 1.32 + # based on code from PHP 1.33 +- for i in /usr /usr/local /usr/local/pgsql; do 1.34 +- for j in include include/pgsql include/postgres include/postgresql ""; do 1.35 ++ for i in @l_prefix@; do 1.36 ++ for j in include/postgresql; do 1.37 + if test -r "$i/$j/libpq-fe.h"; then 1.38 + PGSQL_INCLUDE=$i/$j 1.39 + fi 1.40 + done 1.41 +- for lib in lib lib64; do 1.42 +- for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do 1.43 ++ for lib in lib; do 1.44 ++ for j in $lib; do 1.45 + if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then 1.46 + PGSQL_LIBDIR=$i/$j 1.47 + fi 1.48 +Index: doc/dovecot-sql-example.conf 1.49 +--- doc/dovecot-sql-example.conf.orig 2009-01-05 21:49:58 +0100 1.50 ++++ doc/dovecot-sql-example.conf 2009-03-14 09:11:12 +0100 1.51 +@@ -47,7 +47,8 @@ 1.52 + # the default my.cnf location 1.53 + # option_group - Read options from the given group (default: client) 1.54 + # 1.55 +-# You can connect to UNIX sockets by using host: host=/var/run/mysql.sock 1.56 ++# You can connect to UNIX sockets by using host: 1.57 ++# host=@l_prefix@/var/mysql/mysql.sock 1.58 + # Note that currently you can't use spaces in parameters. 1.59 + # 1.60 + # MySQL supports multiple host parameters for load balancing / HA. 1.61 +@@ -58,7 +59,7 @@ 1.62 + # Examples: 1.63 + # connect = host=192.168.1.1 dbname=users 1.64 + # connect = host=sql.example.com dbname=virtual user=virtual password=blarg 1.65 +-# connect = /etc/dovecot/authdb.sqlite 1.66 ++# connect = @l_prefix@/etc/dovecot/authdb.sqlite 1.67 + # 1.68 + #connect = 1.69 + 1.70 +Index: dovecot-example.conf 1.71 +--- dovecot-example.conf.orig 2009-03-13 22:23:14 +0100 1.72 ++++ dovecot-example.conf 2009-03-14 09:12:40 +0100 1.73 +@@ -11,16 +11,14 @@ 1.74 + 1.75 + # Default values are shown for each setting, it's not required to uncomment 1.76 + # any of the lines. Exception to this are paths, they're just examples with 1.77 +-# the real defaults being based on configure options. The paths listed here 1.78 +-# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var 1.79 +-# --with-ssldir=/etc/ssl 1.80 ++# the real defaults being based on configure options. 1.81 + 1.82 + # Base directory where to store runtime data. 1.83 +-#base_dir = /var/run/dovecot/ 1.84 ++#base_dir = @l_prefix@/var/dovecot/run 1.85 + 1.86 + # Protocols we want to be serving: imap imaps pop3 pop3s 1.87 + # If you only want to use dovecot-auth, you can set this to "none". 1.88 +-#protocols = imap imaps 1.89 ++#protocols = imap 1.90 + 1.91 + # A space separated list of IP or host addresses where to listen in for 1.92 + # connections. "*" listens in all IPv4 interfaces. "[::]" listens in all IPv6 1.93 +@@ -38,7 +36,7 @@ 1.94 + # listen = *:10100 1.95 + # .. 1.96 + # } 1.97 +-#listen = * 1.98 ++#listen = 127.0.0.1 1.99 + 1.100 + # Disable LOGIN command and all other plaintext authentications unless 1.101 + # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP 1.102 +@@ -82,17 +80,17 @@ 1.103 + # IP or host address where to listen in for SSL connections. Remember to also 1.104 + # add imaps and/or pop3s to protocols setting. Defaults to same as "listen" 1.105 + # setting if not specified. 1.106 +-#ssl_listen = 1.107 ++#ssl_listen = 127.0.0.1 1.108 + 1.109 + # Disable SSL/TLS support. <doc/wiki/SSL> 1.110 +-#ssl_disable = no 1.111 ++#ssl_disable = yes 1.112 + 1.113 + # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before 1.114 + # dropping root privileges, so keep the key file unreadable by anyone but 1.115 + # root. Included doc/mkcert.sh can be used to easily generate self-signed 1.116 + # certificate, just make sure to update the domains in dovecot-openssl.cnf 1.117 +-#ssl_cert_file = /etc/ssl/certs/dovecot.pem 1.118 +-#ssl_key_file = /etc/ssl/private/dovecot.pem 1.119 ++#ssl_cert_file = @l_prefix@/etc/dovecot/ssl/dovecot.crt 1.120 ++#ssl_key_file = @l_prefix@/etc/dovecot/ssl/dovecot.key 1.121 + 1.122 + # If key file is password protected, give the password here. Alternatively 1.123 + # give it when starting dovecot with -p parameter. Since this file is often 1.124 +@@ -135,7 +133,7 @@ 1.125 + # which login needs to be able to connect to. The sockets are created when 1.126 + # running as root, so you don't have to worry about permissions. Note that 1.127 + # everything in this directory is deleted when Dovecot is started. 1.128 +-#login_dir = /var/run/dovecot/login 1.129 ++#login_dir = @l_prefix@/var/dovecot/run/login 1.130 + 1.131 + # chroot login process to the login_dir. Only reason not to do this is if you 1.132 + # wish to run the whole Dovecot without roots. <doc/wiki/Rootless.txt> 1.133 +@@ -145,7 +143,7 @@ 1.134 + # and don't use it anywhere else. The user must also belong to a group where 1.135 + # only it has access, it's used to control access for authentication process. 1.136 + # Note that this user is NOT used to access mails. <doc/wiki/UserIds.txt> 1.137 +-#login_user = dovecot 1.138 ++#login_user = @l_musr@ 1.139 + 1.140 + # Set max. process size in megabytes. If you don't use 1.141 + # login_process_per_connection you might need to grow this. 1.142 +@@ -503,7 +501,7 @@ 1.143 + 1.144 + protocol imap { 1.145 + # Login executable location. 1.146 +- #login_executable = /usr/libexec/dovecot/imap-login 1.147 ++ #login_executable = @l_prefix@/libexec/dovecot/imap-login 1.148 + 1.149 + # IMAP executable location. Changing this allows you to execute other 1.150 + # binaries before the imap process is executed. 1.151 +@@ -515,7 +513,7 @@ 1.152 + # /tmp/gdbhelper.* files: 1.153 + # mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap 1.154 + # 1.155 +- #mail_executable = /usr/libexec/dovecot/imap 1.156 ++ #mail_executable = @l_prefix@/libexec/dovecot/imap 1.157 + 1.158 + # Maximum IMAP command line length in bytes. Some clients generate very long 1.159 + # command lines with huge mailboxes, so you may need to raise this if you get 1.160 +@@ -529,7 +527,7 @@ 1.161 + # Support for dynamically loadable plugins. mail_plugins is a space separated 1.162 + # list of plugins to load. 1.163 + #mail_plugins = 1.164 +- #mail_plugin_dir = /usr/lib/dovecot/imap 1.165 ++ #mail_plugin_dir = @l_prefix@/lib/dovecot/imap 1.166 + 1.167 + # Send IMAP capabilities in greeting message. This makes it unnecessary for 1.168 + # clients to request it with CAPABILITY command, so it saves one round-trip. 1.169 +@@ -572,11 +570,11 @@ 1.170 + 1.171 + protocol pop3 { 1.172 + # Login executable location. 1.173 +- #login_executable = /usr/libexec/dovecot/pop3-login 1.174 ++ #login_executable = @l_prefix@/libexec/dovecot/pop3-login 1.175 + 1.176 + # POP3 executable location. See IMAP's mail_executable above for examples 1.177 + # how this could be changed. 1.178 +- #mail_executable = /usr/libexec/dovecot/pop3 1.179 ++ #mail_executable = @l_prefix@/libexec/dovecot/pop3 1.180 + 1.181 + # Don't try to set mails non-recent or seen with POP3 sessions. This is 1.182 + # mostly intended to reduce disk I/O. With maildir it doesn't move files 1.183 +@@ -636,7 +634,7 @@ 1.184 + # Support for dynamically loadable plugins. mail_plugins is a space separated 1.185 + # list of plugins to load. 1.186 + #mail_plugins = 1.187 +- #mail_plugin_dir = /usr/lib/dovecot/pop3 1.188 ++ #mail_plugin_dir = @l_prefix@/lib/dovecot/pop3 1.189 + 1.190 + # Workarounds for various client bugs: 1.191 + # outlook-no-nuls: 1.192 +@@ -664,7 +662,7 @@ 1.193 + # Support for dynamically loadable plugins. mail_plugins is a space separated 1.194 + # list of plugins to load. 1.195 + #mail_plugins = 1.196 +- #mail_plugin_dir = /usr/lib/dovecot/lda 1.197 ++ #mail_plugin_dir = @l_prefix@/lib/dovecot/lda 1.198 + 1.199 + # If user is over quota, return with temporary failure instead of 1.200 + # bouncing the mail. 1.201 +@@ -678,7 +676,7 @@ 1.202 + #deliver_log_format = msgid=%m: %$ 1.203 + 1.204 + # Binary to use for sending mails. 1.205 +- #sendmail_path = /usr/lib/sendmail 1.206 ++ #sendmail_path = @l_prefix@/sbin/sendmail 1.207 + 1.208 + # Subject: header to use for rejection mails. You can use the same variables 1.209 + # as for rejection_reason below. 1.210 +@@ -689,7 +687,7 @@ 1.211 + #rejection_reason = Your message to <%t> was automatically rejected:%n%r 1.212 + 1.213 + # UNIX socket path to master authentication server to find users. 1.214 +- #auth_socket_path = /var/run/dovecot/auth-master 1.215 ++ #auth_socket_path = @l_prefix@/var/dovecot/run/auth-master 1.216 + } 1.217 + 1.218 + ## 1.219 +@@ -697,7 +695,7 @@ 1.220 + ## 1.221 + 1.222 + # Executable location 1.223 +-#auth_executable = /usr/libexec/dovecot/dovecot-auth 1.224 ++#auth_executable = @l_prefix@/libexec/dovecot/dovecot-auth 1.225 + 1.226 + # Set max. process size in megabytes. 1.227 + #auth_process_size = 256 1.228 +@@ -787,7 +785,7 @@ 1.229 + #auth_ntlm_use_winbind = no 1.230 + 1.231 + # Path for Samba's ntlm_auth helper binary. 1.232 +-#auth_winbind_helper_path = /usr/bin/ntlm_auth 1.233 ++#auth_winbind_helper_path = @l_prefix@/bin/ntlm_auth 1.234 + 1.235 + # Number of seconds to delay before replying to failed authentications. 1.236 + #auth_failure_delay = 2 1.237 +@@ -820,7 +818,7 @@ 1.238 + 1.239 + #passdb passwd-file { 1.240 + # File contains a list of usernames, one per line 1.241 +- #args = /etc/dovecot.deny 1.242 ++ #args = @l_prefix@/etc/dovecot/dovecot.deny 1.243 + #deny = yes 1.244 + #} 1.245 + 1.246 +@@ -903,13 +901,13 @@ 1.247 + # SQL database <doc/wiki/AuthDatabase.SQL.txt> 1.248 + #passdb sql { 1.249 + # Path for SQL configuration file, see doc/dovecot-sql-example.conf 1.250 +- #args = 1.251 ++ #args = @l_prefix@/etc/dovecot/dovecot-sql.conf 1.252 + #} 1.253 + 1.254 + # LDAP database <doc/wiki/AuthDatabase.LDAP.txt> 1.255 + #passdb ldap { 1.256 + # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf 1.257 +- #args = 1.258 ++ #args = @l_prefix@/etc/dovecot/dovecot-ldap.conf 1.259 + #} 1.260 + 1.261 + # vpopmail authentication <doc/wiki/AuthDatabase.VPopMail.txt> 1.262 +@@ -974,13 +972,13 @@ 1.263 + # SQL database <doc/wiki/AuthDatabase.SQL.txt> 1.264 + #userdb sql { 1.265 + # Path for SQL configuration file, see doc/dovecot-sql-example.conf 1.266 +- #args = 1.267 ++ #args = @l_prefix@/etc/dovecot/dovecot-sql.conf 1.268 + #} 1.269 + 1.270 + # LDAP database <doc/wiki/AuthDatabase.LDAP.txt> 1.271 + #userdb ldap { 1.272 + # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf 1.273 +- #args = 1.274 ++ #args = @l_prefix@/etc/dovecot/dovecot-ldap.conf 1.275 + #} 1.276 + 1.277 + # vpopmail <doc/wiki/AuthDatabase.VPopMail.txt> 1.278 +@@ -1017,7 +1015,7 @@ 1.279 + # Master socket provides access to userdb information. It's typically 1.280 + # used to give Dovecot's local delivery agent access to userdb so it 1.281 + # can find mailbox locations. 1.282 +- #path = /var/run/dovecot/auth-master 1.283 ++ #path = @l_prefix@/dovecot/run/auth-master 1.284 + #mode = 0600 1.285 + # Default user/group is the one who started dovecot-auth (root) 1.286 + #user = 1.287 +@@ -1027,7 +1025,7 @@ 1.288 + # The client socket is generally safe to export to everyone. Typical use 1.289 + # is to export it to your SMTP server so it can do SMTP AUTH lookups 1.290 + # using it. 1.291 +- #path = /var/run/dovecot/auth-client 1.292 ++ #path = @l_prefix@/dovecot/run/auth-client 1.293 + #mode = 0660 1.294 + #} 1.295 + #} 1.296 +@@ -1041,7 +1039,7 @@ 1.297 + #auth external { 1.298 + # socket connect { 1.299 + # master { 1.300 +-# path = /var/run/dovecot/auth-master 1.301 ++# path = @l_prefix@/dovecot/run/auth-master 1.302 + # } 1.303 + # } 1.304 + #} 1.305 +@@ -1057,8 +1055,8 @@ 1.306 + # referenced using URIs in format "proxy::<name>". 1.307 + 1.308 + dict { 1.309 +- #quota = mysql:/etc/dovecot-dict-quota.conf 1.310 +- #expire = db:/var/lib/dovecot/expire.db 1.311 ++ #quota = mysql:@l_prefix@/etc/dovecot/dovecot-dict-quota.conf 1.312 ++ #expire = db:@l_prefix@/var/dovecot/lib/expire.db 1.313 + } 1.314 + 1.315 + # Path to Berkeley DB's configuration file. See doc/dovecot-db-example.conf 1.316 +@@ -1109,7 +1107,7 @@ 1.317 + # one file for each mailbox, eg. INBOX or sub.mailbox. cache_secs parameter 1.318 + # specifies how many seconds to wait between stat()ing dovecot-acl file 1.319 + # to see if it changed. 1.320 +- #acl = vfile:/etc/dovecot-acls:cache_secs=300 1.321 ++ #acl = vfile:@l_prefix@/etc/dovecot/dovecot-acls:cache_secs=300 1.322 + 1.323 + # Convert plugin. If set, specifies the source storage path which is 1.324 + # converted to destination storage (mail_location) when the user logs in. 1.325 +@@ -1128,14 +1126,14 @@ 1.326 + # until the message can be saved within quota limits. The configuration file 1.327 + # is a text file where each line is in format: <priority> <mailbox name> 1.328 + # Mails are first deleted in lowest -> highest priority number order 1.329 +- #trash = /etc/dovecot-trash.conf 1.330 ++ #trash = @l_prefix@/etc/dovecot/dovecot-trash.conf 1.331 + 1.332 + # Expire plugin. Mails are expunged from mailboxes after being there the 1.333 + # configurable time. The first expiration date for each mailbox is stored in 1.334 + # a dictionary so it can be quickly determined which mailboxes contain 1.335 + # expired mails. The actual expunging is done in a nightly cronjob, which 1.336 + # you must set up: 1.337 +- # dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool 1.338 ++ # dovecot --exec-mail ext @l_prefix@/libexec/dovecot/expire-tool 1.339 + #expire = Trash 7 Spam 30 1.340 + #expire_dict = proxy::expire 1.341 + 1.342 +Index: src/deliver/deliver.c 1.343 +--- src/deliver/deliver.c.orig 2009-02-27 00:31:13 +0100 1.344 ++++ src/deliver/deliver.c 2009-03-14 09:11:12 +0100 1.345 +@@ -41,7 +41,7 @@ 1.346 + #include <syslog.h> 1.347 + 1.348 + #define DEFAULT_CONFIG_FILE SYSCONFDIR"/dovecot.conf" 1.349 +-#define DEFAULT_SENDMAIL_PATH "/usr/lib/sendmail" 1.350 ++#define DEFAULT_SENDMAIL_PATH "@l_prefix@/sbin/sendmail" 1.351 + #define DEFAULT_ENVELOPE_SENDER "MAILER-DAEMON" 1.352 + 1.353 + /* After buffer grows larger than this, create a temporary file to /tmp 1.354 +Index: src/master/master-settings.c 1.355 +--- src/master/master-settings.c.orig 2009-03-13 20:11:53 +0100 1.356 ++++ src/master/master-settings.c 2009-03-14 09:11:12 +0100 1.357 +@@ -178,14 +178,14 @@ 1.358 + MEMBER(syslog_facility) "mail", 1.359 + 1.360 + /* general */ 1.361 +- MEMBER(protocols) "imap imaps", 1.362 +- MEMBER(listen) "*", 1.363 +- MEMBER(ssl_listen) "", 1.364 ++ MEMBER(protocols) "imap", 1.365 ++ MEMBER(listen) "127.0.0.1", 1.366 ++ MEMBER(ssl_listen) "127.0.0.1", 1.367 + 1.368 +- MEMBER(ssl_disable) FALSE, 1.369 ++ MEMBER(ssl_disable) TRUE, 1.370 + MEMBER(ssl_ca_file) "", 1.371 +- MEMBER(ssl_cert_file) SSLDIR"/certs/dovecot.pem", 1.372 +- MEMBER(ssl_key_file) SSLDIR"/private/dovecot.pem", 1.373 ++ MEMBER(ssl_cert_file) "@l_prefix@/etc/dovecot/ssl/dovecot.crt", 1.374 ++ MEMBER(ssl_key_file) "@l_prefix@/etc/dovecot/ssl/dovecot.key", 1.375 + MEMBER(ssl_key_password) "", 1.376 + MEMBER(ssl_parameters_regenerate) 168, 1.377 + MEMBER(ssl_cipher_list) "", 1.378 +@@ -200,7 +200,7 @@ 1.379 + /* login */ 1.380 + MEMBER(login_dir) "login", 1.381 + MEMBER(login_executable) NULL, 1.382 +- MEMBER(login_user) "dovecot", 1.383 ++ MEMBER(login_user) "@l_musr@", 1.384 + MEMBER(login_greeting) "Dovecot ready.", 1.385 + MEMBER(login_log_format_elements) "user=<%u> method=%m rip=%r lip=%l %c", 1.386 + MEMBER(login_log_format) "%$: %s", 1.387 +@@ -317,7 +317,7 @@ 1.388 + MEMBER(anonymous_username) "anonymous", 1.389 + MEMBER(krb5_keytab) "", 1.390 + MEMBER(gssapi_hostname) "", 1.391 +- MEMBER(winbind_helper_path) "/usr/bin/ntlm_auth", 1.392 ++ MEMBER(winbind_helper_path) "@l_prefix@/bin/ntlm_auth", 1.393 + MEMBER(failure_delay) 2, 1.394 + 1.395 + MEMBER(verbose) FALSE,
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/dovecot/dovecot.spec Tue Apr 07 19:52:45 2009 +0200 2.3 @@ -0,0 +1,324 @@ 2.4 +## 2.5 +## dovecot.spec -- OpenPKG RPM Package Specification 2.6 +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> 2.7 +## 2.8 +## Permission to use, copy, modify, and distribute this software for 2.9 +## any purpose with or without fee is hereby granted, provided that 2.10 +## the above copyright notice and this permission notice appear in all 2.11 +## copies. 2.12 +## 2.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 2.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 2.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 2.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 2.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 2.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 2.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2.24 +## SUCH DAMAGE. 2.25 +## 2.26 + 2.27 +# package version 2.28 +%define V_major 1.1 2.29 +%define V_minor 13 2.30 +%define V_minor_sieve 6 2.31 +%define V_minor_managesieve 1 2.32 +%define V_managesieve 0.10.3 2.33 + 2.34 +# package information 2.35 +Name: dovecot 2.36 +Summary: IMAP4 & POP3 Server 2.37 +URL: http://www.dovecot.org/ 2.38 +Vendor: Timo Sirainen et al. 2.39 +Packager: OpenPKG Foundation e.V. 2.40 +Distribution: OpenPKG Community 2.41 +Class: EVAL 2.42 +Group: Mail 2.43 +License: MIT+LGPL 2.44 +Version: %{V_major}.%{V_minor} 2.45 +Release: 20090319 2.46 + 2.47 +# package options 2.48 +%option with_fsl yes 2.49 +%option with_pam yes 2.50 +%option with_ldap no 2.51 +%option with_mysql no 2.52 +%option with_pgsql no 2.53 +%option with_sqlite no 2.54 +%option with_pop3d no 2.55 +%option with_managesieve no 2.56 +%option with_sieve yes 2.57 + 2.58 +# list of sources 2.59 +Source0: http://www.dovecot.org/releases/%{V_major}/dovecot-%{V_major}.%{V_minor}.tar.gz 2.60 +Source1: http://www.dovecot.org/releases/sieve/dovecot-sieve-%{V_major}.%{V_minor_sieve}.tar.gz 2.61 +Source2: fsl.dovecot 2.62 +Source3: rc.dovecot 2.63 +Patch0: dovecot.patch 2.64 +Patch1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}.%{V_minor_managesieve}-managesieve-%{V_managesieve}.diff.gz 2.65 + 2.66 +# build information 2.67 +Prefix: %{l_prefix} 2.68 +BuildRoot: %{l_buildroot} 2.69 +BuildPreReq: OpenPKG, openpkg >= 20060823 2.70 +PreReq: OpenPKG, openpkg >= 20060823, MTA 2.71 +BuildPreReq: libiconv, openssl 2.72 +PreReq: libiconv, openssl 2.73 +%if "%{with_fsl}" == "yes" 2.74 +BuildPreReq: fsl 2.75 +PreReq: fsl 2.76 +%endif 2.77 +%if "%{with_ldap}" == "yes" 2.78 +BuildPreReq: openldap 2.79 +PreReq: openldap 2.80 +%endif 2.81 +%if "%{with_managesieve}" == "yes" 2.82 +BuildPreReq: autoconf, automake, pkgconfig, libtool 2.83 +BuildPreReq: gettext 2.84 +PreReq: gettext 2.85 +%endif 2.86 +%if "%{with_pam}" == "yes" 2.87 +BuildPreReq: PAM 2.88 +PreReq: PAM 2.89 +%endif 2.90 +%if "%{with_mysql}" == "yes" 2.91 +BuildPreReq: mysql, zlib 2.92 +PreReq: mysql, zlib 2.93 +%endif 2.94 +%if "%{with_pgsql}" == "yes" 2.95 +BuildPreReq: postgresql 2.96 +PreReq: postgresql 2.97 +%endif 2.98 +%if "%{with_sqlite}" == "yes" 2.99 +BuildPreReq: sqlite 2.100 +PreReq: sqlite 2.101 +%endif 2.102 +AutoReq: no 2.103 +AutoReqProv: no 2.104 + 2.105 +%description 2.106 + Dovecot is an Open Source IMAP and POP3 server, written with 2.107 + security primarily in mind. Dovecot is an excellent choice for both 2.108 + small and large installations. It's fast, simple to set up, requires 2.109 + no special administration and it uses very little memory. 2.110 + 2.111 +%track 2.112 + prog dovecot = { 2.113 + version = %{V_major}.%{V_minor} 2.114 + url = http://www.dovecot.org/download.html 2.115 + regex = dovecot-(1\.1(\.\d+)+)\.tar\.gz 2.116 + } 2.117 + prog dovecot:sieve = { 2.118 + version = %{V_major}.%{V_minor_sieve} 2.119 + url = http://www.dovecot.org/download.html 2.120 + regex = dovecot-sieve-(%{V_major}(\.\d+)+)\.tar\.gz 2.121 + } 2.122 + prog dovecot:managesieve = { 2.123 + version = %{V_managesieve} 2.124 + url = http://www.rename-it.nl/dovecot/%{V_major}/ 2.125 + regex = dovecot-%{V_major}\.%{V_minor_managesieve}-managesieve-(__VER__)\.diff\.gz 2.126 + } 2.127 + 2.128 +%prep 2.129 + %setup -q 2.130 +%if "%{with_sieve}" == "yes" 2.131 + %setup -q -T -D -a 1 2.132 +%endif 2.133 + %{l_sed} <%{PATCH0} %{l_value -s -a} | %{l_patch} -p0 -b 2.134 +%if "%{with_managesieve}" == "yes" 2.135 + sleep 1 2.136 + %{l_gzip} -dc <%{PATCH1} | %{l_patch} -p1 -b 2.137 + sleep 1 2.138 + autoreconf -i --force || true 2.139 +%endif 2.140 + 2.141 +%build 2.142 + cppflags="%{l_cppflags}" 2.143 + ldflags="%{l_ldflags} %{l_fsl_ldflags}" 2.144 + libs="%{l_fsl_libs}" 2.145 + sql_drivers="" 2.146 +%if "%{with_ldap}" == "yes" 2.147 + libs="$libs -llber -lssl -lcrypto" 2.148 +%endif 2.149 +%if "%{with_mysql}" == "yes" 2.150 + cppflags="$cppflags %{l_cppflags mysql}" 2.151 + ldflags="$ldflags %{l_ldflags mysql}" 2.152 + sql_drivers="$sql_drivers,mysql" 2.153 +%endif 2.154 +%if "%{with_pgsql}" == "yes" 2.155 + libs="$libs -lssl -lcrypto -lcrypt" 2.156 + sql_drivers="$sql_drivers,pgsql" 2.157 +%endif 2.158 +%if "%{with_sqlite}" == "yes" 2.159 + sql_drivers="$sql_drivers,sqlite" 2.160 +%endif 2.161 + sql_drivers=`echo "$sql_drivers" | sed 's;^,;;'` 2.162 + 2.163 + CC="%{l_cc}" \ 2.164 + CFLAGS="%{l_cflags -O}" \ 2.165 + CPPFLAGS="$cppflags" \ 2.166 + LDFLAGS="$ldflags" \ 2.167 + LIBS="$libs" \ 2.168 + ./configure \ 2.169 + --prefix=%{l_prefix} \ 2.170 + --sysconfdir=%{l_prefix}/etc/dovecot \ 2.171 + --with-ssldir=%{l_prefix}/etc/dovecot/ssl \ 2.172 + --datadir=%{l_prefix}/share/dovecot \ 2.173 + --docdir=%{l_prefix}/share/dovecot/doc \ 2.174 + --with-rundir=%{l_prefix}/var/dovecot/run \ 2.175 + --with-libiconv-prefix=%{l_prefix} \ 2.176 + --with-ssl=openssl \ 2.177 + --with-deliver \ 2.178 + --with-docs \ 2.179 +%if "%{with_ldap}" == "yes" 2.180 + --with-ldap \ 2.181 +%else 2.182 + --without-ldap \ 2.183 +%endif 2.184 +%if "%{with_mysql}" == "yes" || "%{with_pgsql}" == "yes" || "%{with_sqlite}" == "yes" 2.185 + --with-sql \ 2.186 + --with-sql-drivers="$sql_drivers" \ 2.187 +%if "%{with_mysql}" == "yes" 2.188 + --with-mysql \ 2.189 +%else 2.190 + --without-mysql \ 2.191 +%endif 2.192 +%if "%{with_pgsql}" == "yes" 2.193 + --with-pgsql \ 2.194 +%else 2.195 + --without-pgsql \ 2.196 +%endif 2.197 +%if "%{with_sqlite}" == "yes" 2.198 + --with-sqlite \ 2.199 +%else 2.200 + --without-sqlite \ 2.201 +%endif 2.202 +%else 2.203 + --without-sql \ 2.204 + --without-sql-drivers \ 2.205 + --without-mysql \ 2.206 + --without-pgsql \ 2.207 + --without-sqlite \ 2.208 +%endif 2.209 +%if "%{with_pam}" == "yes" 2.210 + --with-pam \ 2.211 +%else 2.212 + --without-pam \ 2.213 +%endif 2.214 +%if "%{with_pop3d}" == "yes" 2.215 + --with-pop3d \ 2.216 +%else 2.217 + --without-pop3d \ 2.218 +%endif 2.219 + --without-gc \ 2.220 + --without-gssapi \ 2.221 + --without-lucene \ 2.222 + --without-vpopmail \ 2.223 + --enable-shared \ 2.224 + --disable-static 2.225 + %{l_make} %{l_mflags -O} 2.226 + 2.227 +%if "%{with_sieve}" == "yes" 2.228 + # build optional Dovecot LDA sieve plugin 2.229 + ( cd dovecot-sieve-%{V_major}.%{V_minor_sieve} 2.230 + CC="%{l_cc}" \ 2.231 + CFLAGS="%{l_cflags -O}" \ 2.232 + CPPFLAGS="%{l_cppflags}" \ 2.233 + LDFLAGS="%{l_ldflags}" \ 2.234 + ./configure \ 2.235 + --prefix=%{l_prefix} \ 2.236 + --with-dovecot=.. 2.237 + %{l_make} %{l_mflags -O} 2.238 + ) || exit $? 2.239 +%endif 2.240 + 2.241 +%install 2.242 + rm -rf $RPM_BUILD_ROOT 2.243 + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 2.244 + 2.245 +%if "%{with_sieve}" == "yes" 2.246 + # install optional Dovecot LDA sieve plugin 2.247 + ( cd dovecot-sieve-%{V_major}.%{V_minor_sieve} 2.248 + %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 2.249 + ) || exit $? 2.250 +%endif 2.251 + 2.252 + # adjust file names of configuration files 2.253 + ( cd $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot 2.254 + for i in dovecot dovecot-ldap dovecot-sql; do 2.255 + mv ${i}{-example,}.conf 2.256 + done 2.257 + ) || exit $? 2.258 + 2.259 + # create additional dirctories 2.260 + %{l_shtool} mkdir -f -p -m 755 \ 2.261 + $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/ssl \ 2.262 + $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/log \ 2.263 + $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/run/login 2.264 + 2.265 + # install run-command script 2.266 + %{l_shtool} mkdir -f -p -m 755 \ 2.267 + $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d 2.268 +%if "%{with_pop3d}" == "yes" 2.269 + cmd='/<\/\{0,1\}with_pop3d>/d' 2.270 +%else 2.271 + cmd='/<with_pop3d>/,/<\/with_pop3d>/d' 2.272 +%endif 2.273 + %{l_shtool} install -c -m 755 %{l_value -s -a} \ 2.274 + -e "$cmd" \ 2.275 + %{SOURCE rc.dovecot} \ 2.276 + $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ 2.277 + 2.278 + # install OSSP fsl configuration 2.279 + %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl 2.280 + %{l_shtool} install -c -m 644 %{l_value -s -a} \ 2.281 + %{SOURCE fsl.dovecot} \ 2.282 + $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/ 2.283 + 2.284 + # strip installation 2.285 + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/{,*}/*.la \ 2.286 + >/dev/null 2>&1 || true 2.287 + strip \ 2.288 + $RPM_BUILD_ROOT%{l_prefix}/sbin/* \ 2.289 + $RPM_BUILD_ROOT%{l_prefix}/libexec/dovecot/* \ 2.290 + >/dev/null 2>&1 || true 2.291 + 2.292 + # generate file list 2.293 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \ 2.294 + '%not %dir %{l_prefix}/etc/fsl' \ 2.295 + '%config %{l_prefix}/etc/fsl/fsl.dovecot' \ 2.296 + '%config %attr(0600,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/dovecot/*' \ 2.297 + '%config %attr(0640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/dovecot/dovecot.conf' \ 2.298 + '%dir %attr(0700,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/dovecot/ssl' \ 2.299 + '%dir %attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot' \ 2.300 + '%dir %attr(0770,%{l_susr},%{l_rgrp}) %{l_prefix}/var/dovecot/log' \ 2.301 + '%dir %attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot/run' \ 2.302 + '%dir %attr(0750,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot/run/login' \ 2.303 + '%doc %{l_prefix}/share/dovecot/doc' \ 2.304 + '%doc %{l_prefix}/share/dovecot/doc/wiki' 2.305 + 2.306 +%files -f files 2.307 + 2.308 +%clean 2.309 + rm -rf $RPM_BUILD_ROOT 2.310 + 2.311 +%post 2.312 + # after upgrade, restart service 2.313 + [ $1 -eq 2 ] || exit 0 2.314 + eval `%{l_rc} dovecot status 2>/dev/null` 2.315 + [ ".$dovecot_active" = .yes ] && %{l_rc} dovecot restart 2.316 + exit 0 2.317 + 2.318 +%preun 2.319 + # before erase, stop service and remove log files 2.320 + [ $1 -eq 0 ] || exit 0 2.321 + %{l_rc} dovecot stop 2>/dev/null 2.322 + rm -f $RPM_INSTALL_PREFIX/var/dovecot/* >/dev/null 2>&1 || true 2.323 + rm -f $RPM_INSTALL_PREFIX/var/dovecot/log/* >/dev/null 2>&1 || true 2.324 + rm -f $RPM_INSTALL_PREFIX/var/dovecot/run/* >/dev/null 2>&1 || true 2.325 + rm -f $RPM_INSTALL_PREFIX/var/dovecot/run/login/* >/dev/null 2>&1 || true 2.326 + exit 0 2.327 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/dovecot/fsl.dovecot Tue Apr 07 19:52:45 2009 +0200 3.3 @@ -0,0 +1,28 @@ 3.4 +## 3.5 +## fsl.dovecot -- OSSP fsl configuration 3.6 +## 3.7 + 3.8 +ident (dovecot.*)/.+ q{ 3.9 + prefix( 3.10 + prefix="%b %d %H:%M:%S %N <%L> $1[%P]: " 3.11 + ) 3.12 + -> { 3.13 + debug: file( 3.14 + path="@l_prefix@/var/dovecot/log/dovecot.log", 3.15 + perm=0600 3.16 + ) 3.17 + } 3.18 +}; 3.19 + 3.20 +ident (deliver(.*))/.+ q{ 3.21 + prefix( 3.22 + prefix="%b %d %H:%M:%S %N <%L> $1[%P]: " 3.23 + ) 3.24 + -> { 3.25 + debug: file( 3.26 + path="@l_prefix@/var/dovecot/log/deliver.log", 3.27 + perm=0600 3.28 + ) 3.29 + } 3.30 +}; 3.31 +
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/dovecot/rc.dovecot Tue Apr 07 19:52:45 2009 +0200 4.3 @@ -0,0 +1,80 @@ 4.4 +#!@l_prefix@/bin/openpkg rc 4.5 +## 4.6 +## rc.dovecot -- Run-Commands 4.7 +## 4.8 + 4.9 +%config 4.10 + dovecot_enable="$openpkg_rc_def" 4.11 + dovecot_log_prolog="true" 4.12 + dovecot_log_epilog="true" 4.13 + dovecot_log_numfiles="10" 4.14 + dovecot_log_minsize="1M" 4.15 + dovecot_log_complevel="9" 4.16 + dovecot_deliver_log_prolog="true" 4.17 + dovecot_deliver_log_epilog="true" 4.18 + dovecot_deliver_log_numfiles="10" 4.19 + dovecot_deliver_log_minsize="1M" 4.20 + dovecot_deliver_log_complevel="9" 4.21 +<with_pop3d> 4.22 + POP_type="dovecot" 4.23 + POP_logfile="@l_prefix@/var/dovecot/log/dovecot.log" 4.24 +</with_pop3d> 4.25 + 4.26 +%common 4.27 + dovecot_pidfile="@l_prefix@/var/dovecot/run/master.pid" 4.28 + dovecot_signal () { 4.29 + [ -f $dovecot_pidfile ] && kill -$1 `cat $dovecot_pidfile` 4.30 + } 4.31 + 4.32 +%status -u @l_susr@ -o 4.33 + dovecot_usable="unknown" 4.34 + dovecot_active="no" 4.35 + rcService dovecot enable yes && \ 4.36 + dovecot_signal 0 && dovecot_active="yes" 4.37 + echo "dovecot_enable=\"$dovecot_enable\"" 4.38 + echo "dovecot_usable=\"$dovecot_usable\"" 4.39 + echo "dovecot_active=\"$dovecot_active\"" 4.40 + 4.41 +%start -u @l_susr@ 4.42 + rcService dovecot enable yes || exit 0 4.43 + rcService dovecot active yes && exit 0 4.44 + @l_prefix@/sbin/dovecot 4.45 + 4.46 +%stop -u @l_susr@ 4.47 + rcService dovecot enable yes || exit 0 4.48 + rcService dovecot active no && exit 0 4.49 + dovecot_signal TERM 4.50 + sleep 2 4.51 + rm -f $dovecot_pidfile >/dev/null 2>&1 || true 4.52 + 4.53 +%restart -u @l_susr@ 4.54 + rcService dovecot enable yes || exit 0 4.55 + rcService dovecot active no && exit 0 4.56 + rc dovecot stop start 4.57 + 4.58 +%reload -u @l_susr@ 4.59 + rcService dovecot enable yes || exit 0 4.60 + rcService dovecot active no && exit 0 4.61 + dovecot_signal HUP 4.62 + 4.63 +%daily -u @l_susr@ 4.64 + rcService dovecot enable yes || exit 0 4.65 + rcTmp -i 4.66 + hintfile=`rcTmp -f -n hint` 4.67 + shtool rotate -f \ 4.68 + -n ${dovecot_log_numfiles} -s ${dovecot_log_minsize} -d \ 4.69 + -z ${dovecot_log_complevel} -m 600 -o @l_susr@ -g @l_sgrp@ \ 4.70 + -P "${dovecot_log_prolog}" \ 4.71 + -E "${dovecot_log_epilog}; echo 1 >$hintfile" \ 4.72 + @l_prefix@/var/dovecot/log/dovecot.log 4.73 + if [ -s $hintfile ]; then 4.74 + dovecot_signal USR1 4.75 + fi 4.76 + rcTmp -k 4.77 + shtool rotate -f \ 4.78 + -n ${dovecot_deliver_log_numfiles} -s ${dovecot_deliver_log_minsize} -d \ 4.79 + -z ${dovecot_deliver_log_complevel} -m 600 -o @l_rusr@ -g @l_rgrp@ \ 4.80 + -P "${dovecot_deliver_log_prolog}" \ 4.81 + -E "${dovecot_deliver_log_epilog}" \ 4.82 + @l_prefix@/var/dovecot/log/deliver.log 4.83 +