From patchwork Fri Mar 20 00:26:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 83916 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 5FE68109193E for ; Fri, 20 Mar 2026 00:26:17 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.2587.1773966376263907407 for ; Thu, 19 Mar 2026 17:26:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=tB3STAG2; spf=pass (domain: smile.fr, ip: 209.85.128.47, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-48374014a77so12728665e9.3 for ; Thu, 19 Mar 2026 17:26:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1773966374; x=1774571174; 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=StP/EC0pud6+GpElF36Z/0/2AJb8CoSqKp6msKAJ2LY=; b=tB3STAG2t8EqlGuxSQCgqsZD5nDjh9aVjRPF6oZyCSp3fkiNHwmcxG6W4YYDhJuBS7 4bLrhrqgyYzl6f8MS/K/v5vNDZtAiyqzZzFFY03+AHx/D80ARlZ0S3fDQKokdWZW0eEN dW1cQDqH7lZLB5qvQUzbw7Wm2goUYSuHFO/D0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773966374; x=1774571174; 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=StP/EC0pud6+GpElF36Z/0/2AJb8CoSqKp6msKAJ2LY=; b=Wd2BXdK4cEJv5GZ1T26slJzxInkhGX7LV9RCpIGtxEJqvpUGyvGxKcQG0vJzcghDwW TFXRoZLtvdtYf/xEWBLKW0n3assC81nK0IIiHT7M23JbcY3aLpmIFeF9ET+Pzx1APYTt cgNW+oa4MvCeLeY0WsaRdiR3ColrqfuYVCWKtoe82UnXdImfCWHEVBG8MAJ4EXYA9OgX b58+p5Kecj910Q67SCkxFoDLs4vArmyShtH/i2CkP+AoPWwvGVdB0jzFhhkDZBf0et1D SNaP1cYOYouo4BgPsY57mFV0PUBadqp58xSGQEBTzsyKB2fiJB7MKfkMRtxRss5+LSDh piQg== X-Gm-Message-State: AOJu0Yzollbhk2qjv4+brcQfXS8rOXsbbbUjpJX8lesteRAgtxwM3DKy 67TYTwJ9dA5Tsn/cgct+X8xMeng8KB5kQsP6iHA4fmwMbmckBiTbSagFfkiHRbA81NgxtQh7AKC xWkMS X-Gm-Gg: ATEYQzyC3BVzfTSB+kb49hIHqK5Tue0thsuoZL9xbAmhGU3gbFawMmp76oe3aNk+u7I utGjYKmH7mrz4C2es4U4vs5fh7n3Jw1pqoNeFSCJBt5e2dviDc4L0oSNEtX8MjXuOWS+aNGKxvN 9b2BQ95m1Z0POtsmmIJS3IrMZUkUO4QARYm3CODIS45O0yaAmseYEagcI8m/9OfDqxOw1AUdml4 4vItour/qjRKFUjuDQBnP+Sro6Cnwk9jHCCf/gNnFs4joWYMWxCdHNGok8dHdKaCKtSqf9E9gmv B5DKfhrWfNoLUBG7h4Hug6e0Icp2CXK2SQyI6ujPFPH6uF7EaVg1DNZXPdVP+6fg4XzwWgFfj1X Tak0txSHTCidMRoqUnWXYAilkpZfXOWaETIeBJVuPT6OqWYTPzkHSPSwDIp9EZEjZYFTnxer9Ry wd0a+jdV+pW6rrYkPO19vFIqn6U4roVsy9x2Kga4UI0ovDUZDznp4t4bJQbTxGLl6/xu73H1dc6 xRF3VrTT/UKnjevn9pVsJtowjk= X-Received: by 2002:a05:600c:8710:b0:485:35ba:1d81 with SMTP id 5b1f17b1804b1-486fee051camr15543545e9.21.1773966374210; Thu, 19 Mar 2026 17:26:14 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa00a2e4fb7b0d887544.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:a2e4:fb7b:d88:7544]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-486fb4309d1sm106036545e9.3.2026.03.19.17.26.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 17:26:13 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][scarthgap][2.8][PATCH 1/4] fetch2: don't try to preserve all attributes when unpacking files Date: Fri, 20 Mar 2026 01:26:08 +0100 Message-ID: <9580f15aae08ae6e3693ebb898b6fd5238f5a7f8.1773966318.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 ; Fri, 20 Mar 2026 00:26:17 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19180 From: Ross Burton When copying files as part of the unpack we currently use cp -p, which is a shortcut for --preserve=mode,ownership,timestamps. We do want to preserve timestamps, because some fetchers set these explicitly. We don't care about ownership. If the files are owned by us then they ill remain owned by us, and if they're not then the attempt to change ownership will be silently ignored. In a shared DL_DIR where files have group ownership this group access isn't relevant in the single-user build tree. We do want to preserve executable bits in the mode, but cp always does this. The difference between --preserve=mode and no --preserve is that the mode isn't preserved exactly (no sticky bits, no suid, umask is applied) but this also isn't a relevant difference in a build tree. Also expand the arguments to be clearer about what options are being passed. The impetus for this is that coreutils 9.4 includes a change in gnulib[1] and will now try to preserve permission-based xattrs if asked to preserve the mode. This can result in cp failing when copying a file from a NFSv4 server with ACLs stored in xattrs to a non-NFS directory where those xattrs cannot be written: cp: preserving permissions for ‘./jquery-3.7.1.js’: Operation not supported The error comes from the kernel refusing to write a system.nfs4_acl xattr to a file on ext4. This situation doesn't appear on all systems with coreutils 9.4, at the time of writing it fails on Ubuntu 24.04 onwards but not Fedora 40. This is because /etc/xattr.conf is used to determine which xattrs describe permissions, and Fedora 40 has removed the NFSv4 attributes[2]. Also, use long-form options to make the cp command clearer. [1] https://github.com/coreutils/gnulib/commit/eb6a8a4dfb [2] https://src.fedoraproject.org/rpms/attr/blob/rawhide/f/0003-attr-2.4.48-xattr-conf-nfs4-acls.patch [ YOCTO #15596 ] (cherry picked from commit 2f35dac0c821ab231459922ed98e1b2cc599ca9a) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Signed-off-by: Alexander Feilke Signed-off-by: Yoann Congal --- lib/bb/fetch2/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 7b75d5d83..224408de0 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -1606,7 +1606,7 @@ class FetchMethod(object): if urlpath.find("/") != -1: destdir = urlpath.rsplit("/", 1)[0] + '/' bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir)) - cmd = 'cp -fpPRH "%s" "%s"' % (file, destdir) + cmd = 'cp --force --preserve=timestamps --no-dereference --recursive -H "%s" "%s"' % (file, destdir) else: urldata.unpack_tracer.unpack("archive-extract", unpackdir) From patchwork Fri Mar 20 00:26:09 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 83915 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 48ECE109193C for ; Fri, 20 Mar 2026 00:26:17 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.2588.1773966376608808765 for ; Thu, 19 Mar 2026 17:26:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=m4wHKFGb; spf=pass (domain: smile.fr, ip: 209.85.128.46, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-48540d21f7dso944905e9.0 for ; Thu, 19 Mar 2026 17:26:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1773966375; x=1774571175; 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=p7ch6NEFQBLiey3BkCQwVphC2JH8/he69fIO2/9bYmo=; b=m4wHKFGbiEGRkHmaUfVb8UEZDSoFiIeG+oMQv6HGQo9Ei7aIubGKLR1FBScwDUmcOk zrjIrqVFvP0PO5rUlHfSwBvgRd8qlWXuYMox2jgiXXJY3N0Y7z03FcQa2QF+YoBcS+d1 fRKnSqbIYzZC325SjtJhosVKvU8kLiuPuQSfg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773966375; x=1774571175; 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=p7ch6NEFQBLiey3BkCQwVphC2JH8/he69fIO2/9bYmo=; b=RlFeHAq26ePAmAMVGlDl9545LwW+LPwrDELWSATgf9Xepw4wi4ghKEBWlUGtMMkt97 8o8ecSKJMVUddxpvLCY18NpZxShU8F/QRItRVTU4kJLM6eOsNW7hxPg9Tka+oxEdP27A ZgG9wsv1NFZdFLDxipBdTM9cxJhTyHAmHowoWyvOJkaoi4ZE7+5QhOZN14i1C9QzOefn S6YQmQJ+6rUVTK6dxA1DJpnQsEumVlyyCOpUWnypEKzYLh0HR6OSQnqQlT3C1WZw77Q4 TdVsI3ontATCacaw41YDgsPMRu5dc0M7FRkaQB/JZDF8ID06iJDqGDlA9kKTlDUF+KhY mqfA== X-Gm-Message-State: AOJu0YzFMKdoKUBF4mxbZdzwTV7Fix6DBQXH6dtivDos75WgKgPc8mRG lmqxO5HAcw44feliscTP/Dnff62AijNfQnm1vG6wxBgYr7WuETAIdNCXxQuxVGk6otOSKXfB3HJ xlfQk X-Gm-Gg: ATEYQzzqdfbVqqH+fw+56UctQuTUuz/vAs7E2hdFDnUt/BwohIL6i/2yH+7+m8ANJ71 myu1JboSUy82aw2TQcUju+F3Mwx2LL5ScacbTXzYjVeHlbwmVNLxeQXrPtWXf5ruAdUXBbOCeQ3 6zod2nxR3UH9cXqEeeLFvilYfd3fd9Kca9LhwcddbQx1FAp9EngH3DUT9xzJO4KDJLl+SOE35kh Ocdic0JGPi4HleIO8okFKD6AvkJXhV/oxrzpnx2mxPhsO8EIHNK/kKzaf+AozOx5b8+2xAiXFRj Ss3pNtAm+YV9LygUl2WdzMqzyvC7nUPE/HpwGanbTsqvC3ZGKY9h1ew0vYaR5QRwh9QBLR/ljpe dcfb/oDdFzUE0BiAaZcMVNUGdvSJcBfUv0BUpTgoFfg1Al2TdD9P+QlsMc0Qz415Iu36asg5f4q hfrvAbKtj+NqguC+8uUDcuRlGEue67hHJIiPQRYAgAdO+JaOob2BIa9ks4NOE1ttcmbqexKlVZd +JmjCIdmb4M7QQjgHDZMRHEFQU0c/8WrztX3w== X-Received: by 2002:a05:600c:5291:b0:485:34b3:8589 with SMTP id 5b1f17b1804b1-486ff04d42fmr13976135e9.31.1773966374678; Thu, 19 Mar 2026 17:26:14 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa00a2e4fb7b0d887544.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:a2e4:fb7b:d88:7544]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-486fb4309d1sm106036545e9.3.2026.03.19.17.26.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 17:26:14 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][scarthgap][2.8][PATCH 2/4] gitsm: Add clean function Date: Fri, 20 Mar 2026 01:26:09 +0100 Message-ID: <6cb07e8c702b750c5047dcd646ca72ca5f75321c.1773966318.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 ; Fri, 20 Mar 2026 00:26:17 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19181 From: Robert Yang Fixed: $ bitbake utfcpp -cfetch && bitbake utfcpp -ccleanall The downloads/git2/github.com.nemtrif.ftest won't be cleaned without this fix. Signed-off-by: Robert Yang Signed-off-by: Richard Purdie (cherry picked from commit 79f25fc5c1b8d0e08540f4aa07875309f5325f47) Suggested-by: Michael Siebold Signed-off-by: Yoann Congal --- lib/bb/fetch2/gitsm.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py index fab4b1164..ba62517f0 100644 --- a/lib/bb/fetch2/gitsm.py +++ b/lib/bb/fetch2/gitsm.py @@ -249,6 +249,19 @@ class GitSM(Git): # should also be skipped as these files were already smudged in the fetch stage if lfs # was enabled. runfetchcmd("GIT_LFS_SKIP_SMUDGE=1 %s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir) + def clean(self, ud, d): + def clean_submodule(ud, url, module, modpath, workdir, d): + url += ";bareclone=1;nobranch=1" + try: + newfetch = Fetch([url], d, cache=False) + newfetch.clean() + except Exception as e: + logger.warning('gitsm: submodule clean failed: %s %s' % (type(e).__name__, str(e))) + + self.call_process_submodules(ud, d, True, clean_submodule) + + # Clean top git dir + Git.clean(self, ud, d) def implicit_urldata(self, ud, d): import shutil, subprocess, tempfile From patchwork Fri Mar 20 00:26:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 83918 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 5B4DA109193D for ; Fri, 20 Mar 2026 00:26:27 +0000 (UTC) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.2589.1773966377650126162 for ; Thu, 19 Mar 2026 17:26:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=djjIKyDj; spf=pass (domain: smile.fr, ip: 209.85.128.49, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4853c1ca73aso12940815e9.2 for ; Thu, 19 Mar 2026 17:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1773966376; x=1774571176; 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=DeWfpN1BOXhgMYGJp29ljydYkpi1qQ860AGfSXe84Gk=; b=djjIKyDjvSy9IDbYTqIiJOlZ0fsc2lR+IBttlJVaxP/t/sNo6tevon+d+DDFlbvGLo n6c1m+iREOKde6rSPgDoqHiHjQkILkwBWuKGeT3U2060PwFtz8uuw9Jix/BfG+Lv+oRU mY68DnZ5NcgonwtfVGjze0jvCAei3+7wcykI8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773966376; x=1774571176; 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=DeWfpN1BOXhgMYGJp29ljydYkpi1qQ860AGfSXe84Gk=; b=V6dIce0YeEW3v6ESOLk5kMY43j2PYvwTx+QzdgEd9+6t0j5O7hVu46mUbwAh3y8QDq qFYc2IwZ/CWhSBeXABMPWMeewiehpl/YXm9Wsq76sUstz0mRXk5BopCRVA3nXLo8CBoY AnwbBFK5RDbX6WT9dfPg8i+/YK4KCbFz5mIuCCZmC3qSBdLIxHFgkWAs9zQJb6WHhAb0 uZhiu2XAdAhl2vkZtnkjjhHtI4MlePMak0ZvYL+i8SsLxab9RZhc/jbNg4NrKeihGkCv w6Z3j3NlCoyF+6sPZKyc8/xWIHpAgoJZAPXFBdnZ3Gs5mIyj++oB4c98UpnnO+VT7SGn z1iA== X-Gm-Message-State: AOJu0Yyb9vQeMa2QDTWDS0vLmKIhCTBc5BqtpivshWLiOen/kIbywv/O wwweZdYE+Xquwe8YKG87QtYAN6YjwlYD74lUzOchGtArSGW2hxZTLH3dBk0zQRrdKmz4HiBLCco jxyVk X-Gm-Gg: ATEYQzxKq0LOlBIQiQTdFW/iwJXBdnoVKpgLYhkQhxXMd+dsJ1QYwcMzBpLRoUDPzfa pT4t9nMwLEMpgz267EebznzonaDpRI11lrGRiCUpoB5WdgshS/2+pqhc1EY0kWX2WjkbHWMX62k q2PxJNRRi5bPE0mBecmpHYCgoA8uAIhRmEexmTS3Km3oDM0FxDVUyT7ISz5+suJzRIs3jOYXxX9 hVYW76mbnrCt2GKJtNZHP82Jg+xvNTSy0QuDBRxlf6XS3SwLnVnTp8lgcVbXMFa6jhaAa7oMV21 UsiWSG4hsHdGCGvcTGw8A/9x6DrO9UatYmyHl48O7sF3rB596a6aIXZ6JNsJYksoKgtuvlj6sNp Rmz/KBbZTaHDD/S5l20uUrWlj5vK6HOZy/BuARv1QcC6YGyBUNA0+IEkwEJizPAaQ0OjoyBm2Fo +au9EeJrvZftGCjD1C+0pXQL8N06m/1Z1bswcbUFGX+4d2bhJQa6ZI/huCs10ukNq+3q8BPoJNg 02XL3M2CX6TeC2VwV4NrTkH/6w= X-Received: by 2002:a05:600c:4e02:b0:486:de04:5906 with SMTP id 5b1f17b1804b1-486ff0271a7mr14050805e9.19.1773966375592; Thu, 19 Mar 2026 17:26:15 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa00a2e4fb7b0d887544.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:a2e4:fb7b:d88:7544]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-486fb4309d1sm106036545e9.3.2026.03.19.17.26.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 17:26:14 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][scarthgap][2.8][PATCH 3/4] fetch2: Fix incorrect lfs parametrization for submodules Date: Fri, 20 Mar 2026 01:26:10 +0100 Message-ID: <27d4df9ce9072a066d8e32802099dd61786bf5b7.1773966318.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 ; Fri, 20 Mar 2026 00:26:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19182 From: Philip Lorenz The existing code would pass `True` or `False` to the git fetcher. As the fetcher expects `lfs` to be set to `1` this always lead to LFS fetching being disabled. Signed-off-by: Philip Lorenz Signed-off-by: Richard Purdie (cherry picked from commit 5e487a5a096400271ed1e29b0df72903f2304e49) Suggested-by: Michael Siebold Signed-off-by: Yoann Congal --- lib/bb/fetch2/gitsm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py index ba62517f0..5c9899148 100644 --- a/lib/bb/fetch2/gitsm.py +++ b/lib/bb/fetch2/gitsm.py @@ -123,7 +123,7 @@ class GitSM(Git): url += ";name=%s" % module url += ";subpath=%s" % module url += ";nobranch=1" - url += ";lfs=%s" % self._need_lfs(ud) + url += ";lfs=%s" % ("1" if self._need_lfs(ud) else "0") # Note that adding "user=" here to give credentials to the # submodule is not supported. Since using SRC_URI to give git:// # URL a password is not supported, one have to use one of the From patchwork Fri Mar 20 00:26:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 83917 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 6B176109193F for ; Fri, 20 Mar 2026 00:26:27 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.2598.1773966378244828548 for ; Thu, 19 Mar 2026 17:26:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=z0UGL4ll; spf=pass (domain: smile.fr, ip: 209.85.128.47, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-48557c8ad47so11958715e9.0 for ; Thu, 19 Mar 2026 17:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1773966376; x=1774571176; 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=GlXaZf/b0fKLh+z3cgTAxV6nCWufGVkdYv8U00H6Vec=; b=z0UGL4ll4Diz/LXk4THoQRd6QElVBTZtdObWGN8AyeY2vi9RDAGinB8UlsBA7uLgam sAmKunzHFTvKmCgX8klDGhywDyvpKTG2I2pzL7C3qGneDeLazRzT8t5xWOHJz0PPpOKl xnLmsOG4gDpn5QKKGulBF6ciL6Zy0gNrr/4ok= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773966376; x=1774571176; 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=GlXaZf/b0fKLh+z3cgTAxV6nCWufGVkdYv8U00H6Vec=; b=KoKkZWIHo60FmTU8xCFlR2m+zPVyph9LMwR2Afksul067eJXQL0ue0FoWdproWKUWr LD00bI/ghuRo0m67L0PlmO3Ux7GYkeppXTNa/LjqZd3GaRk3nMGdiwQARd+YEDJ/9Ddq wf6u9bHEo26s46uBZkesoM+F86IMtn9zNC7yG7pZC6GVStzIgTsGDEA1mb58BiBawAxG JD8m3uQLtjVRSkyzhKtfB7FZ9yZxWg7XMe6EatTAVzsw2yoIjK9Ii/uWG4fYkvCGu7JE h0dpfYIeyycEOQPh7lurBAHDehOHfDub48iek0fC8TZjwskply3kycdKZR4XImo73CMV QF9g== X-Gm-Message-State: AOJu0YyZ83syZRP2Us1V88JvEU6FIMZikUUh6xamidN1wuTJJRHqWG4C yUW4lpOZuqqv9L0S1yrNnszuqBluOfZ/TTMWy3R56mxP5Ba7TdzXED2q6vgBbALWXW/geUJGL+r PN/2+ X-Gm-Gg: ATEYQzxCdJbm2ipH4ba4V1usN4umlTiuNY/l6KpHClQLEYuwZ6w/GjMNtLodTEuZHUq c6vt/q9JFiLubbNgO7/Dfu2As074a/Ut8bKCOJjV3PUungwHJdvo7+7ihmbbSM6bZuQAoXRqEVb L+hedpU+OxGxKKi+P4TPu914fNZ/vVvx3wzlv3Q9ZVdce/OWDaa6kg4NyGh/xKdTtY0Sf+iwqtL dg++zkLqveNGn6JnOGl148AbpfQkk2P6h1UwXLLJkVR3OjicdWsLd9Cd0BXO4IfmxQKLNZQztXM ObvYeu0mECnD49klLLxfsJMXkUs7P5+E3uynV1GwQBOU1qXu7qBs70EjCwi5JjtPs2yUQGvf1va 72AUZhUsjz6NPtyAV2BZsU+nyvl7YWf6z1XtD1RUvUyBp128P63cPArq8pcRJG2YuEK2ncjVYjH e3pu5yKLzJ8Px7ObJ3AHdM2xak336G2GadcVYpUn1ODD3mdfwr2nEkBZA2nEB9KWw8HEd/8h+Fp +dp9q0HN89XbQGCO8e4EpBFlVhrlcVH3D4nMQ== X-Received: by 2002:a05:600c:524e:b0:486:f634:ef3 with SMTP id 5b1f17b1804b1-486ff01efcdmr15873345e9.32.1773966376269; Thu, 19 Mar 2026 17:26:16 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa00a2e4fb7b0d887544.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:a2e4:fb7b:d88:7544]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-486fb4309d1sm106036545e9.3.2026.03.19.17.26.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2026 17:26:15 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][scarthgap][2.8][PATCH 4/4] fetch2: Fix LFS object checkout in submodules Date: Fri, 20 Mar 2026 01:26:11 +0100 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 ; Fri, 20 Mar 2026 00:26:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19183 From: Philip Lorenz Skipping smudging prevents the LFS objects from replacing their placeholder files when `git submodule update` actually checks out the target revision in the submodule. Smudging cannot happen earlier as the clone stored in `.git/modules` is bare. This should be fine as long as all LFS objects are available in the download cache (which they are after the other fixes are applied). Signed-off-by: Philip Lorenz Signed-off-by: Richard Purdie (cherry picked from commit d270e33a07c50bb9c08861cf9a6dc51e1fd2d874) Suggested-by: Michael Siebold Signed-off-by: Yoann Congal --- lib/bb/fetch2/gitsm.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py index 5c9899148..ef1905333 100644 --- a/lib/bb/fetch2/gitsm.py +++ b/lib/bb/fetch2/gitsm.py @@ -243,12 +243,11 @@ class GitSM(Git): ret = self.process_submodules(ud, ud.destdir, unpack_submodules, d) if not ud.bareclone and ret: - # All submodules should already be downloaded and configured in the tree. This simply - # sets up the configuration and checks out the files. The main project config should - # remain unmodified, and no download from the internet should occur. As such, lfs smudge - # should also be skipped as these files were already smudged in the fetch stage if lfs - # was enabled. - runfetchcmd("GIT_LFS_SKIP_SMUDGE=1 %s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir) + cmdprefix = "" + # Avoid LFS smudging (replacing the LFS pointers with the actual content) when LFS shouldn't be used but git-lfs is installed. + if not self._need_lfs(ud): + cmdprefix = "GIT_LFS_SKIP_SMUDGE=1 " + runfetchcmd("%s%s submodule update --recursive --no-fetch" % (cmdprefix, ud.basecmd), d, quiet=True, workdir=ud.destdir) def clean(self, ud, d): def clean_submodule(ud, url, module, modpath, workdir, d): url += ";bareclone=1;nobranch=1"