From 6138f4a2fc835bc94aa66543f5aee4f92081f1c7 Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Wed, 30 Nov 2016 19:38:03 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/15936 NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra Talur Smoke: Gluster Build System --- glusterfs.spec.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'glusterfs.spec.in') 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 -- cgit