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

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