Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Vincent Fazio <vfazio@xes-inc.com>
Cc: Floris Bos <bos@je-eigen-domein.nl>,
	Heiko Thiery <heiko.thiery@gmail.com>,
	Vincent Fazio <vfazio@gmail.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] package/ipmitool: backport fixes for registry issues
Date: Sat, 14 Jan 2023 22:17:18 +0100	[thread overview]
Message-ID: <20230114221718.01e97481@windsurf> (raw)
In-Reply-To: <20230113225425.3301420-1-vfazio@xes-inc.com>

Hello,

On Fri, 13 Jan 2023 16:54:24 -0600
Vincent Fazio <vfazio@xes-inc.com> wrote:

> From: Vincent Fazio <vfazio@gmail.com>
> 
> Add upstream patches to:
>   Fix the URL used for hte IANA PEN registry
>   Make a missing registry file non-fatal
>   Make downloading/installing the registry optional
> 
> The IANA PEN registry used by ipmitool takes up 4MB+. It is also not
> "frozen" and can be updated at the whim of IANA. This causes headaches
> when needing reproducible builds.
> 
> Registry installation will be disabled when BR2_REPRODUCIBLE is selected.
> 
> By default, the registry is not installed since it is largely a cosmetic
> feature and not driving core functionality.

So in the current Buildroot situation (before this patch), the registry
is always installed, correct?

> 
> Signed-off-by: Vincent Fazio <vfazio@gmail.com>
> Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
> ---
>  .../0002-Fix-enterprise-numbers-URL.patch     |  33 ++++++
>  ...t-require-the-IANA-PEN-registry-file.patch | 112 ++++++++++++++++++
>  ...c-allow-disabling-registry-downloads.patch |  72 +++++++++++
>  package/ipmitool/Config.in                    |  12 ++
>  package/ipmitool/ipmitool.mk                  |   4 +
>  5 files changed, 233 insertions(+)
>  create mode 100644 package/ipmitool/0002-Fix-enterprise-numbers-URL.patch
>  create mode 100644 package/ipmitool/0003-Do-not-require-the-IANA-PEN-registry-file.patch
>  create mode 100644 package/ipmitool/0004-configure.ac-allow-disabling-registry-downloads.patch
> 
> diff --git a/package/ipmitool/0002-Fix-enterprise-numbers-URL.patch b/package/ipmitool/0002-Fix-enterprise-numbers-URL.patch
> new file mode 100644
> index 0000000000..af62d22459
> --- /dev/null
> +++ b/package/ipmitool/0002-Fix-enterprise-numbers-URL.patch
> @@ -0,0 +1,33 @@
> +From 1edb0e27e44196d1ebe449aba0b9be22d376bcb6 Mon Sep 17 00:00:00 2001
> +From: Alexander Amelkin <alexander@amelkin.msk.ru>
> +Date: Tue, 22 Nov 2022 13:55:33 +0300
> +Subject: [PATCH] Fix enterprise-numbers URL
> +
> +IANA has changed their URL scheme, and the content at the old URL for
> +enterprise-numbers switched from text/plain to text/html.
> +
> +Fix Makefile.am to use the new URL
> +
> +Resolves ipmitool/ipmitool#377
> +
> +Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>

We need you to add your Signed-off-by here.


> diff --git a/package/ipmitool/0003-Do-not-require-the-IANA-PEN-registry-file.patch b/package/ipmitool/0003-Do-not-require-the-IANA-PEN-registry-file.patch
> new file mode 100644
> index 0000000000..6ac5ce989b
> --- /dev/null
> +++ b/package/ipmitool/0003-Do-not-require-the-IANA-PEN-registry-file.patch
> @@ -0,0 +1,112 @@
> +From 26b088193a55624df4cbe2a0d33c7bba5bca108d Mon Sep 17 00:00:00 2001
> +From: Vincent Fazio <vfazio@gmail.com>
> +Date: Sat, 7 Jan 2023 21:02:48 -0600
> +Subject: [PATCH] Do not require the IANA PEN registry file
> +
> +Previously, ipmitool would fail to run if the local copy of the IANA PEN
> +registry could not be parsed.
> +
> +When the registry is not available the manufacturer will be "Unknown" but
> +ipmitool will otherwise function so should not be considered fatal.
> +
> +Also, fix an issue with improperly handling the `oem_info_list_load`
> +return value. Previously, in `ipmi_oem_info_init`, if `oem_info_list_load`
> +returned a negative value due to the registry file not existing, an
> +improper count would cause `oem_info_init_from_list` to aallocate a list
> +that didn't encompass the full header/tail list.
> +
> +  IANA PEN registry open failed: No such file or directory
> +    Allocating      3 entries
> +    [     1] 16777214 | A Debug Assisting Company, Ltd.
> +    [     0]  1048575 | Unspecified
> +
> +Now, use a signed int and ensure a valid count of loaded OEMs is used.
> +
> +Signed-off-by: Vincent Fazio <vfazio@gmail.com>

