[dbmail] updated to 3.0.0 rc1
Bernard Johnson
bjohnson at fedoraproject.org
Sat Jan 15 23:21:45 UTC 2011
commit fa32b4a059a270e838980d80fe02beb1c43dafba
Author: Bernard Johnson <bjohnson at symetrix.com>
Date: Sat Jan 15 16:21:27 2011 -0700
updated to 3.0.0 rc1
README.fedora | 14 +-----
dbmail.cron | 7 +--
dbmail.spec | 142 ++++++++++++++++++--------------------------------------
3 files changed, 51 insertions(+), 112 deletions(-)
---
diff --git a/README.fedora b/README.fedora
index c5371b8..e3bcfc5 100644
--- a/README.fedora
+++ b/README.fedora
@@ -1,19 +1,9 @@
=== README.fedora ===
Currently, DBMail supports MySQL, PostgreSQL and SQLite3 for mail storage.
-The drivers for these different databases are packaged separately, except
-SQLite, when it's available in the host os. A default install will target
+It does this by using the libzdb database API. A default install will target
SQLite support. If you wish to use another database, you must install the
-appropriate driver.
-
-For example, to install dbmail and the dbmail-pgsql driver using yum:
-
-# yum install dbmail dbmail-pgsql
-
-The current choices for database driver are:
- dbmail (built in SQLite datbase support by default)
- dbmail-mysql
- dbmail-pgsql
+appropriate database package.
Additionally, you have a choice of authentication drivers as well:
dbmail (built-in sql authentication by default)
diff --git a/dbmail.cron b/dbmail.cron
index 5a27ea8..d5afab6 100644
--- a/dbmail.cron
+++ b/dbmail.cron
@@ -1,9 +1,8 @@
#!/bin/sh
-LOGFILE=/var/log/dbmail.log
-
-export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/dbmail
+# Read preferences
+. /etc/sysconfig/dbmail
echo "" >> $LOGFILE
date >> $LOGFILE
-dbmail-util -c -t -u -b -p -d -y >> $LOGFILE 2>&1
+dbmail-util $UTIL_OPTS >> $LOGFILE 2>&1
diff --git a/dbmail.spec b/dbmail.spec
index 89e6eb7..8873f74 100644
--- a/dbmail.spec
+++ b/dbmail.spec
@@ -1,23 +1,15 @@
-%if 0%{?fedora} && 0%{?fedora} > 10
-%define with_gmime22 1
-%endif
-
-# Package User Registry: http://fedoraproject.org/wiki/PackageUserRegistry
-%define registry_uid 38
-%define registry_name dbmail
-
%define services dbmail-imapd dbmail-pop3d dbmail-lmtpd dbmail-timsieved
Name: dbmail
-Version: 2.2.17
-Release: 1%{?dist}
+Version: 3.0.0
+Release: 0.1.rc1%{?dist}
Summary: A database backed mail storage system
Group: System Environment/Daemons
# db_getopot.c is licensed MIT
License: GPLv2+ and MIT
URL: http://www.dbmail.org
-Source0: http://www.dbmail.org/download/2.2/dbmail-%{version}.tar.bz2
+Source0: http://www.dbmail.org/download/3.0/dbmail-%{version}-rc1.tar.gz
Source1: dbmail-imapd
Source2: dbmail-pop3d
Source3: dbmail-lmtpd
@@ -25,47 +17,44 @@ Source4: dbmail-timsieved
Source5: dbmail.cron
Source6: dbmail.logrotate
Source7: README.fedora
+Source8: dbmail.sysconfig
-# Note: These patches reverses the md5 implementation introduced in dbmail
-# 2.2.14 and therefore the dependency on glib >= 2.16. We only do this for EPEL
-# since it's not possible to provide a newer glib version on that distribution.
-# This will also cause bug #816 (http://dbmail.org/mantis/view.php?id=816) to
-# be reintroduced.
-Patch0: dbmail-2.2.14-glib2-version.patch
-Patch1: dbmail-2.2.14-reverse-md5-implementation.patch
+Patch0: fix-deprecated-gmime.patch
+Patch1: xmlto-skip-validation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-%if 0%{?with_gmime22}
-BuildRequires: gmime22-devel >= 2.2.10
-%else
-BuildRequires: gmime-devel >= 2.2.10
-%endif
-
+BuildRequires: gmime-devel > 2.4
BuildRequires: fileutils, openssl-devel >= 0.9.7a
-BuildRequires: glib2-devel >= 2.8
-BuildRequires: libsieve-devel >= 2.1.13
-BuildRequires: mysql-devel >= 4.1.3, postgresql-devel
+BuildRequires: glib2-devel >= 2.16, mhash-devel
+BuildRequires: libsieve-devel >= 2.1.13, libzdb-devel >= 2.4, libevent-devel
BuildRequires: openldap-devel
-BuildRequires: sqlite-devel >= 3
-# Required by dbmail-2.2.16-update-asciidocs.patch
BuildRequires: asciidoc, xmlto
Requires: glib2 >= 2.8, logrotate, initscripts, vixie-cron
-Requires: initscripts
Requires: /usr/sbin/sendmail
-Requires(pre): fedora-usermgmt
-Requires(postun):fedora-usermgmt
-Requires: sqlite >= 3
+# libzdb 2.5 is broken for postgresql
+Requires: libzdb >= 2.6
+
+# Always require sqlite so a "out of the box" experience is possible.
+Requires: sqlite
+
+# Keep the obsoletes for upgrades
Obsoletes: dbmail-sqlite < 2.2.5
+Obsoletes: dbmail-pgsql < 2.3.6
+Obsoletes: dbmail-mysql < 2.3.6
+# Try to minimize dependency issues
Provides: dbmail-sqlite = %{version}
+Provides: dbmail-pgsql = %{version}
+Provides: dbmail-mysql = %{version}
+Requires(pre): shadow-utils
%description
Dbmail is the name of a group of programs that enable the possiblilty of
storing and retrieving mail messages from a database.
-Currently dbmail supports the following database backends:
+Currently dbmail supports the following database backends via libzdb:
MySQL
PostgreSQL
SQLite
@@ -74,13 +63,10 @@ Please see /usr/share/doc/dbmail-*/README.fedora for specific information on
installation and configuration in Fedora.
%prep
-%setup -q
+%setup -q -n %{name}-%{version}-rc1
-%if 0%{?rhel} && 0%{?rhel} < 6
-%patch0 -p1 -b .glib2-version
-# Note the use of -R to reverse this patch
-%patch1 -R -p1 -b .md5-implementation
-%endif
+%patch0 -p1 -b .fix-deprecated-gmime
+%patch1 -p1 -b .xmlto-skip-validation
# we don't need README.solaris and we don't want it caught up in the %%doc
# README* wildcard - but we do want our shiny new README.fedora file to be
@@ -89,7 +75,7 @@ rm -f README.solaris
install -p -m 644 %SOURCE7 .
# make a couple of changes to the default dbmail.conf file:
-# 1. default driver/authdriver sqlite/sql (sqlite, if supported)
+# 1. default driver/authdriver sqlite/sql
# 2. effective uid/gid to dbmail/dbmail
sed -i 's/\(^driver\W*=\)\(\W*$\)/\1 sqlite/' dbmail.conf
sed -i -e 's,\(^db\W*=\)\(.*$\),\1 %{_localstatedir}/lib/dbmail/dbmail.db,' \
@@ -97,31 +83,17 @@ sed -i -e 's,\(^db\W*=\)\(.*$\),\1 %{_localstatedir}/lib/dbmail/dbmail.db,' \
-e 's/\(^EFFECTIVE_USER\W*=\)\(.*$\)/\1 dbmail/' \
-e 's/\(^EFFECTIVE_GROUP\W*=\)\(.*$\)/\1 dbmail/' dbmail.conf
-# Filter out provides of private libraries
-cat << \EOF > %{name}-provides
-#!/bin/sh
-%{__find_provides} $* |\
- sed -e '/libauth_ldap\.so/d' \
- -e '/libauth_sql\.so/d' \
- -e '/libsort_sieve\.so/d' \
- -e '/libsqlite\.so/d' \
- -e '/libsqlite\.so/d' \
- -e '/libmysql\.so/d' \
- -e '/libpgsql\.so/d'
-EOF
-
-%define _use_internal_dependency_generator 0
-%define __find_provides %{_builddir}/%{name}-%{version}/%{name}-provides
-chmod +x %{__find_provides}
+%if 0%fedora && 0%fedora > 13
+sed -i 's/gmime-2.4/gmime-2.6/g' configure
+%endif
%build
+export CFLAGS="%{optflags} -I/usr/include/zdb"
%configure --disable-rpath \
--disable-static \
--with-ldap \
- --with-mysql \
- --with-pgsql \
- --with-sqlite \
- --with-sieve
+ --with-sieve \
+ --enable-manpages
make %{?_smp_mflags}
@@ -132,6 +104,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man{1,5,8}
mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/dbmail
install -p -m 755 %SOURCE1 $RPM_BUILD_ROOT/%{_initrddir}
install -p -m 755 %SOURCE2 $RPM_BUILD_ROOT/%{_initrddir}
@@ -139,6 +112,7 @@ install -p -m 755 %SOURCE3 $RPM_BUILD_ROOT/%{_initrddir}
install -p -m 755 %SOURCE4 $RPM_BUILD_ROOT/%{_initrddir}
install -p -m 755 %SOURCE5 $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily/dbmail
install -p -m 644 %SOURCE6 $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/dbmail
+install -p -m 644 %SOURCE8 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/dbmail
install -p -m 600 dbmail.conf $RPM_BUILD_ROOT/%{_sysconfdir}/
install -p -m 644 man/*1 $RPM_BUILD_ROOT/%{_mandir}/man1/
install -p -m 644 man/*5 $RPM_BUILD_ROOT/%{_mandir}/man5/
@@ -151,10 +125,11 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/dbmail/libdbmail.so
rm -rf $RPM_BUILD_ROOT
%pre
-/usr/sbin/fedora-groupadd %registry_uid -r %registry_name &> /dev/null || :
-/usr/sbin/fedora-useradd %registry_uid -r -s /sbin/nologin -d / -M \
- -c "DBMail Daemon Account" -g %registry_name %registry_name \
- &> /dev/null || :
+getent group %{name} >/dev/null || groupadd -r %{name}
+getent passwd %{name} >/dev/null || \
+ useradd -r -M -g %{name} -d / -s /sbin/nologin \
+ -c "DBMail Daemon" %{name}
+exit 0
%post
for s in %services; do
@@ -174,8 +149,6 @@ exit 0
%postun
if [ "$1" -eq "0" ]; then
/sbin/ldconfig
- /usr/sbin/fedora-userdel %registry_name &> /dev/null || :
- /usr/sbin/fedora-groupdel %registry_name &> /dev/null || :
elif [ "$1" -ge "1" ]; then
for s in %services; do
/sbin/service $s condrestart &> /dev/null || :
@@ -184,7 +157,7 @@ fi
%files
%defattr(-,root,root,-)
-%doc AUTHORS BUGS ChangeLog COPYING INSTALL README* THANKS
+%doc AUTHORS BUGS ChangeLog COPYING INSTALL README* THANKS UPGRADING sql dbmail.schema
%{_sbindir}/*
%{_mandir}/man1/*
%{_mandir}/man5/*
@@ -195,10 +168,9 @@ fi
%{_libdir}/dbmail/libsort_sieve*
%config(noreplace) %{_sysconfdir}/dbmail.conf
%{_initrddir}/dbmail-*
-%config(noreplace) %{_sysconfdir}/cron.daily/dbmail
+%{_sysconfdir}/cron.daily/dbmail
+%config(noreplace) %{_sysconfdir}/sysconfig/dbmail
%config(noreplace) %{_sysconfdir}/logrotate.d/dbmail
-%doc sql/sqlite/*
-%{_libdir}/dbmail/libsqlite*
%dir %attr(0775,root,dbmail) /var/lib/dbmail
%package auth-ldap
@@ -214,33 +186,11 @@ dbmail.
%defattr(-,root,root,-)
%attr(-,root,root) %{_libdir}/dbmail/libauth_ldap*
-%package mysql
-Summary: A database backed mail storage system - mysql backend
-Group: System Environment/Daemons
-Requires: dbmail = %{version}-%{release}, mysql-server >= 4.1.3
-
-%description mysql
-This is the mysql libraries for dbmail.
-
-%files mysql
-%defattr(-,root,root,-)
-%doc sql/mysql/*
-%{_libdir}/dbmail/libmysql*
-
-%package pgsql
-Summary: A database backed mail storage system - postgresql backend
-Group: System Environment/Daemons
-Requires: dbmail = %{version}-%{release}, postgresql-server
-
-%description pgsql
-This is the postgresql libraries for dbmail.
-
-%files pgsql
-%defattr(-,root,root,-)
-%doc sql/postgresql/*
-%{_libdir}/dbmail/libpgsql*
%changelog
+* Sat Jan 15 2011 Bernard Johnson <bjohnson at symetrix.com> - 3.0.0-0.1.rc1
+- v 3.0.0 release candidate 1
+
* Sun Sep 12 2010 Bernard Johnson <bjohnson at symetrix.com> - 2.2.17-1
- v 2.2.17
- drop unneeded patches
More information about the scm-commits
mailing list