[Ocfs2-tools-devel] [PATCH 2/4] vendor: rhel: remove redhat-lsb* dependency

Junxiao Bi junxiao.bi at oracle.com
Fri Oct 21 00:42:18 PDT 2016


o2cb service depends on redhat-lsb-core(rhel6/7) or redhat-lsb(rhel5)
for functions start_daemon()/pidofproc()/killproc(). These funtions are
wrappers of functions in /etc/init.d/functions. Remove these wrappers
can kill the dependency to redhat-lsb* which can avoid involving other
unnecessary dependencies.

Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
Acked-by: Srinivas Eeda <srinivas.eeda at oracle.com>
---
 vendor/common/o2cb.init.sh                |   10 ++++++++++
 vendor/common/ocfs2-tools.spec-generic.in |    2 +-
 vendor/fc7/Vendor.make                    |    2 +-
 vendor/fc8/Vendor.make                    |    2 +-
 vendor/fc9/Vendor.make                    |    2 +-
 vendor/rhel4/Vendor.make                  |    2 +-
 vendor/sles10/Vendor.make                 |    2 +-
 vendor/sles9/Vendor.make                  |    2 +-
 8 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/vendor/common/o2cb.init.sh b/vendor/common/o2cb.init.sh
index e8d5e8d462e3..5e85906b000a 100755
--- a/vendor/common/o2cb.init.sh
+++ b/vendor/common/o2cb.init.sh
@@ -18,8 +18,18 @@
 # Force LC_ALL=C
 export LC_ALL=C
 
+if [ -f /etc/redhat-release ]
+then
+. /etc/init.d/functions
+
+start_daemon () {
+    daemon  $*
+}
+else
 # Let's try to use the LSB functions
 . /lib/lsb/init-functions
+fi
+
 if [ $? != 0 ]
 then
     echo "Unable to load LSB init functions" >&2
diff --git a/vendor/common/ocfs2-tools.spec-generic.in b/vendor/common/ocfs2-tools.spec-generic.in
index c22869b08120..a19e248bd5c2 100644
--- a/vendor/common/ocfs2-tools.spec-generic.in
+++ b/vendor/common/ocfs2-tools.spec-generic.in
@@ -35,7 +35,7 @@ Distribution: Oracle
 Vendor: Oracle
 Packager: nobody <nobody at oracle.com>
 Exclusiveos: Linux
-Requires: bash, which, coreutils, net-tools, e2fsprogs, @@CHKCONFIG_DEP@@, glib2 >= 2.2.3, util-linux >= 2.12j, redhat-lsb, @@INSTALL_DEP_PKG@@
+Requires: bash, which, coreutils, net-tools, e2fsprogs, @@CHKCONFIG_DEP@@, glib2 >= 2.2.3, util-linux >= 2.12j, @@INSTALL_DEP_PKG@@
 BuildRequires: e2fsprogs-devel, glib2-devel >= 2.2.3, @@PYGTK_NAME@@ >= 1.99.16, python-devel >= @@PYVERSION@@, util-linux >= 2.12j, @@BUILD_DEP_PKG@@
 
 BuildRoot: %{_tmppath}/ocfs2-tools-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
diff --git a/vendor/fc7/Vendor.make b/vendor/fc7/Vendor.make
index 7342f5d94a17..816760349041 100644
--- a/vendor/fc7/Vendor.make
+++ b/vendor/fc7/Vendor.make
@@ -5,7 +5,7 @@
 TOOLSARCH = $(shell $(TOPDIR)/vendor/fc7/rpmarch.guess tools $(TOPDIR))
 VENDOR_EXTENSION = fc7
 SYSTEMD_ENABLED = 0
-INSTALL_DEP_PKG = "modutils"
+INSTALL_DEP_PKG = "redhat-lsb\,\ modutils"
 
 include $(TOPDIR)/vendor/common/Vendor.make
 
diff --git a/vendor/fc8/Vendor.make b/vendor/fc8/Vendor.make
index 6ed98b6067c4..48b97b97f866 100644
--- a/vendor/fc8/Vendor.make
+++ b/vendor/fc8/Vendor.make
@@ -5,7 +5,7 @@
 TOOLSARCH = $(shell $(TOPDIR)/vendor/fc8/rpmarch.guess tools $(TOPDIR))
 VENDOR_EXTENSION = fc8
 SYSTEMD_ENABLED = 0
-INSTALL_DEP_PKG = "modutils"
+INSTALL_DEP_PKG = "redhat-lsb\,\ modutils"
 
 include $(TOPDIR)/vendor/common/Vendor.make
 
diff --git a/vendor/fc9/Vendor.make b/vendor/fc9/Vendor.make
index 67670960aca9..676b0a59b175 100644
--- a/vendor/fc9/Vendor.make
+++ b/vendor/fc9/Vendor.make
@@ -5,7 +5,7 @@
 TOOLSARCH = $(shell $(TOPDIR)/vendor/fc9/rpmarch.guess tools $(TOPDIR))
 VENDOR_EXTENSION = fc9
 SYSTEMD_ENABLED = 0
-INSTALL_DEP_PKG = "modutils"
+INSTALL_DEP_PKG = "redhat-lsb\,\ modutils"
 
 include $(TOPDIR)/vendor/common/Vendor.make
 
diff --git a/vendor/rhel4/Vendor.make b/vendor/rhel4/Vendor.make
index 4f3b30e88d1f..8babca172189 100644
--- a/vendor/rhel4/Vendor.make
+++ b/vendor/rhel4/Vendor.make
@@ -5,7 +5,7 @@
 TOOLSARCH = $(shell $(TOPDIR)/vendor/rhel4/rpmarch.guess tools $(TOPDIR))
 VENDOR_EXTENSION = el4
 SYSTEMD_ENABLED = 0
-INSTALL_DEP_PKG = "modutils"
+INSTALL_DEP_PKG = "redhat-lsb\,\ modutils"
 
 include $(TOPDIR)/vendor/common/Vendor.make
 
diff --git a/vendor/sles10/Vendor.make b/vendor/sles10/Vendor.make
index 17a50265a94f..57112ef3c535 100644
--- a/vendor/sles10/Vendor.make
+++ b/vendor/sles10/Vendor.make
@@ -5,7 +5,7 @@
 TOOLSARCH = $(shell $(TOPDIR)/vendor/sles10/rpmarch.guess tools $(TOPDIR))
 VENDOR_EXTENSION = SLE10
 SYSTEMD_ENABLED = 0
-INSTALL_DEP_PKG = "modutils"
+INSTALL_DEP_PKG = "redhat-lsb\,\ modutils"
 
 include $(TOPDIR)/vendor/common/Vendor.make
 
diff --git a/vendor/sles9/Vendor.make b/vendor/sles9/Vendor.make
index fbdb64b20068..6b0927c2b175 100644
--- a/vendor/sles9/Vendor.make
+++ b/vendor/sles9/Vendor.make
@@ -5,7 +5,7 @@
 TOOLSARCH = $(shell $(TOPDIR)/vendor/sles9/rpmarch.guess tools $(TOPDIR))
 VENDOR_EXTENSION = SLE9
 SYSTEMD_ENABLED = 0
-INSTALL_DEP_PKG = "modutils"
+INSTALL_DEP_PKG = "redhat-lsb\,\ modutils"
 
 include $(TOPDIR)/vendor/common/Vendor.make
 
-- 
1.7.9.5




More information about the Ocfs2-tools-devel mailing list