public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Zhihang Wei <wzh@ilbers.de>
To: Felix Moessbauer <felix.moessbauer@siemens.com>,
	isar-users@googlegroups.com
Cc: cedric.hombourger@siemens.com, srinuvasan.a@siemens.com
Subject: Re: [PATCH 1/2] sbuild: place tmpdir below WORKDIR on rootless
Date: Mon, 14 Sep 2026 14:34:11 +0200	[thread overview]
Message-ID: <ad39c359-7c63-47d5-a5ae-6b554ae24de6@ilbers.de> (raw)
In-Reply-To: <20260907114136.3946468-1-felix.moessbauer@siemens.com>

Applied to next, thanks.

Zhihang

On 9/7/26 13:41, 'Felix Moessbauer' via isar-users wrote:
> When running sbuild in rootless mode, it needs some scratch space to
> extract the rootfs. If not configured otherwise, a tmpdir below /tmp is
> used. In case of isar builds this is not desired, as /tmp could be too
> small (e.g. on a tmpfs) and it also breaks the rule of only operating
> below bitbakes TMPDIR.
>
> We fix this by explicitly setting the TMPDIR env var to a dir below the
> recipes WORKDIR. By that, each sbuild chroot is extracted to a tmpdir
> below the recipe that needs it (it is automatically cleanded up by
> sbuild after the build).
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
>   meta/classes-recipe/dpkg.bbclass | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/meta/classes-recipe/dpkg.bbclass b/meta/classes-recipe/dpkg.bbclass
> index a42703d5..35408495 100644
> --- a/meta/classes-recipe/dpkg.bbclass
> +++ b/meta/classes-recipe/dpkg.bbclass
> @@ -21,6 +21,8 @@ SBUILD_PASSTHROUGH_ADDITIONS ?= ""
>   # can be set to "1" in the recipe.
>   DPKG_BUILD_ENABLE_NETWORK ??= "0"
>   
> +SBUILD_TMPDIR ?= "${WORKDIR}/tmpdir"
> +
>   def expand_sbuild_pt_additions(d):
>       cmds = ''
>       for var in d.getVar('SBUILD_PASSTHROUGH_ADDITIONS').split():
> @@ -41,6 +43,7 @@ CP_FLAGS:sid ?= "-L --update=none --no-preserve=owner"
>   
>   # Build package from sources using build script
>   dpkg_runbuild[root_cleandirs] += "${WORKDIR}/rootfs"
> +dpkg_runbuild[cleandirs] += "${SBUILD_TMPDIR}"
>   dpkg_runbuild[vardepsexclude] += "${SBUILD_PASSTHROUGH_ADDITIONS}"
>   dpkg_runbuild() {
>       E="${@ isar_export_proxies(d)}"
> @@ -126,6 +129,7 @@ dpkg_runbuild() {
>           sbuild_network_option="--enable-network"
>       fi
>   
> +    TMPDIR=${SBUILD_TMPDIR} \
>       sbuild -n -c ${SBUILD_CHROOT} \
>           --chroot-mode=${ISAR_CHROOT_MODE} \
>           --host=${PACKAGE_ARCH} --build=${BUILD_ARCH} ${profiles} \

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/ad39c359-7c63-47d5-a5ae-6b554ae24de6%40ilbers.de.

      parent reply	other threads:[~2026-09-14 12:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07 11:41 'Felix Moessbauer' via isar-users
2026-09-07 11:41 ` [PATCH 2/2] bootstrap: place gnupg home below workdir instead of /tmp 'Felix Moessbauer' via isar-users
2026-09-14 12:34 ` Zhihang Wei [this message]

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=ad39c359-7c63-47d5-a5ae-6b554ae24de6@ilbers.de \
    --to=wzh@ilbers.de \
    --cc=cedric.hombourger@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=srinuvasan.a@siemens.com \
    /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