summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-networking/recipes-daemons/openhpi
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-openembedded/meta-networking/recipes-daemons/openhpi')
-rw-r--r--external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch35
-rw-r--r--external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch33
-rw-r--r--external/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb33
3 files changed, 61 insertions, 40 deletions
diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch b/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch
new file mode 100644
index 00000000..b2771c0c
--- /dev/null
+++ b/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-function-saHpiSensorThresholds.patch
@@ -0,0 +1,35 @@
+From e0b2be7a1fce0fed63bac8c350b711b69edfe30e Mon Sep 17 00:00:00 2001
+From: "yanjun.zhu" <yanjun.zhu@windriver.com>
+Date: Tue, 30 Apr 2019 10:04:58 +0800
+Subject: [PATCH] openhpid/safhpi.c: fix function saHpiSensorThresholdsSet
+
+In COPY_TH the SensorThresholds->TH will be copied to tmp.TH only if
+TH.IsSupported == SAHPI_TRUE. So we should pass &tmp but not
+SensorThresholds as the argument to OH_CALL_ABI. Otherwise the TH will
+be set even if TH.IsSupported == SAHPI_FALSE.
+
+Upstream-Status: Submitted
+[https://github.com/open-hpi/openhpi/pull/2744/commits/77a78bb1ada56e55c5ba6d7a5987c214705bf035]
+
+Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ openhpid/safhpi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/openhpid/safhpi.c b/openhpid/safhpi.c
+index 28a2632..61b7f03 100644
+--- a/openhpid/safhpi.c
++++ b/openhpid/safhpi.c
+@@ -1933,7 +1933,7 @@ SaErrorT SAHPI_API saHpiSensorThresholdsSet (
+ oh_release_domain(d); /* Unlock domain */
+
+ OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv,
+- ResourceId, SensorNum, SensorThresholds);
++ ResourceId, SensorNum, &tmp);
+ oh_release_handler(h);
+
+ return rv;
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch b/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch
deleted file mode 100644
index 60e2e791..00000000
--- a/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Fix for saftest failures.
-
-Upstream-Status: Pending
-
-Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
-
-Index: openhpi-3.6.1/openhpid/safhpi.c
-===================================================================
---- openhpi-3.6.1.orig/openhpid/safhpi.c
-+++ openhpi-3.6.1/openhpid/safhpi.c
-@@ -1933,7 +1933,7 @@ SaErrorT SAHPI_API saHpiSensorThresholds
- oh_release_domain(d); /* Unlock domain */
-
- OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv,
-- ResourceId, SensorNum, SensorThresholds);
-+ ResourceId, SensorNum, &tmp);
- oh_release_handler(h);
-
- return rv;
-Index: openhpi-3.6.1/utils/sahpi_struct_utils.c
-===================================================================
---- openhpi-3.6.1.orig/utils/sahpi_struct_utils.c
-+++ openhpi-3.6.1/utils/sahpi_struct_utils.c
-@@ -3861,6 +3861,9 @@ SaHpiBoolT oh_valid_textbuffer(SaHpiText
- /* found a unpaired surrogate */
- return SAHPI_FALSE;
- }
-+ } else {
-+ /*the first 2 bytes wrong*/
-+ return SAHPI_FALSE;
- }
- }
- break;
diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb b/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb
index c4b3309f..e8d19a2c 100644
--- a/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb
+++ b/external/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb
@@ -17,7 +17,7 @@ servers, Blade Center, and machines which export data via sysfs. \
HOMEPAGE = "http://openhpi.sourceforge.net/Home"
SECTION = "net"
-LICENSE = "BSD"
+LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4"
DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs \
@@ -33,7 +33,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
file://openhpi-glib-cross-compile.patch \
file://openhpi-linkfix.patch \
file://openhpi-fix-host-gcc.patch \
- file://openhpi-fix-testfail-errors.patch \
+ file://openhpi-fix-function-saHpiSensorThresholds.patch \
file://openhpi-add-libnetsnmp-when-link.patch \
file://openhpi-invalide-session.patch \
file://openhpi-use-serial-tests-config-needed-by-ptest.patch \
@@ -60,19 +60,20 @@ FILES_${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so"
INSANE_SKIP_${PN}-libs = "dev-so"
RDEPENDS_${PN} += "${PN}-libs"
-PACKAGECONFIG ??= "libgcrypt non32bit"
+PACKAGECONFIG ??= "libgcrypt non32bit snmp-bc"
PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils,"
PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt,"
PACKAGECONFIG[non32bit] = "--enable-non32bit-int,--disable-non32bit-int,,"
+PACKAGECONFIG[snmp-bc] = "--enable-snmp_bc,--disable-snmp_bc"
export DISTRO
do_install_append () {
install -m 0755 -d ${D}${sysconfdir}/${BPN}
- install -m 0755 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf
- install -m 0700 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf
- install -m 0755 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data
- install -m 0755 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data
+ install -m 0644 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf
+ install -m 0600 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf
+ install -m 0644 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data
+ install -m 0644 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data
install -m 0755 ${WORKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid
install -d ${D}${systemd_unitdir}/system
@@ -84,6 +85,21 @@ do_install_append () {
do_compile_ptest () {
for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do
dir=`dirname ${x}`
+ case $dir in
+ *cpp/t) ;;
+ *snmp_bc/t) if ${@bb.utils.contains('PACKAGECONFIG','snmp-bc','true','false',d)}
+ then
+ oe_runmake -C ${dir} buildtest-TESTS
+ fi
+ ;;
+ *) oe_runmake -C ${dir} buildtest-TESTS ;;
+ esac
+ done
+}
+
+ack_do_compile_ptest () {
+ for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do
+ dir=`dirname ${x}`
upper=`dirname ${dir}`
if [ `basename ${upper}` != "cpp" ]; then
oe_runmake -C ${dir} buildtest-TESTS
@@ -104,6 +120,9 @@ do_install_ptest () {
sed -i "s/^Makefile:/MM:/g" ${x};
done;
+ install -m 644 ${S}/openhpid/t/ohpi/openhpi.conf ${D}${PTEST_PATH}/openhpid/t/ohpi/
+ sed -i "s:OPENHPI_CONF=[^ ]*:OPENHPI_CONF=./openhpi.conf:g" ${D}${PTEST_PATH}/openhpid/t/ohpi/Makefile
+
mkdir -p ${D}${PTEST_PATH}/plugins/watchdog/
cp -L ${D}/${libdir}/${BPN}/libwatchdog.so ${D}${PTEST_PATH}/plugins/watchdog/
cp -L ${D}/${libdir}/${BPN}/libsimulator.so ${D}${PTEST_PATH}/plugins/watchdog/