3604df
From 1fcdb7f80277af859c01c07065f7efe410c9b3b8 Mon Sep 17 00:00:00 2001
3604df
From: Milind Changire <mchangir@redhat.com>
3604df
Date: Fri, 2 Dec 2016 10:42:32 +0530
3604df
Subject: [PATCH 213/227] build: add systemd dependency to the glusterfs
3604df
 sub-package
3604df
3604df
Problem:
3604df
/bin/systemctl is not available at install time of primary glusterfs
3604df
package.
3604df
3604df
Solution:
3604df
Add %{?systemd_requires} to the glusterfs sub-package install time
3604df
requirements.
3604df
3604df
Replace all "Requires: systemd" and "Requires: systemd-units" with
3604df
%{?systemd_requires}. %systemd_requires is defined in
3604df
/usr/lib/rpm/macros.d/macros.systemd
3604df
systemd-units is provided by systemd.
3604df
Add BuildRequires: systemd for the definition of %systemd_requires
3604df
as well.
3604df
3604df
> BUG: 1399031
3604df
> Reviewed-on: http://review.gluster.org/15936
3604df
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
3604df
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
3604df
> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
3604df
> Smoke: Gluster Build System <jenkins@build.gluster.org>
3604df
(cherry picked from commit 6138f4a2fc835bc94aa66543f5aee4f92081f1c7)
3604df
3604df
> BUG: 1400635
3604df
> Reviewed-on: http://review.gluster.org/15999
3604df
(cherry picked from commit 27c13f3c2b87f83bedd52be3ac16651e37310c9d)
3604df
3604df
Change-Id: I980ece7d538ea177ca6b0e70c1c169e6f04c46d4
3604df
BUG: 1377062
3604df
Signed-off-by: Milind Changire <mchangir@redhat.com>
3604df
Reviewed-on: https://code.engineering.redhat.com/gerrit/91958
3604df
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
3604df
---
3604df
 glusterfs.spec.in | 11 ++++++-----
3604df
 1 file changed, 6 insertions(+), 5 deletions(-)
3604df
3604df
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
3604df
index cc797b4..f2231b3 100644
3604df
--- a/glusterfs.spec.in
3604df
+++ b/glusterfs.spec.in
3604df
@@ -212,10 +212,13 @@ BuildRoot:        %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
3604df
 BuildRequires:    python-simplejson
3604df
 %endif
3604df
 %if ( 0%{?_with_systemd:1} )
3604df
-BuildRequires:    systemd-units
3604df
+BuildRequires:    systemd
3604df
 %endif
3604df
 
3604df
 Requires:         %{name}-libs%{?_isa} = %{version}-%{release}
3604df
+%if ( 0%{?_with_systemd:1} )
3604df
+%{?systemd_requires}
3604df
+%endif
3604df
 BuildRequires:    bison flex
3604df
 BuildRequires:    gcc make libtool
3604df
 BuildRequires:    ncurses-devel readline-devel
3604df
@@ -569,9 +572,7 @@ Requires:         psmisc
3604df
 Requires:         lvm2
3604df
 Requires:         nfs-utils
3604df
 %if ( 0%{?_with_systemd:1} )
3604df
-Requires(post):   systemd-units, systemd
3604df
-Requires(preun):  systemd-units
3604df
-Requires(postun): systemd-units
3604df
+%{?systemd_requires}
3604df
 %else
3604df
 Requires(post):   /sbin/chkconfig
3604df
 Requires(preun):  /sbin/service
3604df
@@ -630,7 +631,7 @@ Requires:         python-gluster = %{version}-%{release}
3604df
 Requires:         python-argparse
3604df
 %endif
3604df
 %if ( 0%{?_with_systemd:1} )
3604df
-Requires(post):   systemd
3604df
+%{?systemd_requires}
3604df
 %endif
3604df
 
3604df
 %description events
3604df
-- 
3604df
2.9.3
3604df