From patchwork Fri Sep 6 17:15:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3414 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 690EC40D67 for ; Fri, 6 Sep 2024 19:15:20 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42bb68e16b0sf22971235e9.1 for ; Fri, 06 Sep 2024 10:15:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725642920; cv=pass; d=google.com; s=arc-20240605; b=fepUFA/TlY0ETWuGEnMwfYsEm7vWFhR2YVBA07Px4X9Tr8pCdcGl+vqy5h31JGVGV1 /XaveauG0iduMcCxJc0ENUozQOnwG6cRw6UCht9dbnj8ZQJYvuwr38+uQIhxcQeMaaX+ srV5MNQ8YO2ArV0zz+L8e6TusxVsJjBo22i9oy+c+JWCsmd9SjTD3LP4Lx5kRT2yxB5t 1AFrzfCXKBqpsHF99JuBBgsMJwZcF+1scfXgVrnYHRo7bDU1eOg46YFppKQKLMtm1M/b Kd+8GSH8ajEFMxUtTUWuammRv7uBq/g3NQDfpgUNOwEZTeWs6aoUCCnKJODp5kPpFMuO Vc4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hBmft++n5Xpz3E9KeKiia03d27g0oDYmgbDFOM7E8fk=; fh=9mPEEyC88/8qY8hwFzoY2BSA7IebjDMHywRguNFyha4=; b=VnISweQLpAnwqfA5dPTbN51sJscdAU70llAsLiEUob/GBtEmidZ7wF79O1+FT19nd3 IgwcT3DE3CKcdcbUMwb9GirCBQBrLYfVEw5wRKrNTdDJkgXGPWmJhL6QektfvBGsXhki rzeJg9Lc4mu1CLzxvfA51oQc6/sQDHa2BmyKw5S3q2ZXppW/x3qfm3bpkEsm5xaHdeSY wi/Bd3Vmz13WUoxgdQoOHgEeXKUPTugl6D5AtLeiXpsOSGMN3mf9noWBzWNOi1/OSYKV 6av4G1u4w8IRTzHgGyS9SEwpI7987/YP/MJkVTQAIV6GKmUN/YaGupAqgU33ogxYiZgV yDhQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=auxnXMGD; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1725642920; x=1726247720; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=hBmft++n5Xpz3E9KeKiia03d27g0oDYmgbDFOM7E8fk=; b=ZFuP1JJtagzUs8jXksrh13LSn3fE9eY8VZTDkiSPSnmJnS9k+kL8n/8hdNV/T0WbdH 8k6+gTD/qgmvs8rFBYGBaE85tPZAKuQu4hY8u9ztclX2sz2uWTU/Z2+Gb41pNrlDPSBM Q1lXsmEd9gGSmzJoRQ7+OyFvUPpA1qB3uNSZU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725642920; x=1726247720; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hBmft++n5Xpz3E9KeKiia03d27g0oDYmgbDFOM7E8fk=; b=tjcN1MSbogxi3vQ37HJxi/sB3tIsROB+IuxHQuxPUdj8U/Iyod+En1/pHe+avNCfsl uY74rhiGiUB/IqlZJHrD0c/stot4rrlr1w/8zu+xTJM4149n+o2xpPsYnkH7jAlq4ADB Wq3eVHG9VWbuDRe/ENwug8txlnfyFNEGpIDZODkH1A7A8RsmkWlZxnhkMJXGFp/GlVB2 iVRn6OLvd6pNszcTVc66smEXasICqYpgMHRfr4l3zMj7lDwQ6Spv20I0D9lP2ETfYdYB 65DqmfwD08PKEBBaVhaE/0aVdOJ56m41FSshJr4BFx/5PP+ckrdkkGFHAntBeIT0n+io 6CIw== X-Forwarded-Encrypted: i=2; AJvYcCX32XbT5xmX+WuRdCo3HG7Ayd9UUb0kbwV+xxBUVBTuIym5+H9BK0bVFV60JAS9PX62LG9u/uLFZdud0z+r@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyOMReq080AMeRRGaDTL2NKPhzbQfLshoGY7GjcLE/HXa7A0dC1 e6HKrjTc3jVwlwQOhoAAXmUNmv40QlCTo26qtzEImFdsW/t0/KZR4ixE76i8Xs76Sw== X-Google-Smtp-Source: AGHT+IFHx0vYc30cPqhfhlwdBNCVJtjC0pEgk4qV5Cc5a/Y8ESCFvnT3GF4x0PHF/diB4EfblokgJA== X-Received: by 2002:a05:600c:1c1a:b0:426:6f87:65fc with SMTP id 5b1f17b1804b1-42c9f98b492mr33912595e9.17.1725642919703; Fri, 06 Sep 2024 10:15:19 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:154f:b0:426:7318:c5a0 with SMTP id 5b1f17b1804b1-42c9f497ee1ls6715365e9.2.-pod-prod-05-eu; Fri, 06 Sep 2024 10:15:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV4JkFNZA3wi60EWYolMm7tOylH6I/rHME0Hh+9eO1KvfCj/IHSysiebfgMLp4pW+vAFe5m+QxE4drUEVzv@amarulasolutions.com X-Received: by 2002:a05:6000:1373:b0:376:f482:8fdf with SMTP id ffacd0b85a97d-376f4829087mr9449050f8f.4.1725642917967; Fri, 06 Sep 2024 10:15:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725642917; cv=none; d=google.com; s=arc-20160816; b=wQJ3o94XtAsvO7BqoVJb4qpZDDnV2RrUTDu1/4Th6DoZQH7Hpx6XVcUOQkulbTRpHW W8U/WyVYj8/v7Q9G7LXp/rh7l5vTmNGg6ho6rI9fUDz71lWpdeG9r1QnrsFPv4mmQpt+ MKhnS5HwyRbWba2Yt540ASVSvUqQwJzUJJYSSKn6bsy/5Spkt6InE+Yken5wO2V5qN9a 18VUxM4BtEx0wxI8QYPUFdBCYgRChBUsrqSCiTbS8cCsbkCkWnZNu+1mzTi55AiEzHjV MDZlURsFG1sl17B+GaaCnWByCpWTgaf1j767qrZwBBcRvq6OBZrkxtAawWHQuqEELtk+ WGGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=f+46zW4k+EZZ+bQh3W0WrfU8Dp6+KJ+dvg4m0J1xg3c=; fh=ju/AtKPI8yBb1Si3Z9JNxDDy6KV3ce0o26y78r7H2zE=; b=J+d5VnK2qjEfWobJ3tAKAeBau+Edt0xI7BwXgavQi7ibLcsr5HgZwSmD+Jvtmzmq1Z oKH29rLT7wtDG3d0t7ceArgm5Aia41Bwu5B7vsgejE8hY+QnigbXHPsmxdBni1EWZa+0 jvUjk7Hg41O29fdIJ7GueOjZoJ3CYz18tc3Qx7gfYEyNBiIEDg1T2wEyFlsDu6ajzpob LGOKOvEmHsRuY9Wi5j1pyDrE7TanC0s7n5lXPC1Y9QMNp9g5whPc53KxRotU1p/slfaV SJkgcLcJSMcMEoTdtI5rLQkHY74Z2BlwB0Sb7FESP0TvFzbfac4CqTAZAXhS7TWYbcXW aq+Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=auxnXMGD; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-42bb70add8dsor55400965e9.8.2024.09.06.10.15.17 for (Google Transport Security); Fri, 06 Sep 2024 10:15:17 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCUJ3y3jHqyFXM3hgDBRfSDa/U2Q9Ha25m8hT5u+CZvFaHMl0qntnE9oFCp74z1QhD3g+jyZzW8ATDJYrFVj@amarulasolutions.com X-Received: by 2002:a05:600c:310a:b0:42a:a6aa:4118 with SMTP id 5b1f17b1804b1-42c9f98b4aamr25764515e9.18.1725642917337; Fri, 06 Sep 2024 10:15:17 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.8]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05c6fb9sm26193875e9.7.2024.09.06.10.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 10:15:17 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Floris Bos , Heiko Thiery , Dario Binacchi , Thomas Petazzoni , linux-amarula@amarulasolutions.com, "Yann E . MORIN" Subject: [PATCH v3 2/2] package/ipmitool: use versioned or local PEN registry Date: Fri, 6 Sep 2024 19:15:03 +0200 Message-ID: <20240906171503.3495498-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240906171503.3495498-1-dario.binacchi@amarulasolutions.com> References: <20240906171503.3495498-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=auxnXMGD; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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, ipmitool now uses by default a versioned PEN (Enterprise Numbers) registry file from IANA provided by the iana-assignments package. Alternatively, it also allows the use of a local file. URL paths for downloading such a file are no longer supported. Co-Developed-by: Yann E. MORIN Signed-off-by: Yann E. MORIN Co-Developed-by: Thomas Petazzoni Signed-off-by: Thomas Petazzoni Signed-off-by: Dario Binacchi --- 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 package/ipmitool/Config.in | 32 ++++++++++++++++++++++++++------ package/ipmitool/ipmitool.mk | 24 ++++++++++++------------ 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/package/ipmitool/Config.in b/package/ipmitool/Config.in index 9516ff8596d3..c4b3ee734d44 100644 --- a/package/ipmitool/Config.in +++ b/package/ipmitool/Config.in @@ -9,14 +9,34 @@ 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" +# +# PEN registry selection +# + +choice + prompt "PEN registry" + default BR2_PACKAGE_IPMITOOL_USE_IANA_PEN + +config BR2_PACKAGE_IPMITOOL_USE_IANA_PEN + bool "Using IANA PEN registry" + select BR2_PACKAGE_IANA_ASSIGNMENTS + select BR2_PACKAGE_IANA_ASSIGNMENTS_PEN_REG + +config BR2_PACKAGE_IPMITOOL_USE_CUSTOM_PEN + bool "Using a custom PEN registry file" help - Enter an URL or a file path to the PEN registry to use. + Enter a file path to the PEN registry to use. + + Leave empty to not use a registry; vendor IDs will be + displayed instead of the corresponding names. - Note that the official registry is 4MiB+ and may change any - time and is thus not guaranteed to be reproducible. +endchoice + +config BR2_PACKAGE_IPMITOOL_USE_CUSTOM_PEN_FILE + string "PEN registry file path" + depends on BR2_PACKAGE_IPMITOOL_USE_CUSTOM_PEN + help + Path to the PEN registry file. 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..f16500739ce6 100644 --- a/package/ipmitool/ipmitool.mk +++ b/package/ipmitool/ipmitool.mk @@ -49,20 +49,20 @@ 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_IPMITOOL_USE_IANA_PEN),y) +IPMITOOL_DEPENDENCIES += iana-assignments +IPMITOOL_CONF_ENV += IANADIR=/usr/share/misc/iana else -IPMITOOL_PEN_REG = $(IPMITOOL_PEN_REG_URI) +IPMITOOL_PEN_FILE = $(call qstrip,$(BR2_PACKAGE_IPMITOOL_USE_CUSTOM_PEN_FILE)) +ifneq ($(IPMITOOL_PEN_FILE),) +ifneq ($(findstring ://,$(IPMITOOL_PEN_FILE)),) +$(error "URL paths are no supported") endif #findstring -define IPMITOOL_INSTALL_PEN_REG - $(INSTALL) -D -m 0644 $(IPMITOOL_PEN_REG) \ +define IPMITOOL_INSTALL_PEN_FILE + $(INSTALL) -D -m 0644 $(IPMITOOL_PEN_FILE) \ $(TARGET_DIR)/usr/share/misc/enterprise-numbers endef -IPMITOOL_POST_INSTALL_TARGET_HOOKS += IPMITOOL_INSTALL_PEN_REG -endif # IPMITOOL_PEN_REG_URI !empty - +IPMITOOL_POST_INSTALL_TARGET_HOOKS += IPMITOOL_INSTALL_PEN_FILE +endif # IPMITOOL_PEN_REG_FILEI !empty +endif # BR2_PACKAGE_IPMITOOL_USE_IANA_PEN $(eval $(autotools-package))