Commit 9972408a authored by Baruch Siach's avatar Baruch Siach Committed by Peter Korsgaard
Browse files

ipmiutil: bump to version 2.9.7



Remove upstream or unneeded patches. Renumber and refresh the doc disable
patch. Add a different version of the lanplus disable fix (sent upstream) that
integrates with upstream change in this area.

Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 1c8e10e0
Loading
Loading
Loading
Loading
+0 −43
Original line number Diff line number Diff line
From 2909bfbc97559cf3e28c9045f64e3078aacca354 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat, 4 Apr 2015 17:59:32 +0200
Subject: [PATCH] configure.ac: use CC instead of gcc, full link for stack
 protector test

Using gcc directly is incorrect when cross-compiling, $CC should be
used instead.

Also, for the stack protector test, a full link is needed, since just
the compilation can work, but the link can fail due to libssp not
being available in the toolchain.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index c1193c6..61efbc5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -308,7 +308,7 @@ else
 	echo $ECHO_N "checking compile warning flags ... $ECHO_C"
 	cfwarn="-Wno-pointer-sign -Wno-sign-conversion -Wunused-result -Wgnu-designator"
 	echo "int main() { return(1); }" >$tmpc
-	gcc -o $tmpo -c $cfwarn $tmpc  >/dev/null 2>&1
+	$CC -o $tmpo -c $cfwarn $tmpc  >/dev/null 2>&1
 	if test $? -ne 0 ; then
 	   cfwarn=
 	   echo "skip"
@@ -319,7 +319,7 @@ else
 	echo $ECHO_N "checking compile fortify flags ... $ECHO_C"
 	cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
 	echo "int main() { return(1); }" >$tmpc
-	gcc -o $tmpo -c $cfhard $tmpc  >/dev/null 2>&1
+	$CC -o $tmpo $cfhard $tmpc  >/dev/null 2>&1
 	if test $? -ne 0 ; then
 	   cfhard=
 	   echo "skip"
-- 
2.1.0
+6 −5
Original line number Diff line number Diff line
@@ -7,10 +7,11 @@ Fixes:

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

diff -durN ipmiutil-2.9.5.orig/configure.ac ipmiutil-2.9.5/configure.ac
--- ipmiutil-2.9.5.orig/configure.ac	2015-04-06 12:23:01.020731749 +0200
+++ ipmiutil-2.9.5/configure.ac	2015-04-06 12:24:31.181773510 +0200
@@ -55,7 +55,7 @@
diff --git a/configure.ac b/configure.ac
index 344b27a71a35..41b6ea89167a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,7 +56,7 @@ LIB_DIR="/usr/lib"
 isredhat=0
 init_scripts="scripts/ipmi_port.sh scripts/ipmiutil_evt scripts/ipmiutil_asy scripts/ipmiutil_wdt"
 projdir=`pwd`
@@ -19,7 +20,7 @@ diff -durN ipmiutil-2.9.5.orig/configure.ac ipmiutil-2.9.5/configure.ac
 os=Linux
 
 # ltmain.sh, config.sub, et al should have been created, but check to be sure.
