From patchwork Mon Sep 2 21:00:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3358 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5861B3F1D7 for ; Mon, 2 Sep 2024 23:01:03 +0200 (CEST) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42bb6f7e7adsf42919485e9.0 for ; Mon, 02 Sep 2024 14:01:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725310863; cv=pass; d=google.com; s=arc-20240605; b=kcjz5DaqR86zJabt6VMYvln7BC0Awk3KDDE0A0s0YEh7jOKYDM+LVOQqWNDleIuUAZ t6szYJkRl68iEr/e+/D5R9z5AlF7U9tLUdKzjflKzElQjB1nS1N3etLFXLX9B4cLxo2A WL074cWQJMu+Cak1FTdxrXM6uUBpy4I6wrunnmNEewjMt7c3sgCDlubAOVcFPWA7l15W XMOy7EHMHnkdtnt+XaXm95Lv4R4sKrlemUT4kJnUa3qJ9ee+5vzxPl2qGlmjoAqGsdby qhE7Q51hwAdrhAXNkWxJ2JZu1NbzPtt/bdB1ZsYMTfOjUxaoCgSYsjUDQZhureZmFbV6 xj6A== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=saBZ7xL4SeVNAkGNFX69YCQwQ5U2sLiw4PIgPFHdJAw=; fh=af14bkwzGkY8moKOf+xzKCCzarusivTBFM5OpsRwE+Y=; b=AdtrqDMs/YiBfUW9zTTLSnCmAC80Km311JoqSMX9qyvS7o71i6OUYWnpyGrPf9DILU 88sZyAz5FOpaDJYnp2rNRwlC+5UUAbINE3W4EUmmpHcs6nDos9Cve9wUu1lB4NRM4DSd VfGW908dYqd08Mn5AY7SswqL657xpZa18e86gKuJ5YMy0xOjBWM2jRdbehBNgNLFFD2N D45VenpvoDYdGyLno4S3Jbc78WCKyeZt4CAzh5vQ8L52aBx8Zm75SjHDYw0ej1VayYKA cFNHaCPFhqXk9sK6VjFxKBZ+XqmSbh0j+vMF3WBHNyinMIoHmyU+hqwc1Aiv59StWTU/ iKEg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Bd8x/LeU"; 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=1725310863; x=1725915663; 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:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=saBZ7xL4SeVNAkGNFX69YCQwQ5U2sLiw4PIgPFHdJAw=; b=TSMxPThT2Ddx0XcH5iOixL0WYpsivbDg/v6cDMPzG5UOvcAlXtg5GcpxEOL18ATCsX x8cZbN4SyAAH4wq5P6a8wCrkxxfEp+opmMIIjyotGKBcQyKCrWKPnLnWt0vZhM40TziQ HB4gJekBwG3P1TBqDwexTksN43saY58brjpcY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725310863; x=1725915663; 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 :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=saBZ7xL4SeVNAkGNFX69YCQwQ5U2sLiw4PIgPFHdJAw=; b=q5MZ/m/M/xT5efeCYtaaqaEZ3JlEz/pyU2g6POcTsWklpHs69Z9rWaV4RuNgujFJT9 0mySQk4+VAHlWqvKq5FhJvf5bQp22Zx7186HYJVM3kL4bnUJM4RQDsuo80hnZgJlyEqQ xBlmS67RXFAZyt1YA2GsCn9Geowokcnz/Km90ovY5AgN7ozUNN2syIz7zVWDdTgLAFTK RMBfzoFmXmJCHWwZgVHJ2ppwdepEcrjJgRF7puaJUDfgJwwLdsTBFlZlkeVQ6Utiddvq YdlLTxsTclG56a+/3ga7MS9UMHsDG+5VB7bP8YcdwHQkd+Zvf9ceyP6P73PLQ7E3wlmN zTlw== X-Forwarded-Encrypted: i=2; AJvYcCX0Bxf6g9w53GMc/ZacA/apFl0amGzMZ11p5t66HRDs5BtXdW0ecgD+M8hLDXmn83z/6ppsxTt5ELXiBD1u@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxVO+Nt9CMrXtk96PItZ1/Hv2I82U3lrMeO4CV9aW3pniBgKL/h LMb8kS2Y3xAQD0pAo66s1vXrCi6OwdrdjbOE2o5Q9bmArUBqmzJs+gykjjmTbArLlw== X-Google-Smtp-Source: AGHT+IFLzK5gIjHe1v7+axXZU5bJv5wkpML/qlX+gaL7AjNFF5+TkHC22YtXlSplVPtbtlRWX2Nk8w== X-Received: by 2002:a05:600c:4ed0:b0:426:654e:16da with SMTP id 5b1f17b1804b1-42c7b517656mr55414965e9.0.1725310862735; Mon, 02 Sep 2024 14:01:02 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:3596:b0:427:ad0:2dd8 with SMTP id 5b1f17b1804b1-42bb284074bls25770265e9.0.-pod-prod-04-eu; Mon, 02 Sep 2024 14:01:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVVgRr+npXTmtN4zGhkP5xgRbwSlBcP2YvUCkHaz/1EZZv1+uPEDal/BTA2ei0A2fQSsf8JyJY0IHQnKvL9@amarulasolutions.com X-Received: by 2002:a05:600c:1d16:b0:42b:892d:54c0 with SMTP id 5b1f17b1804b1-42c7b5a8db6mr51484005e9.12.1725310861022; Mon, 02 Sep 2024 14:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725310861; cv=none; d=google.com; s=arc-20160816; b=kzgH8JYKy8BF3iOYWKg9KuXREvoOvZDE5aqx5FxZ/8crpcIludevaXq/XWTanTl+br tvIPYfcebOga2QUi32L3VmAz2MUyfafzxY+aFuOOCE0SGS93q2RWHU0X6wjHuEg5UDYC VunFvqJKOocy2fjWcNaObskOsLAKp+oDrSy1FyFKoA4MebXiYgfPpdR98junQotCsUHY hJDlZ8dp+tTidB8tJAUG/WDnRNKYkJLbbXwxxVncNFciyPP9tkBpvudzpmaRdtTp4Z0q uLBmwuMHuaAQD+ToC1ospIvuKEJEoqqzboUADvigf8wTBHN9fKPd+cKH/Lsqzd6Bb2ZF 25lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=ThWht5zYD4n4PqkTIkHqQfXj5TzyBO6zFtxdnmTzdbE=; fh=k5TfdtcjZ9UGwjb8TzN9tNC7zMkIrHebqF1b7bS0ud8=; b=rRv8x8vWpf7HCQKrE9blk1Rg9eyPupqWjZ2xcgBuru8jK1pPMeA5AQ+t+Uveod1rZS +RChfNsWj5mTyVb6OtQdXUR1oXBiaT4Y7icaJxy0aO83LbcFRtevyeFStkLIBVzzmOYM Zuo+wD9N3XSRCfHsxvd4zfWpJZxmtCDAYU7oEkMEZelK5xa+gCmGihCP6tEyFdwzLMIv dyJDrfu5fE6CE0mGo8SA1ZgHg/C1o4T6jt6uEp1uAMYUA6bGjiDsiAbxH46c5gtqLe5s ALN0MdaKu1kOuZY1guqYNWjY3G5kWeP3l4a1QPB7MrRfZq5R3qFGRZaNuMH0ZzlQSq0x +70w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Bd8x/LeU"; 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-42bb70bfb50sor38110645e9.8.2024.09.02.14.01.00 for (Google Transport Security); Mon, 02 Sep 2024 14:01:00 -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; AJvYcCUFO6MADfEhDu6Vjo1RXll31UQIARxLMrYxsDx1aPO43JlLBqVKuIiSawLrcgWzPdweunC40UTv7V82T0hk@amarulasolutions.com X-Received: by 2002:adf:b350:0:b0:368:3751:de3 with SMTP id ffacd0b85a97d-374bf16c0d7mr4918710f8f.31.1725310860187; Mon, 02 Sep 2024 14:01:00 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3749ee4c83fsm12426246f8f.22.2024.09.02.14.00.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2024 14:00:59 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Floris Bos , Heiko Thiery , "Yann E . MORIN" , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [PATCH 1/1] package/ipmitool: only accept local PEN registry Date: Mon, 2 Sep 2024 23:00:55 +0200 Message-ID: <20240902210055.239859-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 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="Bd8x/LeU"; 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 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 Signed-off-by: Yann E. MORIN Signed-off-by: Dario Binacchi --- 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))