ocfs2-tools: several fixes
cover ocfs2-tools: several fixes
From: Jackie Huang <[email protected]>
---
The following changes since commit 0d22147d06626923f5e7b1dd5f02cb21ea7a3bcb:
pacemaker: update to 1.1.16 (2017-06-20 10:28:35 +0200)
are available in the git repository at:
https://github.com/jackiehjm/meta-cgl.git jhuang0/up_ocfs2-tools_170728_0
https://github.com//tree/jhuang0/up_ocfs2-tools_170728_0
Jackie Huang (3):
ocfs2-tools: fix dependencies
ocfs2-tools: fix the installation and systemd services
ocfs2-tools: disable stack user support explicitly in init script
.../ocfs2-tools/ocfs2-tools/cluster.conf.sample | 10 ---- .../disable-ocfs2-stack-user-support.patch | 42 ++++++++++++++++ .../ocfs2-tools/ocfs2-tools/o2cb.service | 4 +- .../ocfs2-tools/ocfs2-tools/ocfs2.service | 4 +- .../recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb | 56 +++++++++++++--------- 5 files changed, 80 insertions(+), 36 deletions(-) delete mode 100644 meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/cluster.conf.sample create mode 100644 meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/disable-ocfs2-stack-user-support.patch
Signature · 1 line
2.11.0
PATCH 1/3 ocfs2-tools: fix dependencies
From: Jackie Huang <[email protected]>
* Remove the duplicated RDEPENDS_${PN}
* Add dependency on e2fsprogs-native to fix:
| compile_et o2dlm_err.et
| /bin/bash: compile_et: command not found
--- meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb +6 -3
@@ -23,8 +23,11 @@ S = "${WORKDIR}/git" inherit autotools-brokensep pkgconfig systemd -DEPENDS = "corosync openais cluster-glue pacemaker libxml2 linux-libc-headers e2fsprogs libaio" -RDEPENDS_${PN} = "bash coreutils net-tools module-init-tools e2fsprogs chkconfig glib-2.0" +DEPENDS = "corosync cluster-glue openais pacemaker \ + libxml2 linux-libc-headers libaio \ + e2fsprogs e2fsprogs-native \ +" + ASNEEDED_pn-${PN} = "" PARALLEL_MAKE = "" INSANE_SKIP_${PN} = "unsafe-references-in-binaries"
@@ -88,4 +91,4 @@ do_install() { fi } -RDEPENDS_${PN} = "bash" +RDEPENDS_${PN} = "bash coreutils net-tools module-init-tools e2fsprogs chkconfig glib-2.0"
Signature · 1 line
2.11.0
PATCH 2/3 ocfs2-tools: fix the installation and systemd services
In reply to [email protected]From: Jackie Huang <[email protected]>
* use _append for do_install so that autotools_do_install will be run first.
* add -m for the install commands.
* add ${S} for install source files instead of relative path.
* remove cluster.conf.sample and use the sample conf file in source code instead.
* Disable systemd services by default since it won't work before the conf file is changed according to the actual network settings.
* Fix the services to use the correct helper scripts
--- .../ocfs2-tools/ocfs2-tools/cluster.conf.sample | 10 ----- .../ocfs2-tools/ocfs2-tools/o2cb.service | 4 +- .../ocfs2-tools/ocfs2-tools/ocfs2.service | 4 +- .../recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb | 46 +++++++++++++--------- 4 files changed, 31 insertions(+), 33 deletions(-) delete mode 100644 meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/cluster.conf.sample
meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/cluster.conf.sample deleted +0 -10
@@ -1,10 +0,0 @@ -node: - ip_port = 7777 - ip_address = 192.168.246.100 - number = 0 - name = localhost.localdomain - cluster = ocfs2 - -cluster: - node_count = 1 - name = ocfs2
meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/o2cb.service +2 -2
@@ -5,8 +5,8 @@ After=network.target [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/usr/lib/ocfs2-tools/o2cb-helper start -ExecStop=/usr/lib/ocfs2-tools/o2cb-helper stop +ExecStart=@LIBDIR@/o2cb-helper start +ExecStop=@LIBDIR@/o2cb-helper stop [Install] WantedBy=multi-user.target
meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/ocfs2.service +2 -2
@@ -6,8 +6,8 @@ After=network.target o2cb.service [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/bin/mount -at ocfs2 -ExecStop=/bin/umount -a -t ocfs2 +ExecStart=@LIBDIR@/ocfs2-helper start +ExecStop=@LIBDIR@/ocfs2-helper stop [Install] WantedBy=multi-user.target
meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb +27 -19
66 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 3/3 ocfs2-tools: disable stack user support explicitly in init script
In reply to [email protected]From: Jackie Huang <[email protected]>
Disable stack user support explicitly and only support stack 'o2cb' in init script o2cb.
--- .../disable-ocfs2-stack-user-support.patch | 42 ++++++++++++++++++++++ .../recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb | 1 + 2 files changed, 43 insertions(+) create mode 100644 meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/disable-ocfs2-stack-user-support.patch
meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/disable-ocfs2-stack-user-support.patch new file +42 -0
@@ -0,0 +1,42 @@ +Only support stack 'o2cb' in init script o2cb. + +Source file /etc/init.d/functions rather than /lib/lsb/init-functions which +doesn't exist in wrlinux. /etc/init.d/functions provides functions killproc +and pidofproc, and doesn't provides function start_daemon. It doesn't matter +that start_daemon is used by stack 'user' only. + +Upstream-Status: Pending + +Signed-off-by: Kai Kang <[email protected]> +--- +diff --git a/vendor/common/o2cb.init.sh b/vendor/common/o2cb.init.sh +index 2e73108..926e61e 100755 +--- a/vendor/common/o2cb.init.sh ++++ b/vendor/common/o2cb.init.sh +@@ -18,11 +18,11 @@ + # Force LC_ALL=C + export LC_ALL=C + +-# Let's try to use the LSB functions +-. /lib/lsb/init-functions ++# Let's try to use the init scripts functions ++. /etc/init.d/functions + if [ $? != 0 ] + then +- echo "Unable to load LSB init functions" >&2 ++ echo "Unable to load init scripts functions" >&2 + exit 1 + fi + +@@ -72,6 +72,11 @@ VERSION=@@VERSION@@ + # Need this default + [ -z "$O2CB_STACK" ] && O2CB_STACK=o2cb + ++if [ "$O2CB_STACK" != "o2cb" ]; then ++ echo "Invalid cluster stack name \"$O2CB_STACK\"" ++ exit 1 ++fi ++ + configfs_path() + { + # Note that this is only valid *after* configfs is loaded
meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb +1 -0
@@ -14,6 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" SRC_URI = "git://oss.oracle.com/git/ocfs2-tools.git \ file://0003-vendor-common-o2cb.ocf-add-new-conf-file.patch \ + file://disable-ocfs2-stack-user-support.patch \ file://o2cb.service \ file://ocfs2.service \ "
Signature · 1 line
2.11.0