public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Yoann Congal" <yoann.congal@smile.fr>
To: "Yoann Congal" <yoann.congal@smile.fr>,
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][whinlatter 18/19] devtool: deploy: Run pseudo with correct PATH
Date: Fri, 13 Feb 2026 10:37:03 +0100	[thread overview]
Message-ID: <DGDQE65WGGDC.3KJ5RJHSBUK99@smile.fr> (raw)
In-Reply-To: <2e0afe1da33fbe353182ba63760d7d3e5420dbff.1770968514.git.yoann.congal@smile.fr>

On Fri Feb 13, 2026 at 9:08 AM CET, Yoann Congal wrote:
> From: Paul Barker <paul@pbarker.dev>
>
> When running FAKEROOTCMD (i.e. pseudo), we need to use the same PATH as
> we would use if we were running inside bitbake instead of the host
> environment's PATH. This ensures that we don't pick up any host
> executables that may have problems with pseudo (such as the uutils
> implementations of common system utilities used in Ubuntu 25.10).
>
> Signed-off-by: Paul Barker <paul@pbarker.dev>
> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> (cherry picked from commit 1551136333876ab8a63e96430a498dcfa580265c)
> Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
> ---
>  scripts/lib/devtool/__init__.py | 3 ++-
>  scripts/lib/devtool/deploy.py   | 6 +++---
>  2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
> index 969d6dc13ab..7c8de5540c1 100644
> --- a/scripts/lib/devtool/__init__.py
> +++ b/scripts/lib/devtool/__init__.py
> @@ -74,12 +74,13 @@ def exec_watch(cmd, **options):
>  
>      return buf, None
>  
> -def exec_fakeroot_no_d(fakerootcmd, fakerootenv, cmd, **kwargs):
> +def exec_fakeroot_no_d(fakerootcmd, fakerootenv, path, cmd, **kwargs):

As a heads-up, this changes the exec_fakeroot_no_d() API. But, I
discussed this with Paul:
* We think this is an internal API (behind the more public
  deploy_no_d())
* And, if this breaks existing code, the change to adapt is trivial.

Regards,

>      if not os.path.exists(fakerootcmd):
>          logger.error('pseudo executable %s could not be found - have you run a build yet? pseudo-native should install this and if you have run any build then that should have been built')
>          return 2
>      # Set up the appropriate environment
>      newenv = dict(os.environ)
> +    newenv['PATH'] = path
>      for varvalue in fakerootenv.split():
>          if '=' in varvalue:
>              splitval = varvalue.split('=', 1)
> diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
> index a98b33c5718..2bf693d165a 100644
> --- a/scripts/lib/devtool/deploy.py
> +++ b/scripts/lib/devtool/deploy.py
> @@ -186,8 +186,8 @@ def deploy_no_d(srcdir, workdir, path, strip_cmd, libdir, base_libdir, max_proce
>          srcdir = recipe_outdir
>          recipe_outdir = os.path.join(workdir, 'devtool-deploy-target-stripped')
>          if os.path.isdir(recipe_outdir):
> -            exec_fakeroot_no_d(fakerootcmd, fakerootenv, "rm -rf %s" % recipe_outdir, shell=True)
> -        exec_fakeroot_no_d(fakerootcmd, fakerootenv, "cp -af %s %s" % (os.path.join(srcdir, '.'), recipe_outdir), shell=True)
> +            exec_fakeroot_no_d(fakerootcmd, fakerootenv, path, "rm -rf %s" % recipe_outdir, shell=True)
> +        exec_fakeroot_no_d(fakerootcmd, fakerootenv, path, "cp -af %s %s" % (os.path.join(srcdir, '.'), recipe_outdir), shell=True)
>          os.environ['PATH'] = ':'.join([os.environ['PATH'], path or ''])
>          oe.package.strip_execs(args.recipename, recipe_outdir, strip_cmd, libdir, base_libdir, max_process)
>  
> @@ -266,7 +266,7 @@ def deploy_no_d(srcdir, workdir, path, strip_cmd, libdir, base_libdir, max_proce
>          shutil.rmtree(tmpdir)
>  
>      # Now run the script
> -    ret = exec_fakeroot_no_d(fakerootcmd, fakerootenv, 'tar cf - . | %s  %s %s %s \'sh %s %s %s %s\'' % (ssh_sshexec, ssh_port, extraoptions, args.target, tmpscript, args.recipename, destdir, tmpfilelist), cwd=recipe_outdir, shell=True)
> +    ret = exec_fakeroot_no_d(fakerootcmd, fakerootenv, path, 'tar cf - . | %s  %s %s %s \'sh %s %s %s %s\'' % (ssh_sshexec, ssh_port, extraoptions, args.target, tmpscript, args.recipename, destdir, tmpfilelist), cwd=recipe_outdir, shell=True)
>      if ret != 0:
>          raise DevtoolError('Deploy failed - rerun with -s to get a complete '
>                          'error message')


-- 
Yoann Congal
Smile ECS



  reply	other threads:[~2026-02-13  9:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-13  8:08 [OE-core][whinlatter 00/19] Patch review Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 01/19] linux-yocto/6.12: update to v6.12.69 Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 03/19] openssl: upgrade 3.5.4 -> 3.5.5 Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 04/19] mobile-broadband-provider-info: upgrade 20250613 -> 20251101 Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 05/19] ffmpeg: ignore 10 CVEs Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 06/19] wic/engine: fix copying directories into wic image with ext* partition Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 07/19] oeqa/selftest/wic: test recursive dir copy on ext partitions Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 08/19] libsndfile1: patch CVE-2025-56226 Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 09/19] webkitgtk: workaround compile failure for large debug symbols Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 10/19] webkitgtk: upgrade 2.50.0 -> 2.50.4 Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 11/19] avahi: Backport fix CVE-2025-68276 Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 12/19] avahi: patch CVE-2026-24401 Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 13/19] avahi: patch CVE-2025-68468 Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 14/19] avahi: patch CVE-2025-68471 Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 15/19] vim: ignore CVE-2025-66476 Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 16/19] scripts/install-buildtools: Update to 5.3.1 Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 17/19] go: upgrade 1.25.6 -> 1.25.7 Yoann Congal
2026-02-13  8:08 ` [OE-core][whinlatter 18/19] devtool: deploy: Run pseudo with correct PATH Yoann Congal
2026-02-13  9:37   ` Yoann Congal [this message]
2026-02-13  8:08 ` [OE-core][whinlatter 19/19] devtool: deploy: Reset PATH after strip_execs Yoann Congal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DGDQE65WGGDC.3KJ5RJHSBUK99@smile.fr \
    --to=yoann.congal@smile.fr \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox