From 3b245e4fe85be62c309650e84d1aaacbcb0d5505 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Fri, 14 Jun 2019 15:28:18 +0800 Subject: openipmi: upgrade 2.0.25 -> 2.0.27 Refresh all patches. Remove openipmigui-not-compile-pyc-pyo.patch and do-not-install-pyc-and-pyo.patch as the issues had been fixed upstream. Add ipmi_serial_bmc_emu.c-include-readline.h-from-readli.patch to fix the build error. Signed-off-by: Yi Zhao Signed-off-by: Khem Raj --- .../files/do-not-install-pyc-and-pyo.patch | 25 ----- .../fix-symlink-install-error-in-cmdlang.patch | 31 +++--- .../openipmi/files/include_sys_types.patch | 21 +++- .../files/ipmi-init-fix-the-arguments.patch | 7 +- ..._bmc_emu.c-include-readline.h-from-readli.patch | 31 ++++++ .../files/openipmi-no-openipmigui-man.patch | 27 ++--- ...openipmi-remove-host-path-from-la_LDFLAGS.patch | 30 +++--- .../files/openipmigui-not-compile-pyc-pyo.patch | 26 ----- .../recipes-support/openipmi/openipmi_2.0.25.bb | 111 -------------------- .../recipes-support/openipmi/openipmi_2.0.27.bb | 112 +++++++++++++++++++++ 10 files changed, 211 insertions(+), 210 deletions(-) delete mode 100644 meta-networking/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch create mode 100644 meta-networking/recipes-support/openipmi/files/ipmi_serial_bmc_emu.c-include-readline.h-from-readli.patch delete mode 100644 meta-networking/recipes-support/openipmi/files/openipmigui-not-compile-pyc-pyo.patch delete mode 100644 meta-networking/recipes-support/openipmi/openipmi_2.0.25.bb create mode 100644 meta-networking/recipes-support/openipmi/openipmi_2.0.27.bb diff --git a/meta-networking/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch b/meta-networking/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch deleted file mode 100644 index d4e02be450..0000000000 --- a/meta-networking/recipes-support/openipmi/files/do-not-install-pyc-and-pyo.patch +++ /dev/null @@ -1,25 +0,0 @@ -Do not install pyc and pyo for python module - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Yi Zhao ---- - 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-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch b/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch index 449142fcfa..2434884248 100644 --- a/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch +++ b/meta-networking/recipes-support/openipmi/files/fix-symlink-install-error-in-cmdlang.patch @@ -1,18 +1,23 @@ -Author: Aws Ismail -Date: Thu Jun 7 16:00:13 2012 -0400 +From 7854c60c92243adb14ea89e16fc226d2e47dd4f9 Mon Sep 17 00:00:00 2001 +From: Aws Ismail +Date: Thu, 7 Jun 2012 16:00:13 -0400 +Subject: [PATCH] Fix symlink install error in cmdlang - 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 +This patch fixes the error during the install stage when +creating a symbolic link for opeipmish in openipmi/cmdlang -Index: OpenIPMI-2.0.24/cmdlang/Makefile.am -=================================================================== ---- OpenIPMI-2.0.24.orig/cmdlang/Makefile.am -+++ OpenIPMI-2.0.24/cmdlang/Makefile.am -@@ -35,6 +35,7 @@ openipmish_LDADD = libOpenIPMIcmdlang.l +Upstream-Status: Pending + +Signed-off-by: Aws Ismail +--- + cmdlang/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cmdlang/Makefile.am b/cmdlang/Makefile.am +index 0ca3827..d9a941f 100644 +--- a/cmdlang/Makefile.am ++++ b/cmdlang/Makefile.am +@@ -35,6 +35,7 @@ openipmish_LDADD = libOpenIPMIcmdlang.la \ # compatability. install-data-local: rm -f $(DESTDIR)$(bindir)/ipmish diff --git a/meta-networking/recipes-support/openipmi/files/include_sys_types.patch b/meta-networking/recipes-support/openipmi/files/include_sys_types.patch index 082511a67b..61b39995a6 100644 --- a/meta-networking/recipes-support/openipmi/files/include_sys_types.patch +++ b/meta-networking/recipes-support/openipmi/files/include_sys_types.patch @@ -1,12 +1,25 @@ +From 4f41e090e33a00117a27f0c77b6338fb8b495f37 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 2 Jun 2017 21:58:32 -0700 +Subject: [PATCH] openipmi: Fix build with musl + include sys/types.h for u_int32_t ui.c:340:5: error: unknown type name 'u_int32_t'; did you mean 'uint32_t'? u_int32_t addr; ^~~~~~~~~ -Index: OpenIPMI-2.0.24/ui/ui.c -=================================================================== ---- OpenIPMI-2.0.24.orig/ui/ui.c -+++ OpenIPMI-2.0.24/ui/ui.c + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + ui/ui.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/ui/ui.c b/ui/ui.c +index 529ff22..066d118 100644 +--- a/ui/ui.c ++++ b/ui/ui.c @@ -42,6 +42,7 @@ #include #include diff --git a/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch b/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch index 51a398ba53..c4559c97b7 100644 --- a/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch +++ b/meta-networking/recipes-support/openipmi/files/ipmi-init-fix-the-arguments.patch @@ -1,3 +1,6 @@ +From 6542ebe7a0d37dee8e9afb856feb8f6c3d334632 Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Mon, 29 Dec 2014 18:16:04 +0800 Subject: [PATCH] ipmi-init: fix the arguments The functions success/failure/warning defined in /etc/init.d/functions @@ -12,7 +15,7 @@ Signed-off-by: Jackie Huang 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ipmi.init b/ipmi.init -index 2ebcd94..d8161c5 100644 +index ea10b11..aac9f83 100644 --- a/ipmi.init +++ b/ipmi.init @@ -45,17 +45,17 @@ elif [ -r /etc/init.d/functions ]; then @@ -36,6 +39,4 @@ index 2ebcd94..d8161c5 100644 echo ;; *) --- -1.9.1 diff --git a/meta-networking/recipes-support/openipmi/files/ipmi_serial_bmc_emu.c-include-readline.h-from-readli.patch b/meta-networking/recipes-support/openipmi/files/ipmi_serial_bmc_emu.c-include-readline.h-from-readli.patch new file mode 100644 index 0000000000..e208de8b28 --- /dev/null +++ b/meta-networking/recipes-support/openipmi/files/ipmi_serial_bmc_emu.c-include-readline.h-from-readli.patch @@ -0,0 +1,31 @@ +From bebfb3c24582ec4e45d79c5b52135197bf7373da Mon Sep 17 00:00:00 2001 +From: Yi Zhao +Date: Fri, 14 Jun 2019 14:17:34 +0800 +Subject: [PATCH] ipmi_serial_bmc_emu.c: include readline.h from readline + +The libedit had been removed and swithed to readline. +We need to include readline.h from readline rather than editline. + +Upstream-Status: Pending + +Signed-off-by: Yi Zhao +--- + sample/ipmi_serial_bmc_emu.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sample/ipmi_serial_bmc_emu.c b/sample/ipmi_serial_bmc_emu.c +index e0ae019..1b8bb9a 100644 +--- a/sample/ipmi_serial_bmc_emu.c ++++ b/sample/ipmi_serial_bmc_emu.c +@@ -42,7 +42,7 @@ + #include + #include + #include +-#include ++#include + + #define _GNU_SOURCE + #include +-- +2.7.4 + diff --git a/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch b/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch index 1fa68f9bac..858adc50a8 100644 --- a/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch +++ b/meta-networking/recipes-support/openipmi/files/openipmi-no-openipmigui-man.patch @@ -1,16 +1,19 @@ -Author: Aws Ismail -Date: Thu Jun 7 12:28:34 2012 -0400 +From a6ffa3939a3ab2ad6a8d277cd8292b7dad6469c6 Mon Sep 17 00:00:00 2001 +From: Aws Ismail +Date: Thu, 7 Jun 2012 12:28:34 -0400 +Subject: [PATCH] Do not build openipmigui man page - 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 - Signed-off-by: Yi Zhao +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 +Signed-off-by: Yi Zhao +--- + man/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/Makefile.am b/man/Makefile.am index 632f55b..5ce79f5 100644 diff --git a/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch b/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch index 83485a9e60..ce37d5eb28 100644 --- a/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch +++ b/meta-networking/recipes-support/openipmi/files/openipmi-remove-host-path-from-la_LDFLAGS.patch @@ -1,4 +1,4 @@ -From aa0dc0783a6ff5fb56c914b640836223e3c192bb Mon Sep 17 00:00:00 2001 +From 6395659ca6d64b20bf78bb640c2cc523d6c1d9c2 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Mon, 29 Dec 2014 18:16:04 +0800 Subject: [PATCH] remove host path from la_LDFLAGS @@ -7,17 +7,15 @@ Upstream-Status: Inappropriate [ cross compile specific ] Signed-off-by: Jackie Huang --- - cmdlang/Makefile.am | 2 +- - glib/Makefile.am | 4 ++-- - tcl/Makefile.am | 2 +- - unix/Makefile.am | 4 ++-- - 4 files changed, 6 insertions(+), 6 deletions(-) + cmdlang/Makefile.am | 3 +-- + unix/Makefile.am | 6 ++---- + 2 files changed, 3 insertions(+), 6 deletions(-) -Index: OpenIPMI-2.0.24/cmdlang/Makefile.am -=================================================================== ---- OpenIPMI-2.0.24.orig/cmdlang/Makefile.am -+++ OpenIPMI-2.0.24/cmdlang/Makefile.am -@@ -15,8 +15,7 @@ libOpenIPMIcmdlang_la_SOURCES = cmdlang. +diff --git a/cmdlang/Makefile.am b/cmdlang/Makefile.am +index d9a941f..21b9531 100644 +--- a/cmdlang/Makefile.am ++++ b/cmdlang/Makefile.am +@@ -15,8 +15,7 @@ libOpenIPMIcmdlang_la_SOURCES = cmdlang.c cmd_domain.c cmd_entity.c cmd_mc.c \ libOpenIPMIcmdlang_la_LIBADD = -lm \ $(top_builddir)/utils/libOpenIPMIutils.la \ $(top_builddir)/lib/libOpenIPMI.la @@ -27,11 +25,11 @@ Index: OpenIPMI-2.0.24/cmdlang/Makefile.am bin_PROGRAMS = openipmish -Index: OpenIPMI-2.0.24/unix/Makefile.am -=================================================================== ---- OpenIPMI-2.0.24.orig/unix/Makefile.am -+++ OpenIPMI-2.0.24/unix/Makefile.am -@@ -10,14 +10,12 @@ lib_LTLIBRARIES = libOpenIPMIposix.la li +diff --git a/unix/Makefile.am b/unix/Makefile.am +index 5128839..bd0f897 100644 +--- a/unix/Makefile.am ++++ b/unix/Makefile.am +@@ -10,14 +10,12 @@ lib_LTLIBRARIES = libOpenIPMIposix.la libOpenIPMIpthread.la libOpenIPMIpthread_la_SOURCES = posix_thread_os_hnd.c selector.c libOpenIPMIpthread_la_LIBADD = -lpthread $(GDBM_LIB) \ $(top_builddir)/utils/libOpenIPMIutils.la $(RT_LIB) diff --git a/meta-networking/recipes-support/openipmi/files/openipmigui-not-compile-pyc-pyo.patch b/meta-networking/recipes-support/openipmi/files/openipmigui-not-compile-pyc-pyo.patch deleted file mode 100644 index 3894075906..0000000000 --- a/meta-networking/recipes-support/openipmi/files/openipmigui-not-compile-pyc-pyo.patch +++ /dev/null @@ -1,26 +0,0 @@ -openipmi load swig/python/.libs/_OpenIPMI.so to create .pyc and .pyo files. -It fails when multilib is enable: - -| ImportError: .../lib32-openipmi/2.0.25-r0/OpenIPMI-2.0.25/swig/python/.libs/_OpenIPMI.so: wrong ELF class: ELFCLASS32 - -Don't compile and install .pyc and .pyo files to fix the failure. - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Kai Kang -diff --git a/swig/python/openipmigui/Makefile.am b/swig/python/openipmigui/Makefile.am -index 570e7b9..88258bf 100644 ---- a/swig/python/openipmigui/Makefile.am -+++ b/swig/python/openipmigui/Makefile.am -@@ -34,9 +34,9 @@ localcopy: - fi \ - done - --all-local: localcopy $(PYC_FILES) $(PYO_FILES) -+all-local: localcopy - --install-exec-local: $(EXTRA_DIST) $(PYC_FILES) $(PYO_FILES) -+install-exec-local: $(EXTRA_DIST) - $(INSTALL) -d $(DESTDIR)$(PYTHON_INSTALL_DIR)/openipmigui - $(INSTALL_DATA) $^ $(DESTDIR)$(PYTHON_INSTALL_DIR)/openipmigui - diff --git a/meta-networking/recipes-support/openipmi/openipmi_2.0.25.bb b/meta-networking/recipes-support/openipmi/openipmi_2.0.25.bb deleted file mode 100644 index f0426ce362..0000000000 --- a/meta-networking/recipes-support/openipmi/openipmi_2.0.25.bb +++ /dev/null @@ -1,111 +0,0 @@ -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://ipmi-init-fix-the-arguments.patch \ - file://do-not-install-pyc-and-pyo.patch \ - file://include_sys_types.patch \ - file://openipmigui-not-compile-pyc-pyo.patch \ - file://openipmi-helper \ - file://ipmi.service \ - " - -S = "${WORKDIR}/OpenIPMI-${PV}" -SRC_URI[md5sum] = "1461ac4d78fc516646fd0a6e605a8b05" -SRC_URI[sha256sum] = "f0f1a0ec732409930b7a31a6daa6cf39b585f52059b62a5f092b7ece21aa75a5" - -inherit autotools-brokensep pkgconfig pythonnative perlnative update-rc.d systemd cpan-base - -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" - -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_CFLAGS/s:-I .* :-I ${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}/CORE :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" diff --git a/meta-networking/recipes-support/openipmi/openipmi_2.0.27.bb b/meta-networking/recipes-support/openipmi/openipmi_2.0.27.bb new file mode 100644 index 0000000000..51cc256890 --- /dev/null +++ b/meta-networking/recipes-support/openipmi/openipmi_2.0.27.bb @@ -0,0 +1,112 @@ +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 \ + readline \ + " + +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://ipmi-init-fix-the-arguments.patch \ + file://include_sys_types.patch \ + file://ipmi_serial_bmc_emu.c-include-readline.h-from-readli.patch \ + file://openipmi-helper \ + file://ipmi.service \ + " + +S = "${WORKDIR}/OpenIPMI-${PV}" + +SRC_URI[md5sum] = "d525ceaa07df5440674e7e68a6772fe7" +SRC_URI[sha256sum] = "f3b1fafaaec2e2bac32fec5a86941ad8b8cb64543470bd6d819d7b166713d20b" + +inherit autotools-brokensep pkgconfig pythonnative perlnative update-rc.d systemd cpan-base + +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" + +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_CFLAGS/s:-I .* :-I ${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}/CORE :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" -- cgit 1.2.3-korg