Documentation Team/Obsolete/Services Wrap native packages HOWTO
Introduction
The purpose of this Guide is describing how to simplify process of usage, by activity developers, packages that are not included to Sugar Platform but well packaged to various GNU/Linux distributions.
Workflows
- If service, you are planing to use, already exists on http://download.sugarlabs.org/services/ just add its name to requires field in your activity or service .info file
- otherwise, read the rest of this document to know how to create service which represents native package
Detailed description
To use native packages, they should be wrapped into services. Such services are lightweight and contain only proper information about native packages. Also having service wrappers let us collect all distro specific information in one place, because various GNU/Linux distributions could have different names for the same upstream application.
Primal distributions list
In according to http://distrowatch.com/, there are several distributions whose names could be mentioned in service. Followed table is a list of primal distributions from top 100 for 2009 year(excluding source based and special distributions), in most cases theirs names will be the same in all derivate distributions.
Popularity | Name in service.info | Packages | Sugar support |
---|---|---|---|
2 | fedora | RPM (yum) | yes |
4 | suse | RPM | yes |
5 | debian | DEB | yes |
6 | mandriva | RPM (urpmi) | yes |
7 | puppy | PET | no |
10 | arch | Pacman | yes |
13 | slackware | TXZ | no |
38 | moblin | RPM | no |
40 | frugalware | FPM (TAR.BZ2) | no |
41 | pardus | PiSi | no |
74 | alt | RPM (APT) | yes |
89 | turbolinux | RPM | no |
91 | crux | TAR.GZ | no |
96 | linuxconsole | LCM | no |
99 | yoper | RPM | no |
Package wrappers are regular services, so read Service Developers Guide first.
service.info file
In addition to standard service.info file, wrappers' file:
- Service section contains only
- name
- summary
- description
- homepage
- should contain one or more Distro:<name> sections
- Distro: section with name *, describes common distro parameters
Each Distro: section:
- should contain name field which is local package name for service
- optional buildtime-name field which goes to buildtime.xml feed, by default name will be used
- for applications, could contain main field with full path to exec file(could be different for different distributions)
Workflow
- create service.info file
- add Distro:* section with common distro parameters
- add Distro:<name> sections at least for sugar supported distributions
- exec 0sugar push to upload changes to the server
- if service's application is not well packaged, please consider possibility to add source and binary service implementations
Known issue
- in RO mode(check if some package is installed), 0install could work only with deb and rpm based distributions or, if PackageKit is installed, all distributions that current PackageKit version supports
- to install packages, system should have PackageKit