diff options
author | Milind Changire <mchangir@redhat.com> | 2016-11-30 19:38:03 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2016-12-01 06:56:45 -0800 |
commit | 6138f4a2fc835bc94aa66543f5aee4f92081f1c7 (patch) | |
tree | 19306d54346a54a5be03a96315c04509639818eb | |
parent | 331a45942333e27f596b1930f7d459f59850c8a4 (diff) |
build: add systemd dependency to the glusterfs sub-package
Problem:
/bin/systemctl is not available at install time of primary glusterfs
package.
Solution:
Add %{?systemd_requires} to the glusterfs sub-package install time
requirements.
Replace all "Requires: systemd" and "Requires: systemd-units" with
%{?systemd_requires}. %systemd_requires is defined in
/usr/lib/rpm/macros.d/macros.systemd
systemd-units is provided by systemd.
Add BuildRequires: systemd for the definition of %systemd_requires
as well.
Change-Id: I980ece7d538ea177ca6b0e70c1c169e6f04c46d4
BUG: 1399031
Signed-off-by: Milind Changire <mchangir@redhat.com>
Reviewed-on: http://review.gluster.org/15936
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r-- | glusterfs.spec.in | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in index c320a2b3041..afaf3b0958c 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -192,10 +192,13 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: python-simplejson %endif %if ( 0%{?_with_systemd:1} ) -BuildRequires: systemd-units +BuildRequires: systemd %endif Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%if ( 0%{?_with_systemd:1} ) +%{?systemd_requires} +%endif BuildRequires: bison flex BuildRequires: gcc make libtool BuildRequires: ncurses-devel readline-devel @@ -544,9 +547,7 @@ Requires: psmisc Requires: lvm2 Requires: nfs-utils %if ( 0%{?_with_systemd:1} ) -Requires(post): systemd-units, systemd -Requires(preun): systemd-units -Requires(postun): systemd-units +%{?systemd_requires} %else Requires(post): /sbin/chkconfig Requires(preun): /sbin/service @@ -603,7 +604,7 @@ Requires: python-gluster = %{version}-%{release} Requires: python-argparse %endif %if ( 0%{?_with_systemd:1} ) -Requires(post): systemd +%{?systemd_requires} %endif %description events |