Difference between revisions of "School Network/Open Build Service"

From Sugar Labs
Jump to navigation Jump to search
m
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Summary ==
 
== Summary ==
  
This is a [http://git.sugarlabs.org/0sugar/build-service patched] Sugar Labs instance of [http://openbuildservice.org/ Open Build System] (OBS) that is intended to be a:
+
This [http://git.sugarlabs.org/0sugar/build-service patched] Sugar Labs instance of the [http://openbuildservice.org/ Open Build Service] (OBS) has the following intentions:
  
* The place where software creators need to upload (directly or indirectly) sources to spread this software among the community.
+
* Unattended building of software hosted on [[Sugar Network]] for all [[Sweets_Distribution/Supported_platforms|supported]] platforms.
* If uploaded software requires building phase, it will be automatically processed for all supported platforms.
 
* The resulting files will be accessible via [[Platform_Team/Infrastructure|sweets.sugarlabs.org and download.sugarlabs.org]].
 
* The convenient instrument to create, using already uploaded software, 3rd party repositories with native packages for all supported GNU/Linux distributions.
 
  
The Sweets [[Platform_Team/Guide/Sweets_Usage|Usage]] workflow doesn't include interacting people with OBS at all. Sweet project [[Platform_Team/Guide/Sweets_Packaging|developers]] will use clients like {{Code|sweets}} utility to interact with OBS. The full featured interaction with OBS (via [[#packages.sugarlabs.org|packages.sugarlabs.org]]) will require only if people need to create 3rd party repositories with native packages.
+
* Be a convenient instrument to create 3rd party repositories with native packages for all [[Sweets_Distribution/Supported_platforms|supported]] GNU/Linux distributions.
 
 
For detailed information, read the original Open Build System [http://openbuildservice.org/documentation.html documentation].
 
  
 
== Sites ==
 
== Sites ==
  
=== obs.sugarlabs.org ===
+
* [https://obs.sugarlabs.org obs.sugarlabs.org]<br>This is an [https://obs.sugarlabs.org/apidocs/ API] site, all OBS clients use it to get access to OBS. There is no need to work with the site directly, although that is [http://en.opensuse.org//openSUSE:Build_Service_Curl possible].
  
This is an [https://obs.sugarlabs.org/apidocs/ API] site, all OBS clients use it to get access to OBS. There is no need to work with site directly but it is [http://en.opensuse.org//openSUSE:Build_Service_Curl possible].
+
* [https://packages.sugarlabs.org packages.sugarlabs.org]<br>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 assuming that [[Sugar Network]] will process building procedures in unattended mode.
  
Site uses HTTP Basic authentication. To get access, [[Service/Account#Sugar_Labs_Central_Login|create]] Sugar Labs Central Login account.
+
* [http://download.sugarlabs.org/packages/ download.sugarlabs.org]<br>After building, binary packages will be acceptable from the Sugar Labs download site.
  
=== packages.sugarlabs.org ===
+
== Usage ==
 
 
This is an original OBS Web client. It is intended to be used only by people who need to create native packages, i.e., not for most of Sugar developers. But, until creating more appropriate tool for Sugar needs, it is the only one Web client to manage already released software (the releasing is being processed by {{Code|sweets}} command).
 
  
== Content ==
+
See original [http://openbuildservice.org/help/manuals/ manuals] and [http://openbuildservice.org/help/materials/ materials] to learn more about what functionality OBS provides.
  
The contend on OBS might be several kinds:
+
On top of original OBS behavior, the Sugar Labs instance brings the following new features and common practices.
  
=== Projects ===
+
=== Special projects ===
  
Projects are directories of Packages and might be two types:
+
There is a special project, named [https://packages.sugarlabs.org/project/repositories?project=base base]; it contains all GNU/Linux distributions that are supported on OBS. All other projects, that are intended for building packages, need to inherit repositories from this project.
  
* top level, regular projects, like {{Code|base}} or {{Code|sdk}};
+
=== GNU/Linux distribution agnostic packages ===
* user's home projects, like {{Code|home:''<user>''}}.
 
  
=== Packages ===
+
Instead of using spec files of packages to be built against for every GNU/Linux distribution, it is possible to use a special spec file that will be used as-is in all platforms that Sugar Labs OBS supports.
  
Packages represent particular software projects and contain all files associated with these projects, e.g., tarballs with sources.
+
To create such distro-agnostic packages,
  
There are several types of package supported on OBS:
+
* upload a {{Code|sweets.recipe}} file in [[Sweets_Distribution/Recipe_Specification|special notation]] to OBS package;
 +
* upload {{Code|.tar.gz}} sources with filename composed using {{Code|sweets.recipe}} fields:
  
* packages that represent sweets,
+
<context>-<version>.tar.gz
* native packages based on sweets,
 
* native packages with using sweet recipes as spec files,
 
* aliases,
 
* regular OBS packages.
 
  
See [[#Usage|Usage]] section for more details.
+
After that, OBS will start building submitted package on all attached OBS repositories.
  
=== Repositories ===
+
=== Resolve packages ===
  
Every project has repositories to build its packages against. Repositories might be two types:
+
There is new API command that might be used to resolve package names and package dependencies on a particular OBS platform.
  
* inherited from another project;
+
GET '''/resolve'''?project=PROJECT&repository=REPOSITORY&arch=ARCH&package=PACKAGE[&withdeps][&exclude=PACKAGE]
* initial repositories, aka downloaded-on-demand, that are associated with particular GNU/Linux distribution release;
 
* {{Code|sweets.sugarlabs.org}} repository should present if Packages need to be distributed via Zero Install.
 
  
Every repository has supported architectures, e.g., {{Code|i586}} or {{Code|x86_64}}. There is also special architecture, {{Code|0install}}, only for {{Code|sweets.sugarlabs.org}}.
+
Where:
 
 
== Supported platforms ==
 
 
 
There is special project, named [https://packages.sugarlabs.org/project/repositories?project=base base], it contains all GNU/Linux distributions that are supported on OBS. All other projects need to inherit repositories from this project.
 
 
 
== Usage ==
 
  
=== Sweets ===
+
* {{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.
  
=== Sweet packages ===
+
For example,
  
=== Recipe based packages ===
+
https://obs.sugarlabs.org/resolve?project=OLPC&repository=11.3.1&arch=i586&package=pygame&withdeps&exclude=sugar
  
=== Aliases ===
+
Will output:
  
=== Regular packages ===
+
<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>
  
 
== Policy ==
 
== Policy ==
  
{{:Platform_Team/Open_Build_System/Policy}}
+
{{:School_Network/Open_Build_Service/Policy}}
  
 
== Resources ==
 
== Resources ==
  
* Open Build system [http://openbuildservice.org/ home page].
+
* Open Build Service [http://openbuildservice.org/ home page].
* API [https://obs.sugarlabs.org/apidocs/ specification].
+
* Open Build Service API [https://obs.sugarlabs.org/apidocs/ specification].
* Downstream patch [http://git.sugarlabs.org/0sugar/build-service sources].
+
* Downstream patch [https://git.sugarlabs.org/sl-tweaks/obs sources].

Latest revision as of 08:19, 23 March 2015

Summary

This patched Sugar Labs instance of the Open Build Service (OBS) has the following intentions:

  • Be a convenient instrument to create 3rd party repositories with native packages for all supported GNU/Linux distributions.

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, although that is possible.
  • 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 assuming that Sugar Network will process building procedures in unattended mode.

Usage

See original manuals and materials to learn more about what functionality OBS provides.

On top of original OBS behavior, the Sugar Labs instance brings the following new features and common practices.

Special projects

There is a special project, named base; it contains all GNU/Linux distributions that are supported on OBS. All other projects, that are intended for building packages, need to inherit repositories from this project.

GNU/Linux distribution agnostic packages

Instead of using spec files of packages to be built against for every GNU/Linux distribution, it is possible to use a special spec file that will be used as-is in all platforms that Sugar Labs OBS supports.

To create such distro-agnostic packages,

  • upload a sweets.recipe file in special notation to OBS package;
  • upload .tar.gz sources with filename composed using sweets.recipe fields:
<context>-<version>.tar.gz

After that, OBS will start building submitted package on all attached OBS repositories.

Resolve packages

There is new API command that might be used to resolve package names and package dependencies on a particular OBS platform.

GET /resolve?project=PROJECT&repository=REPOSITORY&arch=ARCH&package=PACKAGE[&withdeps][&exclude=PACKAGE]

Where:

  • PROJECT, REPOSITORY, ARCH and PACKAGE
    identification of particular OBS package;
  • withdeps
    include dependencies graph of the PACKAGE;
  • exclude
    restrict dependency graph from bottom side.

For example,

https://obs.sugarlabs.org/resolve?project=OLPC&repository=11.3.1&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>

Policy

The Open Build Service works underneath the Sugar Network, processing software content uploaded to Sugar Network, thus, the Sugar Network Policy is inherited.

Resources