Commit 56bf689c authored by Mike Hibler's avatar Mike Hibler

Port for an old version of ipmitool that we need on the Moonshots.

parent 98a5dd7a
# Created by: Dmitry Frolov <frol@nov.net>
# $FreeBSD: branches/2016Q1/sysutils/ipmitool/Makefile 402946 2015-12-04 12:33:07Z sunpoet $
PORTNAME= ipmitool-old
PORTVERSION= 1.8.15
PORTREVISION= 1
CATEGORIES= misc
MASTER_SITES= SF http://www.emulab.net/distributions/
DISTFILES= ipmitool-1.8.15.tar.bz2
WRKSRC= ${WRKDIR}/ipmitool-1.8.15
MAINTAINER= testbed-ops@emulab.net
COMMENT= CLI to manage IPMI systems
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING
USES= cpe tar:bzip2 gmake readline ssl
CPE_VENDOR= sun
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--enable-intf-lan --enable-intf-lanplus \
--disable-intf-imb --disable-intf-lipmi --disable-intf-bmc
PLIST_FILES= bin/ipmitool man/man1/ipmitool.1.gz man/man8/ipmievd.8.gz \
sbin/ipmievd share/ipmitool/oem_ibm_sel_map \
${PERIODIC_DIR}/400.status-ipmi
SUB_FILES= status-ipmi.sh
PORTDOCS= AUTHORS COPYING ChangeLog README
PERIODIC_DIR= etc/periodic/daily
OPTIONS_DEFINE= FREEIPMI DOCS
FREEIPMI_DESC= Enable support for freeipmi
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
.if defined(WITH_DEBUG)
CFLAGS+= -ggdb -Wall
.endif
.if exists(/usr/include/sys/ipmi.h)
CONFIGURE_ARGS+= --enable-intf-open
.else
CONFIGURE_ARGS+= --disable-intf-open
.endif
CONFLICTS= ipmitool
DOCS_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-Makefile.in
FREEIPMI_LIB_DEPENDS= libfreeipmi.so:sysutils/freeipmi
FREEIPMI_CPPFLAGS= -I${LOCALBASE}/include
FREEIPMI_LDFLAGS= -L${LOCALBASE}/lib
FREEIPMI_CONFIGURE_ENABLE= intf-free
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/${PERIODIC_DIR}
${INSTALL_SCRIPT} ${WRKDIR}/status-ipmi.sh ${STAGEDIR}${PREFIX}/${PERIODIC_DIR}/400.status-ipmi
.include <bsd.port.mk>
SHA256 (ipmitool-1.8.15.tar.bz2) = 4acd2df5f8740fef5c032cebee0113ec4d3bbef04a6f4dbfaf7fcc7f3eb08c40
SIZE (ipmitool-1.8.15.tar.bz2) = 747174
--- Makefile.in.orig Fri Aug 8 04:33:51 2008
+++ Makefile.in Sun Aug 10 11:12:54 2008
@@ -688,8 +688,6 @@
cp control/ipmitool.spec $(distdir)
install-data-local:
- mkdir -p $(DESTDIR)$(DOCDIR)
- $(INSTALL_DATA) $(DOCLIST) $(DESTDIR)$(DOCDIR)
uninstall-local:
-rm -rf $(DESTDIR)$(DOCDIR)
--- lib/ipmi_chassis.c.orig 2012-10-15 07:38:19.000000000 +0000
+++ lib/ipmi_chassis.c 2012-10-15 07:38:46.000000000 +0000
@@ -41,6 +41,7 @@
#include <ipmitool/ipmi_intf.h>
#include <ipmitool/ipmi_strings.h>
#include <ipmitool/ipmi_chassis.h>
+#include <ipmitool/bswap.h>
extern int verbose;
--- src/plugins/ipmi_intf.c.orig 2014-05-30 19:18:08.346626784 -0400
+++ src/plugins/ipmi_intf.c 2014-05-30 19:18:43.537804678 -0400
@@ -45,6 +45,7 @@
#include <ifaddrs.h>
#include <unistd.h>
#include <netdb.h>
+#define s6_addr16 __u6_addr.__u6_addr16
#endif
--- lib/ipmi_pef.c.orig 2012-10-15 07:41:07.000000000 +0000
+++ lib/ipmi_pef.c 2012-10-15 07:41:36.000000000 +0000
@@ -39,6 +39,7 @@
#include <ipmitool/ipmi.h>
#include <ipmitool/ipmi_intf.h>
#include <ipmitool/ipmi_pef.h>
+#include <ipmitool/bswap.h>
extern int verbose;
/*
#!/bin/sh
#
# Check status of IPMI sensors and System Event Log
#
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]
then
. /etc/defaults/periodic.conf
source_periodic_confs
fi
sdr_list_args=${daily_status_ipmi_sdr_list_args:-}
sel_list_args=${daily_status_ipmi_sel_list_args:-}
sel_cap_warn_pct=${daily_status_ipmi_sel_cap_warn_pct:-80}
ipmitool=%%PREFIX%%/bin/ipmitool
rc=0
case "${daily_status_ipmi_enable}" in
[Yy][Ee][Ss])
if [ ! -x $ipmitool ]; then
echo "\$daily_status_ipmi_enable is set but ${ipmitool}" \
"isn't executable"
exit 2
fi
echo ""
echo "Checking IPMI sensors:"
$ipmitool sdr list $sdr_list_args && rc=1 || rc=3
echo ""
echo "Checking IPMI System Event Log:"
info=`$ipmitool sel info` || exit 3
used=$(echo "${info}" | awk '/Percent Used/{print 0 + $4}')
entries=$(echo "${info}" | awk '/Entries/{print 0 + $3}')
if [ $used -gt $sel_cap_warn_pct ]; then
echo " SEL is at ${used}% capacity"
rc=3
fi
last=`cat /var/db/ipmi-sel-count 2>/dev/null || echo 0`
if [ $entries -gt $last ]; then
echo $entries > /var/db/ipmi-sel-count
echo ""
$ipmitool sel list $sel_list_args
rc=3
fi
;;
*)
rc=0
;;
esac
exit $rc
This is an old (1.8.15) version of ipmitool.
It is the last version known to work with the HP Moonshot chassis which
use bridged requests. In commit 6dec83ff5d28a4d492e6667802136436c4466cc8
this was broken (or maybe fixed, and the HP implementation is broken!)
......@@ -25,22 +25,12 @@ BATCH= yes
LIB_DEPENDS= \
libtelnet.so:${PORTSDIR}/misc/libtelnet
##
## XXX this is a newer version of ipmitool than what the FreeBSD port
## currently uses.
##
#RUN_DEPENDS= \
# ipmitool:${PORTSDIR}/misc/ipmitool-devel
# Use the standard version as of 2016Q1 ports.
RUN_DEPENDS= \
ipmitool:${PORTSDIR}/sysutils/ipmitool
RUN_DEPENDS+= \
git:${PORTSDIR}/devel/git \
gmake:${PORTSDIR}/devel/gmake \
netcat:${PORTSDIR}/net/netcat \
sudo:${PORTSDIR}/security/sudo
sudo:${PORTSDIR}/security/sudo \
ipmitool:${PORTSDIR}/sysutils/ipmitool
do-install: # empty
......
......@@ -7,7 +7,7 @@
PORTSDIR=${PORTSDIR:-/usr/ports}
PORTSUBDIR=misc
SRCDIR=`dirname $0`
PORTS="abac emulab-boss emulab-extras emulab-fs emulab-genilib emulab-ops emulab-protogeni emulab-pubsub emulab-py-m2crypto emulab-tftp-hpa emulab-tipserv ipmitool-devel libtelnet otcl xerces-c2 p5-IO-EventMux p5-IO-EventMux-Socket-MsgHdr p5-Privileges-Drop p5-RPC-Async"
PORTS="abac emulab-boss emulab-extras emulab-fs emulab-genilib emulab-ops emulab-protogeni emulab-pubsub emulab-py-m2crypto emulab-tftp-hpa emulab-tipserv emulab-ipmitool-old libtelnet otcl xerces-c2 p5-IO-EventMux p5-IO-EventMux-Socket-MsgHdr p5-Privileges-Drop p5-RPC-Async"
echo "Copying ports ..."
for PORT in $PORTS
......
......@@ -15,7 +15,7 @@
+ SUBDIR += emulab-py-m2crypto
+ SUBDIR += emulab-tftp-hpa
+ SUBDIR += emulab-tipserv
+ SUBDIR += ipmitool-devel
+ SUBDIR += emulab-ipmitool-old
+ SUBDIR += libtelnet
+ SUBDIR += otcl
+ SUBDIR += xerces-c2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment