package/iana-assignments: new package
PATCH v4 1/2 package/iana-assignments: new package
The fixing of [1] and related code reviews [2] and [3] highlighted the need for a package providing a versioned PEN (Enterprise Numbers) registry file from IANA (Internet Assigned Numbers Authority). The GitHub repository from which this package originates is a mirror of the IANA registries periodically updated from https://www.iana.org/protocols.
[1] http://autobuild.buildroot.org/results/5ae5ee948d99679cd50d1115a7d46f4368347b4f
[2] https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]
[3] https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
---
Changes v3 -> v4:
- select BR2_PACKAGE_IANA_ASSIGNMENTS_PEN_REG when the package is enabled
Added in v3
DEVELOPERS | 1 + package/Config.in | 1 + package/iana-assignments/Config.in | 15 +++++++++++++++ package/iana-assignments/iana-assignments.hash | 2 ++ package/iana-assignments/iana-assignments.mk | 18 ++++++++++++++++++ 5 files changed, 37 insertions(+) create mode 100644 package/iana-assignments/Config.in create mode 100644 package/iana-assignments/iana-assignments.hash create mode 100644 package/iana-assignments/iana-assignments.mk
DEVELOPERS +1 -0
@@ -792,6 +792,7 @@ F: configs/imx8mn_bsh_smm_s2_pro_defconfig F: configs/stm32f769_disco_sd_defconfig F: package/armadillo/ F: package/babeld/ +F: package/iana-assignments/ F: package/sscep/ F: package/uuu/
package/Config.in +1 -0
@@ -2465,6 +2465,7 @@ endif source "package/htpdate/Config.in" source "package/httping/Config.in" source "package/i2pd/Config.in" + source "package/iana-assignments/Config.in" source "package/ibrdtn-tools/Config.in" source "package/ibrdtnd/Config.in" source "package/ifenslave/Config.in"
package/iana-assignments/Config.in new file +15 -0
@@ -0,0 +1,15 @@ +config BR2_PACKAGE_IANA_ASSIGNMENTS + bool "IANA assignments" + select BR2_PACKAGE_IANA_ASSIGNMENTS_PEN_REG + help + Mirror of the IANA registries periodically updated + from https://www.iana.org/protocols. + + https://github.com/larseggert/iana-assignments + +if BR2_PACKAGE_IANA_ASSIGNMENTS + +config BR2_PACKAGE_IANA_ASSIGNMENTS_PEN_REG + bool "PEN (Enterprise Numbers) registry" + +endif
package/iana-assignments/iana-assignments.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed +sha256 e7a1f8153715fa9e0f4c5d102f9271bce425a468f58a445e7c5ecdf7105fd460 iana-assignments-bf358dc8d89b7939557220b8055699b42a4133e9.tar.gz
package/iana-assignments/iana-assignments.mk new file +18 -0
@@ -0,0 +1,18 @@ +################################################################################ +# +# iana-assignments +# +################################################################################ + +IANA_ASSIGNMENTS_VERSION = bf358dc8d89b7939557220b8055699b42a4133e9 +IANA_ASSIGNMENTS_SITE = $(call github,larseggert,iana-assignments,$(IANA_ASSIGNMENTS_VERSION)) + +ifeq ($(BR2_PACKAGE_IANA_ASSIGNMENTS_PEN_REG),y) +define IANA_ASSIGNMENTS_INSTALL_PEN_REG + $(INSTALL) -D -m 0644 $(@D)/enterprise-numbers/enterprise-numbers \ + $(TARGET_DIR)/usr/share/misc/iana/enterprise-numbers +endef +IANA_ASSIGNMENTS_POST_INSTALL_TARGET_HOOKS += IANA_ASSIGNMENTS_INSTALL_PEN_REG +endif + +$(eval $(generic-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 2/2 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 named enterprise-numbers to be placed under /usr/share/misc/ of the overlay rootfs.
Downloading such a file is no longer supported.
Fixes:
- http://autobuild.buildroot.org/results/5ae5ee948d99679cd50d1115a7d46f4368347b4f
---
Changes v3 -> v4:
- Drop BR2_PACKAGE_IPMITOOL_PEN_REG_URI and mark as a legacy option.
- Drop IPMITOOL_DEPENDENCIES += iana-assignments.
- Add IPMITOOL_CONF_ENV += IANADIR=/usr/share/misc in case of custom PEN.
- Use IANA PEN registry in case BR2_PACKAGE_IANA_ASSIGNMENTS_PEN_REG is enabled.
- Update the commit message.
Changes v2 -> v3:
- Use by default enterprise-numbers from iana-assignments package.
- Alternatively allows to use a local PEN registry file.
- Don't support URL path for PEN registry.
Changes v1 -> v2:
- use an enterprise-numbers file versioned
Config.in.legacy | 12 ++++++++++++ package/ipmitool/Config.in | 18 ++++++------------ package/ipmitool/ipmitool.mk | 20 ++++++-------------- 3 files changed, 24 insertions(+), 26 deletions(-)
Config.in.legacy +12 -0
@@ -189,6 +189,18 @@ config BR2_BINUTILS_VERSION_2_40_X comment "Legacy options removed in 2024.08" +config BR2_PACKAGE_IPMITOOL_PEN_REG_URI + string "IANA PEN registry move 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_MIDORI bool "midori has been removed" select BR2_LEGACY
package/ipmitool/Config.in +6 -12
@@ -5,22 +5,16 @@ config BR2_PACKAGE_IPMITOOL IPMItool provides a simple command-line interface to IPMI-enabled devices. + Note: 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 named + enterprise-numbers to be placed in the usr/share/misc/ + directory of the overlay rootfs. + 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
package/ipmitool/ipmitool.mk +6 -14
@@ -49,20 +49,12 @@ 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)) +ifeq ($(BR2_PACKAGE_IANA_ASSIGNMENTS_PEN_REG),y) +IPMITOOL_CONF_ENV += IANADIR=/usr/share/misc/iana 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 +# Directory where ipmitool will search a custom PEN +# registry provided by the user in the rootfs overlay. +IPMITOOL_CONF_ENV += IANADIR=/usr/share/misc +endif $(eval $(autotools-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedRe: [Buildroot] [PATCH v4 2/2] package/ipmitool: use versioned or custom PEN registry
Dario, All,
On 2024-09-08 16:48 +0200, Dario Binacchi spake thusly:
Quoted 8 lines
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 named enterprise-numbers to be placed under
/usr/share/misc/of the overlay rootfs.
As discussed IRL, I've made the location to always be the same, whether the PEN is provided by the iana-assignment package, or by an overlay (or whatever), and modified the comment in the help text accordingly.
Quoted 10 lines
Downloading such a file is no longer supported.
Fixes:
- http://autobuild.buildroot.org/results/5ae5ee948d99679cd50d1115a7d46f4368347b4fCo-Developed-by Yann E. MORIN <[email protected]>Signed-off-by Yann E. MORIN <[email protected]>Co-Developed-by Thomas Petazzoni <[email protected]>Signed-off-by Thomas Petazzoni <[email protected]>Signed-off-by Dario Binacchi <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 117 lines
---
Changes v3 -> v4:
- DropBR2_PACKAGE_IPMITOOL_PEN_REG_URIand mark as a legacy option.
- DropIPMITOOL_DEPENDENCIES+= iana-assignments.
- AddIPMITOOL_CONF_ENV+= IANADIR=/usr/share/misc in case of custom PEN.
- Use IANA PEN registry in caseBR2_PACKAGE_IANA_ASSIGNMENTS_PEN_REGis enabled.
- Update the commit message.Changes v2 -> v3:
- Use by default enterprise-numbers from iana-assignments package.
- Alternatively allows to use a local PEN registry file.
- Don't support URL path for PEN registry.Changes v1 -> v2:
- use an enterprise-numbers file versionedConfig.in.legacy | 12 ++++++++++++ package/ipmitool/Config.in | 18 ++++++------------ package/ipmitool/ipmitool.mk | 20 ++++++-------------- 3 files changed, 24 insertions(+), 26 deletions(-)Config.in.legacy +12
-0@@ -189,6 +189,18 @@ config BR2_BINUTILS_VERSION_2_40_X comment "Legacy options removed in 2024.08" +config BR2_PACKAGE_IPMITOOL_PEN_REG_URI + string "IANA PEN registry move 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_MIDORI bool "midori has been removed" select BR2_LEGACYpackage/ipmitool/Config.in +6
-12@@ -5,22 +5,16 @@ config BR2_PACKAGE_IPMITOOL IPMItool provides a simple command-line interface to IPMI-enabled devices. + Note: 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 named + enterprise-numbers to be placed in the usr/share/misc/ + directory of the overlay rootfs. + 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_OPENSSLpackage/ipmitool/ipmitool.mk +6
-14@@ -49,20 +49,12 @@ 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)) +ifeq ($(BR2_PACKAGE_IANA_ASSIGNMENTS_PEN_REG),y) +IPMITOOL_CONF_ENV += IANADIR=/usr/share/misc/iana 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 +# Directory where ipmitool will search a custom PEN +# registry provided by the user in the rootfs overlay. +IPMITOOL_CONF_ENV += IANADIR=/usr/share/misc +endif $(eval $(autotools-package))Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedDario, All,
On 2024-09-08 16:48 +0200, Dario Binacchi spake thusly:
Quoted 6 lines
The fixing of [1] and related code reviews [2] and [3] highlighted the need for a package providing a versioned PEN (Enterprise Numbers) registry file from IANA (Internet Assigned Numbers Authority). The GitHub repository from which this package originates is a mirror of the IANA registries periodically updated from https://www.iana.org/protocols.
Quoted 8 lines
[1] http://autobuild.buildroot.org/results/5ae5ee948d99679cd50d1115a7d46f4368347b4f
[2] https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]
[3] https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/Co-Developed-by Yann E. MORIN <[email protected]>Signed-off-by Yann E. MORIN <[email protected]>Co-Developed-by Thomas Petazzoni <[email protected]>Signed-off-by Thomas Petazzoni <[email protected]>Signed-off-by Dario Binacchi <[email protected]>
[--SNIP--]
Quoted 6 lines
package/iana-assignments/iana-assignments.mk new file +0
-0
package/iana-assignments/iana-assignments.mk line 8
Quoted 8 lines
package/iana-assignments/iana-assignments.mk new file +8
-0@@ -0,0 +1,18 @@ +################################################################################ +# +# iana-assignments +# +################################################################################ + +IANA_ASSIGNMENTS_VERSION = bf358dc8d89b7939557220b8055699b42a4133e9 +IANA_ASSIGNMENTS_SITE = $(call github,larseggert,iana-assignments,$(IANA_ASSIGNMENTS_VERSION))
The licensing information was missing, so I added the CC0-1.0 license, as noticed by Thomas.
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 16 lines
package/iana-assignments/iana-assignments.mk new file +9
-0+ifeq ($(BR2_PACKAGE_IANA_ASSIGNMENTS_PEN_REG),y) +define IANA_ASSIGNMENTS_INSTALL_PEN_REG + $(INSTALL) -D -m 0644 $(@D)/enterprise-numbers/enterprise-numbers \ + $(TARGET_DIR)/usr/share/misc/iana/enterprise-numbers +endef +IANA_ASSIGNMENTS_POST_INSTALL_TARGET_HOOKS += IANA_ASSIGNMENTS_INSTALL_PEN_REG +endif + +$(eval $(generic-package))Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot