- rebuild with new db4 (#540093)

- spec cleanup
This commit is contained in:
Michal Hlavinka 2009-11-24 14:11:40 +00:00
parent 69fe149e8c
commit d28c0d0250

View File

@ -1,8 +1,8 @@
#TODO: merge all sub-packages (except -devel) into cyrus-imapd, they are all required
Name: cyrus-imapd Name: cyrus-imapd
Version: 2.3.15 Version: 2.3.15
Release: 6%{?dist} Release: 7%{?dist}
%define _dbver db4
%define ssl_pem_file %{_sysconfdir}/pki/%{name}/%{name}.pem %define ssl_pem_file %{_sysconfdir}/pki/%{name}/%{name}.pem
@ -15,11 +15,7 @@ Release: 6%{?dist}
%define _spooldata %{_var}/spool/imap %define _spooldata %{_var}/spool/imap
%define _cyrexecdir %{_exec_prefix}/lib/%{name} %define _cyrexecdir %{_exec_prefix}/lib/%{name}
#FIXME: check if wise to remove (2x): %define _cyrusconf master/conf/prefork.conf
%define _confdir master/conf
%define _contribdir doc/contrib
%define _cyrusconf %{_confdir}/prefork.conf
Summary: A high-performance mail server with IMAP, POP3, NNTP and SIEVE support Summary: A high-performance mail server with IMAP, POP3, NNTP and SIEVE support
License: MIT License: MIT
@ -78,18 +74,18 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: autoconf >= 2.59 BuildRequires: autoconf >= 2.59
BuildRequires: cyrus-sasl-devel >= 2.1.15-1, perl-devel, tcp_wrappers BuildRequires: cyrus-sasl-devel >= 2.1.15-1, perl-devel, tcp_wrappers
BuildRequires: %{_dbver}-devel, openssl-devel, pkgconfig BuildRequires: db4-devel, openssl-devel, pkgconfig
BuildRequires: flex, bison, groff >= 1.15-8, automake BuildRequires: flex, bison, groff, automake
BuildRequires: openldap-devel BuildRequires: openldap-devel
BuildRequires: krb5-devel BuildRequires: krb5-devel
BuildRequires: net-snmp-devel BuildRequires: net-snmp-devel
Requires(post): e2fsprogs, /sbin/chkconfig, /sbin/service, perl, grep, coreutils, findutils Requires(post): e2fsprogs, chkconfig, initscripts, perl, grep, coreutils, findutils
Requires(preun): /sbin/chkconfig, /sbin/service, coreutils Requires(preun): chkconfig, initscripts, coreutils
Requires(postun): /sbin/service Requires(postun): initscripts
Requires: %{name}-utils = %{version}-%{release} Requires: %{name}-utils = %{version}-%{release}
Requires: cyrus-sasl-lib >= 2.1.15, file >= 3.35-1, %{_dbver}-utils Requires: cyrus-sasl-lib >= 2.1.15, file >= 3.35-1, db4-utils
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description %description
@ -139,9 +135,9 @@ Cyrus IMAP server administration utilities.
%package utils %package utils
Group: Applications/System Group: Applications/System
Summary: Cyrus IMAP server administration utilities Summary: Cyrus IMAP server administration utilities
Requires(pre): /usr/sbin/groupadd, /usr/sbin/useradd Requires(pre): shadow-utils
Requires(post): grep, coreutils, make, openssl Requires(post): grep, coreutils, make, openssl
Requires(postun): /usr/sbin/userdel, /usr/sbin/groupdel Requires(postun): shadow-utils
Requires: %{name}-perl = %{version}-%{release} Requires: %{name}-perl = %{version}-%{release}
%description utils %description utils
@ -167,7 +163,6 @@ one running the server.
# only to update config.* files # only to update config.* files
automake -a -f -c || : automake -a -f -c || :
aclocal -I cmulocal aclocal -I cmulocal
autoheader autoheader
autoconf -f autoconf -f
@ -199,7 +194,7 @@ LDFLAGS="$LDFLAGS -pie"; export LDFLAGS
--with-perl=%{__perl} \ --with-perl=%{__perl} \
--with-cyrus-prefix=%{_cyrexecdir} \ --with-cyrus-prefix=%{_cyrexecdir} \
--with-service-path=%{_cyrexecdir} \ --with-service-path=%{_cyrexecdir} \
--with-bdb-incdir=%{_includedir}/%{_dbver} \ --with-bdb-incdir=%{_includedir}/db4 \
--with-extraident="Fedora-RPM-%{version}-%{release}" \ --with-extraident="Fedora-RPM-%{version}-%{release}" \
--with-syslogfacility=MAIL \ --with-syslogfacility=MAIL \
--with-krbimpl=mit --with-krbimpl=mit
@ -246,23 +241,22 @@ find doc -name "*.html.*" -type f | xargs -r %{__rm} -f
%{__install} -m 644 %{SOURCE29} doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4 %{__install} -m 644 %{SOURCE29} doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4
# modify lmtp socket path in .conf files # modify lmtp socket path in .conf files
%{__perl} -pi -e "s@/var/imap/@%{_vardata}/@" %{_confdir}/*.conf doc/cyrusv2.mc doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4 %{__perl} -pi -e "s@/var/imap/@%{_vardata}/@" master/conf/*.conf doc/cyrusv2.mc doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4
# enable/disable idled in .conf files to prevent error messages # enable in .conf files to prevent error messages
%{__perl} -pi -e "s/# idled/ idled/" master/conf/*.conf
#FIXME:check if required in distributed conf, remove otherways
%{__perl} -pi -e "s/# idled/ idled/" %{_confdir}/*.conf
%install %install
%{__rm} -rf %{buildroot} %{__rm} -rf %{buildroot}
# This hack is needed on RedHat > 7.3 to install the perl files correctly # This hack is needed to install the perl files correctly
pushd perl/imap pushd perl/imap
%{__perl} Makefile.PL PREFIX=%{buildroot}%{_prefix} INSTALLDIRS=vendor %{__perl} Makefile.PL PREFIX=%{buildroot}%{_prefix} INSTALLDIRS=vendor
popd popd
pushd perl/sieve/managesieve pushd perl/sieve/managesieve
%{__perl} Makefile.PL PREFIX=%{buildroot}%{_prefix} INSTALLDIRS=vendor %{__perl} Makefile.PL PREFIX=%{buildroot}%{_prefix} INSTALLDIRS=vendor
popd popd
# Do what the regular make install does # Do what the regular make install does
%{__make} install DESTDIR=%{buildroot} PREFIX=%{_prefix} mandir=%{_mandir} %{__make} install DESTDIR=%{buildroot} PREFIX=%{_prefix} mandir=%{_mandir}
%{__make} -C man install DESTDIR=%{buildroot} PREFIX=%{_prefix} mandir=%{_mandir} %{__make} -C man install DESTDIR=%{buildroot} PREFIX=%{_prefix} mandir=%{_mandir}
@ -285,21 +279,21 @@ done
%{buildroot}%{_vardata}/ptclient \ %{buildroot}%{_vardata}/ptclient \
%{buildroot}%{_datadir}/%{name}/rpm \ %{buildroot}%{_datadir}/%{name}/rpm \
%{buildroot}%{_sysconfdir}/pki/%{name} \ %{buildroot}%{_sysconfdir}/pki/%{name} \
%{_contribdir} doc/contrib
# Install additional files # Install additional files
%{__install} -m 755 %{SOURCE13} %{buildroot}%{_cyrexecdir}/cvt_cyrusdb_all %{__install} -m 755 %{SOURCE13} %{buildroot}%{_cyrexecdir}/cvt_cyrusdb_all
%{__install} -m 755 %{SOURCE28} %{buildroot}%{_cyrexecdir}/rpm_set_permissions %{__install} -m 755 %{SOURCE28} %{buildroot}%{_cyrexecdir}/rpm_set_permissions
%{__install} -m 644 %{SOURCE14} %{buildroot}%{_datadir}/%{name}/rpm/magic %{__install} -m 644 %{SOURCE14} %{buildroot}%{_datadir}/%{name}/rpm/magic
%{__install} -m 644 %{SOURCE10} %{_contribdir}/ %{__install} -m 644 %{SOURCE10} doc/contrib/
%{__install} -m 644 %{SOURCE15} %{_contribdir}/imapcreate %{__install} -m 644 %{SOURCE15} doc/contrib/imapcreate
%{__install} -m 644 %{SOURCE16} %{_contribdir}/cyrus_ldap_quota %{__install} -m 644 %{SOURCE16} doc/contrib/cyrus_ldap_quota
%{__install} -m 644 %{SOURCE17} %{_contribdir}/batchreconstruct %{__install} -m 644 %{SOURCE17} doc/contrib/batchreconstruct
%{__install} -m 644 %{SOURCE18} %{_contribdir}/bsd2cyrus %{__install} -m 644 %{SOURCE18} doc/contrib/bsd2cyrus
%{__install} -m 644 %{SOURCE19} %{_contribdir}/cpmsg %{__install} -m 644 %{SOURCE19} doc/contrib/cpmsg
%{__install} -m 644 %{SOURCE20} %{_contribdir}/folderxfer %{__install} -m 644 %{SOURCE20} doc/contrib/folderxfer
%{__install} -m 644 %{SOURCE21} %{_contribdir}/inboxfer %{__install} -m 644 %{SOURCE21} doc/contrib/inboxfer
%{__install} -m 644 %{SOURCE30} %{_contribdir}/README %{__install} -m 644 %{SOURCE30} doc/contrib/README
# fix permissions on perl .so files # fix permissions on perl .so files
find %{buildroot}%{_libdir}/perl5/ -type f -name "*.so" -exec %{__chmod} 755 {} \; find %{buildroot}%{_libdir}/perl5/ -type f -name "*.so" -exec %{__chmod} 755 {} \;
@ -325,7 +319,7 @@ mv %{buildroot}%{_mandir}/man8/pop3d.8 %{buildroot}%{_mandir}/man8/pop3d.8cyrus
# Install templates # Install templates
%{__install} -m 755 -d doc/conf %{__install} -m 755 -d doc/conf
%{__install} -m 644 %{_confdir}/*.conf doc/conf/ %{__install} -m 644 master/conf/*.conf doc/conf/
# Generate db config file # Generate db config file
( grep '^{' lib/imapoptions | grep _db | cut -d'"' -f 2,4 | \ ( grep '^{' lib/imapoptions | grep _db | cut -d'"' -f 2,4 | \
@ -387,17 +381,9 @@ fi
# Force synchronous updates, usually only on ext2 filesystems # Force synchronous updates, usually only on ext2 filesystems
for i in %{_vardata}/{user,quota} %{_spooldata} for i in %{_vardata}/{user,quota} %{_spooldata}
do do
if [ $(find $i -maxdepth 0 -printf %%F) = "ext2" ]; then chattr -R +S $i 2>/dev/null ||:
chattr -R +S $i 2>/dev/null
fi
done done
# prevent idled related errors to show up
#FIXME:check if it changes anything nowadays? remove otherways
if grep -q "^# idled" %{_sysconfdir}/cyrus.conf ; then
%{__perl} -pi -e "s/^# idled/ idled/" %{_sysconfdir}/cyrus.conf
fi
# Create SSL certificates # Create SSL certificates
exec > /dev/null 2> /dev/null exec > /dev/null 2> /dev/null
@ -441,7 +427,6 @@ fi
%post utils %post utils
# Add service entries if necessary # Add service entries if necessary
#FIXME: is this needed?
if ! %{__grep} -q ^csync %{_sysconfdir}/services; then if ! %{__grep} -q ^csync %{_sysconfdir}/services; then
echo -e 'csync\t\t2005/tcp\t\t\t# Cyrus IMAP Replication Daemon' >> %{_sysconfdir}/services echo -e 'csync\t\t2005/tcp\t\t\t# Cyrus IMAP Replication Daemon' >> %{_sysconfdir}/services
echo -e 'csync\t\t2005/udp\t\t\t# Cyrus IMAP Replication Daemon' >> %{_sysconfdir}/services echo -e 'csync\t\t2005/udp\t\t\t# Cyrus IMAP Replication Daemon' >> %{_sysconfdir}/services
@ -450,8 +435,6 @@ fi
%postun utils %postun utils
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
/usr/sbin/userdel %{_cyrususer} 2> /dev/null || : /usr/sbin/userdel %{_cyrususer} 2> /dev/null || :
if [ "$(%{__grep} ^saslauth: %{_sysconfdir}/group | cut -d: -f4-)" = "" ]; then
/usr/sbin/groupdel saslauth 2> /dev/null || :
fi fi
fi fi
@ -461,7 +444,7 @@ fi
%doc doc/* %doc doc/*
%config(noreplace) %{_sysconfdir}/cyrus.conf %config(noreplace) %{_sysconfdir}/cyrus.conf
%config(noreplace) %{_sysconfdir}/imapd.conf %config(noreplace) %{_sysconfdir}/imapd.conf
%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/%{name} %{_sysconfdir}/rc.d/init.d/%{name}
%{_sysconfdir}/logrotate.d/%{name} %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %{_sysconfdir}/pam.d/pop %config(noreplace) %{_sysconfdir}/pam.d/pop
@ -471,7 +454,7 @@ fi
%config(noreplace) %{_sysconfdir}/pam.d/mupdate %config(noreplace) %{_sysconfdir}/pam.d/mupdate
%config(noreplace) %{_sysconfdir}/pam.d/csync %config(noreplace) %{_sysconfdir}/pam.d/csync
%config(noreplace) %{_sysconfdir}/pam.d/nntp %config(noreplace) %{_sysconfdir}/pam.d/nntp
%attr(0755,root,root) %{_sysconfdir}/cron.daily/%{name} %{_sysconfdir}/cron.daily/%{name}
%dir %{_cyrexecdir} %dir %{_cyrexecdir}
%{_cyrexecdir}/arbitron %{_cyrexecdir}/arbitron
%{_cyrexecdir}/arbitronsort.pl %{_cyrexecdir}/arbitronsort.pl
@ -596,6 +579,10 @@ fi
%{_mandir}/man1/* %{_mandir}/man1/*
%changelog %changelog
* Tue Nov 24 2009 Michal Hlavinka <mhlaivnk@redhat.com> - 2.3.15-7
- rebuild with new db4 (#540093)
- spec cleanup
* Fri Nov 06 2009 Michal Hlavinka <mhlavink@redhat.com> - 2.3.15-6 * Fri Nov 06 2009 Michal Hlavinka <mhlavink@redhat.com> - 2.3.15-6
- fix sourcing of /etc/sysconfig/cyrus-imapd (#533320) - fix sourcing of /etc/sysconfig/cyrus-imapd (#533320)
@ -827,7 +814,7 @@ fi
* Thu Dec 15 2005 Simon Matter <simon.matter@invoca.ch> 2.3.0-0.3 * Thu Dec 15 2005 Simon Matter <simon.matter@invoca.ch> 2.3.0-0.3
- reintroduce subpackage utils, fix requirements - reintroduce subpackage utils, fix requirements
- move some utils to %{_bindir}/ - move some utils to %%{_bindir}/
* Wed Dec 14 2005 Simon Matter <simon.matter@invoca.ch> 2.3.0-0.2 * Wed Dec 14 2005 Simon Matter <simon.matter@invoca.ch> 2.3.0-0.2
- integrate subpackages murder, nntp, replication, utils - integrate subpackages murder, nntp, replication, utils
@ -988,9 +975,9 @@ fi
* Thu Jan 06 2005 Simon Matter <simon.matter@invoca.ch> * Thu Jan 06 2005 Simon Matter <simon.matter@invoca.ch>
- added more fixes to the autocreate patch - added more fixes to the autocreate patch
- don't use %_libdir for %_cyrexecdir, it's a mess on x86_64 - don't use %%_libdir for %%_cyrexecdir, it's a mess on x86_64
- don't use %_libdir for symlinks - don't use %%_libdir for symlinks
- remove %_libdir pachtes - remove %%_libdir pachtes
- change pam configs to work on x86_64 - change pam configs to work on x86_64
- changed default build option for IDLED to on - changed default build option for IDLED to on
- changed rpm_set_permissions to honor partitions in /etc/imapd.conf - changed rpm_set_permissions to honor partitions in /etc/imapd.conf
@ -1418,7 +1405,7 @@ fi
- included sieve matching patch - included sieve matching patch
* Thu Jun 27 2002 Simon Matter <simix@datacomm.ch> * Thu Jun 27 2002 Simon Matter <simix@datacomm.ch>
- fixed %post script where %F was expanded to file.file - fixed %%post script where %%F was expanded to file.file
* Wed Jun 26 2002 Simon Matter <simix@datacomm.ch> * Wed Jun 26 2002 Simon Matter <simix@datacomm.ch>
- fixed missing man page - fixed missing man page
@ -1460,7 +1447,7 @@ fi
- added requires perl-File-Temp for utils package - added requires perl-File-Temp for utils package
* Wed Feb 06 2002 Simon Matter <simix@datacomm.ch> * Wed Feb 06 2002 Simon Matter <simix@datacomm.ch>
- added some %dir flags - added some %%dir flags
- removed /usr/lib/sasl/Cyrus.conf - removed /usr/lib/sasl/Cyrus.conf
- added conf templates - added conf templates
- build time option for usage of saslauth group - build time option for usage of saslauth group
@ -1487,7 +1474,7 @@ fi
* Sat Jan 19 2002 Simon Matter <simix@datacomm.ch> * Sat Jan 19 2002 Simon Matter <simix@datacomm.ch>
- changed default auth to pam - changed default auth to pam
- remove several %dir from %files sections - remove several %%dir from %%files sections
- change from /usr/lib/cyrus -> /usr/libexec/cyrus - change from /usr/lib/cyrus -> /usr/libexec/cyrus
- rename source files to something like cyrus... - rename source files to something like cyrus...
- added rehash tool - added rehash tool
@ -1495,7 +1482,7 @@ fi
* Fri Jan 18 2002 Simon Matter <simix@datacomm.ch> * Fri Jan 18 2002 Simon Matter <simix@datacomm.ch>
- fixed init script - fixed init script
- fixed %post section in spec - fixed %%post section in spec
* Thu Jan 17 2002 Simon Matter <simix@datacomm.ch> * Thu Jan 17 2002 Simon Matter <simix@datacomm.ch>
- ready for first build - ready for first build