@@ -161,7 +161,7 @@
@@ -162,7 +162,7 @@ AC_ARG_ENABLE([standalone],
 	LANPLUS_SAM="no"
 	LD_SAMX=""
 	CFLAGS="-O2"
+38 −0
Original line number Diff line number Diff line
From: Baruch Siach <baruch@tkos.co.il>
Date: Tue, 27 Oct 2015 14:23:44 +0200
Subject: [PATCH] lib/Makefile.am: fix lanplus disable

Protect the install target as well when lanplus is disabled. Fixes the
following installation failure when openssl is missing:

In file included from lanplus.c:78:0:
./inc/ipmitool/ipmi.h:51:25: fatal error: openssl/evp.h: No such file or directory

Patch status: sent upstream
(http://sourceforge.net/p/ipmiutil/mailman/message/34572580/)

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 lib/Makefile.am | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index 805a218ab7eb..939594cfd3e5 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -51,8 +51,10 @@ distclean:
 	cd lanplus; make distclean
 	
 install:
-	$(MKDIR) ${datato}
-	cd lanplus; make install
+	if [ "$(PLUSFLAGS)" = "-DHAVE_LANPLUS" ]; then \
+	  $(MKDIR) ${datato} ; \
+	  cd lanplus; make install ; \
+	fi
 
 check:
 
-- 
2.6.1
+0 −95
Original line number Diff line number Diff line
lib: do not try to build lanplus if it is disabled

If lanplus is disabled, we do not want to build it, especially when
openssl is disabled, otherwise it fails to build with:

    make[4]: Entering directory `/home/buildroot/build/instance-0/output/build/ipmiutil-2.9.5/lib/lanplus'
    /home/buildroot/build/instance-0/output/host/usr/bin/i686-ctng-linux-gnu-gcc -DHAVE_CONFIG_H 
    -I. -I../.. -I. -I./inc   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 
    -DLINUX -DSKIP_MD2 -fPIC  -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC
    -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -Os  -c -o lanplus.o lanplus.c
    In file included from lanplus.c:78:0:
    ./inc/ipmitool/ipmi.h:51:25: fatal error: openssl/evp.h: No such file or directory

Sample build error visible at:
    http://autobuild.buildroot.org/results/04a/04a1c48d484debd7894fd32997ed50d3a0110b93/build-end.log

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

diff -durN ipmiutil-2.9.5.orig/configure.ac ipmiutil-2.9.5/configure.ac
--- ipmiutil-2.9.5.orig/configure.ac	2015-05-23 19:33:54.293468417 +0200
+++ ipmiutil-2.9.5/configure.ac	2015-05-23 19:31:41.595877435 +0200
@@ -474,6 +474,8 @@
 AC_SUBST(SHR_LINK)
 AC_SUBST(pkgconfigdir)
 
+AM_CONDITIONAL([LANPLUS], [test x$LANPLUS_SAM = xyes])
+
 AC_OUTPUT(Makefile util/Makefile lib/Makefile lib/libipmiutil.pc lib/lanplus/Makefile doc/Makefile scripts/Makefile)
 
 if test "x$sysname" = "xSunOS"; then
diff -durN ipmiutil-2.9.5.orig/lib/lanplus/Makefile.am ipmiutil-2.9.5/lib/lanplus/Makefile.am
--- ipmiutil-2.9.5.orig/lib/lanplus/Makefile.am	2014-11-04 18:46:11.000000000 +0100
+++ ipmiutil-2.9.5/lib/lanplus/Makefile.am	2015-05-23 19:32:30.956469461 +0200
@@ -1,5 +1,7 @@
 #  Makefile.am for libipmi_lanplus.so and libipmi_lanplus.a
 
+if LANPLUS
+
 ODIR 	= obj
 CFLAGS_STATIC  = @OS_CFLAGS@ -DSTATIC -fno-strict-aliasing -fPIC $(CFLAGS) 
 AM_CFLAGS  = @OS_CFLAGS@ -fPIC  @LANPLUS_CFLAGS@
@@ -53,3 +55,4 @@
 #$(ODIR)/%.o:    %.c $(ODIR)
 #	$(CC) -c $(CFLAGS_STATIC) $(INCLUDES) -o $@ $<
 
+endif
diff -durN ipmiutil-2.9.5.orig/lib/Makefile.am ipmiutil-2.9.5/lib/Makefile.am
--- ipmiutil-2.9.5.orig/lib/Makefile.am	2014-11-04 18:46:11.000000000 +0100
+++ ipmiutil-2.9.5/lib/Makefile.am	2015-05-23 19:41:06.378636668 +0200
@@ -32,28 +32,39 @@
 	    else cp -f libipmiapi64.a.redhat  libipmiapi.a; fi \
           else cp -f libipmiapi32.a libipmiapi.a; fi \
 	fi
+if LANPLUS
 	cd lanplus; make clean; make  
 	cp -f lanplus/libipmi_lanplus.a  .
+endif # LANPLUS
 
 clean:
 	rm -f libipmiapi.a lib*_lanplus.a lib*_lanplus.so
+if LANPLUS
 	cd lanplus; make clean
+endif # LANPLUS
 
 clobber:
 	rm -f libipmiapi.a lib*_lanplus.a  lib*_lanplus.so
+if LANPLUS
 	cd lanplus; make clean
+endif # LANPLUS
 	
 distclean:
 	rm -f libipmiapi.a lib*.a  lib*_lanplus.so
+if LANPLUS
 	cd lanplus; make distclean
+endif # LANPLUS
 	
 install:
 	$(MKDIR) ${datato}
+if LANPLUS
 	cd lanplus; make install
+endif # LANPLUS
 
 check:
 
 installso:
+if LANPLUS
 	@if [ -d /usr/lib64 ]; then \
 	$(MKDIR) ${lib64} ; \
 	echo "installing libipmi_lanplus into ${lib64}"; \
@@ -68,4 +79,5 @@
 	(cd ${lib32} && rm -f libipmi_lanplus.* ); \
 	../../libtool --finish ${lib64} \
 	fi
+endif # LANPLUS
 	
+0 −19
Original line number Diff line number Diff line
Avoid wchar_t redefinition

The musl C library does not define _WCHAR_T. Check also for compiler defined
__WCHAR_TYPE__.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>

diff -Nuar ipmiutil-2.9.5-orig/util/imb_api.h ipmiutil-2.9.5/util/imb_api.h
--- ipmiutil-2.9.5-orig/util/imb_api.h	2014-11-04 19:46:11.000000000 +0200
+++ ipmiutil-2.9.5/util/imb_api.h	2015-09-29 07:49:40.799063825 +0300
@@ -49,7 +49,7 @@
 /* DOS defines wchar_t in stdlib.h */
 #else 
  // defined(LINUX) | defined(SOLARIS)
-#ifndef _WCHAR_T
+#if !defined(_WCHAR_T) && !defined(__WCHAR_TYPE__)
 #define _WCHAR_T
 typedef long    wchar_t;
 #endif
Loading