]> git.pld-linux.org Git - packages/dovecot.git/blame_incremental - dovecot.spec
Release 3 (by relup.sh)
[packages/dovecot.git] / dovecot.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without gssapi # without GSSAPI support
4%bcond_without ldap # without LDAP auth
5%bcond_without lua # without Lua auth
6%bcond_without mysql # without MySQL auth
7%bcond_without pgsql # without PostgreSQL auth
8%bcond_without sqlite # without SQLite3 auth
9%bcond_without sasl # without SASL auth
10%bcond_without tests # tests
11
12Summary: IMAP and POP3 server written with security primarily in mind
13Summary(pl.UTF-8): Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie
14Name: dovecot
15Version: 2.3.21
16Release: 3
17Epoch: 1
18License: MIT (libraries), LGPL v2.1 (the rest)
19Group: Networking/Daemons
20Source0: http://dovecot.org/releases/2.3/%{name}-%{version}.tar.gz
21# Source0-md5: 8961c3dafd845a25fd55e7903ffc3755
22Source1: %{name}.pamd
23Source2: %{name}.init
24Source3: %{name}.sysconfig
25Source4: %{name}.tmpfiles
26Patch0: %{name}-config.patch
27Patch1: %{name}-rpath.patch
28Patch2: %{name}-shebang.patch
29Patch3: proc-status.patch
30Patch4: openssl3.patch
31URL: http://dovecot.org/
32BuildRequires: autoconf
33BuildRequires: automake
34BuildRequires: bzip2-devel
35BuildRequires: clucene-core-devel >= 2.3.3.4
36BuildRequires: curl-devel
37%{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0}
38BuildRequires: expat-devel
39BuildRequires: gettext-tools
40%{?with_gssapi:BuildRequires: heimdal-devel}
41BuildRequires: libapparmor-devel
42BuildRequires: libcap-devel
43BuildRequires: libicu-devel
44BuildRequires: libstemmer-devel
45BuildRequires: libexttextcat-devel
46BuildRequires: libtool
47%{?with_lua:BuildRequires: lua53-devel}
48BuildRequires: lz4-devel
49%{?with_mysql:BuildRequires: mysql-devel}
50%{?with_ldap:BuildRequires: openldap-devel >= 2.3.3}
51BuildRequires: openssl-devel >= 0.9.7d
52BuildRequires: pam-devel
53BuildRequires: pkgconfig
54BuildRequires: pkgconfig(lua) >= 5.1
55%{?with_pgsql:BuildRequires: postgresql-devel}
56BuildRequires: rpmbuild(macros) >= 1.647
57BuildRequires: sed >= 4.0
58%{?with_sqlite:BuildRequires: sqlite3-devel}
59BuildRequires: xz-devel
60BuildRequires: zlib-devel
61BuildRequires: zstd-devel
62Requires(post,preun): /sbin/chkconfig
63Requires(postun): /usr/sbin/groupdel
64Requires(postun): /usr/sbin/userdel
65Requires(pre): /bin/id
66Requires(pre): /usr/bin/getgid
67Requires(pre): /usr/sbin/groupadd
68Requires(pre): /usr/sbin/useradd
69Requires: %{name}-libs = %{epoch}:%{version}-%{release}
70Requires: pam >= 0.79.0
71Provides: group(dovecot)
72Provides: imapdaemon
73Provides: pop3daemon
74Provides: user(dovecot)
75# heimdal-daemons in PLD contained only "popper" (kerberized POP3 daemon)
76%{?with_gssapi:Obsoletes: heimdal-daemons}
77BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
78
79%define no_install_post_check_so 1
80
81%description
82Dovecot is an IMAP and POP3 server for Linux/UNIX-like systems,
83written with security primarily in mind. Although it's written with C,
84it uses several coding techniques to avoid most of the common
85pitfalls.
86
87Dovecot can work with standard mbox and maildir formats and it's fully
88compatible with UW-IMAP and Courier IMAP servers as well as mail
89clients accessing the mailboxes directly. It's also planned to support
90storing mails in SQL databases.
91
92Dovecot is easy to set up and doesn't require special maintenance.
93Only thing you need is to get the authentication working properly - if
94your users are in /etc/passwd there's hardly anything you have to do.
95
96Dovecot should be pretty fast, mostly because of index files that
97Dovecot maintains; instead of having to scan through all the data in
98mailbox, Dovecot can get most of the wanted information from index
99with little effort.
100
101Status:
102- should be quite ready for use with normal IMAP clients
103- complete IMAP4rev1 and POP3 support
104- supports THREAD, SORT and IDLE extensions, required by many IMAP
105 webmails
106- complete TLS/SSL support
107- IPv6 ready
108- shared mailboxes aren't yet supported
109- Maildir++ quota is supported, bad hard filesystem quota can be
110 problematic
111
112%description -l pl.UTF-8
113Dovecot to serwer IMAP i POP3 dla systemów linuksowych/uniksowych,
114pisany głównie z myślą o bezpieczeństwie. Chociaż jest pisany w C,
115używa kilku technik kodowania zapobiegających większości popularnych
116pułapek.
117
118Dovecot może działać ze standardowymi formatami mbox i maildir, jest
119całkowicie kompatybilny z serwerami UW-IMAP i Courier IMAP, a także z
120klientami pocztowymi bezpośrednio dostającymi się do skrzynek.
121Planowana jest także obsługa przechowywania listów w bazach SQL.
122
123Dovecot jest łatwy do skonfigurowania i nie wymaga specjalnego
124nadzoru. Wystarczy tylko doprowadzić do działania uwierzytelnianie -
125jeśli użytkownicy są w /etc/passwd, to właściwie nie trzeba nic
126zmieniać.
127
128Dovecot powinien być w miarę szybki, głównie z powodu plików
129indeksowych utrzymywanych przez serwer; zamiast potrzeby skanowania
130wszystkich danych w skrzynce, Dovecot może małym kosztem uzyskać
131większość potrzebnych informacji z indeksu.
132
133Stan:
134- powinien być gotowy do użycia ze zwykłymi klientami IMAP
135- pełna obsługa IMAP4rev1 i POP3
136- obsługa rozszerzeń THREAD, SORT i IDLE, wymaganych przez wiele
137 webmaili IMAP
138- obsługa IPv6
139- pełna obsługa TLS/SSL
140- quota Maildir++ jest obsługiwana, ale twarda quota na systemach
141 plików może być problematyczna
142
143%package libs
144Summary: Dovecot shared libraries
145Summary(pl.UTF-8): Współdzielone biblioteki Dovecota
146Group: Development/Libraries
147
148%description libs
149Dovecot shared libraries.
150
151%description libs -l pl.UTF-8
152Współdzielone biblioteki Dovecota.
153
154%package devel
155Summary: Development package for Dovecot plugins
156Summary(pl.UTF-8): Pakiet programistyczny do tworzenia wtyczek dla Dovecota
157Group: Development/Libraries
158Requires: %{name}-libs = %{epoch}:%{version}-%{release}
159
160%description devel
161Development package for Dovecot plugins.
162
163%description devel -l pl.UTF-8
164Pakiet programistyczny do tworzenia wtyczek dla Dovecota.
165
166%prep
167%setup -q
168%patch0 -p1
169%patch1 -p1
170%patch2 -p1
171%patch3 -p1
172%patch4 -p1
173
174%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf
175
176%{__sed} -i 's,#!/usr/bin/env bash,#!/bin/bash,' src/util/health-check.sh
177
178%build
179touch config.rpath
180%{__libtoolize}
181%{__aclocal} -I . -I m4
182%{__autoconf}
183%{__autoheader}
184%{__automake}
185%configure \
186 ac_cv_path_VALGRIND=reject \
187 CPPFLAGS="%{rpmcppflags} -I/usr/include/libstemmer -D_LINUX_QUOTA_VERSION=2" \
188 --disable-static \
189 --enable-hardening \
190 %{?debug:--enable-debug} \
191 %{?with_ldap:--with-ldap=yes} \
192 %{?with_mysql:--with-mysql} \
193 %{?with_pgsql:--with-pgsql} \
194 %{?with_sqlite:--with-sqlite} \
195 %{?with_gssapi:--with-gssapi=plugin} \
196 %{?with_lua:--with-lua=plugin} \
197 --with-lucene \
198 --with-stemmer \
199 --with-solr \
200 --with-sql=plugin \
201 --with-pam \
202 --with-zlib \
203 --with-bzlib \
204 --with-libcap \
205 --with-ssl=openssl \
206 --with-zstd \
207%ifarch x32
208 --without-libunwind \
209%endif
210 --with-moduledir=%{_libdir}/%{name}/plugins \
211 --with-ssldir=/var/lib/openssl \
212 --sysconfdir=%{_sysconfdir} \
213 --with-systemdsystemunitdir=%{systemdunitdir}
214
215%{__make}
216
217%{?with_tests:%{__make} check}
218
219%install
220rm -rf $RPM_BUILD_ROOT
221install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} \
222 $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login} \
223 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
224
225%{__make} install \
226 DESTDIR=$RPM_BUILD_ROOT
227
228mv -f $RPM_BUILD_ROOT%{_datadir}/doc/%{name}/example-config/* $RPM_BUILD_ROOT%{_sysconfdir}/dovecot
229
230cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
231install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
232cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
233install %{SOURCE4} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
234
235touch $RPM_BUILD_ROOT/etc/security/blacklist.imap
236
237find $RPM_BUILD_ROOT%{_libdir}/%{name} -name '*.la' | xargs rm
238
239%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
240%{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/README
241
242%clean
243rm -rf $RPM_BUILD_ROOT
244
245%pre
246%groupadd -g 172 dovecot
247%useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
248%groupadd -g 254 dovenull
249%useradd -u 254 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovenull dovenull
250
251%post
252/sbin/chkconfig --add dovecot
253%service dovecot restart
254%systemd_post dovecot.socket dovecot.service
255
256%preun
257if [ "$1" = "0" ]; then
258 %service dovecot stop
259 /sbin/chkconfig --del dovecot
260fi
261%systemd_preun dovecot.service dovecot.socket
262
263%postun
264if [ "$1" = "0" ]; then
265 %userremove dovecot
266 %groupremove dovecot
267 %userremove dovenull
268 %groupremove dovenull
269fi
270%systemd_reload
271
272%post libs -p /sbin/ldconfig
273%postun libs -p /sbin/ldconfig
274
275%triggerin -- pam
276# restart devocot if pam is upgraded
277# (dovecot is linked with old libpam but tries to open modules linked with new libpam)
278if [ "$2" != 1 ]; then
279 %service -q dovecot restart
280fi
281
282%triggerpostun -- dovecot < 1:2.0.0
283# upgrading dovecot < 1.1
284echo "Configuration change default_mail_env -> mail_location"
285%{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf
286# upgrading dovecot < 2.0
287i=0
288for a in /etc/dovecot/dovecot-db-example.conf \
289 /etc/dovecot/dovecot-dict-sql-example.conf \
290 /etc/dovecot/dovecot-ldap-example.conf \
291 /etc/dovecot/dovecot-sql-example.conf \
292 /etc/dovecot/dovecot.conf; do
293 if [ -f "$a" ]; then
294 [ "$i" -eq 0 ] && echo "Read http://wiki2.dovecot.org/Upgrading/2.0"
295 i=1
296 echo "Trying to migrate $a config file to dovecot 2."
297 cp -a "$a" "$a-1.2.org"
298 :> "$a.log"
299 chmod 600 "$a.log"
300 # convert config and prefix stderr lines with #
301 %{_bindir}/doveconf -n -c "$a-1.2.org" > "$a" 2> "$a.log" || :
302 fi
303done
304if [ "$i" -eq 1 ]; then
305 echo "Please verify contents of %{_sysconfdir}/%{name}/* files."
306fi
307
308# < 1:2.2.4-2
309%systemd_trigger dovecot.service dovecot.socket
310
311%files
312%defattr(644,root,root,755)
313# COPYING contains some notes, not actual LGPL text
314%doc AUTHORS COPYING ChangeLog NEWS README TODO doc/*.txt doc/*.c*f doc/wiki/*.txt
315%attr(755,root,root) %{_bindir}/doveadm
316%attr(755,root,root) %{_bindir}/doveconf
317%attr(755,root,root) %{_bindir}/dovecot-sysreport
318%attr(755,root,root) %{_bindir}/dsync
319%attr(755,root,root) %{_sbindir}/%{name}
320%attr(751,root,root) %dir %{_sysconfdir}/%{name}
321%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
322%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.ext
323%attr(751,root,root) %dir %{_sysconfdir}/%{name}/conf.d
324%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.conf
325%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/conf.d/*.ext
326%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
327%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.imap
328%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
329%attr(754,root,root) /etc/rc.d/init.d/%{name}
330%if "%{_libexecdir}" != "%{_libdir}"
331%dir %{_libexecdir}/%{name}
332%endif
333%attr(755,root,root) %{_libexecdir}/%{name}/aggregator
334%attr(755,root,root) %{_libexecdir}/%{name}/anvil
335%attr(755,root,root) %{_libexecdir}/%{name}/auth
336%attr(755,root,root) %{_libexecdir}/%{name}/checkpassword-reply
337%attr(755,root,root) %{_libexecdir}/%{name}/config
338%attr(755,root,root) %{_libexecdir}/%{name}/decode2text.sh
339%attr(755,root,root) %{_libexecdir}/%{name}/deliver
340%attr(755,root,root) %{_libexecdir}/%{name}/dict
341%attr(755,root,root) %{_libexecdir}/%{name}/director
342%attr(755,root,root) %{_libexecdir}/%{name}/dns-client
343%attr(755,root,root) %{_libexecdir}/%{name}/doveadm-server
344%attr(755,root,root) %{_libexecdir}/%{name}/dovecot-lda
345%attr(755,root,root) %{_libexecdir}/%{name}/gdbhelper
346%attr(755,root,root) %{_libexecdir}/%{name}/health-check.sh
347%attr(755,root,root) %{_libexecdir}/%{name}/imap
348%attr(755,root,root) %{_libexecdir}/%{name}/imap-hibernate
349%attr(755,root,root) %{_libexecdir}/%{name}/imap-login
350%attr(755,root,root) %{_libexecdir}/%{name}/imap-urlauth
351%attr(755,root,root) %{_libexecdir}/%{name}/imap-urlauth-login
352%attr(755,root,root) %{_libexecdir}/%{name}/imap-urlauth-worker
353%attr(755,root,root) %{_libexecdir}/%{name}/indexer
354%attr(755,root,root) %{_libexecdir}/%{name}/indexer-worker
355%attr(755,root,root) %{_libexecdir}/%{name}/ipc
356%attr(755,root,root) %{_libexecdir}/%{name}/lmtp
357%attr(755,root,root) %{_libexecdir}/%{name}/log
358%attr(755,root,root) %{_libexecdir}/%{name}/maildirlock
359%attr(755,root,root) %{_libexecdir}/%{name}/old-stats
360%attr(755,root,root) %{_libexecdir}/%{name}/pop3
361%attr(755,root,root) %{_libexecdir}/%{name}/pop3-login
362%attr(755,root,root) %{_libexecdir}/%{name}/quota-status
363%attr(755,root,root) %{_libexecdir}/%{name}/rawlog
364%attr(755,root,root) %{_libexecdir}/%{name}/replicator
365%attr(755,root,root) %{_libexecdir}/%{name}/script
366%attr(755,root,root) %{_libexecdir}/%{name}/script-login
367%attr(755,root,root) %{_libexecdir}/%{name}/stats
368%attr(755,root,root) %{_libexecdir}/%{name}/submission
369%attr(755,root,root) %{_libexecdir}/%{name}/submission-login
370%attr(755,root,root) %{_libexecdir}/%{name}/xml2text
371%attr(755,root,root) %{_libdir}/%{name}/libdcrypt_openssl.so
372%dir %{_libdir}/%{name}/plugins
373%attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
374%dir %{_libdir}/%{name}/plugins/auth
375%attr(755,root,root) %{_libdir}/%{name}/plugins/auth/*.so
376%dir %{_libdir}/%{name}/plugins/dict
377%attr(755,root,root) %{_libdir}/%{name}/plugins/dict/*.so
378%dir %{_libdir}/%{name}/plugins/doveadm
379%attr(755,root,root) %{_libdir}/%{name}/plugins/doveadm/*.so
380%dir %{_libdir}/%{name}/plugins/old-stats
381%attr(755,root,root) %{_libdir}/%{name}/plugins/old-stats/*.so
382%{_datadir}/dovecot
383%{systemdunitdir}/dovecot.service
384%{systemdunitdir}/dovecot.socket
385/usr/lib/tmpfiles.d/%{name}.conf
386%dir /var/lib/dovecot
387%dir /var/run/dovecot
388%attr(750,root,dovenull) %dir /var/run/dovecot/login
389
390%{_mandir}/man1/deliver.1*
391%{_mandir}/man1/dove*.1*
392%{_mandir}/man1/dsync.1*
393%{_mandir}/man7/doveadm-search-query.7*
394
395%files libs
396%defattr(644,root,root,755)
397%dir %{_libdir}/%{name}
398
399%attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0.0.0
400%attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0.0.0
401%attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so.0.0.0
402%attr(755,root,root) %{_libdir}/%{name}/libdovecot-fts.so.0.0.0
403%attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0.0.0
404%{?with_ldap:%attr(755,root,root) %{_libdir}/%{name}/libdovecot-ldap.so.0.0.0}
405%attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0.0.0
406%attr(755,root,root) %{_libdir}/%{name}/libdovecot-lua.so.0.0.0
407%attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0.0.0
408%attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0.0.0
409%attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage-lua.so.0.0.0
410# Note: we are in %{_libdir}/dovecot, ldconfig does not look into this
411# directory. This is why the following files are not %ghost
412%attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0
413%attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0
414%attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so.0
415%attr(755,root,root) %{_libdir}/%{name}/libdovecot-fts.so.0
416%attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0
417%{?with_ldap:%attr(755,root,root) %{_libdir}/%{name}/libdovecot-ldap.so.0}
418%attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0
419%attr(755,root,root) %{_libdir}/%{name}/libdovecot-lua.so.0
420%attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0
421%attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0
422%attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage-lua.so.0
423
424%files devel
425%defattr(644,root,root,755)
426%attr(755,root,root) %{_libdir}/%{name}/libdovecot.so
427%attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so
428%attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so
429%attr(755,root,root) %{_libdir}/%{name}/libdovecot-fts.so
430%attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so
431%{?with_ldap:%attr(755,root,root) %{_libdir}/%{name}/libdovecot-ldap.so}
432%attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so
433%attr(755,root,root) %{_libdir}/%{name}/libdovecot-lua.so
434%attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so
435%attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so
436%attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage-lua.so
437%{_libdir}/%{name}/%{name}-config
438%{_includedir}/%{name}
439%{_aclocaldir}/dovecot.m4
This page took 0.058623 seconds and 5 git commands to generate.