Difference between revisions of "Platform Team/Package Management System"

From Sugar Labs
Jump to navigation Jump to search
(→‎How it works at a glance: Add regular 0sugar workflow)
m (link update)
 
(81 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
+
== Summary ==
  {{TOCright}}
 
  [[Category:Activity Team]]
 
</noinclude>
 
  
== Zero Sugar Distribution ==
+
Sweets is a [http://en.wikipedia.org/wiki/Package_management_system Package Management System] entirely based on [http://0install.net/ Zero Install], a decentralized cross-distribution software installation system. It is intended to distribute various software projects created in the Sugar ecosystem, such as libraries, sugar itself, and sugar activities.
  
Zero Sugar provides a method that is transparent for users and convenient for doers to deploy software across varying platforms as well as across Sugar releases. Zero Sugar is mainly targeted to support a direct doer-to-user interaction model, i.e., shortcut the chain of transfer of doer-to-distributor-to-user (still, Zero Sugar could be  [[#Distributors|beneficial]] for distributors, since it unifies the deployment workflow).
+
This new distribution method is initiated with these assumptions:
  
== Benefits ==
+
* The method to share software projects should to be as convenient as possible.
 +
* It is important to stimulate users into becoming doers&mdash;to modify existing activities, and to share the results of their experiments with other people, viz., a distribution method should handle different variants of the same project.
 +
* This distribution method is not intended to be the only one, but is targeted more towards direct distribution&mdash;from software creators to software users.
  
How Zero Sugar might be useful depending upon your point of view:
+
The goal is to create a new distribution method that goes beyond reusing the current methods:
  
=== Users ===
+
# [[Development_Team/Almanac/Activity_Bundles|''.xo bundles'']]
 +
#* Work smoothly only for pure python activities, though only if all (and the same) dependencies are installed on all systems. They stop working smoothly if activities use non-standard dependencies or contain binaries.
 +
#* But, are not effective in supporting the simultaneous use of multiple versions of software, e.g., the results of experiments (the work) of different doers, in one environment. Users must manually handle the variety of activity versions, e.g., sort out all the local bundles or directories in {{Code|~/Activities}}.
 +
# ''native packages''
 +
#* Are not the shortest way to connect developers with users.
 +
#* In most cases, they don't support multiple versions of the same project.
 +
#* They don't work at all for sharing results of experiments.
  
Users can run Sugar effortlessly in multiple environments (machine architectures, GNU/Linux distributions, etc.). And since Sugar also stimulates users to be doers, there can be tons of handmade software in the field (mostly duplicates and reinvented wheels, but this is the nature of learning with Sugar&mdash;one tries some software, realizes some missing or additional feature, modifies or mimics some code, learns something new, and eventually produces a new creation). It is becoming critical to provide an easy and robust launching scheme for all these pieces of code, without writing long HOWTOs somewhere on a wiki, like "Please, if you are on Ubuntu, install these packages before starting my activity...".
+
And, at the same time, the existing distribution methods are available for reuse in Sweets:
  
Relying only on a particular distributor, i.e., using activities only from one distributor's channel, makes Sugar less useful or universal. Zero Sugar provides the most convenient and direct deployment method possible between the author of a piece of code and its users.
+
# [[Development_Team/Almanac/Activity_Bundles|''.xo bundles'']] are a subset of the Sweets workflow, from the usage point of view.
 +
#* It is possible to bundle an entire directory as a sweet project to use it as a regular .xo file.
 +
# ''native packages''
 +
#* Sweets is not intended to create one more GNU/Linux distribution. It distributes only projects that people create within the Sugar community; all other software, i.e., dependencies, will be reused from native packages.
 +
#* For cases like Sugar deployments, using the more centralized, regular repositories (third party or official GNU/Linux distributions with native packages) makes more sense. These native packages of Sugar software will be included in Sweets, as well. When people start using Sweets on top of these Sugar distributions, they will have the chance to choose between natively packaged Sugar components and components that came directly from software creators.
 +
#* It is possible, when there is a need, to automatically package sweets into native packages. See [[Sweets Distribution]], for example.
  
=== Doers ===
+
See also the initial release [[Platform_Team/Sweets/1.0/Notes|notes]].
  
Authors of code are always interested in supporting as large an audience of users as possible. And since people can use Sugar in different environments, it is critical to provide an instrument that permits an activity to run  on all Sugar platforms. In the case of Python-based activities (not for arbitrary scripting language e.g. Ruby is not a part of the [[0.88/Platform_Components|Sugar Platform]]), the existing practice of just zipping the activity code into .xo files works pretty well. But it is a problem with non-Python activities or activities that have dependencies that are not included in the Sugar Platform.
+
== Zero Install basis ==
  
Zero Sugar tries to solve all the possible issues that prevent activity launching in an heterogeneous Sugar environment.
+
Sweets is entirely based on Zero Install. Sweets might be treated as a tools and infrastructure wrapper around Zero Install. See Zero Install's home page, http://0install.net/, for detailed information. And the [http://0install.net/injector-design.html design] page in particular.
  
Also, if you have some development idea in mind, you can start pushing it through the Sucrose release queue to get it into an upcoming (though maybe not the nearest) release. However, since the release process is binary—either your feature is included or not—Zero Sugar offers more flexibility for everyone. For example:
+
== Further reading ==
* some features are of arguable general benefit; Zero Sugar would allow interested end users to efficiently test (and even deploy) such features;
 
* some feature are only stable in limited environments; Zero Sugar would allow deployment in limited environments without the risk of destabilizing the rest of Sugar.
 
  
=== Distributors ===
+
* [[Platform_Team/Sweets/Architecture|Sweets Architecture]] - A guide to basic Sweets concepts.
 +
* [[Platform_Team/Guide/Sweets_Usage|Sweets Usage]] - A guide to know how to launch software using Sweets.
 +
* [[Platform_Team/Guide/Sweets_Packaging|Sweets Packaging]] - A guide to know how to make your software accessible via Sweets.
 +
* [[Platform_Team/Infrastructure|Infrastructure Map]] - An overview of the Sweets software world.
  
The [[0.88/Platform_Components|Sugar Platform]] cannot grow endlessly, e.g., installing Sugar from packages should not fetch half of all available packages including several UI toolkits, several programming languages, etc. So, components like Qt or Ruby are (at least at present) not in the Sugar Platform list. But with Zero Sugar, activities could still use such dependencies by installing them from native packaging systems on demand, and without bundling their binaries.
+
== Getting involved ==
  
== How it works at a glance ==
+
* Read the [http://git.sugarlabs.org/sdk/sweets/blobs/master/HACKING HACKING] file to know how to contribute with code.
 +
{{:Platform_Team/Sweets/Feedback}}
  
Instruments and services that are used within Zero Sugar:
+
== Resources ==
* [[Activity Team/Zero Sugar/0sugar|0sugar]], the main tool, everything happens via the {{Code|0sugar}} command.
 
* [http://0install.net/ 0install] decentralized deployment infrastructure.
 
* [http://build.opensuse.org/ OBS], openSUSE Build Service, build farms and repository of native packages for the GNU/Linux distributions that OBS supports.
 
* [http://www.packagekit.org/ PackageKit] to install software from native packaging systems.
 
* [http://download.sugarlabs.org/ Sugar Labs]'s resources to host various files.
 
  
The process departing point is a [[Activity Team/Zero Sugar/Service.info Specification|spec file]] which is used by the {{Code|0sugar}} command to accomplish two major tasks:
+
* [http://git.sugarlabs.org/sdk/sweets Sources].
* how to build the application and its dependencies,
+
* Recipe files [[Platform_Team/Recipe_Specification|specification]].
* how to deploy the application and its dependencies.
 
  
A building step might occur:
+
== Subpages ==
* but, building is not required for scripting languages.
 
* on the developer's workstation, to deploy to environments similar to the developer's, or
 
* on OBS, to build for the GNU/Linux distributions that OBS supports.
 
  
Deployment will happen:
+
{{Special:PrefixIndex/{{PAGENAMEE}}/}}
* via the 0install infrastructure:
 
** analogs of the application and its dependencies could be installed from native packaging system, if PackageKit is installed.
 
** by downloading from http://download.sugarlabs.org/, if the application was built in the developer's environment,
 
** by downloading from OBS repositories, if the application was built on OBS,
 
* via native packages, only if the build happened on OBS; users need to follow the regular workflow, for their distributions, to attach to the external OBS repository.
 
 
 
The regular workflow within Zero Sugar will look like:
 
* create or modify spec file.
 
* if OBS should be used, add additional information to spec file that will be used while interaction with OBS.
 
* call {{Code|0sugar dist}} command to create sources distribution files or just distribution files for applications that don't requires compiling.
 
* call {{Code|0sugar build}} command, if OBS is not used and application requires compiling.
 
* call {{Code|0sugar commit}} command to publish 0nstall information and interact with OBS (if it is enabled).
 
* newly created release is accessible via 0isntall or via OBS repositories.
 
 
 
== Documentation ==
 
 
 
Start your exploration beginning with these resources:
 
 
 
* [[Documentation Team/Services/Activity Developers Guide|Activity Developers Guide]] to get instructions on how to use the existing Zero Sugar packages in activities.
 
* [[Documentation Team/Services/Service Developers Guide|Service Developers Guide]] for how to create a Zero Sugar package.
 
 
 
See [[Activity Team/Zero Sugar/Scalable development model|Scalable development model]] to learn more about the initial intentions for Zero Sugar.
 

Latest revision as of 14:51, 3 July 2012

Summary

Sweets is a Package Management System entirely based on Zero Install, a decentralized cross-distribution software installation system. It is intended to distribute various software projects created in the Sugar ecosystem, such as libraries, sugar itself, and sugar activities.

This new distribution method is initiated with these assumptions:

  • The method to share software projects should to be as convenient as possible.
  • It is important to stimulate users into becoming doers—to modify existing activities, and to share the results of their experiments with other people, viz., a distribution method should handle different variants of the same project.
  • This distribution method is not intended to be the only one, but is targeted more towards direct distribution—from software creators to software users.

The goal is to create a new distribution method that goes beyond reusing the current methods:

  1. .xo bundles
    • Work smoothly only for pure python activities, though only if all (and the same) dependencies are installed on all systems. They stop working smoothly if activities use non-standard dependencies or contain binaries.
    • But, are not effective in supporting the simultaneous use of multiple versions of software, e.g., the results of experiments (the work) of different doers, in one environment. Users must manually handle the variety of activity versions, e.g., sort out all the local bundles or directories in ~/Activities.
  2. native packages
    • Are not the shortest way to connect developers with users.
    • In most cases, they don't support multiple versions of the same project.
    • They don't work at all for sharing results of experiments.

And, at the same time, the existing distribution methods are available for reuse in Sweets:

  1. .xo bundles are a subset of the Sweets workflow, from the usage point of view.
    • It is possible to bundle an entire directory as a sweet project to use it as a regular .xo file.
  2. native packages
    • Sweets is not intended to create one more GNU/Linux distribution. It distributes only projects that people create within the Sugar community; all other software, i.e., dependencies, will be reused from native packages.
    • For cases like Sugar deployments, using the more centralized, regular repositories (third party or official GNU/Linux distributions with native packages) makes more sense. These native packages of Sugar software will be included in Sweets, as well. When people start using Sweets on top of these Sugar distributions, they will have the chance to choose between natively packaged Sugar components and components that came directly from software creators.
    • It is possible, when there is a need, to automatically package sweets into native packages. See Sweets Distribution, for example.

See also the initial release notes.

Zero Install basis

Sweets is entirely based on Zero Install. Sweets might be treated as a tools and infrastructure wrapper around Zero Install. See Zero Install's home page, http://0install.net/, for detailed information. And the design page in particular.

Further reading

Getting involved

  • Read the HACKING file to know how to contribute with code.
  • Submit your bug report or feature request.
  • Subscribe to the sugar-devel mailing list and email with the subject prefixed with [SWEETS].
  • Ask your question on IRC channels, #sugar (not logged) or #sugar-newbies (logged).

Resources

Subpages