opensaf: install opensafd.service
PATCH 1/3 opensaf: install opensafd.service
From: Robert Yang <[email protected]>
Fixed when systemd:
ERROR: Function failed: SYSTEMD_SERVICE_opensaf value opensafd.service does not exist
--- meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb | 3 +++ 1 file changed, 3 insertions(+)
meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb +3 -0
@@ -39,4 +39,7 @@ do_install_append() { rm -fr "${D}${localstatedir}/lock" rm -fr "${D}${localstatedir}/run" rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${B}/osaf/services/infrastructure/nid/config/opensafd.service \ + ${D}${systemd_unitdir}/system }
Signature · 1 line
2.1.0
PATCH 2/3 opensaf: RDEPENDS on python and bash
From: Robert Yang <[email protected]>
python:opensaf/usr/share/opensaf/samples/immsv/immom_python/immom.py
bash:opensaf/usr/share/opensaf/immxml/verify.sh opensaf/usr/share/opensaf/immxml/immxml-modify-config opensaf/usr/share/opensaf/immxml/immxml-configure opensaf/usr/share/opensaf/immxml/immxml-clustersize opensaf/usr/share/opensaf/immxml/immxml-nodegen opensaf/usr/share/opensaf/samples/INSTALL opensaf/usr/share/opensaf/samples/smfsv/campaigns/smf-verify opensaf/usr/lib/opensaf/configure_tipc
--- meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb +2 -0
@@ -33,6 +33,8 @@ SYSTEMD_AUTO_ENABLE = "disable" FILES_${PN} += "${localstatedir}/run" +RDEPENDS_${PN} += "bash python" + INSANE_SKIP_${PN} = "dev-so" do_install_append() {
Signature · 1 line
2.1.0
PATCH 3/3 opensaf: create the node_name configuration file after install pkg
In reply to [email protected]From: Roy Li <[email protected]>
not create the node_name file when building by calling "hostname -s", and create it after install pkg, since it works on cross-compile environment
--- .../opensaf/0001-not-install-node_name.patch | 30 ++++++++++++++++++++++ .../recipes-daemons/opensaf/opensaf_4.5.0.bb | 13 +++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf/0001-not-install-node_name.patch
meta-networking/recipes-daemons/opensaf/opensaf/0001-not-install-node_name.patch new file +30 -0
@@ -0,0 +1,30 @@ +[PATCH] not install node_name + +Upstream-Status: Inappropriate [cross compiling specific] + +when cross-compile, the compile host name is written into node_name file, +but target host name should be written, so not install node_name, and create +it when pkg-install + +Signed-off-by: Roy Li <[email protected]> +--- + osaf/services/saf/clmsv/config/Makefile.am | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/osaf/services/saf/clmsv/config/Makefile.am b/osaf/services/saf/clmsv/config/Makefile.am +index 15b8702..88c8d24 100644 +--- a/osaf/services/saf/clmsv/config/Makefile.am ++++ b/osaf/services/saf/clmsv/config/Makefile.am +@@ -39,9 +39,3 @@ dist_pkgimmxml_svc_DATA += \ + endif + + endif +- +-install-data-hook: +- hostname -s > $(DESTDIR)$(pkgsysconfdir)/node_name +- +-uninstall-hook: +- rm -f $(DESTDIR)$(pkgsysconfdir)/node_name +-- +1.9.1 +
meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb +12 -1
@@ -14,7 +14,9 @@ HOMEPAGE = "http://www.opensaf.org" inherit autotools useradd systemd pkgconfig SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ - file://install-samples-from-srcdir.patch" + file://install-samples-from-srcdir.patch \ + file://0001-not-install-node_name.patch \ +" SRC_URI[md5sum] = "534c0a99438a62c4c8dda56cfa67300c" SRC_URI[sha256sum] = "2f5ba57fe67e94099c0df82d0a0dd207b5c583c93030035ba354c97b5471b590"
@@ -45,3 +47,12 @@ do_install_append() { install -m 0644 ${B}/osaf/services/infrastructure/nid/config/opensafd.service \ ${D}${systemd_unitdir}/system } + +pkg_postinst_${PN} () { + if [ "x$D" != "x" ]; then + exit 1 + fi + + hostname -s > /etc/opensaf/node_name +} +
Signature · 1 line
2.1.0
Re: [PATCH 3/3][meta-networking] opensaf: create the node_name configuration file after install pkg
Hi Roy,
Quoted 67 lines · [[oe] [PATCH 3/3][meta-networking] opensaf: create the node_name configuration…
From: Roy Li <[email protected]>
not create the
node_namefile when building by calling "hostname -s", and create it after install pkg, since it works on cross-compile environmentSigned-off-by Roy Li <[email protected]>--- .../opensaf/0001-not-install-node_name.patch | 30 ++++++++++++++++++++++ .../recipes-daemons/opensaf/opensaf_4.5.0.bb | 13 +++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf/0001-not-install-node_name.patchmeta-networking/recipes-daemons/opensaf/opensaf/0001-not-install-node_name.patch new file +30
-0@@ -0,0 +1,30 @@ +[PATCH] not install node_name + +Upstream-Status: Inappropriate [cross compiling specific] + +when cross-compile, the compile host name is written into node_name file, +but target host name should be written, so not install node_name, and create +it when pkg-install + +Signed-off-by: Roy Li <[email protected]> +--- + osaf/services/saf/clmsv/config/Makefile.am | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/osaf/services/saf/clmsv/config/Makefile.am b/osaf/services/saf/clmsv/config/Makefile.am +index 15b8702..88c8d24 100644 +--- a/osaf/services/saf/clmsv/config/Makefile.am ++++ b/osaf/services/saf/clmsv/config/Makefile.am +@@ -39,9 +39,3 @@ dist_pkgimmxml_svc_DATA += \ + endif + + endif +- +-install-data-hook: +- hostname -s > $(DESTDIR)$(pkgsysconfdir)/node_name +- +-uninstall-hook: +- rm -f $(DESTDIR)$(pkgsysconfdir)/node_name +-- +1.9.1 +meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb +3
-1@@ -14,7 +14,9 @@ HOMEPAGE = "http://www.opensaf.org" inherit autotools useradd systemd pkgconfig SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ - file://install-samples-from-srcdir.patch" + file://install-samples-from-srcdir.patch \ + file://0001-not-install-node_name.patch \ +" SRC_URI[md5sum] = "534c0a99438a62c4c8dda56cfa67300c" SRC_URI[sha256sum] = "2f5ba57fe67e94099c0df82d0a0dd207b5c583c93030035ba354c97b5471b590"@@ -45,3 +47,12 @@ do_install_append() { install -m 0644 ${B}/osaf/services/infrastructure/nid/config/opensafd.service \ ${D}${systemd_unitdir}/system
meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb do_install_append() { · line 58
Quoted 10 lines
meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb +9
-0} + +pkg_postinst_${PN} () { + if [ "x$D" != "x" ]; then + exit 1 + fi + + hostname -s > /etc/opensaf/node_name +} +
Can you convert this to 'if [ -n "$D" ]; then ... fi' logic and check for the existence of node_name before over-writing it, since this could also run on a package upgrade?
For that matter, if you need a node_name and it's always going to be hostname, couldn't you just dump ${hostname} into ${D}${sysconfdir}/node_name in the do_install_append() that's already there and then there's no need for a postinst step?
Signature · 2 lines
-Joe MacDonald. :wq