From patchwork Fri Sep 30 14:36:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 1684886 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MfCVy5qJMz1yql for ; Sat, 1 Oct 2022 00:37:30 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9545284D47; Fri, 30 Sep 2022 16:37:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 31E5F84D9D; Fri, 30 Sep 2022 16:37:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9E40D848DC for ; Fri, 30 Sep 2022 16:37:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=foss+uboot@0leil.net Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 3AA9C20002; Fri, 30 Sep 2022 14:37:10 +0000 (UTC) From: Quentin Schulz To: Alper Nebi Yasak , Simon Glass Cc: Quentin Schulz , Quentin Schulz , u-boot@lists.denx.de Subject: [PATCH v3 1/2] binman: bintool: remove btool_ prefix from btool names Date: Fri, 30 Sep 2022 16:36:33 +0200 Message-Id: <20220930-upstream-gzip-binman-v3-v3-1-17c99d6d87ac@theobroma-systems.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220930-upstream-gzip-binman-v3-v3-0-17c99d6d87ac@theobroma-systems.com> References: <20220930-upstream-gzip-binman-v3-v3-0-17c99d6d87ac@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Quentin Schulz The binary is looked on the system by the suffix of the packer class. This means binman was looking for btool_gzip on the system and not gzip. Since a btool can have its btool_ prefix missing but its module and binary presence on the system appropriately found, there's no need to actually keep this prefix after listing all possible btools, so let's remove it. This fixes gzip btool by letting Bintool.find_bintool_class handle the missing prefix and still return the correct class which is then init with gzip name instead of btool_gzip. Cc: Quentin Schulz Signed-off-by: Quentin Schulz Reviewed-by: Simon Glass --- tools/binman/bintool.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/binman/bintool.py b/tools/binman/bintool.py index a582d9d344..fcc6aab36f 100644 --- a/tools/binman/bintool.py +++ b/tools/binman/bintool.py @@ -137,6 +137,8 @@ class Bintool: names = [os.path.splitext(os.path.basename(fname))[0] for fname in files] names = [name for name in names if name[0] != '_'] + names = [name[6:] if name.startswith('btool_') else name + for name in names] if include_testing: names.append('_testing') return sorted(names) From patchwork Fri Sep 30 14:36:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 1684887 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MfCW82yjNz1yql for ; Sat, 1 Oct 2022 00:37:40 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A164F84DAD; Fri, 30 Sep 2022 16:37:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 86FDA84C30; Fri, 30 Sep 2022 16:37:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1F3E784D97 for ; Fri, 30 Sep 2022 16:37:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=foss+uboot@0leil.net Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 9E3AC2000E; Fri, 30 Sep 2022 14:37:12 +0000 (UTC) From: Quentin Schulz To: Alper Nebi Yasak , Simon Glass Cc: Quentin Schulz , Quentin Schulz , u-boot@lists.denx.de Subject: [PATCH v3 2/2] Revert "binman: btool: gzip: fix packer name so that binary can be found" Date: Fri, 30 Sep 2022 16:36:34 +0200 Message-Id: <20220930-upstream-gzip-binman-v3-v3-2-17c99d6d87ac@theobroma-systems.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220930-upstream-gzip-binman-v3-v3-0-17c99d6d87ac@theobroma-systems.com> References: <20220930-upstream-gzip-binman-v3-v3-0-17c99d6d87ac@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Quentin Schulz This reverts commit daa2da754afe1bac777f6cb0f05233e0de7b325d. This commit is not needed anymore since the btool_ prefix is automatically stripped by bintool. Cc: Quentin Schulz Signed-off-by: Quentin Schulz Reviewed-by: Simon Glass --- tools/binman/btool/btool_gzip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/binman/btool/btool_gzip.py b/tools/binman/btool/btool_gzip.py index 70cbc19f04..7bea300b5d 100644 --- a/tools/binman/btool/btool_gzip.py +++ b/tools/binman/btool/btool_gzip.py @@ -27,5 +27,5 @@ class Bintoolbtool_gzip(bintool.BintoolPacker): man gzip """ def __init__(self, name): - super().__init__("gzip", compress_args=[], + super().__init__(name, compress_args=[], version_regex=r'gzip ([0-9.]+)')