From patchwork Sat Dec 5 13:07:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prasanth R X-Patchwork-Id: 107510 Received: from mail-dy1-f181.google.com (mail-dy1-f181.google.com [74.125.82.181]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.5571.1796476050549943697 for ; Sat, 05 Dec 2026 05:07:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=D/R2zcBH; spf=pass (domain: gmail.com, ip: 74.125.82.181, mailfrom: ragaprasanth@gmail.com) Received: by mail-dy1-f181.google.com with SMTP id 5a478bee46e88-387486ad5abso2946579eec.0 for ; Sat, 05 Dec 2026 05:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796476050; x=1797080850; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=9p3IXSeDF8/+IhekKTk69ibIbm7vxu/gLXuelnEcRIQ=; b=D/R2zcBHwsZfHcjaV07SS5d8w3dlNrUF5EXjH0qPqnHazsJhIiskUbKvid2J8gQdip 2FBYNfwzJCC64QNTlWg37usl0ClDt/exsjzCxtGYQQ7zWK3Sq56SKD9kc13E6+WC1AuO NbEbz+pE2pRnZpUB/HGEXKQ3NWUha4A4rcuMiCMmY5fqsYRA0g0+Um3RtWd/RNDarXdT FG1UgiB8mcLm5mrIOheN+UtDKbew9Yd9x6V5j9soLxUwBYkskBUPA+mp04cQSAoRl0Dd hx6hdsKXKdoUdQpRmtmvX1K1J1FTkvAOn4M0fLsOFuvdfVCRrYasGGIobqCmtBX5RPnV wfUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796476050; x=1797080850; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to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jP +g74HZgGVdSNIQHFRTCObaP/cxWqsxeT4/ebRJsiUT4IqYABWSfy+pR/gymmSatMOkXMH4HsejT 6YslICh+dvpqU++51lwfqU7txy+JNDTgXDse+Edl3/jUt854eHRzCFgMuLbUE012 X-Received: by 2002:a05:693c:83dc:10b0:386:c3ab:ab7d with SMTP id 5a478bee46e88-38751fe20abmr5329742eec.3.1796476049509; Sat, 05 Dec 2026 05:07:29 -0800 (PST) Return-Path: Received: from prasanth.alps.lineo.co.jp (vpn1.lineo.co.jp. [203.141.200.204]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-387522491dasm20063976eec.28.2026.12.05.05.07.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 05:07:29 -0800 (PST) From: Prasanth R To: openembedded-core@lists.openembedded.org Cc: paul@pbarker.dev, daniel.turull@ericsson.com, Prasanth R Subject: [PATCH] improve_kernel_cve_report: always use the zstd tool Date: Sat, 5 Dec 2026 22:07:25 +0900 Message-Id: <20261205130725.4183998-1-ragaprasanth@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Sat, 05 Dec 2026 13:07:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/252114 Run 'zstd -dc' instead of trying the python zstandard module first, so there is only one code path to test. The zstd tool is a Yocto host requirement. Suggested-by: Paul Barker AI-Generated: Uses Claude Signed-off-by: Prasanth R --- Follow-up to Paul's review of "improve_kernel_cve_report: use the zstd tool if zstandard is missing", which is already in master. scripts/contrib/improve_kernel_cve_report.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/scripts/contrib/improve_kernel_cve_report.py b/scripts/contrib/improve_kernel_cve_report.py index 3446527654..0b15395e36 100755 --- a/scripts/contrib/improve_kernel_cve_report.py +++ b/scripts/contrib/improve_kernel_cve_report.py @@ -241,18 +241,10 @@ def read_debugsources(file_path): Read zstd file from pkgdata to extract sources ''' import itertools - # Decompress the .zst file + import subprocess + # Decompress the .zst file with the zstd host tool cfiles = set() - try: - import zstandard as zstd - with open(file_path, 'rb') as fh: - with zstd.ZstdDecompressor().stream_reader(fh) as reader: - decompressed_bytes = reader.read() - except ImportError: - # zstd is a Yocto host tool: use it if the python module is missing - import subprocess - decompressed_bytes = subprocess.run(["zstd", "-dc", file_path], - check=True, capture_output=True).stdout + decompressed_bytes = subprocess.check_output(["zstd", "-dc", file_path]) json_data = json.loads(decompressed_bytes) # We need to remove one level from the debug sources for source_list in json_data.values():