added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
From 2bc5c6367a7f70ca5bff177ec95bcad3b1c2b66b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 6 Sep 2018 18:15:10 -0700
Subject: [PATCH] Do not poke at build host's /etc/os-release
During cross compile we are interested in target distro and not host
distro therefore do not check for it.
Upstream-Status: Inappropriate [Cross compile specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: openhpi-3.8.0/configure.ac
===================================================================
--- openhpi-3.8.0.orig/configure.ac
+++ openhpi-3.8.0/configure.ac
@@ -194,7 +194,6 @@ AC_SUBST(JSON_C_LIB)
AC_SUBST(JSON_C_INCLUDE)
AC_CHECK_LIB([rabbitmq],[amqp_new_connection],[RABBITMQ_LIB=-lrabbitmq],[RABBITMQ_LIB=])
AC_SUBST(RABBITMQ_LIB)
-AC_CHECK_FILE([/etc/os-release],[DISTRO=`grep "^ID=" /etc/os-release | awk -F"\"" '{ print $2 }'`])
AC_CHECK_HEADERS([amqp.h],[have_rabbitmq=yes],[have_rabbitmq=no])

View File

@@ -0,0 +1,41 @@
From 8f47adc3b9085d589e62cb5eb560dd23a703036a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 8 Sep 2018 12:47:49 -0700
Subject: [PATCH] include iostream for cout
End cout with endl
Fixes
plugins/dynamic_simulator/thread.cpp:241:3: error: 'cout' was not declared in this scope
cout<<"PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is Defined"
^~~~
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
plugins/dynamic_simulator/thread.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/dynamic_simulator/thread.cpp b/plugins/dynamic_simulator/thread.cpp
index b971502..61eaf42 100644
--- a/plugins/dynamic_simulator/thread.cpp
+++ b/plugins/dynamic_simulator/thread.cpp
@@ -26,7 +26,7 @@
*/
#include "thread.h"
-#include <stdio.h>
+#include <iostream>
#include <sys/time.h>
#include <errno.h>
@@ -238,7 +238,7 @@ cThreadLock::cThreadLock()
pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE );
pthread_mutex_init( &m_lock, &attr );
pthread_mutexattr_destroy( &attr );
- cout<<"PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is Defined"
+ std::cout<<"PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is Defined"<<std::endl;
}
#else
static pthread_mutex_t lock_tmpl = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;

View File

@@ -0,0 +1,37 @@
From b8bc6bfdb5e7fb5b46d3a830e04632939bee6b98 Mon Sep 17 00:00:00 2001
From: Catalin Enache <catalin.enache@windriver.com>
Date: Fri, 9 Feb 2018 16:35:11 +0200
Subject: [PATCH] saHpiSessionClose: close socket
saHpiSessionClose leaks file descriptors
Upstream issue: https://github.com/open-hpi/openhpi/issues/1918
Upstream-Status: Pending
Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
baselib/session.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/baselib/session.cpp b/baselib/session.cpp
index c5edfc8..4ece1b7 100644
--- a/baselib/session.cpp
+++ b/baselib/session.cpp
@@ -126,6 +126,12 @@ cSession::cSession()
cSession::~cSession()
{
+ cClientStreamSock * sock;
+ gpointer ptr = wrap_g_static_private_get( &m_sockets );
+ if ( ptr ) {
+ sock = reinterpret_cast<cClientStreamSock *>(ptr);
+ sock->Close();
+ }
wrap_g_static_private_free( &m_sockets );
}
--
2.10.2

View File

