mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
Enhance OpenIPMI driver detection to ipmitool to find FreeBSD's
compatible version in sys/ipmi.h if it exists. Enable OpenIPMI mode. Initial patches by me, polishing by Dmitry (maintainer). Dmitry will be submitting these changes to the ipmitool developers. Approved by: Maintainer
This commit is contained in:
parent
6412e0ec80
commit
de8de48fb8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=156185
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= ipmitool
|
||||
PORTVERSION= 1.8.6
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
@ -16,12 +17,14 @@ COMMENT= CLI to manage IPMI systems
|
||||
|
||||
USE_GMAKE= yes
|
||||
USE_OPENSSL= yes
|
||||
USE_AUTOTOOLS= autoconf:259 libtool:15 aclocal:19 automake:19
|
||||
# libtool15 installs it's aclocal macros into ${LOCALBASE}/share/aclocal
|
||||
ACLOCAL_ARGS= --acdir=${ACLOCAL_DIR} -I ${LOCALBASE}/share/aclocal
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
|
||||
# On FreeBSD only lan and lanplus interfaces are supported at this time
|
||||
CONFIGURE_ARGS+= --enable-intf-lan --enable-intf-lanplus \
|
||||
--disable-intf-open --disable-intf-imb --disable-intf-lipmi \
|
||||
--disable-intf-bmc
|
||||
--disable-intf-imb --disable-intf-lipmi --disable-intf-bmc \
|
||||
${OPENIPMI_OPT}
|
||||
PLIST_FILES= bin/ipmitool sbin/ipmievd
|
||||
PLIST_DIRS= share/${PORTNAME}
|
||||
PORTDOCS= README AUTHORS ChangeLog COPYING
|
||||
@ -35,4 +38,19 @@ DATAFILES= bmclanconf ipmi.init.basic ipmi.init.redhat README \
|
||||
PLIST_FILES+= share/${PORTNAME}/${f}
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
# Silence automake about missing files
|
||||
pre-configure:
|
||||
@${TOUCH} ${WRKSRC}/NEWS ${WRKSRC}/INSTALL
|
||||
|
||||
# FreeBSD has OpenIPMI-compatible driver, ipmi(4),
|
||||
# in 7-current after 2006-02-12. On older systems
|
||||
# only lan and lanplus interfaces are supported.
|
||||
.if exists(/usr/include/sys/ipmi.h)
|
||||
OPENIPMI_OPT= --enable-intf-open
|
||||
.else
|
||||
OPENIPMI_OPT= --disable-intf-open
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
45
sysutils/ipmitool/files/patch-aa
Normal file
45
sysutils/ipmitool/files/patch-aa
Normal file
@ -0,0 +1,45 @@
|
||||
diff -ruN ../ipmitool-1.8.6/config.h.in ./config.h.in
|
||||
--- ../ipmitool-1.8.6/config.h.in Tue Jan 17 23:54:02 2006
|
||||
+++ ./config.h.in Thu Feb 16 15:41:18 2006
|
||||
@@ -24,6 +24,9 @@
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
+/* Define to 1 if you have the <sys/ipmi.h> header file. */
|
||||
+#undef HAVE_FREEBSD_IPMI_H
|
||||
+
|
||||
/* Define to 1 if you have the `gethostbyname' function. */
|
||||
#undef HAVE_GETHOSTBYNAME
|
||||
|
||||
diff -ruN ../ipmitool-1.8.6/configure.in ./configure.in
|
||||
--- ../ipmitool-1.8.6/configure.in Tue Jan 17 23:50:29 2006
|
||||
+++ ./configure.in Thu Feb 16 15:48:14 2006
|
||||
@@ -192,7 +192,10 @@
|
||||
AC_CHECK_HEADER([linux/ipmi.h],
|
||||
[AC_DEFINE(HAVE_OPENIPMI_H, [1],
|
||||
[Define to 1 if you have the <linux/ipmi.h> header file.])],
|
||||
- [echo "** Unable to find OpenIPMI header files. Using internal version."])
|
||||
+ [AC_CHECK_HEADER([sys/ipmi.h],
|
||||
+ [AC_DEFINE(HAVE_FREEBSD_IPMI_H, [1],
|
||||
+ [Define to 1 if you have the <sys/ipmi.h> header file.])],
|
||||
+ [echo "** Unable to find OpenIPMI header files. Using internal version."])])
|
||||
|
||||
dnl set RPM distro tag for use in RPM name
|
||||
AC_ARG_WITH([rpm-distro],
|
||||
diff -ruN ../ipmitool-1.8.6/src/plugins/open/open.c ./src/plugins/open/open.c
|
||||
--- ../ipmitool-1.8.6/src/plugins/open/open.c Tue Jul 12 21:49:12 2005
|
||||
+++ ./src/plugins/open/open.c Thu Feb 16 15:41:51 2006
|
||||
@@ -51,9 +51,12 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
-#ifdef HAVE_OPENIPMI_H
|
||||
+#if defined(HAVE_OPENIPMI_H)
|
||||
# include <linux/compiler.h>
|
||||
# include <linux/ipmi.h>
|
||||
+#elif defined(HAVE_FREEBSD_IPMI_H)
|
||||
+/* FreeBSD OpenIPMI-compatible header */
|
||||
+# include <sys/ipmi.h>
|
||||
#else
|
||||
# include "open.h"
|
||||
#endif
|
@ -6,6 +6,8 @@ provides the ability to read the SDR and print sensor values, display
|
||||
the contents of the SEL, print FRU information, read and set LAN
|
||||
configuration parameters, and perform chassis power control."
|
||||
|
||||
Currently only LAN and LANPlus interfaces are supported on FreeBSD.
|
||||
FreeBSD has ipmi(4) driver for in-band IPMI operations in
|
||||
7-current after 2006-02-12. On older systems only out-of-band
|
||||
LAN and LANPlus interfaces are supported.
|
||||
|
||||
WWW: http://ipmitool.sourceforge.net/
|
||||
|
Loading…
Reference in New Issue
Block a user