rpms/dbmail/FC-5 README.fedora, NONE, 1.1 dbmail-imapd, NONE, 1.1 dbmail-lmtpd, NONE, 1.1 dbmail-pop3d, NONE, 1.1 dbmail-timsieved, NONE, 1.1 dbmail.cron, NONE, 1.1 dbmail.logrotate, NONE, 1.1 dbmail.spec, NONE, 1.1 kill-module-path.patch, NONE, 1.1 umask.patch, NONE, 1.1 sources, 1.1, 1.2

Bernard Johnson (bjohnson) fedora-extras-commits at redhat.com
Wed Feb 21 06:38:18 UTC 2007


Author: bjohnson

Update of /cvs/extras/rpms/dbmail/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26627

Modified Files:
	sources 
Added Files:
	README.fedora dbmail-imapd dbmail-lmtpd dbmail-pop3d 
	dbmail-timsieved dbmail.cron dbmail.logrotate dbmail.spec 
	kill-module-path.patch umask.patch 
Log Message:
dbmail-2.2.2



--- NEW FILE README.fedora ---
=== README.fedora ===

Currently,  DBMail supports MySQL, PostgreSQL and SQLite3 for mail storage.
The drivers for these different databases are packaged separately.  In order
to have a working system, you must install the driver for the database you wish
to use.  If you do not select a driver at install time, a default driver will
be installed.

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-mysql (default)
  dbmail-pgsql
  dbmail-sqlite

Additionally, you have a choice of authentication drivers as well:
  dbmail (built-in sql authentication by default)
  dbmail-auth-ldap

Once you have selected and installed dbmail and the drivers you will be using,
you must install the database (documented in the /usr/share/doc/dbmail-*/INSTALL
document) and configure dbmail (there are usually enough comments in the
/etc/dbmail.conf file to do this without further documentation).  There are
feature specific setup instruction in /usr/share/doc/dbmail-*/README*.

Bernard Johnson <bjohnson at symetrix.com>


--- NEW FILE dbmail-imapd ---
#!/bin/bash
#
# Startup script for the DBMail Imap Server
#
# chkconfig: - 81 19
# description: DBMail is a mail server with a database backend.
# processname: dbmail-imapd
# pidfile: /var/run/dbmail-imapd.pid
# config: /etc/dbmail.conf

# Source function library.
. /etc/rc.d/init.d/functions

DBLIBDIR=/usr/lib/dbmail
export LD_LIBRARY_PATH=$DBLIBDIR:$LD_LIBRARY_PATH

if [ -f /etc/sysconfig/dbmail-imapd ]; then
        . /etc/sysconfig/dbmail-imapd
fi

# Path to the dbmail script.
exe=/usr/sbin/dbmail-imapd
prog=dbmail-imapd
RETVAL=0

start() {
    echo -n $"Starting $prog: "
    daemon $exe
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
    return $RETVAL
}
stop() {
    echo -n $"Stopping $prog: "
    killproc $exe
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog /var/run/$prog.pid
}
reload() {
    echo -n $"Reloading $prog: "
    killproc $exe -HUP
    RETVAL=$?
    echo
}

# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  status)
    status $exe
    RETVAL=$?
    ;;
  restart)
    stop
    start
    ;;
  condrestart)
    if [ -f /var/run/$prog.pid ] ; then
        stop
        start
    fi
    ;;
  reload)
    reload
	;;
  *)
    echo $"Usage: $prog {start|stop|restart|condrestart|reload|status}"
    exit 1
esac

exit $RETVAL


--- NEW FILE dbmail-lmtpd ---
#!/bin/bash
#
# Startup script for the DBMail LMTP Server
#
# chkconfig: - 81 19
# description: DBMail is a mail server with a database backend.
# processname: dbmail-lmtpd
# pidfile: /var/run/dbmail-lmtpd.pid
# config: /etc/dbmail.conf
#

# Source function library.
. /etc/rc.d/init.d/functions

