From patchwork Tue Aug 4 06:02:03 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Turull X-Patchwork-Id: 94400 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34B65C55822 for ; Tue, 4 Aug 2026 06:02:26 +0000 (UTC) Received: from PA4PR04CU001.outbound.protection.outlook.com (PA4PR04CU001.outbound.protection.outlook.com [40.107.162.31]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.10651.1785823345321802484 for ; Mon, 03 Aug 2026 23:02:25 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@ericsson.com header.s=selector2 header.b=ODP5Ssus; spf=pass (domain: ericsson.com, ip: 40.107.162.31, mailfrom: edaturu@ericsson.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ObL1Rfzd/NDCNf6EKNtAZ+8vYEo3CQvSOhmiBf+TR+TKcUAzQDlDmmhnIgtC/p9RFeGxQnHthSsND0BOxoFtPB1LIrF5qkzOTut+/IC5QsBQp/ap8MRlplXO94g6EHZUo6jhF3torw9Lru5FM2UJ1ckIedBEBwQw7YfTVu3nr8Fnq9UhH5k0NNMUtnAVsG+R6mqW0CD+qf3uMmzZJvI/iA4GIX8BfEVLlHdYQcrLJ3eWTDvkpKLMsmhRrO58hQCEIQmvfoshs8JawmFdUF1XdrdvCptXdtiWCiS6xQLwdeZbBuJOx+P0rp3QyL49Zjm3hkX28Edlj40JIVKMhDK6vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=K1+uF6kOC/21Q8lOP07YR21Yabf9tyEBzODA8nvm7i8=; b=jTVJJJF+rBU6agXcSPkGB5QPmwLb07GII8+C01tcOtJu2y1H+xIemrBIKaicTm/FyGV/aTEpmoo+3+/h9tYJWtcCiY/6SBKEHQ3v2DK2EywWakgMzXVPf+Y4cGca/Dg5UdSEFGl2Ta2tkPDFH7Nt6gBjefLR4bdVQUMJpSTRYF9kUQcORS6YvpCftIVQPm+OUqD4UIbtIOX7u+LvgUCE7JouqtqWc1VptqWCR4NrAAuH/iFf98DLELRmY6hU5Jvb802PBqFl6brjTdOn3IY54iGCLopg9V8XATYfRVa8tm27+usdsDyFmy1+YYAVRQFfxlr6CcpPiWDGPJYhNw/Hig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K1+uF6kOC/21Q8lOP07YR21Yabf9tyEBzODA8nvm7i8=; b=ODP5SsusQVCVO+v7N0oh8nBeugoxC0Nh3DJkQXqCS4nDR1Qu8pqzA5JFHmb8XmA+4DYF/t8Mh3tWCylwMnu1445iTey57bQI5hGKGGHS9cAQxHALyFBk/guos/DsF68DTW+udERaf9QiBF2Oid0T9fBtHyFukHyahibKWagfq9sISNd5fkuBzkp0sxKXiTq9ZqIEVvjKlNcqeaJm4p1EW5c9QH+hw8AddRq/UrGcv/gDN+wgpu5gwvp+BaWWogk+PvvCWn2nN22l259HiNLPRMX8rMUJsBT/S/HtIpjeBaBE7woxrk8/kb/YZaSeR6DNogA6bdRzL9rn8sVPmkueeA== Received: from AS4P190CA0043.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:5d1::14) by ZR6PR07MB028784.eurprd07.prod.outlook.com (2603:10a6:910:da::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.292.15; Tue, 4 Aug 2026 06:02:20 +0000 Received: from DU6PEPF0000B622.eurprd02.prod.outlook.com (2603:10a6:20b:5d1:cafe::ab) by AS4P190CA0043.outlook.office365.com (2603:10a6:20b:5d1::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.292.15 via Frontend Transport; Tue, 4 Aug 2026 06:02:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C Received: from oa.msg.ericsson.com (192.176.1.74) by DU6PEPF0000B622.mail.protection.outlook.com (10.167.8.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.292.8 via Frontend Transport; Tue, 4 Aug 2026 06:02:19 +0000 Received: from seroius18814.sero.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.37; Tue, 4 Aug 2026 08:02:19 +0200 Received: from seroius08462.sero.gic.ericsson.se (seroius08462.sero.gic.ericsson.se [10.63.237.245]) by seroius18814.sero.gic.ericsson.se (Postfix) with ESMTP id 0A15D4020C3B; Tue, 4 Aug 2026 08:02:15 +0200 (CEST) Received: by seroius08462.sero.gic.ericsson.se (Postfix, from userid 160155) id CBFF0700DF49; Tue, 4 Aug 2026 08:02:15 +0200 (CEST) From: To: CC: Daniel Turull Subject: [PATCH v2 1/3] devtool: upgrade: ignore changelogs from 3rd party Date: Tue, 4 Aug 2026 08:02:03 +0200 Message-ID: <20260804060205.179715-2-daniel.turull@ericsson.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260804060205.179715-1-daniel.turull@ericsson.com> References: <20260804060205.179715-1-daniel.turull@ericsson.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU6PEPF0000B622:EE_|ZR6PR07MB028784:EE_ X-MS-Office365-Filtering-Correlation-Id: daa5db28-1f40-4b84-dbe4-08def1edf1e4 X-SMTP-Server: smtp-central.internal.ericsson.com X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|1800799024|36860700016|23010399003|11063799006|56012099006|10067099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: Xe08ByuZx4EPogSGE+0C2bOJasQOK13xiFW6MXXz2daEEF01rRTTonlqYMq93MbICSvaODj1s/T59ocs6qRlqSu9p4kfJzAnsgV1iaWjYmcBxY1FXHsKlzcGM00cBAgFiM6tO4xoflJO/GTzduC1VMTJaI3SCF51IuDaKI6X3RWZCBX1Mg5MAG/Td4o/72W4tZbQqA6LaITTtQKgKY8AKBTQxaGKbd3nZXEY/2QdY4sJpEfxPIzxM7QhiaKegSMCDSNFAhj/ZEoxxylOInyLgSaoBXxO3ppI5Ti7XJNivh3GbSMiVkEabL+skTyCMpT8lyW6bWSJfB2kUOrMJXzExO1mym04WAPO4P4BnHyuvbzAs4BZWHbhxW5b1EyqSjLykOeHRXF214fWoNlUTBHFLWKy0CZZ1gvO+0j49RRKIFfUt8+AkiNaKgf4egKNExYbsmuAeuE6SfBWEsmtLkTWlEgY0BZKswA0LV4ATEyGZ1tDw6+HzBsWx9BJWj1qlXTvak09XtcngwXLlji3ZGffInEaSCuy8P6cuNFyE/wz4PQPmEqAXMaxPMLC6+4OTWnmJ2HTQOK64ZW6K22g8qJsOK3AIFOGzo7JpvnNP0OiUxRzbRjQt5HTuJegnYL+qpvgijMPMLtt5JWA8cvL8sJvjwUa4SHkjff4TeV/Rfi9itBO0Q6Nw7Wj2S0EI5OaTCUG6rdrPbuz47vCIeeXaAoAJw== X-Forefront-Antispam-Report: CIP:192.176.1.74;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:oa.msg.ericsson.com;PTR:office365.se.ericsson.net;CAT:NONE;SFS:(13230040)(82310400026)(376014)(1800799024)(36860700016)(23010399003)(11063799006)(56012099006)(10067099003)(22082099003)(18002099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3eNBbxxVQN6ymPIHBHkBq/jjSIQa33UHHE3BR0JMxnEvvo6zFRw1D0m1FZz4ZM51IO2ZQEi4d+nr0NiWaX8p4y5G4XrV2RdUymAOOu/CHwHg7OLyBwcHEi4jh5w/I58bAvsL+GpSC0TVpOVNommzlAc2G0oISXi4qZc+RniZUXjhIR79lPxSgFYJYcojYd7srgc4LJJ6e1s7N3KY4/FwiFf8DsTija+VxrwM6hgE8WvD8w/K2IfmvJLPrpMMs57odxx6HWcAly8hPVq63O7XpdizNevx9OnZh4O/I64YDCZ6rHzr3mgbib/oipKn0UAIvZ38Bv479uAiHJi4Hi/CKG/3LJcFFqTt+t1PTQ7Y8EkF5WbHJHfB05I57VDVsxY90GMgcPMde9zPO50fMt3aMHdSUtibUQ87Ezbb2BJyj58Ib28EW9MIuuiRVUshjMVj X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2026 06:02:19.9879 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: daa5db28-1f40-4b84-dbe4-08def1edf1e4 X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f;Ip=[192.176.1.74];Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: DU6PEPF0000B622.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZR6PR07MB028784 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 04 Aug 2026 06:02:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/242699 From: Daniel Turull Some upstream projects bundle vendored dependencies in their source tree (e.g. nghttp2 ships third-party/mruby, which has its own NEWS.md). The changelog extractor could mistake one of these vendored changelogs for the recipe's own, misattributing unrelated upstream changes to the package being upgraded. Exclude paths under common vendoring directory names (third-party, vendor, external, deps, etc.) from changelog candidates. AI-Generated: Kiro with Claude Sonnet 5 Signed-off-by: Daniel Turull --- scripts/lib/devtool/upgrade.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 13d51bf952..495a5b8217 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py @@ -55,6 +55,13 @@ _CHANGELOG_BASENAMES = { 'perldelta.pod', } +# Path components indicating a bundled/vendored dependency rather than the +# recipe's own source, so its changelog-like files should not be mistaken +# for the recipe's own changes (e.g. third-party/mruby/NEWS.md in nghttp2). +_VENDORED_PATH_RE = re.compile( + r'(^|/)(third[-_]party|vendor|vendored|external|extern|deps|3rdparty)(/|$)', + re.IGNORECASE) + def _run(cmd, cwd=''): logger.debug("Running command %s> %s" % (cwd,cmd)) return bb.process.run('%s' % cmd, cwd=cwd) @@ -591,6 +598,9 @@ def _extract_changelog(srctree, pn, old_ver, new_ver, old_tag, new_tag, workspac try: stdout, _ = _run('git diff --name-only %s %s' % (old_tag, new_tag), srctree) changed_files = [f.strip() for f in stdout.splitlines() if f.strip()] + # Exclude bundled/vendored dependencies; their changelogs are not + # relevant to this recipe's own version bump. + changed_files = [f for f in changed_files if not _VENDORED_PATH_RE.search(f)] # First pass: collect per-version release notes that changed # Matches files with a version number whose path suggests release notes From patchwork Tue Aug 4 06:02:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Turull X-Patchwork-Id: 94401 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57CE6C55ABA for ; Tue, 4 Aug 2026 06:02:26 +0000 (UTC) Received: from AM0PR83CU005.outbound.protection.outlook.com (AM0PR83CU005.outbound.protection.outlook.com [52.101.69.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.10519.1785823345171496126 for ; Mon, 03 Aug 2026 23:02:25 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@ericsson.com header.s=selector2 header.b=hNOe0YZU; spf=pass (domain: ericsson.com, ip: 52.101.69.56, mailfrom: edaturu@ericsson.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TvPlTnxx7GHja9uoZaKESsVZWpIapQmFEwkmWPmqigRB+s+1pxOXBTw5gBvSlt9vw8AI8UGzBrPKhqjs8ddWH/HCT8lda9YjcUDMFMmu833pRIK19VG1EAKkNmQdaO+UoAM+cAhOOCw8PT2xn2urFXeQPVLukJn9ThMq9uYKjbl+DWm7E6CelTo7xizdB0Vwx8C48mEMd3jijIdYRfpy7wp3yWrP1xCq1QNSoXq1Z1aAStCDoQb1UFiU85Zi1z2di8AlF1UnOm4Mw0IVMFFPkRYPdJTVz8Yc1Y9xH2v6bj8xol+xtWMP/slKGCdGD3oz2rm6TaKQV8BFtVUDgRL3wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tsHsigVjtaPVySM4lCI4f+NRKSkRnRedqZGUUyyb3bc=; b=X7SqSRohKSIH0DkwOiKUm0CHAckDTUVrJmCP+mduOwqwfBJfcNqWothketnv2QpHjvnS20bYV3JAKnOvJyGLOMjjD2CcC489PAePUlyN/YeM6ET9ovlwlzsVNXTShERTekcrXDEcI338QulhXbcR2uqg5GpKNxyOax2xgjfJoewpcwQseI2Iz2sqykh1EbhxcI3B/1zK6fve5dgLVA5m4gkCz5FGNhOP7b5oBxeVFDdztp3zGV4+iD/xmD8o0c0RclGMefIP2qwQBSwd/obK4qbeszRJeHPuFLN4ro9KNpcMSRXhspdnuzf4klwcYuhXNq3aWJkbptx9CplniSyGqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tsHsigVjtaPVySM4lCI4f+NRKSkRnRedqZGUUyyb3bc=; b=hNOe0YZUQXHNRHEAg6I8fRSXlCXI1auPyq2aHMID5guqQcYJxXqPXK+iRN4hQ3LJJd8jXKENUDXjf2Hgf91lFeAcYg3+T8uSgrBq6M5WeOtfHIJnZdKsSM6eGh1uya3jqUvX27OXo3p7JuT6vLWLMPys/4H7Gw6sZg+ZBB8yVp0MAaHX9JZPNcWwO2r2l9dP8N/R5HtXngYZZo3q+RKvJ8oE4J8SWbo/h1u20aGPDq+4UHTIKli62jcFq37K08NGg4ucQXJUCseZvO7FKBmG1V5UadLkIgBLibtzN0XVNNHJQFxUhu3hx1CVQCi1aBot7Bi8KrogY/wuU6zZsYqCCQ== Received: from DUZPR01CA0114.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bb::13) by DB9PR07MB7961.eurprd07.prod.outlook.com (2603:10a6:10:2ab::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.292.15; Tue, 4 Aug 2026 06:02:18 +0000 Received: from DU6PEPF00009524.eurprd02.prod.outlook.com (2603:10a6:10:4bb:cafe::a4) by DUZPR01CA0114.outlook.office365.com (2603:10a6:10:4bb::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.292.15 via Frontend Transport; Tue, 4 Aug 2026 06:02:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C Received: from oa.msg.ericsson.com (192.176.1.74) by DU6PEPF00009524.mail.protection.outlook.com (10.167.8.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.292.8 via Frontend Transport; Tue, 4 Aug 2026 06:02:18 +0000 Received: from seroius18813.sero.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.37; Tue, 4 Aug 2026 08:02:17 +0200 Received: from seroius08462.sero.gic.ericsson.se (seroius08462.sero.gic.ericsson.se [10.63.237.245]) by seroius18813.sero.gic.ericsson.se (Postfix) with ESMTP id 07D0C95800; Tue, 4 Aug 2026 08:02:15 +0200 (CEST) Received: by seroius08462.sero.gic.ericsson.se (Postfix, from userid 160155) id CFFE4700DF4B; Tue, 4 Aug 2026 08:02:15 +0200 (CEST) From: To: CC: Daniel Turull Subject: [PATCH v2 2/3] devtool: upgrade: read changelog blobs via a temp file Date: Tue, 4 Aug 2026 08:02:04 +0200 Message-ID: <20260804060205.179715-3-daniel.turull@ericsson.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260804060205.179715-1-daniel.turull@ericsson.com> References: <20260804060205.179715-1-daniel.turull@ericsson.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU6PEPF00009524:EE_|DB9PR07MB7961:EE_ X-MS-Office365-Filtering-Correlation-Id: 391d0425-1bc4-4f92-d67d-08def1edf0b4 X-SMTP-Server: smtp-central.internal.ericsson.com X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|82310400026|376014|1800799024|23010399003|10067099003|11063799006|56012099006|3023799007|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: U5fF+CfPJ3+YBp35cfrNG6WyJFoIA+u1yXm9bl2xgjjuI7MJW1Lkx0B/ZuW8f4/Sx2808SDoCvWyc/Mj65q0+v9FucpikTWmydw3BLqVZJaxSaGJUvL4nQBz9PU/AxNzmVwaDF7lMr3OX2eRh+06FfPcz59qlACl3yrfJELce/aH4a7vjBwaRcmFrHwLfEaxjvPmaMdUQpmf0QXmk5bkfxTfHL0JbPKMtbOl2dsxwRcLPufXoiNhYtIl31bCd18w5qPoDKra3u7toj1S8AoycNn46E/xT+LFFE9mUPDvm6sn+XP9WtJGKGe6XZhR70Xt9lQdC7NUvC44jz+PcJ6fLMK93IUAcjmeg/uVThiNC/fOfg3W7d0Ju6iDkKxpMQXxF5L1aCXq90N3A5LATF8ePTiKnKR4LrXAPDpE3AntOSVEPBDfnRSaYTnhis5nt32U1iErcZFqSLPcOOVPkSJ8OsZGtUHxL389HkKerJCBahP9d6Fph/VQe87f8xeufoHTF9DIeff/mZxeG1yaWvWp6UEKZUlISOwwYP04SVLsy5HRXGjXDnzprq2LpOw8Q/a4Wr+fftZ7aDQWy4Wwr6OLoEuF+36p24LnLyJWS8gnptLP8UBh0F4m/f/fIwYOjG6Y9RmMnYRrL7QVVJzWB5mV8hiOoPrUeKTXWQTEjHnsIdd2lbCNe0aGn8K0audUzVus+2Lih57kg42LR1BBRsxVMQ== X-Forefront-Antispam-Report: CIP:192.176.1.74;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:oa.msg.ericsson.com;PTR:office365.se.ericsson.net;CAT:NONE;SFS:(13230040)(36860700016)(82310400026)(376014)(1800799024)(23010399003)(10067099003)(11063799006)(56012099006)(3023799007)(18002099003)(22082099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: A4hpJaU+7Ovv91MUw28kEQi7CVedqj96Ur9hXLeBrY4dR8I6PLfZDltov7thuDS2tXM77An1OhuyDrhBOzTS+CHNOES7cQvJlBu7B4reMGMuxaY0uSSUYVwbcF2Ms2qGTFTrG0EDlP2dJqz690nY4owfEgtsmeRqMLTTXNbEJT1OCreGuk22F/Zu+fmrgxEAYkgTlQe++YxZwPi0PjgR9iaUKs0p+ZL9RY/JAsmQ1GBoGKSNBqMrTp66MuUNnUIJ/TEwWuagGTXcjt0AP0WJ0APgwfaTKCbvhB/PRI32pPzCD/ORZEDAHejJADfGvZSiyDYCGhB6a5GCjV+0y21R7GXNrrqhbedgEwFVOURAFel5kIz7bsxau1nVpLqLtJ2RqF4VxMrPyVUHxarL9i0VkuSR89RMOWD+KluYS0RoJR/kxCXXfiS9hbgUlRKZZJh0 X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2026 06:02:18.0312 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 391d0425-1bc4-4f92-d67d-08def1edf0b4 X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f;Ip=[192.176.1.74];Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: DU6PEPF00009524.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR07MB7961 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 04 Aug 2026 06:02:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/242698 From: Daniel Turull bb.process.run() always decodes command output as UTF-8, which raises UnicodeDecodeError for changelogs containing non-UTF-8 bytes (e.g. Latin-1 author names). Add _git_show_file(), which redirects `git show` to a temp file and reads it back with errors='replace' to tolerate that, and use it for the existing per-version release notes lookup in _extract_changelog(), which had the same crash exposure. AI-Generated: Kiro with Claude Sonnet 5 Signed-off-by: Daniel Turull --- scripts/lib/devtool/upgrade.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 495a5b8217..6883c99cce 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py @@ -589,6 +589,18 @@ def _resolve_rst_includes(content, srctree): return ''.join(result) +def _git_show_file(srctree, ref, fname): + """Return the content of fname at ref. Changelogs occasionally contain + non-UTF-8 bytes (e.g. Latin-1 author names), which bb.process.run() + can't handle since it always decodes command output as UTF-8; + redirecting to a temp file and reading it back leniently avoids that + restriction.""" + with tempfile.NamedTemporaryFile(prefix='devtool-changelog') as tmpf: + _run('git show %s > %s' % (shlex.quote('%s:%s' % (ref, fname)), shlex.quote(tmpf.name)), srctree) + with open(tmpf.name, 'r', errors='replace') as f: + return f.read() + + def _extract_changelog(srctree, pn, old_ver, new_ver, old_tag, new_tag, workspace_path, is_git_source): """Extract changelog between old and new version using devtool git tags.""" changelog_content = None @@ -612,10 +624,10 @@ def _extract_changelog(srctree, pn, old_ver, new_ver, old_tag, new_tag, workspac continue if re.search(r'(releas|relnote|change|news|migrat)', fname, re.IGNORECASE): try: - file_content, _ = _run('git show %s' % shlex.quote('%s:%s' % (new_tag, fname)), srctree) + file_content = _git_show_file(srctree, new_tag, fname) except bb.process.ExecutionError: try: - file_content, _ = _run('git show %s' % shlex.quote('%s:%s' % (old_tag, fname)), srctree) + file_content = _git_show_file(srctree, old_tag, fname) except bb.process.ExecutionError: continue if file_content.strip(): From patchwork Tue Aug 4 06:02:05 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Turull X-Patchwork-Id: 94402 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 448EFC55843 for ; Tue, 4 Aug 2026 06:02:26 +0000 (UTC) Received: from MRWPR03CU001.outbound.protection.outlook.com (MRWPR03CU001.outbound.protection.outlook.com [40.107.130.13]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.10518.1785823344544021378 for ; Mon, 03 Aug 2026 23:02:25 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@ericsson.com header.s=selector2 header.b=JhV9RQ85; spf=pass (domain: ericsson.com, ip: 40.107.130.13, mailfrom: edaturu@ericsson.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=obHeaB2jjrWkSPNnXaRUbdg6Yst49EFQlSJ/0dJ6NUJb++O2Vo+q7eE+u4VsG+OOAla39VPkn9mbIMDQt8ImqS4WMoTimWvoQhD7eyBI7KXh2VzafV+vGejtlBLKCYkk6E46XewjlN/8FBdBa3JwJZJSnq4hskfup2MLqC5vkq4/6RYVL+Hk3UvwR9qiGFsTJmT6tplt1Op/Xi3IMTAVpLH0ZT2zhRnpvLCsY6oYhst5mB1FMq/jrLEwiTtVlD5XcfL2nm9zSDWJ09WuMXoTqx9TFwRku22GDDwvB74TTTpuSC3XTHeKMb/H2x9zOWCDN4Wa3T+zoZEoyRjPlpw/mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PLk95ay/TXPzb/L33O0zGKj1VEPKFSV9Inft88qesrY=; b=huRJIw1HURL9yCGyfqeSLE5WiWwHhPtEOgvP60Iu523utk4zPwcdUFkn+YDVSaIs5l44r2WDgycvZED9l5TLMpbEPi9B5mD2j9ZpEOL02Z+gM+S/llO773u++MIUELX1o7Z2xCIYacQBDZ1s2iZqpRzEZtIJHG++IXqfAmooqLwWnK7yQ4p1WmYkXtMfS8Xw2YNWOkeTy+OPyQ6+ZQGxTraMn+2bDmqC1OGxPRq8tj/5k/T+w5/33ZQlQ2KZeZScqJr6nEIZrpJ6PkBbBMg/BF6WVQHGUuV3cT7BVJqlG8RYYz6GQQ7a4PJhN5weHmpKmLq8OhD2b1mj0Wguxz29MA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PLk95ay/TXPzb/L33O0zGKj1VEPKFSV9Inft88qesrY=; b=JhV9RQ85Iw4z1y0XBsrjDYyMoNveuoK1kRmUMWlrN5weM8sBqiwkY7TiEjin0Igeck0CQGFW/UBLWbzzq0QK2dkv+gkpRsn+kFVyoDtD24nk0dRTQfOyz4qr1Bc0knIMJ5x6QQhjHqcD6oLJyVrGJoUXjI+2srIu5Gh5+fjz8DcKdv2qA6Ufi9mC9o5h8uzSgTUhezI3BMxn6xtJTnCUwL1Deaw2ecLbtffA8QKPf1kjMUYpR26LlShQyYj7PW6G9+hlAXGN6/CyfySAJMZqtrUv75KuizLHPVLa0Q/KrZiysrxwfoMgyJ6EnvxfipNnl6ZtWbFy1SpEfBj1EGyQMQ== Received: from AS9PR06CA0308.eurprd06.prod.outlook.com (2603:10a6:20b:45b::28) by AS8PR07MB7397.eurprd07.prod.outlook.com (2603:10a6:20b:2ae::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.292.15; Tue, 4 Aug 2026 06:02:18 +0000 Received: from AMS0EPF0000019B.eurprd05.prod.outlook.com (2603:10a6:20b:45b:cafe::19) by AS9PR06CA0308.outlook.office365.com (2603:10a6:20b:45b::28) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.292.15 via Frontend Transport; Tue, 4 Aug 2026 06:02:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C Received: from oa.msg.ericsson.com (192.176.1.74) by AMS0EPF0000019B.mail.protection.outlook.com (10.167.16.247) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.292.8 via Frontend Transport; Tue, 4 Aug 2026 06:02:18 +0000 Received: from seroius18815.sero.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.37; Tue, 4 Aug 2026 08:02:18 +0200 Received: from seroius08462.sero.gic.ericsson.se (seroius08462.sero.gic.ericsson.se [10.63.237.245]) by seroius18815.sero.gic.ericsson.se (Postfix) with ESMTP id 114E14020B46; Tue, 4 Aug 2026 08:02:15 +0200 (CEST) Received: by seroius08462.sero.gic.ericsson.se (Postfix, from userid 160155) id D4710700DF4C; Tue, 4 Aug 2026 08:02:15 +0200 (CEST) From: To: CC: Daniel Turull Subject: [PATCH v2 3/3] devtool: upgrade: diff git-log-style changelogs by commit hash Date: Tue, 4 Aug 2026 08:02:05 +0200 Message-ID: <20260804060205.179715-4-daniel.turull@ericsson.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260804060205.179715-1-daniel.turull@ericsson.com> References: <20260804060205.179715-1-daniel.turull@ericsson.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF0000019B:EE_|AS8PR07MB7397:EE_ X-MS-Office365-Filtering-Correlation-Id: a579f621-2559-4db2-734d-08def1edf102 X-SMTP-Server: smtp-central.internal.ericsson.com X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|1800799024|23010399003|376014|82310400026|6133799003|56012099006|11063799006|10067099003|3023799007|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: L7Umxt/UIAEpdd6fcpD7f8/G5fpnGg9YADVHHndb9v/1bryWvReoYDDBIxFP5FQnXHVdN19EQgCsMd5vOgxB5DZ7jsKRkDhxzRrqa9+9xC9rWxgRtxE81T/PCprVLe/e4kxfdxlfFKteCrbs8T+vZDSmDw1dWcOtxsLW2wGDKG83kDPRadrIPmvR9fKcmM041M4dotcOmseL13OMpmiHHUzfZIlWHUOhcjAYwO1CNurErhvEaiBMtAJhjXvNBWS3BbxUTeJVnpVZIbLsRZaxxw706nnjm/ZOhy9lsA30ozcVzG6GzUtRuumz9OvcmkC25sLNPEQcr/GC8NLI+Uf+kyNqUfe6TqyMabzUlE23DNo5hXuTd71pAkmiSbTdgO302/l1/PdmwOvTeIW4bBW/0VG+xM1OUcvekoTSUiGFGeumVm2W1DWxTcGljaDIF/uWXBjRBJpECVX+fCO6R0w29GcDl5AUUAsmqoEkUxhM+k6peUndtvU92grV8w/nUei/h73GkrvDopxcqYzK6ktgiO8tKY1BF0gNujGdI8Gia7Nvl29suVbp5aEK4fIKmDsDWTPFIeC5v5NQM38+YjTo2fuqGraSpePCKG/8o3MSwU5ROe3buo596vFebkiREIfrGfWGwDmXM1tgUrJX8DHH5yfp3PwJR4Q40K543zq++4wiejkwYvp1HAu7le6gAyN3PyPRo35UBHKQPVU3xBYFAw== X-Forefront-Antispam-Report: CIP:192.176.1.74;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:oa.msg.ericsson.com;PTR:office365.se.ericsson.net;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(23010399003)(376014)(82310400026)(6133799003)(56012099006)(11063799006)(10067099003)(3023799007)(18002099003)(22082099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cB8n8N4qLvCE5xdbuZ1mMBTOI5rSMf+3hbEIdRLkEgIHgdb25lRUW3E5w24lnEjI857G38wDqbY07Fg/hTBoqBCa5elD1bHUwg8IT7ujdzdpCpfVZ0y6f0Jwnc1sO3xbBQ3qlq0ik3umpcI4ujlkYZkXWgqBwAwH1Jt9DhdV5w6UKQv/NaGCMSGbNlKeDPRo3SsNLe4/MS/Z3WvozFCWqA1FTMS0T6svggyQwi8igI9nWqxFaPJfAlAPQqdADmZNM4U589n2bj0YPw6ewVSh+T2DslH829aw5hAFkpM6beP2Fb2aFjQskq3NOwQqmCeDqeOfcT6Ibi8qVX9DMtlDdw8vBJpFppHxJahhZA1kfPH+fz2xhBxDpKtS+8XlXaDaPOwB4ozC4dJpluoRJciJ7kFZwI+eXe3Xx9tcEjHzFdUrKUgNEYhj9W2Lhzp48U+b X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2026 06:02:18.5615 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a579f621-2559-4db2-734d-08def1edf102 X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f;Ip=[192.176.1.74];Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF0000019B.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB7397 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 04 Aug 2026 06:02:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/242697 From: Daniel Turull Files like nghttp2's ChangeLog are the literal output of `git log`, regenerated wholesale on every release. New commits are prepended, so every existing commit shifts position even though its content is unchanged. A textual diff sees that shift as removed/added lines instead of showing just the commits that were actually added. Diff these files structurally instead: compare commit hashes between the old and new file to tell moved commits from genuinely new ones, and report the subject lines of the new commits. Falls back to the existing line-based diff for changelogs that aren't git-log output. AI-Generated: Kiro with Claude Sonnet 5 Signed-off-by: Daniel Turull --- scripts/lib/devtool/upgrade.py | 64 +++++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 9 deletions(-) diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 6883c99cce..856110c803 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py @@ -589,6 +589,43 @@ def _resolve_rst_includes(content, srctree): return ''.join(result) +_GIT_LOG_COMMIT_RE = re.compile(r'^commit ([0-9a-f]{7,40})\b.*$', re.MULTILINE) + +def _diff_git_log_changelog(old_content, new_content): + """Diff a ChangeLog that is itself `git log` output (e.g. nghttp2), + regenerated wholesale on every release. New commits get prepended, so + old ones shift position even though unchanged, which a textual diff + would wrongly show as removed/added lines. Compare commit hashes + instead: hashes already in old_content are just moved, anything else + is new. Returns the new commits' subject lines as one string, or + None if either file doesn't look like git log output.""" + old_hashes = set(_GIT_LOG_COMMIT_RE.findall(old_content)) + new_commits = _GIT_LOG_COMMIT_RE.split(new_content)[1:] # [hash, block, hash, block, ...] + if not old_hashes or not new_commits: + return None + + subjects = [] + for commit_hash, block in zip(new_commits[0::2], new_commits[1::2]): + if commit_hash in old_hashes: + continue + # `git log` separates headers (Author:, Date:, etc.) from the + # commit message with a blank line; drop the leading blank line + # left over from splitting on "commit ", then skip the + # headers up to the next blank line to get just the message. + lines = block.splitlines() + while lines and not lines[0].strip(): + lines.pop(0) + blank_at = next((i for i, l in enumerate(lines) if not l.strip()), len(lines)) + message_lines = [l.strip() for l in lines[blank_at:] if l.strip()] + # Skip the 'Merge pull request ...' line GitHub adds as the first + # message line of a merge commit; the actual change subject is the + # next line, and keeping the merge line would duplicate it. + subject = next((l for l in message_lines if not l.startswith('Merge pull request ')), None) + if subject and (not subjects or subjects[-1] != subject): + subjects.append(subject) + return '\n'.join(subjects) if subjects else None + + def _git_show_file(srctree, ref, fname): """Return the content of fname at ref. Changelogs occasionally contain non-UTF-8 bytes (e.g. Latin-1 author names), which bb.process.run() @@ -642,15 +679,24 @@ def _extract_changelog(srctree, pn, old_ver, new_ver, old_tag, new_tag, workspac for fname in changed_files: basename = os.path.basename(fname).lower() if basename in _CHANGELOG_BASENAMES: - diff_out, _ = _run('git diff %s %s -- %s' % (old_tag, new_tag, shlex.quote(fname)), srctree) - if diff_out.strip(): - lines = [line[1:] for line in diff_out.splitlines() - if line.startswith('+') and not line.startswith('+++')] - if lines: - candidate = '\n'.join(lines) - if not changelog_content or len(candidate) > len(changelog_content): - changelog_content = candidate - changelog_fname = fname + candidate = None + try: + old_file = _git_show_file(srctree, old_tag, fname) + new_file = _git_show_file(srctree, new_tag, fname) + candidate = _diff_git_log_changelog(old_file, new_file) + except bb.process.ExecutionError: + pass + if candidate is None: + try: + diff_out, _ = _run('git diff %s %s -- %s' % (old_tag, new_tag, shlex.quote(fname)), srctree) + except UnicodeDecodeError: + diff_out = '' + added_lines = [line[1:] for line in diff_out.splitlines() + if line.startswith('+') and not line.startswith('+++')] + candidate = '\n'.join(added_lines) if added_lines else None + if candidate and (not changelog_content or len(candidate) > len(changelog_content)): + changelog_content = candidate + changelog_fname = fname except bb.process.ExecutionError as e: logger.warning('Changelog file extraction failed: %s' % str(e))