Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
From 9836e2211ba8b3035a1d390bbf6a0eebe4c2439d Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Thu, 3 Nov 2022 17:19:09 +0100
|
||||
Subject: [PATCH] configure.ac: fix readline static build
|
||||
|
||||
Use pkg-config to retrieve readline dependencies such as ncurses to
|
||||
avoid the following static build when readline is built with ncurses
|
||||
support (which is raised since version 1.8.19 and
|
||||
https://github.com/ipmitool/ipmitool/commit/63dd71c39c9bf522ad3a785dd001737a285458eb):
|
||||
|
||||
** Unable to build Solaris 9 x86 IPMI interface support!
|
||||
checking for library containing readline... no
|
||||
configure: error: ** Unable to find readline required by ipmishell.
|
||||
|
||||
[...]
|
||||
|
||||
configure:15125: /tmp/instance-0/output-1/host/bin/armeb-buildroot-linux-musleabi-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O0 -g0 -static -Wall -Wextra -std=gnu11 -pedantic -Wformat -Wformat-nonliteral -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static conftest.c -lreadline -lcrypto >&5
|
||||
/tmp/instance-0/output-1/host/lib/gcc/armeb-buildroot-linux-musleabi/11.3.0/../../../../armeb-buildroot-linux-musleabi/bin/ld: /tmp/instance-0/output-1/host/armeb-buildroot-linux-musleabi/sysroot/usr/lib/libreadline.a(display.o): in function `_rl_move_cursor_relative':
|
||||
display.c:(.text+0x80fc): undefined reference to `tputs'
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/dabc6a4f49d464c129ac6bc3710011678142fcbe
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/ipmitool/ipmitool/pull/374]
|
||||
---
|
||||
configure.ac | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d6ba62b..4ee1be8 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -624,7 +624,11 @@ AC_ARG_ENABLE([ipmishell],
|
||||
|
||||
dnl check for readline library to enable ipmi shell
|
||||
if test "x$xenable_ipmishell" = "xyes"; then
|
||||
- AC_SEARCH_LIBS([readline], [readline edit], [have_readline=yes])
|
||||
+ PKG_PROG_PKG_CONFIG
|
||||
+ PKG_CHECK_MODULES([READLINE], [readline],
|
||||
+ [LIBS="$LIBS $READLINE_LIBS" have_readline=yes],
|
||||
+ [AC_SEARCH_LIBS([readline], [readline edit], [have_readline=yes])]
|
||||
+ )
|
||||
if test "x$have_readline" != "xyes"; then
|
||||
AC_MSG_ERROR([** Unable to find readline required by ipmishell.])
|
||||
xenable_ipmishell=no
|
||||
--
|
||||
2.35.1
|
||||
|
||||
36
package/ipmitool/0002-Fix-enterprise-numbers-URL.patch
Normal file
36
package/ipmitool/0002-Fix-enterprise-numbers-URL.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From 1edb0e27e44196d1ebe449aba0b9be22d376bcb6 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Amelkin <alexander@amelkin.msk.ru>
|
||||
Date: Tue, 22 Nov 2022 13:55:33 +0300
|
||||
Subject: [PATCH] Fix enterprise-numbers URL
|
||||
|
||||
IANA has changed their URL scheme, and the content at the old URL for
|
||||
enterprise-numbers switched from text/plain to text/html.
|
||||
|
||||
Fix Makefile.am to use the new URL
|
||||
|
||||
Resolves ipmitool/ipmitool#377
|
||||
|
||||
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
|
||||
|
||||
[vfazio: backport from upstream 1edb0e27e44196d1ebe449aba0b9be22d376bcb6]
|
||||
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
|
||||
---
|
||||
Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index ce3267f..3182a52 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -41,7 +41,7 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure configure-stamp \
|
||||
$(distdir).tar.gz $(distdir).tar.bz2
|
||||
|
||||
SUBDIRS = lib src include doc contrib control
|
||||
-IANA_PEN = http://www.iana.org/assignments/enterprise-numbers
|
||||
+IANA_PEN = http://www.iana.org/assignments/enterprise-numbers.txt
|
||||
|
||||
dist-hook:
|
||||
cp control/ipmitool.spec $(distdir)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
From 26b088193a55624df4cbe2a0d33c7bba5bca108d Mon Sep 17 00:00:00 2001
|
||||
From: Vincent Fazio <vfazio@gmail.com>
|
||||
Date: Sat, 7 Jan 2023 21:02:48 -0600
|
||||
Subject: [PATCH] Do not require the IANA PEN registry file
|
||||
|
||||
Previously, ipmitool would fail to run if the local copy of the IANA PEN
|
||||
registry could not be parsed.
|
||||
|
||||
When the registry is not available the manufacturer will be "Unknown" but
|
||||
ipmitool will otherwise function so should not be considered fatal.
|
||||
|
||||
Also, fix an issue with improperly handling the `oem_info_list_load`
|
||||
return value. Previously, in `ipmi_oem_info_init`, if `oem_info_list_load`
|
||||
returned a negative value due to the registry file not existing, an
|
||||
improper count would cause `oem_info_init_from_list` to aallocate a list
|
||||
that didn't encompass the full header/tail list.
|
||||
|
||||
IANA PEN registry open failed: No such file or directory
|
||||
Allocating 3 entries
|
||||
[ 1] 16777214 | A Debug Assisting Company, Ltd.
|
||||
[ 0] 1048575 | Unspecified
|
||||
|
||||
Now, use a signed int and ensure a valid count of loaded OEMs is used.
|
||||
|
||||
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
|
||||
|
||||
[vfazio: backport from upstream 26b088193a55624df4cbe2a0d33c7bba5bca108d]
|
||||
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
|
||||
---
|
||||
include/ipmitool/ipmi_strings.h | 2 +-
|
||||
lib/ipmi_main.c | 5 +----
|
||||
lib/ipmi_strings.c | 19 +++++--------------
|
||||
3 files changed, 7 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/include/ipmitool/ipmi_strings.h b/include/ipmitool/ipmi_strings.h
|
||||
index 17c37c6..d60179c 100644
|
||||
--- a/include/ipmitool/ipmi_strings.h
|
||||
+++ b/include/ipmitool/ipmi_strings.h
|
||||
@@ -55,7 +55,7 @@ extern const struct valstr ipmi_integrity_algorithms[];
|
||||
extern const struct valstr ipmi_encryption_algorithms[];
|
||||
extern const struct valstr ipmi_user_enable_status_vals[];
|
||||
extern const struct valstr *ipmi_oem_info;
|
||||
-int ipmi_oem_info_init();
|
||||
+void ipmi_oem_info_init();
|
||||
void ipmi_oem_info_free();
|
||||
|
||||
extern const struct valstr picmg_frucontrol_vals[];
|
||||
diff --git a/lib/ipmi_main.c b/lib/ipmi_main.c
|
||||
index a673a30..510bc2d 100644
|
||||
--- a/lib/ipmi_main.c
|
||||
+++ b/lib/ipmi_main.c
|
||||
@@ -853,10 +853,7 @@ ipmi_main(int argc, char ** argv,
|
||||
}
|
||||
|
||||
/* load the IANA PEN registry */
|
||||
- if (ipmi_oem_info_init()) {
|
||||
- lprintf(LOG_ERR, "Failed to initialize the OEM info dictionary");
|
||||
- goto out_free;
|
||||
- }
|
||||
+ ipmi_oem_info_init();
|
||||
|
||||
/* run OEM setup if found */
|
||||
if (oemtype &&
|
||||
diff --git a/lib/ipmi_strings.c b/lib/ipmi_strings.c
|
||||
index 26b359f..c8fc2d0 100644
|
||||
--- a/lib/ipmi_strings.c
|
||||
+++ b/lib/ipmi_strings.c
|
||||
@@ -1719,39 +1719,30 @@ out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
-int ipmi_oem_info_init()
|
||||
+void ipmi_oem_info_init()
|
||||
{
|
||||
oem_valstr_list_t terminator = { { -1, NULL}, NULL }; /* Terminator */
|
||||
oem_valstr_list_t *oemlist = &terminator;
|
||||
bool free_strings = true;
|
||||
- size_t count;
|
||||
- int rc = -4;
|
||||
+ int count;
|
||||
|
||||
lprintf(LOG_INFO, "Loading IANA PEN Registry...");
|
||||
|
||||
if (ipmi_oem_info) {
|
||||
lprintf(LOG_INFO, "IANA PEN Registry is already loaded");
|
||||
- rc = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if (!(count = oem_info_list_load(&oemlist))) {
|
||||
- /*
|
||||
- * We can't identify OEMs without a loaded registry.
|
||||
- * Set the pointer to dummy and return.
|
||||
- */
|
||||
- ipmi_oem_info = ipmi_oem_info_dummy;
|
||||
- goto out;
|
||||
+ if ((count = oem_info_list_load(&oemlist)) < 1) {
|
||||
+ lprintf(LOG_WARN, "Failed to load entries from IANA PEN Registry");
|
||||
+ count = 0;
|
||||
}
|
||||
|
||||
/* In the array was allocated, don't free the strings at cleanup */
|
||||
free_strings = !oem_info_init_from_list(oemlist, count);
|
||||
|
||||
- rc = IPMI_CC_OK;
|
||||
-
|
||||
out:
|
||||
oem_info_list_free(&oemlist, free_strings);
|
||||
- return rc;
|
||||
}
|
||||
|
||||
void ipmi_oem_info_free()
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
From be11d948f89b10be094e28d8a0a5e8fb532c7b60 Mon Sep 17 00:00:00 2001
|
||||
From: Vincent Fazio <vfazio@gmail.com>
|
||||
Date: Wed, 11 Jan 2023 22:55:51 -0600
|
||||
Subject: [PATCH] configure.ac: allow disabling registry downloads
|
||||
|
||||
Some environments require reproducible builds. Since the IANA PEN
|
||||
registry is constantly updating and there is no snapshot available,
|
||||
installing ipmitool via `make install` is not reproducible.
|
||||
|
||||
Provide a configure mechanism to disable the registry download/install..
|
||||
|
||||
[vfazio: backport from upstream be11d948f89b10be094e28d8a0a5e8fb532c7b60]
|
||||
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
|
||||
---
|
||||
configure.ac | 30 ++++++++++++++++++++----------
|
||||
1 file changed, 20 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4ee1be8..1dd2742 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -18,8 +18,6 @@ AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
AC_CHECK_PROG([RPMBUILD], [rpmbuild], [rpmbuild], [rpm])
|
||||
AC_CHECK_PROG([SED], [sed], [sed])
|
||||
-AC_CHECK_PROG([WGET], [wget], [wget])
|
||||
-AC_CHECK_PROG([CURL], [curl], [curl])
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h sys/stat.h unistd.h paths.h])
|
||||
@@ -56,21 +54,33 @@ if test "x$exec_prefix" = "xNONE"; then
|
||||
exec_prefix="$prefix"
|
||||
fi
|
||||
|
||||
-if test "x$WGET" = "x"; then
|
||||
- if test "x$CURL" = "x"; then
|
||||
+dnl allow enabling/disabling the fetching of the IANA PEN registry
|
||||
+AC_ARG_ENABLE([registry-download],
|
||||
+ [AC_HELP_STRING([--enable-registry-download],
|
||||
+ [download/install the IANA PEN registry [default=yes]])],
|
||||
+ [xenable_registry_download=$enableval],
|
||||
+ [xenable_registry_download=yes])
|
||||
+
|
||||
+AM_CONDITIONAL([DOWNLOAD], [false])
|
||||
+
|
||||
+if test "x$xenable_registry_download" = "xyes"; then
|
||||
+ AC_CHECK_PROG([WGET], [wget], [wget])
|
||||
+ AC_CHECK_PROG([CURL], [curl], [curl])
|
||||
+
|
||||
+ if test "x$WGET" = "x" && test "x$CURL" = "x"; then
|
||||
AC_MSG_WARN([** Neither wget nor curl could be found.])
|
||||
AC_MSG_WARN([** IANA PEN database will not be installed by `make install` !])
|
||||
else
|
||||
- DOWNLOAD="$CURL --location --progress-bar"
|
||||
AM_CONDITIONAL([DOWNLOAD], [true])
|
||||
+ if test "x$WGET" != "x"; then
|
||||
+ DOWNLOAD="$WGET -c -nd -O -"
|
||||
+ else
|
||||
+ DOWNLOAD="$CURL --location --progress-bar"
|
||||
+ fi
|
||||
fi
|
||||
-else
|
||||
- DOWNLOAD="$WGET -c -nd -O -"
|
||||
- AM_CONDITIONAL([DOWNLOAD], [true])
|
||||
fi
|
||||
|
||||
-AC_MSG_WARN([** Download is:])
|
||||
-AC_MSG_WARN($DOWNLOAD)
|
||||
+AC_MSG_WARN([** Download is: $DOWNLOAD])
|
||||
AC_SUBST(DOWNLOAD, $DOWNLOAD)
|
||||
|
||||
dnl
|
||||
--
|
||||
2.25.1
|
||||
|
||||
44
package/ipmitool/Config.in
Normal file
44
package/ipmitool/Config.in
Normal file
@@ -0,0 +1,44 @@
|
||||
config BR2_PACKAGE_IPMITOOL
|
||||
bool "ipmitool"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
help
|
||||
IPMItool provides a simple command-line interface to
|
||||
IPMI-enabled devices.
|
||||
|
||||
ipmitool will look up the IANA PEN (Enterprise Numbers)
|
||||
registry in /usr/share/misc/iana/. The IANA PEN is optional,
|
||||
it can be provided by the iana-assignment package or by a
|
||||
rootfs overlay.
|
||||
|
||||
https://codeberg.org/IPMITool/ipmitool/
|
||||
|
||||
if BR2_PACKAGE_IPMITOOL
|
||||
|
||||
config BR2_PACKAGE_IPMITOOL_LANPLUS
|
||||
bool "enable lanplus interface"
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
help
|
||||
Enables the IPMI v2.0 RMCP+ LAN interface typically used to
|
||||
send IPMI commands to the BMC of a remote server.
|
||||
Not needed if you only want to communicate with the local BMC
|
||||
of your device using the OpenIPMI ipmi_si kernel module, or if
|
||||
using the legacy IPMI v1.5 RMCP LAN interface.
|
||||
|
||||
config BR2_PACKAGE_IPMITOOL_USB
|
||||
bool "enable usb interface"
|
||||
help
|
||||
Enables the IPMI USB interface typically used to send inband
|
||||
IPMI commands to the BMC of a server.
|
||||
|
||||
config BR2_PACKAGE_IPMITOOL_IPMIEVD
|
||||
bool "ipmievd"
|
||||
help
|
||||
IPMI event daemon for sending events to syslog
|
||||
|
||||
config BR2_PACKAGE_IPMITOOL_IPMISHELL
|
||||
bool "ipmishell"
|
||||
select BR2_PACKAGE_READLINE
|
||||
help
|
||||
IPMI shell interface
|
||||
|
||||
endif
|
||||
3
package/ipmitool/ipmitool.hash
Normal file
3
package/ipmitool/ipmitool.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 78bc6fdbb0487652a3d0220072b9428d4ab6dfc198de2f28e8493932e6b893af ipmitool-IPMITOOL_1_8_19-git4.tar.gz
|
||||
sha256 b7e2382a8be43b5f6cb092f2d2bda163bf1a1938be9300f821a845cbcd535f56 COPYING
|
||||
55
package/ipmitool/ipmitool.mk
Normal file
55
package/ipmitool/ipmitool.mk
Normal file
@@ -0,0 +1,55 @@
|
||||
################################################################################
|
||||
#
|
||||
# ipmitool
|
||||
#
|
||||
################################################################################
|
||||
|
||||
IPMITOOL_VERSION_UPSTREAM = 1.8.19
|
||||
IPMITOOL_VERSION = IPMITOOL_$(subst .,_,$(IPMITOOL_VERSION_UPSTREAM))
|
||||
IPMITOOL_SITE = https://codeberg.org/IPMITool/ipmitool.git
|
||||
IPMITOOL_SITE_METHOD = git
|
||||
IPMITOOL_LICENSE = BSD-3-Clause
|
||||
IPMITOOL_LICENSE_FILES = COPYING
|
||||
IPMITOOL_CPE_ID_VERSION = $(IPMITOOL_VERSION_UPSTREAM)
|
||||
# From git
|
||||
IPMITOOL_AUTORECONF = YES
|
||||
IPMITOOL_DEPENDENCIES = host-pkgconf
|
||||
|
||||
IPMITOOL_CONF_OPTS = --disable-registry-download
|
||||
IPMITOOL_CONF_ENV = IANADIR=/usr/share/misc/iana
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FREEIPMI),y)
|
||||
IPMITOOL_DEPENDENCIES += freeipmi
|
||||
IPMITOOL_CONF_OPTS += --enable-intf-free
|
||||
else
|
||||
IPMITOOL_CONF_OPTS += --disable-intf-free
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_IPMITOOL_LANPLUS),y)
|
||||
IPMITOOL_DEPENDENCIES += openssl
|
||||
IPMITOOL_CONF_OPTS += --enable-intf-lanplus
|
||||
else
|
||||
IPMITOOL_CONF_OPTS += --disable-intf-lanplus
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_IPMITOOL_USB),y)
|
||||
IPMITOOL_CONF_OPTS += --enable-intf-usb
|
||||
else
|
||||
IPMITOOL_CONF_OPTS += --disable-intf-usb
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_IPMITOOL_IPMISHELL),y)
|
||||
IPMITOOL_DEPENDENCIES += readline
|
||||
IPMITOOL_CONF_OPTS += --enable-ipmishell
|
||||
else
|
||||
IPMITOOL_CONF_OPTS += --disable-ipmishell
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_IPMITOOL_IPMIEVD),)
|
||||
define IPMITOOL_REMOVE_IPMIEVD
|
||||
$(RM) -f $(TARGET_DIR)/usr/sbin/ipmievd
|
||||
endef
|
||||
IPMITOOL_POST_INSTALL_TARGET_HOOKS += IPMITOOL_REMOVE_IPMIEVD
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user