ipmitool: fix musl build
PATCH v4 1/1 ipmitool: fix musl build
Add two patches to fix musl build and one patch to make the package autoreconfigurable.
The first patch adds 'foreign' to 'AUTOMAKE_OPTIONS' to make the package autoreconfigurable.
The second patch avoids the redefinition of wchar_t by using autoconf to check for the type wchar_t. Patching configure.ac requires to set AUTORECONF = YES and add a post extract hook to create some missing files needed by autorefonf.
The third patch adds missing header include of <linux/params.h> needed for the macro EXEC_PAGESIZE defined in the Linux Kernel headers.
All patches send upstream:
https://sourceforge.net/p/ipmitool/mailman/message/35004711/
https://sourceforge.net/p/ipmitool/mailman/message/35007331/
https://sourceforge.net/p/ipmitool/mailman/message/35007330/
Fixes:
http://autobuild.buildroot.net/results/75f/75fd6f1be0271bb15078c62f3effdbb67ac07427/
http://autobuild.buildroot.net/results/cac/cacf8179a9c8142eef69562462d3c3b0b20c2879/
http://autobuild.buildroot.net/results/c10/c1045882947ff7150c750088ae1981bd99134c54/
http://autobuild.buildroot.net/results/6a7/6a770f8a3dddb15ba4d95555e74b198799278dcf/
.. and more.
---
Changes v3 -> v4:
- Remove check for _WCHAR_T which is redundant and potentially wrong (Arnout Vandecappelle)
- reorder patches, so the autoreconfigurable patch is applied first before the two patches fixing musl build actually
Changes v2 -> v3:
- use the Automake foreign strictness instead of using a hook to add files needed to make the package autoreconfigurable (Thomas Petazzoni)
Changes v1 -> v2:
- use autoconf to check for wchar_t instead of using non-standardized GNU C extension macro __WCHAR_TYPE__ (Arnout Vandecappelle)
- improve commit messages
--- .../0001-Make-the-package-autoreconfigurable.patch | 38 ++++++++++++++ .../ipmitool/0002-Avoid-wchar_t-redefinition.patch | 60 ++++++++++++++++++++++ ...-Add-missing-linux-param.h-header-include.patch | 39 ++++++++++++++ package/ipmitool/ipmitool.mk | 3 ++ 4 files changed, 140 insertions(+) create mode 100644 package/ipmitool/0001-Make-the-package-autoreconfigurable.patch create mode 100644 package/ipmitool/0002-Avoid-wchar_t-redefinition.patch create mode 100644 package/ipmitool/0003-Add-missing-linux-param.h-header-include.patch
package/ipmitool/0001-Make-the-package-autoreconfigurable.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 0d4b9d5d547b4a6e79108ac8c455e01f72a9aefa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= <[email protected]> +Date: Sun, 10 Apr 2016 11:47:14 +0200 +Subject: [PATCH 1/3] Make the package autoreconfigurable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +ipmitool is not a compliant GNU package as it does not provide some necessary +files, like NEWS, AUTHORS, etc. + +Therefor set the Automake strictness to foreign to make the package +autoreconfigurable. + +Upstream status: Pending +https://sourceforge.net/p/ipmitool/mailman/message/35004711/ + +Signed-off-by: J?rg Krause <[email protected]> +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 94e267a..9f3f7e1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -33,7 +33,7 @@ DOCLIST = $(top_srcdir)/README $(top_srcdir)/COPYING $(top_srcdir)/AUTHORS $(top + + EXTRA_DIST = $(DOCLIST) + +-AUTOMAKE_OPTIONS = dist-bzip2 ++AUTOMAKE_OPTIONS = dist-bzip2 foreign + + MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure configure-stamp \ + config.guess config.sub depcomp install-sh ltmain.sh missing \ +-- +2.8.0 +
package/ipmitool/0002-Avoid-wchar_t-redefinition.patch new file +60 -0
60 lines not on this page · raw message
package/ipmitool/0003-Add-missing-linux-param.h-header-include.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 661095378b74df564bc621ced4db72b688d87399 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= <[email protected]> +Date: Sat, 2 Apr 2016 19:47:21 +0200 +Subject: [PATCH 3/3] Add missing linux/param.h header include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes the following build failure under musl: + +imbapi.c: In function 'MapPhysicalMemory': +imbapi.c:109:19: error: 'EXEC_PAGESIZE' undeclared (first use in this function) + # define PAGESIZE EXEC_PAGESIZE + +Upstream status: Pending +https://sourceforge.net/p/ipmitool/mailman/message/35007330/ + +Signed-off-by: J?rg Krause <[email protected]> +--- + src/plugins/imb/imbapi.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/plugins/imb/imbapi.c b/src/plugins/imb/imbapi.c +index 899c47a..8a6421d 100644 +--- a/src/plugins/imb/imbapi.c ++++ b/src/plugins/imb/imbapi.c +@@ -95,6 +95,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include <stdlib.h> + #include <fcntl.h> + #include <string.h> ++#ifdef __linux__ ++#include <linux/param.h> ++#endif + #endif + #include "imbapi.h" + #include <asm/socket.h> +-- +2.8.0 +
package/ipmitool/ipmitool.mk +3 -0
@@ -10,6 +10,9 @@ IPMITOOL_SITE = http://downloads.sourceforge.net/project/ipmitool/ipmitool/$(IPM IPMITOOL_LICENSE = BSD-3c IPMITOOL_LICENSE_FILES = COPYING +# Patching configure.ac +IPMITOOL_AUTORECONF = YES + ifeq ($(BR2_PACKAGE_IPMITOOL_LANPLUS),y) IPMITOOL_DEPENDENCIES += openssl else
Signature · 1 line
2.8.0
Thomas Petazzoni
AppliedPATCH v4 1/1 ipmitool: fix musl build
Hello,
Quoted 25 lines · J?rg Krause
Add two patches to fix musl build and one patch to make the package autoreconfigurable.
The first patch adds 'foreign' to '
AUTOMAKE_OPTIONS' to make the package autoreconfigurable.The second patch avoids the redefinition of
wchar_tby using autoconf to check for the typewchar_t. Patching configure.ac requires to set AUTORECONF = YES and add a post extract hook to create some missing files needed by autorefonf.The third patch adds missing header include of <
linux/params.h> needed for the macroEXEC_PAGESIZEdefined in the Linux Kernel headers.All patches send upstream:
https://sourceforge.net/p/ipmitool/mailman/message/35004711/
https://sourceforge.net/p/ipmitool/mailman/message/35007331/
https://sourceforge.net/p/ipmitool/mailman/message/35007330/Fixes:
http://autobuild.buildroot.net/results/75f/75fd6f1be0271bb15078c62f3effdbb67ac07427/
http://autobuild.buildroot.net/results/cac/cacf8179a9c8142eef69562462d3c3b0b20c2879/
http://autobuild.buildroot.net/results/c10/c1045882947ff7150c750088ae1981bd99134c54/
http://autobuild.buildroot.net/results/6a7/6a770f8a3dddb15ba4d95555e74b198799278dcf/
.. and more.
Quoted 7 lines
Signed-off-by J?rg Krause <[email protected]>---
Changes v3 -> v4:
- Remove check for_WCHAR_Twhich is redundant and potentially wrong (Arnout Vandecappelle)
- reorder patches, so the autoreconfigurable patch is applied first before the two patches fixing musl build actually
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com