Re: Dovecot w PLD - z managesieve (spakietowane, prośba o ocenę)

Jacek Osiecki joshua w hybrid.pl
Wto, 29 Wrz 2009, 22:44:11 CEST


On Tue, 29 Sep 2009, Pawel Dlugosz wrote:

>  Jacek Osiecki pisze:
>  [..]
> >  Ponieważ trochę tego jest, to zrobiłem src.rpma i wystawiłem tu:
> >  http://hotel.silvercube.pl/dovecot-1.2.5-1c.src.rpm
> >  Jeśli ktoś uzna że nie zrobiłem strasznego burdelu to fajnie gdyby to
> >  poszło
> >  do dystrybucji :)
>  Ja bym nawet może i uznał, ale jakbyś podłączył w tym wątku diffy do
>  speców to byłoby _nieco_ łatwiej :)

OK, podrzucony diff. Doszedł jeszcze jeden ważny patch:
dovecot-quotafix.patch, który Timo wypuścił bo dovecot 1.2.5 się
wywalał na quotach innych niż "Maildir++"

Wszystko jest tutaj: http://hotel.silvercube.pl/dovecot/

Pozdrawiam,
-- 
Jacek Osiecki joshua w ceti.pl GG:3828944
I don't want something I need. I want something I want.
-------------- następna część ---------
--- dovecot.spec.orig	2009-09-14 08:08:59.000000000 +0200
+++ utf_dovecot.spec	2009-09-29 21:25:16.000000000 +0200
@@ -1,4 +1,4 @@
-# $Revision: 1.120 $, $Date: 2009/09/14 06:08:59 $
+# $Revision: 1.121 $, $Date: 2009/09/14 06:08:59 $
 #
 # Conditional build:
 %bcond_with	gssapi	# with GSSAPI support
@@ -7,21 +7,29 @@
 %bcond_without	pgsql	# without PostgreSQL auth
 %bcond_without	sqlite	# without SQLite3 auth
 %bcond_without	sasl	# without SASL auth
+%define dovecot_series  1.2
+%define sieve_version   0.1.12
+%define managesieve_version   0.11.9
 #
 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.2.5
-Release:	1
+Release:	1c
 Epoch:		1
 License:	MIT (libraries), LGPL v2.1 (the rest)
 Group:		Networking/Daemons
-Source0:	http://dovecot.org/releases/1.2/%{name}-%{version}.tar.gz
+Source0:	http://dovecot.org/releases/%{dovecot_series}/%{name}-%{version}.tar.gz
 # Source0-md5:	8b057903d6a527dac964b51c5638c625
 Source1:	%{name}.pamd
 Source2:	%{name}.init
 Source3:	%{name}.sysconfig
-Patch0:		%{name}-config.patch
+Source4:  http://www.rename-it.nl/dovecot/%{dovecot_series}/dovecot-%{dovecot_series}-sieve-%{sieve_version}.tar.gz
+Source5:  http://www.rename-it.nl/dovecot/%{dovecot_series}/dovecot-%{dovecot_series}-managesieve-%{managesieve_version}.tar.gz
+Patch0:   %{name}-managesieve.patch
+Patch1:   %{name}-config.patch
+Patch2:   %{name}-docdir.patch
+Patch3:   %{name}-quotafix.patch
 URL:		http://dovecot.org/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -116,6 +124,25 @@
 - quota Maildir++ jest obsługiwana, ale twarda quota na systemach
   plików może być problematyczna
 
+%package sieve
+Summary:  Sieve plugin for dovecot
+Summary(pl.UTF-8):  Wtyczka Sieve dla dovecota
+Group:    Daemons
+
+%description sieve
+Sieve is a language that can be used to create filters for electronic
+mail. It owes its creation to the CMU Cyrus Project, creators of Cyrus
+IMAP server.
+
+This dovecot plugin is derived is from Cyrus IMAP v2.2.12.
+
+%description sieve -l pl.UTF-8
+Sieve to język używany do tworzenia filtrów dla poczty elektronicznej.
+Zawdzięcza swoje powstanie projektowi CMU Cyrus, twórcom serwera
+pocztowego Cyrus IMAP.
+
+Ta wtyczka dovecota wywodzi się z serwera Cyrus IMAP w wersji 2.2.12.
+
 %package devel
 Summary:	Development package for dovecot plugins
 Summary(pl.UTF-8):	Pakiet programistyczny do tworzenia wtyczek dla dovecota
@@ -129,12 +156,19 @@
 Pakiet programistyczny do tworzenia wtyczek dla dovecota.
 
 %prep
-%setup -q
+%setup -q -b 0 -T
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%setup -q -b 4 -T -D
+%setup -q -b 5 -T -D
 
 %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf
 
 %build
+
+# dovecot base
 touch config.rpath
 %{__libtoolize}
 %{__aclocal}
@@ -155,14 +189,51 @@
 	--with-libcap \
 	--with-ssl=openssl \
 	--with-ssldir=/var/lib/openssl \
