Date: Wed, 19 Sep 2012 10:19:10 +0200 (CEST) From: Niclas Zeising <zeising@daemonic.se> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/171766: [PATCH] update sysutils/ipmitool to latest version and fix build with clang Message-ID: <20120919081911.17DA6228F3@tifa.daemonic.se> Resent-Message-ID: <201209190820.q8J8K7Qb079166@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 171766 >Category: ports >Synopsis: [PATCH] update sysutils/ipmitool to latest version and fix build with clang >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Sep 19 08:20:05 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Niclas Zeising >Release: FreeBSD 10.0-CURRENT amd64 >Organization: >Environment: System: FreeBSD tifa.daemonic.se 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r231776M: Wed Feb 15 22:30:06 CET 2012 root@tifa.daemonic.se:/usr/obj/usr/src/sys/TIFA amd64 >Description: sysutils/ipmotool is out of date, and doesn't build with clang. >How-To-Repeat: >Fix: Attached patch updates sysutils/ipmitool to the latest version, which includes fixes to make it build with clang It also converts the ports to the new options framework for the freeipmi option. --- ports.ipmitool.update.1.8.12.diff begins here --- Index: sysutils/ipmitool/distinfo =================================================================== --- sysutils/ipmitool/distinfo (revision 304401) +++ sysutils/ipmitool/distinfo (working copy) @@ -1,2 +1,2 @@ -SHA256 (ipmitool-1.8.11.tar.bz2) = df219019dc2216c3b7a894edd20286b2118aa636f9990c8405674ce84948eddd -SIZE (ipmitool-1.8.11.tar.bz2) = 584416 +SHA256 (ipmitool-1.8.12.tar.bz2) = 549b2da65c30905248aee07367a9cae3dd94bceaddd9c122d55075766c868733 +SIZE (ipmitool-1.8.12.tar.bz2) = 684159 Index: sysutils/ipmitool/files/patch-include__ipmitool__ipmi_sdr.h =================================================================== --- sysutils/ipmitool/files/patch-include__ipmitool__ipmi_sdr.h (revision 304401) +++ sysutils/ipmitool/files/patch-include__ipmitool__ipmi_sdr.h (working copy) @@ -1,11 +0,0 @@ ---- ./include/ipmitool/ipmi_sdr.h.orig 2009-02-25 15:38:52.000000000 -0500 -+++ ./include/ipmitool/ipmi_sdr.h 2010-07-23 14:46:07.000000000 -0400 -@@ -277,7 +277,7 @@ - uint16_t settable:8; - #endif - } read; -- }; -+ } type; - } threshold; - } type; - } __attribute__ ((packed)); Index: sysutils/ipmitool/files/patch-src__plugins__lan__lan.c =================================================================== --- sysutils/ipmitool/files/patch-src__plugins__lan__lan.c (revision 304401) +++ sysutils/ipmitool/files/patch-src__plugins__lan__lan.c (working copy) @@ -1,10 +0,0 @@ ---- ./src/plugins/lan/lan.c.orig 2009-02-25 15:38:53.000000000 -0500 -+++ ./src/plugins/lan/lan.c 2010-07-23 14:46:07.000000000 -0400 -@@ -36,6 +36,7 @@ - #include <string.h> - #include <sys/types.h> - #include <sys/socket.h> -+#include <sys/time.h> - #include <netinet/in.h> - #include <arpa/inet.h> - #include <errno.h> Index: sysutils/ipmitool/files/patch-lib__ipmi_sdr.c =================================================================== --- sysutils/ipmitool/files/patch-lib__ipmi_sdr.c (revision 304401) +++ sysutils/ipmitool/files/patch-lib__ipmi_sdr.c (working copy) @@ -1,83 +0,0 @@ ---- ./lib/ipmi_sdr.c.orig 2009-02-25 15:38:52.000000000 -0500 -+++ ./lib/ipmi_sdr.c 2010-07-23 14:46:07.000000000 -0400 -@@ -775,7 +775,7 @@ - /* helper macro for printing sensor thresholds */ - #define SENSOR_PRINT_THRESH(NAME, READ, FLAG) \ - if (sensor->sensor.init.thresholds && \ -- sensor->mask.type.threshold.read.FLAG != 0) { \ -+ sensor->mask.type.threshold.type.read.FLAG != 0) { \ - printf(" %-21s : ", NAME); \ - printf("%.3f\n", sdr_convert_sensor_reading( \ - sensor, sensor->threshold.READ)); \ -@@ -1247,17 +1247,17 @@ - sensor->normal_min); - SENSOR_PRINT_CSV(sensor->analog_flag.normal_max, - sensor->normal_max); -- SENSOR_PRINT_CSV(sensor->mask.type.threshold.read.unr, -+ SENSOR_PRINT_CSV(sensor->mask.type.threshold.type.read.unr, - sensor->threshold.upper.non_recover); -- SENSOR_PRINT_CSV(sensor->mask.type.threshold.read.ucr, -+ SENSOR_PRINT_CSV(sensor->mask.type.threshold.type.read.ucr, - sensor->threshold.upper.critical); -- SENSOR_PRINT_CSV(sensor->mask.type.threshold.read.unc, -+ SENSOR_PRINT_CSV(sensor->mask.type.threshold.type.read.unc, - sensor->threshold.upper.non_critical); -- SENSOR_PRINT_CSV(sensor->mask.type.threshold.read.lnr, -+ SENSOR_PRINT_CSV(sensor->mask.type.threshold.type.read.lnr, - sensor->threshold.lower.non_recover); -- SENSOR_PRINT_CSV(sensor->mask.type.threshold.read.lcr, -+ SENSOR_PRINT_CSV(sensor->mask.type.threshold.type.read.lcr, - sensor->threshold.lower.critical); -- SENSOR_PRINT_CSV(sensor->mask.type.threshold.read.lnc, -+ SENSOR_PRINT_CSV(sensor->mask.type.threshold.type.read.lnc, - sensor->threshold.lower.non_critical); - - printf("%.3f,%.3f", -@@ -1485,17 +1485,17 @@ - break; - case 1: /* readable according to mask */ - case 2: /* readable and settable according to mask */ -- if (sensor->mask.type.threshold.read.lnr) -+ if (sensor->mask.type.threshold.type.read.lnr) - printf("lnr "); -- if (sensor->mask.type.threshold.read.lcr) -+ if (sensor->mask.type.threshold.type.read.lcr) - printf("lcr "); -- if (sensor->mask.type.threshold.read.lnc) -+ if (sensor->mask.type.threshold.type.read.lnc) - printf("lnc "); -- if (sensor->mask.type.threshold.read.unc) -+ if (sensor->mask.type.threshold.type.read.unc) - printf("unc "); -- if (sensor->mask.type.threshold.read.ucr) -+ if (sensor->mask.type.threshold.type.read.ucr) - printf("ucr "); -- if (sensor->mask.type.threshold.read.unr) -+ if (sensor->mask.type.threshold.type.read.unr) - printf("unr "); - printf("\n"); - break; -@@ -1511,17 +1511,17 @@ - break; - case 1: /* readable according to mask */ - case 2: /* readable and settable according to mask */ -- if (sensor->mask.type.threshold.set.lnr) -+ if (sensor->mask.type.threshold.type.set.lnr) - printf("lnr "); -- if (sensor->mask.type.threshold.set.lcr) -+ if (sensor->mask.type.threshold.type.set.lcr) - printf("lcr "); -- if (sensor->mask.type.threshold.set.lnc) -+ if (sensor->mask.type.threshold.type.set.lnc) - printf("lnc "); -- if (sensor->mask.type.threshold.set.unc) -+ if (sensor->mask.type.threshold.type.set.unc) - printf("unc "); -- if (sensor->mask.type.threshold.set.ucr) -+ if (sensor->mask.type.threshold.type.set.ucr) - printf("ucr "); -- if (sensor->mask.type.threshold.set.unr) -+ if (sensor->mask.type.threshold.type.set.unr) - printf("unr "); - printf("\n"); - break; Index: sysutils/ipmitool/files/patch-src__ipmishell.c =================================================================== --- sysutils/ipmitool/files/patch-src__ipmishell.c (revision 304401) +++ sysutils/ipmitool/files/patch-src__ipmishell.c (working copy) @@ -1,10 +0,0 @@ ---- ./src/ipmishell.c.orig 2009-02-25 15:38:52.000000000 -0500 -+++ ./src/ipmishell.c 2010-07-23 14:46:07.000000000 -0400 -@@ -57,7 +57,6 @@ - #ifdef HAVE_READLINE - - /* avoid warnings errors due to non-ANSI type declarations in readline.h */ --#define _FUNCTION_DEF - #define USE_VARARGS - #define PREFER_STDARG - Index: sysutils/ipmitool/files/patch-lib__ipmi_fru.c =================================================================== --- sysutils/ipmitool/files/patch-lib__ipmi_fru.c (revision 304401) +++ sysutils/ipmitool/files/patch-lib__ipmi_fru.c (working copy) @@ -1,21 +0,0 @@ ---- ./lib/ipmi_fru.c.orig 2009-02-25 15:38:52.000000000 -0500 -+++ ./lib/ipmi_fru.c 2010-07-23 14:46:07.000000000 -0400 -@@ -489,7 +489,8 @@ - struct ipmi_rq req; - uint8_t msg_data[25]; - uint8_t writeLength; -- uint16_t num_bloc; -+ uint16_t num_bloc; -+ t_ipmi_fru_bloc * fru_bloc; - - finish = doffset + length; /* destination offset */ - if (finish > fru->size) -@@ -498,7 +499,7 @@ - return -1; - } - -- t_ipmi_fru_bloc * fru_bloc = build_fru_bloc(intf, fru, id, &num_bloc); -+ fru_bloc = build_fru_bloc(intf, fru, id, &num_bloc); - - memset(&req, 0, sizeof(req)); - req.msg.netfn = IPMI_NETFN_STORAGE; Index: sysutils/ipmitool/files/patch-configure =================================================================== --- sysutils/ipmitool/files/patch-configure (revision 0) +++ sysutils/ipmitool/files/patch-configure (working copy) @@ -0,0 +1,11 @@ +--- configure.orig 2012-09-18 21:50:01.000000000 +0200 ++++ configure 2012-09-18 21:50:14.000000000 +0200 +@@ -5030,7 +5030,7 @@ + done + + +-CFLAGS="$CFLAGS -fno-strict-aliasing -Wreturn-type -Wno-unused-result -Wno-packed-bitfield-compat" ++CFLAGS="$CFLAGS -fno-strict-aliasing -Wreturn-type" + + case `pwd` in + *\ * | *\ *) Property changes on: sysutils/ipmitool/files/patch-configure ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: sysutils/ipmitool/Makefile =================================================================== --- sysutils/ipmitool/Makefile (revision 304401) +++ sysutils/ipmitool/Makefile (working copy) @@ -6,8 +6,7 @@ # PORTNAME= ipmitool -PORTVERSION= 1.8.11 -PORTREVISION= 4 +PORTVERSION= 1.8.12 CATEGORIES= sysutils MASTER_SITES= SF @@ -15,7 +14,6 @@ COMMENT= CLI to manage IPMI systems USE_BZIP2= yes -DOS2UNIX= ipmi_fwum.c USE_GMAKE= yes USE_OPENSSL= yes GNU_CONFIGURE= yes @@ -33,25 +31,26 @@ PERIODIC_DIR= etc/periodic/daily +OPTIONS_DEFINE= FREEIPMI +FREEIPMI_DESC= Enable support for freeipmi + .if defined(WITH_DEBUG) CFLAGS+= -ggdb -Wall .endif -.include <bsd.port.pre.mk> - -post-install: - @${MKDIR} ${PREFIX}/${PERIODIC_DIR} - @${INSTALL_SCRIPT} ${WRKDIR}/status-ipmi.sh ${PREFIX}/${PERIODIC_DIR}/400.status-ipmi - .if exists(/usr/include/sys/ipmi.h) CONFIGURE_ARGS+= --enable-intf-open .else CONFIGURE_ARGS+= --disable-intf-open .endif -.if defined(WITH_FREEIPMI) || \ - (exists(${LOCALBASE}/include/freeipmi/freeipmi.h) && \ - !defined(WITHOUT_FREEIPMI)) +.if defined(NOPORTDOCS) +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-Makefile.in +.endif + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MFREEIPMI} LIB_DEPENDS+= freeipmi:${PORTSDIR}/sysutils/freeipmi CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib @@ -60,8 +59,8 @@ CONFIGURE_ARGS+= --disable-intf-free .endif -.if defined(NOPORTDOCS) -EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-Makefile.in -.endif +post-install: + @${MKDIR} ${PREFIX}/${PERIODIC_DIR} + @${INSTALL_SCRIPT} ${WRKDIR}/status-ipmi.sh ${PREFIX}/${PERIODIC_DIR}/400.status-ipmi -.include <bsd.port.post.mk> +.include <bsd.port.mk> --- ports.ipmitool.update.1.8.12.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120919081911.17DA6228F3>