DBLIBDIR=/usr/lib/dbmail
export LD_LIBRARY_PATH=$DBLIBDIR:$LD_LIBRARY_PATH

if [ -f /etc/sysconfig/dbmail-lmtpd ]; then
        . /etc/sysconfig/dbmail-lmtpd
fi

# Path to the dbmail script.
exe=/usr/sbin/dbmail-lmtpd
prog=dbmail-lmtpd
RETVAL=0

start() {
    echo -n $"Starting $prog: "
    daemon $exe
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
    return $RETVAL
}
stop() {
    echo -n $"Stopping $prog: "
    killproc $exe
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog /var/run/$prog.pid
}
reload() {
    echo -n $"Reloading $prog: "
    killproc $exe -HUP
    RETVAL=$?
    echo
}

# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  status)
    status $exe
    RETVAL=$?
    ;;
  restart)
    stop
    start
    ;;
  condrestart)
    if [ -f /var/run/$prog.pid ] ; then
        stop
        start
    fi
    ;;
  reload)
    reload
	;;
  *)
    echo $"Usage: $prog {start|stop|restart|condrestart|reload|status}"
    exit 1
esac

exit $RETVAL


--- NEW FILE dbmail-pop3d ---
#!/bin/bash
#
# Startup script for the DBMail pop3 Server
#
# chkconfig: - 81 19
# description: DBMail is a mail server with a database backend.
# processname: dbmail-pop3d
# pidfile: /var/run/dbmail-pop3d.pid
# config: /etc/dbmail.conf
#

# Source function library.
. /etc/rc.d/init.d/functions

DBLIBDIR=/usr/lib/dbmail
export LD_LIBRARY_PATH=$DBLIBDIR:$LD_LIBRARY_PATH

if [ -f /etc/sysconfig/dbmail-pop3d ]; then
        . /etc/sysconfig/dbmail-pop3d
fi

# Path to the dbmail script.
exe=/usr/sbin/dbmail-pop3d
prog=dbmail-pop3d
RETVAL=0

start() {
    echo -n $"Starting $prog: "
    daemon $exe
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
    return $RETVAL
}
stop() {
    echo -n $"Stopping $prog: "
    killproc $exe
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog /var/run/$prog.pid
}
reload() {
    echo -n $"Reloading $prog: "
    killproc $exe -HUP
    RETVAL=$?
    echo
}

# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  status)
    status $exe
    RETVAL=$?
    ;;
  restart)
    stop
    start
    ;;
  condrestart)
    if [ -f /var/run/$prog.pid ] ; then
        stop
        start
    fi
    ;;
  reload)
    reload
	;;
  *)
    echo $"Usage: $prog {start|stop|restart|condrestart|reload|status}"
    exit 1
esac

exit $RETVAL


--- NEW FILE dbmail-timsieved ---
#!/bin/bash
#
# Startup script for the DBMail Sieve Server
#
# chkconfig: - 81 19
# description: DBMail is a mail server with a database backend.
# processname: dbmail-timsieved
# pidfile: /var/run/dbmail-timsieved.pid
# config: /etc/dbmail.conf
#

# Source function library.
. /etc/rc.d/init.d/functions

DBLIBDIR=/usr/lib/dbmail
export LD_LIBRARY_PATH=$DBLIBDIR:$LD_LIBRARY_PATH

if [ -f /etc/sysconfig/dbmail-timsieved ]; then
        . /etc/sysconfig/dbmail-timsieved
fi

# Path to the dbmail script.
exe=/usr/sbin/dbmail-timsieved
prog=dbmail-timsieved
RETVAL=0

start() {
    echo -n $"Starting $prog: "
    daemon $exe
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
    return $RETVAL
}
stop() {
    echo -n $"Stopping $prog: "
    killproc $exe
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog /var/run/$prog.pid
}
reload() {
    echo -n $"Reloading $prog: "
    killproc $exe -HUP
    RETVAL=$?
    echo
}

# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  status)
    status $exe
    RETVAL=$?
    ;;
  restart)
    stop
    start
    ;;
  condrestart)
    if [ -f /var/run/$prog.pid ] ; then
        stop
        start
    fi
    ;;
  reload)
    reload
	;;
  *)
    echo $"Usage: $prog {start|stop|restart|condrestart|reload|status}"
    exit 1
esac

exit $RETVAL


--- NEW FILE dbmail.cron ---
#!/bin/sh
 
LOGFILE=/var/log/dbmail.log

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/dbmail

echo "" >> $LOGFILE
date >> $LOGFILE
dbmail-util -c -t -u -p -d -y 2>&1 >> $LOGFILE


--- NEW FILE dbmail.logrotate ---
/var/log/dbmail.log {
    missingok
    notifempty
    create 0600 root root
}

/var/log/dbmail.err {
    missingok
    notifempty
    create 0600 root root
    postrotate
        /usr/bin/killall -HUP dbmail-lmtpd dbmail-imapd dbmail-pop3d dbmail-timsieved &> /dev/null
    endscript
}


--- NEW FILE dbmail.spec ---
# Once the package is accepted into Fedora Extras, the uid should be assigned
# from the User Registry: http://fedoraproject.org/wiki/PackageUserRegistry
%define         registry_uid  %nil
%define         registry_name dbmail

%define         services dbmail-imapd dbmail-pop3d dbmail-lmtpd dbmail-timsieved

# older distros don't have sqlite
%if "%fedora" >= "4" || "%rhel" >= "4"
%define with_sqlite 1
%endif

Name:           dbmail
Version:        2.2.2
Release:        9%{?dist}%{?repotag:.%{repotag}}
Summary:        The DBMail mail storage system

Group:          System Environment/Daemons
License:        GPL
URL:            http://www.dbmail.org
Source0:        http://www.dbmail.org/download/2.2/dbmail-%{version}.tar.gz
Source1:        dbmail-imapd
Source2:        dbmail-pop3d
Source3:        dbmail-lmtpd
Source4:        dbmail-timsieved
Source5:        dbmail.cron
Source6:        dbmail.logrotate
Source7:        README.fedora
Patch0:         kill-module-path.patch
Patch1:         umask.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  fileutils, openssl >= 0.9.7a
BuildRequires:  glib2-devel >= 2.8,  gmime-devel >= 2.1.19
BuildRequires:  libsieve-devel >= 2.1.13
BuildRequires:  asciidoc, xmlto
BuildRequires:  mysql-devel >= 4.1.3, postgresql-devel
%if 0%{?with_sqlite}
BuildRequires:  sqlite-devel >= 3
%endif

Requires:       glib2 >= 2.8, logrotate, initscripts, vixie-cron
Requires(post): /sbin/chkconfig
Requires(preun):/sbin/chkconfig
Requires(pre):  fedora-usermgmt
Requires(postun):fedora-usermgmt
Requires:       dbmail-database-driver = %{version}-%{release}

%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:
MySQL
PostgreSQL
%if 0%{?with_sqlite}
SQLite
%endif

Please see /usr/share/doc/dbmail-*/README.fedora for specific information on
installation and configuration in Fedora.

%prep
%setup -q
%patch0 -p1 -b .kill-module-path
%patch1 -p1 -b .umask

# 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
# installed
rm -f README.solaris
install -p -m 644 %SOURCE7 .

%build
%configure --disable-rpath \
           --disable-static \
           --with-mysql \
           --with-pgsql \
%if 0%{?with_sqlite}
           --with-sqlite \
%endif
           --with-sieve