@@ -0,0 +1,22 @@
From ed51168dfd6844deeaebf7d5f6c65898aafb6299 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 27 Aug 2017 12:12:04 -0700
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 1 +
1 file changed, 1 insertion(+)
diff --git a/configure.ac b/configure.ac
index c29a31f..f7fe0f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,7 @@ AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_AWK
AC_PROG_GREP
+AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
enabled_non32bit="no"
AC_ARG_ENABLE([non32bit-int],

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,98 @@
From: Helmut Grohne <helmut@subdivi.de>
Subject: fix cross compilation
The OH_SET_SIZES macro relies on the usual autoconf sizeof cache variables
during cross compilation, but it never ensure that they are initialized.
pkg-config must be called with $ac_tool_prefix and PKG_PROG_PKG_CONFIG takes
care of that. Setting PKG_CONFIG_PATH breaks the pkg-config-cross-wrapper.
Don't do that.
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: openhpi-3.8.0/acinclude.m4
===================================================================
--- openhpi-3.8.0.orig/acinclude.m4
+++ openhpi-3.8.0/acinclude.m4
@@ -22,30 +22,39 @@ AC_DEFUN([OH_SET_SIZES],
if test "x$cross_compiling" != "xno"; then
if test "x$OH_SIZEOF_UCHAR" = x; then
+ AC_CHECK_SIZEOF([unsigned char])
OH_SIZEOF_UCHAR=$ac_cv_sizeof_uchar
fi
if test "x$OH_SIZEOF_USHORT" = x; then
+ AC_CHECK_SIZEOF([unsigned short])
OH_SIZEOF_USHORT=$ac_cv_sizeof_ushort
fi
if test "x$OH_SIZEOF_UINT" = x; then
+ AC_CHECK_SIZEOF([unsigned int])
OH_SIZEOF_UINT=$ac_cv_sizeof_uint
fi
if test "x$OH_SIZEOF_CHAR" = x; then
+ AC_CHECK_SIZEOF([char])
OH_SIZEOF_CHAR=$ac_cv_sizeof_char
fi
if test "x$OH_SIZEOF_SHORT" = x; then
+ AC_CHECK_SIZEOF([short])
OH_SIZEOF_SHORT=$ac_cv_sizeof_short
fi
if test "x$OH_SIZEOF_INT" = x; then
+ AC_CHECK_SIZEOF([int])
OH_SIZEOF_INT=$ac_cv_sizeof_int
fi
if test "x$OH_SIZEOF_LLONG" = x; then
+ AC_CHECK_SIZEOF([long long])
OH_SIZEOF_LLONG=$ac_cv_sizeof_longlong
fi
if test "x$OH_SIZEOF_FLOAT" = x; then
+ AC_CHECK_SIZEOF([float])
OH_SIZEOF_FLOAT=$ac_cv_sizeof_float
fi
if test "x$OH_SIZEOF_DOUBLE" = x; then
+ AC_CHECK_SIZEOF([double])
OH_SIZEOF_DOUBLE=$ac_cv_sizeof_double
fi
else
Index: openhpi-3.8.0/configure.ac
===================================================================
--- openhpi-3.8.0.orig/configure.ac
+++ openhpi-3.8.0/configure.ac
@@ -87,9 +87,9 @@ have_rtas_lib=no
dnl Check for GLIB
-AC_CHECK_PROG([found_pkg_config],[pkg-config],[yes])
+PKG_PROG_PKG_CONFIG
-if test "x$found_pkg_config" != "xyes"; then
+if test "x$PKG_CONFIG" = "x"; then
OH_CHECK_FAIL(pkg-config,pkg-config)
fi
PKG_CFG_SETPATH
@@ -105,7 +105,7 @@ GLIB=glib-2.0
GTHREAD=gthread-2.0
GMODULE=gmodule-2.0
-if pkg-config --atleast-version $GLIB_REQUIRED_VERSION $GLIB; then
+if $PKG_CONFIG --atleast-version $GLIB_REQUIRED_VERSION $GLIB; then
:
else
AC_MSG_ERROR([
@@ -268,12 +268,12 @@ dnl
dnl We really need to make ipmi enablement be contigent on OpenIPMI
dnl
-if PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig pkg-config --atleast-version 1.4.20 OpenIPMI; then
+if $PKG_CONFIG --atleast-version 1.4.20 OpenIPMI; then
have_openipmi=yes
AC_CHECK_LIB([OpenIPMI], [ipmi_smi_setup_con], [have_openipmi=yes])
- OPENIPMI_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig pkg-config --cflags OpenIPMI`
+ OPENIPMI_CFLAGS=`$PKG_CONFIG --cflags OpenIPMI`
AC_SUBST(OPENIPMI_CFLAGS)
- OPENIPMI_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig pkg-config --libs OpenIPMI`
+ OPENIPMI_LIBS=`$PKG_CONFIG --libs OpenIPMI`
AC_SUBST(OPENIPMI_LIBS)
fi

View File

@@ -0,0 +1,20 @@
Fix
sensor_factors_000.cpp:66:5: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned char' in initializer list [-Wc++11-narrowing]
((dRExp << 4) & 0xf0) | (dBExp & 0x0f ), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp
===================================================================
--- openhpi-3.6.1.orig/plugins/ipmidirect/t/sensor_factors_000.cpp
+++ openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp
@@ -63,7 +63,7 @@ static cIpmiSdr sdr =
dB & 0xff,
((dB >> 2) & 0xc0) | (dAccuracy & 0x3f),
((dAccuracy >> 2) & 0xf0) | ((dAccuracyExp << 2) & 0x0c),
- ((dRExp << 4) & 0xf0) | (dBExp & 0x0f ),
+ (unsigned char)(((dRExp << 4) & 0xf0) | (dBExp & 0x0f )),
0,
0,
}

View File

@@ -0,0 +1,37 @@
Description: Fix FTBFS with OpenSSL 1.1 by honouring OPENSSL_NO_MD2
Author: Adrian Bunk <bunk@debian.org>
Bug-Debian: https://bugs.debian.org/859543
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: openhpi-3.8.0/plugins/ipmidirect/ipmi_auth.cpp
===================================================================
--- openhpi-3.8.0.orig/plugins/ipmidirect/ipmi_auth.cpp
+++ openhpi-3.8.0/plugins/ipmidirect/ipmi_auth.cpp
@@ -21,6 +21,7 @@
#include "ipmi_auth.h"
#include <string.h>
#include <errno.h>
+#include <openssl/opensslconf.h>
cIpmiAuth *
@@ -32,7 +33,7 @@ IpmiAuthFactory( tIpmiAuthType type )
return new cIpmiAuthNone;
case eIpmiAuthTypeMd2:
-#ifdef HAVE_OPENSSL_MD2_H
+#if defined(HAVE_OPENSSL_MD2_H) && !defined(OPENSSL_NO_MD2)
return new cIpmiAuthMd2;
#else
break;
@@ -78,7 +79,7 @@ cIpmiAuthNone::Check( cIpmiAuthSg /*d*/[
}
-#ifdef HAVE_OPENSSL_MD2_H
+#if defined(HAVE_OPENSSL_MD2_H) && !defined(OPENSSL_NO_MD2)
#include <openssl/md2.h>

View File

@@ -0,0 +1,20 @@
Link with libssl
fixed build with openssl-1.1.x
Taken from Fedora
https://src.fedoraproject.org/rpms/openhpi/c/be77f5484b0206f8946a85b29424ea10bf863063
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending [Unknown]
diff -up openhpi-3.6.1/ssl/Makefile.am.than openhpi-3.6.1/ssl/Makefile.am
--- openhpi-3.6.1/ssl/Makefile.am.than 2017-02-21 12:21:12.114814698 -0500
+++ openhpi-3.6.1/ssl/Makefile.am 2017-02-21 12:22:44.576454262 -0500
@@ -19,5 +19,5 @@ lib_LTLIBRARIES = libopenhpi_ssl.la
libopenhpi_ssl_la_SOURCES = oh_ssl.c oh_ssl.h
libopenhpi_ssl_la_LDFLAGS = -version-info @HPI_LIB_VERSION@
-libopenhpi_ssl_la_LIBADD = @CRYPTO_LIB@
+libopenhpi_ssl_la_LIBADD = -lssl @CRYPTO_LIB@

View File

@@ -0,0 +1,25 @@
[PATCH] add libnetsnmp when link
Upstream-Status: Pending
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
plugins/snmp_bc/t/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/snmp_bc/t/Makefile.am b/plugins/snmp_bc/t/Makefile.am
index 57e77ac..9894620 100644
--- a/plugins/snmp_bc/t/Makefile.am
+++ b/plugins/snmp_bc/t/Makefile.am
@@ -74,7 +74,7 @@ nodist_libsnmp_bc_la_SOURCES = $(GENERATED_EVENT_CODE) $(REMOTE_SIM_SOURCES)
# libopenhpi_la_LIBADD = $(top_builddir)/utils/libopenhpiutils.la
# libopenhpi_la_LDFLAGS = -L$(top_builddir)/utils -version-info @HPI_LIB_VERSION@ -export-symbols $(top_srcdir)/src/hpi.sym
-libsnmp_bc_la_LIBADD = -luuid @SNMPLIBS@ $(top_builddir)/utils/libopenhpiutils.la
+libsnmp_bc_la_LIBADD = -luuid @SNMPLIBS@ $(top_builddir)/utils/libopenhpiutils.la -lnetsnmp
libsnmp_bc_la_LDFLAGS = -L$(top_builddir)/utils -module -version-info @HPI_LIB_VERSION@
# libsnmp_bc_la_LDFLAGS = -version 0:0:0
--
1.7.10.4

View File

@@ -0,0 +1,23 @@
Fix alignment issue in ipmi_inventory.c
Upstream-Status: Pending
Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
diff --git a/plugins/ipmi/ipmi_inventory.c b/plugins/ipmi/ipmi_inventory.c
index 5382186..01655c6 100644
--- a/plugins/ipmi/ipmi_inventory.c
+++ b/plugins/ipmi/ipmi_inventory.c
@@ -2546,8 +2546,11 @@ static SaErrorT modify_inventory(SaHpiIdrFieldT *field,
if (tb->DataLength == 0) {
rv = ipmi_fru_set_board_info_mfg_time(fru, 0);
} else {
+ time_t the_time;
+ /* tb->Data is not aligned -- copy to temp */
+ memcpy(&the_time, tb->Data, sizeof(the_time));
rv = ipmi_fru_set_board_info_mfg_time(fru,
- *(time_t *)tb->Data);
+ the_time);
}
break;
case SAHPI_IDR_FIELDTYPE_MANUFACTURER:

View File

@@ -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

View File

@@ -0,0 +1,24 @@
fix host gcc warnings
Remove gcc warnings when gcc is v3.2
Upstream-Status: Pending
Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
Index: openhpi-3.6.1/configure.ac
===================================================================
--- openhpi-3.6.1.orig/configure.ac
+++ openhpi-3.6.1/configure.ac
@@ -656,11 +656,6 @@ AC_ARG_ENABLE([werror],
fi],
[])
-if test -n "`gcc --version | grep ' 3.2'`" ; then
- CC_WARNINGS=`echo $CC_WARNINGS | sed -e 's/-Wno-strict-aliasing//g'`
- CXX_WARNINGS=`echo $CC_WARNINGS | sed -e 's/-Wno-strict-aliasing//g'`
-fi
-
case $host_os in
solaris*)
CC_WARNINGS=`echo $CC_WARNINGS | sed -e 's/-Wcast-qual//g'`

View File

@@ -0,0 +1,33 @@
Fix glib cross compile
Uses proper PKG_CONFIG_PATH when cross-compiling
Upstream-Status: Pending
Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
diff --git a/configure.ac b/configure.ac
index b5f5aad..f5a5b74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,13 +110,13 @@ else
*** GLIB is always available from ftp://ftp.gtk.org/.])
fi
-exact_version=`pkg-config --modversion $GLIB`;
-GLIB_CFLAGS=`pkg-config --cflags $GLIB $GTHREAD`
-GLIB_LIBS=`pkg-config --libs $GLIB $GTHREAD`
-GLIB_ONLY_CFLAGS=`pkg-config --cflags $GLIB`
-GLIB_ONLY_LIBS=`pkg-config --libs $GLIB`
-GMODULE_ONLY_CFLAGS=`pkg-config --cflags $GMODULE`
-GMODULE_ONLY_LIBS=`pkg-config --libs $GMODULE`
+exact_version=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --modversion $GLIB`;
+GLIB_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --cflags $GLIB $GTHREAD`
+GLIB_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --libs $GLIB $GTHREAD`
+GLIB_ONLY_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --cflags $GLIB`
+GLIB_ONLY_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --libs $GLIB`
+GMODULE_ONLY_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --cflags $GMODULE`
+GMODULE_ONLY_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --libs $GMODULE`
# On some versions of Solaris the pkg-config file for gthread-2.0 contains a
# compiler option, '-mt', that is incompatible with gcc

View File

@@ -0,0 +1,21 @@
Upstream-Status: Submitted
Package saftest run a test case to pass invalid session id to function
saHpiResourceIdGet that expect return SA_ERR_HPI_INVALID_SESSION. But the check
for SA_ERR_HPI_INVALID_SESSION is missed somehow in function saHpiResourceIdGet.
Add check for SA_ERR_HPI_INVALID_SESSION.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
-----
--- openhpi-3.4.0/baselib/safhpi.cpp.orig 2014-02-25 10:45:20.911734868 +0800
+++ openhpi-3.4.0/baselib/safhpi.cpp 2014-02-25 10:46:05.366925389 +0800
@@ -477,6 +477,8 @@
&rpt_update_count );
if ( rv == SA_ERR_HPI_NOT_PRESENT ) {
return SA_ERR_HPI_NOT_PRESENT;
+ } else if ( rv == SA_ERR_HPI_INVALID_SESSION) {
+ return SA_ERR_HPI_INVALID_SESSION;
} else if ( rv != SA_OK ) {
return SA_ERR_HPI_UNKNOWN;
}

View File

@@ -0,0 +1,28 @@
From afe545e77f9d841b7777d859e7e8108492fece96 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Wed, 26 Apr 2017 16:22:00 +0800
Subject: [PATCH] Fix libxml2 for cross-compiling
Use proper XML2_INCLUDE path when cross-compiling
Upstream-Status: Pending
Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 6242cbf..4fb6b69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,7 +179,7 @@ AC_CHECK_HEADERS([openssl/md2.h openssl/md5.h openssl/bio.h openssl/ssl.h openss
dnl xml is used for XML-based communication in ilo2_ribcl and oa_soap
AC_CHECK_LIB([xml2],[xmlParseMemory],[XML2_LIB=-lxml2],[XML2_LIB=])
-AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="-I/usr/include/libxml2"],[XML2_INCLUDE=])
+AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="$XML2_INCLUDE"],[XML2_INCLUDE=])
AC_SUBST(XML2_LIB)
AC_SUBST(XML2_INCLUDE)

View File

@@ -0,0 +1,33 @@
Fix ipmi plugin's test dir compilation
The ipmi plugin's test dir is not included
in compilation since it does not compile
properly with SSL
Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
Upstream-Status: Pending
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
---
plugins/ipmi/Makefile.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/plugins/ipmi/Makefile.in b/plugins/ipmi/Makefile.in
index 7c6b0a4..6204dbe 100644
--- a/plugins/ipmi/Makefile.in
+++ b/plugins/ipmi/Makefile.in
@@ -448,7 +448,9 @@ top_srcdir = @top_srcdir@
MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = -DG_LOG_DOMAIN=\"ipmi\" @OPENHPI_INCLUDES@
EXTRA_DIST = ipmi.sym ekeyfru.h
-SUBDIRS = t
+#SUBDIRS = t
+#Tests don't compile wih SSL properly so comment them out
+SUBDIRS =
AM_CFLAGS = @OPENIPMI_CFLAGS@
pkglib_LTLIBRARIES = libipmi.la
libipmi_la_SOURCES = ipmi.c \
--
1.9.1

View File

@@ -0,0 +1,45 @@
Fix net-snmp when cross-compiling
Remove irrelevant references to net-snmp libs and flags
when cross-compiling net-snmp
Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
Upstream-Status: Pending
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
---
acinclude.m4 | 4 ++--
configure | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
Index: openhpi-3.8.0/acinclude.m4
===================================================================
--- openhpi-3.8.0.orig/acinclude.m4
+++ openhpi-3.8.0/acinclude.m4
@@ -160,8 +160,8 @@ AC_DEFUN([OH_CHECK_NETSNMP],
],
[
have_netsnmp=yes
- SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/ -O\S*//g'`
- SNMPLIBS=`${net_snmp_config:-net-snmp-config} --libs`
+ SNMPFLAGS=""
+ SNMPLIBS=""
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no. No SNMP based plugins can be built!)])
Index: openhpi-3.8.0/configure
===================================================================
--- openhpi-3.8.0.orig/configure
+++ openhpi-3.8.0/configure
@@ -16062,8 +16062,8 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"; then :
have_netsnmp=yes
- SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/ -O\S*//g'`
- SNMPLIBS=`${net_snmp_config:-net-snmp-config} --libs`
+ SNMPFLAGS=""
+ SNMPLIBS=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

