Difference between revisions of "School Network/Open Build Service"
(→Usage) |
|||
Line 62: | Line 62: | ||
== Usage == | == Usage == | ||
− | + | On top of original OBS behavior, Sugar Labs patch brings the following new features. | |
− | === | + | === Distribution agnostic packages === |
− | + | Instead of using spec files for every distribution packages should be built against, it is possible to use special spec file that will be used as-is an all platforms Sugar Labs OBS supports. | |
− | + | To create such distro-agnostic packages: | |
− | |||
− | + | * upload {{Code|sweets.recipe}} file in [[Platform_Team/Recipe_Specification|special notation]] to OBS package; | |
+ | * upload {{Code|.tar.gz}} sources with filename composed using {{Code|sweets.recipe}} fields: | ||
− | + | <implement>-<version>.tar.gz | |
− | After | + | After that, OBS will star building submitted package on all attached OBS repositories. |
− | + | === Resolve packages and dependencies === | |
− | |||
− | |||
− | |||
− | + | There is new API command that might be used to resolve package names and package dependencies on particular OBS platform. | |
− | === | + | GET '''/resolve'''?project=PROJECT&repository=REPOSITORY&arch=ARCH&package=PACKAGE[&withdeps][&exclude=PACKAGE] |
− | + | Where: | |
− | + | * {{Code|PROJECT}}, {{Code|REPOSITORY}}, {{Code|ARCH}} and {{Code|PACKAGE}}<br>identification of particular OBS package; | |
+ | * {{Code|withdeps}}<br>include dependencies graph of the {{Code|PACKAGE}}; | ||
+ | * {{Code|exclude}}<br>restrict dependency graph from bottom side. | ||
− | + | For example, | |
+ | |||
+ | https://obs.sugarlabs.org/resolve?project=OLPC:11.3.1&repository=Fedora-14&arch=i586&package=pygame&withdeps&exclude=sugar | ||
+ | |||
+ | Will output: | ||
+ | |||
+ | <resolve> | ||
+ | <binary name="pygame" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/pygame-1.9.1-3.fc14.i686.rpm" /> | ||
+ | <binary name="SDL" url="http://mock.laptop.org/cgit/koji.dist-f14-i686-updates-11.3.1/plain/RPMS/SDL-1.2.14-11.fc14.i686.rpm" /> | ||
+ | <binary name="SDL_mixer" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/SDL_mixer-1.2.11-4.fc14.i686.rpm" /> | ||
+ | <binary name="SDL_image" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/SDL_image-1.2.10-1.fc13.i686.rpm" /> | ||
+ | <binary name="numpy" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/numpy-1.4.1-6.fc14.i686.rpm" /> | ||
+ | <binary name="SDL_ttf" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/SDL_ttf-2.0.10-1.fc14.i686.rpm" /> | ||
+ | <binary name="portmidi" url="http://mock.laptop.org/cgit/koji.dist-f14-i686-updates-11.3.1/plain/RPMS/portmidi-200-5.fc14.i686.rpm" /> | ||
+ | <binary name="libmikmod" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/libmikmod-3.2.0-11.beta2.fc14.i686.rpm" /> | ||
+ | <binary name="libgfortran" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/libgfortran-4.5.1-4.fc14.i686.rpm" /> | ||
+ | <binary name="python-nose" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/python-nose-0.11.3-5.fc14.noarch.rpm" /> | ||
+ | <binary name="python-setuptools" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/python-setuptools-0.6.14-3.fc14.noarch.rpm" /> | ||
+ | <binary name="atlas" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/atlas-3.8.3-18.fc14.i686.rpm" /> | ||
+ | </resolve> | ||
+ | |||
+ | Note that {{Code|url}} attributes might be invalid if corresponding packages were used to building on OBS. So, keep special OBS projects, only for resolving purpose, like {{Code|OLPC}}. | ||
== Policy == | == Policy == |
Revision as of 10:49, 19 September 2012
Summary
This is a patched Sugar Labs instance of the Open Build System (OBS), which is intended to be a:
- Place to host sources and to make binaries, if there is a need, for Sweets projects.
- Convenient instrument to create 3rd party repositories with native packages for all supported GNU/Linux distributions.
For detailed information, read the original Open Build System documentation.
Sites
obs.sugarlabs.org
This is an API site, all OBS clients use it to get access to OBS. There is no need to work with the site directly, but that is possible.
The site uses HTTP Basic authentication. To get access, create a Sugar Labs Central Login account.
packages.sugarlabs.org
This is an original OBS Web client. It is intended to be used only by people who need to create native packages, i.e., it is not needed for most Sugar developers. But, until a more appropriate tool is created for Sugar needs, it is the only Web client available to manage already released software (those released by being processed by the sweets command).
Content
The content on OBS might be of several kinds:
Projects
Projects are directories of Packages and might be of two types:
- top level, regular projects, like
base
orsdk
; - user's home projects, like
home:<user>
.
Packages
Packages represent particular software projects and contain all files associated with these projects, e.g., tarballs with sources.
There are several types of packages supported on OBS:
- packages that represent sweets,
- native packages based on sweets,
- native packages using sweet recipes as spec files,
- aliases,
- regular OBS packages.
See Usage section for more details.
Repositories
Every project has repositories to build its packages against. Repositories might be of two types:
- inherited from another project;
- initial repositories, aka, downloaded-on-demand, that are associated with a particular GNU/Linux distribution release;
Note: The sweets.sugarlabs.org
repository should be present if Packages need to be distributed via Zero Install.
Every repository has supported architectures, e.g., i586
or x86_64
. There is also the special architecture, 0install
, only for sweets.sugarlabs.org
.
Supported platforms
There is a special project, named base; it contains all GNU/Linux distributions that are supported on OBS. All other projects need to inherit repositories from this project.
Usage
On top of original OBS behavior, Sugar Labs patch brings the following new features.
Distribution agnostic packages
Instead of using spec files for every distribution packages should be built against, it is possible to use special spec file that will be used as-is an all platforms Sugar Labs OBS supports.
To create such distro-agnostic packages:
- upload
sweets.recipe
file in special notation to OBS package; - upload
.tar.gz
sources with filename composed usingsweets.recipe
fields:
<implement>-<version>.tar.gz
After that, OBS will star building submitted package on all attached OBS repositories.
Resolve packages and dependencies
There is new API command that might be used to resolve package names and package dependencies on particular OBS platform.
GET /resolve?project=PROJECT&repository=REPOSITORY&arch=ARCH&package=PACKAGE[&withdeps][&exclude=PACKAGE]
Where:
PROJECT
,REPOSITORY
,ARCH
andPACKAGE
identification of particular OBS package;withdeps
include dependencies graph of thePACKAGE
;exclude
restrict dependency graph from bottom side.
For example,
https://obs.sugarlabs.org/resolve?project=OLPC:11.3.1&repository=Fedora-14&arch=i586&package=pygame&withdeps&exclude=sugar
Will output:
<resolve> <binary name="pygame" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/pygame-1.9.1-3.fc14.i686.rpm" /> <binary name="SDL" url="http://mock.laptop.org/cgit/koji.dist-f14-i686-updates-11.3.1/plain/RPMS/SDL-1.2.14-11.fc14.i686.rpm" /> <binary name="SDL_mixer" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/SDL_mixer-1.2.11-4.fc14.i686.rpm" /> <binary name="SDL_image" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/SDL_image-1.2.10-1.fc13.i686.rpm" /> <binary name="numpy" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/numpy-1.4.1-6.fc14.i686.rpm" /> <binary name="SDL_ttf" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/SDL_ttf-2.0.10-1.fc14.i686.rpm" /> <binary name="portmidi" url="http://mock.laptop.org/cgit/koji.dist-f14-i686-updates-11.3.1/plain/RPMS/portmidi-200-5.fc14.i686.rpm" /> <binary name="libmikmod" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/libmikmod-3.2.0-11.beta2.fc14.i686.rpm" /> <binary name="libgfortran" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/libgfortran-4.5.1-4.fc14.i686.rpm" /> <binary name="python-nose" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/python-nose-0.11.3-5.fc14.noarch.rpm" /> <binary name="python-setuptools" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/python-setuptools-0.6.14-3.fc14.noarch.rpm" /> <binary name="atlas" url="http://mock.laptop.org/cgit/koji.dist-f14-i686/plain/RPMS/atlas-3.8.3-18.fc14.i686.rpm" /> </resolve>
Note that url
attributes might be invalid if corresponding packages were used to building on OBS. So, keep special OBS projects, only for resolving purpose, like OLPC
.
Policy
Resources
- Open Build System home page.
- Open Build System API specification.
- Downstream patch sources.