X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=dovecot.spec;h=13fac291ef4b16b9a9ee7a8944a2c192fc02e0e9;hb=28c2da72e2dc73dd07bdfa6f88ea673b9ef7e521;hp=a7b0e4cf01097eb30eeac6d8fc654adfe6600e86;hpb=fb02d7f71d18f9c277cfb701bf419c6114026aef;p=packages%2Fdovecot.git diff --git a/dovecot.spec b/dovecot.spec index a7b0e4c..13fac29 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -1,6 +1,6 @@ # # Conditional build: -%bcond_with gssapi # with GSSAPI support +%bcond_without gssapi # without GSSAPI support %bcond_without ldap # without LDAP auth %bcond_without mysql # without MySQL auth %bcond_without pgsql # without PostgreSQL auth @@ -10,13 +10,13 @@ Summary: IMAP and POP3 server written with security primarily in mind Summary(pl.UTF-8): Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie Name: dovecot -Version: 1.1.6 -Release: 1 +Version: 2.0.4 +Release: 2 Epoch: 1 License: MIT (libraries), LGPL v2.1 (the rest) Group: Networking/Daemons -Source0: http://dovecot.org/releases/1.1/%{name}-%{version}.tar.gz -# Source0-md5: ccbfcfcb5e6d19a3228885a2f7eae2dd +Source0: http://dovecot.org/releases/2.0/%{name}-%{version}.tar.gz +# Source0-md5: ff1cd0dbfca4a26cce782f7d31cb2028 Source1: %{name}.pamd Source2: %{name}.init Source3: %{name}.sysconfig @@ -24,9 +24,11 @@ Patch0: %{name}-config.patch URL: http://dovecot.org/ BuildRequires: autoconf BuildRequires: automake +BuildRequires: bzip2-devel %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0} BuildRequires: gettext-devel -%{?with_gssapi:BuildRequires: krb5-devel} +%{?with_gssapi:BuildRequires: heimdal-devel} +BuildRequires: libcap-devel BuildRequires: libtool %{?with_mysql:BuildRequires: mysql-devel} %{?with_ldap:BuildRequires: openldap-devel >= 2.3.3} @@ -36,6 +38,7 @@ BuildRequires: pkgconfig %{?with_pgsql:BuildRequires: postgresql-devel} BuildRequires: sed >= 4.0 %{?with_sqlite:BuildRequires: sqlite3-devel} +BuildRequires: zlib-devel Requires(post,preun): /sbin/chkconfig Requires(postun): /usr/sbin/groupdel Requires(postun): /usr/sbin/userdel @@ -49,6 +52,8 @@ Provides: imapdaemon Provides: user(dovecot) BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +%define no_install_post_check_so 1 + %description Dovecot is an IMAP and POP3 server for Linux/UNIX-like systems, written with security primarily in mind. Although it's written with C, @@ -127,28 +132,32 @@ Pakiet programistyczny do tworzenia wtyczek dla dovecota. %setup -q %patch0 -p1 -%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf +%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf %build touch config.rpath %{__libtoolize} -%{__aclocal} +%{__aclocal} -I . %{__autoconf} %{__autoheader} %{__automake} %configure \ --disable-static \ %{?debug:--enable-debug} \ - --enable-header-install \ - %{?with_ldap:--with-ldap} \ + %{?with_ldap:--with-ldap=yes} \ %{?with_mysql:--with-mysql} \ %{?with_pgsql:--with-pgsql} \ - %{?with_sasl:--with-cyrus-sasl2} \ %{?with_sqlite:--with-sqlite} \ - %{?with_gssapi:--with-gssapi} \ + %{?with_gssapi:--with-gssapi=plugin} \ + --with-sql=plugin \ + --with-pam \ + --with-zlib \ + --with-bzlib \ + --with-libcap \ --with-ssl=openssl \ - --with-ssl-dir=/var/lib/openssl \ - --sysconfdir=/etc/%{name} + --with-moduledir=%{_libdir}/%{name}/plugins \ + --with-ssldir=/var/lib/openssl \ + --sysconfdir=/etc %{__make} @@ -158,10 +167,9 @@ install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} install -d $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login} %{__make} install \ - moduledir=%{_libdir}/%{name}/plugins \ DESTDIR=$RPM_BUILD_ROOT -mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{dovecot-example.conf,dovecot.conf} +mv -f $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/example-config/* $RPM_BUILD_ROOT%{_sysconfdir}/dovecot install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name} install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} @@ -169,20 +177,11 @@ install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name} touch $RPM_BUILD_ROOT/etc/security/blacklist.imap -rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/imap}/*.la +rm $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/*}/*.la -# devel -for folder in deliver imap lib lib-imap lib-mail lib-storage; do - install -d $RPM_BUILD_ROOT%{_includedir}/%{name}/$folder - install -p -m644 src/$folder/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/$folder/ -done -for dir in lib lib-imap lib-mail lib-storage; do - install -d $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/src/$dir - install -p -m644 src/$dir/*.a $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/src/$dir -done mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel -rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name} +rm -r $RPM_BUILD_ROOT%{_docdir}/%{name} %clean rm -rf $RPM_BUILD_ROOT @@ -190,6 +189,8 @@ rm -rf $RPM_BUILD_ROOT %pre %groupadd -g 172 dovecot %useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot +%groupadd -g 254 dovenull +%useradd -u 254 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovenull dovenull %post /sbin/chkconfig --add dovecot @@ -211,57 +212,98 @@ fi if [ "$1" = "0" ]; then %userremove dovecot %groupremove dovecot + %userremove dovenull + %groupremove dovenull fi -%triggerpostun -- dovecot < 1:1.1 +%triggerpostun -- dovecot < 1:2.0.0 +# upgrading dovecot < 1.1 echo "Configuration change default_mail_env -> mail_location" %{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf +# upgrading dovecot < 2.0 +i=0 +for a in /etc/dovecot/dovecot-db-example.conf \ + /etc/dovecot/dovecot-dict-sql-example.conf \ + /etc/dovecot/dovecot-ldap-example.conf \ + /etc/dovecot/dovecot-sql-example.conf \ + /etc/dovecot/dovecot.conf; do + if [ -f "$a" ]; then + [ "$i" -eq 0 ] && echo "Read http://wiki2.dovecot.org/Upgrading/2.0" + i=1 + echo "Trying to migrate $a config file to dovecot 2." + cp -a "$a" "$a-1.2.org" + :> "$a.log" + chmod 600 "$a.log" + # convert config and prefix stderr lines with # + %{_bindir}/doveconf -n -c "$a-1.2.org" > "$a" 2> "$a.log" || : + fi +done +if [ "$i" -eq 1 ]; then + echo "Please verify contents of %{_sysconfdir}/%{name}/* files." +fi %files %defattr(644,root,root,755) # COPYING contains some notes, not actual LGPL text %doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt +%attr(755,root,root) %{_bindir}/doveadm +%attr(755,root,root) %{_bindir}/doveconf +%attr(755,root,root) %{_bindir}/dsync %attr(755,root,root) %{_sbindir}/%{name} -%attr(755,root,root) %{_sbindir}/%{name}pw -%attr(750,root,root) %dir %{_sysconfdir}/%{name} +%attr(751,root,root) %dir %{_sysconfdir}/%{name} %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-ldap-example.conf -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}-sql-example.conf +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.ext +%attr(751,root,root) %dir %{_sysconfdir}/%{name}/conf.d +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.conf +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.ext %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name} %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} %attr(754,root,root) /etc/rc.d/init.d/%{name} %dir %{_libdir}/%{name} +%attr(755,root,root) %{_libdir}/%{name}/anvil +%attr(755,root,root) %{_libdir}/%{name}/auth %attr(755,root,root) %{_libdir}/%{name}/checkpassword-reply +%attr(755,root,root) %{_libdir}/%{name}/config %attr(755,root,root) %{_libdir}/%{name}/deliver %attr(755,root,root) %{_libdir}/%{name}/dict -%attr(755,root,root) %{_libdir}/%{name}/dovecot-auth +%attr(755,root,root) %{_libdir}/%{name}/director +%attr(755,root,root) %{_libdir}/%{name}/dns-client +%attr(755,root,root) %{_libdir}/%{name}/doveadm-server +%attr(755,root,root) %{_libdir}/%{name}/dovecot-lda %attr(755,root,root) %{_libdir}/%{name}/gdbhelper -%attr(755,root,root) %{_libdir}/%{name}/idxview %attr(755,root,root) %{_libdir}/%{name}/imap %attr(755,root,root) %{_libdir}/%{name}/imap-login -%attr(755,root,root) %{_libdir}/%{name}/convert-tool -%attr(755,root,root) %{_libdir}/%{name}/expire-tool %attr(755,root,root) %{_libdir}/%{name}/listview -%attr(755,root,root) %{_libdir}/%{name}/logview +%attr(755,root,root) %{_libdir}/%{name}/lmtp +%attr(755,root,root) %{_libdir}/%{name}/log %attr(755,root,root) %{_libdir}/%{name}/maildirlock %attr(755,root,root) %{_libdir}/%{name}/pop3 %attr(755,root,root) %{_libdir}/%{name}/pop3-login %attr(755,root,root) %{_libdir}/%{name}/rawlog -%attr(755,root,root) %{_libdir}/%{name}/ssl-build-param +%attr(755,root,root) %{_libdir}/%{name}/script +%attr(755,root,root) %{_libdir}/%{name}/script-login +%attr(755,root,root) %{_libdir}/%{name}/ssl-params +%attr(755,root,root)%{_libdir}/%{name}/lib*.so* %dir %{_libdir}/%{name}/plugins %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so -%dir %{_libdir}/%{name}/plugins/imap -%attr(755,root,root)%{_libdir}/%{name}/plugins/imap/*.so -%dir %{_libdir}/%{name}/plugins/lda -%attr(755,root,root) %{_libdir}/%{name}/plugins/lda/*.so -%dir %{_libdir}/%{name}/plugins/pop3 -%attr(755,root,root) %{_libdir}/%{name}/plugins/pop3/*.so +%dir %{_libdir}/%{name}/plugins/auth +%attr(755,root,root)%{_libdir}/%{name}/plugins/auth/*.so +%dir %{_libdir}/%{name}/plugins/dict +%attr(755,root,root)%{_libdir}/%{name}/plugins/dict/*.so +%dir %{_libdir}/%{name}/plugins/doveadm +%attr(755,root,root)%{_libdir}/%{name}/plugins/doveadm/*.so %dir /var/lib/dovecot %dir /var/run/dovecot -%attr(750,root,dovecot) %dir /var/run/dovecot/login +%attr(750,root,dovenull) %dir /var/run/dovecot/login + +%{_mandir}/man1/deliver.1* +%{_mandir}/man1/dove*.1* +%{_mandir}/man1/dsync.1* +%{_mandir}/man7/doveadm-search-query.7* %files devel %defattr(644,root,root,755) %{_libdir}/%{name}-devel %{_includedir}/%{name} +%{_aclocaldir}/dovecot.m4