Message ID | 20240904174021.2670289-1-dario.binacchi@amarulasolutions.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Dario, All, Thanks for your persistemce in fixing this issue! :-) On 2024-09-04 19:40 +0200, Dario Binacchi spake thusly: > 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. Following the suggestions provided by Thomas Petazzoni, > the file is now downloaded from a GitHub repository, which means it is > versioned. [--SNIP--] > diff --git a/package/ipmitool/Config.in b/package/ipmitool/Config.in > index 9516ff8596d3..783bd263756e 100644 > --- a/package/ipmitool/Config.in > +++ b/package/ipmitool/Config.in > @@ -11,7 +11,7 @@ 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" > + default "https://github.com/larseggert/iana-assignments/raw/6eaf55c1c24941db2546da242029ceeaba3f9dfc/enterprise-numbers/enterprise-numbers" That's unfortunately not enough, see below... > help > Enter an URL or a file path to the PEN registry to use. > > diff --git a/package/ipmitool/ipmitool.hash b/package/ipmitool/ipmitool.hash > index c3b298e3ba5d..f2e91ef9000d 100644 > --- a/package/ipmitool/ipmitool.hash > +++ b/package/ipmitool/ipmitool.hash > @@ -1,3 +1,4 @@ > # Locally computed: > sha256 48b010e7bcdf93e4e4b6e43c53c7f60aa6873d574cbd45a8d86fa7aaeebaff9c ipmitool-1_8_19.tar.gz > sha256 b7e2382a8be43b5f6cb092f2d2bda163bf1a1938be9300f821a845cbcd535f56 COPYING > +sha256 45eca3cadadd8a82736d83b130106da22cd49a34d287c9c4c7f10dffb4579f4f enterprise-numbers Indeed, the filename itself is still unversioned, so when we update the version in the URL, the local file would not change name, and thus that'd cause the same issues I explained earlier. I tried a few hacks, notably the infamous GET parameters, like: https://github.com/larseggert/iana-assignments/raw/6eaf[...]enterprise-numbers/enterprise-numbers&path=foo/enterprise-numbers-6eaf[...].txt and various variants of that, but to not avail... So, unless you can come up with a way to hack a verioned filename in the URL, we'll have to introduce a dedicated package... :-/ Regards, Yann E. MORIN. > -- > 2.43.0 >
Hi Yann, On Wed, Sep 4, 2024 at 8:17 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote: > > Dario, All, > > Thanks for your persistemce in fixing this issue! :-) > > On 2024-09-04 19:40 +0200, Dario Binacchi spake thusly: > > 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. Following the suggestions provided by Thomas Petazzoni, > > the file is now downloaded from a GitHub repository, which means it is > > versioned. > [--SNIP--] > > diff --git a/package/ipmitool/Config.in b/package/ipmitool/Config.in > > index 9516ff8596d3..783bd263756e 100644 > > --- a/package/ipmitool/Config.in > > +++ b/package/ipmitool/Config.in > > @@ -11,7 +11,7 @@ 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" > > + default "https://github.com/larseggert/iana-assignments/raw/6eaf55c1c24941db2546da242029ceeaba3f9dfc/enterprise-numbers/enterprise-numbers" > > That's unfortunately not enough, see below... > > > help > > Enter an URL or a file path to the PEN registry to use. > > > > diff --git a/package/ipmitool/ipmitool.hash b/package/ipmitool/ipmitool.hash > > index c3b298e3ba5d..f2e91ef9000d 100644 > > --- a/package/ipmitool/ipmitool.hash > > +++ b/package/ipmitool/ipmitool.hash > > @@ -1,3 +1,4 @@ > > # Locally computed: > > sha256 48b010e7bcdf93e4e4b6e43c53c7f60aa6873d574cbd45a8d86fa7aaeebaff9c ipmitool-1_8_19.tar.gz > > sha256 b7e2382a8be43b5f6cb092f2d2bda163bf1a1938be9300f821a845cbcd535f56 COPYING > > +sha256 45eca3cadadd8a82736d83b130106da22cd49a34d287c9c4c7f10dffb4579f4f enterprise-numbers > > Indeed, the filename itself is still unversioned, so when we update the > version in the URL, the local file would not change name, and thus > that'd cause the same issues I explained earlier. Yes, you're right, we fall into the cases you described to me earlier. > > I tried a few hacks, notably the infamous GET parameters, like: > > https://github.com/larseggert/iana-assignments/raw/6eaf[...]enterprise-numbers/enterprise-numbers&path=foo/enterprise-numbers-6eaf[...].txt > > and various variants of that, but to not avail... So, unless you can > come up with a way to hack a verioned filename in the URL, we'll have to > introduce a dedicated package... :-/ AFAIK, adding the package is probably the cleanest solution. Thanks and regards, Dario > > Regards, > Yann E. MORIN. > > > -- > > 2.43.0 > > > > -- > .-----------------.--------------------.------------------.--------------------. > | 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. | > '------------------------------^-------^------------------^--------------------'
Dario, All, On 2024-09-05 08:09 +0200, Dario Binacchi spake thusly: > On Wed, Sep 4, 2024 at 8:17 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote: [--SNIP--] > > I tried a few hacks, notably the infamous GET parameters, like: > > https://github.com/larseggert/iana-assignments/raw/6eaf[...]enterprise-numbers/enterprise-numbers&path=foo/enterprise-numbers-6eaf[...].txt > > and various variants of that, but to not avail... So, unless you can > > come up with a way to hack a verioned filename in the URL, we'll have to > > introduce a dedicated package... :-/ > AFAIK, adding the package is probably the cleanest solution. Agreed. In this case, the new package should probably be something like: config BR2_PKG_IANA_ASSIGNMENTS bool "iana-assignments" select BR2_PKG_IANA_ASSIGNMENTS_PEN_REG if BR2_PKG_IANA_ASSIGNMENTS config BR2_PKG_IANA_ASSIGNMENTS_PEN_REG bool "PEN (Enterprise Numbers) registry" endif (we need the select to ensure something gets installed, and we have the sub-option in case we need to install other aissignments in the future). And then it should install that into: $(TARGET_DIR)/usr/share/misc/iana/enterprise-numbers And ipmitool should be configured to use that: ifeq ($(BR2_PKG_IANA_ASSIGNMENTS_PEN_REG),y) IPMITOOL_CONF_ENV += IANADIR=/usr/share/misc/iana endif Regards, Yann E. MORIN.
Hi Yann, On Thu, Sep 5, 2024 at 10:55 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote: > > Dario, All, > > On 2024-09-05 08:09 +0200, Dario Binacchi spake thusly: > > On Wed, Sep 4, 2024 at 8:17 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote: > [--SNIP--] > > > I tried a few hacks, notably the infamous GET parameters, like: > > > https://github.com/larseggert/iana-assignments/raw/6eaf[...]enterprise-numbers/enterprise-numbers&path=foo/enterprise-numbers-6eaf[...].txt > > > and various variants of that, but to not avail... So, unless you can > > > come up with a way to hack a verioned filename in the URL, we'll have to > > > introduce a dedicated package... :-/ > > AFAIK, adding the package is probably the cleanest solution. > > Agreed. > > In this case, the new package should probably be something like: > > config BR2_PKG_IANA_ASSIGNMENTS > bool "iana-assignments" > select BR2_PKG_IANA_ASSIGNMENTS_PEN_REG > > if BR2_PKG_IANA_ASSIGNMENTS > > config BR2_PKG_IANA_ASSIGNMENTS_PEN_REG > bool "PEN (Enterprise Numbers) registry" > > endif > > (we need the select to ensure something gets installed, and we have the > sub-option in case we need to install other aissignments in the future). > > And then it should install that into: > > $(TARGET_DIR)/usr/share/misc/iana/enterprise-numbers > > And ipmitool should be configured to use that: > > ifeq ($(BR2_PKG_IANA_ASSIGNMENTS_PEN_REG),y) > IPMITOOL_CONF_ENV += IANADIR=/usr/share/misc/iana > endif > Thank you for the suggestions. Taking inspiration from the previous code reviews, I have slightly modified some of the code parts you wrote. I prefer to push to v3 to discuss the patch more easily, considering that there will likely be a v4 version since I didn’t specify anything regarding the license of the iana-assignments package, as I didn’t find anything about it in the GitHub repository. Thanks and regards, Dario --- Fammi sapere se hai bisogno di ulteriori traduzioni o aggiustamenti! > Regards, > Yann E. MORIN. > > -- > .-----------------.--------------------.------------------.--------------------. > | 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. | > '------------------------------^-------^------------------^--------------------'
diff --git a/package/ipmitool/Config.in b/package/ipmitool/Config.in index 9516ff8596d3..783bd263756e 100644 --- a/package/ipmitool/Config.in +++ b/package/ipmitool/Config.in @@ -11,7 +11,7 @@ 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" + default "https://github.com/larseggert/iana-assignments/raw/6eaf55c1c24941db2546da242029ceeaba3f9dfc/enterprise-numbers/enterprise-numbers" help Enter an URL or a file path to the PEN registry to use. diff --git a/package/ipmitool/ipmitool.hash b/package/ipmitool/ipmitool.hash index c3b298e3ba5d..f2e91ef9000d 100644 --- a/package/ipmitool/ipmitool.hash +++ b/package/ipmitool/ipmitool.hash @@ -1,3 +1,4 @@ # Locally computed: sha256 48b010e7bcdf93e4e4b6e43c53c7f60aa6873d574cbd45a8d86fa7aaeebaff9c ipmitool-1_8_19.tar.gz sha256 b7e2382a8be43b5f6cb092f2d2bda163bf1a1938be9300f821a845cbcd535f56 COPYING +sha256 45eca3cadadd8a82736d83b130106da22cd49a34d287c9c4c7f10dffb4579f4f enterprise-numbers