Your message dated Thu, 10 Apr 2025 09:27:08 +0200
with message-id <174427002899.1416752.4708375141930342235@localhost>
and subject line Re: sbuild doesn't support autotpkgest-virt-incus: Error:
mkdir /sbuild-nonexistent: permission denied
has caused the Debian Bug report #1061388,
regarding sbuild doesn't support autotpkgest-virt-incus: Error: mkdir
/sbuild-nonexistent: permission denied
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1061388: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061388
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: sbuild
Version: 0.85.4
Severity: normal
I have been successfully using sbuild with lxd (installed from snap) for
a couple of years now, via the autopkgtest build backend.
Migrating to incus broke sbuild, resulting in:
D: Running command: incus exec autopkgtest-lxd-ltsezo -- strace -f -A -o
/tmp/strace.log env LC_ALL=C.UTF-8 LANG=en_US.UTF-8 HOME=/sbuild-nonexistent
DEB_BUILD_OPTIONS=parallel=16 SHELL=/bin/sh sh -c cd / && exec "$@" exec perl -e
...
Error: mkdir /sbuild-nonexistent: permission denied
D: Error run_chroot_session(): Error locking chroot session: skipping
beautifulsoup4Keeping session: /tmp/autopkgtest.f2BSkb
D: Setting Session=undef
D: Error run_chroot(): Error locking chroot session: skipping beautifulsoup4E:
Error locking chroot session: skipping beautifulsoup4
D: Setting Pkg Status=failed
D: Setting Pkg Fail Stage=lock-session
This seems to be because "incus exec" is trying to write
~/.config/incus, but HOME has been set to /sbuild-nonexistent outside
it.
https://github.com/lxc/incus/blob/e5690705e842d3961d8a1d18c0ec002c25345af8/cmd/incus/main_aliases.go#L162-L175
I think Sbuild could not set HOME as part of the environment when
calling the autopkgtest backend. It is explicitly set via the env
command in the arguments to the backend, so it souldn't be set outside
it too.
There are also other ways this could be hacked around...
Locally, I'll set INCUS_CONF, to override the HOME.
Stefano
-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 6.5.0-5-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages sbuild depends on:
ii adduser 3.137
ii libsbuild-perl 0.85.4
ii perl 5.38.2-3
Versions of packages sbuild recommends:
ii autopkgtest 5.32
ii debootstrap 1.0.134
ii schroot 1.6.13-3+b3
ii uidmap 1:4.13+dfsg1-3+b1
Versions of packages sbuild suggests:
pn deborphan <none>
ii e2fsprogs 1.47.0-2+b1
ii kmod 31-1
ii wget 1.21.4-1+b1
-- no debconf information
--- End Message ---
--- Begin Message ---
Hi,
On Sun, 25 Feb 2024 19:50:48 +0100 Johannes Schauer Marin Rodrigues
<[email protected]> wrote:
> On Tue, 23 Jan 2024 14:30:07 +0000 [email protected] wrote:
> > Hi Debian (2024.01.23_13:41:47_+0000)
> > > This seems to be because "incus exec" is trying to write ~/.config/incus,
> > > but HOME has been set to /sbuild-nonexistent outside it.
> >
> > Filed an incus upstream bug about handling this situation more gracefully:
> > https://github.com/lxc/incus/issues/422
>
> in that issue you asked exactly the question I was about to ask you. :)
>
> Though it seems incus should now be able to deal gracefully with the situation
> and there is nothing else that sbuild needs to do to handle this, correct?
>
> Note, that the autopkgtest/podman backend has a similar issue, see #1033352
> for
> details. To fix this, Christian submitted this MR against sbuild:
>
> https://salsa.debian.org/debian/sbuild/-/merge_requests/55
>
> Reading how incus worked around this problem, maybe podman can do the same?
incus is now able to work with a non-existent $HOME, so we can close this bug.
Thanks!
cheers, josch
signature.asc
Description: signature
--- End Message ---