* [meta-cgl][PATCH 0/3] ocfs2-tools: several fixes
@ 2017-07-28 2:32 jackie.huang
2017-07-28 2:32 ` [meta-cgl][PATCH 1/3] ocfs2-tools: fix dependencies jackie.huang
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: jackie.huang @ 2017-07-28 2:32 UTC (permalink / raw)
To: yocto
From: Jackie Huang <jackie.huang@windriver.com>
---
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
--
2.11.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [meta-cgl][PATCH 1/3] ocfs2-tools: fix dependencies
2017-07-28 2:32 [meta-cgl][PATCH 0/3] ocfs2-tools: several fixes jackie.huang
@ 2017-07-28 2:32 ` jackie.huang
2017-07-28 2:32 ` [meta-cgl][PATCH 2/3] ocfs2-tools: fix the installation and systemd services jackie.huang
2017-07-28 2:32 ` [meta-cgl][PATCH 3/3] ocfs2-tools: disable stack user support explicitly in init script jackie.huang
2 siblings, 0 replies; 4+ messages in thread
From: jackie.huang @ 2017-07-28 2:32 UTC (permalink / raw)
To: yocto
From: Jackie Huang <jackie.huang@windriver.com>
* Remove the duplicated RDEPENDS_${PN}
* Add dependency on e2fsprogs-native to fix:
| compile_et o2dlm_err.et
| /bin/bash: compile_et: command not found
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb
index d6a24e5..3074525 100644
--- a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb
+++ b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb
@@ -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"
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [meta-cgl][PATCH 2/3] ocfs2-tools: fix the installation and systemd services
2017-07-28 2:32 [meta-cgl][PATCH 0/3] ocfs2-tools: several fixes jackie.huang
2017-07-28 2:32 ` [meta-cgl][PATCH 1/3] ocfs2-tools: fix dependencies jackie.huang
@ 2017-07-28 2:32 ` jackie.huang
2017-07-28 2:32 ` [meta-cgl][PATCH 3/3] ocfs2-tools: disable stack user support explicitly in init script jackie.huang
2 siblings, 0 replies; 4+ messages in thread
From: jackie.huang @ 2017-07-28 2:32 UTC (permalink / raw)
To: yocto
From: Jackie Huang <jackie.huang@windriver.com>
* 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
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../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
diff --git a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/cluster.conf.sample b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/cluster.conf.sample
deleted file mode 100644
index d7252b5..0000000
--- a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/cluster.conf.sample
+++ /dev/null
@@ -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
diff --git a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/o2cb.service b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/o2cb.service
index 520b530..c49b547 100644
--- a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/o2cb.service
+++ b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/o2cb.service
@@ -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
diff --git a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/ocfs2.service b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/ocfs2.service
index afcbbb9..d64da6c 100644
--- a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/ocfs2.service
+++ b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/ocfs2.service
@@ -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
diff --git a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb
index 3074525..be9a505 100644
--- a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb
+++ b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb
@@ -14,7 +14,6 @@ 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://cluster.conf.sample \
file://o2cb.service \
file://ocfs2.service \
"
@@ -62,32 +61,41 @@ do_compile_prepend() {
}
SYSTEMD_SERVICE_${PN} = "o2cb.service ocfs2.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${S}/vendor/common/o2cb.init ${D}${sysconfdir}/init.d/o2cb
+ install -m 0755 ${S}/vendor/common/ocfs2.init ${D}${sysconfdir}/init.d/ocfs2
+
+ install -d ${D}${sysconfdir}/sysconfig
+ install -m 0644 ${S}/vendor/common/o2cb.sysconfig ${D}${sysconfdir}/sysconfig/o2cb
+
+ install -d ${D}${sysconfdir}/udev/rules.d
+ install -m 0644 ${S}/vendor/common/51-ocfs2.rules ${D}${sysconfdir}/udev/rules.d/51-ocfs2.rules
-do_install() {
- install -d ${D}/etc/init.d
- install vendor/common/o2cb.init ${D}/etc/init.d/o2cb
- install vendor/common/ocfs2.init ${D}/etc/init.d/ocfs2
- install -d ${D}/etc/sysconfig
- install vendor/common/o2cb.sysconfig ${D}/etc/sysconfig/o2cb
- install -d ${D}/etc/udev/rules.d
- install vendor/common/51-ocfs2.rules ${D}/etc/udev/rules.d/51-ocfs2.rules
install -d ${D}/${libdir}/ocf/resource.d/ocfs2
- install -m 0755 vendor/common/o2cb.ocf ${D}/${libdir}/ocf/resource.d/ocfs2/o2cb
- oe_runmake DESTDIR="${D}" install
+ install -m 0755 ${S}/vendor/common/o2cb.ocf ${D}/${libdir}/ocf/resource.d/ocfs2/o2cb
chmod 644 ${D}/${libdir}/*.a
- install -dm 0755 ${D}/etc/ocfs2
- install -m 0644 ${WORKDIR}/cluster.conf.sample ${D}/etc/ocfs2/cluster.conf.sample
+
+ install -dm 0755 ${D}${sysconfdir}/ocfs2
+ install -m 0644 ${S}/documentation/samples/cluster.conf ${D}${sysconfdir}/ocfs2/cluster.conf.sample
+
rm -rf ${D}/${libdir}/ocf
rm -rf ${D}/sbin/ocfs2_controld.pcmk
rm -rf ${D}/sbin/ocfs2_controld.cman
- # fix up hardcoded paths
- sed -i -e 's,/usr/lib/,${libdir}/,' ${WORKDIR}/o2cb.service
+
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}/${systemd_unitdir}/system
- install -m 644 ${WORKDIR}/o2cb.service ${D}/${systemd_unitdir}/system
- install -m 644 ${WORKDIR}/ocfs2.service ${D}/${systemd_unitdir}/system
+ install -d ${D}/${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/o2cb.service ${D}/${systemd_system_unitdir}
+ sed -i -e 's,@LIBDIR@,${libexecdir},' ${D}${systemd_system_unitdir}/o2cb.service
+
+ install -m 0644 ${WORKDIR}/ocfs2.service ${D}/${systemd_system_unitdir}
+ sed -i -e 's,@LIBDIR@,${libexecdir},' ${D}${systemd_system_unitdir}/ocfs2.service
+
install -d ${D}/${libexecdir}
- install -m 755 vendor/common/o2cb.init ${D}/${libexecdir}/o2cb-helper
+ install -m 0755 ${S}/vendor/common/o2cb.init ${D}/${libexecdir}/o2cb-helper
+ install -m 0755 ${S}/vendor/common/ocfs2.init ${D}${libexecdir}/ocfs2-helper
fi
}
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [meta-cgl][PATCH 3/3] ocfs2-tools: disable stack user support explicitly in init script
2017-07-28 2:32 [meta-cgl][PATCH 0/3] ocfs2-tools: several fixes jackie.huang
2017-07-28 2:32 ` [meta-cgl][PATCH 1/3] ocfs2-tools: fix dependencies jackie.huang
2017-07-28 2:32 ` [meta-cgl][PATCH 2/3] ocfs2-tools: fix the installation and systemd services jackie.huang
@ 2017-07-28 2:32 ` jackie.huang
2 siblings, 0 replies; 4+ messages in thread
From: jackie.huang @ 2017-07-28 2:32 UTC (permalink / raw)
To: yocto
From: Jackie Huang <jackie.huang@windriver.com>
Disable stack user support explicitly and only support
stack 'o2cb' in init script o2cb.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../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
diff --git a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/disable-ocfs2-stack-user-support.patch b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/disable-ocfs2-stack-user-support.patch
new file mode 100644
index 0000000..8d92f0c
--- /dev/null
+++ b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools/disable-ocfs2-stack-user-support.patch
@@ -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 <kai.kang@windriver.com>
+---
+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
diff --git a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb
index be9a505..6e5b1fd 100644
--- a/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb
+++ b/meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.8.4.bb
@@ -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 \
"
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-07-28 2:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-28 2:32 [meta-cgl][PATCH 0/3] ocfs2-tools: several fixes jackie.huang
2017-07-28 2:32 ` [meta-cgl][PATCH 1/3] ocfs2-tools: fix dependencies jackie.huang
2017-07-28 2:32 ` [meta-cgl][PATCH 2/3] ocfs2-tools: fix the installation and systemd services jackie.huang
2017-07-28 2:32 ` [meta-cgl][PATCH 3/3] ocfs2-tools: disable stack user support explicitly in init script jackie.huang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.