Hi, iusing $unshare_tmpdir_template = '/var/tmp/tmp.sbuild.XXXXXXXXXX'; in the sbuild configuration, one can avoid a /tmp overflow if /tmp is a tmpfs. This is especially important since trixie where /tmp is tmpfs by default. This is not honored if the chroot needs to be built, mmdebstrap still happily fills up /tmp (and then terminates with a VERY misleading error message). Greetings Marc
control: forward -1 https://salsa.debian.org/debian/sbuild/-/merge_requests/204 hi Marc, Jochen pointed me to this bug, saying I would also need to set $unshare_mmdebstrap_env_cmnd = [ "env", "TMPDIR=/home/user/tmp/"; in sbuild's config.pl. However, this wont work either, until https://salsa.debian.org/debian/sbuild/-/merge_requests/204 has been merged, so for now one also need to do alias sbuild="TMPDIR=/home/user/tmp/ sbuild" after which simply invocating sbuild should work for the user user with tmp in ~/tmp.
Hi Marc, * Marc Haber <mh+debian-packages@zugschlus.de> [2025-08-17 11:35]: I think the better option is to use: $ TMPDIR=/var/tmp sbuild ... This will put all temporary files below /var/tmp, also for piuparts and autopkgtest since version 0.91.5. * Holger Levsen <holger@layer-acht.org> [2025-09-22 10:07]: This has been added in version 0.91.3 with the small variation that it is now: $unshare_mmdebstrap_env_cmd = [ "env", "TMPDIR=/home/user/tmp/"; (note the cmd instead of cmnd.) I still think setting $TMPDIR is the better option and would propose to close this bug unless you disagree. Cheers Jochen
But that cannot be put in configuration and then forgotten, it needs to be remembered every time. Or a wrapper needs to be written and used. Greetings Marc
yes. I want to be able use 'sbuild', not 'TMPDIR=$something sbuild'.
This. MAYBE I would be fine with setting SBUILD_TMPDIR in my .bashrc (and then forget about it¹), and have sbuild transport that to TMPDIR for the subprocesses, but ideally I'd want to have that in sbuild configuration where the rest of sbuild config lives. Greetings Marc ¹ and debug for hours on the next host where I set up sbuild and will invariably run into that trap again
* Marc Haber <mh+debian-packages@zugschlus.de> [2025-12-26 14:07]:
Use this in your sbuild config:
$ENV{'TMPDIR'} = "/var/tmp";
$unshare_tmpdir_template = '/var/tmp/tmp.sbuild.XXXXXXXXXX';
The default for $unshare_tmpdir_template is set before the config file
is read so we need to override it.
Cheers Jochen
If that works (I didn't try it yet), it needs to be in the docs. Prominently. Greetings Marc