On 25/06/17 12:48, Johannes Schauer wrote:
>
>>>> W: Not creating symlink /srv/chroots/unstable-amd64-sbuild to
>>>> /etc/sbuild/chroot/unstable-amd64-sbuild: file already exists
>>> This is troublesome. It appears you already had a chroot set up?
>> Yes - probably - I have had many unsuccessful goes at it in the past on
>> different machines, and I can never remember where I got to.
> What is your output of $(schroot --all-source-chroots --list)?

$ schroot --all-source-chroots --list
E: /etc/schroot/chroot.d/unstable-amd64-sbuild-GlcVID: line 1
[unstable-amd64-sbuild]: A chroot or alias
‘chroot:unstable-amd64-sbuild’ already exists with this name
I: Duplicate names are not allowed

> sbuild-createchroot will create schroot configuration files in
> /etc/schroot/chroot.d in *.ini format. You can investigate these config files
> to easily see which chroots schroot knows about (they should be listed above)
> and where in your filesystem the chroot is located. You can do the latter by
> either looking at the file option (in case of tarball based chroots) or the
> directory option (in case of directory based chroots).

I found 4 config files in  /etc/schroot/chroot.d:

- debci-instable-amd64
[debci-unstable-amd64]
type=directory
profile=debci
description=debci unstable/amd64 chroot
directory=/usr/share/debci/chroots/debci-unstable-amd64
users=debci
groups=debci
root-users=debci
source-root-users=debci
root-groups=root
union-type=aufs

- unstable-amd64-sbuild-GlcVID
[unstable-amd64-sbuild]
description=Debian unstable/amd64 autobuilder
groups=root,sbuild
root-groups=root,sbuild
profile=sbuild
type=directory
directory=/srv/chroots/unstable-amd64-sbuild
union-type=none
union-overlay-directory=/dev/shm

- unstable-amd64-sbuild-pPG_11
[unstable-amd64-sbuild]
description=Debian unstable/amd64 autobuilder
groups=root,sbuild
root-groups=root,sbuild
profile=sbuild
type=directory
directory=/srv/chroots/unstable-amd64-sbuild
union-type=none
union-overlay-directory=/dev/shm

- unstable-amd64-sbuild-Y02TR7
[unstable-amd64-sbuild]
type=directory
description=Debian unstable/amd64 autobuilder
directory=/srv/chroots/unstable-amd64-sbuild
groups=root,sbuild
root-groups=root,sbuild
profile=sbuild

>> $ schroot -l
>> E: /etc/schroot/chroot.d/unstable-amd64-sbuild-GlcVID: line 1
>> [unstable-amd64-sbuild]: A chroot or alias
>> ‘chroot:unstable-amd64-sbuild’ already exists with this name
>> I: Duplicate names are not allowed
> Look at the files in /etc/schroot/chroot.d/. There should be another config
> file with the string "[unstable-amd64-sbuild]" in the first line. Investigate
> which chroot they are each pointing to (maybe the same) and then maybe rename
> one of them for now.

I tried renaming two out of the three sbuild configs, but no matter
which one I left untouched, "$ schroot --all-source-chroots --list"
would only find the debci chroot.

>>> Yup, this looks like the chroot you want to create already exists.
>> What is the best way to clear it all out and start again?
> In case you are only using schroot for sbuild, then you can safely delete the
> config files in /etc/schroot/chroot.d together with the chroot locations they
> reference. If those config files were created by sbuild-createchroot, then
> their name should follow the format:
>
> ${dist}-${arch}-sbuild-${random}
>
> The pkg-ruby-extras script seems to put the chroots into /srv/chroots/ while
> the sbuild-createchroot man page suggests /srv/chroot/.
>
> Since recently there is also the command sbuild-destroychroot which will give
> you advice on how to remove a chroot.

In the end, I just deleted the sbuild config files (leaving the debci
one for now) and also the referred chroot directory (the only one) in /srv.

I manually ran "sbuild-createchroot unstable
/srv/chroot/unstable-amd64-sbuild http://deb.debian.org/debian";. Note
that I did not use httpredir (which the script does), and used
"/srv/chroot" & not "/srv/chroots". All went fine. Then I manually added
the union-overlay-directory.
I updated the update script to reference the right "/srv" directory, and
then the update script updates the schroot perfectly. Yay!

<snip>

The only thing left to fix is the debci part. The last bit of the update
script output is:
lxc-start: Executing '/sbin/init' with no configuration file may crash
the host
Waiting 30 sec for adt-sid-amd64 to start...
lxc-attach: failed to get the init pid
lxc-attach: failed to get the init pid
lxc-attach: failed to get the init pid

Thanks for your help Josch!

Regards,

Ross

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to