What is the upstream status of this patch?


> diff --git a/package/ipmitool/0004-configure.ac-allow-disabling-registry-downloads.patch b/package/ipmitool/0004-configure.ac-allow-disabling-registry-downloads.patch
> new file mode 100644
> index 0000000000..7c070cb51f
> --- /dev/null
> +++ b/package/ipmitool/0004-configure.ac-allow-disabling-registry-downloads.patch
> @@ -0,0 +1,72 @@
> +From be11d948f89b10be094e28d8a0a5e8fb532c7b60 Mon Sep 17 00:00:00 2001
> +From: Vincent Fazio <vfazio@gmail.com>
> +Date: Wed, 11 Jan 2023 22:55:51 -0600
> +Subject: [PATCH] configure.ac: allow disabling registry downloads
> +
> +Some environments require reproducible builds. Since the IANA PEN
> +registry is constantly updating and there is no snapshot available,
> +installing ipmitool via `make install` is not reproducible.
> +
> +Provide a configure mechanism to disable the registry download/install..

Missing Signed-off-by, and missing upstream status.

> diff --git a/package/ipmitool/Config.in b/package/ipmitool/Config.in
> index dbd6483110..ed3b918f9d 100644
> --- a/package/ipmitool/Config.in
> +++ b/package/ipmitool/Config.in
> @@ -9,6 +9,18 @@ config BR2_PACKAGE_IPMITOOL
>  
>  if BR2_PACKAGE_IPMITOOL
>  
> +comment "IANA PEN Registry will not be installed on reproducible builds"
> +	depends on BR2_REPRODUCIBLE
> +
> +config BR2_PACKAGE_IPMITOOL_PEN_REGISTRY
> +	bool "install PEN registry"

Maybe "install IANA PEN registry"

> +	depends on !BR2_REPRODUCIBLE
> +	help
> +	  Install the IANA PEN registry. 

Maybe spell out the PEN acronym here?

> +	  Shows manufacturer name in certain commands. 
> +	  
> +	  Not installing the registry saves ~4.3 MB.
> +
>  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 b9f60d8151..f97d94693b 100644
> --- a/package/ipmitool/ipmitool.mk
> +++ b/package/ipmitool/ipmitool.mk
> @@ -14,6 +14,10 @@ IPMITOOL_CPE_ID_VENDOR = ipmitool_project
>  IPMITOOL_AUTORECONF = YES
>  IPMITOOL_DEPENDENCIES = host-pkgconf
>  
> +ifneq ($(BR2_PACKAGE_IPMITOOL_PEN_REGISTRY),y)
> +IPMITOOL_CONF_OPTS += --disable-registry-download
> +endif

Can we make this:

ifeq ($(BR2_PACKAGE_IPMITOOL_PEN_REGISTRY),y)
IPMITOOL_CONF_OPTS += --enable-registry-download
else
IPMITOOL_CONF_OPTS += --disable-registry-download
endif

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2023-01-14 21:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 22:54 [Buildroot] [PATCH 1/2] package/ipmitool: backport fixes for registry issues Vincent Fazio
2023-01-13 22:54 ` [Buildroot] [PATCH 2/2] package/ipmitool: use the standard github helper Vincent Fazio
2023-01-14 21:14   ` Thomas Petazzoni via buildroot
2023-01-14 21:17 ` Thomas Petazzoni via buildroot [this message]
     [not found]   ` <CAOrEah5_BQzsLnHYkMGvpSR=MxeqTeDkmbKNAQOOJ6eRXreg-g@mail.gmail.com>
2023-01-14 21:58     ` [Buildroot] [PATCH 1/2] package/ipmitool: backport fixes for registry issues Thomas Petazzoni via buildroot
2023-01-15 10:52       ` Yann E. MORIN

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=20230114221718.01e97481@windsurf \
    --to=buildroot@buildroot.org \
    --cc=bos@je-eigen-domein.nl \
    --cc=heiko.thiery@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vfazio@gmail.com \
    --cc=vfazio@xes-inc.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox