Blame SOURCES/libvirt-cim-0.6.3-f18ba715.patch

c55d09
From f18ba71595815c820742e2f12cc30481fc510642 Mon Sep 17 00:00:00 2001
c55d09
From: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
c55d09
Date: Fri, 30 Aug 2013 14:12:20 +0200
c55d09
Subject: [PATCH 13/48] build: Don't use /bin/sh unconditionally
c55d09
c55d09
provider-register.sh implicitly assumes that the shell has bash-like
c55d09
capabilities. On systems like Ubuntu this is not the case leading
c55d09
to a make postinstall failure when used with Pegasus.
c55d09
Changing the script shebang to /bin/bash to make this explicit.
c55d09
Further replace occurrences of sh to $(SHELL) in the Makefile
c55d09
invocations of provider-register.sh.
c55d09
c55d09
Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
c55d09
Signed-off-by: John Ferlan <jferlan@redhat.com>
c55d09
---
c55d09
 Makefile.am          | 18 +++++++++---------
c55d09
 provider-register.sh |  2 +-
c55d09
 2 files changed, 10 insertions(+), 10 deletions(-)
c55d09
c55d09
diff --git a/Makefile.am b/Makefile.am
c55d09
index 63ed3c7..9e8e96b 100644
c55d09
--- a/Makefile.am
c55d09
+++ b/Makefile.am
c55d09
@@ -201,26 +201,26 @@ uninstall-local:
c55d09
 	done
c55d09
 
c55d09
 preinstall:
c55d09
-	sh -x base_schema/install_base_schema.sh `pwd`/base_schema
c55d09
+	$(SHELL) -x base_schema/install_base_schema.sh `pwd`/base_schema
c55d09
 
c55d09
 # Un/Register the providers and class definitions from/to the current CIMOM.
c55d09
 # @CIMSERVER@ is set by the configure script
c55d09
 postinstall:
c55d09
-	sh provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(MOFS))
c55d09
-	sh provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_MOFS))
c55d09
-	sh provider-register.sh -v -t @CIMSERVER@ -n root/cimv2 -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_MOFS))
c55d09
+	$(SHELL) provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(MOFS))
c55d09
+	$(SHELL) provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_MOFS))
c55d09
+	$(SHELL) provider-register.sh -v -t @CIMSERVER@ -n root/cimv2 -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_MOFS))
c55d09
 	if [[ @CIMSERVER@ = pegasus ]]; then \
c55d09
-	sh provider-register.sh -v -t @CIMSERVER@ -n root/PG_InterOp -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \
c55d09
+	$(SHELL) provider-register.sh -v -t @CIMSERVER@ -n root/PG_InterOp -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \
c55d09
 	fi
c55d09
 	virsh -v | grep -q '^0.3' && cp examples/diskpool.conf $(DISK_POOL_CONFIG) || true
c55d09
 	mkdir -p $(INFO_STORE)
c55d09
 
c55d09
 preuninstall:
c55d09
-	sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(MOFS))
c55d09
-	sh provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_MOFS))
c55d09
-	sh provider-register.sh -v -d -t @CIMSERVER@ -n root/cimv2 -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_MOFS))
c55d09
+	$(SHELL) provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(MOFS))
c55d09
+	$(SHELL) provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_MOFS))
c55d09
+	$(SHELL) provider-register.sh -v -d -t @CIMSERVER@ -n root/cimv2 -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_MOFS))
c55d09
 	if [[ @CIMSERVER@ = pegasus ]]; then \
c55d09
-	sh provider-register.sh -v -d -t @CIMSERVER@ -n root/PG_InterOp -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \
c55d09
+	$(SHELL) provider-register.sh -v -d -t @CIMSERVER@ -n root/PG_InterOp -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \
c55d09
 	fi
c55d09
 
c55d09
 rpm: clean
c55d09
diff --git a/provider-register.sh b/provider-register.sh
c55d09
index b907df1..b730ef3 100755
c55d09
--- a/provider-register.sh
c55d09
+++ b/provider-register.sh
c55d09
@@ -1,4 +1,4 @@
c55d09
-#!/bin/sh
c55d09
+#!/bin/bash
c55d09
 # $Id$
c55d09
 # ==================================================================
c55d09
 # Copyright IBM Corp. 2005
c55d09
-- 
c55d09
1.8.5.3
c55d09