Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "Hardware Platform Interface Library and Tools" |
| 2 | |
| 3 | DESCRIPTION = "\ |
| 4 | OpenHPI is an open source project created with the intent of providing an \ |
| 5 | implementation of the SA Forum's Hardware Platform Interface (HPI). HPI \ |
| 6 | provides an abstracted interface to managing computer hardware, typically for \ |
| 7 | chassis and rack based servers. HPI includes resource modeling; access to and \ |
| 8 | control over sensor, control, watchdog, and inventory data associated with \ |
| 9 | resources; abstracted System Event Log interfaces; hardware events and alerts; \ |
| 10 | and a managed hotswap interface. \ |
| 11 | \ |
| 12 | OpenHPI provides a modular mechanism for adding new hardware and device support \ |
| 13 | easily. Many plugins exist in the OpenHPI source tree to provide access to \ |
| 14 | various types of hardware. This includes, but is not limited to, IPMI based \ |
| 15 | servers, Blade Center, and machines which export data via sysfs. \ |
| 16 | " |
| 17 | |
| 18 | HOMEPAGE = "http://openhpi.sourceforge.net/Home" |
| 19 | SECTION = "net" |
Brad Bishop | 2d39a06 | 2019-10-28 08:33:36 -0400 | [diff] [blame] | 20 | LICENSE = "BSD-3-Clause" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 21 | LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4" |
| 22 | |
| 23 | DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs \ |
| 24 | autoconf-archive-native os-release" |
| 25 | |
| 26 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ |
| 27 | file://openhpi.init \ |
| 28 | file://openhpid.service \ |
| 29 | file://run-ptest \ |
| 30 | file://openhpi-netsnmp-cross-compile.patch \ |
| 31 | file://openhpi-sysfs-cross-compile.patch \ |
| 32 | file://openhpi-libxml2-cross-compile.patch \ |
| 33 | file://openhpi-glib-cross-compile.patch \ |
| 34 | file://openhpi-linkfix.patch \ |
| 35 | file://openhpi-fix-host-gcc.patch \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 36 | file://openhpi-fix-function-saHpiSensorThresholds.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 37 | file://openhpi-add-libnetsnmp-when-link.patch \ |
| 38 | file://openhpi-invalide-session.patch \ |
| 39 | file://openhpi-use-serial-tests-config-needed-by-ptest.patch \ |
| 40 | file://openhpi-fix-alignment-issue.patch \ |
| 41 | file://c++11.patch \ |
| 42 | file://clang-c++11.patch \ |
| 43 | file://fix-narrowing-warning.patch \ |
| 44 | file://0001-session-close-socket.patch \ |
| 45 | file://openhpi-3.6.1-ssl.patch \ |
| 46 | file://0001-Do-not-poke-at-build-host-s-etc-os-release.patch \ |
| 47 | file://cross_899198.patch \ |
| 48 | file://no-md2.patch \ |
| 49 | file://0001-include-iostream-for-cout.patch \ |
| 50 | " |
| 51 | SRC_URI[md5sum] = "fffda3deea8a0d3671a72eea9d13a4df" |
| 52 | SRC_URI[sha256sum] = "c94332a29160dd75cb799c027e614690c00263b0fabed87417707bec04c38723" |
| 53 | |
| 54 | inherit autotools pkgconfig ptest update-rc.d systemd |
| 55 | |
| 56 | PACKAGES =+ "${PN}-libs" |
| 57 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 58 | FILES:${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 59 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 60 | INSANE_SKIP:${PN}-libs = "dev-so" |
| 61 | RDEPENDS:${PN} += "${PN}-libs" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 62 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 63 | PACKAGECONFIG ??= "libgcrypt non32bit snmp-bc" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 64 | PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils," |
| 65 | PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt," |
| 66 | PACKAGECONFIG[non32bit] = "--enable-non32bit-int,--disable-non32bit-int,," |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 67 | PACKAGECONFIG[snmp-bc] = "--enable-snmp_bc,--disable-snmp_bc" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 68 | |
| 69 | export DISTRO |
| 70 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 71 | do_install:append () { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 72 | install -m 0755 -d ${D}${sysconfdir}/${BPN} |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 73 | install -m 0644 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf |
| 74 | install -m 0600 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf |
| 75 | install -m 0644 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data |
| 76 | install -m 0644 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 77 | install -m 0755 ${WORKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid |
| 78 | |
| 79 | install -d ${D}${systemd_unitdir}/system |
| 80 | install -m 0644 ${WORKDIR}/openhpid.service ${D}${systemd_unitdir}/system |
| 81 | sed -i -e "s,@SBINDIR@,${sbindir},g" -e "s,@SYSCONFDIR@,${sysconfdir},g" \ |
| 82 | ${D}${systemd_unitdir}/system/openhpid.service |
| 83 | } |
| 84 | |
| 85 | do_compile_ptest () { |
| 86 | for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do |
| 87 | dir=`dirname ${x}` |
Brad Bishop | a891d15 | 2019-09-13 06:17:45 -0400 | [diff] [blame] | 88 | case $dir in |
| 89 | *cpp/t) ;; |
| 90 | *snmp_bc/t) if ${@bb.utils.contains('PACKAGECONFIG','snmp-bc','true','false',d)} |
| 91 | then |
| 92 | oe_runmake -C ${dir} buildtest-TESTS |
| 93 | fi |
| 94 | ;; |
| 95 | *) oe_runmake -C ${dir} buildtest-TESTS ;; |
| 96 | esac |
| 97 | done |
| 98 | } |
| 99 | |
| 100 | ack_do_compile_ptest () { |
| 101 | for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do |
| 102 | dir=`dirname ${x}` |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 103 | upper=`dirname ${dir}` |
| 104 | if [ `basename ${upper}` != "cpp" ]; then |
| 105 | oe_runmake -C ${dir} buildtest-TESTS |
| 106 | fi |
| 107 | done |
| 108 | } |
| 109 | |
| 110 | do_install_ptest () { |
| 111 | cp -rf ${B}/openhpid/t/ohpi/.libs/* ${B}/openhpid/t/ohpi/ |
| 112 | TESTS="utils marshal openhpid" |
| 113 | for subtest in ${TESTS}; do |
| 114 | mkdir -p ${D}${PTEST_PATH}/${subtest}/t |
| 115 | cp -rf ${B}/${subtest}/t/* ${D}${PTEST_PATH}/${subtest}/t |
| 116 | done |
| 117 | |
| 118 | for x in `find ${D}${PTEST_PATH} -name Makefile`; do |
| 119 | sed -i "s:${S}:${PTEST_PATH}/:g" ${x}; |
| 120 | sed -i "s/^Makefile:/MM:/g" ${x}; |
| 121 | done; |
| 122 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 123 | install -m 644 ${S}/openhpid/t/ohpi/openhpi.conf ${D}${PTEST_PATH}/openhpid/t/ohpi/ |
| 124 | sed -i "s:OPENHPI_CONF=[^ ]*:OPENHPI_CONF=./openhpi.conf:g" ${D}${PTEST_PATH}/openhpid/t/ohpi/Makefile |
| 125 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 126 | mkdir -p ${D}${PTEST_PATH}/plugins/watchdog/ |
| 127 | cp -L ${D}/${libdir}/${BPN}/libwatchdog.so ${D}${PTEST_PATH}/plugins/watchdog/ |
| 128 | cp -L ${D}/${libdir}/${BPN}/libsimulator.so ${D}${PTEST_PATH}/plugins/watchdog/ |
| 129 | find ${D}${PTEST_PATH}/ -name "*.c" -exec rm {} \; |
| 130 | find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \; |
| 131 | find ${D}${PTEST_PATH}/ -name "*.h" -exec rm {} \; |
| 132 | } |
| 133 | |
| 134 | INITSCRIPT_NAME = "openhpid" |
| 135 | INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ." |
| 136 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 137 | SYSTEMD_SERVICE:${PN} = "openhpid.service" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 138 | SYSTEMD_AUTO_ENABLE = "disable" |