From patchwork Thu Jun 11 13:11:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89769 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 C12E0CD98D5 for ; Thu, 11 Jun 2026 13:11:55 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.45065.1781183508761067731 for ; Thu, 11 Jun 2026 06:11:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=Y5mEhnHu; spf=pass (domain: smile.fr, ip: 209.85.221.44, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-45eee266c6cso6527523f8f.1 for ; Thu, 11 Jun 2026 06:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781183507; x=1781788307; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4CjKr0qX1d668HabZpFzG+MHiddz0rIE6LgKXx4FAjA=; b=Y5mEhnHukQ3wbJ/nOojsq0TRDylC0zeflMC5Cd50h2rNHeDV7cBe+5eMRBkaZ9UWfv sDCXYGM6F+9amkH9K4iA2f1xgrpjDAGA1++Qh8H0rkDLGFo53Pk0i16MbgzjhS0J68WV rA9A2tz+tRAjhdStWzPl11CouNT+A2Svhl9MU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781183507; x=1781788307; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4CjKr0qX1d668HabZpFzG+MHiddz0rIE6LgKXx4FAjA=; b=dBlAAk241fY1ERQJg4t7HMRGHB+hKjEiZ04PWv8Qp3ZuaqBL4el4u4G1KeaCkOjRtA xa02AIQcYOjFq60MNwnIhNQanRK8neJ0jJgrIZjXaPcY52ao3+qOOQi+8mG+S5zw047Q 63Dp9sehkQIeVXaH3MIRzwYPciN0/akUrZd3ypGqJbFCT8M/x0SguLcnCcM65he2jX8N xjVSqR0rcJCaETnxnlgA0wv7JPx8f3efV+xDvLy5FYYmd/DazSK12BBg2Zm2HCD/OxEE XZvb5fwFio2dKHpvpkZB8MPxZ5/qyHprhBFfJeGi4ng/6g7jdjZni9aBiok8gicJ1Rz6 1j6w== X-Gm-Message-State: AOJu0Yy0ffHEL5Lyc+9vsUNX5evhzwMBoM5JMgDmMmlYvmZcIxNal7UZ LkJRAu8ot7IDb+9fGOqd6eH41+ZwGPq+IPa5A59yj128IxJFP3nOpooq+KqPvilrZLtkhJC/sQc 2zKLR X-Gm-Gg: Acq92OFCPhH5U9PTSLCeTd7WUPREwGOc2e5RcRmYqJzfTEXjSkijsnU1e4xgJetxx/Q 3HY8wiwNx2J41c92FbZIv6hasEIzdc39XmO++CFRhoxB3qwaNzDk+9wd/Bl2/+zumgpQicgI0aw XfPR32Ua/SHN5/FraVy6Qx58veCgyXf086JKwdO8SjyiZotw1OnQgWvh7NfG4v80w0A6c2q5rK6 SnBwGK5oz0Av0O9uRfOB8Nd/wyA8Ott+LA4V6agPoFqmpS3pUz0bl7UHE95UgsYIAS4gx6p5I7p YvhTozNhYPEhqQhY7znoqLTdkNQUnG6swSDsYHZ4+Uy5E4RzL+dFGC+PSrIhcznag69Wl46Eny1 kKdAcYNUJlaqBzrqLRrWM+OYYbeVTjSb/UWqT+9MzbSjBHGyaPLJ2lAinUAw0x0wly2xuSF0Vpg YoH4PfzjuUqnLA1HdiZgG6j/rFeGw8CdNM3fb87n+lEacuIlAds1NY1qu450fbkrICFilvcaUmY Oqat4XMaqWBM6s273G4uXDLyVAPVDj8P9YfOJ8= X-Received: by 2002:a05:6000:438a:b0:45e:f2e1:9a20 with SMTP id ffacd0b85a97d-460677ce9c4mr4129569f8f.27.1781183506952; Thu, 11 Jun 2026 06:11:46 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa0084744357c26c6744.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:8474:4357:c26c:6744]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f3529e0sm82048251f8f.28.2026.06.11.06.11.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 06:11:46 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH v2 1/8] fetch2: reraise IOError during download Date: Thu, 11 Jun 2026 15:11:23 +0200 Message-ID: <69e22a5f95d650ed83e6064d4e99b8dc067a6659.1781183212.git.yoann.congal@smile.fr> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Thu, 11 Jun 2026 13:11:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19661 From: Anthony Squires Fixes [YOCTO #16268] Adds a missing "raise" statement to download that ensures when there is an IOError/OSError that is is correctly reported and not silently discarded. When an IOError is thrown in this case do_fetch silently passes which then leads to downstream failures in do_unpack when the file doesn't exist. Signed-off-by: Anthony Squires Signed-off-by: Richard Purdie (cherry picked from commit 0460038e4705934e614b26ba5febc09293924cd4) Signed-off-by: Yoann Congal --- lib/bb/fetch2/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 0e4f491ce..d913d7511 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -1969,6 +1969,7 @@ class Fetch(object): if e.errno in [errno.ESTALE]: logger.error("Stale Error Observed %s." % u) raise ChecksumError("Stale Error Detected") + raise except BBFetchException as e: if isinstance(e, NoChecksumError): From patchwork Thu Jun 11 13:11:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89772 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 20A66CD98D8 for ; Thu, 11 Jun 2026 13:11:56 +0000 (UTC) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.45067.1781183509251983706 for ; Thu, 11 Jun 2026 06:11:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=pXbChp8I; spf=pass (domain: smile.fr, ip: 209.85.221.45, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-45ef82204c6so4471233f8f.3 for ; Thu, 11 Jun 2026 06:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781183508; x=1781788308; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=1bJTm+x7gsnTZIqc/fMU92sr9KNTqmmtFPtCs2sPVEo=; b=pXbChp8IJeGuL22/Qz5KCt0DtG/hC/nB8Jg6FzBW/enxQoIYEBmFhK3HFSlKD4RJXV hlcuxwQs0r0kHeAD8k8TDQ5bMZDNuZD2Yxfhjl/YD1/OD4DnR5a1DZsX5IxUE9gnFE9z L1B6QJgmYWWOew4Q3d0N+Y0vIZozGc3zDooKY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781183508; x=1781788308; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=1bJTm+x7gsnTZIqc/fMU92sr9KNTqmmtFPtCs2sPVEo=; b=NsHje1hU5crCHOOA1gRFzgAeU5jbDkfnPXNIJ77M95C0YYIhRJN5o5flNj0WeePWHI gmSu61RXg12D75CUmU+IAF+Gmv8EcvovKsEmpooIIkmi4JcazmFpMtiKfiRCrku/gzPt o0mbt1GSk9jUg/C8Z+lGUf46AiRJsjwTHCukE1cgXXrT/+vuHxeHAoY9otPDZu4Nj80K b5RcM85bHUz9JcabjRHwTIMBxgMyFxEshfXjRrDVBdMEcIKo6iZgYYjeXGkhtzZ/3rAg P35EMvSpHyJPap7hGTzU9R9diIW5CWqJ19xUFd69+9TdUAjYUy25VFU0q7fHUzx52t5t sCiw== X-Gm-Message-State: AOJu0Yw5WTflLwJeNhPYwxLMFzFW68ZyEL1thxuJSnuiH/UM+U7gaaSr sxC7UZupP8VGOSp0dWMo/gs8OX/GHFA1r5Vo322rwp67kVPJIDMFb+HewYphx8thck5x+GL0cq+ aDPei X-Gm-Gg: Acq92OHk3FWC8HmPWLsYtQqvjaEvdMhBUWxhU3jkNvkzKIqEYQpDVqcs4SYMgvash84 i+JQoCoqV7O7SKtZlRkUXNk0unh73y67BU7qjV5BJ+pgSmNXw7KRMFR6QEgNKJ0/k7yM+VLDxBG lfGp4OSGRBLTemBfd2JBqsGJOcnirNwU/pjuPI/2fhDu0dVMF+cX7l87QoonkUtZ1gjfmmTtpnj 7t29/hH3Yopr++qt8v93a7nxa7Pngmu63/5uJxJ3UHdGfhx7GfzeRXOa/R74UPm78gnS9efT0R2 Y0N1Ahi8AaN1bN5+C+X4GztyIGeHuiQkX5cjUgKZgnyEQIVpUQ2jWg9QU+ddED3e97h5BU1Y/gS 0Jj+rodf+koUu4E/NuqNLG0iCfe4koN3c7JiVE05PoQuhMvgafLEn5kw6BnncuhLWpzA+pcVHW8 8LD6UWl2gTWusrXagNgOsneFEZAtmenCq/LhdkBz3U73487m3Bj64AM3Z0V+x040WR1gXvRqWn2 FeqW5lfPE92LSMAdyvgCI0jijSE5CIs9MaPSpkLlFbRiZs4cQ== X-Received: by 2002:a05:6000:2993:10b0:45f:f142:d571 with SMTP id ffacd0b85a97d-46067475b65mr3234677f8f.13.1781183507576; Thu, 11 Jun 2026 06:11:47 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa0084744357c26c6744.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:8474:4357:c26c:6744]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f3529e0sm82048251f8f.28.2026.06.11.06.11.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 06:11:47 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH v2 2/8] bitbake: fix issue with varflag exclusion Date: Thu, 11 Jun 2026 15:11:24 +0200 Message-ID: X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Thu, 11 Jun 2026 13:11:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19662 From: Marcio Henriques This patch fixes an issue when checking if a varflag can be safely excluded. BB_SIGNATURE_EXCLUDE_FLAGS lists variable flags that can be safely excluded from checksum and dependency data for keys in the datastore. When bitbake checks if a varflag must be excluded it checks if the varflag name is part of the string stored in BB_SIGNATURE_EXCLUDE_FLAGS. As an example, if the varflag 'filename' is in BB_SIGNATURE_EXCLUDE_FLAGS, the varflag 'name' will also be excluded because the check will return 'True' when checking if the varflag is part of the string with the varflags to exclude. To fix this issue the string from BB_SIGNATURE_EXCLUDE_FLAGS is converted to a list before checking if a varflag is part of it. Signed-off-by: Marcio Henriques Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit 8ab71d0ce302521da6a7e18c887cd85d9a94e8ee) Signed-off-by: Yoann Congal --- lib/bb/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bb/data.py b/lib/bb/data.py index 5fdcdb04a..b12972c03 100644 --- a/lib/bb/data.py +++ b/lib/bb/data.py @@ -378,7 +378,7 @@ def generate_dependencies(d, ignored_vars): mod_funcs = set(bb.codeparser.modulecode_deps.keys()) keys = set(key for key in d if not key.startswith("__")) | mod_funcs shelldeps = set(key for key in d.getVar("__exportlist", False) if bb.utils.to_boolean(d.getVarFlag(key, "export")) and not bb.utils.to_boolean(d.getVarFlag(key, "unexport"))) - varflagsexcl = d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS') + varflagsexcl = (d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS') or "").split() codeparserd = d.createCopy() for forced in (d.getVar('BB_HASH_CODEPARSER_VALS') or "").split(): From patchwork Thu Jun 11 13:11:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89774 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 7684CCD98DB for ; Thu, 11 Jun 2026 13:11:56 +0000 (UTC) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.45068.1781183509834505252 for ; Thu, 11 Jun 2026 06:11:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=dzIqsPZJ; spf=pass (domain: smile.fr, ip: 209.85.221.49, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-45ef1198766so578738f8f.0 for ; Thu, 11 Jun 2026 06:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781183508; x=1781788308; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=KNC//NHZAI5gNisy88SrA7x3BSB85BtBOZzunxXdwas=; b=dzIqsPZJVIJ/ywx2wdMOAH9m89wsKpjhvmMwxTmqI+vshDpOU7+Qg+gEMrnFXZysZp 59nIzfxV4RHwboF1nHjr5ig8q2cTZZ76O+2c+0Wt+dMUeIhATqpWRl3F46rsIYeXbE6C Zz6WVAzaDkYGC/Cvn/cykGp8PxVTXNM8Agt0k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781183508; x=1781788308; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=KNC//NHZAI5gNisy88SrA7x3BSB85BtBOZzunxXdwas=; b=VkVTBSoYaTA3gwABmmpp+Mh29HoWWx/8duaxvTiO6J11v58t5t6V9VAUR0dD4yoI67 BLgb0pmbyq0rDsqbevHIGStxsWSPki5q9ynvsf9WZWEoQMdwxq8r9TZJw7kT7riKnMwp y/XT6gt4AZY09LwyTIxU7jNZcz0eDA7uKPrFk19DcPvrQC4+4DWxC9bIMZ7hM3r6XazM 8opE9Wy+r7YGzJ/cEevL54W2tUlFVUsqcdwVzsVZpZtgEvIeVoon5jcpmX5UeK8En9I8 EIgO7YTea//OJ5fEGpERK3oA29j3taZQTTl7WJg/gr8ST/7KcpwK/f9TujSNdNM0L2b9 gAvg== X-Gm-Message-State: AOJu0YygDgWB+MHZvCRWg1FryJQkUrxdyniYxnAqRJC2tiNZ4RYrzwuA C5lBG0qrjT3sZKYr5QyFdezsetTw6G/4UenqqpvPialogpEa1a3Fni7QwalTR+Z6/9zdx+CS/nY xQ3Th X-Gm-Gg: Acq92OFjgmsiD7LHHSqSumUMkDmXO9fgrp5xsZmaFG/D0XDqmufIG2DoPaYSXy58vDk 4Wr9cts+ja2OnrWLUqV7yeHE9kQV3RkTYi3avkEOoUBjWD+HMFDyGik3JFY+onV8fgdCmW8qzMe 0edxU8JPZYi4gWRcYt4ulBBiOcSIXwrTq+KEy1Fiu017gQj0fS+poM58rbdCYnRWDYqrS5uDUZO uWVC7kZjmPMlJLma1kOPwAWlxYOvF5reufaRiFzfD/4Jd7vycgUF0/FPdqI6ioYlnwHrG2bJ+cs BjRN3OsygtCtvlzZMiMAkfgM8IIh8jXspM7DsqwkADn/oIXHE9JYOWTBIvqhC6lXh2jKFQDwdpT v8UtpV2M2S6ldzhDIrOiftc96/FhBogrUMdFZABN/netCEjKjONwI+FacQxuh8ed7T13AXpTGsw quVrRJYUtZ+acivhppN+zUcYt63502YbOUO2ATpXo7StjMzNZ/BkJuuv3JsF6/c8KpA1wfTwrfL k3JUuVXG+4CpQkxRJUJMSJKrbjUv9rEhUYEYQM= X-Received: by 2002:a05:6000:4910:b0:460:133f:2a4e with SMTP id ffacd0b85a97d-46067be8615mr3894718f8f.13.1781183508088; Thu, 11 Jun 2026 06:11:48 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa0084744357c26c6744.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:8474:4357:c26c:6744]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f3529e0sm82048251f8f.28.2026.06.11.06.11.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 06:11:47 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH v2 3/8] layerindexlib: restapi.py: fix unbound variable Date: Thu, 11 Jun 2026 15:11:25 +0200 Message-ID: <3235552aed757545a33db9cea5cfa23907f01673.1781183212.git.yoann.congal@smile.fr> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Thu, 11 Jun 2026 13:11:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19663 From: João Marcos Costa If the requested branch(es) is not found, a debugging message is displayed to list it, so the expected behavior is something like this: $ bitbake-layers layerindex-fetch meta-firefox NOTE: Starting bitbake server... Loading https://layers.openembedded.org/layerindex/api/;branch=wrynose... ERROR: Remote layer index ['https://layers.openembedded.org/layerindex/'] is empty for branches ['wrynose'] However, the variable currently used is unbound, and the error below comes up: File "/src/bitbake/lib/layerindexlib/restapi.py", line 216, in load_index_web logger.debug("No valid branches (%s) found at url %s." % (branch, url)) ^^^^^^ UnboundLocalError: cannot access local variable 'branch' where it is not associated with a value Replace 'branch' by 'branches' to fix this. Signed-off-by: João Marcos Costa Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit df3295f016a74a1414b8af5adb9f2a3967c365b6) Signed-off-by: Yoann Congal --- lib/layerindexlib/restapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/layerindexlib/restapi.py b/lib/layerindexlib/restapi.py index 81d99b02e..65405cb7e 100644 --- a/lib/layerindexlib/restapi.py +++ b/lib/layerindexlib/restapi.py @@ -213,7 +213,7 @@ class RestApiPlugin(layerindexlib.plugin.IndexPlugin): pindex['branches'] = _get_json_response(index.apilinks['branches'] + filter, username=up.username, password=up.password) if not pindex['branches']: - logger.debug("No valid branches (%s) found at url %s." % (branch, url)) + logger.debug("No valid branches (%s) found at url %s." % (branches, url)) return index index.add_raw_element("branches", layerindexlib.Branch, pindex['branches']) From patchwork Thu Jun 11 13:11:26 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89771 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 E61EFCD98D9 for ; Thu, 11 Jun 2026 13:11:55 +0000 (UTC) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.45069.1781183510373867085 for ; Thu, 11 Jun 2026 06:11:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=nwbiu5OU; spf=pass (domain: smile.fr, ip: 209.85.221.46, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-45ef41adbc1so6030452f8f.0 for ; Thu, 11 Jun 2026 06:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781183509; x=1781788309; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Mv/H1P35AS67J8PRe85/IL92ZBNvEdqmnpHcjvdWzHM=; b=nwbiu5OUPLIqS+yFAsBLN3Ur56e/TRVvSXpS+dptXu1rE8ogM9Hzp4D+8QBHzddPir jZX/M2noaAvER6dHFq9zUGgHWRkuYJ6zUHUMzurE1tki960XUYEZhpsmKpJAKSex7iAf bImIcq4LTyySS7eBxFci9lUymBLAtk0OQh5d0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781183509; x=1781788309; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Mv/H1P35AS67J8PRe85/IL92ZBNvEdqmnpHcjvdWzHM=; b=KxRuzwQ9y/tgmwmuDORLlQArsLEKxRh+WzbPKCvSDah+Dcd5cZJ23AjSuHxCvNIFnn 3zox5BIHGgk3WVG+BvWiTL2ch4Affj26lxFutf49wYqsm3YGdn9m54OLpJmp1eZvQO2u cWbjYLp4uOY3PeQEOrSCrkx5pbAmRHdTY0YtNiD6gLLZmv8w5qfW8K3Xh1q7FsF9n42h 8kgOC8vP5lXszGwHKszOnjiOaJN1KVawBcnZPgQj29PIvoKhkFqbFc47O8ut1gWSfXzC 9lJZR5svG4LWkGCGqAfdVoJNSmmGln1nhxJFGYbx/2cm8eG1707QtH0Dyl8Rcb1OFPCo vxCg== X-Gm-Message-State: AOJu0Ywyp/S+jf8g+ByNqkxMnJFPMubsr/k0uQ8Au5G0jiodw/zO2wj7 xChf3iMrCKq70Em8Ief/qDD1NZ+Kls8B2FpMZVLdXrf5r05Qe01T0kFMee/HvqWQpSc2llC0UBV oV9iw X-Gm-Gg: Acq92OEfdFPT7evIDkmfgcsSBxa/EV5HgK5XTNZF8IX9Xd71G17WsfWXBUtT4iZpclQ zxDzNFIiq2Z9P+YfJxpD/jHMuivrAkRU1LzRSCDhoT4r/GKh9Vg8jWPFo8XacR9ly06DT9jVQ4e fbUd6Kz8jXh8XBLPP8mj/AbcHrr+M9mzJZv2iziME14MrxCKI6WzyfROb+9fOIwikC2jUZ5PHLG VkS/bV+4PArQ60OK3voK9swcD0FscyG2jjsSg+atKokdmELYG+l4vCaOrWbRUkiMjaoHt4a2Ujg PoA87ZZ4DIelQTT38o46X0S5PZjrI9MQAkXfBPy+shcN4iXYU+wf1+yc19BRnNX6REJlqiKe0ua 7esFmB+O7YIF1URxaI3CxiAGSHry+S/2xXbpqwfeKTdk4AUBGyuLGbZiH018rX/IpSw9T42gceb f0y6Ow0TABPNc8i1Fn8p5k0Zq5AxDKNvjtaaextj5OrWOr4J92u6AIuOqc5zN2jz7Axis8bRgG/ XgoEMRGzfu81rT6JA8jExkB2yevOqnhFMP0cpriGyUKmsuAew== X-Received: by 2002:adf:ea51:0:b0:460:3210:4349 with SMTP id ffacd0b85a97d-46067800fcfmr3601092f8f.42.1781183508619; Thu, 11 Jun 2026 06:11:48 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa0084744357c26c6744.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:8474:4357:c26c:6744]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f3529e0sm82048251f8f.28.2026.06.11.06.11.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 06:11:48 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH v2 4/8] fetch2/crate: skip yanked versions when reading cargo index Date: Thu, 11 Jun 2026 15:11:26 +0200 Message-ID: X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Thu, 11 Jun 2026 13:11:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19664 From: Thomas Perrot The cargo sparse index marks yanked crate versions with "yanked": true. Treat those the same way as non-existing versions so that version checking never promotes a yanked release as the latest one. Signed-off-by: Thomas Perrot Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit 0d757e8dfff7c5d338a01437960d60312e9af490) Signed-off-by: Yoann Congal --- lib/bb/fetch2/crate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bb/fetch2/crate.py b/lib/bb/fetch2/crate.py index b89817ab9..d84bae0bc 100644 --- a/lib/bb/fetch2/crate.py +++ b/lib/bb/fetch2/crate.py @@ -178,7 +178,8 @@ class Crate(Wget): response = self._fetch_index(ud.versionsurl, ud, d) for line in response.splitlines(): data = json.loads(line) - versions.append((0, data["vers"], "")) + if not data.get("yanked", False): + versions.append((0, data["vers"], "")) versions = sorted(versions, key=cmp_to_key(bb.utils.vercmp)) return (versions[-1][1], "") From patchwork Thu Jun 11 13:11:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89775 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 DE1AFCD98DD for ; Thu, 11 Jun 2026 13:11:56 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.45176.1781183511105193995 for ; Thu, 11 Jun 2026 06:11:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=CnZ9/PY/; spf=pass (domain: smile.fr, ip: 209.85.221.42, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-4600ddc4017so5452199f8f.0 for ; Thu, 11 Jun 2026 06:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781183509; x=1781788309; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=dyhsjDUN8PXNd/hMzNzd8ynGnD4A6+mHqMiAuPQBC4c=; b=CnZ9/PY/Q6gK1Wg2AKWENpfkJtpwSjg6DhZd7/fpeFeTFGeNKaN2I9vRHCcKrylkOP YhSJYcAZQmXCckZFT7XkPYprUZzti7891RjLTXECCf4ryUQKvcxtDgv6cAN6tDmBOKp0 SselAsBn5ndpgdEcW4NgaP1lyvsECJU6lJ9ZA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781183509; x=1781788309; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=dyhsjDUN8PXNd/hMzNzd8ynGnD4A6+mHqMiAuPQBC4c=; b=XoGaEelnaaa651BbDOkhBb2H+4ItHk4maK4s+RvyTWlCEJ7Xia31xt+85IoJTzavYN KKn6ZdDuxKMyaMZoT2DOhbHiwmz9psde6t5yJuoFooN1EASVRbbgM3Js6YfKqR8i9C1c zJVCefcDzBi7df/QbgMNGTO73NvMjOQrFc0crBPj7nXVdQq8m4feRkTyBumWhjUWK43e UdJqBV08RPzP7CpORfHvZtshvWWZgoQzHbWSMH4GRSO7NgX4uSEwj67z0p8opmZBBRvW ldakHqgTUY6LsWVeD8HNtBZmnvZoK2tufRZrEqVX8YMG44B7EPMG5+iFwkyZAFlSUbrx qUDQ== X-Gm-Message-State: AOJu0YxLBUP0aP/J/Rv2KGgUNp1K3GPw86kPA/c3syc67XUUr852AqNq rI0sHGkItI6ZfwMmn+iAXB+k2eE5UWrpgsrIZMXHS/aT9As4onk/nTrS8oko2FEyXiAL6xsWOYy Q2/eq X-Gm-Gg: Acq92OGM4K+E505UbJQmcXjr/+e+M/ghFvG7AqULGkp4C3/988DJFCCqmIUNQ38CBlx WEam6ydLzMURKnnOLK7NkznSRSiyr9UwcezrzXTfbnEuryzcabniEQUGJ7SCnXe/Q2q3oFIzRpF v51+ZujZ6kunClx2K0lXHMc7zrfg4CByu2TdBQ486EkEwQp8gpultdejr1YhPuFzT4Sxugux3ki 89K34jdlOZSIVSQVuk/9MqlvOJKbfChREY0ahtLDIAQsfrbWuKAHq26DwRB96qhDGCTY3a63dLe q4hV0v5soSKSg421feN5W6JXWQUQDSl7XzmmP5Ch9Eu+Rsp/SgPbILujNsTYb90942rFkskpMe3 ST/K9LuXl7fJTmoYEuHPl0TYjiP/0r3/ViR0F8KQKHvhVRcQW74Sn1iafePNbVqckkfzGlMMd7a F4OM0YjWJTwfi5gZJ3y7NCucQPxsO7/ywGRgR5x6YaNkcOhzm+kyqrVWJgpsurZM9OxHV6c+lxh Q4WbaWymuHEEvIMlwly01uQ82pWU4ck2ceKim+g4rVZTYmXuw== X-Received: by 2002:a05:6000:298f:20b0:45e:ce49:43d8 with SMTP id ffacd0b85a97d-4606758cf51mr3376029f8f.4.1781183509291; Thu, 11 Jun 2026 06:11:49 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa0084744357c26c6744.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:8474:4357:c26c:6744]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f3529e0sm82048251f8f.28.2026.06.11.06.11.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 06:11:48 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH v2 5/8] fetch2/crate: guard against empty version list Date: Thu, 11 Jun 2026 15:11:27 +0200 Message-ID: <317cdbef364202ea0a857516d65710c95c96bb1a.1781183212.git.yoann.congal@smile.fr> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Thu, 11 Jun 2026 13:11:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19665 From: Thomas Perrot Both latest_versionstring() and latest_versionstring_from_index() would raise IndexError on versions[-1] if the fetched index returns no usable versions. Return ("", "") in that case, consistent with what callers expect when no upstream version can be determined. Signed-off-by: Thomas Perrot Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit ffdc2a02693379d7ead0f7b940111340843d49a4) Signed-off-by: Yoann Congal --- lib/bb/fetch2/crate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bb/fetch2/crate.py b/lib/bb/fetch2/crate.py index d84bae0bc..eb1fd5719 100644 --- a/lib/bb/fetch2/crate.py +++ b/lib/bb/fetch2/crate.py @@ -164,7 +164,7 @@ class Crate(Wget): versions = [(0, i["num"], "") for i in json_data["versions"]] versions = sorted(versions, key=cmp_to_key(bb.utils.vercmp)) - return (versions[-1][1], "") + return (versions[-1][1], "") if versions else ("", "") def latest_versionstring_from_index(self, ud, d): """ @@ -182,4 +182,4 @@ class Crate(Wget): versions.append((0, data["vers"], "")) versions = sorted(versions, key=cmp_to_key(bb.utils.vercmp)) - return (versions[-1][1], "") + return (versions[-1][1], "") if versions else ("", "") From patchwork Thu Jun 11 13:11:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89768 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 838D7CD98CC for ; Thu, 11 Jun 2026 13:11:55 +0000 (UTC) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.45177.1781183511864379377 for ; Thu, 11 Jun 2026 06:11:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=CGS/erJr; spf=pass (domain: smile.fr, ip: 209.85.221.52, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-46019b190b6so6030384f8f.3 for ; Thu, 11 Jun 2026 06:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781183510; x=1781788310; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=H7Z+52ZsMLn6kreMATMSA74FA0v92/MujOswIIy+QuE=; b=CGS/erJrZ+ar4RGwvQngTBOXnkVzFBgAmiPU5+TYfKIFTcW9gMAOpVPZnUfbDHaeW4 sJdePpr5m6vKwKrb7uf4F6mMHQL3N1vA/BIuqDQtn+T6FuLa6Zw08VbVHmrN08blDZMz uVvs0kQtAw/GRcngqFmrR2kxPByoTxG64bMZQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781183510; x=1781788310; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=H7Z+52ZsMLn6kreMATMSA74FA0v92/MujOswIIy+QuE=; b=ISQmpMADkSRFEBVKdQGBkXF3wcz2X33kymJ637E6WvKtcWhNUyDV9PDrnqlRq0j+Ug QPbPbRzNGHQW3vCYWItS1a6pMxhqr/E3ovQ5IECX2WWFac+QmvX7RAXmKZPuyb+yQ1f1 Yc4m2Dj7T64gqoc95hP9WZbFk3krLHEVbQcZietF95fpGdJZKpike8jcx28kTFxuJiUm 0lYxkp8X9DbxL8ox3KTkYh34ziX5z1hbyAYhNxLHb3i8j3kOVBqMb7fqRUv4X3RZVc+7 W/8Jz+6NzEbDlvyhAI6D+8oiy1GOEOMQhwaEXSF9NriLipx1avpSaiRShNXCLE3nlZu1 zPQA== X-Gm-Message-State: AOJu0YzTsrvnNP/BxV7zZ/XVWRPFxiL7Jdtn52xRikXPnd1tlMaKJTdy XP2BzJQ8mLweIJpaJ83wGiJ3kfgaywmUKmDJA3rbLSWQcXxqHlRN1z9+EiCrmmLnDRr+fnzpqOr qRg26 X-Gm-Gg: Acq92OF0Tb4UPOhOt2PDCZrNafULZyh8duFiMQBQhUqH5z4IaMHkOTaXCsBx/K6W277 xSPxKU/MacFKYhx0Y2YMMWIhkR1XSRONClAiE3uTmXxBD5yaauE54UBSW4AD+Xv+l80sD1lRlE5 60WXusktmEs4gw/wx91SlDyhhnMpT9w8GAnf5BufgjDKaVkiE9XE5zWUXoQbo8EwO4QIGsKn7+K 39ph7KS0OMdkG62yx2NlRCo7jq64rBaMGNw7JtH06EB4yWQbomy2pPLcE2nXUpTFBtxNycgdq9y KipnwjC23f6QWGRRc9nebjBDQB/s9WuAdvbUBKQbt5SLaCLuEdNx4h3aFfMH8Wrb7xE6W2Mrw12 wOZ3cQ1nyXS3CbB+2dicOVSQ516Bfwnid3zN3mjcDryEca1osbvPl1+asm1Ur/2D/3EEG9HOupJ UsN8nGy+5m6PR3fQbvUTTWJ4tKqCx+dlMyG3rKEpYvdqGdYahpKl8CuO+QN3zNGylhoTRqsWyXB VRVO9HsbTl6CzMwQ0pIZzBLWHML9yVBkkEBPiQ= X-Received: by 2002:a05:6000:4013:b0:43f:dfb6:78e1 with SMTP id ffacd0b85a97d-4606758cf70mr4039324f8f.8.1781183510238; Thu, 11 Jun 2026 06:11:50 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa0084744357c26c6744.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:8474:4357:c26c:6744]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f3529e0sm82048251f8f.28.2026.06.11.06.11.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 06:11:49 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH v2 6/8] fetch2: allow empty value for params while formatting URI string. Date: Thu, 11 Jun 2026 15:11:28 +0200 Message-ID: <52b3bff42f17933595af48654098b172ea10baff.1781183212.git.yoann.congal@smile.fr> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Thu, 11 Jun 2026 13:11:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19666 From: hongxu While using PREMIRRORS to gets source code, recipe sbom-cve-check-update-nvd-native do fetch failed: $ bitbake sbom-cve-check-update-nvd-native -cfetch -f ... ERROR: sbom-cve-check-update-nvd-native-1.0-r0 do_fetch: Bitbake Fetcher Error: MalformedUrl('git:///path-to-premirror/git/github.com.fkie-cad.nvd-json-data-feeds.git;branch=main;protocol=file;destsuffix') ERROR: Logfile of failure stored in: tmp/work/x86_64-linux/sbom-cve-check-update-nvd-native/1.0/temp/log.do_fetch.4135595 ERROR: Task (oe-core/meta/recipes-devtools/sbom-cve-check/sbom-cve-check-update-nvd-native.bb:do_fetch) failed with exit code '1' ... In oe-core commit [1], destsuffix was configured to empty string through SRC_URI, but in bitbake commit [2], it removed `=' from destsuffix in which value is empty, and trigger MalformedUrl failure, see sbom-cve-check-update-nvd-native do_fetch log: ...log.do_fetch... DEBUG: For url git://github.com/fkie-cad/nvd-json-data-feeds.git;branch=main;protocol=https;destsuffix= returning git:///path-to-premirror/git/github.com.fkie-cad.nvd-json-data-feeds.git;branch=main;protocol=file;destsuffix ...log.do_fetch... This commit use function _query_str_join for query as usual (if a value is None then it isn't a key-value pair, but a bare key.), and use function _param_str_join for params to allow value is empty string and still key-value pair, after applying this commit ...log.do_fetch... DEBUG: For url git://github.com/fkie-cad/nvd-json-data-feeds.git;branch=main;protocol=https;destsuffix= returning git:///path-to-premirror/git/github.com.fkie-cad.nvd-json-data-feeds.git;branch=main;protocol=file;destsuffix= ...log.do_fetch... $ bitbake-selftest -v bb.tests.fetch.URITest.test_uri test_uri (bb.tests.fetch.URITest) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.001s OK [1] https://github.com/openembedded/openembedded-core/commit/131e024a6688074347e08879718221fbfb69033f [2] https://github.com/openembedded/bitbake/commit/eac583bd4c46f3bb9661852cb6a1448f16147ff1 Signed-off-by: Hongxu Jia Signed-off-by: Richard Purdie (cherry picked from commit b3867e6d35ef57239c7ba961a00fa45577600301) Signed-off-by: Yoann Congal --- lib/bb/fetch2/__init__.py | 7 +++++-- lib/bb/tests/fetch.py | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index d913d7511..e0494b3cb 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -304,7 +304,7 @@ class URI(object): def _query_str(self): return ( - ''.join(['?', self._param_str_join(self.query, "&")]) + ''.join(['?', self._query_str_join(self.query, "&")]) if self.query else '') def _param_str_split(self, string, elmdelim, kvdelim="="): @@ -313,9 +313,12 @@ class URI(object): ret[k] = v return ret - def _param_str_join(self, dict_, elmdelim, kvdelim="="): + def _query_str_join(self, dict_, elmdelim, kvdelim="="): return elmdelim.join([kvdelim.join([k, v]) if v else k for k, v in dict_.items()]) + def _param_str_join(self, dict_, elmdelim, kvdelim="="): + return elmdelim.join([kvdelim.join([k, v]) for k, v in dict_.items()]) + @property def hostport(self): if not self.port: diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py index cc133c1f5..e661ff0d8 100644 --- a/lib/bb/tests/fetch.py +++ b/lib/bb/tests/fetch.py @@ -292,8 +292,8 @@ class URITest(unittest.TestCase): 'query': {}, 'relative': True }, - "https://www.innodisk.com/Download_file?9BE0BF6657;downloadfilename=EGPL-T101.zip": { - 'uri': 'https://www.innodisk.com/Download_file?9BE0BF6657;downloadfilename=EGPL-T101.zip', + "https://www.innodisk.com/Download_file?9BE0BF6657;downloadfilename=EGPL-T101.zip;someparam=": { + 'uri': 'https://www.innodisk.com/Download_file?9BE0BF6657;downloadfilename=EGPL-T101.zip;someparam=', 'scheme': 'https', 'hostname': 'www.innodisk.com', 'port': None, @@ -303,7 +303,7 @@ class URITest(unittest.TestCase): 'userinfo': '', 'username': '', 'password': '', - 'params': {"downloadfilename" : "EGPL-T101.zip"}, + 'params': {"downloadfilename" : "EGPL-T101.zip", "someparam" : ""}, 'query': {"9BE0BF6657": None}, 'relative': False }, From patchwork Thu Jun 11 13:11:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89770 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 CD965CD98D6 for ; Thu, 11 Jun 2026 13:11:55 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.45071.1781183512687311102 for ; Thu, 11 Jun 2026 06:11:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=cOxsNpr5; spf=pass (domain: smile.fr, ip: 209.85.221.44, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-45efa80e0afso6233880f8f.2 for ; Thu, 11 Jun 2026 06:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781183511; x=1781788311; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=RM45OF3EEzpBSFPiU887KE3K2Msolbx2eokvHGPF+a8=; b=cOxsNpr5r1ojFZ2a2mLQeAOFq+8gJd7cDpES9P1dUhu7l5EpOPkjZ2AQgRYGqEbcK2 zQqrMC3j2r46i0grmjJUn/d6C0o5o0JGOCtj/ISHVtotyKyb/64p5ygwGy6uCBu6dSsE mlzLmkpSsyjKImpiYO3oIUpzo+Y7FPYDH3aGI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781183511; x=1781788311; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=RM45OF3EEzpBSFPiU887KE3K2Msolbx2eokvHGPF+a8=; b=lOmrcojvTBeNNExUE4g10hEW7LQg9y4aVZFFBW0PQG9QO1/EoFc9XAe81+9TXftPUt wyXFheE1GjPbiWrw1tIEh3nYDhNty/0Xf/lmm782SCXbIBYLYvH5Q3OHH6qhD+j8Xn9K vllYnRugQEruop+EhjW8AYIBhWeS5cjuumPV3A6PVEvMkQUfhpX0/s2EEL6N+jtXGCrB RAPwn369w2XwaUpZuBvtOcfOlfxuincZ750nFQhU0MDhKzoreB1moIlJMAL8EMXSb/lc tvFHP1vq28E7UNmHJzIfX6MG3eyrxKELNpcCRpMP6+VRIULL8sdSGNe8NyFkACeV7vw4 15QQ== X-Gm-Message-State: AOJu0Ywwo4GUb49KVSO1u68j6yhAukk7gxM32AuDUn/EfUmidM0klb9R qeNMAHEBcSpdR8yuoGaXNzMgRxTedkPpcTf0rhiHJEuY0dZ9+gjPAcBQP6/V5PNI8yKCUv59n+y PvRsC X-Gm-Gg: Acq92OEvVfpoFQcXEa3gTKg64R4/u6PsnSp7CnH8RErhpE05aTRIi4T1oA8K4FIhetr Fpk5kAV+9ItNB01bP5PE8uwOTG7fwU7ITiaSjvT9kkpukcTXGqhb6J4NIG7M1W9vDl2Hdq0TIh/ wuLeDISCCp15A8dc4PHwIkdKWo4PLObhJ1FGCEdTk1aCrXXgf6uBk2bYK8/beNqdSanz3DAic3c NzEsxjA9HFf40r4pnZh3OBT2IJCg9S0DXUWDguiSj7g1BjFkx0hyoz3RGADCPGEYEzCH9iRlL0i q2LXaeHC1obE91pI+gSNS521y0covZtw+vnl+kV7vB+RcxiiyKG64fFpT4TDIRtZAMTemV0q1lg ZwXOXOf4+FYDgxND/05Z1mTvxvJke4/vEzMd9ksPHJSe5UokSJqgM0Y6lzpOtog2ogEX6yizTLO 0Jez8hSxr+dwJBofuGVV2OyXc7SJy1EQ+0pEvMj9ur54GonslUM5nKX+oQtS8EwL+M0GCF5cC72 vXfKSbvSqrItywhpJIVygtZzB51bmU+J6WgmR0= X-Received: by 2002:a5d:53d2:0:b0:45d:7bf0:c7d3 with SMTP id ffacd0b85a97d-4606757a4b4mr3187662f8f.19.1781183510970; Thu, 11 Jun 2026 06:11:50 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa0084744357c26c6744.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:8474:4357:c26c:6744]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f3529e0sm82048251f8f.28.2026.06.11.06.11.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 06:11:50 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH v2 7/8] fetch2/wget: limit auth on checkstatus redirects Date: Thu, 11 Jun 2026 15:11:29 +0200 Message-ID: <73625fd3cb82bd3f9241f77d4b1e9b77fc828860.1781183212.git.yoann.congal@smile.fr> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Thu, 11 Jun 2026 13:11:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19667 From: Anders Heimer FixedHTTPRedirectHandler copies request headers when checkstatus() follows a redirect, including Authorization from SRC_URI or .netrc. Keep same-origin redirects unchanged, but drop Authorization and Cookie for different-origin targets (scheme, host and effective port), following RFC 9110 redirect guidance for resource-specific headers. This only affects the Python checkstatus() path; normal wget downloads are unchanged. Signed-off-by: Anders Heimer Signed-off-by: Richard Purdie (cherry picked from commit 1019d5a5c42c672ea673ae9d22363d626b57ccb9) Signed-off-by: Yoann Congal --- lib/bb/fetch2/wget.py | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py index 6ac4306c0..fc83b301a 100644 --- a/lib/bb/fetch2/wget.py +++ b/lib/bb/fetch2/wget.py @@ -288,6 +288,18 @@ class Wget(FetchMethod): http_error_403 = http_error_405 + def _url_origin(url): + parsed = urllib.parse.urlsplit(url) + scheme = parsed.scheme.lower() + host = parsed.hostname.lower() if parsed.hostname else "" + port = parsed.port + if port is None: + port = {"http": 80, "https": 443}.get(scheme) + return (scheme, host, port) + + def _same_origin(url_a, url_b): + return _url_origin(url_a) == _url_origin(url_b) + class FixedHTTPRedirectHandler(urllib.request.HTTPRedirectHandler): """ urllib2.HTTPRedirectHandler before 3.13 has two flaws: @@ -301,6 +313,9 @@ class Wget(FetchMethod): Until we depend on Python 3.13 onwards, copy the redirect_request method to fix these issues. + + Additionally, strip sensitive headers (Authorization, Cookie) when + redirecting to a different origin to avoid credential leaks. """ def redirect_request(self, req, fp, code, msg, headers, newurl): m = req.get_method() @@ -320,8 +335,16 @@ class Wget(FetchMethod): newurl = newurl.replace(' ', '%20') CONTENT_HEADERS = ("content-length", "content-type") - newheaders = {k: v for k, v in req.headers.items() - if k.lower() not in CONTENT_HEADERS} + SENSITIVE_REDIRECT_HEADERS = ("authorization", "cookie") + same_origin = _same_origin(req.get_full_url(), newurl) + newheaders = {} + for k, v in req.headers.items(): + header = k.lower() + if header in CONTENT_HEADERS: + continue + if not same_origin and header in SENSITIVE_REDIRECT_HEADERS: + continue + newheaders[k] = v return urllib.request.Request(newurl, method="HEAD" if m == "HEAD" else "GET", headers=newheaders, From patchwork Thu Jun 11 13:11:30 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89767 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 5E6CECD98CE for ; Thu, 11 Jun 2026 13:11:55 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.45178.1781183513293881046 for ; Thu, 11 Jun 2026 06:11:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=cHh11Mc5; spf=pass (domain: smile.fr, ip: 209.85.221.44, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-46013161068so4014322f8f.2 for ; Thu, 11 Jun 2026 06:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781183512; x=1781788312; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/0l5raLZI/cTBQPEQqb5ISjnvVLvXFrYmIo76D6Huhg=; b=cHh11Mc5dSr6qcflV66CIai1aqybokwVGx03p9pQz69kbptI4ob1yT1O/Yv37glyyR yC5gDgIZc5b3jXJN9Zi9fCPbjmXC+6QC+7Ewc56gp74vcI/4WvVJ/2rG7iAz1UGptG1/ Dczp+MbZZMTT4+3Pm7VKkK/sVDika5ZIuW0NM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781183512; x=1781788312; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=/0l5raLZI/cTBQPEQqb5ISjnvVLvXFrYmIo76D6Huhg=; b=Wh/gn050/WxuX28+wMtumlbSbDeMG0yUbgmtDfNJg8pBQOUWSPqx0W3cqwOP3nbjhA JdHe+NCaVcISnzjvX/laqXf8BZyBaSHEqoIm7qjaqhC76gG81Me0SbadyzZhGQ/fFDcy iNfyvcIYOL/j6HXzzWq/3vFjtBbWuisT7hFnyS/m/0XLME2qkg5ECPo/PjJo1m/uLOZU 1s5hW5JDXpzQmArD1m4zzqzd/i4HPVXhCmldLgl0G6irkEZykCxxAqp7+yNqD8BPZgmJ uKxlFTjRIo1OahlWPxB6BB0KP0fHborbiyyn9bUd2E8lmFLQyQ29qvo0LnqVFjkDprYW 88+A== X-Gm-Message-State: AOJu0YzwAtCpmUx8fCYHvw6yS69/rQGPHj/b1VA/GDEI5+1qaZXQzLqn 19I/n5WZm2gb6ReJ2OqO/c1eK76nD064EyxuPICNw9fgleRRueJfgtB0COw6PCmxWeU+azG4OM9 jY0jy X-Gm-Gg: Acq92OFPeK6AafuHvZjdwZFIsv8eEInfNJkuHbLjy86uBc8SxlSe7BdTPKNxIzlpQtF X1x74uI/ZPMycA0U3+hVvuDKOQse7Om1WxUL9/aDkVAiXSUTysvnhslt7r6qSbXfxjmsDJBnDnC X/Pmn1X/tDae8VnTOGYOb6psgw9k29V9sWOkw+Vr+ZopA/t5hA5MhozzyDt9+5Myk+kbMUloiwV gTJrDe6yUXbQUv7yQsi6XQNxIVq7fGrgpYltgFQ6+GB5zXDzfpoxQpy8n/RQRwtOnFbYLPVMSEa Ex72cEZBsmUG2c01pvgd/MaFjaoZEqcn1K3+LVsC6XhC6wwC9TR08xmmxYV8qqsPRctGRGuQVu/ Nn/c8Pa9aQCCgpyn+jbRlbjRdaYB5bLv7I84BdFNOIuC53ZXTdbKm2n4I7COAjQEAwcKhoGEYnF oiEXyWKVVPaHVX5LV+5Zh+pBeVrJLaI6+FD/mG8P743ZI72MVydtJexUNCM4bcivW3EwicgOy7Z cgd1/r+Kq4erlOA5fUflz6sP6ST2W5JCpMs2xw= X-Received: by 2002:a05:6000:1104:b0:460:ff2:63e5 with SMTP id ffacd0b85a97d-460675a61d1mr3647578f8f.18.1781183511623; Thu, 11 Jun 2026 06:11:51 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa0084744357c26c6744.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:8474:4357:c26c:6744]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f3529e0sm82048251f8f.28.2026.06.11.06.11.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 06:11:51 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH v2 8/8] tests/fetch: cover checkstatus redirect auth handling Date: Thu, 11 Jun 2026 15:11:30 +0200 Message-ID: X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Thu, 11 Jun 2026 13:11:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19668 From: Anders Heimer Add local HTTP server tests for Wget.checkstatus() redirects. They check that Authorization is kept for same-origin redirects and dropped when the target has a different origin. Signed-off-by: Anders Heimer Signed-off-by: Richard Purdie (cherry picked from commit c687d42b81b17e7a2399099cab0f1a6aafcf6520) Signed-off-by: Yoann Congal --- lib/bb/tests/fetch.py | 62 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py index e661ff0d8..c071401e6 100644 --- a/lib/bb/tests/fetch.py +++ b/lib/bb/tests/fetch.py @@ -7,6 +7,7 @@ # import contextlib +import http.server import shutil import unittest import unittest.mock @@ -18,6 +19,7 @@ import os import signal import subprocess import tarfile +import threading from bb.fetch2 import URI import bb import bb.utils @@ -1643,6 +1645,41 @@ class FetchCheckStatusTest(FetcherTest): "ftp://sourceware.org/pub/libffi/libffi-1.20.tar.gz", ] + def _start_checkstatus_server(self): + class CheckStatusHTTPRequestHandler(http.server.BaseHTTPRequestHandler): + def do_HEAD(self): + self.server.requests.append((self.path, dict(self.headers))) + if self.path == "/a" and self.server.redirect_url: + self.send_response(302) + self.send_header("Location", self.server.redirect_url) + self.end_headers() + return + self.send_response(200) + self.end_headers() + + def log_message(self, format_str, *args): + pass + + server = http.server.HTTPServer(("127.0.0.1", 0), CheckStatusHTTPRequestHandler) + server.redirect_url = None + server.requests = [] + thread = threading.Thread(target=server.serve_forever, kwargs={"poll_interval": 0.05}) + thread.daemon = True + thread.start() + + def stop_server(): + server.shutdown() + thread.join() + server.server_close() + + self.addCleanup(stop_server) + return server + + def _checkstatus(self, url): + fetch = bb.fetch2.Fetch([url], self.d) + ud = fetch.ud[url] + return ud.method.checkstatus(fetch, ud, self.d) + @skipIfNoNetwork() def test_wget_checkstatus(self): fetch = bb.fetch2.Fetch(self.test_wget_uris, self.d) @@ -1670,6 +1707,31 @@ class FetchCheckStatusTest(FetcherTest): connection_cache.close_connections() + def test_wget_checkstatus_same_origin_redirect_keeps_auth(self): + server = self._start_checkstatus_server() + server.redirect_url = "http://127.0.0.1:%s/b" % server.server_port + + url = "http://127.0.0.1:%s/a;user=user;pswd=pass" % server.server_port + self.assertTrue(self._checkstatus(url)) + + self.assertEqual(len(server.requests), 2) + redirected_headers = {k.lower(): v for k, v in server.requests[1][1].items()} + self.assertIn("authorization", redirected_headers) + + def test_wget_checkstatus_different_origin_redirect_drops_auth(self): + origin = self._start_checkstatus_server() + target = self._start_checkstatus_server() + # Same host but different port is a different origin. + origin.redirect_url = "http://127.0.0.1:%s/b" % target.server_port + + url = "http://127.0.0.1:%s/a;user=user;pswd=pass" % origin.server_port + self.assertTrue(self._checkstatus(url)) + + self.assertEqual(len(origin.requests), 1) + self.assertEqual(len(target.requests), 1) + redirected_headers = {k.lower(): v for k, v in target.requests[0][1].items()} + self.assertNotIn("authorization", redirected_headers) + class GitMakeShallowTest(FetcherTest): def setUp(self):