From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: buildroot@buildroot.org
Cc: Floris Bos <bos@je-eigen-domein.nl>,
Heiko Thiery <heiko.thiery@gmail.com>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
linux-amarula@amarulasolutions.com,
"Yann E . MORIN" <yann.morin.1998@free.fr>
Subject: [Buildroot] [PATCH 1/1] package/ipmitool: only accept local PEN registry
Date: Mon, 2 Sep 2024 23:00:55 +0200 [thread overview]
Message-ID: <20240902210055.239859-1-dario.binacchi@amarulasolutions.com> (raw)
The https://www.iana.org/assignments/enterprise-numbers.txt is not a
versioned URL, and that file is regularly updated, so it is not
acceptable to change its hash each time.
Following Yann's suggestions [1], only local files are now accepted,
removing the need to download the PEN registry and consequently verify
the hash's correctness.
Fixes:
- http://autobuild.buildroot.org/results/5ae5ee948d99679cd50d1115a7d46f4368347b4f
[1]: https://patchwork.ozlabs.org/project/buildroot/patch/20240824103634.1955431-1-dario.binacchi@amarulasolutions.com/
Co-Developed-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
package/ipmitool/Config.in | 12 ++++++------
package/ipmitool/ipmitool.mk | 13 +++++--------
2 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/package/ipmitool/Config.in b/package/ipmitool/Config.in
index 9516ff8596d3..fefa8c34fd7f 100644
--- a/package/ipmitool/Config.in
+++ b/package/ipmitool/Config.in
@@ -9,14 +9,14 @@ config BR2_PACKAGE_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"
+config BR2_PACKAGE_IPMITOOL_PEN_REG_PATH
+ string "PEN registry path"
+ default ""
help
- Enter an URL or a file path to the PEN registry to use.
+ Enter 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.
+ The official registry (4MiB+) can be downloaded from:
+ https://www.iana.org/assignments/enterprise-numbers.txt
Leave empty to not use a registry; vendor IDs will be
displayed instead of the corresponding names.
diff --git a/package/ipmitool/ipmitool.mk b/package/ipmitool/ipmitool.mk
index 4f2151904d43..40bc8bb9dd13 100644
--- a/package/ipmitool/ipmitool.mk
+++ b/package/ipmitool/ipmitool.mk
@@ -49,20 +49,17 @@ 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))
+IPMITOOL_PEN_REG = $(call qstrip,$(BR2_PACKAGE_IPMITOOL_PEN_REG_PATH))
+ifneq ($(IPMITOOL_PEN_REG),)
+ifneq ($(findstring ://,$(IPMITOOL_PEN_REG)),)
+$(error "URL paths are no supported")
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
+endif # IPMITOOL_PEN_REG !empty
$(eval $(autotools-package))
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2024-09-02 21:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 21:00 Dario Binacchi [this message]
2024-09-03 19:33 ` [Buildroot] [PATCH 1/1] package/ipmitool: only accept local PEN registry Thomas Petazzoni via buildroot
2024-09-03 19:41 ` Yann E. MORIN
2024-09-04 7:16 ` Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240902210055.239859-1-dario.binacchi@amarulasolutions.com \
--to=dario.binacchi@amarulasolutions.com \
--cc=bos@je-eigen-domein.nl \
--cc=buildroot@buildroot.org \
--cc=heiko.thiery@gmail.com \
--cc=linux-amarula@amarulasolutions.com \
--cc=yann.morin.1998@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.