[dbmail] - v 3.2.3 - Introduce new systemd-rpm macros in dbmail spec file (bz #850081)

Bernard Johnson bjohnson at fedoraproject.org
Sat Feb 28 02:13:52 UTC 2015


commit b35c62eaa991c6980af8fc07e6ec3362286ff457
Author: Bernard Johnson <bjohnson at symetrix.com>
Date:   Fri Feb 27 19:13:34 2015 -0700

    - v 3.2.3
    - Introduce new systemd-rpm macros in dbmail spec file (bz #850081)

 .gitignore  |  1 +
 dbmail.spec | 58 +++++++++++++++++-----------------------------------------
 sources     |  2 +-
 3 files changed, 19 insertions(+), 42 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 51859ef..92cf166 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
 /dbmail-3.1.10.tar.gz
 /dbmail-3.1.13.tar.gz
 /dbmail-3.2.0.tar.gz
+/dbmail-3.2.3.tar.gz
diff --git a/dbmail.spec b/dbmail.spec
index 586c0fa..bef9224 100644
--- a/dbmail.spec
+++ b/dbmail.spec
@@ -18,7 +18,7 @@
 %define         services dbmail-imapd dbmail-pop3d dbmail-lmtpd dbmail-timsieved
 
 Name:           dbmail
-Version:        3.2.0
+Version:        3.2.3
 Release:        1%{?dist}
 Summary:        A database backed mail storage system
 
@@ -40,7 +40,7 @@ Patch0:         dbmail-3.0.2-gthread.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-BuildRequires:  gmime-devel > 2.4
+BuildRequires:  gmime-devel > 2.4, systemd
 BuildRequires:  fileutils, openssl-devel >= 0.9.7a
 BuildRequires:  glib2-devel >= 2.16, mhash-devel
 BuildRequires:  libsieve-devel >= 2.1.13, libzdb-devel >= 2.4, libevent-devel
@@ -51,11 +51,9 @@ Requires:       glib2 >= 2.8, logrotate, dailyjobs
 Requires:       /usr/sbin/sendmail
 # libzdb 2.5 is broken for postgresql
 Requires:       libzdb >= 2.6
-Requires(post): systemd-units
-Requires(preun): systemd-units
-Requires(postun): systemd-units
-# For triggerun
-Requires(post): systemd-sysv
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
 
 # Always require sqlite so a "out of the box" experience is possible.
 Requires:       sqlite
@@ -156,49 +154,22 @@ getent passwd %{name} >/dev/null || \
 exit 0
 
 %post
-if [ $1 -eq 1 ] ; then 
-    # Initial installation 
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+for s in %services; do
+  %systemd_post $s.service
+done
 /sbin/ldconfig
 
 %preun
-if [ $1 -eq 0 ]; then
-  for s in %services; do
-    # Package removal, not upgrade
-    /bin/systemctl --no-reload disable $s.service > /dev/null 2>&1 || :
-    /bin/systemctl stop $s.service > /dev/null 2>&1 || :
-  done
-fi
-
-%postun
-/sbin/ldconfig
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-  for s in %services; do
-    # Package upgrade, not uninstall
-    /bin/systemctl try-restart $s.service >/dev/null 2>&1 || :
-  done
-fi
-
-%triggerun -- dmail < 3.0.2-3
-# Save the current service runlevel info
-# User must manually run systemd-sysv-convert --apply dbmail-imapd
-# and system-sysv-convert --apply dmail-lmtpd
-# and system-sysv-convert --apply dmail-pop3d
-# and system-sysv-convert --apply dmail-timsieved
-# to migrate them to systemd targets
 for s in %services; do
-  /usr/bin/systemd-sysv-convert --save $s >/dev/null 2>&1 ||:
+  %systemd_preun $s.service
 done
 
-# Run these because the SysV package being removed won't do them
+%postun
+/sbin/ldconfig
 for s in %services; do
-  /sbin/chkconfig --del $s >/dev/null 2>&1 || :
-  /bin/systemctl try-restart $s.service >/dev/null 2>&1 || :
+  %systemd_preun $s.service
 done
 
-
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS BUGS ChangeLog COPYING INSTALL README* THANKS UPGRADING sql dbmail.schema
@@ -232,6 +203,11 @@ dbmail.
 
 
 %changelog
+* Fri Feb 27 2015 Bernard Johnson <bjohnson at symetrix.com> - 3.2.3-1
+- v 3.2.3
+- Introduce new systemd-rpm macros in dbmail spec file (bz #850081)
+
+
 * Wed Sep 17 2014 Bernard Johnson <bjohnson at symetrix.com> - 3.2.0-1
 - v 3.2.0
 
diff --git a/sources b/sources
index da1c6dc..96dab90 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-6375ea94b62e1752d8ecf3283eff100c  dbmail-3.2.0.tar.gz
+4f140751642559395dfe3a6bb2cc9300  dbmail-3.2.3.tar.gz


More information about the scm-commits mailing list