[Sugar-devel] On Zeroinstall and Sugar packages

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Mon Oct 19 23:42:32 EDT 2009


I have long argued that the only way to achieve reasonably bundle behavior
in Sugar is to restrict ourselves exclusively to carefully selected
interpreters.  After speaking with the Zeroinstall developers, especially
Thomas Leonard, I have changed my mind.

Zeroinstall's tools and design are extremely closely aligned to Sugar's
goals for package management.  They have anticipated almost every use case
that we have described.  Their solutions are not perfect, but they make
the best available compromise when compromises are necessary.

A month ago I wrote:
"""
I really do believe we _could_ implement a
highly usable system in which Activities are completely self-contained
portable bundles.  For example, see Android.  I don't believe that we
_have_ implemented such a system.  I do believe that we _should_, because
it maximizes the ability of users to predict how their system will behave,
and predictability is the core of usability and security.
"""

My principal reason for wanting Activities to be highly restricted and
purely interpreted was to enable users to push bundles between machines
and have them "just work" without worrying about whether the dependencies
are installed or what CPU architecture is in use.  Zeroinstall can solve
the dependency problem with 0export [1] and 0compile [2].  0export is a
tool to produce a bundle for a given program that contains all needed
dependencies for all target architectures in a single file.  0compile,
combined with Zeroinstall's support for source bundles, enables us (1) to
approach true platform-independence and (2) to provide users the
opportunity to modify the source code of a package and rebuild it in a
natural way.

My epiphany is: the alternative to a system like Zeroinstall is not an
idealized purely interpreted bundle type.  It's the mess we have now,
where bundles contain all sorts of bizarre binary blobs, and make a
variety of fragile assumptions about the rest of the system.  We have no
way to prevent Activity authors from doing this, and this is likely to
remain true.  Even I am guilty of including binary blobs, in Watch Me [3],
because there was no other way to make the Activity work.  This means that
I've distributed binary code without the source.  This is counter to our
educational goals, and counter to our goals of building a reliable,
predictable system.

We need to bring native-code Activities aboveboard, and Zeroinstall is by
far the most promising avenue I've encountered to make that happen.

--Ben

[1] http://0install.net/0export.html
[2] http://0install.net/0compile.html
[3] http://activities.sugarlabs.org/sugar/addon/4205


More information about the Sugar-devel mailing list