From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 04 Dec 2025 14:14:54 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vR9Ac-007rxQ-08 for lore@lore.pengutronix.de; Thu, 04 Dec 2025 14:14:54 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vR9Ab-00072c-PF; Thu, 04 Dec 2025 14:14:53 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vR9AJ-0006qT-64; Thu, 04 Dec 2025 14:14:35 +0100 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vR9AJ-003xZ2-01; Thu, 04 Dec 2025 14:14:35 +0100 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1vR9AI-00000009DBN-41BT; Thu, 04 Dec 2025 14:14:34 +0100 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Thu, 4 Dec 2025 14:14:34 +0100 Message-ID: <20251204131434.2195601-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251106112614.2342635-1-m.grzeschik@pengutronix.de> References: <20251106112614.2342635-1-m.grzeschik@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] report/sbom.py: ignore parameters for patches in series files X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Michael Grzeschik Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as b4f09bfbdd12f8bf04f88e2ca852461122b24b34. Michael [sent from post-receive hook] On Thu, 04 Dec 2025 14:14:34 +0100, Michael Grzeschik wrote: > It is possible to have a parameter for patches in series > files like e.g. "-p0". This case will not work when parsing > the patches when generating the sbom, since the whole > string is taken to check in the path.exists check. > > If the patch has parameters we skip those and only check for > the file which is always set first. > > Signed-off-by: Michael Grzeschik > Message-Id: <20251106112614.2342635-1-m.grzeschik@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/scripts/report/sbom.py b/scripts/report/sbom.py > index 17acbe5e88dc..576197ce0da1 100644 > --- a/scripts/report/sbom.py > +++ b/scripts/report/sbom.py > @@ -88,6 +88,8 @@ class SbomGenerator(Generator): > tag = m.group(1) > if line.startswith('#'): > continue > + if len(line.split()) > 1: > + line = line.split()[0] > patch = path.join(patch_dir, line.rstrip()) > if not path.exists(patch): > raise ReportException(