On Sat, 6 Oct 2018 11:39:12 +1000 Ben Finney <bign...@debian.org> wrote:
> On 29-Sep-2018, Ben Finney wrote:
> > Package: sbuild
> > $ getent passwd sbuild
> > sbuild:x:126:136:Debian source builder,,,:/var/lib/sbuild:/bin/bash
> > $ getent group sbuild
> > sbuild:x:136:bignose
> 
> Prompted by a suggestion to try running those commands *in* the
> chroot, I get this failure instead:
> 
> =====
> $ sbuild-shell unstable
> E: Access not authorised
> I: You do not have permission to access the schroot service.
> I: This failure will be reported.
> Chroot setup failed
> Error setting up unstable chroot
> Chroot setup failed at /usr/bin/sbuild-shell line 42.
> 
> $ sudo sbuild-shell unstable
> chown: invalid user: 'sbuild:sbuild'
> E: Failed to set sbuild:sbuild ownership on /build
> Failed to set up chroot
> Error setting up unstable chroot
> Chroot setup failed at /usr/bin/sbuild-shell line 42.
> =====
> 
> What should I be doing to correct this chroot?
> 
> How could the SBuild chroot be created so that it fails like this?
> What should I be doing when creating future chroots, to avoid this
> failure?

Do you still have that chroot around?

The messages you are getting look as if your chroot does not have the sbuild
user and group available inside your chroot?

How did you create your chroot? Did you use sbuild-createchroot?

There are a couple of customizations that sbuild-createchroot is doing, most
prominently, it adds the output of $(getent passwd sbuild) and $(getent group
sbuild) to /etc/passwd and /etc/group, respectively inside the chroot. See the
code starting here:

https://sources.debian.org/src/sbuild/0.77.1-2/bin/sbuild-createchroot/#L401

But I'm currently working on making sbuild work with a plain chroot that only
contains the Essential:yes packages, apt and their transitive dependencies. The
result of that work should fix this bug.

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to