[buildd-tools-devel] Bug#512131: [Buildd-tools-devel] Bug#512131: Bug#512131: schroot: sessions and chroots can't be named the same... inconsistently

Roger Leigh rleigh at codelibre.net
Sun Jul 11 00:10:42 UTC 2010


tags 512131 + fixed-upstream
thanks

On Sat, Jan 17, 2009 at 05:28:15PM +0000, Roger Leigh wrote:
> On Sat, Jan 17, 2009 at 05:53:00PM +0100, Adeodato Simó wrote:
> > Package: schroot
> > Version: 1.2.1-1
> > 
> > Hello, please consider this:
> > 
> >     % schroot --list
> >     etch
> >     etch-i386
> >     etch-i386-source
> >     etch-source
> > 
> >     % schroot -b -n etch -c etch
> >     etch
> [...]
> > Please either allow sessions to be named as chroots (preferred if there
> > is no ambiguity possible), or at least don't allow for sessions to be
> > created with the same name as a chroot!
> > 
> > But since the config file could be modified, and a chroot added or
> > renamed that would take the name of an existing session (and there is
> > no way to prevent that, and then one won't be able to access the
> > session), maybe letting them live in separate namespaces is worth
> > considering.
> 
> Yes, I agree.  Separate namespaces would probably be better, and it
> might even simplify the code which currently has to deal with both
> chroots and sessions (since some chroots types are automatically also
> sessions, whereas others are not).

I have now implemented this.  From the upstream NEWS:

  1) Chroot names are now prefixed by a namespace.  Three namespaces
     are used in this release, "chroot:", "source:" and "session:" for
     chroots, source chroots and sessions, respectively.  These may
     all be selected with the --all-chroots, --all-source-chroots and
     --all-sessions options.  Individual chroots may be referred to
     with or without a prefix, depending upon the context.  For most
     actions, "chroot:" is the default prefix, while the
     --run-session, --recover-session and --end-session actions use
     "session:" as the default prefix.

  2) Source chroots previously used a -source suffix.  A chroot named
     "squeeze" providing a source chroot would also create a source
     chroot named "squeeze-source".  The source chroot is now named
     "source:squeeze", but a chroot with a -source suffix is still
     created for compatibility (actually now named
     "chroot:squeeze-source").  The -source suffix names will be
     dropped in the 1.5.x development releases and 1.6.x stable
     releases.

  3) Session chroots previously were in the same flat namespace as
     chroots.  Now that sessions are in a separate namespace, it is
     possible to create a session with the same name as the original
     chroot.  For example a chroot named "build" is actually
     "chroot:build" and so the session will be named "session:build".
     For compatibility session names are also still placed in the
     "chroot:" namespace so that they still work without namespaces
     with actions such as --info (namespaces are not required for
     session-specific actions such as --run-session).  The
     compatibility name will be dropped in the 1.5.x development
     releases and 1.6.x stable releases.

  4) The option --list, in addition to respecting the various --all
     options will now allow the use of --chroot as well.  This may be
     used to verify the existence of the specified chroots.  --list
     defaults to showing --all-chroots --all-source-chroots which is
     the effective behaviour of previous releases.

http://www.codelibre.net/~rleigh/schroot-1.4.8.tar.bz2
% sha256sum schroot-1.4.8.tar.bz2 
7a0614f66cac89394a04688f47d4fca6afb737bf9acbebd9c69d9577a4318787  schroot-1.4.8.tar.bz2

If you (or anyone else following this bug) would like to try this
out, I'd be grateful for any feedback.  This tarball is a prerelease
taken from the current schroot-1.4 branch of schroot.git.  Note that
it's working for me but has not had extensive testing yet.  I'm
open to using different prefixes and namespace separator etc.  The
behaviour and creation of compatibility names can also be revised--
I'm open to any suggestions for improving things.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100711/9e4bb7bc/attachment.pgp>


More information about the Buildd-tools-devel mailing list