+	--with-docs=no \
 	--sysconfdir=/etc/%{name}
 
 %{__make}
 
+# dovecot-sieve
+echo -ne "\n\n*****************************\nCompiling dovecot-sieve\n*****************************\n\n"
+cd  $RPM_BUILD_DIR/%{name}-%{dovecot_series}-sieve-%{sieve_version}
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+        --disable-static \
+        --with-dovecot=$RPM_BUILD_DIR/%{name}-%{version}
+
+%{__make} \
+        moduledir=%{_libdir}/dovecot/plugins
+        #dovecot_incdir=$RPM_BUILD_DIR/%{name}-%{version}/src/lib \
+
+# dovecot-managesieve
+echo -ne "\n\n*****************************\nCompiling dovecot-managesieve\n*****************************\n\n"
+cd $RPM_BUILD_DIR/dovecot-%{dovecot_series}-managesieve-%{managesieve_version}
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+        --disable-static \
+        --with-dovecot=$RPM_BUILD_DIR/%{name}-%{version} \
+        --with-dovecot-sieve=$RPM_BUILD_DIR/%{name}-%{dovecot_series}-sieve-%{sieve_version}
+
+%{__make}
+
 %install
+cd $RPM_BUILD_DIR/%{name}-%{version}
 rm -rf $RPM_BUILD_ROOT
 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}
+DESTDIR=$RPM_BUILD_ROOT make install-confDATA
+cd doc
+DESTDIR=$RPM_BUILD_ROOT make install-confDATA
+cd ..
 
 %{__make} install \
 	moduledir=%{_libdir}/%{name}/plugins \
@@ -176,8 +247,6 @@
 
 touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
 
-rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/auth,/imap}/*.la
-
 # devel
 for folder in deliver imap lib lib-imap lib-mail lib-storage; do
 	install -d $RPM_BUILD_ROOT%{_includedir}/%{name}/$folder
@@ -190,9 +259,25 @@
 done
 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel
 
-rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
+# sieve
+cd  $RPM_BUILD_DIR/%{name}-%{dovecot_series}-sieve-%{sieve_version}
+%{__make} install \
+        DESTDIR=$RPM_BUILD_ROOT \
+        moduledir=%{_libdir}/dovecot/plugins
+
+rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins{,/auth,/imap,/lda}/*.la
+
+# managesieve
+cd  $RPM_BUILD_DIR/%{name}-%{dovecot_series}-managesieve-%{managesieve_version}
+%{__make} install \
+        DESTDIR=$RPM_BUILD_ROOT \
+        moduledir=%{_libdir}/dovecot/plugins
+
+# wracamy do katalogu
+cd $RPM_BUILD_DIR/%{name}-%{version}
 
 %clean
+rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
 rm -rf $RPM_BUILD_ROOT
 
 %pre
@@ -229,6 +314,7 @@
 %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
+# %{_docdir}/%{name}/*.txt %{_docdir}/%{name}/wiki/*.txt
 %attr(755,root,root) %{_sbindir}/%{name}
 %attr(755,root,root) %{_sbindir}/%{name}pw
 %attr(750,root,root) %dir %{_sysconfdir}/%{name}
@@ -250,6 +336,8 @@
 %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}/managesieve
+%attr(755,root,root) %{_libdir}/%{name}/managesieve-login
 %attr(755,root,root) %{_libdir}/%{name}/imap-utf7
 %attr(755,root,root) %{_libdir}/%{name}/convert-tool
 %attr(755,root,root) %{_libdir}/%{name}/expire-tool
@@ -280,12 +368,23 @@
 %{_libdir}/%{name}-devel
 %{_includedir}/%{name}
 
+%files sieve
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog NEWS
+%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_libdir}/dovecot/plugins/lda/lib90_sieve_plugin.so
+%{_mandir}/man1/*.1.gz
+
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <feedback w pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log: dovecot.spec,v $
+Revision 1.121  2009/09/29 11:24:59  joshua
+- combined dovecot and dovecot-sieve source rpms
+- added dovecot-managesieve 
+
 Revision 1.120  2009/09/14 06:08:59  dzeus
 - up to 1.2.5
 
-------------- następna część ---------
--- a/src/plugins/quota/quota.c	Mon Sep 28 11:11:54 2009 -0400
+++ b/src/plugins/quota/quota.c	Mon Sep 28 14:24:14 2009 -0400
@@ -444,8 +444,10 @@ static int quota_root_get_rule_limits(st
 	bool found;
 
 	if (!root->set->force_default_rule) {
-		if (root->backend.v.init_limits(root) < 0)
-			return -1;
+		if (root->backend.v.init_limits != NULL) {
+			if (root->backend.v.init_limits(root) < 0)
+				return -1;
+		}
 	}
 
 	bytes_limit = root->bytes_limit;


Więcej informacji o liście dyskusyjnej pld-devel-pl