make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
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}/ld.so.conf.d
install -p -m 755 %SOURCE1 $RPM_BUILD_ROOT/%{_initrddir}
install -p -m 755 %SOURCE2 $RPM_BUILD_ROOT/%{_initrddir}
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 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/
install -p -m 644 man/*8 $RPM_BUILD_ROOT/%{_mandir}/man8/
# remove libtool archives and -devel type stuff (but leave loadable modules)
find $RPM_BUILD_ROOT -name \*\.la -print | xargs rm -f
rm -f $RPM_BUILD_ROOT/%{_libdir}/dbmail/libdbmail.so

# create dynamic linker/loader configuration file
echo "%{_libdir}/dbmail" > \
     $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d/dbmail-`uname -i`.conf

# change tabs in dbmail.conf to spaces
sed -i 's/\t/        /g' $RPM_BUILD_ROOT/%{_sysconfdir}/dbmail.conf

# why is libsqlite.so.* built even when we say not to?
%if ! 0%{?with_sqlite}
rm -f $RPM_BUILD_ROOT/%{_libdir}/dbmail/libsqlite.so*
%endif

%clean
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 || :

%post
for s in %services; do
  /sbin/chkconfig --add $s &> /dev/null || :
done
/sbin/ldconfig

%preun
if [ $1 = 0 ]; then
  for s in %services; do
    %{_initrddir}/$s stop &> /dev/null || : 
    /sbin/chkconfig --del $s &> /dev/null || :
  done
fi
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
    %{_initrddir}/$s condrestart &> /dev/null || : 
  done
fi	

%files
%defattr(-,root,root,-)
%doc AUTHORS BUGS ChangeLog COPYING INSTALL README* THANKS
%{_sbindir}/*
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%dir %{_libdir}/dbmail
%{_libdir}/dbmail/libauth_sql*
%{_libdir}/dbmail/libdbmail*
%{_libdir}/dbmail/libsort_sieve*
%config(noreplace) %{_sysconfdir}/dbmail.conf
%{_initrddir}/dbmail-*
%{_sysconfdir}/cron.daily/dbmail
%config(noreplace) %{_sysconfdir}/logrotate.d/dbmail
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/dbmail-*.conf

%package auth-ldap
Summary:        The DBMail mail storage system
Group:          System Environment/Daemons
Requires:       dbmail = %{version}-%{release}, openldap

%description auth-ldap
This is the auth-ldap libraries for authentication against a ldap server with
dbmail.

%files auth-ldap
%defattr(-,root,root,-)
%attr(-,root,root) %{_libdir}/dbmail/libauth_ldap*

%package mysql
Summary:        The DBMail mail storage system
Group:          System Environment/Daemons
Requires:       dbmail = %{version}-%{release}, mysql-server >= 4.1.3
Provides:       dbmail-database-driver = %{version}-%{release}

%description mysql
This is the mysql libraries for dbmail.

%files mysql
%defattr(-,root,root,-)
%doc sql/mysql/*
%{_libdir}/dbmail/libmysql*

%package pgsql
Summary:        The DBMail mail storage system
Group:          System Environment/Daemons
Requires:       dbmail = %{version}-%{release}, postgresql-server
Provides:       dbmail-database-driver = %{version}-%{release}

%description pgsql
This is the postgresql libraries for dbmail.

%files pgsql
%defattr(-,root,root,-)
%doc sql/postgresql/*
%{_libdir}/dbmail/libpgsql*

%if 0%{?with_sqlite}
%package sqlite
Summary:        The DBMail mail storage system
Group:          System Environment/Daemons
Requires:       dbmail = %{version}-%{release}, sqlite
Provides:       dbmail-database-driver = %{version}-%{release}

%description sqlite
This is the sqlite libraries for dbmail.

%files sqlite
%defattr(-,root,root,-)
%doc sql/sqlite/*
%{_libdir}/dbmail/libsqlite*
%endif

%changelog
* Tue Feb 20 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.2-9
- fix source0 location

* Tue Feb 20 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.2-8
- change /etc/dbmail.conf to mode 0600
- remove README.solaris, create README.fedora
- add ref to README.fedora in %%desc

* Tue Feb 20 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.2-7
- make macro tests a little more readable
- change dbmail-database to dbmail-database-driver; more descriptive
- reduce gmime reqs to 2.1.19
- specify sqlite req at 3 or greater

* Sun Feb 18 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.2-6
- remove bogus require for main package on mysql
- virtual depend with exact %%{version}-%%{release}
- remove extra mysql-devel BR
- update description to include sqlite if built with sqlite
- for mysql, 4.1.3 is required, not just 4.1
- add requires for vixie-cron
- move database specific docs to database subpackages

* Sun Feb 18 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.2-5
- fix perms on man pages

* Sat Feb 17 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.2-4
- fix a few things in scriptlets for consistency
- send error output from logrotate HUP to /dev/null
- explicitly require initscripts since they all use the daemon function
- use explicit %%{version}-%%{release} for provides

* Mon Feb 05 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.2-3
- fix typo in logrotate script
- patch umask for log files to be something more reasonable

* Sat Jan 31 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.2-2
- add some conditionals for not building sqlite on some product releases
- substitude \t for tab in sed so that rpmlint doesn't complain about mixing
  tabs and spaces

* Sat Jan 31 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.2-1
- add logrotate for dbmail.err
- sub packages depend on %%{version}-%%{release}
- update to 2.2.2
- remove mailbox2dbmail patch
- translate tabs to space in dbmail.conf
- remove errno race patch

* Sat Jan 13 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.1-7
- revert to older fedora-usermgmt macros so rpm will work with older os

* Fri Jan 12 2007 Bernard Johnson <bjohnson at symetrix.com> 2.2.1-6
- add patch to fix errno race condition
- don't delete libsort_sieve.so, it's a module

* Thu Dec 14 2006 Bernard Johnson <bjohnson at symetrix.com> 2.2.1-5
- fix my local svn that caused x bit on init files to sneak in

* Thu Dec 14 2006 Bernard Johnson <bjohnson at symetrix.com> 2.2.1-4
- cleanup of spec file
- use fedora-usermgmt hooks
- split and build all database libraries
- kill modules/.libs from the module load path

* Tue Dec 05 2006 Bernard Johnson <bjohnson at symetrix.com> 2.2.1-3
- leave the right .so files for modules

* Mon Nov 27 2006 Bernard Johnson <bjohnson at symetrix.com> 2.2.1-2
- update with Fedora Extras style spec file

* Sat Nov 18 2006 Bernard Johnson <bjohnson at symetrix.com> 2.2.1-1.sc
- version 2.2.1

* Mon Nov 15 2006 Bernard Johnson <bjohnson at symetrix.com> 2.2.0-4.sc
- release 2.2.0-1.sc

kill-module-path.patch:

--- NEW FILE kill-module-path.patch ---
--- dbmail-2.2.1/dbmodule.c.orig	2006-11-03 01:17:10.000000000 -0700
+++ dbmail-2.2.1/dbmodule.c	2006-12-14 04:17:18.000000000 -0700
@@ -55,12 +55,11 @@
 	/* Try local build area, then dbmail lib paths, then system lib path. */
 	int i;
 	char *lib_path[] = {
-		"modules/.libs",
 		PREFIX "/lib/dbmail",
 		NULL };
 	/* Note that the limit here *includes* the NULL. This is intentional,
 	 * to allow g_module_build_path to try the current working directory. */
-	for (i = 0; i < 3; i++) {
+	for (i = 0; i < 2; i++) {
 		lib = g_module_build_path(lib_path[i], driver);
 		module = g_module_open(lib, 0); // non-lazy bind.
 

umask.patch:

--- NEW FILE umask.patch ---
--- dbmail-2.2.2/server.c.orig	2006-11-17 05:33:11.000000000 -0700
+++ dbmail-2.2.2/server.c	2007-02-05 11:05:32.000000000 -0700
@@ -177,7 +177,7 @@
 		exit(0);
 
 	chdir("/");
-	umask(0);
+	umask(0077);
 	
 	if (! (freopen(conf->log, "a", stdout))) {
 		serr = errno;


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/dbmail/FC-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	21 Feb 2007 04:01:03 -0000	1.1
+++ sources	21 Feb 2007 06:37:45 -0000	1.2
@@ -0,0 +1 @@
+7a1a0940d3ec07dc55c7e49412298b0a  dbmail-2.2.2.tar.gz




More information about the fedora-extras-commits mailing list