package/ipmitool: use versioned or custom PEN registry

The previous default URL used for the PEN registry was not stable and
could change at any time, making it unacceptable to have to update its
hash every time.

With this patch, if the PEN (Enterprise numbers) registry is installed
by the iana-assignments package, ipmitool will use it. Otherwise, the
user can provide a custom file in a rootfs overlay.

Downloading such a file is no longer supported.

Fixes:
- http://autobuild.buildroot.org/results/5ae5ee948d99679cd50d1115a7d46f4368347b4f

Co-Developed-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Co-Developed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: always look in /usr/share/misc/iana/]
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
This commit is contained in:
Dario Binacchi 2024-09-08 16:48:15 +02:00 committed by Yann E. MORIN
parent e5459a3f6a
commit 2a9d61fec1
3 changed files with 18 additions and 28 deletions

View File

@ -146,6 +146,18 @@ endif
comment "Legacy options removed in 2024.11"
config BR2_PACKAGE_IPMITOOL_PEN_REG_URI
string "IANA PEN registry moved to iana-assignment package"
help
Installation of the IANA PEN is now handled by the
iana-assignment package; to install a custom PEN,
use a rootfs-overlay for example.
config BR2_PACKAGE_IPMITOOL_PEN_REG_URI_WRAP
bool
default y if BR2_PACKAGE_IPMITOOL_PEN_REG_URI != ""
select BR2_LEGACY
config BR2_PACKAGE_ERLANG_P1_YAML
bool "erlang-p1-yaml has been renamed"
select BR2_LEGACY

View File

@ -5,22 +5,15 @@ config BR2_PACKAGE_IPMITOOL
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://github.com/ipmitool/ipmitool/
if BR2_PACKAGE_IPMITOOL
config BR2_PACKAGE_IPMITOOL_PEN_REG_URI
string "IANA PEN registry URL or path"
default "https://www.iana.org/assignments/enterprise-numbers.txt"
help
Enter an URL or a file path to the PEN registry to use.
Note that the official registry is 4MiB+ and may change any
time and is thus not guaranteed to be reproducible.
Leave empty to not use a registry; vendor IDs will be
displayed instead of the corresponding names.
config BR2_PACKAGE_IPMITOOL_LANPLUS
bool "enable lanplus interface"
select BR2_PACKAGE_OPENSSL

View File

@ -14,6 +14,7 @@ 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
@ -49,20 +50,4 @@ endef
IPMITOOL_POST_INSTALL_TARGET_HOOKS += IPMITOOL_REMOVE_IPMIEVD
endif
IPMITOOL_PEN_REG_URI = $(call qstrip,$(BR2_PACKAGE_IPMITOOL_PEN_REG_URI))
ifneq ($(IPMITOOL_PEN_REG_URI),)
ifneq ($(findstring ://,$(IPMITOOL_PEN_REG_URI)),)
IPMITOOL_EXTRA_DOWNLOADS += $(IPMITOOL_PEN_REG_URI)
BR_NO_CHECK_HASH_FOR += $(notdir $(IPMITOOL_PEN_REG_URI))
IPMITOOL_PEN_REG = $(IPMITOOL_DL_DIR)/$(notdir $(IPMITOOL_PEN_REG_URI))
else
IPMITOOL_PEN_REG = $(IPMITOOL_PEN_REG_URI)
endif #findstring
define IPMITOOL_INSTALL_PEN_REG
$(INSTALL) -D -m 0644 $(IPMITOOL_PEN_REG) \
$(TARGET_DIR)/usr/share/misc/enterprise-numbers
endef
IPMITOOL_POST_INSTALL_TARGET_HOOKS += IPMITOOL_INSTALL_PEN_REG
endif # IPMITOOL_PEN_REG_URI !empty
$(eval $(autotools-package))