Hi Paul, Quoting Sean Whitton (2016-08-03 06:20:26) > On Tue, Aug 02, 2016 at 11:06:31PM -0500, Paul Elliott wrote: > > Sometimes a user gets a sbuild chroot so screwed up that it does not > > work anymore, and the user has no idea how to fix it, because he does not > > know what he did wrong. > > > > He wants to start over from scratch. > > > > The problem is, it is not documented the correct way to delete > > the chroot and tar ball. The users want to put sbuild back to > > the way it was just after sbuild was installed. if it's not documented, you should file a bug about that. ;) The main issue here is, that it is not clear *where* the bug should be filed. Sbuild supports multiple backends. The probably most used one is the schroot backend because that is used by sbuild-createchroot and the default of the CHROOT_MODE configuration variable. Indeed I do remember having had a similar question when I started using sbuild but never got around filing a bug. As far as I know, schroot still doesn't document how to delete a chroot. > > What is the proper way to do that? > > Asking for a friend? ;) > > Assuming you used the suggestions for making the chroot on the sbuild > wiki page, this should do it: > > # rm -rf /srv/chroot/* /etc/sbuild/chroot/*-sbuild /etc/schroot/chroot.d/*-sbuild > > If you didn't use the suggestions on the wiki page, just start nuking > stuff in those three directories. Paul was talking about "a chroot" (singular). The above advice kills all chroots including those that are not related to sbuild. Assuming that you are using the schroot backend, you can do the following: 1. figure out which schroot you were using with sbuild. If you used an unstable chroot on amd64, then look out for a file that is called like /etc/schroot/chroot.d/unstable-amd64-sbuild-XXXXXX where XXXXXX is a random ASCII string 2. look inside that file to figure out where the chroot data lives in your file system by looking at the directory= or the file= options 3. if you want to delete the schroot, just delete the configuration file under /etc/schroot/chroot.d/unstable-amd64-sbuild-XXXXXX together with the actual chroot the configuration file pointed to I never heard about /etc/sbuild/chroot/ but it seems it's used for the sudo backend. I don't even know where the code is that creates this. But if you don't care, then you can leave that directory alone. Thanks! cheers, josch
Attachment:
signature.asc
Description: signature