[Buildd-tools-devel] schroot changes

Roger Leigh rleigh at whinlatter.ukfsn.org
Sun Dec 25 15:13:12 UTC 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi folks,

First of all, I'd like to wish everyone a Merry Christmas.  I hope you
are all having a great time!

Over the last few weeks, I have made quite a number of changes to
schroot, all with the ultimate aim of removing all dependencies upon
GObject and GLib.  Today, I finished all that, with the result that
the source is now 100% standard C++, with all traces of Glib being
removed.  This has a number of advantages:

- - the code is smaller and simpler
- - GObject object construction and all of the property machinery is
  flexible, but complex and fragile.  That's all gone in favour of
  standard C++ objects, with the added bonus of type-safety.
- - memory management is simpler and more robust, using tr1::shared_ptr
  for shared resources, and the stack for almost everything else,
  making use of standard C++ containers like vector.  Once fully
  checked, it should be completely (and verifiably) leak-proof.
- - no C string functions.  There's now no opportunity for any buffer
  overflow attacks, since all strings are std::string.  The code that
  handles strings is correspondingly simpler.
- - more people use C++ rather than GObject, so the barrier to people
  wanting to hack on it is much lower.
- - it should now be much easier to implement new functionality.

So overall, the code should be far more maintainable, robust and
secure.

There are a few small downsides:

- - the executable is a bit bigger, but that's the price for type-safety
  and security.
- - there's a new dependency on libboost-program-options for option
  parsing (but it's small).
- - I had to reimplement some of the Glib utility functions and the
  GKeyFile parser.  The latter still needs some work.

However, once it's fully debugged (over the next week), it should be
in good shape.  Currently it's still a conversion from the original C,
so there's still room for further improvement.

If anyone is interested in hacking on schroot, feel free (though I
would prefer patches sent to the list before commit; being the only
one working on it so far, I haven't been doing this).  The next major
change I want to make is Xen support, but this requires someone with
Xen expertise.


Regards,
Roger

- -- 
Roger Leigh
                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                Debian GNU/Linux        http://www.debian.org/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/>

iD8DBQFDrrcGVcFcaSW/uEgRAs2GAJ42bjHeunPFoG79FcrUTy8lHtvzQACfScwN
RmUQ1elS0sY59NDzI9Vwmw4=
=iW2e
-----END PGP SIGNATURE-----



More information about the Buildd-tools-devel mailing list