From 2a9d61fec10a1386da9769668ae64d98c08add88 Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Sun, 8 Sep 2024 16:48:15 +0200 Subject: [PATCH] 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 Signed-off-by: Yann E. MORIN Co-Developed-by: Thomas Petazzoni Signed-off-by: Thomas Petazzoni [yann.morin.1998@free.fr: always look in /usr/share/misc/iana/] Signed-off-by: Dario Binacchi --- Config.in.legacy | 12 ++++++++++++ package/ipmitool/Config.in | 17 +++++------------ package/ipmitool/ipmitool.mk | 17 +---------------- 3 files changed, 18 insertions(+), 28 deletions(-) diff --git a/Config.in.legacy b/Config.in.legacy index 7513aa7efd..6a1518f439 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -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 diff --git a/package/ipmitool/Config.in b/package/ipmitool/Config.in index 9516ff8596..dd2b0e6b6d 100644 --- a/package/ipmitool/Config.in +++ b/package/ipmitool/Config.in @@ -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 diff --git a/package/ipmitool/ipmitool.mk b/package/ipmitool/ipmitool.mk index 4f2151904d..159bb7c8b6 100644 --- a/package/ipmitool/ipmitool.mk +++ b/package/ipmitool/ipmitool.mk @@ -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))