[bacula] Update systemd requirements and refresh distro checks for fedpkg > 1.10

Simone Caronni slaanesh at fedoraproject.org
Wed Oct 17 07:17:06 UTC 2012


commit e66bd925af28570358e898eb28f488ffd73ad702
Author: Simone Caronni <negativo17 at gmail.com>
Date:   Wed Oct 17 09:16:51 2012 +0200

    Update systemd requirements and refresh distro checks for fedpkg > 1.10

 bacula.spec |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/bacula.spec b/bacula.spec
index d8aead6..5ba501c 100644
--- a/bacula.spec
+++ b/bacula.spec
@@ -3,7 +3,7 @@
 
 Name:                   bacula
 Version:                5.2.12
-Release:                1%{?dist}
+Release:                2%{?dist}
 Summary:                Cross platform network backup for Linux, Unix, Mac and Windows
 # See LICENSE for details
 License:                AGPLv3 with exceptions
@@ -139,12 +139,21 @@ Provides:               bacula-director-sqlite = %{version}-%{release}
 Obsoletes:              bacula-director-sqlite < 5.2.3-5
 Provides:               bacula-director-postgresql = %{version}-%{release}
 Obsoletes:              bacula-director-postgresql < 5.2.3-5
-%if 0%{?fedora} || 0%{?rhel} > 6
-Requires(post):         systemd-sysv
+
+%if 0%{?fedora} == 16 || 0%{?fedora} == 17
 Requires(post):         systemd-units
 Requires(preun):        systemd-units
 Requires(postun):       systemd-units
-%else
+%endif
+
+%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
+Requires(post):         systemd-sysv
+Requires(post):         systemd
+Requires(preun):        systemd
+Requires(postun):       systemd
+%endif
+
+%if 0%{?rhel} = 5 || 0%{?rhel} = 6
 Requires(post):         /sbin/chkconfig
 Requires(preun):        /sbin/chkconfig
 Requires(preun):        /sbin/service
@@ -498,9 +507,7 @@ getent passwd %username >/dev/null || useradd -u %uid -r -s /sbin/nologin \
 exit 0
 
 
-# Until this is fixed upstream in fedpkg, leave it like this
-# http://permalink.gmane.org/gmane.linux.redhat.fedora.devel/168291
-%if (0%{?fedora} == 16 || 0%{?fedora} == 17) && !0%{?rhel}
+%if 0%{?fedora} == 16 || 0%{?fedora} == 17
 
 %post client
 if [ $1 -eq 1 ] ; then
@@ -878,6 +885,11 @@ fi
 
 
 %changelog
+* Wed Oct 17 2012 Simone Caronni <negativo17 at gmail.com> - 5.2.12-2
+- Fix fedpkg checks. Requires fedpkg > 1.10:
+  http://git.fedorahosted.org/cgit/fedpkg.git/commit/?id=11c46c06a3c9cc2f58d68aea964dd37dc028e349
+- Change systemd requirements as per new package guidelines.
+
 * Fri Sep 14 2012 Simone Caronni <negativo17 at gmail.com> - 5.2.12-1
 - Update to 5.2.12, containing only patches from 5.2.11-4.
 


More information about the scm-commits mailing list