View File

@@ -0,0 +1,23 @@
Fix sysfs when cross-compiling
Use proper paths for sysfs plugins when cross-compiling
Signed-of-by: Aws Ismail <aws.ismail@windriver.com>
Upstream-Status: Pending
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
diff --git a/plugins/sysfs/sysfs2hpi.c b/plugins/sysfs/sysfs2hpi.c
index a745214..3685598 100644
--- a/plugins/sysfs/sysfs2hpi.c
+++ b/plugins/sysfs/sysfs2hpi.c
@@ -18,7 +18,7 @@
#include <stdlib.h>
#include <string.h>
-#include <libsysfs.h>
+#include <sysfs/libsysfs.h>
#include <SaHpi.h>
#include <oh_utils.h>

View File

@@ -0,0 +1,29 @@
From 5e0ae172586f5aeb270a8f9b012dd3e36536a2a9 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Wed, 24 Dec 2014 10:54:59 +0800
Subject: [PATCH] openhpi: use serial-tests config needed by ptest
ptest needs buildtest-TESTS and runtest-TESTS targets.
serial-tests is required to generate those targets.
Upstream-Status: Inappropriate [default automake behavior incompatible with ptest]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 89d8104..c29a31f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@ dnl various hacks by Sean Dague <http://dague.net/sean> 4/23/03
AC_PREREQ(2.57)
AC_INIT(openhpi, 3.8.0)
AC_CONFIG_SRCDIR(openhpi.spec.in)
-AM_INIT_AUTOMAKE([1.8])
+AM_INIT_AUTOMAKE([1.8 serial-tests])
AM_CONFIG_HEADER(config.h)
AH_TOP([#ifndef __OPENHPI_CONFIG_H

View File

@@ -0,0 +1,230 @@
#! /bin/sh
#
### BEGIN INIT INFO
# Provides: openhpid
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Should-Start: $named
# Should-Stop: $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start OpenHPI daemon at boot time
# Description: Enable OpenHPI service which is provided by openhpid.
### END INIT INFO
#
# openhpid.sh Start/Stop the openhpi daemon.
#
# description: openhpid is standard UNIX program which uses the OpenHPI \
# APIs and provides a standard internet server to access those \
# APIs for client programs.
# processname: openhpid
# config: the standard openhpi conf file specified on the command line or the env.
# pidfile: /var/run/openhpid.pid
#
# Author(s):
# W. David Ashley <dashley@us.ibm.com>
# Daniel de Araujo <ddearauj@us.ibm.com>
# Source function library.
PATH=/sbin:/bin:/usr/sbin:/usr/bin
prog="OpenHPI"
# If the openhpid executable is not available, we can't do any of this
test -f /usr/sbin/openhpid || exit 0
# Determine whether the lsb package is installed
# If it is, determine which lsb is installed:
# redhat, suse, or standard lsb
if test -f /etc/init.d/functions
then
lsbtype="rh"
. /etc/init.d/functions
elif test -f /etc/rc.status
then
lsbtype="suse"
. /etc/rc.status
elif test -f /lib/lsb/init-functions
then
lsbtype="lsb"
. /lib/lsb/init-functions
elif test -f /etc/gentoo-release
then
lsbtype="gentoo"
. /sbin/functions.sh
else
lsbtype="nolsb"
fi
print_outcome()
{
case "${lsbtype}" in
suse)
rc_status -v
;;
lsb)
if test "$?" -eq 0
then
log_success_msg "success"
else
log_failure_msg "failed"
fi
;;
gentoo)
eend $?
;;
nolsb | rh)
if test "$?" -eq 0
then
echo " ... success"
fi
if test "$?" -ne 0
then
echo " ... failed"
fi
;;
esac
}
start() {
case "${lsbtype}" in
suse)
echo -n "Starting $prog: "
startproc /usr/sbin/openhpid -c /etc/openhpi/openhpi.conf
RETVAL=$?
;;
lsb)
echo -n "Starting $prog: "
start_daemon /usr/sbin/openhpid -c /etc/openhpi/openhpi.conf
RETVAL=$?
;;
gentoo | rh)
echo "Starting $prog: "
start-stop-daemon --start --quiet --exec /usr/sbin/openhpid -- -c /etc/openhpi/openhpi.conf
RETVAL=$?
;;
nolsb)
echo -n "Starting $prog: "
/usr/sbin/openhpid -c /etc/openhpi/openhpi.conf
RETVAL=$?
;;
esac
print_outcome
}
stop() {
case "${lsbtype}" in
lsb | suse)
echo -n "Stopping $prog: "
killproc /usr/sbin/openhpid
RETVAL=$?
;;
gentoo)
echo "Stopping $prog: "
start-stop-daemon --stop --quiet --exec /usr/sbin/openhpid
RETVAL=$?
;;
nolsb | rh)
echo -n "Stopping $prog: "
if test -f /var/run/openhpid.pid && test "`cat /var/run/openhpid.pid`" != ""
then
kill "`cat /var/run/openhpid.pid`"
RETVAL=$?
else
RETVAL=0
fi
;;
esac
print_outcome
if test "$RETVAL" -eq 0 && test -f /var/run/openhpid.pid
then
rm -f /var/lock/openhpid
rm -f /var/run/openhpid.pid
fi
}
dstatus() {
echo "Checking for $prog daemon: "
case "${lsbtype}" in
suse)
checkproc /usr/sbin/openhpid
rc_status -v
;;
lsb)
pid="`pidofproc /usr/sbin/openhpid`"
if test "${pid}" != ""
then
log_success_msg "$prog is running"
else
log_success_msg "$prog is not running"
fi
;;
gentoo | nolsb | rh)
if test -f /var/run/openhpid.pid &&
test "`cat /var/run/openhpid.pid`" != "" &&
kill -s 0 "`cat /var/run/openhpid.pid`"
then
echo "$prog is running"
else
echo "$prog is not running"
fi
;;
esac
}
restart() {
stop
start
}
force_reload() {
# We don't currently support a reload, but can do a restart
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
dstatus
;;
force-reload)
force_reload
;;
*)
echo "Usage: $0 {start|stop|restart|status|force-reload}"
exit 1
esac

View File

@@ -0,0 +1,11 @@
[Unit]
Description=Daemon providing access to the SAF Hardware Platform Interface
After=syslog.target
[Service]
Type=forking
PIDFile=/run/openhpid.pid
ExecStart=@SBINDIR@/openhpid -c @SYSCONFDIR@/openhpi/openhpi.conf
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,5 @@
#!/bin/sh
for x in `find ./ -name Makefile`;
do
make -C `dirname ${x}` -k runtest-TESTS
done