# HG changeset patch # User Michael Schloh von Bennewitz # Date 1328724985 -7200 # Node ID 09548e292fb1f29969466d5718bcd5f24879e1e8 # Parent 3f80fa12b97299e00b88ba4830ae81cb1005dd61 Update to new major vendor version from 1 to 2, adjusting buildconf accordingly. diff -r 3f80fa12b972 -r 09548e292fb1 dovecot/dovecot.conf --- a/dovecot/dovecot.conf Wed Feb 08 20:16:40 2012 +0200 +++ b/dovecot/dovecot.conf Wed Feb 08 20:16:25 2012 +0200 @@ -2,72 +2,103 @@ ## dovecot.conf -- Dovecot server configuration ## -protocols = imap +protocols = imap pop3 sieve -protocol imap { - listen = 127.0.0.1:143 - ssl_listen = 127.0.0.1:993 - log_path = @l_prefix@/var/dovecot/log/imap-error.log - info_log_path = @l_prefix@/var/dovecot/log/imap-info.log - login_executable = @l_prefix@/libexec/dovecot/imap-login - mail_executable = @l_prefix@/libexec/dovecot/rawlog @l_prefix@/libexec/dovecot/imap +service imap-login { + protocol = imap + inet_listener imap { + address = 127.0.0.1 + port = 143 + } + inet_listener imaps { + address = 127.0.0.1 + port = 993 + } + client_limit = 256 + process_limit = 128 + process_min_avail = 4 + user = @l_musr@ +} + +service pop3-login { + protocol = pop3 + inet_listener pop3 { + address = 127.0.0.1 + port = 110 + } + inet_listener pop3s { + address = 127.0.0.1 + port = 995 + } + client_limit = 256 + process_limit = 128 + process_min_avail = 4 + user = @l_musr@ +} + +service managesieve-login { + protocol = sieve + inet_listener sieve { + address = 127.0.0.1 + port = 4190 + } + client_limit = 256 + process_limit = 128 + process_min_avail = 4 + user = @l_musr@ +} + +service auth { + unix_listener auth-master { + mode = 0660 + } + unix_listener auth-client { + mode = 0660 + } + unix_listener auth-userdb { + mode = 0660 + } } ssl = yes -ssl_cert_file = @l_prefix@/etc/x509/example-server.crt.pem -ssl_key_file = @l_prefix@/etc/x509/example-server.key.pem +ssl_ca = <@l_prefix@/etc/x509/example-ca.crt.pem +ssl_cert = <@l_prefix@/etc/x509/example-server.crt.pem +ssl_key = <@l_prefix@/etc/x509/example-server.key.pem -log_path = @l_prefix@/var/dovecot/log/dovecot-error.log -info_log_path = @l_prefix@/var/dovecot/log/dovecot-info.log -log_timestamp = '%b %d %H:%M:%S ' - -login_user = @l_nusr@ -login_processes_count = 4 -login_max_processes_count = 128 -login_max_connections = 256 - -mail_location = mbox:~/.mail:INBOX=~/.mail/inbox +mail_location = mbox:~/.mail:INBOX=~/.mail/inbox:INDEX=~/.mail mail_uid = @l_rusr@ mail_gid = @l_rusr@ mail_privileged_group = @l_rusr@ mbox_read_locks = fcntl mbox_write_locks = fcntl +plugin { + sieve_dir = ~/.mail/.sieve + sieve = ~/.mail/.sieve.active +} + auth_realms = example.com -auth_default_realm = auth_verbose = yes disable_plaintext_auth = no +auth_mechanisms = plain login auth_debug = no auth_debug_passwords = no mail_debug = no verbose_ssl = no +default_login_user = @l_musr@ +default_internal_user = @l_rusr@ + protocol lda { postmaster_address = postmaster - log_path = @l_prefix@/var/dovecot/log/deliver-error.log - info_log_path = @l_prefix@/var/dovecot/log/deliver-info.log } -auth default { - mechanisms = plain login - passdb passwd { - } - userdb passwd { - } - socket listen { - master { - path = @l_prefix@/var/dovecot/run/auth-master - mode = 0600 - user = @l_rusr@ - group = @l_rugrp@ - } - client { - path = @l_prefix@/var/dovecot/run/auth-client - mode = 0660 - user = @l_musr@ - group = @l_mgrp@ - } - } +passdb { + driver = passwd } +userdb { + driver = passwd +} + diff -r 3f80fa12b972 -r 09548e292fb1 dovecot/dovecot.patch --- a/dovecot/dovecot.patch Wed Feb 08 20:16:40 2012 +0200 +++ b/dovecot/dovecot.patch Wed Feb 08 20:16:25 2012 +0200 @@ -1,9 +1,8 @@ Index: configure.in -diff -Nau configure.in.orig configure.in ---- configure.in.orig 2009-07-27 07:26:10 +0200 -+++ configure.in 2009-07-27 16:49:17 +0200 -@@ -1964,14 +1964,14 @@ - AC_CHECK_PROG(PG_CONFIG, pg_config, YES, NO) +--- configure.in.orig 2011-03-04 19:47:50.000000000 +0100 ++++ configure.in 2011-03-05 13:00:48.000000000 +0100 +@@ -2100,14 +2100,14 @@ + AC_CHECK_PROG(PG_CONFIG, pg_config, pg_config, NO) if test $PG_CONFIG = NO; then # based on code from PHP - for i in /usr /usr/local /usr/local/pgsql; do @@ -22,10 +21,9 @@ PGSQL_LIBDIR=$i/$j fi Index: configure -diff -Nau configure.orig configure ---- configure.orig 2009-07-27 07:26:28 +0200 -+++ configure 2009-07-27 16:50:02 +0200 -@@ -29410,14 +29410,14 @@ +--- configure.orig 2011-03-04 19:47:55.000000000 +0100 ++++ configure 2011-03-05 13:00:48.000000000 +0100 +@@ -22858,14 +22858,14 @@ if test $PG_CONFIG = NO; then # based on code from PHP @@ -44,49 +42,3 @@ if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then PGSQL_LIBDIR=$i/$j fi -Index: src/deliver/deliver.c -diff -Nau src/deliver/deliver.c.orig src/deliver/deliver.c ---- src/deliver/deliver.c.orig 2009-06-28 01:47:56 +0200 -+++ src/deliver/deliver.c 2009-07-27 16:47:39 +0200 -@@ -46,7 +46,7 @@ - #include - - #define DEFAULT_CONFIG_FILE SYSCONFDIR"/dovecot.conf" --#define DEFAULT_SENDMAIL_PATH "/usr/lib/sendmail" -+#define DEFAULT_SENDMAIL_PATH "@l_prefix@/sbin/sendmail" - #define DEFAULT_ENVELOPE_SENDER "MAILER-DAEMON" - - /* After buffer grows larger than this, create a temporary file to /tmp -Index: src/master/master-settings.c -diff -Nau src/master/master-settings.c.orig src/master/master-settings.c ---- src/master/master-settings.c.orig 2009-05-13 19:32:34.000000000 +0200 -+++ src/master/master-settings.c 2009-05-27 14:29:11.985776641 +0200 -@@ -179,8 +179,8 @@ - - /* general */ - MEMBER(protocols) "imap imaps", -- MEMBER(listen) "*", -- MEMBER(ssl_listen) "", -+ MEMBER(listen) "127.0.0.1", -+ MEMBER(ssl_listen) "127.0.0.1", - - MEMBER(ssl) "yes", - MEMBER(ssl_ca_file) "", -@@ -200,7 +200,7 @@ - /* login */ - MEMBER(login_dir) "login", - MEMBER(login_executable) NULL, -- MEMBER(login_user) "dovecot", -+ MEMBER(login_user) "@l_musr@", - MEMBER(login_greeting) PACKAGE_NAME" ready.", - MEMBER(login_log_format_elements) "user=<%u> method=%m rip=%r lip=%l %c", - MEMBER(login_log_format) "%$: %s", -@@ -321,7 +321,7 @@ - MEMBER(anonymous_username) "anonymous", - MEMBER(krb5_keytab) "", - MEMBER(gssapi_hostname) "", -- MEMBER(winbind_helper_path) "/usr/bin/ntlm_auth", -+ MEMBER(winbind_helper_path) "@l_prefix@/bin/ntlm_auth", - MEMBER(failure_delay) 2, - - MEMBER(verbose) FALSE, diff -r 3f80fa12b972 -r 09548e292fb1 dovecot/dovecot.spec --- a/dovecot/dovecot.spec Wed Feb 08 20:16:40 2012 +0200 +++ b/dovecot/dovecot.spec Wed Feb 08 20:16:25 2012 +0200 @@ -1,6 +1,6 @@ ## ## dovecot.spec -- OpenPKG RPM Package Specification -## Copyright (c) 2000-2009 OpenPKG Foundation e.V. +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that @@ -21,20 +21,10 @@ ## SUCH DAMAGE. ## -# MSvB: -# MSvB: Problem, dovecot is creating %{l_prefix}/var/lib -# MSvB: ...and /opmi/var/dovecot/users/n ??? -# MSvB: - # package version -%define V_major 1.2 -%define V_minor 6 -%define V_sieve_base 1.2 -%define V_sieve 0.1.13 -%define V_managesieve_base 1.2.6 -%define V_managesieve 0.11.9 -%define V_managesieved_base 1.2 -%define V_managesieved 0.11.9 +%define V_major 2.0 +%define V_minor 18 +%define V_pigeonhole 0.2.6 # package information Name: dovecot @@ -47,13 +37,12 @@ Group: Mail License: MIT+LGPL Version: %{V_major}.%{V_minor} -Release: 20091104 +Release: 20120208 # package options %option with_fsl yes -%option with_pam yes %option with_sieve yes -%option with_managesieve yes +%option with_pam no %option with_ldap no %option with_mysql no %option with_pgsql no @@ -61,21 +50,19 @@ # list of sources Source0: http://www.dovecot.org/releases/%{V_major}/dovecot-%{V_major}.%{V_minor}.tar.gz -Source1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_sieve_base}-sieve-%{V_sieve}.tar.gz -Source2: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_managesieved_base}-managesieve-%{V_managesieved}.tar.gz -Source3: fsl.dovecot -Source4: rc.dovecot -Source5: dovecot.conf +Source1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_major}-pigeonhole-%{V_pigeonhole}.tar.gz +Source2: fsl.dovecot +Source3: rc.dovecot +Source4: dovecot.conf Patch0: dovecot.patch -Patch1: http://www.rename-it.nl/dovecot/%{V_major}/dovecot-%{V_managesieve_base}-managesieve-%{V_managesieve}.diff.gz # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20060823 PreReq: OpenPKG, openpkg >= 20060823, MTA, x509 -BuildPreReq: libiconv, openssl -PreReq: libiconv, openssl +BuildPreReq: libiconv, openssl, zlib, bzip2 +PreReq: libiconv, openssl, zlib, bzip2 %if "%{with_fsl}" == "yes" BuildPreReq: fsl PreReq: fsl @@ -84,8 +71,8 @@ BuildPreReq: openldap PreReq: openldap %endif -%if "%{with_managesieve}" == "yes" -BuildPreReq: gettext +%if "%{with_sieve}" == "yes" +BuildPreReq: gettext, autoconf, automake, libtool PreReq: gettext %endif %if "%{with_pam}" == "yes" @@ -117,22 +104,12 @@ prog dovecot = { version = %{V_major}.%{V_minor} url = http://www.dovecot.org/download.html - regex = dovecot-(__VER__)\.tar\.gz + regex = dovecot-(\d+\.\d+(?:\.\d+))\.tar\.gz } prog dovecot:sieve = { - version = %{V_sieve} + version = %{V_pigeonhole} url = http://www.rename-it.nl/dovecot/%{V_major}/ - regex = dovecot-%{V_sieve_base}-sieve-(__VER__)\.tar\.gz - } - prog dovecot:managesieved = { - version = %{V_managesieved} - url = http://www.rename-it.nl/dovecot/%{V_major}/ - regex = dovecot-%{V_managesieved_base}-managesieve-(__VER__)\.tar\.gz - } - prog dovecot:managesieve = { - version = %{V_managesieve} - url = http://www.rename-it.nl/dovecot/%{V_major}/ - regex = dovecot-%{V_managesieve_base}-managesieve-(__VER__)\.diff\.gz + regex = dovecot-%{V_major}-pigeonhole-(__VER__)\.tar\.gz } %prep @@ -140,13 +117,14 @@ %if "%{with_sieve}" == "yes" %setup -q -T -D -a 1 %endif -%if "%{with_managesieve}" == "yes" - %setup -q -T -D -a 2 - %{l_gzip} -dc <%{PATCH1} | %{l_patch} -p1 -b -%endif %{l_sed} <%{PATCH0} %{l_value -s -a} | %{l_patch} -p0 -b %build + # build Dovecot + %{l_shtool} subst \ + -e 's;/usr/sbin/sendmail;%{l_prefix}/sbin/sendmail;g' \ + src/config/all-settings.c \ + src/lib-lda/lda-settings.c cppflags="%{l_cppflags}" ldflags="%{l_ldflags} %{l_fsl_ldflags}" libs="%{l_fsl_libs}" @@ -157,17 +135,11 @@ %if "%{with_mysql}" == "yes" cppflags="$cppflags %{l_cppflags mysql}" ldflags="$ldflags %{l_ldflags mysql}" - sql_drivers="$sql_drivers,mysql" %endif %if "%{with_pgsql}" == "yes" libs="$libs -lssl -lcrypto -lcrypt" - sql_drivers="$sql_drivers,pgsql" -%endif -%if "%{with_sqlite}" == "yes" - sql_drivers="$sql_drivers,sqlite" %endif sql_drivers=`echo "$sql_drivers" | sed 's;^,;;'` - CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="$cppflags" \ @@ -176,12 +148,11 @@ ./configure \ --prefix=%{l_prefix} \ --mandir=%{l_prefix}/man \ - --sysconfdir=%{l_prefix}/etc/dovecot \ + --sysconfdir=%{l_prefix}/etc \ --with-ssldir=%{l_prefix}/etc/dovecot/ssl \ --datadir=%{l_prefix}/share/dovecot \ --docdir=%{l_prefix}/share/dovecot/doc \ --with-rundir=%{l_prefix}/var/dovecot/run \ - --with-statedir=%{l_prefix}/var/dovecot/dat \ --with-libiconv-prefix=%{l_prefix} \ --with-ssl=openssl \ --with-docs \ @@ -192,7 +163,6 @@ %endif %if "%{with_mysql}" == "yes" || "%{with_pgsql}" == "yes" || "%{with_sqlite}" == "yes" --with-sql \ - --with-sql-drivers="$sql_drivers" \ %if "%{with_mysql}" == "yes" --with-mysql \ %else @@ -210,7 +180,6 @@ %endif %else --without-sql \ - --without-sql-drivers \ --without-mysql \ --without-pgsql \ --without-sqlite \ @@ -224,12 +193,14 @@ --without-gssapi \ --without-lucene \ --without-vpopmail \ + --enable-shared \ --disable-static %{l_make} %{l_mflags -O} %if "%{with_sieve}" == "yes" # build optional Dovecot LDA sieve plugin - ( cd dovecot-%{V_sieve_base}-sieve-%{V_sieve} + ( cd dovecot-*-pigeonhole-* + ./autogen.sh CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="%{l_cppflags}" \ @@ -237,51 +208,33 @@ ./configure \ --prefix=%{l_prefix} \ --mandir=%{l_prefix}/man \ - --with-dovecot=`pwd`/.. - %{l_make} %{l_mflags -O} - ) || exit $? -%endif -%if "%{with_managesieve}" == "yes" - # build optional Dovecot LDA managesieve daemon - ( cd dovecot-%{V_managesieved_base}-managesieve-%{V_managesieved} - CC="%{l_cc}" \ - CFLAGS="%{l_cflags -O}" \ - CPPFLAGS="%{l_cppflags}" \ - LDFLAGS="%{l_ldflags}" \ - ./configure \ - --prefix=%{l_prefix} \ - --mandir=%{l_prefix}/man \ - --with-dovecot-sieve=`pwd`/../dovecot-%{V_sieve_base}-sieve-%{V_sieve} \ - --with-dovecot=`pwd`/.. + --with-dovecot=`pwd`/.. \ + --with-managesieve %{l_make} %{l_mflags -O} ) || exit $? %endif %install + # clean build cruft rm -rf $RPM_BUILD_ROOT - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + + # install Dovecot + %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" %if "%{with_sieve}" == "yes" # install optional Dovecot LDA sieve plugin - ( cd dovecot-%{V_sieve_base}-sieve-%{V_sieve} - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT - ) || exit $? -%endif -%if "%{with_managesieve}" == "yes" - # install optional Dovecot LDA managesieve daemon - ( cd dovecot-%{V_managesieved_base}-managesieve-%{V_managesieved} - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + ( cd dovecot-*-pigeonhole-* + %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" ) || exit $? %endif # create additional dirctories %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/ssl \ - $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/dat \ $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/log \ $RPM_BUILD_ROOT%{l_prefix}/var/dovecot/run/login - # install runcommand script + # install run-command script %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d %{l_shtool} install -c -m 755 %{l_value -s -a} \ @@ -289,13 +242,12 @@ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ # strip installation - rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/dovecot*example.conf - rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/{,*}/*.la \ - >/dev/null 2>&1 || true - rmdir $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/auth \ - $RPM_BUILD_ROOT%{l_prefix}/include/dovecot \ - $RPM_BUILD_ROOT%{l_prefix}/include \ - >/dev/null 2>&1 || true + rm -rf $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/dovecot + rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/README + rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/dovecot*example.conf + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/dovecot + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/{,*}/*.a >/dev/null 2>&1 || true + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/dovecot/{,*}/*.la >/dev/null 2>&1 || true strip \ $RPM_BUILD_ROOT%{l_prefix}/sbin/* \ $RPM_BUILD_ROOT%{l_prefix}/libexec/dovecot/* \ @@ -304,7 +256,7 @@ # install default server configuration %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot - %{l_shtool} install -c -m 640 %{l_value -s -a} \ + %{l_shtool} install -c -m 644 %{l_value -s -a} \ %{SOURCE dovecot.conf} \ $RPM_BUILD_ROOT%{l_prefix}/etc/dovecot/ @@ -320,15 +272,12 @@ '%not %dir %{l_prefix}/etc/fsl' \ '%config %{l_prefix}/etc/fsl/fsl.dovecot' \ '%config %attr(0600,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/dovecot/*' \ - '%config %attr(0640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/dovecot/dovecot.conf' \ + '%config %attr(0644,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/dovecot/dovecot.conf' \ '%dir %attr(0700,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/dovecot/ssl' \ - '%dir %attr(0755,%{l_musr},%{l_mgrp}) %{l_prefix}/var/dovecot' \ - '%dir %attr(0770,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/dat' \ - '%dir %attr(0770,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/log' \ - '%dir %attr(0750,%{l_musr},%{l_rgrp}) %{l_prefix}/var/dovecot/run' \ - '%dir %attr(0750,%{l_musr},%{l_ngrp}) %{l_prefix}/var/dovecot/run/login' \ - '%doc %{l_prefix}/share/dovecot/doc' \ - '%doc %{l_prefix}/share/dovecot/doc/wiki' + '%dir %attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot' \ + '%dir %attr(0770,%{l_susr},%{l_rgrp}) %{l_prefix}/var/dovecot/log' \ + '%dir %attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot/run' \ + '%dir %attr(0750,%{l_susr},%{l_mgrp}) %{l_prefix}/var/dovecot/run/login' %files -f files @@ -347,7 +296,6 @@ [ $1 -eq 0 ] || exit 0 %{l_rc} dovecot stop 2>/dev/null rm -f $RPM_INSTALL_PREFIX/var/dovecot/* >/dev/null 2>&1 || true - rm -f $RPM_INSTALL_PREFIX/var/dovecot/dat/* >/dev/null 2>&1 || true rm -f $RPM_INSTALL_PREFIX/var/dovecot/log/* >/dev/null 2>&1 || true rm -f $RPM_INSTALL_PREFIX/var/dovecot/run/* >/dev/null 2>&1 || true rm -f $RPM_INSTALL_PREFIX/var/dovecot/run/login/* >/dev/null 2>&1 || true