* [PATCH 0/8] ipmi/hpi/radius: add new recipes and related packages
@ 2017-04-26 6:57 jackie.huang
2017-04-26 6:57 ` [meta-networking][PATCH 1/8] openhpi: add new recipe jackie.huang
` (7 more replies)
0 siblings, 8 replies; 11+ messages in thread
From: jackie.huang @ 2017-04-26 6:57 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
---
The following changes since commit 444e1fb198076f34a0fa66e83f3eec76efba2e6c:
php: remove PNBLACKLIST (2017-04-18 14:21:53 +0200)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib.git jhuang0/r_upstream-perl-ipmi-hpi_170426-0
http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/r_upstream-perl-ipmi-hpi_170426-0
Jackie Huang (8):
openhpi: add new recipe
freeradius: add new recipe
libnet-ldap-perl: add new recipe
libdata-hexdump-perl: add new recipe
libnet-telnet-perl: add new recipe
libauthen-radius-perl: add new recipe
openipmi: add new recipe
ipmitool: add new recipe
.../freeradius/files/freeradius | 110 +++++
.../freeradius-avoid-searching-host-dirs.patch | 194 ++++++++
...radius-configure.ac-add-option-for-libcap.patch | 70 +++
...dius-configure.ac-allow-cross-compilation.patch | 31 ++
.../files/freeradius-enble-user-in-conf.patch | 28 ++
...eeradius-fix-error-for-expansion-of-macro.patch | 61 +++
...ius-fix-issues-related-to-m4-include-path.patch | 236 ++++++++++
.../freeradius-fix-quoting-for-BUILT_WITH.patch | 55 +++
.../files/freeradius-libtool-detection.patch | 89 ++++
.../freeradius-libtool-do-not-use-jlibtool.patch | 160 +++++++
.../freeradius-rlm_python-add-PY_INC_DIR.patch | 33 ++
.../freeradius/files/radiusd-volatiles.conf | 2 +
.../freeradius/files/radiusd.service | 16 +
.../freeradius/files/volatiles.58_radiusd | 3 +
.../freeradius/freeradius_3.0.12.bb | 223 +++++++++
.../files/openhpi-add-libnetsnmp-when-link.patch | 25 +
.../files/openhpi-fix-alignment-issue.patch | 23 +
.../openhpi/files/openhpi-fix-host-gcc.patch | 24 +
.../files/openhpi-fix-testfail-errors.patch | 31 ++
.../openhpi/files/openhpi-glib-cross-compile.patch | 33 ++
.../files/openhpi-hpi-shell-thread-fix.patch | 29 ++
.../openhpi/files/openhpi-invalide-session.patch | 21 +
.../files/openhpi-libxml2-cross-compile.patch | 21 +
.../openhpi/files/openhpi-linkfix.patch | 33 ++
.../files/openhpi-netsnmp-cross-compile.patch | 48 ++
.../files/openhpi-sysfs-cross-compile.patch | 23 +
...i-use-serial-tests-config-needed-by-ptest.patch | 31 ++
.../recipes-daemons/openhpi/files/openhpi.init | 230 +++++++++
.../recipes-daemons/openhpi/files/openhpid.service | 11 +
.../recipes-daemons/openhpi/files/run-ptest | 5 +
.../recipes-daemons/openhpi/openhpi_3.6.1.bb | 111 +++++
.../recipes-support/ipmitool/ipmitool_1.8.18.bb | 36 ++
.../files/do-not-install-pyc-and-pyo.patch | 25 +
.../fix-symlink-install-error-in-cmdlang.patch | 22 +
.../files/ipmi-init-fix-the-arguments.patch | 41 ++
.../recipes-support/openipmi/files/ipmi.service | 12 +
.../openipmi/files/makefile-add-ldflags.patch | 19 +
.../openipmi/files/openipmi-don-t-rm-.libs.patch | 32 ++
.../recipes-support/openipmi/files/openipmi-helper | 512 +++++++++++++++++++++
.../files/openipmi-no-openipmigui-man.patch | 26 ++
...openipmi-remove-host-path-from-la_LDFLAGS.patch | 85 ++++
.../recipes-support/openipmi/openipmi_2.0.22.bb | 111 +++++
.../libauthen/libauthen-radius-perl/run-ptest | 21 +
.../test.pl-adjust-for-ptest.patch | 90 ++++
.../libauthen/libauthen-radius-perl_0.22.bb | 39 ++
meta-perl/recipes-perl/libdata/files/run-ptest | 16 +
.../libdata/libdata-hexdump-perl_0.02.bb | 33 ++
.../recipes-perl/libnet/libnet-ldap-perl_0.65.bb | 29 ++
.../recipes-perl/libnet/libnet-telnet-perl_3.04.bb | 25 +
49 files changed, 3184 insertions(+)
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/radiusd.service
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd
create mode 100644 meta-networking/recipes-connectivity/freeradius/freeradius_3.0.12.bb
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch
create mode 100755 meta-networking/recipes-daemons/openhpi/files/openhpi.init
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpid.service
create mode 100755 meta-networking/recipes-daemons/openhpi/files/run-ptest
create mode 100644 meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
create mode 100644 meta-oe/recipes-support/ipmitool/ipmitool_1.8.18.bb
create mode 100644 meta-oe/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch
create mode 100644 meta-oe/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
create mode 100644 meta-oe/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch
create mode 100644 meta-oe/recipes-support/openipmi/files/ipmi.service
create mode 100644 meta-oe/recipes-support/openipmi/files/makefile-add-ldflags.patch
create mode 100644 meta-oe/recipes-support/openipmi/files/openipmi-don-t-rm-.libs.patch
create mode 100755 meta-oe/recipes-support/openipmi/files/openipmi-helper
create mode 100644 meta-oe/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch
create mode 100644 meta-oe/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch
create mode 100644 meta-oe/recipes-support/openipmi/openipmi_2.0.22.bb
create mode 100644 meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest
create mode 100644 meta-perl/recipes-perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch
create mode 100644 meta-perl/recipes-perl/libauthen/libauthen-radius-perl_0.22.bb
create mode 100644 meta-perl/recipes-perl/libdata/files/run-ptest
create mode 100644 meta-perl/recipes-perl/libdata/libdata-hexdump-perl_0.02.bb
create mode 100644 meta-perl/recipes-perl/libnet/libnet-ldap-perl_0.65.bb
create mode 100644 meta-perl/recipes-perl/libnet/libnet-telnet-perl_3.04.bb
--
2.11.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [meta-networking][PATCH 1/8] openhpi: add new recipe
2017-04-26 6:57 [PATCH 0/8] ipmi/hpi/radius: add new recipes and related packages jackie.huang
@ 2017-04-26 6:57 ` jackie.huang
2017-04-26 7:34 ` Martin Jansa
2017-04-26 6:57 ` [meta-networking][PATCH 2/8] freeradius: " jackie.huang
` (6 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: jackie.huang @ 2017-04-26 6:57 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
OpenHPI is an open source project created with
the intent of providing an implementation of
the SA Forum's Hardware Platform Interface (HPI).
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../files/openhpi-add-libnetsnmp-when-link.patch | 25 +++
.../files/openhpi-fix-alignment-issue.patch | 23 +++
.../openhpi/files/openhpi-fix-host-gcc.patch | 24 +++
.../files/openhpi-fix-testfail-errors.patch | 31 +++
.../openhpi/files/openhpi-glib-cross-compile.patch | 33 +++
.../files/openhpi-hpi-shell-thread-fix.patch | 29 +++
.../openhpi/files/openhpi-invalide-session.patch | 21 ++
.../files/openhpi-libxml2-cross-compile.patch | 21 ++
.../openhpi/files/openhpi-linkfix.patch | 33 +++
.../files/openhpi-netsnmp-cross-compile.patch | 48 +++++
.../files/openhpi-sysfs-cross-compile.patch | 23 +++
...i-use-serial-tests-config-needed-by-ptest.patch | 31 +++
.../recipes-daemons/openhpi/files/openhpi.init | 230 +++++++++++++++++++++
.../recipes-daemons/openhpi/files/openhpid.service | 11 +
.../recipes-daemons/openhpi/files/run-ptest | 5 +
.../recipes-daemons/openhpi/openhpi_3.6.1.bb | 111 ++++++++++
16 files changed, 699 insertions(+)
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch
create mode 100755 meta-networking/recipes-daemons/openhpi/files/openhpi.init
create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpid.service
create mode 100755 meta-networking/recipes-daemons/openhpi/files/run-ptest
create mode 100644 meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch
new file mode 100644
index 000000000..4644910b7
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch
@@ -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
+
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch
new file mode 100644
index 000000000..077e26cbf
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch
@@ -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:
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch
new file mode 100644
index 000000000..029b857bc
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch
@@ -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>
+
+diff --git a/configure.ac b/configure.ac
+index f5a5b74..4a20154 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -605,11 +605,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'`
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch
new file mode 100644
index 000000000..205696e65
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch
@@ -0,0 +1,31 @@
+Fix for saftest failures.
+
+Upstream-Status: Pending
+
+Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
+
+diff -urpN a/openhpid/safhpi.c b/openhpid/safhpi.c
+--- a/openhpid/safhpi.c
++++ b/openhpid/safhpi.c
+@@ -1976,7 +1976,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;
+diff -urpN a/utils/sahpi_struct_utils.c b/utils/sahpi_struct_utils.c
+--- a/utils/sahpi_struct_utils.c
++++ b/utils/sahpi_struct_utils.c
+@@ -3855,6 +3855,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/meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch
new file mode 100644
index 000000000..1627c9797
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch
@@ -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
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch
new file mode 100644
index 000000000..7dac45318
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch
@@ -0,0 +1,29 @@
+commit e9f9a73c9dba8dd59f3d6c3acd9988ec8361d55a
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date: Mon Dec 17 16:23:45 2012 -0500
+
+ Correct dangling g_thread_exit in session.c
+
+ hpi_shell's session.c has its progress_bar
+ thread created using pthread_create but
+ exited using g_thread_exit. Use pthread_exit
+ instead to avoid unpredictable GLIB thread
+ errors.
+
+ Upstream-Status: Pending
+
+ Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+diff --git a/hpi_shell/session.c b/hpi_shell/session.c
+index 85c31bf..187da4c 100644
+--- a/hpi_shell/session.c
++++ b/hpi_shell/session.c
+@@ -66,7 +66,7 @@ static void* progress_bar(void *unused)
+ if (i < (PROGRESS_BUF_SIZE - mes_len - 1)) i++;
+ t++;
+ };
+- g_thread_exit(0);
++ pthread_exit(0);
+ return (void *)1;
+ }
+
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch
new file mode 100644
index 000000000..d03c97e18
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch
@@ -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;
+ }
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch
new file mode 100644
index 000000000..6d3b6648a
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch
@@ -0,0 +1,21 @@
+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>
+
+diff --git a/configure.ac b/configure.ac
+index 30a792c..b5f5aad 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -175,7 +175,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)
+
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch
new file mode 100644
index 000000000..3222f5d13
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch
@@ -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
+
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch
new file mode 100644
index 000000000..95b0abc91
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch
@@ -0,0 +1,48 @@
+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(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 82c33f6..727e461 100644
+--- a/acinclude.m4
++++ b/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!)])
+diff --git a/configure b/configure
+index 00067bc..36b913c 100755
+--- a/configure
++++ b/configure
+@@ -15949,8 +15949,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; }
+
+--
+1.9.1
+
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch
new file mode 100644
index 000000000..38d9a6742
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch
@@ -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>
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch
new file mode 100644
index 000000000..51537ef12
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch
@@ -0,0 +1,31 @@
+From 36fbaa27e7299f63c1324b0ad22b970e9365d6a7 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 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4b51971..16136b3 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.5.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
+--
+1.7.1
+
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi.init b/meta-networking/recipes-daemons/openhpi/files/openhpi.init
new file mode 100755
index 000000000..3a5f4a06a
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpi.init
@@ -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
diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpid.service b/meta-networking/recipes-daemons/openhpi/files/openhpid.service
new file mode 100644
index 000000000..cd4168f8e
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/openhpid.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Daemon providing access to the SAF Hardware Platform Interface
+After=syslog.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/openhpid.pid
+ExecStart=@SBINDIR@/openhpid -c @SYSCONFDIR@/openhpi/openhpi.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-daemons/openhpi/files/run-ptest b/meta-networking/recipes-daemons/openhpi/files/run-ptest
new file mode 100755
index 000000000..5b187d908
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/files/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+for x in `find ./ -name Makefile`;
+do
+ make -C `dirname ${x}` -k runtest-TESTS
+done
diff --git a/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb b/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
new file mode 100644
index 000000000..19bd40abe
--- /dev/null
+++ b/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
@@ -0,0 +1,111 @@
+SUMMARY = "Hardware Platform Interface Library and Tools"
+
+DESCRIPTION = "\
+OpenHPI is an open source project created with the intent of providing an \
+implementation of the SA Forum's Hardware Platform Interface (HPI). HPI \
+provides an abstracted interface to managing computer hardware, typically for \
+chassis and rack based servers. HPI includes resource modeling; access to and \
+control over sensor, control, watchdog, and inventory data associated with \
+resources; abstracted System Event Log interfaces; hardware events and alerts; \
+and a managed hotswap interface. \
+\
+OpenHPI provides a modular mechanism for adding new hardware and device support \
+easily. Many plugins exist in the OpenHPI source tree to provide access to \
+various types of hardware. This includes, but is not limited to, IPMI based \
+servers, Blade Center, and machines which export data via sysfs. \
+"
+
+HOMEPAGE = "http://openhpi.sourceforge.net/Home"
+SECTION = "net"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4"
+
+DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/openhpi/openhpi-${PV}.tar.gz \
+ file://openhpi-netsnmp-cross-compile.patch \
+ file://openhpi-sysfs-cross-compile.patch \
+ file://openhpi-libxml2-cross-compile.patch \
+ file://openhpi-glib-cross-compile.patch \
+ file://openhpi-linkfix.patch \
+ file://openhpi-fix-host-gcc.patch \
+ file://openhpi-hpi-shell-thread-fix.patch \
+ file://openhpi-fix-testfail-errors.patch \
+ file://openhpi-add-libnetsnmp-when-link.patch \
+ file://openhpi-invalide-session.patch \
+ file://openhpi-use-serial-tests-config-needed-by-ptest.patch \
+ file://openhpi-fix-alignment-issue.patch \
+ \
+ file://openhpi.init \
+ file://openhpid.service \
+ file://run-ptest \
+"
+
+SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23"
+SRC_URI[sha256sum] = "e0a810cb401c4bdcfc9551f2e6afd5a8ca4b411f5ee3bc60c19f82fd6e84a3dc"
+
+S = "${WORKDIR}/openhpi-${PV}"
+
+inherit autotools pkgconfig ptest update-rc.d systemd
+
+PACKAGES =+ "${PN}-libs"
+
+FILES_${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so"
+
+INSANE_SKIP_${PN}-libs = "dev-so"
+RDEPENDS_${PN} += "${PN}-libs"
+
+PACKAGECONFIG ??= "libgcrypt"
+PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils,"
+PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt,"
+
+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 0755 ${WORKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/openhpid.service ${D}${systemd_unitdir}/system
+ sed -i -e "s,@SBINDIR@,${sbindir},g" -e "s,@SYSCONFDIR@,${sysconfdir},g" \
+ ${D}${systemd_unitdir}/system/openhpid.service
+}
+
+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
+ fi
+ done
+}
+
+do_install_ptest () {
+ cp -rf ${B}/openhpid/t/ohpi/.libs/* ${B}/openhpid/t/ohpi/
+ TESTS="utils marshal openhpid"
+ for subtest in ${TESTS}; do
+ mkdir -p ${D}${PTEST_PATH}/${subtest}/t
+ cp -rf ${B}/${subtest}/t/* ${D}${PTEST_PATH}/${subtest}/t
+ done
+
+ for x in `find ${D}${PTEST_PATH} -name Makefile`; do
+ sed -i "s:${S}:${PTEST_PATH}/:g" ${x};
+ sed -i "s/^Makefile:/MM:/g" ${x};
+ done;
+
+ 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/
+ find ${D}${PTEST_PATH}/ -name "*.c" -exec rm {} \;
+ find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \;
+ find ${D}${PTEST_PATH}/ -name "*.h" -exec rm {} \;
+}
+
+INITSCRIPT_NAME = "openhpid"
+INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ."
+
+SYSTEMD_SERVICE_${PN} = "openhpid.service"
+SYSTEMD_AUTO_ENABLE = "disable"
--
2.11.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [meta-networking][PATCH 2/8] freeradius: add new recipe
2017-04-26 6:57 [PATCH 0/8] ipmi/hpi/radius: add new recipes and related packages jackie.huang
2017-04-26 6:57 ` [meta-networking][PATCH 1/8] openhpi: add new recipe jackie.huang
@ 2017-04-26 6:57 ` jackie.huang
2017-04-26 6:57 ` [meta-perl][PATCH 3/8] libnet-ldap-perl: " jackie.huang
` (5 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: jackie.huang @ 2017-04-26 6:57 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
FreeRADIUS is an Internet authentication daemon,
which implements the RADIUS protocol, as defined
in RFC 2865 (and others).
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../freeradius/files/freeradius | 110 ++++++++++
.../freeradius-avoid-searching-host-dirs.patch | 194 +++++++++++++++++
...radius-configure.ac-add-option-for-libcap.patch | 70 ++++++
...dius-configure.ac-allow-cross-compilation.patch | 31 +++
.../files/freeradius-enble-user-in-conf.patch | 28 +++
...eeradius-fix-error-for-expansion-of-macro.patch | 61 ++++++
...ius-fix-issues-related-to-m4-include-path.patch | 236 +++++++++++++++++++++
.../freeradius-fix-quoting-for-BUILT_WITH.patch | 55 +++++
.../files/freeradius-libtool-detection.patch | 89 ++++++++
.../freeradius-libtool-do-not-use-jlibtool.patch | 160 ++++++++++++++
.../freeradius-rlm_python-add-PY_INC_DIR.patch | 33 +++
.../freeradius/files/radiusd-volatiles.conf | 2 +
.../freeradius/files/radiusd.service | 16 ++
.../freeradius/files/volatiles.58_radiusd | 3 +
.../freeradius/freeradius_3.0.12.bb | 223 +++++++++++++++++++
15 files changed, 1311 insertions(+)
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/radiusd.service
create mode 100644 meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd
create mode 100644 meta-networking/recipes-connectivity/freeradius/freeradius_3.0.12.bb
diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius b/meta-networking/recipes-connectivity/freeradius/files/freeradius
new file mode 100644
index 000000000..fa412e2aa
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/freeradius
@@ -0,0 +1,110 @@
+#!/bin/sh
+# Start/stop the FreeRADIUS daemon.
+
+### BEGIN INIT INFO
+# Provides: freeradius
+# Required-Start: $remote_fs $network $syslog
+# Should-Start: $time mysql slapd postgresql samba krb5-kdc
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Radius Daemon
+# Description: Extensible, configurable radius daemon
+### END INIT INFO
+
+set -e
+
+# Source function library.
+. /etc/init.d/functions
+
+if [ -f /lib/lsb/init-functions ]; then
+ . /lib/lsb/init-functions
+fi
+
+PROG="radiusd"
+PROGRAM="/usr/sbin/radiusd"
+PIDFILE="/var/run/radiusd/radiusd.pid"
+DESCR="FreeRADIUS daemon"
+
+if [ -r /etc/default/$PROG ]; then
+ . /etc/default/$PROG
+fi
+
+test -f $PROGRAM || exit 0
+
+check_certs() {
+ if [ ! -f /etc/raddb/certs/server.pem ]; then
+ echo -n "Creating certificates for freeradius..."
+ if sudo -u radiusd /etc/raddb/certs/bootstrap 1> /dev/null 2> /dev/null; then
+ echo "done"
+ else
+ echo "failed!"
+ fi
+ fi
+
+}
+
+# /var/run may be a tmpfs
+if [ ! -d /var/run/radiusd ]; then
+ mkdir -p /var/run/radiusd
+ chown radiusd:radiusd /var/run/radiusd
+fi
+
+if [ ! -d /var/log/radius ]; then
+ mkdir -p /var/log/radius
+ touch /var/log/radius/radius.log
+ chown radiusd:radiusd /var/run/radius
+fi
+
+if [ ! -f ${PIDFILE} ]; then
+ touch ${PIDFILE}
+ chown radiusd:radiusd ${PIDFILE}
+fi
+
+export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
+
+ret=0
+
+case "$1" in
+ start)
+ check_certs
+ echo -n "Starting $DESCR" "$PROG"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PROGRAM -- $FREERADIUS_OPTIONS || ret=$?
+ [ "$ret" == 0 ] && echo " Success" || echo " Failed"
+ exit $ret
+ ;;
+ stop)
+ echo -n "Stopping $DESCR" "$PROG"
+ if [ -f "$PIDFILE" ] ; then
+ start-stop-daemon --stop --retry=TERM/30/KILL/5 --quiet --pidfile $PIDFILE || ret=$?
+ else
+ echo -n "$PIDFILE not found"
+ ret=1
+ fi
+ [ "$ret" == 0 ] && echo " Success" || echo " Failed"
+ ;;
+ status)
+ status $PROGRAM;
+ exit $?
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ reload|force-reload)
+ echo -n "Reloading $DESCR" "$PROG"
+ if [ -f "$PIDFILE" ] ; then
+ start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE || ret=$?
+ else
+ echo -n "$PIDFILE not found"
+ ret=1
+ fi
+ [ "$ret" == 0 ] && echo " Success" || echo " Failed"
+ ;;
+ *)
+ echo "Usage: $0 start|stop|status|restart|force-reload|reload"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch
new file mode 100644
index 000000000..8ab23d3ef
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch
@@ -0,0 +1,194 @@
+From dc41591d5ceb18900ec85894f8f7b7bb44bb3bd9 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 4 Jan 2016 01:44:04 -0500
+Subject: [PATCH] avoid searching host dirs
+
+Upstream-Status: Inappropriate [cross-compile specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ acinclude.m4 | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac | 6 +++---
+ src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac | 2 +-
+ src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac | 4 ++--
+ src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac | 4 ++--
+ 8 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index da48acc..b513ae1 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -178,7 +178,7 @@ if test "x$smart_lib" = "x"; then
+ FR_LOCATE_DIR(smart_lib_dir,[lib$1${libltdl_cv_shlibext}])
+ FR_LOCATE_DIR(smart_lib_dir,[lib$1.a])
+
+- for try in $smart_lib_dir /usr/local/lib /opt/lib; do
++ for try in $smart_lib_dir; do
+ AC_MSG_CHECKING([for $2 in -l$1 in $try])
+ LIBS="-l$1 $old_LIBS"
+ CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
+@@ -218,7 +218,7 @@ ac_safe=`echo "$1" | sed 'y%./+-%__pm%'`
+ old_CPPFLAGS="$CPPFLAGS"
+ smart_include=
+ dnl # The default directories we search in (in addition to the compilers search path)
+-smart_include_dir="/usr/local/include /opt/include"
++smart_include_dir=
+
+ dnl # Our local versions
+ _smart_try_dir=
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
+index 75c851a..a262d71 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
+@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then
+ esac])
+
+ dnl Check for SQLConnect in -ldb2
+- smart_try_dir="$ibmdb2_lib_dir /usr/local/db2/lib /usr/IBMdb2/V7.1/lib"
++ smart_try_dir="$ibmdb2_lib_dir"
+ FR_SMART_CHECK_LIB(db2, SQLConnect)
+ if test "x$ac_cv_lib_db2_SQLConnect" != xyes; then
+ fail="$fail libdb2"
+ fi
+
+ dnl Check for sqlcli.h
+- smart_try_dir="$ibmdb2_include_dir /usr/local/db2/include /usr/IBMdb2/V7.1/include"
++ smart_try_dir="$ibmdb2_include_dir"
+ FR_SMART_CHECK_INCLUDE(sqlcli.h)
+ if test "x$ac_cv_header_sqlcli_h" != xyes; then
+ fail="$fail sqlcli.h"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
+index 4da57b3..752b043 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
+@@ -56,14 +56,14 @@ if test x$with_[]modname != xno; then
+ esac])
+
+ dnl Check for isc_attach_database in -lfbclient
+- smart_try_dir="$firebird_lib_dir /usr/lib/firebird2/lib /usr/local/firebird/lib"
++ smart_try_dir="$firebird_lib_dir"
+ FR_SMART_CHECK_LIB(fbclient, isc_attach_database)
+ if test "x$ac_cv_lib_fbclient_isc_attach_database" != xyes; then
+ fail="$fail libfbclient"
+ fi
+
+ dnl Check for ibase.h
+- smart_try_dir="$firebird_include_dir /usr/lib/firebird2/include /usr/local/firebird/include"
++ smart_try_dir="$firebird_include_dir"
+ FR_SMART_CHECK_INCLUDE(ibase.h)
+ if test "x$ac_cv_header_ibase_h" != xyes; then
+ fail="$fail ibase.h"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
+index ba6304f..3393557 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
+@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then
+ esac])
+
+ dnl Check for SQLConnect in -liodbc
+- smart_try_dir="$iodbc_lib_dir /usr/lib /usr/lib/iodbc /usr/local/lib/iodbc /usr/local/iodbc/lib/iodbc"
++ smart_try_dir="$iodbc_lib_dir"
+ FR_SMART_CHECK_LIB(iodbc, SQLConnect)
+ if test "x$ac_cv_lib_iodbc_SQLConnect" != xyes; then
+ fail="$fail libiodbc"
+ fi
+
+ dnl Check for isql.h
+- smart_try_dir="$iodbc_include_dir /usr/include /usr/include/iodbc /usr/local/iodbc/include"
++ smart_try_dir="$iodbc_include_dir"
+ FR_SMART_CHECK_INCLUDE(isql.h)
+ if test "x$ac_cv_header_isql_h" != xyes; then
+ fail="$fail isql.h"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
+index 1401677..2e7db44 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
+@@ -136,7 +136,7 @@ if test x$with_[]modname != xno; then
+
+ dnl # Check for libmysqlclient_r
+ if test "x$have_a_libmysqlclient" != "xyes"; then
+- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
++ smart_try_dir="$mysql_lib_dir"
+ FR_SMART_CHECK_LIB(mysqlclient_r, mysql_init)
+ if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = "xyes"; then
+ have_a_libmysqlclient='yes'
+@@ -145,7 +145,7 @@ if test x$with_[]modname != xno; then
+
+ dnl # Check for libmysqlclient
+ if test "x$have_a_libmysqlclient" != "xyes"; then
+- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
++ smart_try_dir="$mysql_lib_dir"
+ FR_SMART_CHECK_LIB(mysqlclient, mysql_init)
+ if test "x$ac_cv_lib_mysqlclient_mysql_init" = "xyes"; then
+ have_a_libmysqlclient='yes'
+@@ -189,7 +189,7 @@ if test x$with_[]modname != xno; then
+ fi
+
+ if test "x$have_mysql_h" != "xyes"; then
+- smart_try_dir="$mysql_include_dir /usr/local/include /usr/local/mysql/include"
++ smart_try_dir="$mysql_include_dir"
+ FR_SMART_CHECK_INCLUDE(mysql/mysql.h)
+ if test "x$ac_cv_header_mysql_mysql_h" = "xyes"; then
+ AC_DEFINE(HAVE_MYSQL_MYSQL_H, [], [Define if you have <mysql/mysql.h>])
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
+index 3178462..5cbc8c2 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
+@@ -63,7 +63,7 @@ if test x$with_[]modname != xno; then
+ dnl # Check for header files
+ dnl ############################################################
+
+- smart_try_dir="$oracle_include_dir /usr/local/instaclient/include"
++ smart_try_dir="$oracle_include_dir"
+
+ if test "x$ORACLE_HOME" != "x"; then
+ smart_try_dir="${smart_try_dir} ${ORACLE_HOME}/include"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
+index 4f9a890..e1cf811 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
+@@ -41,7 +41,7 @@ if test x$with_[]modname != xno; then
+ esac ]
+ )
+
+- smart_try_dir="$rlm_sql_postgresql_include_dir /usr/include/postgresql /usr/local/pgsql/include /usr/include/pgsql"
++ smart_try_dir="$rlm_sql_postgresql_include_dir"
+ FR_SMART_CHECK_INCLUDE(libpq-fe.h)
+ if test "x$ac_cv_header_libpqmfe_h" != "xyes"; then
+ fail="$fail libpq-fe.h"
+@@ -76,7 +76,7 @@ if test x$with_[]modname != xno; then
+ ])
+ fi
+
+- smart_try_dir="$rlm_sql_postgresql_lib_dir /usr/lib /usr/local/pgsql/lib"
++ smart_try_dir="$rlm_sql_postgresql_lib_dir"
+ FR_SMART_CHECK_LIB(pq, PQconnectdb)
+ if test "x$ac_cv_lib_pq_PQconnectdb" != "xyes"; then
+ fail="$fail libpq"
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
+index 3545387..c543ed4 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
++++ b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
+@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then
+ esac])
+
+ dnl Check for SQLConnect in -lodbc
+- smart_try_dir="$unixodbc_lib_dir /usr/local/unixodbc/lib"
++ smart_try_dir="$unixodbc_lib_dir"
+ FR_SMART_CHECK_LIB(odbc, SQLConnect)
+ if test "x$ac_cv_lib_odbc_SQLConnect" != xyes; then
+ fail="$fail libodbc"
+ fi
+
+ dnl Check for sql.h
+- smart_try_dir="$unixodbc_include_dir /usr/local/unixodbc/include"
++ smart_try_dir="$unixodbc_include_dir"
+ FR_SMART_CHECK_INCLUDE(sql.h)
+ if test "x$ac_cv_header_sql_h" != xyes; then
+ fail="$fail sql.h"
+--
+1.9.1
+
diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch
new file mode 100644
index 000000000..71b78090c
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch
@@ -0,0 +1,70 @@
+From 74eed61dec8702c89f3e121d577ea9db25c961a4 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 11 Jan 2016 02:52:16 -0500
+Subject: [PATCH] configure.ac: add option for libcap
+
+Upstream-Status: Pending
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ configure.ac | 37 ++++++++++++++++++++++++++++---------
+ 1 file changed, 28 insertions(+), 9 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 066d3d7..6e4266b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -948,6 +948,23 @@ fi
+ dnl Set by FR_SMART_CHECKLIB
+ LIBS="${old_LIBS}"
+
++dnl #
++dnl # extra argument: --with-libcap
++dnl #
++WITH_LIBCAP=yes
++AC_ARG_WITH(libcap,
++[ --with-licap use licap for debugger checks. (default=yes)],
++[ case "$withval" in
++ no)
++ WITH_LIBCAP=no
++ ;;
++ *)
++ WITH_LIBCAP=yes
++ ;;
++ esac ]
++)
++
++
+ dnl Check for cap
+ dnl extra argument: --with-cap-lib-dir=DIR
+ cap_lib_dir=
+@@ -981,15 +998,17 @@ AC_ARG_WITH(cap-include-dir,
+ ;;
+ esac])
+
+-smart_try_dir="$cap_lib_dir"
+-FR_SMART_CHECK_LIB(cap, cap_get_proc)
+-if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
+- AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>.])
+-else
+- AC_DEFINE(HAVE_LIBCAP, 1,
+- [Define to 1 if you have the `cap' library (-lcap).]
+- )
+- HAVE_LIBCAP=1
++if test "x$WITH_LIBCAP" = xyes; then
++ smart_try_dir="$cap_lib_dir"
++ FR_SMART_CHECK_LIB(cap, cap_get_proc)
++ if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
++ AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>.])
++ else
++ AC_DEFINE(HAVE_LIBCAP, 1,
++ [Define to 1 if you have the `cap' library (-lcap).]
++ )
++ HAVE_LIBCAP=1
++ fi
+ fi
+
+ VL_LIB_READLINE
+--
+1.9.1
+
diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch
new file mode 100644
index 000000000..30497a602
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch
@@ -0,0 +1,31 @@
+Subject: [PATCH] configure.ac: allow cross-compilation
+
+The checking OpenSSL library and header version consistency will
+always fail in cross compiling, skip the check and give a warning
+instead for cross compiling.
+
+Upstream-Status: Inappropriate[embedded specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/modules/rlm_krb5/configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/modules/rlm_krb5/configure.ac b/src/modules/rlm_krb5/configure.ac
+index eb43534..113a079 100644
+--- a/src/modules/rlm_krb5/configure.ac
++++ b/src/modules/rlm_krb5/configure.ac
+@@ -137,7 +137,8 @@ if test x$with_[]modname != xno; then
+ FR_SMART_CHECK_LIB(krb5, krb5_is_thread_safe)
+ if test "x$ac_cv_lib_krb5_krb5_is_thread_safe" == xyes; then
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <krb5.h>]], [[return krb5_is_thread_safe() ? 0 : 1]])],
+- [krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])])
++ [krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])],
++ [AC_MSG_WARN(cross compiling: not checking)])
+ fi
+ else
+ krb5threadsafe=""
+--
+2.10.2
+
diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch
new file mode 100644
index 000000000..4a62bf1fa
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch
@@ -0,0 +1,28 @@
+Enable and change user and group of freeradius server to radiusd
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ raddb/radiusd.conf.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/raddb/radiusd.conf.in b/raddb/radiusd.conf.in
+index c62f4ff..0b4a84e 100644
+--- a/raddb/radiusd.conf.in
++++ b/raddb/radiusd.conf.in
+@@ -436,8 +436,8 @@ security {
+ # member. This can allow for some finer-grained access
+ # controls.
+ #
+-# user = radius
+-# group = radius
++ user = radiusd
++ group = radiusd
+
+ # Core dumps are a bad thing. This should only be set to
+ # 'yes' if you're debugging a problem with the server.
+--
+1.9.1
+
diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch
new file mode 100644
index 000000000..af1bff051
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch
@@ -0,0 +1,61 @@
+From 5b6d8b14f2696fcf1dca119212f9d0a0fa04defd Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Wed, 18 Jan 2017 14:59:39 +0800
+Subject: [PATCH] fix error for expansion of macro in thread.h
+
+The parameter declaration is missing in expansion of macro
+which cause the build error:
+| In file included from src/freeradius-devel/libradius.h:80:0,
+| from src/lib/log.c:26:
+| src/lib/log.c: In function '__fr_thread_local_destroy_fr_strerror_buffer':
+| src/lib/log.c:37:31: error: 'fr_strerror_buffer' undeclared (first use in this function)
+| fr_thread_local_setup(char *, fr_strerror_buffer) /* macro */
+| ^
+
+Add the missing declaration in macro.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/include/threads.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/include/threads.h b/src/include/threads.h
+index e36d81d..2bcb6aa 100644
+--- a/src/include/threads.h
++++ b/src/include/threads.h
+@@ -89,7 +89,7 @@ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
+ # define fr_thread_local_get(_n) _n
+ #elif defined(HAVE_PTHREAD_H)
+ # include <pthread.h>
+-# define fr_thread_local_setup(_t, _n) \
++# define fr_thread_local_setup(_t, _n) static __thread _t _n;\
+ static pthread_key_t __fr_thread_local_key_##_n;\
+ static pthread_once_t __fr_thread_local_once_##_n = PTHREAD_ONCE_INIT;\
+ static pthread_destructor_t __fr_thread_local_destructor_##_n = NULL;\
+@@ -100,17 +100,17 @@ static void __fr_thread_local_destroy_##_n(UNUSED void *unused)\
+ static void __fr_thread_local_key_init_##_n(void)\
+ {\
+ (void) pthread_key_create(&__fr_thread_local_key_##_n, __fr_thread_local_destroy_##_n);\
+- (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
+ }\
+ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
+ {\
+ __fr_thread_local_destructor_##_n = func;\
+ if (_n) return _n; \
+ (void) pthread_once(&__fr_thread_local_once_##_n, __fr_thread_local_key_init_##_n);\
++ (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
+ return _n;\
+ }
+-# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f)
+-# define fr_thread_local_set(_n, _v) __fr_thread_local_set_##_n(_v)
+-# define fr_thread_local_get(_n) __fr_thread_local_get_##_n()
++# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f)
++# define fr_thread_local_set(_n, _v) ((int)!((_n = _v) || 1))
++# define fr_thread_local_get(_n) _n
+ #endif
+ #endif
+--
+2.10.2
+
diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch
new file mode 100644
index 000000000..d29b2ac39
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch
@@ -0,0 +1,236 @@
+From d8e251ef97869ab2c1c82bd374016f402083997c Mon Sep 17 00:00:00 2001
+From: Jorge Pereira <jpereiran@gmail.com>
+Date: Mon, 7 Dec 2015 16:51:07 -0200
+Subject: [PATCH] Fixing issues related to m4 include path
+
+Upstream-Status: Submitted [1]
+
+[1]: https://github.com/FreeRADIUS/freeradius-server/pull/1428
+
+Submmited by: Jorge Pereira <jpereiran@gmail.com>
+---
+ src/modules/rlm_example/config.h.in | 39 ++--------------------
+ src/modules/rlm_ldap/configure | 2 +-
+ src/modules/rlm_pam/config.h.in | 3 ++
+ src/modules/rlm_perl/config.h.in | 3 ++
+ src/modules/rlm_perl/configure.ac | 2 +-
+ src/modules/rlm_radutmp/config.h.in | 3 ++
+ src/modules/rlm_ruby/configure | 1 +
+ src/modules/rlm_ruby/configure.ac | 9 ++---
+ src/modules/rlm_smsotp/config.h.in | 3 ++
+ .../rlm_sql/drivers/rlm_sql_mysql/config.h.in | 3 ++
+ src/modules/rlm_unix/config.h.in | 6 ++++
+ 11 files changed, 32 insertions(+), 42 deletions(-)
+
+diff --git a/src/modules/rlm_example/config.h.in b/src/modules/rlm_example/config.h.in
+index 2a81ef5..f80de9c 100644
+--- a/src/modules/rlm_example/config.h.in
++++ b/src/modules/rlm_example/config.h.in
+@@ -1,38 +1,5 @@
+ /* config.h.in. Generated from configure.ac by autoheader. */
+
+-/* Define to 1 if you have the <inttypes.h> header file. */
+-#undef HAVE_INTTYPES_H
+-
+-/* Define to 1 if you have the <memory.h> header file. */
+-#undef HAVE_MEMORY_H
+-
+-/* Define to 1 if you have the `printf' function. */
+-#undef HAVE_PRINTF
+-
+-/* Define to 1 if you have the <stdint.h> header file. */
+-#undef HAVE_STDINT_H
+-
+-/* Define to 1 if you have the <stdio.h> header file. */
+-#undef HAVE_STDIO_H
+-
+-/* Define to 1 if you have the <stdlib.h> header file. */
+-#undef HAVE_STDLIB_H
+-
+-/* Define to 1 if you have the <strings.h> header file. */
+-#undef HAVE_STRINGS_H
+-
+-/* Define to 1 if you have the <string.h> header file. */
+-#undef HAVE_STRING_H
+-
+-/* Define to 1 if you have the <sys/stat.h> header file. */
+-#undef HAVE_SYS_STAT_H
+-
+-/* Define to 1 if you have the <sys/types.h> header file. */
+-#undef HAVE_SYS_TYPES_H
+-
+-/* Define to 1 if you have the <unistd.h> header file. */
+-#undef HAVE_UNISTD_H
+-
+ /* Define to the address where bug reports for this package should be sent. */
+ #undef PACKAGE_BUGREPORT
+
+@@ -45,8 +12,8 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+-
+-/* Define to 1 if you have the ANSI C header files. */
+-#undef STDC_HEADERS
+diff --git a/src/modules/rlm_ldap/configure b/src/modules/rlm_ldap/configure
+index e0c15d9..cdf96d5 100755
+--- a/src/modules/rlm_ldap/configure
++++ b/src/modules/rlm_ldap/configure
+@@ -3992,7 +3992,7 @@ smart_prefix=
+ $as_echo "#define WITH_SASL 1" >>confdefs.h
+
+ SASL=sasl.c
+- fi
++ fi
+ fi
+
+ targetname=rlm_ldap
+diff --git a/src/modules/rlm_pam/config.h.in b/src/modules/rlm_pam/config.h.in
+index 32ef6ff..1ad20c5 100644
+--- a/src/modules/rlm_pam/config.h.in
++++ b/src/modules/rlm_pam/config.h.in
+@@ -45,6 +45,9 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+
+diff --git a/src/modules/rlm_perl/config.h.in b/src/modules/rlm_perl/config.h.in
+index 989ed53..f80de9c 100644
+--- a/src/modules/rlm_perl/config.h.in
++++ b/src/modules/rlm_perl/config.h.in
+@@ -12,5 +12,8 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+diff --git a/src/modules/rlm_perl/configure.ac b/src/modules/rlm_perl/configure.ac
+index 44c5fc9..6b2a043 100644
+--- a/src/modules/rlm_perl/configure.ac
++++ b/src/modules/rlm_perl/configure.ac
+@@ -3,7 +3,7 @@ AC_INIT(rlm_perl.c)
+ AC_REVISION($Revision$)
+ AC_DEFUN(modname,[rlm_perl])
+
+-m4_include([ax_with_prog.m4])
++m4_include([m4/ax_with_prog.m4])
+
+ if test x$with_[]modname != xno; then
+ AC_PROG_CC
+diff --git a/src/modules/rlm_radutmp/config.h.in b/src/modules/rlm_radutmp/config.h.in
+index 9a883cc..750b434 100644
+--- a/src/modules/rlm_radutmp/config.h.in
++++ b/src/modules/rlm_radutmp/config.h.in
+@@ -42,6 +42,9 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+
+diff --git a/src/modules/rlm_ruby/configure b/src/modules/rlm_ruby/configure
+index 15868ab..c728af2 100755
+--- a/src/modules/rlm_ruby/configure
++++ b/src/modules/rlm_ruby/configure
+@@ -1875,6 +1875,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
++
+ # ===========================================================================
+ # http://www.gnu.org/software/autoconf-archive/ax_compare_version.html
+ # ===========================================================================
+diff --git a/src/modules/rlm_ruby/configure.ac b/src/modules/rlm_ruby/configure.ac
+index 9306382..f1c8118 100644
+--- a/src/modules/rlm_ruby/configure.ac
++++ b/src/modules/rlm_ruby/configure.ac
+@@ -3,15 +3,16 @@ AC_INIT(rlm_ruby.c)
+ AC_REVISION($Revision: 1.9 $)
+ AC_DEFUN(modname,[rlm_ruby])
+
+-m4_include([ax_with_prog.m4])
++m4_include([m4/ax_with_prog.m4])
+
+ AC_DEFUN([AX_WITH_RUBY],[
+ AX_WITH_PROG([RUBY],[ruby],[not-found],[${PATH}:/usr/bin:/usr/local/bin])
+ ])
+
+-m4_include([ax_compare_version.m4])
+-m4_include([ax_prog_ruby_version.m4])
+-m4_include([ax_ruby_devel.m4])
++
++m4_include([m4/ax_compare_version.m4])
++m4_include([m4/ax_prog_ruby_version.m4])
++m4_include([m4/ax_ruby_devel.m4])
+
+ targetname=modname
+ mod_cflags=
+diff --git a/src/modules/rlm_smsotp/config.h.in b/src/modules/rlm_smsotp/config.h.in
+index 5feaf91..9e69f85 100644
+--- a/src/modules/rlm_smsotp/config.h.in
++++ b/src/modules/rlm_smsotp/config.h.in
+@@ -42,6 +42,9 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+
+diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in b/src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in
+index e03d1a9..6262c48 100644
+--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in
++++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/config.h.in
+@@ -18,5 +18,8 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+diff --git a/src/modules/rlm_unix/config.h.in b/src/modules/rlm_unix/config.h.in
+index dcb9aa2..70b4680 100644
+--- a/src/modules/rlm_unix/config.h.in
++++ b/src/modules/rlm_unix/config.h.in
+@@ -1,5 +1,8 @@
+ /* config.h.in. Generated from configure.ac by autoheader. */
+
++/* Define to 1 if you have the `getpwnam' function. */
++#undef HAVE_GETPWNAM
++
+ /* Define to 1 if you have the `getspnam' function. */
+ #undef HAVE_GETSPNAM
+
+@@ -54,6 +57,9 @@
+ /* Define to the one symbol short name of this package. */
+ #undef PACKAGE_TARNAME
+
++/* Define to the home page for this package. */
++#undef PACKAGE_URL
++
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+
+--
+2.3.5
+
diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch
new file mode 100644
index 000000000..b0929c4b0
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch
@@ -0,0 +1,55 @@
+Fix quoting for BUILD_WITH
+
+The escaped quotes are to make the -D values produce strings which
+can be used to display these values. However, if the values are more
+than one word, with spaces, they also need shell quoting to make them
+into single words.
+
+Upstream-Status: Pending
+
+Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/main/libfreeradius-server.mk | 2 +-
+ src/main/unittest.mk | 2 +-
+ src/modules/rlm_eap/radeapclient.mk | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/main/libfreeradius-server.mk b/src/main/libfreeradius-server.mk
+index 4495f72..07c28f1 100644
+--- a/src/main/libfreeradius-server.mk
++++ b/src/main/libfreeradius-server.mk
+@@ -18,5 +18,5 @@ SOURCES := conffile.c \
+ TGT_LDLIBS := $(OPENSSL_LIBS)
+
+ ifneq ($(MAKECMDGOALS),scan)
+-SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
++SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
+ endif
+diff --git a/src/main/unittest.mk b/src/main/unittest.mk
+index 09f3938..ed33952 100644
+--- a/src/main/unittest.mk
++++ b/src/main/unittest.mk
+@@ -21,5 +21,5 @@ TGT_PREREQS += libfreeradius-eap.a
+ endif
+
+ ifneq ($(MAKECMDGOALS),scan)
+-SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
++SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
+ endif
+diff --git a/src/modules/rlm_eap/radeapclient.mk b/src/modules/rlm_eap/radeapclient.mk
+index 6068f54..7d3c556 100644
+--- a/src/modules/rlm_eap/radeapclient.mk
++++ b/src/modules/rlm_eap/radeapclient.mk
+@@ -23,7 +23,7 @@ SRC_CFLAGS += -DWITH_EAPCLIENT
+ SRC_INCDIRS := ${top_srcdir}/src/modules/rlm_eap/libeap
+
+ ifneq ($(MAKECMDGOALS),scan)
+-SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
++SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
+ endif
+
+ endif
+--
+2.10.2
+
diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch
new file mode 100644
index 000000000..4eb61ff2e
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch
@@ -0,0 +1,89 @@
+From 56ef434e454bcc82c162a83d9bcb076d4fc72b7f Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 9 Jan 2014 14:30:26 +0800
+Subject: [PATCH] Fix libtool detection
+
+Upstream-Status: pending
+
+Use LT_INIT instead of the deprecated AC_PROG_LIBTOOL to detect libtool, so it
+can work with our libtoolize and libtool.
+
+Simplify the detection of ltdl. It will find the ltdl from the sysroot; the
+switch --with-system-libltdl is no longer needed. The code is copied from
+pulseaudio configure.ac, together with the comment paragraph.
+
+Also patch autogen.sh so it uses autoreconf, which handles libtoolize better.
+
+Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ autogen.sh | 5 +----
+ configure.ac | 36 ++++++++++++++++++++++++++++++++++++
+ 2 files changed, 37 insertions(+), 4 deletions(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index 3418673..e42c3d5 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -5,10 +5,7 @@ parentdir=`dirname $0`
+ cd $parentdir
+ parentdir=`pwd`
+
+-libtoolize -f -c
+-#aclocal
+-autoheader
+-autoconf
++autoreconf -Wcross --verbose --install --force
+
+ mysubdirs="$mysubdirs `find src/modules/ -name configure -print | sed 's%/configure%%'`"
+ mysubdirs=`echo $mysubdirs`
+diff --git a/configure.ac b/configure.ac
+index e73e4ad..066d3d7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -205,6 +205,42 @@ dnl # See if we have Git.
+ dnl #
+ AC_CHECK_PROG(GIT, git, yes, no)
+
++#### libtool stuff ####
++
++dnl set this shit so it doesn't force CFLAGS...
++LTCFLAGS=" "
++
++LT_PREREQ(2.2)
++LT_INIT([dlopen disable-static])
++
++dnl Unfortunately, even up to libtool 2.2.6a there is no way to know
++dnl exactly which version of libltdl is present in the system, so we
++dnl just assume that it's a working version as long as we have the
++dnl library and the header files.
++dnl
++dnl As an extra safety device, check for lt_dladvise_init() which is
++dnl only implemented in libtool 2.x, and refine as we go if we have
++dnl refined requirements.
++dnl
++dnl Check the header files first since the system may have a
++dnl libltdl.so for runtime, but no headers, and we want to bail out as
++dnl soon as possible.
++dnl
++dnl We don't need any special variable for this though, since the user
++dnl can give the proper place to find libltdl through the standard
++dnl variables like LDFLAGS and CPPFLAGS.
++
++AC_CHECK_HEADER([ltdl.h],
++ [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL=-lltdl], [LIBLTDL=])],
++ [LIBLTDL=])
++
++AS_IF([test "x$LIBLTDL" = "x"],
++ [AC_MSG_ERROR([Unable to find libltdl version 2. Makes sure you have libtool 2.2 or later installed.])])
++AC_SUBST([LIBLTDL])
++LTDL_SUBDIRS=
++INCLTDL=-DWITH_SYSTEM_LTDL
++AC_SUBST(LTDL_SUBDIRS)
++
+ dnl Put this in later, when all distributed modules use autoconf.
+ dnl AC_ARG_WITH(disablemodulefoo,
+ dnl [ --without-rlm_foo Disables module compilation. Module list:]
+--
+1.8.3
+
diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch
new file mode 100644
index 000000000..1954586b2
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch
@@ -0,0 +1,160 @@
+From 16bf899447fc1524ffc3c79e1d35380e5285a552 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 7 Jan 2016 22:37:30 -0800
+Subject: [PATCH] libtool: do not use jlibtool
+
+jlibtool is hardcoded to be used but we need to use
+our libtool, so fix the makfiles to make it compatible
+with our libtool.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ Make.inc.in | 4 ++--
+ scripts/boiler.mk | 2 ++
+ scripts/install.mk | 14 +++++++-------
+ scripts/libtool.mk | 22 ++++++++++++++++------
+ 4 files changed, 27 insertions(+), 15 deletions(-)
+
+diff --git a/Make.inc.in b/Make.inc.in
+index 7a77625..fd8aa3e 100644
+--- a/Make.inc.in
++++ b/Make.inc.in
+@@ -57,7 +57,7 @@ CPPFLAGS = @CPPFLAGS@
+ LIBPREFIX = @LIBPREFIX@
+ EXEEXT = @EXEEXT@
+
+-LIBTOOL = JLIBTOOL
++LIBTOOL = @LIBTOOL@
+ ACLOCAL = @ACLOCAL@
+ AUTOCONF = @AUTOCONF@
+ AUTOHEADER = @AUTOHEADER@
+@@ -163,7 +163,7 @@ ANALYZE.c := @clang_path@
+ #
+ ifeq "$(USE_SHARED_LIBS)" "yes"
+ TESTBINDIR = ./$(BUILD_DIR)/bin/local
+- TESTBIN = FR_LIBRARY_PATH=./build/lib/.libs $(JLIBTOOL) --quiet --mode=execute $(TESTBINDIR)
++ TESTBIN = FR_LIBRARY_PATH=./build/lib/.libs $(LIBTOOL) --quiet --mode=execute $(TESTBINDIR)
+ else
+ TESTBINDIR = ./$(BUILD_DIR)/bin
+ TESTBIN = ./$(BUILD_DIR)/bin
+diff --git a/scripts/boiler.mk b/scripts/boiler.mk
+index bccec5e..926a13e 100644
+--- a/scripts/boiler.mk
++++ b/scripts/boiler.mk
+@@ -266,6 +266,7 @@ define COMPILE_C_CMDS
+ $(Q)$(ECHO) CC $<
+ $(Q)$(strip ${COMPILE.c} -o $@ -c -MD ${CPPFLAGS} ${CFLAGS} ${SRC_CFLAGS} ${INCDIRS} \
+ $(addprefix -I, ${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} $<)
++ ${Q}mv $(dir $@)/.libs/$(notdir $*.d) ${BUILD_DIR}/objs/$*.d
+ endef
+ else
+ #
+@@ -281,6 +282,7 @@ define COMPILE_C_CMDS
+ $(Q)cppcheck --enable=style -q ${CHECKFLAGS} $(filter -isystem%,${SRC_CFLAGS}) \
+ $(filter -I%,${SRC_CFLAGS}) $(filter -D%,${SRC_CFLAGS}) ${INCDIRS} \
+ $(addprefix -I,${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} --suppress=variableScope --suppress=invalidscanf $<
++ ${Q}mv $(dir $@)/.libs/$(notdir $*.d) ${BUILD_DIR}/objs/$*.d
+ endef
+ endif
+
+diff --git a/scripts/install.mk b/scripts/install.mk
+index 9164115..e38c1ed 100644
+--- a/scripts/install.mk
++++ b/scripts/install.mk
+@@ -46,7 +46,7 @@ define ADD_INSTALL_RULE.exe
+ install: $${${1}_INSTALLDIR}/$(notdir ${1})
+
+ # Install executable ${1}
+- $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
++ $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
+ @$(ECHO) INSTALL ${1}
+ $(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/bin/${1} $${${1}_INSTALLDIR}/
+ $(Q)$${${1}_POSTINSTALL}
+@@ -65,7 +65,7 @@ define ADD_INSTALL_RULE.a
+ install: $${${1}_INSTALLDIR}/$(notdir ${1})
+
+ # Install static library ${1}
+- $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} ${1} | $${${1}_INSTALLDIR}
++ $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} ${1} | $${${1}_INSTALLDIR}
+ @$(ECHO) INSTALL ${1}
+ $(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
+ $(Q)$${${1}_POSTINSTALL}
+@@ -87,9 +87,9 @@ define ADD_INSTALL_RULE.la
+ install: $${${1}_INSTALLDIR}/$(notdir ${1})
+
+ # Install libtool library ${1}
+- $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
++ $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
+ @$(ECHO) INSTALL ${1}
+- $(Q)$${PROGRAM_INSTALL} -c -m 755 $${LOCAL_FLAGS_MIN} $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
++ $(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
+ $(Q)$${${1}_POSTINSTALL}
+
+ endef
+@@ -107,7 +107,7 @@ define ADD_INSTALL_RULE.man
+ install: ${2}/$(notdir ${1})
+
+ # Install manual page ${1}
+- ${2}/$(notdir ${1}): ${JLIBTOOL} ${1} | ${2}
++ ${2}/$(notdir ${1}): ${LIBTOOL} ${1} | ${2}
+ @$(ECHO) INSTALL $(notdir ${1})
+ $(Q)$${PROGRAM_INSTALL} -c -m 644 ${1} ${2}/
+
+@@ -122,9 +122,9 @@ endef
+ define ADD_INSTALL_RULE.dir
+ # Install directory
+ .PHONY: ${1}
+- ${1}: ${JLIBTOOL}
++ ${1}: ${LIBTOOL}
+ @$(ECHO) INSTALL -d -m 755 ${1}
+- $(Q)$${PROGRAM_INSTALL} -d -m 755 ${1}
++ $(Q)$${INSTALL} -d -m 755 ${1}
+ endef
+
+
+diff --git a/scripts/libtool.mk b/scripts/libtool.mk
+index 57915e1..2cb2f7d 100644
+--- a/scripts/libtool.mk
++++ b/scripts/libtool.mk
+@@ -55,7 +55,9 @@ ifeq "${LIBTOOL}" "JLIBTOOL"
+ # Tell GNU Make to use this value, rather than anything specified
+ # on the command line.
+ override LIBTOOL := ${JLIBTOOL}
+-endif # else we're not using jlibtool
++else # else we're not using jlibtool
++ all install: ${LIBTOOL}
++endif
+
+ # When using libtool, it produces a '.libs' directory. Ensure that it
+ # is removed on "make clean", too.
+@@ -69,11 +71,19 @@ clean: .libs_clean
+ # Re-define compilers and linkers
+ #
+ OBJ_EXT = lo
+-COMPILE.c = ${LIBTOOL} --silent --mode=compile ${CC}
+-COMPILE.cxx = ${LIBTOOL} --mode=compile ${CXX}
+-LINK.c = ${LIBTOOL} --silent --mode=link ${CC}
+-LINK.cxx = ${LIBTOOL} --mode=link ${CXX}
+-PROGRAM_INSTALL = ${LIBTOOL} --silent --mode=install ${INSTALL}
++ifeq "${LIBTOOL}" "JLIBTOOL"
++ COMPILE.c = ${LIBTOOL} --silent --mode=compile ${CC}
++ COMPILE.cxx = ${LIBTOOL} --mode=compile ${CXX}
++ LINK.c = ${LIBTOOL} --silent --mode=link ${CC}
++ LINK.cxx = ${LIBTOOL} --mode=link ${CXX}
++ PROGRAM_INSTALL = ${LIBTOOL} --silent --mode=install ${INSTALL}
++else
++ COMPILE.c = ${LIBTOOL} --mode=compile --tag=CC ${CC}
++ COMPILE.cxx = ${LIBTOOL} --mode=compile --tag=CC ${CXX}
++ LINK.c = ${LIBTOOL} --mode=link --tag=CC ${CC} -module -export-dynamic
++ LINK.cxx = ${LIBTOOL} --mode=link --tag=CC ${CXX} -module -export-dynamic
++ PROGRAM_INSTALL = ${LIBTOOL} --mode=install ${INSTALL}
++endif
+
+
+ # LIBTOOL_ENDINGS - Given a library ending in ".a" or ".so", replace that
+--
+2.10.2
+
diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch
new file mode 100644
index 000000000..675940dd6
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch
@@ -0,0 +1,33 @@
+From a0bf65e04d2bbd3271cab94bd5ac93f8e877bfc5 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 27 Jan 2016 05:07:19 -0500
+Subject: [PATCH] rlm_python: add PY_INC_DIR in search dir
+
+Upstream-Status: Pending
+
+configure option --with-rlm-python-include-dir is used to set
+PY_INC_DIR which is never used and it fails to find Python.h,
+so add it into search dir to fix it.
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ src/modules/rlm_python/configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/modules/rlm_python/configure.ac b/src/modules/rlm_python/configure.ac
+index 831a33a..c3792d8 100644
+--- a/src/modules/rlm_python/configure.ac
++++ b/src/modules/rlm_python/configure.ac
+@@ -93,7 +93,7 @@ if test x$with_[]modname != xno; then
+
+ old_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $PY_CFLAGS"
+- smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION"
++ smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION $PY_INC_DIR"
+ FR_SMART_CHECK_INCLUDE(Python.h)
+ CFLAGS=$old_CFLAGS
+
+--
+2.10.2
+
diff --git a/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf b/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf
new file mode 100644
index 000000000..fa6296297
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf
@@ -0,0 +1,2 @@
+d /var/log/radius 0755 radiusd radiusd -
+d /var/run/radiusd 0755 radiusd radiusd -
diff --git a/meta-networking/recipes-connectivity/freeradius/files/radiusd.service b/meta-networking/recipes-connectivity/freeradius/files/radiusd.service
new file mode 100644
index 000000000..899c4e495
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/radiusd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=FreeRADIUS high performance RADIUS server.
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=@STATEDIR@/run/radiusd/radiusd.pid
+ExecStartPre=-@BASE_BINDIR@/chown -R radiusd.radiusd @STATEDIR@/run/radiusd
+ExecStartPre=-@BASE_BINDIR@/sh -c "if [ ! -f @SYSCONFDIR@/raddb/certs/server.pem ]; then sudo -u radiusd @SYSCONFDIR@/raddb/certs/bootstrap; fi"
+ExecStartPre=@SBINDIR@/radiusd -C
+ExecStart=@SBINDIR@/radiusd -d @SYSCONFDIR@/raddb
+ExecReload=@SBINDIR@/radiusd -C
+ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd b/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd
new file mode 100644
index 000000000..8cbdae8a6
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/files/volatiles.58_radiusd
@@ -0,0 +1,3 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d radiusd radiusd 0755 /var/run/radiusd none
+d radiusd radiusd 0755 /var/log/radius none
diff --git a/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.12.bb b/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.12.bb
new file mode 100644
index 000000000..e46a8ba08
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.12.bb
@@ -0,0 +1,223 @@
+DESCRIPTION = "FreeRADIUS is an Internet authentication daemon, which implements the RADIUS \
+protocol, as defined in RFC 2865 (and others). It allows Network Access \
+Servers (NAS boxes) to perform authentication for dial-up users. There are \
+also RADIUS clients available for Web servers, firewalls, Unix logins, and \
+more. Using RADIUS allows authentication and authorization for a network to \
+be centralized, and minimizes the amount of re-configuration which has to be \
+done when adding or deleting new users."
+
+SUMMARY = "High-performance and highly configurable RADIUS server"
+HOMEPAGE = "http://www.freeradius.org/"
+SECTION = "System/Servers"
+LICENSE = "GPLv2 & LGPLv2+"
+DEPENDS = "openssl-native openssl libtool libpcap libtalloc"
+
+SRC_URI = "ftp://ftp.freeradius.org/pub/freeradius/old/freeradius-server-${PV}.tar.bz2 \
+ file://freeradius \
+ file://volatiles.58_radiusd \
+ file://freeradius-enble-user-in-conf.patch \
+ file://freeradius-configure.ac-allow-cross-compilation.patch \
+ file://freeradius-fix-issues-related-to-m4-include-path.patch \
+ file://freeradius-libtool-detection.patch \
+ file://freeradius-configure.ac-add-option-for-libcap.patch \
+ file://freeradius-avoid-searching-host-dirs.patch \
+ file://freeradius-rlm_python-add-PY_INC_DIR.patch \
+ file://freeradius-libtool-do-not-use-jlibtool.patch \
+ file://freeradius-fix-quoting-for-BUILT_WITH.patch \
+ file://freeradius-fix-error-for-expansion-of-macro.patch \
+ file://radiusd.service \
+ file://radiusd-volatiles.conf \
+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
+SRC_URI[md5sum] = "108a5c12cff8d92b0f905c74841e29c5"
+SRC_URI[sha256sum] = "fe4e1f52cc2873f6aee2b12b0f03236978e4632f2acf298f834686b240c4183d"
+
+PARALLEL_MAKE = ""
+
+S = "${WORKDIR}/freeradius-server-${PV}"
+
+EXTRA_OECONF = " --enable-strict-dependencies \
+ --with-docdir=${docdir}/freeradius-${PV} \
+ --with-openssl-includes=${STAGING_INCDIR} \
+ --with-openssl-libraries=${STAGING_LIBDIR} \
+ --without-rlm_ippool \
+ --without-rlm_cache_memcached \
+ --without-rlm_counter \
+ --without-rlm_couchbase \
+ --without-rlm_dbm \
+ --without-rlm_eap_tnc \
+ --without-rlm_eap_ikev2 \
+ --without-rlm_opendirectory \
+ --without-rlm_redis \
+ --without-rlm_rediswho \
+ --without-rlm_sql_db2 \
+ --without-rlm_sql_firebird \
+ --without-rlm_sql_freetds \
+ --without-rlm_sql_iodbc \
+ --without-rlm_sql_oracle \
+ --without-rlm_sql_sybase \
+ --without-rlm_sqlhpwippool \
+ --without-dhcp \
+ ac_cv_path_PERL=${bindir}/perl \
+ ax_cv_cc_builtin_choose_expr=no \
+ ax_cv_cc_builtin_types_compatible_p=no \
+ ax_cv_cc_builtin_bswap64=no \
+ ax_cv_cc_bounded_attribute=no \
+"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+ pcre libcap \
+"
+
+PACKAGECONFIG[krb5] = "--with-rlm_krb5,--without-rlm_krb5,krb5"
+PACKAGECONFIG[pam] = "--with-rlm_pam,--without-rlm_pam,libpam"
+PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
+PACKAGECONFIG[ldap] = "--with-rlm_ldap,--without-rlm_ldap,openldap"
+PACKAGECONFIG[mysql] = "--with-rlm_sql_mysql,--without-rlm_sql_mysql,mysql5"
+PACKAGECONFIG[sqlite] = "--with-rlm_sql_sqlite,--without-rlm_sql_sqlite,sqlite3"
+PACKAGECONFIG[unixodbc] = "--with-rlm_sql_unixodbc,--without-rlm_sql_unixodbc,unixodbc"
+PACKAGECONFIG[postgresql] = "--with-rlm_sql_postgresql,--without-rlm_sql_postgresql,postgresql"
+PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
+PACKAGECONFIG[perl] = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl --with-rlm_perl,--without-rlm_perl,perl-native perl,perl"
+PACKAGECONFIG[python] = "--with-rlm_python --with-rlm-python-bin=${STAGING_BINDIR_NATIVE}/python-native/python --with-rlm-python-include-dir=${STAGING_INCDIR}/${PYTHON_DIR},--without-rlm_python,python-native python"
+PACKAGECONFIG[rest] = "--with-rlm_rest,--without-rlm_rest,curl json-c"
+PACKAGECONFIG[ruby] = "--with-rlm_ruby,--without-rlm_ruby,ruby"
+
+inherit useradd autotools-brokensep update-rc.d systemd
+
+# This is not a cpan or python based package, but it needs some definitions
+# from cpan-base and python-dir bbclasses for building rlm_perl and rlm_python
+# correctly.
+inherit cpan-base python-dir
+
+# The modules subdirs also need to be processed by autoreconf. Use autogen.sh
+# in order to handle the subdirs correctly.
+do_configure () {
+ ./autogen.sh
+
+ # the configure of rlm_perl needs this to get correct
+ # mod_cflags and mod_ldflags
+ if ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'true', 'false', d)}; then
+ export PERL5LIB="${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
+ fi
+
+ oe_runconf
+
+ # we don't need dhcpclient
+ sed -i -e 's/dhcpclient.mk//' ${S}/src/modules/proto_dhcp/all.mk
+}
+
+INITSCRIPT_NAME = "radiusd"
+
+SYSTEMD_SERVICE_${PN} = "radiusd.service"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false --user-group radiusd"
+
+do_install() {
+ rm -rf ${D}
+ mkdir -p ${D}/${sysconfdir}/logrotate.d
+ mkdir -p ${D}/${sysconfdir}/pam.d
+ mkdir -p ${D}/${sysconfdir}/init.d
+ mkdir -p ${D}/${localstatedir}/lib/radiusd
+ mkdir -p ${D}${sysconfdir}/default/volatiles
+
+ export LD_LIBRARY_PATH=${D}/${libdir}
+ oe_runmake install R=${D} INSTALLSTRIP=""
+
+ # remove unsupported config files
+ rm -f ${D}/${sysconfdir}/raddb/experimental.conf
+
+ # remove scripts that required Perl(DBI)
+ rm -rf ${D}/${bindir}/radsqlrelay
+
+ cp -f ${WORKDIR}/freeradius ${D}/etc/init.d/radiusd
+ rm -f ${D}/${sbindir}/rc.radiusd
+ chmod +x ${D}/${sysconfdir}/init.d/radiusd
+ rm -rf ${D}/${localstatedir}/run/
+ install -m 0644 ${WORKDIR}/volatiles.58_radiusd ${D}${sysconfdir}/default/volatiles/58_radiusd
+
+ chown -R radiusd:radiusd ${D}/${sysconfdir}/raddb/
+ chown -R radiusd:radiusd ${D}/${localstatedir}/lib/radiusd
+
+ # For systemd
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/radiusd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@STATEDIR@,${localstatedir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ ${D}${systemd_unitdir}/system/radiusd.service
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d/
+ install -m 0644 ${WORKDIR}/radiusd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/
+ fi
+}
+
+# This is only needed when we install/update on a running target.
+#
+pkg_postinst_${PN} () {
+ if [ -z "$D" ]; then
+ if command -v systemd-tmpfiles >/dev/null; then
+ # create /var/log/radius, /var/run/radiusd
+ systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/radiusd-volatiles.conf
+ elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+ ${sysconfdir}/init.d/populate-volatile.sh update
+ fi
+
+ # Fix ownership for /etc/raddb/*, /var/lib/radiusd
+ chown -R radiusd:radiusd ${sysconfdir}/raddb
+ chown -R radiusd:radiusd ${localstatedir}/lib/radiusd
+ fi
+}
+
+# We really need the symlink :(
+INSANE_SKIP_${PN} = "dev-so"
+INSANE_SKIP_${PN}-krb5 = "dev-so"
+INSANE_SKIP_${PN}-ldap = "dev-so"
+INSANE_SKIP_${PN}-mysql = "dev-so"
+INSANE_SKIP_${PN}-perl = "dev-so"
+INSANE_SKIP_${PN}-postgresql = "dev-so"
+INSANE_SKIP_${PN}-python = "dev-so"
+INSANE_SKIP_${PN}-unixodbc = "dev-so"
+
+PACKAGES =+ "${PN}-utils ${PN}-ldap ${PN}-krb5 ${PN}-perl \
+ ${PN}-python ${PN}-mysql ${PN}-postgresql ${PN}-unixodbc"
+
+FILES_${PN}-utils = "${bindir}/*"
+
+FILES_${PN}-ldap = "${libdir}/rlm_ldap.so* \
+ ${sysconfdir}/raddb/mods-available/ldap \
+"
+
+FILES_${PN}-krb5 = "${libdir}/rlm_krb5.so* \
+ ${sysconfdir}/raddb/mods-available/krb5 \
+"
+
+FILES_${PN}-perl = "${libdir}/rlm_perl.so* \
+ ${sysconfdir}/raddb/mods-config/perl \
+ ${sysconfdir}/raddb/mods-available/perl \
+"
+
+FILES_${PN}-python = "${libdir}/rlm_python.so* \
+ ${sysconfdir}/raddb/mods-config/python \
+ ${sysconfdir}/raddb/mods-available/python \
+"
+
+FILES_${PN}-mysql = "${libdir}/rlm_sql_mysql.so* \
+ ${sysconfdir}/raddb/mods-config/sql/*/mysql \
+ ${sysconfdir}/raddb/mods-available/sql \
+"
+
+FILES_${PN}-postgresql = "${libdir}/rlm_sql_postgresql.so* \
+ ${sysconfdir}/raddb/mods-config/sql/*/postgresql \
+"
+
+FILES_${PN}-unixodbc = "${libdir}/rlm_sql_unixodbc.so*"
+
+FILES_${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*"
+
+RDEPENDS_${PN} += "perl"
+RDEPENDS_${PN}-utils = "${PN}"
--
2.11.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [meta-perl][PATCH 3/8] libnet-ldap-perl: add new recipe
2017-04-26 6:57 [PATCH 0/8] ipmi/hpi/radius: add new recipes and related packages jackie.huang
2017-04-26 6:57 ` [meta-networking][PATCH 1/8] openhpi: add new recipe jackie.huang
2017-04-26 6:57 ` [meta-networking][PATCH 2/8] freeradius: " jackie.huang
@ 2017-04-26 6:57 ` jackie.huang
2017-04-26 6:57 ` [meta-perl][PATCH 4/8] libdata-hexdump-perl: " jackie.huang
` (4 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: jackie.huang @ 2017-04-26 6:57 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
Net::LDAP is a collection of modules that implements
a LDAP services API for Perl programs.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../recipes-perl/libnet/libnet-ldap-perl_0.65.bb | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 meta-perl/recipes-perl/libnet/libnet-ldap-perl_0.65.bb
diff --git a/meta-perl/recipes-perl/libnet/libnet-ldap-perl_0.65.bb b/meta-perl/recipes-perl/libnet/libnet-ldap-perl_0.65.bb
new file mode 100644
index 000000000..f2b1f1634
--- /dev/null
+++ b/meta-perl/recipes-perl/libnet/libnet-ldap-perl_0.65.bb
@@ -0,0 +1,29 @@
+SUMMARY = "LDAP Perl module"
+DESCRIPTION = "Net::LDAP is a collection of modules that implements \
+a LDAP services API for Perl programs. The module may be used to \
+search directories or perform maintenance functions such as adding, \
+deleting or modifying entries."
+
+SECTION = "libs"
+
+LICENSE = "Artistic-1.0|GPLv1+"
+LIC_FILES_CHKSUM = "file://README;beginline=3;endline=5;md5=4d6588c2fa0d38ae162f6314d201d89e"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/M/MA/MARSCHAP/perl-ldap-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "d057c8db76913d95c0e460c7bdd98b27"
+SRC_URI[sha256sum] = "5f57dd261dc16ebf942a272ddafe69526598df71151a51916edc37a4f2f23834"
+
+S = "${WORKDIR}/perl-ldap-${PV}"
+
+inherit cpan
+
+do_configure_prepend() {
+ perl -pi -e 's/auto_install_now.*//g' Makefile.PL
+}
+
+RDEPENDS_${PN} = "perl \
+ libconvert-asn1-perl \
+ libio-socket-ssl-perl \
+ libauthen-sasl-perl \
+"
--
2.11.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [meta-perl][PATCH 4/8] libdata-hexdump-perl: add new recipe
2017-04-26 6:57 [PATCH 0/8] ipmi/hpi/radius: add new recipes and related packages jackie.huang
` (2 preceding siblings ...)
2017-04-26 6:57 ` [meta-perl][PATCH 3/8] libnet-ldap-perl: " jackie.huang
@ 2017-04-26 6:57 ` jackie.huang
2017-04-26 6:57 ` [meta-perl][PATCH 5/8] libnet-telnet-perl: " jackie.huang
` (3 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: jackie.huang @ 2017-04-26 6:57 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
Data::HexDump - Hexadecial Dumper module for perl.
It's required by libauthen-radius-perl.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
meta-perl/recipes-perl/libdata/files/run-ptest | 16 +++++++++++
.../libdata/libdata-hexdump-perl_0.02.bb | 33 ++++++++++++++++++++++
2 files changed, 49 insertions(+)
create mode 100644 meta-perl/recipes-perl/libdata/files/run-ptest
create mode 100644 meta-perl/recipes-perl/libdata/libdata-hexdump-perl_0.02.bb
diff --git a/meta-perl/recipes-perl/libdata/files/run-ptest b/meta-perl/recipes-perl/libdata/files/run-ptest
new file mode 100644
index 000000000..c9f9ca94d
--- /dev/null
+++ b/meta-perl/recipes-perl/libdata/files/run-ptest
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+for case in `find t -type f -name '*.t'`; do
+ perl $case >$case.output 2>&1
+ ret=$?
+ cat $case.output
+ if [ $ret -ne 0 ]; then
+ echo "FAIL: ${case%.t}"
+ elif grep -i 'SKIP' $case.output; then
+ echo "SKIP: ${case%.t}"
+ else
+ echo "PASS: ${case%.t}"
+ fi
+
+ rm -f $case.output
+done
diff --git a/meta-perl/recipes-perl/libdata/libdata-hexdump-perl_0.02.bb b/meta-perl/recipes-perl/libdata/libdata-hexdump-perl_0.02.bb
new file mode 100644
index 000000000..6ab5a4204
--- /dev/null
+++ b/meta-perl/recipes-perl/libdata/libdata-hexdump-perl_0.02.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Data::HexDump - Hexadecial Dumper"
+DESCRIPTION = "Dump in hexadecimal the content of a scalar. The result \
+is returned in a string. Each line of the result consists of the offset \
+in the source in the leftmost column of each line, followed by one or \
+more columns of data from the source in hexadecimal. The rightmost column \
+of each line shows the printable characters \
+(all others are shown as single dots).\
+"
+
+HOMEPAGE = "http://search.cpan.org/~ftassin/Data-HexDump-0.02/lib/Data/HexDump.pm"
+SECTION = "libs"
+
+LICENSE = "Artistic-1.0"
+LIC_FILES_CHKSUM = "file://lib/Data/HexDump.pm;beginline=215;endline=217;md5=bf1cd9373f8d1f85fe091ee069a480e9"
+
+DEPENDS = "perl"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/F/FT/FTASSIN/Data-HexDump-${PV}.tar.gz \
+ file://run-ptest \
+"
+SRC_URI[md5sum] = "467b7183d1062ab4a502b50c34e7d67f"
+SRC_URI[sha256sum] = "1a9d843e7f667c1c6f77c67af5d77e7462ff23b41937cb17454d03535cd9be70"
+
+S = "${WORKDIR}/Data-HexDump-${PV}"
+
+inherit cpan ptest
+
+do_install_ptest () {
+ install -d ${D}${PTEST_PATH}/t
+ install -m 0755 ${B}/t/* ${D}${PTEST_PATH}/t
+}
+
+BBCLASSEXTEND = "native"
--
2.11.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [meta-perl][PATCH 5/8] libnet-telnet-perl: add new recipe
2017-04-26 6:57 [PATCH 0/8] ipmi/hpi/radius: add new recipes and related packages jackie.huang
` (3 preceding siblings ...)
2017-04-26 6:57 ` [meta-perl][PATCH 4/8] libdata-hexdump-perl: " jackie.huang
@ 2017-04-26 6:57 ` jackie.huang
2017-04-26 6:57 ` [meta-perl][PATCH 6/8] libauthen-radius-perl: " jackie.huang
` (2 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: jackie.huang @ 2017-04-26 6:57 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
Net-Telnet Perl module, it allows you to make client
connections to a TCP port and do network I/O, especially
to a port using the TELNET protocol.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../recipes-perl/libnet/libnet-telnet-perl_3.04.bb | 25 ++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 meta-perl/recipes-perl/libnet/libnet-telnet-perl_3.04.bb
diff --git a/meta-perl/recipes-perl/libnet/libnet-telnet-perl_3.04.bb b/meta-perl/recipes-perl/libnet/libnet-telnet-perl_3.04.bb
new file mode 100644
index 000000000..652e8c941
--- /dev/null
+++ b/meta-perl/recipes-perl/libnet/libnet-telnet-perl_3.04.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Net-Telnet Perl module"
+DESCRIPTION = "Net::Telnet allows you to make client connections to a TCP port and do \
+network I/O, especially to a port using the TELNET protocol. Simple I/O \
+methods such as print, get, and getline are provided. More sophisticated \
+interactive features are provided because connecting to a TELNET port \
+ultimately means communicating with a program designed for human interaction. \
+These interactive features include the ability to specify a time-out and to \
+wait for patterns to appear in the input stream, such as the prompt from a \
+shell."
+
+HOMEPAGE = "http://search.cpan.org/dist/Net-Telnet/"
+SECTION = "Development/Libraries"
+
+LICENSE = "Artistic-1.0|GPLv1+"
+LIC_FILES_CHKSUM = "file://README;beginline=4;endline=7;md5=3fd238bfb6ee1810cb15d5d95e07b0f5"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/J/JR/JROGERS/Net-Telnet-${PV}.tar.gz"
+SRC_URI[md5sum] = "d2514080116c1b0fa5f96295c84538e3"
+SRC_URI[sha256sum] = "e64d567a4e16295ecba949368e7a6b8b5ae2a16b3ad682121d9b007dc5d2a37a"
+
+S = "${WORKDIR}/Net-Telnet-${PV}"
+
+inherit cpan
+
+RDEPENDS_${PN} = "perl"
--
2.11.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [meta-perl][PATCH 6/8] libauthen-radius-perl: add new recipe
2017-04-26 6:57 [PATCH 0/8] ipmi/hpi/radius: add new recipes and related packages jackie.huang
` (4 preceding siblings ...)
2017-04-26 6:57 ` [meta-perl][PATCH 5/8] libnet-telnet-perl: " jackie.huang
@ 2017-04-26 6:57 ` jackie.huang
2017-04-26 6:57 ` [meta-oe][PATCH 7/8] openipmi: " jackie.huang
2017-04-26 6:57 ` [meta-oe][PATCH 8/8] ipmitool: " jackie.huang
7 siblings, 0 replies; 11+ messages in thread
From: jackie.huang @ 2017-04-26 6:57 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
The Authen::Radius module provides a simple class that
allows you to send/receive Radius requests/responses
to/from a Radius server.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../libauthen/libauthen-radius-perl/run-ptest | 21 +++++
.../test.pl-adjust-for-ptest.patch | 90 ++++++++++++++++++++++
.../libauthen/libauthen-radius-perl_0.22.bb | 39 ++++++++++
3 files changed, 150 insertions(+)
create mode 100644 meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest
create mode 100644 meta-perl/recipes-perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch
create mode 100644 meta-perl/recipes-perl/libauthen/libauthen-radius-perl_0.22.bb
diff --git a/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest b/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest
new file mode 100644
index 000000000..f1c833e6c
--- /dev/null
+++ b/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+
+# prepare testing config
+CONF_USERS=`readlink -f /etc/raddb/users`
+mv ${CONF_USERS} ${CONF_USERS}_orig
+echo "testing Cleartext-Password := \"testpassword\"" > ${CONF_USERS}
+cat ${CONF_USERS}_orig >> ${CONF_USERS}
+
+# restart radiusd server
+systemctl restart radiusd || /etc/init.d/radiusd restart || {
+ echo "FAIL: Start radiusd service."
+ exit 1
+}
+
+# run teests
+perl test.pl
+
+# restore the config and restart
+mv ${CONF_USERS}_orig ${CONF_USERS}
+systemctl restart radiusd || /etc/init.d/radiusd restart
diff --git a/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch b/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch
new file mode 100644
index 000000000..9798af497
--- /dev/null
+++ b/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch
@@ -0,0 +1,90 @@
+From 829302792bf0e4935d29efc23ca1f2e9e7ee7dfd Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 7 Jan 2016 03:12:38 -0500
+Subject: [PATCH] test.pl: adjust for ptest
+
+* Don't use interactive inputs, set default test
+ settings instead.
+* Change the test results output to the ptest format
+
+Upstream-Status: Inappropriate [OE ptest specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ test.pl | 31 ++++++++++++++++++-------------
+ 1 file changed, 18 insertions(+), 13 deletions(-)
+
+diff --git a/test.pl b/test.pl
+index cfd1c1e..9b4f10e 100644
+--- a/test.pl
++++ b/test.pl
+@@ -7,11 +7,11 @@
+ # Change 1..1 below to 1..last_test_to_print .
+ # (It may become useful if the test is moved to ./t subdirectory.)
+
+-BEGIN {print "1..5\n";}
+-END {print "not ok 1\n" unless $loaded;}
++BEGIN {print "Start testing for libauthen-radius-perl\n";}
++END {print "\nFAIL: test1\n" unless $loaded;}
+ use Authen::Radius;
+ $loaded = 1;
+-print "ok 1\n";
++print "\nPASS: test1\n";
+
+ ######################### End of black magic.
+
+@@ -19,26 +19,31 @@ print "ok 1\n";
+ # (correspondingly "not ok 13") depending on the success of chunk 13
+ # of the test code):
+
++$host = "127.0.0.1";
++$secret = "testing123";
++$user = "testing";
++$pwd = "testpassword";
++
+ print "Make sure this machine is in your Radius clients file!\n";
+-print "Enter hostname[:port] of your Radius server: "; chomp ($host = <STDIN>);
+-print "Enter shared-secret of your Radius server: "; chomp ($secret = <STDIN>);
+-print "Enter a username to be validated: "; chomp ($user = <STDIN>);
+-print "Enter this user's password: "; chomp ($pwd = <STDIN>);
++print "hostname of your Radius server: $host\n";
++print "shared-secret of your Radius server: $secret\n";
++print "The username to be validated: $user\n";
++print "The user's password: $pwd\n";
+
+ $t = 2;
+ if ($host ne '') {
+ $r = new Authen::Radius(Host => $host, Secret => $secret, Debug => 1);
+- print defined($r) ? "" : "not ", "ok $t\n"; $t++;
++ print defined($r) ? "\nPASS: test$t\n" : "\nFAIL: test$t\n"; $t++;
+ #Authen::Radius->load_dictionary;
+- print $r->check_pwd($user, $pwd) ? "" : "not ", "ok $t\n"; $t++;
++ print $r->check_pwd($user, $pwd) ? "\nPASS: test$t\n" : "\nFAIL: test$t\n"; $t++;
+ @a = $r->get_attributes;
+- print $#a != -1 ? "" : "not ", "ok $t\n"; $t++;
++ print $#a != -1 ? "\nPASS: test$t\n" : "\nFAIL: test$t\n"; $t++;
+ #for $a (@a) {
+ # print "attr: name=$a->{'Name'} value=$a->{'Value'}\n";
+ #}
+ } else {
+ foreach my $t (2..4) {
+- print "skipped $t\n";
++ print "\nSKIP test$t\n";
+ }
+ }
+
+@@ -53,9 +58,9 @@ my $data = "what do ya want for nothing?";
+ my $etalon_digest = hex_to_ascii("750c783e6ab0b503eaa86e310a5db738");
+ my $digest = Authen::Radius::hmac_md5(undef, $data, $key);
+ if ($etalon_digest eq $digest) {
+- print "ok 5\n";
++ print "\nPASS: test5\n";
+ } else {
+- print "not ok 5\n";
++ print "\nFAIL: test5\n";
+ }
+
+ exit;
+--
+1.9.1
+
diff --git a/meta-perl/recipes-perl/libauthen/libauthen-radius-perl_0.22.bb b/meta-perl/recipes-perl/libauthen/libauthen-radius-perl_0.22.bb
new file mode 100644
index 000000000..ea5bb1b0c
--- /dev/null
+++ b/meta-perl/recipes-perl/libauthen/libauthen-radius-perl_0.22.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Authen::Radius - provide simple Radius client facilities"
+DESCRIPTION = "The Authen::Radius module provides a simple class that \
+ allows you to send/receive Radius requests/responses to/from a \
+ Radius server. \
+"
+
+HOMEPAGE = "http://search.cpan.org/~manowar/RadiusPerl"
+SECTION = "libs"
+
+LICENSE = "Artistic-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=78ab6ea0cba1f1ec1680ebb149e3bc11"
+
+DEPENDS = "perl"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/M/MA/MANOWAR/RadiusPerl-${PV}.tar.gz \
+ file://test.pl-adjust-for-ptest.patch \
+ file://run-ptest \
+"
+SRC_URI[md5sum] = "d1fe2d6ecf7ea99299e4e3a8f945aad8"
+SRC_URI[sha256sum] = "3b276506986ccaa4949d92b13ce053a0017ad11562a991cc753364923fe81ca7"
+
+S = "${WORKDIR}/Authen-Radius-${PV}"
+
+inherit cpan ptest
+
+do_install_ptest() {
+ install -m 0755 ${S}/test.pl ${D}${PTEST_PATH}
+}
+
+RDEPENDS_${PN} += "\
+ libdata-hexdump-perl \
+ perl-module-digest-md5 \
+ perl-module-data-dumper \
+ perl-module-io-select \
+ perl-module-io-socket \
+"
+RDEPENDS_${PN}-ptest += "${PN} freeradius"
+
+BBCLASSEXTEND = "native"
--
2.11.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [meta-oe][PATCH 7/8] openipmi: add new recipe
2017-04-26 6:57 [PATCH 0/8] ipmi/hpi/radius: add new recipes and related packages jackie.huang
` (5 preceding siblings ...)
2017-04-26 6:57 ` [meta-perl][PATCH 6/8] libauthen-radius-perl: " jackie.huang
@ 2017-04-26 6:57 ` jackie.huang
2017-04-26 6:57 ` [meta-oe][PATCH 8/8] ipmitool: " jackie.huang
7 siblings, 0 replies; 11+ messages in thread
From: jackie.huang @ 2017-04-26 6:57 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
OpenIPMI is an effort to create a full-function IPMI
system to allow full access to all IPMI information
on a server and to abstract it to a level that will
make it easy to use.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../files/do-not-install-pyc-and-pyo.patch | 25 +
.../fix-symlink-install-error-in-cmdlang.patch | 22 +
.../files/ipmi-init-fix-the-arguments.patch | 41 ++
.../recipes-support/openipmi/files/ipmi.service | 12 +
.../openipmi/files/makefile-add-ldflags.patch | 19 +
.../openipmi/files/openipmi-don-t-rm-.libs.patch | 32 ++
.../recipes-support/openipmi/files/openipmi-helper | 512 +++++++++++++++++++++
.../files/openipmi-no-openipmigui-man.patch | 26 ++
...openipmi-remove-host-path-from-la_LDFLAGS.patch | 85 ++++
.../recipes-support/openipmi/openipmi_2.0.22.bb | 111 +++++
10 files changed, 885 insertions(+)
create mode 100644 meta-oe/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch
create mode 100644 meta-oe/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
create mode 100644 meta-oe/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch
create mode 100644 meta-oe/recipes-support/openipmi/files/ipmi.service
create mode 100644 meta-oe/recipes-support/openipmi/files/makefile-add-ldflags.patch
create mode 100644 meta-oe/recipes-support/openipmi/files/openipmi-don-t-rm-.libs.patch
create mode 100755 meta-oe/recipes-support/openipmi/files/openipmi-helper
create mode 100644 meta-oe/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch
create mode 100644 meta-oe/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch
create mode 100644 meta-oe/recipes-support/openipmi/openipmi_2.0.22.bb
diff --git a/meta-oe/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch b/meta-oe/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch
new file mode 100644
index 000000000..d4e02be45
--- /dev/null
+++ b/meta-oe/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch
@@ -0,0 +1,25 @@
+Do not install pyc and pyo for python module
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ swig/python/Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/swig/python/Makefile.am b/swig/python/Makefile.am
+index da95a81..97a62bf 100644
+--- a/swig/python/Makefile.am
++++ b/swig/python/Makefile.am
+@@ -33,8 +33,6 @@ CLEANFILES = OpenIPMI_wrap.c OpenIPMI.py OpenIPMI.pyo OpenIPMI.pyc
+ install-exec-local: _OpenIPMI.la OpenIPMI.py OpenIPMI.pyc OpenIPMI.pyo
+ $(INSTALL) -d $(DESTDIR)$(PYTHON_INSTALL_DIR)
+ $(INSTALL_DATA) OpenIPMI.py "$(DESTDIR)$(PYTHON_INSTALL_DIR)"
+- $(INSTALL_DATA) OpenIPMI.pyc "$(DESTDIR)$(PYTHON_INSTALL_DIR)"
+- $(INSTALL_DATA) OpenIPMI.pyo "$(DESTDIR)$(PYTHON_INSTALL_DIR)"
+ if test "x$(PYTHON_GUI_DIR)" = "xopenipmigui"; then \
+ $(INSTALL) -d $(DESTDIR)$(bindir); \
+ $(INSTALL_SCRIPT) $(srcdir)/openipmigui.py "$(DESTDIR)$(bindir)/openipmigui";\
+--
+1.9.1
+
diff --git a/meta-oe/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch b/meta-oe/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
new file mode 100644
index 000000000..9a568b2b2
--- /dev/null
+++ b/meta-oe/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch
@@ -0,0 +1,22 @@
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date: Thu Jun 7 16:00:13 2012 -0400
+
+ This patch fixes the error during the install stage when
+ creating a symbolic link for opeipmish in openipmi/cmdlang
+
+ Upstream-Status: Pending
+
+ Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+
+diff --git a/cmdlang/Makefile.am b/cmdlang/Makefile.am
+index 92d6e83..f6039f9 100644
+--- a/cmdlang/Makefile.am
++++ b/cmdlang/Makefile.am
+@@ -36,6 +36,7 @@ CLEANFILES = libOpenIPMIcmdlang.map
+ # compatability.
+ install-data-local:
+ rm -f $(DESTDIR)$(bindir)/ipmish
++ mkdir -p $(DESTDIR)$(bindir)/
+ $(LN_S) openipmish $(DESTDIR)$(bindir)/ipmish
+
+ uninstall-local:
diff --git a/meta-oe/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch b/meta-oe/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch
new file mode 100644
index 000000000..51a398ba5
--- /dev/null
+++ b/meta-oe/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch
@@ -0,0 +1,41 @@
+Subject: [PATCH] ipmi-init: fix the arguments
+
+The functions success/failure/warning defined in /etc/init.d/functions
+(provided by initscripts) only accepts numeric argument as return code,
+not a string.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ ipmi.init | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ipmi.init b/ipmi.init
+index 2ebcd94..d8161c5 100644
+--- a/ipmi.init
++++ b/ipmi.init
+@@ -45,17 +45,17 @@ elif [ -r /etc/init.d/functions ]; then
+ case "$ACTION" in
+ success)
+ echo -n $*
+- success "$*"
++ success 0
+ echo
+ ;;
+ failure)
+ echo -n $*
+- failure "$*"
++ failure 1
+ echo
+ ;;
+ warning)
+ echo -n $*
+- warning "$*"
++ warning 0
+ echo
+ ;;
+ *)
+--
+1.9.1
+
diff --git a/meta-oe/recipes-support/openipmi/files/ipmi.service b/meta-oe/recipes-support/openipmi/files/ipmi.service
new file mode 100644
index 000000000..6fe137819
--- /dev/null
+++ b/meta-oe/recipes-support/openipmi/files/ipmi.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=IPMI Driver
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@LIBEXECDIR@/openipmi-helper start
+ExecStop=@LIBEXECDIR@/openipmi-helper stop-all
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-oe/recipes-support/openipmi/files/makefile-add-ldflags.patch b/meta-oe/recipes-support/openipmi/files/makefile-add-ldflags.patch
new file mode 100644
index 000000000..271c5323f
--- /dev/null
+++ b/meta-oe/recipes-support/openipmi/files/makefile-add-ldflags.patch
@@ -0,0 +1,19 @@
+Add LDFLAGS variable to Makefile.am, make sure the extra linker flags can be passed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/swig/perl/Makefile.am b/swig/perl/Makefile.am
+index 2f9ee4c..3a18892 100644
+--- a/swig/perl/Makefile.am
++++ b/swig/perl/Makefile.am
+@@ -20,7 +20,7 @@ OpenIPMI_SRC = OpenIPMI_perl.c
+ OpenIPMI_OBJ = OpenIPMI_wrap.lo OpenIPMI_perl.lo
+
+ OpenIPMI.so: $(OpenIPMI_OBJ)
+- $(LIBTOOL) --mode=link $(CC) -shared -module -avoid-version -o $(@:.so=.la) $^ $(OPENIPMI_SWIG_LIBS) $(PERL_POSIX_LIB) -rpath $(PERL_INSTALL_DIR)/auto/OpenIPMI
++ $(LIBTOOL) --mode=link $(CC) -shared -module -avoid-version $(LDFLAGS) -o $(@:.so=.la) $^ $(OPENIPMI_SWIG_LIBS) $(PERL_POSIX_LIB) -rpath $(PERL_INSTALL_DIR)/auto/OpenIPMI
+ rm -f OpenIPMI.so
+ mv .libs/OpenIPMI.so .
+
diff --git a/meta-oe/recipes-support/openipmi/files/openipmi-don-t-rm-.libs.patch b/meta-oe/recipes-support/openipmi/files/openipmi-don-t-rm-.libs.patch
new file mode 100644
index 000000000..ee3c66043
--- /dev/null
+++ b/meta-oe/recipes-support/openipmi/files/openipmi-don-t-rm-.libs.patch
@@ -0,0 +1,32 @@
+From bbd51cf010c80322034f7094e2c6a656aa1f17a7 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Fri, 13 Feb 2015 06:55:33 +0000
+Subject: [PATCH] openipmi: don't rm .libs
+
+Don't remove .libs after OpenIPMI.so generated, this may cause
+dummystuff.so fails to link from the second build with error:
+
+* error: .libs/dummystuff.o: No such file or directory
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ swig/perl/Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/swig/perl/Makefile.am b/swig/perl/Makefile.am
+index 12a282c..2f9ee4c 100644
+--- a/swig/perl/Makefile.am
++++ b/swig/perl/Makefile.am
+@@ -23,7 +23,6 @@ OpenIPMI.so: $(OpenIPMI_OBJ)
+ $(LIBTOOL) --mode=link $(CC) -shared -module -avoid-version -o $(@:.so=.la) $^ $(OPENIPMI_SWIG_LIBS) $(PERL_POSIX_LIB) -rpath $(PERL_INSTALL_DIR)/auto/OpenIPMI
+ rm -f OpenIPMI.so
+ mv .libs/OpenIPMI.so .
+- rm -rf .libs
+
+ dummystuff.lo: dummystuff.c
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+--
+1.9.1
+
diff --git a/meta-oe/recipes-support/openipmi/files/openipmi-helper b/meta-oe/recipes-support/openipmi/files/openipmi-helper
new file mode 100755
index 000000000..4cebfb9c6
--- /dev/null
+++ b/meta-oe/recipes-support/openipmi/files/openipmi-helper
@@ -0,0 +1,512 @@
+#!/bin/sh
+#############################################################################
+#
+# ipmi: OpenIPMI Driver helper script
+#
+# Authors: Jan Safranek <jsafrane@redhat.com>
+#
+# Based on IPMI init script by:
+# Matt Domsch <Matt_Domsch@dell.com>
+# Chris Poblete <Chris_Poblete@dell.com>
+#
+# Status return code bits
+# no bits set = no errors
+# bit 0 set = minimum modules aren't loaded
+# bit 1 set = requested feature module isn't loaded
+# bit 2 set = /dev/ipmi0 (or /dev/imb if using that instead) doesn't exist
+# bit 3 set = /dev/watchdog doesn't exist
+# bit 4 set = lockfile doesn't exist
+# bit 5 set = modules are loaded even when asked to be unloaded
+
+CONFIGFILE=/etc/sysconfig/ipmi
+# source config info
+[ -r ${CONFIGFILE} ] && . ${CONFIGFILE}
+
+#############################################################################
+# GLOBALS
+#############################################################################
+MODULE_NAME="ipmi"
+INTF_NUM=0
+
+IPMI_SMB_MODULE_NAME="ipmi_smb"
+IPMI_SI_MODULE_NAME="ipmi_si"
+kernel=`uname -r | cut -d. -f1-2`
+if [ "${kernel}" == "2.4" ]; then
+ IPMI_SMB_MODULE_NAME="ipmi_smb_intf"
+ IPMI_SI_MODULE_NAME="ipmi_si_drv"
+fi
+
+MODULES_INTERFACES=""
+[ "${DEV_IPMI}" = "yes" ] && MODULES_INTERFACES="${MODULES_INTERFACES} ipmi_devintf"
+[ "${IPMI_IMB}" = "yes" ] && MODULES_INTERFACES="${MODULES_INTERFACES} ipmi_imb"
+
+MODULES_FEATURES=""
+[ "${IPMI_WATCHDOG}" = "yes" ] && MODULES_FEATURES="${MODULES_FEATURES} ipmi_watchdog"
+[ "${IPMI_POWEROFF}" = "yes" ] && MODULES_FEATURES="${MODULES_FEATURES} ipmi_poweroff"
+
+MODULES_HW=""
+[ "${IPMI_SI}" = "yes" ] && MODULES_HW="${MODULES_HW} ${IPMI_SI_MODULE_NAME}"
+[ "${IPMI_SMB}" = "yes" ] && MODULES_HW="${MODULES_HW} ${IPMI_SMB_MODULE_NAME}"
+
+MODULES_BASE="ipmi_msghandler"
+MODULES="${MODULES_INTERFACES} ${MODULES_FEATURES} ${MODULES_HW} ${MODULES_BASE}"
+
+RETVAL=0
+LOCKFILE=/var/lock/subsys/ipmi
+DEV_IPMI_TIMEOUT=150
+
+UDEV_EXISTS=0
+if [ -e /sbin/udev -o -e /sbin/udevd ]; then
+ UDEV_EXISTS=1
+fi
+
+#############################################################################
+# NOTES:
+# * /dev/ipmi0 is unconditionally deleted here on ipmi_devintf unload,
+# because SLES9 and RHEL4 kernels don't send a message for udev to delete
+# it for us.
+#
+#############################################################################
+
+modules_loaded_verbose()
+{
+ OnePlusLoaded=0
+ OnePlusUnloaded=0
+ for m in $@; do
+ if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
+ echo "$m module loaded."
+ OnePlusLoaded=1
+ else
+ echo "$m module not loaded."
+ OnePlusUnloaded=1
+ fi
+ done
+}
+
+modules_loaded()
+{
+ OnePlusLoaded=0
+ OnePlusUnloaded=0
+ for m in $@; do
+ if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
+ OnePlusLoaded=1
+ else
+ OnePlusUnloaded=1
+ fi
+ done
+}
+
+device_node_exists ()
+{
+ if [ -e "$1" ]; then
+ echo "$1 exists."
+ return 1
+ fi
+ echo "$1 does not exist."
+ return 0
+}
+
+minimum_modules_loaded()
+{
+ rc_base=1
+ rc_hw=1
+ modules_loaded_verbose "${MODULES_BASE}"
+ [ ${OnePlusLoaded} -eq 0 ] && rc_base=0
+
+ modules_loaded_verbose "${MODULES_HW}"
+ [ ${OnePlusLoaded} -eq 0 ] && rc_hw=0
+
+ return $((rc_base && rc_hw))
+}
+
+#############################################################################
+
+load_si()
+{
+ if [ "${IPMI_SI}" = "yes" ]; then
+ modprobe ${IPMI_SI_MODULE_NAME} > /dev/null 2>&1
+ modules_loaded ${IPMI_SI_MODULE_NAME}
+ [ ${OnePlusLoaded} -ne 1 ] && RETVAL=$((RETVAL | 1))
+ fi
+}
+
+load_smb()
+{
+ if [ "${IPMI_SMB}" = "yes" ]; then
+ modprobe ${IPMI_SMB_MODULE_NAME} > /dev/null 2>&1
+ modules_loaded ${IPMI_SMB_MODULE_NAME}
+ [ ${OnePlusLoaded} -ne 1 ] && RETVAL=$((RETVAL | 1))
+ fi
+}
+
+load_hw_modules()
+{
+ load_si
+ load_smb
+}
+
+start_watchdog_common()
+{
+ load_hw_modules
+ modprobe ipmi_watchdog ${IPMI_WATCHDOG_OPTIONS} > /dev/null 2>&1
+ modules_loaded ipmi_watchdog
+ [ ${OnePlusUnloaded} -ne 0 ] &&
+ RETVAL=$((RETVAL | 2)) &&
+ echo "Watchdog startup failed: cannot load ipmi_watchdog module" &&
+ return
+ if [ ${UDEV_EXISTS} -eq 0 -a ! -e /dev/watchdog ]; then
+ mknod -m 0600 /dev/watchdog c 10 130
+ [ $? -ne 0 ] &&
+ RETVAL=$((RETVAL | 8)) &&
+ echo "Watchdog startup failed: cannot create /dev/watchdog" &&
+ return
+ fi
+}
+
+start_watchdog_quiet()
+{
+ [ "${IPMI_WATCHDOG}" != "yes" ] &&
+ return
+ start_watchdog_common
+}
+
+start_watchdog()
+{
+ [ "${IPMI_WATCHDOG}" != "yes" ] &&
+ RETVAL=$((RETVAL | 2)) &&
+ echo "Watchdog not configured" &&
+ return
+ start_watchdog_common
+}
+
+stop_watchdog()
+{
+ modprobe -q -r ipmi_watchdog > /dev/null 2>&1
+ modules_loaded ipmi_watchdog
+ if [ ${OnePlusLoaded} -ne 0 ]; then
+ RETVAL=$((RETVAL | 32))
+ echo "Watchog shutdown failed: cannot unload ipmi_watchdog module"
+ else
+ if [ "${IPMI_WATCHDOG}" = "yes" ]; then
+ [ ${UDEV_EXISTS} -eq 0 ] && rm -f /dev/watchdog
+ fi
+ fi
+}
+
+stop_watchdog_quiet()
+{
+ modprobe -q -r ipmi_watchdog > /dev/null 2>&1
+ modules_loaded ipmi_watchdog
+ if [ ${OnePlusLoaded} -ne 0 ]; then
+ RETVAL=$((RETVAL | 32))
+ else
+ if [ "${IPMI_WATCHDOG}" = "yes" ]; then
+ [ ${UDEV_EXISTS} -eq 0 ] && rm -f /dev/watchdog
+ fi
+ fi
+}
+
+start_powercontrol_common()
+{
+ local poweroff_opts=""
+ load_hw_modules
+ if [ "${IPMI_POWERCYCLE}" == "yes" ]; then
+ modinfo ipmi_poweroff 2>/dev/null | grep poweroff_control > /dev/null 2>&1 && \
+ poweroff_opts="poweroff_control=2"
+ modinfo ipmi_poweroff 2>/dev/null | grep poweroff_powercycle > /dev/null 2>&1 && \
+ poweroff_opts="poweroff_powercycle=1"
+ fi
+ modprobe ipmi_poweroff "${poweroff_opts}" > /dev/null 2>&1
+ modules_loaded ipmi_poweroff
+ [ ${OnePlusUnloaded} -ne 0 ] &&
+ RETVAL=$((RETVAL | 2)) &&
+ echo "Powercontroll startup failed: cannot load ipmi_poweroff module" &&
+ return
+}
+
+start_powercontrol_quiet()
+{
+ [ "${IPMI_POWEROFF}" != "yes" ] &&
+ return
+ start_powercontrol_common
+}
+
+start_powercontrol()
+{
+ [ "${IPMI_POWEROFF}" != "yes" ] &&
+ RETVAL=$((RETVAL | 2)) &&
+ echo "Powercontroll not configured" &&
+ return
+ start_powercontrol_common
+}
+
+stop_powercontrol()
+{
+ modprobe -q -r ipmi_poweroff > /dev/null 2>&1
+ modules_loaded ipmi_poweroff
+ if [ ${OnePlusLoaded} -ne 0 ]; then
+ RETVAL=$((RETVAL | 32))
+ echo "Powercontroll shutdown failed: cannot unload ipmi_poweroff module"
+ fi
+}
+
+stop_powercontrol_quiet()
+{
+ modprobe -q -r ipmi_poweroff > /dev/null 2>&1
+ modules_loaded ipmi_poweroff
+ [ ${OnePlusLoaded} -ne 0 ] && RETVAL=$((RETVAL | 32))
+}
+
+#############################################################################
+unload_all_ipmi_modules()
+{
+ stop_watchdog_quiet
+ stop_powercontrol_quiet
+ for m in ${MODULES}; do
+ modprobe -q -r ${m} > /dev/null 2>&1
+ done
+ # delete interface node ONLY if ipmi_devintf is unloaded
+ [ `lsmod | grep -c "ipmi_devintf"` -eq 0 ] &&
+ rm -f "/dev/ipmi${INTF_NUM}"
+}
+
+unload_ipmi_modules_leave_features()
+{
+ for m in ${MODULES_INTERFACES}; do
+ modprobe -q -r ${m} > /dev/null 2>&1
+ done
+ # delete interface node ONLY if ipmi_devintf is unloaded
+ [ `lsmod | grep -c "ipmi_devintf"` -eq 0 ] &&
+ rm -f "/dev/ipmi${INTF_NUM}"
+ lsmod | egrep -q "ipmi_(poweroff|watchdog)" > /dev/null 2>&1
+ if [ "$?" -ne "0" ]; then
+ stop_watchdog_quiet
+ stop_powercontrol_quiet
+ for m in ${MODULES}; do
+ modprobe -q -r ${m} > /dev/null 2>&1
+ done
+ fi
+}
+
+#############################################################################
+load_ipmi_modules ()
+{
+ local locdelay
+ modprobe ipmi_msghandler > /dev/null 2>&1
+ modules_loaded ipmi_msghandler
+ [ ${OnePlusLoaded} -ne 1 ] && unload_all_ipmi_modules && RETVAL=$((RETVAL | 1)) && return
+ load_hw_modules
+ [ $((RETVAL & 1)) -eq 1 ] && unload_all_ipmi_modules && RETVAL=$((RETVAL | 1)) && return
+
+ if [ "${DEV_IPMI}" = "yes" ]; then
+ modprobe ipmi_devintf > /dev/null 2>&1
+ modules_loaded ipmi_devintf
+ RETVAL=$((RETVAL & ~2))
+ [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+ if [ ${OnePlusLoaded} -eq 1 ]; then
+ if [ ${UDEV_EXISTS} -eq 0 ]; then
+ DEVMAJOR=`cat /proc/devices | awk '/ipmidev/{print $1}'`
+ rm -f /dev/ipmi${INTF_NUM}
+ mknod -m 0600 /dev/ipmi${INTF_NUM} c ${DEVMAJOR} 0 || RETVAL=$((RETVAL | 4))
+ fi
+
+ # udev can take several seconds to create /dev/ipmi0,
+ # but it happens asynchronously, so delay here
+ locdelay=${DEV_IPMI_TIMEOUT}
+ while [ ! -e /dev/ipmi${INTF_NUM} -a ${locdelay} -gt 0 ]; do
+ locdelay=$((locdelay - 1))
+ sleep 0.1
+ done
+ fi
+ fi
+
+ if [ "${IPMI_IMB}" = "yes" ]; then
+ modprobe ipmi_imb > /dev/null 2>&1
+ modules_loaded ipmi_imb
+ RETVAL=$((RETVAL & ~2))
+ [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+ if [ ${OnePlusLoaded} -eq 1 ]; then
+ DEVMAJOR=`cat /proc/devices | awk '/imb/{print $1}'`
+ rm -f /dev/imb
+ mknod -m 0600 /dev/imb c ${DEVMAJOR} 0 || RETVAL=$((RETVAL | 4))
+ fi
+ fi
+
+ # Per Corey Minyard, essentially no one uses ipmi_radisys
+ # and we don't want to encourage its further use
+ # so it won't be handled here.
+ return
+}
+
+#############################################################################
+start()
+{
+ load_ipmi_modules
+ if [ ${RETVAL} -eq 0 ]; then
+ touch ${LOCKFILE}
+ else
+ if [ $((RETVAL & 1)) -eq 1 ]; then
+ echo "Startup failed."
+ else
+ touch ${LOCKFILE} && echo "Warning!?"
+ fi
+ fi
+ start_watchdog_quiet
+ start_powercontrol_quiet
+}
+
+#############################################################################
+stop()
+{
+ unload_ipmi_modules_leave_features
+ modules_loaded ${MODULES_INTERFACES}
+ if [ ${OnePlusLoaded} -ne 0 ]; then
+ RETVAL=$((RETVAL | 32))
+ echo "Shutdown failed, something may be in use"
+ else
+ rm -f ${LOCKFILE}
+ fi
+}
+
+stop_all()
+{
+ unload_all_ipmi_modules
+ modules_loaded ${MODULES}
+ if [ ${OnePlusLoaded} -ne 0 ]; then
+ RETVAL=$((RETVAL | 32))
+ echo "Shutdown failed, something may be in use"
+ else
+ rm -f ${LOCKFILE}
+ fi
+}
+
+#############################################################################
+restart()
+{
+ stop_all
+ RETVAL=0
+ start
+}
+
+#############################################################################
+
+reload()
+{
+ stop_all
+ RETVAL=0
+ start
+}
+
+#############################################################################
+
+status_all()
+{
+ minimum_modules_loaded
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
+
+ modules_loaded_verbose ${MODULES_FEATURES} ${MODULES_INTERFACES}
+ [ ${OnePlusUnloaded} -ne 0 ] && RETVAL=$((RETVAL | 2))
+
+ if [ "${DEV_IPMI}" = "yes" ]; then
+ device_node_exists /dev/ipmi${INTF_NUM}
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
+ fi
+
+ if [ "${IPMI_IMB}" = "yes" ]; then
+ device_node_exists /dev/imb
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
+ fi
+
+ if [ "${IPMI_WATCHDOG}" = "yes" ]; then
+ device_node_exists /dev/watchdog
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 8))
+ fi
+
+ [ ! -e ${LOCKFILE} ] && RETVAL=$((RETVAL | 16))
+}
+
+status()
+{
+ minimum_modules_loaded
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
+
+ if [ "${DEV_IPMI}" = "yes" ]; then
+ modules_loaded_verbose ipmi_devintf
+ [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+
+ device_node_exists /dev/ipmi${INTF_NUM}
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
+ fi
+
+ if [ "${IPMI_IMB}" = "yes" ]; then
+ device_node_exists /dev/imb
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
+ fi
+}
+
+status_watchdog()
+{
+ minimum_modules_loaded
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
+
+ modules_loaded_verbose ipmi_watchdog
+ [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+
+ device_node_exists /dev/watchdog
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 8))
+}
+
+status_powercontrol()
+{
+ minimum_modules_loaded
+ [ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
+
+ modules_loaded_verbose ipmi_powercontrol
+ [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
+}
+
+#############################################################################
+usage ()
+{
+ echo $"Usage: $0 {start|stop|status" 1>&2
+ echo $" restart|condrestart|try-restart|reload|force-reload" 1>&2
+ echo $" start-watchdog|stop-watchdog|status-watchdog" 1>&2
+ echo $" start-powercontrol|stop-powercontrol|status-powercontrol" 1>&2
+ echo $" stop-all|status-all}" 1>&2
+ RETVAL=2
+}
+
+condrestart ()
+{
+ [ -e ${LOCKFILE} ] && restart
+}
+
+#############################################################################
+# MAIN
+#############################################################################
+case "$1" in
+ start) start ;;
+ stop) stop ;;
+ restart) restart ;;
+ force-reload) reload ;;
+ reload) reload ;;
+ status) status ;;
+ status-all) status_all ;;
+ condrestart) condrestart ;;
+ try-restart) condrestart ;;
+ start-watchdog) start_watchdog ;;
+ stop-watchdog) stop_watchdog ;;
+ status-watchdog) status_watchdog ;;
+ start-powercontrol) start_powercontrol ;;
+ stop-powercontrol) stop_powercontrol ;;
+ status-powercontrol) status_powercontrol ;;
+ stop-all) stop_all ;;
+ *) usage ;;
+esac
+
+exit ${RETVAL}
+
+#############################################################################
+# end of file
+#############################################################################
+
diff --git a/meta-oe/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch b/meta-oe/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch
new file mode 100644
index 000000000..1fa68f9ba
--- /dev/null
+++ b/meta-oe/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch
@@ -0,0 +1,26 @@
+Author: Aws Ismail <aws.ismail@windriver.com>
+Date: Thu Jun 7 12:28:34 2012 -0400
+
+ This patch was carried over from WRL4.3 (openipmi v2.0.16)
+
+ It was updated for openipmi v2.0.19
+
+ Disable making openipmigui man page since we don't need it
+
+ Upstream-Status: Pending
+
+ Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
+ Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/man/Makefile.am b/man/Makefile.am
+index 632f55b..5ce79f5 100644
+--- a/man/Makefile.am
++++ b/man/Makefile.am
+@@ -1,6 +1,6 @@
+
+ man_MANS = ipmi_ui.1 openipmicmd.1 openipmish.1 ipmi_cmdlang.7 \
+- openipmigui.1 openipmi_conparms.7 solterm.1 rmcp_ping.1 \
++ openipmi_conparms.7 solterm.1 rmcp_ping.1 \
+ openipmi_eventd.1
+
+ EXTRA_DIST = $(man_MANS)
diff --git a/meta-oe/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch b/meta-oe/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch
new file mode 100644
index 000000000..6f16234bc
--- /dev/null
+++ b/meta-oe/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch
@@ -0,0 +1,85 @@
+From aa0dc0783a6ff5fb56c914b640836223e3c192bb Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 29 Dec 2014 18:16:04 +0800
+Subject: [PATCH] remove host path from la_LDFLAGS
+
+Upstream-Status: Inappropriate [ cross compile specific ]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ cmdlang/Makefile.am | 2 +-
+ glib/Makefile.am | 4 ++--
+ tcl/Makefile.am | 2 +-
+ unix/Makefile.am | 4 ++--
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/cmdlang/Makefile.am b/cmdlang/Makefile.am
+index 00c3d2b..0fa85d7 100644
+--- a/cmdlang/Makefile.am
++++ b/cmdlang/Makefile.am
+@@ -16,7 +16,7 @@ libOpenIPMIcmdlang_la_LIBADD = -lm \
+ $(top_builddir)/utils/libOpenIPMIutils.la \
+ $(top_builddir)/lib/libOpenIPMI.la
+ libOpenIPMIcmdlang_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+- -Wl,-Map -Wl,libOpenIPMIcmdlang.map -L$(libdir)
++ -Wl,-Map -Wl,libOpenIPMIcmdlang.map
+
+ bin_PROGRAMS = openipmish
+
+diff --git a/glib/Makefile.am b/glib/Makefile.am
+index 671cae2..eff55f3 100644
+--- a/glib/Makefile.am
++++ b/glib/Makefile.am
+@@ -11,14 +11,14 @@ libOpenIPMIglib_la_SOURCES = glib_os_hnd.c
+ libOpenIPMIglib_la_CFLAGS = $(GLIB_CFLAGS) $(AM_CFLAGS)
+ libOpenIPMIglib_la_LIBADD = $(GDBM_LIB)
+ libOpenIPMIglib_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+- -Wl,-Map -Wl,libOpenIPMIglib.map $(GLIB_LIBS) -L$(libdir) \
++ -Wl,-Map -Wl,libOpenIPMIglib.map $(GLIB_LIBS) \
+ -rpath $(libdir)
+
+ libOpenIPMIglib12_la_SOURCES = glib_os_hnd.c
+ libOpenIPMIglib12_la_CFLAGS = $(GLIB12_CFLAGS) $(AM_CFLAGS)
+ libOpenIPMIglib12_la_LIBADD = $(GDBM_LIB)
+ libOpenIPMIglib12_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+- -Wl,-Map -Wl,libOpenIPMIglib12.map $(GLIB12_LIBS) -L$(libdir) \
++ -Wl,-Map -Wl,libOpenIPMIglib12.map $(GLIB12_LIBS) \
+ -rpath $(libdir)
+
+ CLEANFILES = libOpenIPMIglib.map libOpenIPMIglib12.map
+diff --git a/tcl/Makefile.am b/tcl/Makefile.am
+index b702819..282619c 100644
+--- a/tcl/Makefile.am
++++ b/tcl/Makefile.am
+@@ -11,7 +11,7 @@ libOpenIPMItcl_la_SOURCES = tcl_os_hnd.c
+ libOpenIPMItcl_la_CFLAGS = $(TCL_CFLAGS) $(AM_CFLAGS)
+ libOpenIPMItcl_la_LIBADD = $(GDBM_LIB)
+ libOpenIPMItcl_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+- -Wl,-Map -Wl,libOpenIPMItcl.map $(TCL_LIBS) -L$(libdir) \
++ -Wl,-Map -Wl,libOpenIPMItcl.map $(TCL_LIBS) \
+ -rpath $(libdir)
+
+ noinst_PROGRAMS = test_handlers
+diff --git a/unix/Makefile.am b/unix/Makefile.am
+index a792147..a108bc6 100644
+--- a/unix/Makefile.am
++++ b/unix/Makefile.am
+@@ -11,13 +11,13 @@ libOpenIPMIpthread_la_SOURCES = posix_thread_os_hnd.c selector.c
+ libOpenIPMIpthread_la_LIBADD = -lpthread $(GDBM_LIB) \
+ $(top_builddir)/utils/libOpenIPMIutils.la
+ libOpenIPMIpthread_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+- -Wl,-Map -Wl,libOpenIPMIpthread.map -L$(libdir)
++ -Wl,-Map -Wl,libOpenIPMIpthread.map
+
+ libOpenIPMIposix_la_SOURCES = posix_os_hnd.c selector.c
+ libOpenIPMIposix_la_LIBADD = $(top_builddir)/utils/libOpenIPMIutils.la \
+ $(GDBM_LIB)
+ libOpenIPMIposix_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \
+- -Wl,-Map -Wl,libOpenIPMIposix.map -L$(libdir)
++ -Wl,-Map -Wl,libOpenIPMIposix.map
+
+ noinst_HEADERS = heap.h
+
+--
+1.7.1
+
diff --git a/meta-oe/recipes-support/openipmi/openipmi_2.0.22.bb b/meta-oe/recipes-support/openipmi/openipmi_2.0.22.bb
new file mode 100644
index 000000000..82e8cac3e
--- /dev/null
+++ b/meta-oe/recipes-support/openipmi/openipmi_2.0.22.bb
@@ -0,0 +1,111 @@
+SUMMARY = "IPMI (Intelligent Platform Management Interface) library and tools"
+DESCRIPTION = "OpenIPMI is an effort to create a full-function IPMI system, \
+to allow full access to all IPMI information on a server \
+and to abstract it to a level that will make it easy to use"
+
+HOMEPAGE = "http://openipmi.sourceforge.net"
+
+DEPENDS = " \
+ glib-2.0 \
+ ncurses \
+ net-snmp \
+ openssl \
+ popt \
+ python \
+ swig-native \
+ "
+
+LICENSE = "GPLv2 & LGPLv2.1 & BSD"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
+ file://COPYING.BSD;md5=4b318d4160eb69c8ee53452feb1b4cdf \
+ "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/openipmi/OpenIPMI-${PV}.tar.gz \
+ file://fix-symlink-install-error-in-cmdlang.patch \
+ file://openipmi-no-openipmigui-man.patch \
+ file://openipmi-remove-host-path-from-la_LDFLAGS.patch \
+ file://openipmi-don-t-rm-.libs.patch \
+ file://ipmi-init-fix-the-arguments.patch \
+ file://makefile-add-ldflags.patch \
+ file://do-not-install-pyc-and-pyo.patch \
+ file://openipmi-helper \
+ file://ipmi.service \
+ "
+
+SRC_URI[md5sum] = "9a4e1f6bb073379c494839201ea10aee"
+SRC_URI[sha256sum] = "4988900043c35fcfa9b2bf275d6593904f6429221befb770ba6ecb5502108e55"
+
+S = "${WORKDIR}/OpenIPMI-${PV}"
+
+inherit autotools-brokensep pkgconfig pythonnative perlnative update-rc.d systemd
+
+EXTRA_OECONF = "--disable-static \
+ --with-perl='${STAGING_BINDIR_NATIVE}/perl-native/perl' \
+ --with-python='${STAGING_BINDIR_NATIVE}/python-native/python' \
+ --with-pythoninstall='${PYTHON_SITEPACKAGES_DIR}' \
+ --with-glibver=2.0 --with-glib12=no"
+
+PACKAGECONFIG ??= "gdbm"
+PACKAGECONFIG[gdbm] = "ac_cv_header_gdbm_h=yes,ac_cv_header_gdbm_h=no,gdbm,"
+
+PACKAGES += "${PN}-perl ${PN}-python"
+
+FILES_${PN}-perl = " \
+ ${libdir}/perl/vendor_perl/*/OpenIPMI.pm \
+ ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/OpenIPMI.so \
+ "
+
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
+
+FILES_${PN}-dbg += " \
+ ${libdir}/perl/vendor_perl/*/auto/OpenIPMI/.debug \
+ ${PYTHON_SITEPACKAGES_DIR}/.debug \
+ "
+
+do_configure () {
+
+ # Let's perform regular configuration first then handle perl issues.
+ autotools_do_configure
+
+ perl_ver=`perl -V:version | cut -d\' -f 2`
+
+ # Force openipmi perl bindings to be compiled using perl-native instead of
+ # the host's perl. Set the proper install directory for the resulting
+ # openipmi.pm and openipmi.so
+ for i in ${S}/swig/Makefile ${S}/swig/perl/Makefile; do
+ echo "SAL: i = $i"
+ echo "SAL: STAGING_INCDIR_NATIVE = $STAGING_INCDIR_NATIVE"
+ echo "SAL: libdir = $libdir"
+ sed -i -e "/^PERL_CFLAGS/s:-I/usr/local/include:-I${STAGING_INCDIR_NATIVE}:g" $i
+ sed -i -e "/^PERL_INSTALL_DIR/s:^PERL_INSTALL_DIR = .*:PERL_INSTALL_DIR = ${libdir}/perl/vendor_perl/$perl_ver:g" $i
+ done
+}
+
+do_install_append () {
+ echo "SAL: D = $D"
+ echo "SAL: libdir = $libdir"
+ install -m 0755 -d ${D}${sysconfdir}/sysconfig ${D}${sysconfdir}/init.d
+ install -m 0755 ${S}/ipmi.init ${D}${sysconfdir}/init.d/ipmi
+ install -m 0644 ${S}/ipmi.sysconf ${D}${sysconfdir}/sysconfig/ipmi
+ # SAL: mv: cannot stat `/localdisk/loadbuild/slittle1/workspace/cgts_test_build/bitbake_build/tmp/work/x86_64-wrs-linux/openipmi-2.0.19-r4/image/usr/lib64/perl5': No such file or directory
+ # SAL: real path to perl is /localdisk/loadbuild/slittle1/workspace/cgts_test_build/bitbake_build/tmp/work/x86_64-wrs-linux/perl-5.14.2-r8.3/package/usr/lib64/perl5 and it is a symlink to perl so no need to mv.
+ if [ -d ${D}${libdir}/perl5 ]
+ then
+ mv ${D}${libdir}/perl5 ${D}${libdir}/perl
+ fi
+
+ # for systemd
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0664 ${WORKDIR}/ipmi.service ${D}${systemd_unitdir}/system
+ sed -i -e "s,@LIBEXECDIR@,${libexecdir},g" ${D}${systemd_unitdir}/system/ipmi.service
+ install -d ${D}${libexecdir}
+ install -m 0755 ${WORKDIR}/openipmi-helper ${D}${libexecdir}
+}
+
+INITSCRIPT_NAME = "ipmi"
+INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ."
+
+SYSTEMD_SERVICE_${PN} = "ipmi.service"
+SYSTEMD_AUTO_ENABLE = "disable"
--
2.11.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [meta-oe][PATCH 8/8] ipmitool: add new recipe
2017-04-26 6:57 [PATCH 0/8] ipmi/hpi/radius: add new recipes and related packages jackie.huang
` (6 preceding siblings ...)
2017-04-26 6:57 ` [meta-oe][PATCH 7/8] openipmi: " jackie.huang
@ 2017-04-26 6:57 ` jackie.huang
7 siblings, 0 replies; 11+ messages in thread
From: jackie.huang @ 2017-04-26 6:57 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
Utility for IPMI control which is for interfacing with
devices that support the Intelligent Platform Management
Interface specification.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../recipes-support/ipmitool/ipmitool_1.8.18.bb | 36 ++++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 meta-oe/recipes-support/ipmitool/ipmitool_1.8.18.bb
diff --git a/meta-oe/recipes-support/ipmitool/ipmitool_1.8.18.bb b/meta-oe/recipes-support/ipmitool/ipmitool_1.8.18.bb
new file mode 100644
index 000000000..9f73d2799
--- /dev/null
+++ b/meta-oe/recipes-support/ipmitool/ipmitool_1.8.18.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Utility for IPMI control"
+DESCRIPTION = "This package contains a utility for interfacing with devices that support \
+the Intelligent Platform Management Interface specification. IPMI is \
+an open standard for machine health, inventory, and remote power control. \
+\
+This utility can communicate with IPMI-enabled devices through either a \
+kernel driver such as OpenIPMI or over the RMCP LAN protocol defined in \
+the IPMI specification. IPMIv2 adds support for encrypted LAN \
+communications and remote Serial-over-LAN functionality. \
+\
+It provides commands for reading the Sensor Data Repository (SDR) and \
+displaying sensor values, displaying the contents of the System Event \
+Log (SEL), printing Field Replaceable Unit (FRU) information, reading and \
+setting LAN configuration, and chassis power control. \
+"
+
+HOMEPAGE = "http://ipmitool.sourceforge.net/"
+SECTION = "kernel/userland"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=9aa91e13d644326bf281924212862184"
+
+DEPENDS = "openssl readline ncurses"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/ipmitool/ipmitool-${PV}.tar.bz2"
+SRC_URI[md5sum] = "bab7ea104c7b85529c3ef65c54427aa3"
+SRC_URI[sha256sum] = "0c1ba3b1555edefb7c32ae8cd6a3e04322056bc087918f07189eeedfc8b81e01"
+
+inherit autotools
+
+# --disable-dependency-tracking speeds up the build
+# --enable-file-security adds some security checks
+# --disable-intf-free disables FreeIPMI support - we don't want to depend on
+# FreeIPMI libraries, FreeIPMI has its own ipmitoool-like utility.
+#
+EXTRA_OECONF = "--disable-dependency-tracking --enable-file-security --disable-intf-free"
--
2.11.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [meta-networking][PATCH 1/8] openhpi: add new recipe
2017-04-26 6:57 ` [meta-networking][PATCH 1/8] openhpi: add new recipe jackie.huang
@ 2017-04-26 7:34 ` Martin Jansa
2017-04-26 7:53 ` Huang, Jie (Jackie)
0 siblings, 1 reply; 11+ messages in thread
From: Martin Jansa @ 2017-04-26 7:34 UTC (permalink / raw)
To: jackie.huang; +Cc: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 31784 bytes --]
On Wed, Apr 26, 2017 at 02:57:08PM +0800, jackie.huang@windriver.com wrote:
> From: Jackie Huang <jackie.huang@windriver.com>
>
> OpenHPI is an open source project created with
> the intent of providing an implementation of
> the SA Forum's Hardware Platform Interface (HPI).
>
> Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
> ---
> .../files/openhpi-add-libnetsnmp-when-link.patch | 25 +++
> .../files/openhpi-fix-alignment-issue.patch | 23 +++
> .../openhpi/files/openhpi-fix-host-gcc.patch | 24 +++
> .../files/openhpi-fix-testfail-errors.patch | 31 +++
> .../openhpi/files/openhpi-glib-cross-compile.patch | 33 +++
> .../files/openhpi-hpi-shell-thread-fix.patch | 29 +++
> .../openhpi/files/openhpi-invalide-session.patch | 21 ++
> .../files/openhpi-libxml2-cross-compile.patch | 21 ++
> .../openhpi/files/openhpi-linkfix.patch | 33 +++
> .../files/openhpi-netsnmp-cross-compile.patch | 48 +++++
> .../files/openhpi-sysfs-cross-compile.patch | 23 +++
> ...i-use-serial-tests-config-needed-by-ptest.patch | 31 +++
> .../recipes-daemons/openhpi/files/openhpi.init | 230 +++++++++++++++++++++
> .../recipes-daemons/openhpi/files/openhpid.service | 11 +
> .../recipes-daemons/openhpi/files/run-ptest | 5 +
> .../recipes-daemons/openhpi/openhpi_3.6.1.bb | 111 ++++++++++
> 16 files changed, 699 insertions(+)
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch
> create mode 100755 meta-networking/recipes-daemons/openhpi/files/openhpi.init
> create mode 100644 meta-networking/recipes-daemons/openhpi/files/openhpid.service
> create mode 100755 meta-networking/recipes-daemons/openhpi/files/run-ptest
> create mode 100644 meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
>
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch
> new file mode 100644
> index 000000000..4644910b7
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch
> @@ -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
> +
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch
> new file mode 100644
> index 000000000..077e26cbf
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch
> @@ -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:
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch
> new file mode 100644
> index 000000000..029b857bc
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch
> @@ -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>
> +
> +diff --git a/configure.ac b/configure.ac
> +index f5a5b74..4a20154 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -605,11 +605,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'`
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch
> new file mode 100644
> index 000000000..205696e65
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch
> @@ -0,0 +1,31 @@
> +Fix for saftest failures.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
> +
> +diff -urpN a/openhpid/safhpi.c b/openhpid/safhpi.c
> +--- a/openhpid/safhpi.c
> ++++ b/openhpid/safhpi.c
> +@@ -1976,7 +1976,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;
> +diff -urpN a/utils/sahpi_struct_utils.c b/utils/sahpi_struct_utils.c
> +--- a/utils/sahpi_struct_utils.c
> ++++ b/utils/sahpi_struct_utils.c
> +@@ -3855,6 +3855,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/meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch
> new file mode 100644
> index 000000000..1627c9797
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch
> @@ -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
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch
> new file mode 100644
> index 000000000..7dac45318
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch
> @@ -0,0 +1,29 @@
> +commit e9f9a73c9dba8dd59f3d6c3acd9988ec8361d55a
> +Author: Aws Ismail <aws.ismail@windriver.com>
> +Date: Mon Dec 17 16:23:45 2012 -0500
> +
> + Correct dangling g_thread_exit in session.c
> +
> + hpi_shell's session.c has its progress_bar
> + thread created using pthread_create but
> + exited using g_thread_exit. Use pthread_exit
> + instead to avoid unpredictable GLIB thread
> + errors.
> +
> + Upstream-Status: Pending
> +
> + Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
> +
> +diff --git a/hpi_shell/session.c b/hpi_shell/session.c
> +index 85c31bf..187da4c 100644
> +--- a/hpi_shell/session.c
> ++++ b/hpi_shell/session.c
> +@@ -66,7 +66,7 @@ static void* progress_bar(void *unused)
> + if (i < (PROGRESS_BUF_SIZE - mes_len - 1)) i++;
> + t++;
> + };
> +- g_thread_exit(0);
> ++ pthread_exit(0);
> + return (void *)1;
> + }
> +
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch
> new file mode 100644
> index 000000000..d03c97e18
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch
> @@ -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;
> + }
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch
> new file mode 100644
> index 000000000..6d3b6648a
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch
> @@ -0,0 +1,21 @@
> +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>
> +
> +diff --git a/configure.ac b/configure.ac
> +index 30a792c..b5f5aad 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -175,7 +175,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)
> +
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch
> new file mode 100644
> index 000000000..3222f5d13
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch
> @@ -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
> +
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch
> new file mode 100644
> index 000000000..95b0abc91
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch
> @@ -0,0 +1,48 @@
> +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(-)
> +
> +diff --git a/acinclude.m4 b/acinclude.m4
> +index 82c33f6..727e461 100644
> +--- a/acinclude.m4
> ++++ b/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!)])
> +diff --git a/configure b/configure
> +index 00067bc..36b913c 100755
> +--- a/configure
> ++++ b/configure
> +@@ -15949,8 +15949,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; }
> +
> +--
> +1.9.1
> +
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch
> new file mode 100644
> index 000000000..38d9a6742
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch
> @@ -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>
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch b/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch
> new file mode 100644
> index 000000000..51537ef12
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch
> @@ -0,0 +1,31 @@
> +From 36fbaa27e7299f63c1324b0ad22b970e9365d6a7 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 files changed, 1 insertions(+), 1 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 4b51971..16136b3 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.5.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
> +--
> +1.7.1
> +
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpi.init b/meta-networking/recipes-daemons/openhpi/files/openhpi.init
> new file mode 100755
> index 000000000..3a5f4a06a
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpi.init
> @@ -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
> diff --git a/meta-networking/recipes-daemons/openhpi/files/openhpid.service b/meta-networking/recipes-daemons/openhpi/files/openhpid.service
> new file mode 100644
> index 000000000..cd4168f8e
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/openhpid.service
> @@ -0,0 +1,11 @@
> +[Unit]
> +Description=Daemon providing access to the SAF Hardware Platform Interface
> +After=syslog.target
> +
> +[Service]
> +Type=forking
> +PIDFile=/var/run/openhpid.pid
> +ExecStart=@SBINDIR@/openhpid -c @SYSCONFDIR@/openhpi/openhpi.conf
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta-networking/recipes-daemons/openhpi/files/run-ptest b/meta-networking/recipes-daemons/openhpi/files/run-ptest
> new file mode 100755
> index 000000000..5b187d908
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/files/run-ptest
> @@ -0,0 +1,5 @@
> +#!/bin/sh
> +for x in `find ./ -name Makefile`;
> +do
> + make -C `dirname ${x}` -k runtest-TESTS
> +done
> diff --git a/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb b/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
> new file mode 100644
> index 000000000..19bd40abe
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb
> @@ -0,0 +1,111 @@
> +SUMMARY = "Hardware Platform Interface Library and Tools"
> +
> +DESCRIPTION = "\
> +OpenHPI is an open source project created with the intent of providing an \
> +implementation of the SA Forum's Hardware Platform Interface (HPI). HPI \
> +provides an abstracted interface to managing computer hardware, typically for \
> +chassis and rack based servers. HPI includes resource modeling; access to and \
> +control over sensor, control, watchdog, and inventory data associated with \
> +resources; abstracted System Event Log interfaces; hardware events and alerts; \
> +and a managed hotswap interface. \
> +\
> +OpenHPI provides a modular mechanism for adding new hardware and device support \
> +easily. Many plugins exist in the OpenHPI source tree to provide access to \
> +various types of hardware. This includes, but is not limited to, IPMI based \
> +servers, Blade Center, and machines which export data via sysfs. \
> +"
> +
> +HOMEPAGE = "http://openhpi.sourceforge.net/Home"
> +SECTION = "net"
> +LICENSE = "BSD"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4"
> +
> +DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs"
> +
> +SRC_URI = "${SOURCEFORGE_MIRROR}/openhpi/openhpi-${PV}.tar.gz \
Use BPN and BP
> + file://openhpi-netsnmp-cross-compile.patch \
> + file://openhpi-sysfs-cross-compile.patch \
> + file://openhpi-libxml2-cross-compile.patch \
> + file://openhpi-glib-cross-compile.patch \
> + file://openhpi-linkfix.patch \
> + file://openhpi-fix-host-gcc.patch \
> + file://openhpi-hpi-shell-thread-fix.patch \
> + file://openhpi-fix-testfail-errors.patch \
> + file://openhpi-add-libnetsnmp-when-link.patch \
> + file://openhpi-invalide-session.patch \
> + file://openhpi-use-serial-tests-config-needed-by-ptest.patch \
> + file://openhpi-fix-alignment-issue.patch \
> + \
> + file://openhpi.init \
> + file://openhpid.service \
> + file://run-ptest \
> +"
> +
> +SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23"
> +SRC_URI[sha256sum] = "e0a810cb401c4bdcfc9551f2e6afd5a8ca4b411f5ee3bc60c19f82fd6e84a3dc"
> +
> +S = "${WORKDIR}/openhpi-${PV}"
Isn't this the default?
> +
> +inherit autotools pkgconfig ptest update-rc.d systemd
> +
> +PACKAGES =+ "${PN}-libs"
> +
> +FILES_${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so"
> +
> +INSANE_SKIP_${PN}-libs = "dev-so"
> +RDEPENDS_${PN} += "${PN}-libs"
> +
> +PACKAGECONFIG ??= "libgcrypt"
> +PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils,"
> +PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt,"
> +
> +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 0755 ${WORKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid
> +
> + install -d ${D}${systemd_unitdir}/system
> + install -m 0644 ${WORKDIR}/openhpid.service ${D}${systemd_unitdir}/system
> + sed -i -e "s,@SBINDIR@,${sbindir},g" -e "s,@SYSCONFDIR@,${sysconfdir},g" \
> + ${D}${systemd_unitdir}/system/openhpid.service
> +}
> +
> +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
> + fi
> + done
> +}
> +
> +do_install_ptest () {
> + cp -rf ${B}/openhpid/t/ohpi/.libs/* ${B}/openhpid/t/ohpi/
> + TESTS="utils marshal openhpid"
> + for subtest in ${TESTS}; do
> + mkdir -p ${D}${PTEST_PATH}/${subtest}/t
> + cp -rf ${B}/${subtest}/t/* ${D}${PTEST_PATH}/${subtest}/t
> + done
> +
> + for x in `find ${D}${PTEST_PATH} -name Makefile`; do
> + sed -i "s:${S}:${PTEST_PATH}/:g" ${x};
> + sed -i "s/^Makefile:/MM:/g" ${x};
> + done;
> +
> + 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/
> + find ${D}${PTEST_PATH}/ -name "*.c" -exec rm {} \;
> + find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \;
> + find ${D}${PTEST_PATH}/ -name "*.h" -exec rm {} \;
> +}
> +
> +INITSCRIPT_NAME = "openhpid"
> +INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ."
> +
> +SYSTEMD_SERVICE_${PN} = "openhpid.service"
> +SYSTEMD_AUTO_ENABLE = "disable"
> --
> 2.11.0
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-networking][PATCH 1/8] openhpi: add new recipe
2017-04-26 7:34 ` Martin Jansa
@ 2017-04-26 7:53 ` Huang, Jie (Jackie)
0 siblings, 0 replies; 11+ messages in thread
From: Huang, Jie (Jackie) @ 2017-04-26 7:53 UTC (permalink / raw)
To: Martin Jansa; +Cc: openembedded-devel
> > +
> > +SRC_URI = "${SOURCEFORGE_MIRROR}/openhpi/openhpi-${PV}.tar.gz \
>
> Use BPN and BP
Sure, fixed.
>
> > +S = "${WORKDIR}/openhpi-${PV}"
>
> Isn't this the default?
Yes, this line is removed.
And I will send v2 for these changes.
Thanks,
Jackie
> >
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
> --
> Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-04-26 7:53 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26 6:57 [PATCH 0/8] ipmi/hpi/radius: add new recipes and related packages jackie.huang
2017-04-26 6:57 ` [meta-networking][PATCH 1/8] openhpi: add new recipe jackie.huang
2017-04-26 7:34 ` Martin Jansa
2017-04-26 7:53 ` Huang, Jie (Jackie)
2017-04-26 6:57 ` [meta-networking][PATCH 2/8] freeradius: " jackie.huang
2017-04-26 6:57 ` [meta-perl][PATCH 3/8] libnet-ldap-perl: " jackie.huang
2017-04-26 6:57 ` [meta-perl][PATCH 4/8] libdata-hexdump-perl: " jackie.huang
2017-04-26 6:57 ` [meta-perl][PATCH 5/8] libnet-telnet-perl: " jackie.huang
2017-04-26 6:57 ` [meta-perl][PATCH 6/8] libauthen-radius-perl: " jackie.huang
2017-04-26 6:57 ` [meta-oe][PATCH 7/8] openipmi: " jackie.huang
2017-04-26 6:57 ` [meta-oe][PATCH 8/8] ipmitool: " 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.