/[packages]/cauldron/cyrus-imapd/current/SPECS/cyrus-imapd.spec
ViewVC logotype

Annotation of /cauldron/cyrus-imapd/current/SPECS/cyrus-imapd.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 410430 - (hide annotations) (download)
Thu Apr 18 15:28:28 2013 UTC (11 years ago) by spuhler
File size: 23157 byte(s)
added idled command
corrected the config section so the idle file will actually be built.

1 ennael 33418 # use saslauth group if
2     %define SASLGROUP 0
3     %{?_with_saslgroup: %{expand: %%define SASLGROUP 1}}
4    
5     # preforking cyrus.conf as default
6     %define PREFORK 1
7     %{?_without_prefork: %{expand: %%define PREFORK 0}}
8    
9     # enable idled (default no)
10 spuhler 410430 %define IDLED 1
11 ennael 33418 %{?_with_idled: %{expand: %%define IDLED 1}}
12    
13     # enable automatic mailbox creation on deliver (default no):
14     %define build_autocreate 1
15     %{?_without_autocreate: %define build_autocreate 0}
16    
17     # create on demand folder requested by sieve filter (default no):
18     %define build_autosieve 1
19     %{?_without_autosieve: %define build_autosieve 0}
20    
21     # remove quota files extension:
22 colin 400402 %define build_rmquota 0
23     %{?_with_rmquota: %define build_rmquota 1}
24 ennael 33418
25     # snmp support
26     %global with_snmp 1
27     %{?_without_snmp: %global with_snmp 0}
28    
29     # ldap/pts support
30     %global with_ldap 1
31     %{?_without_ldap: %global with_ldap 0}
32    
33     %global with_mysql 1
34     %{?_without_mysql: %global with_mysql 0}
35    
36     %global with_pgsql 1
37     %{?_without_pgsql: %global with_pgsql 0}
38    
39     %global with_sqlite 1
40     %{?_without_sqlite: %global with_sqlite 0}
41    
42     # virtual domains in LDAP support
43     # needed by Kolab2
44     %define build_virtualdomains_in_ldap 1
45     %{?_without_virtualdomains_in_ldap: %define build_virtualdomains_in_ldap 0}
46    
47     Summary: A high-performance mail store with IMAP and POP3 support
48     Name: cyrus-imapd
49 spuhler 331230 Version: 2.4.17
50 spuhler 410430 Release: %mkrel 6
51 ennael 33418 License: OSI Approved
52     Group: System/Servers
53     URL: http://asg.web.cmu.edu/cyrus/imapd/
54 spuhler 331230 Source0: ftp://ftp.cyrusimap.org/cyrus-imapd/%{name}-%{version}.tar.gz
55     Source1: ftp://ftp.cyrusimap.org/cyrus-imapd//%{name}-%{version}.tar.gz.sig
56 ennael 33418 Source2: cyrus-procmailrc
57     Source4: cyrus-user-procmailrc.template
58     Source6: cyrus-imapd.imap-2.1.x-conf
59     Source7: cyrus-imapd.pamd-0.77
60     Source8: cyrus-imapd.pamd
61 guillomovitch 232091 Source10: cyrus-imapd.service
62 ennael 33418 Source11: cyrus-imapd.init
63     Source12: cyrus-imapd.sysconfig
64     Source13: http://clement.hermann.free.fr/scripts/Cyrus/imapcreate.pl
65     Source14: cyrus-imapd.README.RPM
66     Source15: cyrus-imapd.cvt_cyrusdb_all
67     Source19: cyrus-imapd-procmail+cyrus.mc
68     Source20: cyrus-imapd.cron-daily
69     Source21: http://ftp.andrew.cmu.edu/pub/net/mibs/cmu/cmu.mib
70 spuhler 232749 Source22: cyr_systemd_helper
71 ennael 33418 # This patch fixes the perl install path for mdk9.0 and later
72     Patch1: cyrus-imapd-mdk9.0perl-patch
73     # cyrus-master instead of master in syslog
74     Patch2: cyrus-imapd-logident.patch
75 colin 400402 # (cg) Updated auto* patches for 2.4.x found via:
76     # https://blog.vx.sk/archives/13-Autocreate-and-autosieve-patches-for-Cyrus-IMAP-Server-24.html
77     # available here; http://www.vx.sk/download/patches/cyrus-imapd/
78 ennael 33418 # Autocreate INBOX patch (http://email.uoa.gr/projects/cyrus/autocreate/)
79 colin 400402 Patch3: http://www.vx.sk/download/patches/cyrus-imapd/cyrus-imapd-2.4.4-autocreate-0.10-0.patch
80 ennael 33418 # Create on demand folder requested by sieve filter (http://email.uoa.gr/projects/cyrus/autosievefolder/)
81 colin 400402 Patch4: http://www.vx.sk/download/patches/cyrus-imapd/cyrus-imapd-2.4.12-autosieve-0.6.0.patch
82 ennael 33418 # Remove QUOTA patch (http://email.uoa.gr/projects/cyrus/quota-patches/rmquota/)
83     Patch5: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.9/cyrus-imapd-2.3.9-rmquota-0.5-0.diff
84     # command line switch to disallow plaintext login
85 colin 400402 Patch6: cyrus-imapd-2.4.17-plaintext-cmd-line.patch
86 ennael 33418 # (oe) for kolab2: Patch to support virtdomains: ldap (parse domain from "email" field an LDAP user entry)
87     Patch8: cyrus-imapd-kolab-ldap.diff
88     # (bluca) add ptloader to cyrus.conf
89     Patch10: cyrus-imapd-ptloader-conf.diff
90     # (bluca) fix LDAP_OPT_X_SASL_SECPROPS error in ptloader
91     Patch11: cyrus-imapd-ptloader-secprops.diff
92     # remove verbosity of some syslog messages (simon matter)
93     Patch13: cyrus-imapd-2.1.16-getrlimit.patch
94     Patch14: cyrus-imapd-2.3.12-skiplist_verbosity.patch
95     # Other patches from simon matter
96     Patch17: cyrus-imapd-2.3.7-mancyrusdb.patch
97     Patch18: cyrus-imapd-2.3.13-make_md5_sha1_dirs.patch
98     Patch19: cyrus-imapd-2.3.11-mkimap.patch
99     Patch21: cyrus-imapd-2.3.16-sieve_port.patch
100    
101     # with previous versions of sasl, imap LOGIN would fail
102     Requires: %{mklibname sasl 2} >= 2.1.15
103     #Requires: krb5-libs
104 guillomovitch 232094 Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd
105 tmb 233547 Requires(preun):/usr/sbin/userdel /usr/sbin/groupdel
106 tmb 233654 Requires(post): rpm-helper >= 0.24.8-1
107     Requires(preun): rpm-helper >= 0.24.8-1
108    
109 ennael 33418 Provides: imap
110     Provides: imap-server
111 spuhler 196262 BuildRequires: autoconf
112 ennael 33418 BuildRequires: libsasl-devel >= 2.1.15
113 spuhler 201745 BuildRequires: ext2fs-devel
114 ennael 33418 BuildRequires: perl-devel
115     BuildRequires: tcp_wrappers-devel
116 spuhler 201745 BuildRequires: db-devel
117 ennael 33418 BuildRequires: openssl-devel
118     BuildRequires: flex
119     BuildRequires: bison
120     BuildRequires: groff >= 1.15-8
121     %if %{with_snmp}
122 spuhler 196262 BuildRequires: net-snmp-devel >= 5.1
123 spuhler 201745 BuildRequires: elfutils-devel
124 ennael 33418 Requires: net-snmp-mibs
125     %endif
126     %if %{with_ldap}
127     BuildRequires: openldap-devel
128     %else
129     %if %{build_virtualdomains_in_ldap}
130     BuildRequires: openldap-devel
131     %endif
132     %endif
133     %if %{with_mysql}
134     BuildRequires: mysql-devel
135     %endif
136     %if %{with_pgsql}
137     BuildRequires: postgresql-devel
138     %endif
139     %if %{with_sqlite}
140     BuildRequires: sqlite3-devel
141     %endif
142    
143     %if %{SASLGROUP}
144     %define _saslgroup saslauth
145     %endif
146     %define _cyrususer cyrus
147     %define _cyrusgroup mail
148     %define _vardata %{_var}/lib/imap
149     %define _spooldata %{_var}/spool/imap
150     # (gb) stick to /usr/lib/cyrus-imapd as this is an existing practise
151     # from MDK 10.0 and below + /etc/init.d/cyrus-imapd would need to
152     # runtime-detect the libdir since this ought to be an arch-independent
153     # script.
154     %define _cyrexecdir %{_prefix}/lib/cyrus-imapd
155     %define _confdir master/conf
156     %if %{PREFORK}
157     %define _cyrusconf %{_confdir}/prefork.conf
158     %else
159     %define _cyrusconf %{_confdir}/normal.conf
160     %endif
161    
162     %description
163     The Cyrus IMAP Server is a scaleable enterprise mail system
164     designed for use from small to large enterprise environments using
165     standards-based technologies.
166    
167     A full Cyrus IMAP implementation allows a seamless mail and bulletin
168     board environment to be set up across multiple servers. It differs from
169     other IMAP server implementations in that it is run on "sealed"
170     servers, where users are not normally permitted to log in. The mailbox
171     database is stored in parts of the filesystem that are private to the
172     Cyrus IMAP system. All user access to mail is through software using
173     the IMAP, POP3, or KPOP protocols. TLSv1 and SSL are supported for
174     security.
175    
176     This is the main package, install also the %{name}-utils package (it
177     contains server administration tools and depends on the perl-Cyrus
178     package).
179    
180     %package murder
181     Summary: Cyrus IMAP server murder aggregator system files
182     Group: System/Servers
183     Requires: %{name} = %{version}-%{release}
184    
185     %description murder
186     The %{name}-murder package contains the Cyrus murder aggregator system,
187     i.e. IMAP, POP3 and LMTP proxies, and the mupdate mailbox master daemon.
188     It allows for cluster setups where there are many backend Cyrus spools
189     and frontend proxy servers.
190    
191     %package nntp
192     Summary: Cyrus IMAP server murder nntp support files
193     Group: System/Servers
194     Requires: %{name} = %{version}-%{release}
195     Conflicts: leafnode
196    
197     %description nntp
198     Cyrus has the ability to export Usenet via IMAP and/or export shared
199     IMAP mailboxes via NNTP. This is made possible by a new NNTP daemon
200     which is included in this package.
201    
202     %package devel
203     Summary: Cyrus IMAPd development files
204     Group: Development/Other
205    
206     %description devel
207     This package contains header files and libraries necessary for
208     developing applications which use the imclient library.
209    
210     The main package is %{name}.
211    
212     %package -n perl-Cyrus
213     Summary: Cyrus IMAPd utility Perl modules
214     Group: Development/Perl
215 colin 400398 # with previous versions of sasl, imap LOGIN would fail
216 ennael 33418 Requires: %{mklibname sasl 2} >= 2.1.15
217    
218     %description -n perl-Cyrus
219     This package contains Perl modules necessary to use the Cyrus server
220     administrative utilities.
221    
222     The main package is %{name}.
223    
224     %package utils
225     Summary: Cyrus IMAPd server admin utilities
226     Group: System/Servers
227     Requires: perl-Cyrus = %{version}-%{release}
228    
229     %description utils
230     This package contains Cyrus IMAPd server administrative tools. It
231     can be installed on systems other than the one running the server.
232    
233     This package depends on the perl-Cyrus package.
234     The main package is %{name}.
235    
236     %prep
237    
238     %setup -q -n %{name}-%{version}
239     %patch1 -b .mdk9.0perl.orig
240     %patch2
241 colin 400402 %if %{build_autocreate}
242     %patch3 -p1 -b .autocreate.orig
243     %endif
244     %if %{build_autosieve}
245     %patch4 -p1 -b .autosieve.orig
246     %endif
247     %if %{build_rmquota}
248     %patch5 -p1 -b .rmquota.orig
249     %endif
250 ennael 33418
251 colin 400402 %patch6 -p1 -F 4 -b .plaintext.orig
252 ennael 33418
253     # (oe) for kolab2: Patch to support virtdomains: ldap (parse domain from "email" field an LDAP user entry)
254     %if %{build_virtualdomains_in_ldap}
255     %patch8 -p1 -b .kolab-ldap.orig
256     %endif
257 colin 400402 %if %{with_ldap}
258     %patch10 -p1 -b .ptloader.orig
259     %endif
260 ennael 33418 %patch11 -p1 -b .secprops.orig
261    
262     %patch13 -p1 -b .getrlimit.orig
263     %patch14 -p1 -b .skiplist_verbosity.orig
264 colin 400398
265 colin 400402 # (cg) No loner applies (needs rediffing)
266     #patch17 -p1 -b .mancyrusdb.orig
267     # (cg) Seems to be refactored upstream - no longer needed?
268     #patch18 -p1 -b .make_md5_sha1_dirs.orig
269 ennael 33418 %patch19 -p1 -b .mkimap.orig
270     %patch21 -p1 -b .sieve_port.orig
271    
272     ## Extra documentation
273     mkdir -p extradocs
274     for i in %{SOURCE2} %{SOURCE4} %{SOURCE19} ; do
275     cp $i extradocs
276     done
277    
278     ## remove cvs file
279     rm -f doc/text/.cvsignore
280    
281     ## regenerate html man pages
282     pushd man
283     for mp in *[1-8] ; do groff -m man -T html $mp > ../doc/man/$mp.html ; done
284     popd
285    
286     # fix build under mdx8.2
287     perl -ni -e "print unless /^AC_PREREQ/" configure.in
288    
289     # fix conditional pam config file
290     install -m 0644 %{SOURCE8} cyrus-imapd.pamd
291    
292     # cleanup
293     for i in `find . -type d -name CVS` `find . -type d -name .svn` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
294     if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null
295     done
296    
297     %build
298     %serverbuild
299    
300     CPPFLAGS="-I%{_includedir}/et $CPPFLAGS"
301     export CPPFLAGS
302     CFLAGS="$RPM_OPT_FLAGS -fPIC"
303     export CFLAGS
304     LDFLAGS="-L%{_libdir}"
305     export LDFLAGS
306    
307     #with the existing autom4te.cache autoheader would fail with the message
308     #Can't locate object method "path" via package "Request" at /usr/share/autoconf/Autom4te/C4che.pm line 69, <GEN1> line 111.
309     #
310    
311     rm -rf autom4te.cache configure
312     export WANT_AUTOCONF_2_5=1
313     libtoolize --copy --force; aclocal -I cmulocal; autoheader; autoconf
314    
315     %configure2_5x \
316     %if %{IDLED}
317 spuhler 410430 --enable-idled \
318 ennael 33418 %endif
319     %if !%{with_snmp}
320     --without-snmp \
321     %endif
322     %if %{with_ldap}
323     --with-ldap=/usr \
324     %endif
325     %if %{with_mysql}
326     --with-mysql --with-mysql-incdir=/usr/include/mysql \
327     %endif
328     %if %{with_pgsql}
329     --with-pgsql \
330     %endif
331     %if %{with_sqlite}
332     --with-sqlite \
333     %endif
334 luigiwalser 232025 --with-extraident="Mageia-RPM-%{version}-%{release}" \
335 ennael 33418 --with-syslogfacility=MAIL \
336 fwang 274848 --with-bdb=db-5.2 \
337 ennael 33418 --enable-murder \
338     --enable-netscapehack \
339     --enable-listext \
340     --enable-nntp \
341     --with-perl=%{__perl} \
342     --with-cyrus-prefix=%{_cyrexecdir} \
343     --with-service-path=%{_cyrexecdir} \
344     # --with-krb=%{_prefix}/kerberos \
345    
346     make clean
347     # no parallel make - 2.3.10
348     make
349    
350     # Modify docs master --> cyrus-master
351     pushd man
352     perl -pi -e "s#master\(8\)#cyrus-master(8)#" `ls *5 *8`
353     cd ../doc
354     perl -pi -e "s#master#cyrus-master#g;" man.html
355     cd man
356     perl -pi -e "s#master\(8\)#cyrus-master(8)#;" `ls *html`
357     popd
358    
359     # Modify path in perl scripts
360     pushd perl/imap/examples
361     perl -pi -e "s#/usr/local/bin/perl#%{__perl}#" `find . -type f -name "*.pl"`
362     popd
363    
364     # Cleanup of doc dir
365     find doc perl -name CVS -type d | xargs -r rm -fr
366     find doc -name "*~" -type f | xargs -r rm -f
367     find doc -name "*.*.orig" -type f | xargs -r rm -f
368    
369     rm -f doc/Makefile.dist
370     rm -f doc/text/htmlstrip.c
371    
372     # modify lmtp socket path in .conf files
373     perl -pi -e "s#/var/imap#%{_vardata}#" %{_confdir}/*.conf
374    
375     %install
376     [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
377    
378     %makeinstall_std
379     %makeinstall_std -C man
380    
381     %{__install} -m 755 imtest/imtest %{buildroot}%{_cyrexecdir}/
382     %{__install} -m 755 perl/imap/cyradm %{buildroot}%{_cyrexecdir}/
383    
384     # Install tools
385     for tool in dohash masssievec mkimap mknewsgroups rehash translatesieve undohash upgradesieve ; do
386     test -f tools/${tool} && %{__install} -m 755 tools/${tool} %{buildroot}%{_cyrexecdir}/
387     done
388     %{__install} -m 755 %{SOURCE13} %{buildroot}%{_cyrexecdir}/imapcreate
389    
390     # Create directories
391     %{__install} -d \
392     %if %{with_snmp}
393     %{buildroot}%{_datadir}/snmp/mibs \
394     %endif
395     %if %{with_ldap}
396     %{buildroot}%{_vardata}/ptclient/ \
397     %endif
398     %{buildroot}%{_initrddir} \
399 guillomovitch 232091 %{buildroot}%{_unitdir} \
400 ennael 33418 %{buildroot}%{_sysconfdir}/{pam.d,sysconfig,cron.daily} \
401     %{buildroot}%{_libdir}/sasl \
402     %{buildroot}%{_bindir} \
403     %{buildroot}%{_spooldata}/stage. \
404     %{buildroot}%{_vardata}/{user,quota,proc,log,msg,socket,db,sieve,rpm,backup}
405    
406     # Install additional files
407     %{__install} -m 755 %{SOURCE15} %{buildroot}%{_cyrexecdir}/cvt_cyrusdb_all
408    
409     # Install config files
410     %{__install} -m 644 %{_cyrusconf} %{buildroot}%{_sysconfdir}/cyrus.conf
411     %{__install} -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/imapd.conf
412    
413     %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/pop
414     %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/imap
415     %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/sieve
416     %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/mupdate
417     %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/lmtp
418     %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/nntp
419     %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/csync
420    
421     %{__install} -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
422     %{__install} -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/%{name}
423 guillomovitch 232091 %{__install} -m 644 %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service
424 ennael 33418 %{__install} -m 755 %{SOURCE20} %{buildroot}%{_sysconfdir}/cron.daily/%{name}
425 spuhler 232749 %{__install} -m 755 %{SOURCE22} %{buildroot}%{_cyrexecdir}/cyr_systemd_helper
426 ennael 33418
427     %if %{with_snmp}
428     # Install snmp mibs
429     %{__install} -m 644 master/CYRUS-MASTER.mib %{buildroot}%{_datadir}/snmp/mibs/CYRUS-MASTER-MIB.txt
430     %{__install} -m 644 %{SOURCE21} %{buildroot}%{_datadir}/snmp/mibs/CMU-MIB.txt
431     %endif
432    
433     # Install README.RPM
434     %{__install} -m 644 %{SOURCE14} README.RPM
435     cat << EOF >> README.RPM
436    
437     RPM BUILD TIME CONFIGURATION OPTIONS
438    
439     This RPM package has been compiled with the following options:
440    
441     use saslauth group
442     SASLGROUP: %{SASLGROUP}
443    
444     use preforking cyrus.conf
445     PREFORK: %{PREFORK}
446    
447     enable IDLED support
448     IDLED: %{IDLED}
449    
450     enable full directory hash
451     FULLDIRHASH: %{FULLDIRHASH}
452    
453     EOF
454    
455     # Install templates
456     %{__install} -m 755 -d doc/conf
457     %{__install} -m 644 %{_confdir}/*.conf doc/conf/
458    
459     # Rename 'master' binary and manpage to avoid crash with postfix
460     mv -f %{buildroot}%{_cyrexecdir}/master %{buildroot}%{_cyrexecdir}/cyrus-master
461     mv -f %{buildroot}%{_mandir}/man8/master.8 %{buildroot}%{_mandir}/man8/cyrus-master.8
462     cp -af doc/man/master.8.html doc/man/cyrus-master.8.html
463    
464     # Create symlinks
465     ln -sf ../lib/cyrus-imapd/cyradm %{buildroot}%{_bindir}/
466     ln -sf ../lib/cyrus-imapd/imtest %{buildroot}%{_bindir}/
467     ln -sf ../lib/cyrus-imapd/imapcreate %{buildroot}%{_bindir}/
468    
469     # required if upgrading from 2.2.x -> 2.3.6+
470     %{__install} -m 755 tools/migrate-metadata %{buildroot}%{_cyrexecdir}/migrate-metadata
471    
472     # provide the cyrusMaster.conf file, discovered by doing:
473     # /usr/lib/cyrus-imapd/cyrus-master -p /var/run/cyrus-master.pid -D
474     %if %{with_snmp}
475     install -d %{buildroot}/var/lib/net-snmp
476     echo "# placeholder" > %{buildroot}/var/lib/net-snmp/cyrusMaster.conf
477     %endif
478    
479     # cleanup
480     find %{buildroot}%{perl_vendorarch} -name "*.annotate" | xargs rm -f
481    
482     %pre
483     # Create 'cyrus' user on target host
484     %if %{SASLGROUP}
485     /usr/sbin/groupadd -r %{_saslgroup} 2> /dev/null || :
486     /usr/sbin/useradd -c "Cyrus IMAP Server" -d %{_vardata} -g %{_cyrusgroup} \
487     -G %{_saslgroup} -s /bin/bash -r %{_cyrususer} 2> /dev/null || :
488     %else
489     /usr/sbin/useradd -c "Cyrus IMAP Server" -d %{_vardata} -g %{_cyrusgroup} \
490     -s /bin/bash -r %{_cyrususer} 2> /dev/null || :
491     %endif
492    
493     %post
494     if [ $1 = 1 ] ; then
495     # make sure we own the stuff, otherwise /var/log/mail/* will fill
496     # the whole disk with error messages...
497     chown -R %{_cyrususer}:%{_cyrusgroup} %{_vardata} %{_spooldata}
498     fi
499     %_create_ssl_certificate cyrus-imapd
500     chown %{_cyrususer}:%{_cyrusgroup} /etc/pki/tls/private/cyrus-imapd.pem
501    
502    
503     # Force synchronous updates only on ext2 filesystems
504     # Note: This will slow down user creation for 10.000+ users!
505     for i in %{_vardata}/{user,quota} %{_spooldata}
506     do
507     if [ `find $i -maxdepth 0 -printf %F` = "ext2" ]; then
508     chattr -R +S $i 2>/dev/null
509     fi
510     done
511    
512     # Add sieve service if necessary
513     if ! grep -q ^sieve %{_sysconfdir}/services; then
514     echo -e 'sieve\t\t2000/tcp\t\t\t# Sieve mail filter daemon' >> %{_sysconfdir}/services
515     fi
516    
517     # Add lmtp service if necessary
518     if ! grep -q ^lmtp %{_sysconfdir}/services; then
519     echo -e 'lmtp\t\t2003/tcp\t\t\t# Local mail delivery protocol (rfc2033)' >> %{_sysconfdir}/services
520     fi
521    
522     # upgrade from previous versions with compiled in database backends
523     rm -f %{_vardata}/rpm/db.cfg.cache 2> /dev/null
524    
525     # "ctl_deliver -E" is deprecated, now is "cyr_expire -E"
526     if grep -q "ctl_deliver *-E" %{_sysconfdir}/cyrus.conf ; then
527     perl -pi -e "s/ctl_deliver *-E/cyr_expire -E/" %{_sysconfdir}/cyrus.conf
528     fi
529     # compile to byte code sieve scripts on upgrade
530     # masssievec needs to run:
531     # - for versions before 2.2.0 (2.1.x) since they had no bytecode
532     # - upgrading from 2.2.0 since the bytecode has changed
533     # - upgrading from 2.2.1 since the bytecode has changed
534     if [ $1 != 1 ] ; then
535     if [ -f %{_vardata}/rpm/version ] ; then
536     oldversion=`cat %{_vardata}/rpm/version`
537     if [ "$oldversion" = "2.2.0" -o "$oldversion" = "2.2.1" ] ; then
538     compile_needed=1
539     else
540     compile_needed=0
541     fi
542     else
543     # versions prior to 2.2.x didn't write the file
544     compile_needed=1
545     fi
546     if [ $compile_needed = 1 ] ; then
547     echo "compiling sieve scripts"
548     su cyrus -c "%{_cyrexecdir}/masssievec %{_cyrexecdir}/sievec"
549     fi
550     fi
551 spuhler 394129
552     # let's put a dummy imap/user_deny.db in so it doesn't fill the logs
553     touch /var/lib/imap/user_deny.db
554     chown cyrus:mail /var/lib/imap/user_deny.db
555    
556 ennael 33418 # cache the installed version for next upgrade
557     echo %{version} > %{_vardata}/rpm/version
558    
559     %_post_service %{name}
560    
561     %preun
562     %_preun_service %{name}
563     if [ $1 = 0 ]; then
564     /usr/sbin/userdel %{_cyrususer} 2> /dev/null || :
565     %if %{SASLGROUP}
566     if [ "`grep ^%{_saslgroup}: %{_sysconfdir}/group | cut -d: -f4-`" = "" ]; then
567     /usr/sbin/groupdel %{_saslgroup} 2> /dev/null || :
568     fi
569     %endif
570     rm -f %{_vardata}/socket/lmtp 2> /dev/null
571     rm -f %{_vardata}/rpm/version 2> /dev/null
572     fi
573    
574     %triggerin -- %{name} < 2.0.0
575     #To avoid automatic restart of the daemon when upgrading from versions
576     #1.x.x of Cyrus IMAPd in rpm form, be sure the old daemon is stopped
577     /sbin/service %{name} stop >/dev/null 2>&1 || :
578    
579     %files
580     %doc doc/* extradocs/*
581 guillomovitch 232092 %config(noreplace) %{_sysconfdir}/*.conf
582     %config(noreplace) %{_initrddir}/%{name}
583 guillomovitch 232091 %{_unitdir}/%{name}.service
584 guillomovitch 232092 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
585     %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/pop
586     %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/imap
587     %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/sieve
588     %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/lmtp
589     %config(noreplace) %{_sysconfdir}/cron.daily/%{name}
590     %dir %{_cyrexecdir}
591     %{_cyrexecdir}/arbitron
592     %{_cyrexecdir}/chk_cyrus
593     %{_cyrexecdir}/ctl_cyrusdb
594     %{_cyrexecdir}/ctl_deliver
595     %{_cyrexecdir}/ctl_mboxlist
596     %{_cyrexecdir}/cvt_cyrusdb
597     %{_cyrexecdir}/cvt_cyrusdb_all
598     %{_cyrexecdir}/cyr_dbtool
599     %{_cyrexecdir}/cyr_df
600     %{_cyrexecdir}/cyrdump
601     %{_cyrexecdir}/cyr_expire
602     %{_cyrexecdir}/cyr_synclog
603     %{_cyrexecdir}/cyr_sequence
604     %{_cyrexecdir}/cyr_userseen
605 spuhler 232749 %{_cyrexecdir}/cyr_systemd_helper
606 guillomovitch 232092 %{_cyrexecdir}/cyrus-master
607     %{_cyrexecdir}/dohash
608     %{_cyrexecdir}/fud
609     %{_cyrexecdir}/imapd
610     %{_cyrexecdir}/ipurge
611     %{_cyrexecdir}/lmtpd
612     %{_cyrexecdir}/masssievec
613     %{_cyrexecdir}/mbexamine
614     %{_cyrexecdir}/mbpath
615     %{_cyrexecdir}/migrate-metadata
616     %{_cyrexecdir}/mkimap
617     %{_cyrexecdir}/mknewsgroups
618     %{_cyrexecdir}/notifyd
619     %{_cyrexecdir}/pop3d
620     %{_cyrexecdir}/quota
621     %{_cyrexecdir}/reconstruct
622     %{_cyrexecdir}/rehash
623     %{_cyrexecdir}/sievec
624     %{_cyrexecdir}/sieved
625     %{_cyrexecdir}/squatter
626     %{_cyrexecdir}/timsieved
627     %{_cyrexecdir}/tls_prune
628     %{_cyrexecdir}/translatesieve
629     %{_cyrexecdir}/undohash
630     %{_cyrexecdir}/unexpunge
631     %{_cyrexecdir}/upgradesieve
632 ennael 33418 %if %{with_ldap}
633 guillomovitch 232092 %{_cyrexecdir}/ptdump
634     %{_cyrexecdir}/ptexpire
635     %{_cyrexecdir}/ptloader
636 ennael 33418 %endif
637 colin 400398 %if %build_autocreate
638 colin 400404 %{_cyrexecdir}/compile_sieve
639 colin 400398 %endif
640 guillomovitch 232092 %{_cyrexecdir}/smmapd
641 ennael 33418 %if %{IDLED}
642 guillomovitch 232092 %{_cyrexecdir}/idled
643 ennael 33418 %endif
644     %attr(4754,%{_cyrususer},%{_cyrusgroup}) %{_cyrexecdir}/deliver
645     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}
646     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/user
647     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/quota
648     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/proc
649     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/log
650     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/msg
651     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/socket
652     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/db
653     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/sieve
654     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/rpm
655     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/backup
656     %if %{with_ldap}
657     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/ptclient
658     %endif
659     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_spooldata}
660     %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_spooldata}/*
661     %if %{with_snmp}
662 guillomovitch 232092 %{_datadir}/snmp/mibs/*
663 ennael 33418 %attr(0644,%{_cyrususer},%{_cyrusgroup}) /var/lib/net-snmp/cyrusMaster.conf
664     %endif
665 guillomovitch 232092 %{_mandir}/man5/*
666     %{_mandir}/man8/arbitron.8*
667     %{_mandir}/man8/chk_cyrus.8*
668     %{_mandir}/man8/ctl_cyrusdb.8*
669     %{_mandir}/man8/ctl_deliver.8*
670     %{_mandir}/man8/ctl_mboxlist.8*
671     %{_mandir}/man8/cvt_cyrusdb.8*
672     %{_mandir}/man8/cyr_dbtool.8*
673     %{_mandir}/man8/cyr_df.8*
674     %{_mandir}/man8/cyr_expire.8*
675     %{_mandir}/man8/cyr_synclog.8*
676     %{_mandir}/man8/cyrus-master.8*
677     %{_mandir}/man8/deliver.8*
678     %{_mandir}/man8/fud.8*
679     %{_mandir}/man8/idled.8*
680     %{_mandir}/man8/imapd.8*
681     %{_mandir}/man8/ipurge.8*
682     %{_mandir}/man8/lmtpd.8*
683     %{_mandir}/man8/mbexamine.8*
684     %{_mandir}/man8/mbpath.8*
685     %{_mandir}/man8/notifyd.8*
686     %{_mandir}/man8/pop3d.8*
687     %{_mandir}/man8/quota.8*
688     %{_mandir}/man8/reconstruct.8*
689     %{_mandir}/man8/rmnews.8*
690     %{_mandir}/man8/smmapd.8*
691     %{_mandir}/man8/squatter.8*
692     %{_mandir}/man8/sync_client.8*
693     %{_mandir}/man8/syncnews.8*
694     %{_mandir}/man8/sync_reset.8*
695     %{_mandir}/man8/sync_server.8*
696     %{_mandir}/man8/timsieved.8*
697     %{_mandir}/man8/tls_prune.8*
698     %{_mandir}/man8/unexpunge.8*
699 ennael 33418 %doc COPYRIGHT README README.RPM
700 colin 400398 %if %{build_autocreate}
701 colin 400404 %doc README.autocreate
702 colin 400398 %endif
703 ennael 33418
704     %files murder
705     %doc doc/text/install-murder
706     %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/mupdate
707     %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/csync
708 guillomovitch 232092 %{_cyrexecdir}/lmtpproxyd
709     %{_cyrexecdir}/mupdate
710     %{_cyrexecdir}/pop3proxyd
711     %{_cyrexecdir}/proxyd
712 ennael 33418
713     %files nntp
714     %doc doc/text/install-netnews
715     %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/nntp
716 guillomovitch 232092 %{_cyrexecdir}/fetchnews
717     %{_cyrexecdir}/nntpd
718     %{_mandir}/man8/nntpd.8*
719     %{_mandir}/man8/fetchnews.8*
720 ennael 33418
721     %files devel
722     %{_includedir}/cyrus
723     %{_libdir}/lib*.a
724 guillomovitch 232092 %{_mandir}/man3/imclient.3*
725 ennael 33418
726     %files -n perl-Cyrus
727     %doc perl/imap/README perl/imap/Changes perl/imap/examples
728     %{perl_vendorarch}/auto/Cyrus
729     %{perl_vendorarch}/Cyrus
730 guillomovitch 232092 %{_mandir}/man3/Cyrus*
731 ennael 33418
732     %files utils
733 guillomovitch 232092 %{_cyrexecdir}/cyradm
734     %{_cyrexecdir}/imtest
735     %{_cyrexecdir}/imapcreate
736     %{_bindir}/*
737     %{_mandir}/man1/*

  ViewVC Help
Powered by ViewVC 1.1.30