Hi Jörg Frings-Fürst

I lost some days until today in debugging this kind of troubles (they are build 
failures in ubuntu, as
they should be)

and with help from Adam Conrad, I think I went to a better patch then your one 
:)

I uploaded it on Ubuntu:

basically:
-switch to autoreconf
-use gnu99 dialect.
-fix some warnings about "INCLUDES" keyword
"export AUTOMAKE = automake --foreign"

to  avoid the "NEWS" file error.
I'm attaching a debdiff, I can sponsor it whenever you want :)

let me know if it is ok for you!

cheers,

G.
diff -Nru ipmitool-1.8.16/debian/changelog ipmitool-1.8.16/debian/changelog
--- ipmitool-1.8.16/debian/changelog    2016-02-23 07:07:56.000000000 +0100
+++ ipmitool-1.8.16/debian/changelog    2016-03-14 12:16:27.000000000 +0100
@@ -1,3 +1,19 @@
+ipmitool (1.8.16-2) unstable; urgency=medium
+
+  [ Jörg Frings-Fürst ]
+  * New debian/patches/0001-Dialect_change.patch (Closes: #816491):
+    - Change dialect from c99 to gnu99 to prevend segfaults
+      on missing functions.
+    - Add autoreconf and remove dh_autotools-dev to/from debian/rules
+      and debian/control.
+  * Correct Vcs-Git uri.
+
+  [ Gianfranco Costamagna ]
+  * New debian/patches/0002-Fix-automake-warnings.patch
+    - fix many issues about old automake keywords.
+
+ -- Jörg Frings-Fürst <deb...@jff-webhosting.net>  Sun, 13 Mar 2016 12:31:08 
+0100
+
 ipmitool (1.8.16-1) unstable; urgency=medium
 
   * New upstream release (Closes: #810827).
diff -Nru ipmitool-1.8.16/debian/control ipmitool-1.8.16/debian/control
--- ipmitool-1.8.16/debian/control      2016-02-23 07:01:49.000000000 +0100
+++ ipmitool-1.8.16/debian/control      2016-03-14 12:12:17.000000000 +0100
@@ -3,8 +3,8 @@
 Priority: optional
 Maintainer: Jörg Frings-Fürst <deb...@jff-webhosting.net>
 Build-Depends:
- autotools-dev,
  debhelper (>> 9),
+ dh-autoreconf,
  dh-systemd (>= 1.5),
  libncurses-dev,
  libfreeipmi-dev [!hurd-i386],
@@ -12,7 +12,7 @@
  libssl-dev
 Standards-Version: 3.9.7
 Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/ipmitool.git
-Vcs-Git: https://anonscm.debian.org/collab-maint/ipmitool.git
+Vcs-Git: https://anonscm.debian.org/git/collab-maint/ipmitool.git
 Homepage: https://sourceforge.net/projects/ipmitool/
 
 Package: ipmitool
diff -Nru ipmitool-1.8.16/debian/patches/0001-Dialect_change.patch 
ipmitool-1.8.16/debian/patches/0001-Dialect_change.patch
--- ipmitool-1.8.16/debian/patches/0001-Dialect_change.patch    1970-01-01 
01:00:00.000000000 +0100
+++ ipmitool-1.8.16/debian/patches/0001-Dialect_change.patch    2016-03-03 
02:11:52.000000000 +0100
@@ -0,0 +1,22 @@
+Description: Change Dialect to -std=gnu99
+ based in comments from dann frazier <da...@debian.org>
+Author: Jörg Frings-Fürst <deb...@jff-webhosting.net>
+Bug: 
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=816491
+Forwarded: 
+Last-Update: 2016-03-03
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/configure.ac
+===================================================================
+--- trunk.orig/configure.ac
++++ trunk/configure.ac
+@@ -32,7 +32,7 @@ AC_CHECK_FUNCS([alarm gethostbyname geta
+ AC_CHECK_FUNCS([memmove memset strchr strdup strerror])
+ AC_CHECK_FUNCS([getpassphrase])
+ 
+-CFLAGS="$CFLAGS -Wall -Wextra -std=c99 -pedantic -Wformat -Wformat-nonliteral"
++CFLAGS="$CFLAGS -Wall -Wextra -std=gnu99 -pedantic -Wformat 
-Wformat-nonliteral"
+ 
+ AM_PROG_LIBTOOL
+ LIBTOOL="$LIBTOOL --silent"
diff -Nru ipmitool-1.8.16/debian/patches/0002-Fix-automake-warnings.patch 
ipmitool-1.8.16/debian/patches/0002-Fix-automake-warnings.patch
--- ipmitool-1.8.16/debian/patches/0002-Fix-automake-warnings.patch     
1970-01-01 01:00:00.000000000 +0100
+++ ipmitool-1.8.16/debian/patches/0002-Fix-automake-warnings.patch     
2016-03-14 12:14:08.000000000 +0100
@@ -0,0 +1,149 @@
+Author: Gianfranco Costamagna <locutusofb...@debian.org>
+Description: this fixes some build failures, such as:
+ Function `index' implicitly converted to pointer at ipmi_sel.c:2397
+ Function `strtok_r' implicitly converted to pointer at ipmi_chassis.c:789
+ Function `strdup' implicitly converted to pointer at log.c:112
+ Function `getpass' implicitly converted to pointer at ipmi_user.c:486
+ Function `getpass' implicitly converted to pointer at ipmi_main.c:524
+
+--- ipmitool-1.8.16.orig/lib/Makefile.am
++++ ipmitool-1.8.16/lib/Makefile.am
+@@ -28,7 +28,7 @@
+ # LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
+ # EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ 
+-INCLUDES                      = -I$(top_srcdir)/include
++AM_CPPFLAGS                   = -I$(top_srcdir)/include
+ MAINTAINERCLEANFILES          = Makefile.in
+ 
+ noinst_LTLIBRARIES            = libipmitool.la
+--- ipmitool-1.8.16.orig/src/Makefile.am
++++ ipmitool-1.8.16/src/Makefile.am
+@@ -28,7 +28,7 @@
+ # LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
+ # EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ 
+-INCLUDES              = -I$(top_srcdir)/include
++AM_CPPFLAGS           = -I$(top_srcdir)/include
+ SUBDIRS                       = plugins
+ 
+ MAINTAINERCLEANFILES  = Makefile.in
+--- ipmitool-1.8.16.orig/src/plugins/Makefile.am
++++ ipmitool-1.8.16/src/plugins/Makefile.am
+@@ -30,7 +30,7 @@
+ 
+ MAINTAINERCLEANFILES          = Makefile.in
+ 
+-INCLUDES                      = -I$(top_srcdir)/include
++AM_CPPFLAGS                   = -I$(top_srcdir)/include
+ 
+ SUBDIRS                               = @INTF_LAN@ @INTF_LANPLUS@ @INTF_OPEN@ 
@INTF_LIPMI@ @INTF_IMB@ @INTF_BMC@ @INTF_FREE@ @INTF_SERIAL@ @INTF_DUMMY@ 
@INTF_USB@
+ DIST_SUBDIRS                  = lan lanplus open lipmi imb bmc free serial 
dummy usb
+--- ipmitool-1.8.16.orig/src/plugins/bmc/Makefile.am
++++ ipmitool-1.8.16/src/plugins/bmc/Makefile.am
+@@ -30,7 +30,7 @@
+ 
+ MAINTAINERCLEANFILES  = Makefile.in
+ 
+-INCLUDES              = -I$(top_srcdir)/include
++AM_CPPFLAGS           = -I$(top_srcdir)/include
+ 
+ EXTRA_LTLIBRARIES     = libintf_bmc.la
+ noinst_LTLIBRARIES    = @INTF_BMC_LIB@
+--- ipmitool-1.8.16.orig/src/plugins/dummy/Makefile.am
++++ ipmitool-1.8.16/src/plugins/dummy/Makefile.am
+@@ -1,6 +1,6 @@
+ MAINTAINERCLEANFILES  = Makefile.in
+ 
+-INCLUDES              = -I$(top_srcdir)/include
++AM_CPPFLAGS           = -I$(top_srcdir)/include
+ 
+ EXTRA_LTLIBRARIES     = libintf_dummy.la
+ noinst_LTLIBRARIES    = @INTF_DUMMY_LIB@
+--- ipmitool-1.8.16.orig/src/plugins/free/Makefile.am
++++ ipmitool-1.8.16/src/plugins/free/Makefile.am
+@@ -1,6 +1,6 @@
+ MAINTAINERCLEANFILES           = Makefile.in
+ 
+-INCLUDES                       = -I$(top_srcdir)/include
++AM_CPPFLAGS                       = -I$(top_srcdir)/include
+ 
+ EXTRA_LTLIBRARIES              = libintf_free.la
+ noinst_LTLIBRARIES             = @INTF_FREE_LIB@
+--- ipmitool-1.8.16.orig/src/plugins/imb/Makefile.am
++++ ipmitool-1.8.16/src/plugins/imb/Makefile.am
+@@ -30,7 +30,7 @@
+ 
+ MAINTAINERCLEANFILES  = Makefile.in
+ 
+-INCLUDES              = -I$(top_srcdir)/include
++AM_CPPFLAGS           = -I$(top_srcdir)/include
+ 
+ EXTRA_LTLIBRARIES     = libintf_imb.la
+ noinst_LTLIBRARIES    = @INTF_IMB_LIB@
+--- ipmitool-1.8.16.orig/src/plugins/lan/Makefile.am
++++ ipmitool-1.8.16/src/plugins/lan/Makefile.am
+@@ -30,7 +30,7 @@
+ 
+ MAINTAINERCLEANFILES  = Makefile.in
+ 
+-INCLUDES              = -I$(top_srcdir)/include
++AM_CPPFLAGS           = -I$(top_srcdir)/include
+ 
+ EXTRA_LTLIBRARIES     = libintf_lan.la
+ noinst_LTLIBRARIES    = @INTF_LAN_LIB@
+--- ipmitool-1.8.16.orig/src/plugins/lanplus/Makefile.am
++++ ipmitool-1.8.16/src/plugins/lanplus/Makefile.am
+@@ -30,7 +30,7 @@
+ 
+ MAINTAINERCLEANFILES  = Makefile.in
+ 
+-INCLUDES              = -I$(top_srcdir)/include
++AM_CPPFLAGS           = -I$(top_srcdir)/include
+ 
+ EXTRA_LTLIBRARIES     = libintf_lanplus.la
+ noinst_LTLIBRARIES    = @INTF_LANPLUS_LIB@
+--- ipmitool-1.8.16.orig/src/plugins/lipmi/Makefile.am
++++ ipmitool-1.8.16/src/plugins/lipmi/Makefile.am
+@@ -30,7 +30,7 @@
+ 
+ MAINTAINERCLEANFILES          = Makefile.in
+ 
+-INCLUDES                      = -I$(top_srcdir)/include
++AM_CPPFLAGS                   = -I$(top_srcdir)/include
+ 
+ EXTRA_LTLIBRARIES             = libintf_lipmi.la
+ noinst_LTLIBRARIES            = @INTF_LIPMI_LIB@
+--- ipmitool-1.8.16.orig/src/plugins/open/Makefile.am
++++ ipmitool-1.8.16/src/plugins/open/Makefile.am
+@@ -30,7 +30,7 @@
+ 
+ MAINTAINERCLEANFILES  = Makefile.in
+ 
+-INCLUDES              = -I$(top_srcdir)/include
++AM_CPPFLAGS           = -I$(top_srcdir)/include
+ 
+ EXTRA_LTLIBRARIES     = libintf_open.la
+ noinst_LTLIBRARIES    = @INTF_OPEN_LIB@
+--- ipmitool-1.8.16.orig/src/plugins/serial/Makefile.am
++++ ipmitool-1.8.16/src/plugins/serial/Makefile.am
+@@ -30,7 +30,7 @@
+ 
+ MAINTAINERCLEANFILES  = Makefile.in
+ 
+-INCLUDES              = -I$(top_srcdir)/include
++AM_CPPFLAGS           = -I$(top_srcdir)/include
+ 
+ EXTRA_LTLIBRARIES     = libintf_serial.la
+ noinst_LTLIBRARIES    = @INTF_SERIAL_LIB@
+--- ipmitool-1.8.16.orig/src/plugins/usb/Makefile.am
++++ ipmitool-1.8.16/src/plugins/usb/Makefile.am
+@@ -31,7 +31,7 @@
+ 
+ MAINTAINERCLEANFILES  = Makefile.in
+ 
+-INCLUDES              = -I$(top_srcdir)/include
++AM_CPPFLAGS           = -I$(top_srcdir)/include
+ 
+ EXTRA_LTLIBRARIES     = libintf_usb.la
+ noinst_LTLIBRARIES    = @INTF_USB_LIB@
diff -Nru ipmitool-1.8.16/debian/patches/series 
ipmitool-1.8.16/debian/patches/series
--- ipmitool-1.8.16/debian/patches/series       2016-02-20 03:17:02.000000000 
+0100
+++ ipmitool-1.8.16/debian/patches/series       2016-03-14 12:15:49.000000000 
+0100
@@ -4,3 +4,5 @@
 0500-fix_CVE-2011-4339.patch
 0610-readme_typo.patch
 0600-manpage_longlines.patch
+0001-Dialect_change.patch
+0002-Fix-automake-warnings.patch
diff -Nru ipmitool-1.8.16/debian/rules ipmitool-1.8.16/debian/rules
--- ipmitool-1.8.16/debian/rules        2015-01-05 14:30:13.000000000 +0100
+++ ipmitool-1.8.16/debian/rules        2016-03-14 12:17:22.000000000 +0100
@@ -9,9 +9,10 @@
 # Hardening
 #
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export AUTOMAKE = automake --foreign
 
 %:
-       dh $@ --with systemd,autotools-dev
+       dh $@ --with systemd,autoreconf
 
 override_dh_auto_install:
        dh_auto_install

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to