[REP Index] [REP Source]
REP: | 137 |
---|---|
Title: | ROS distribution files |
Author: | Tully Foote, Dirk Thomas, Paul Mathieu |
Status: | Accepted |
Type: | Standards Track |
Content-Type: | text/x-rst |
Created: | 04-Feb-2013 |
Post-History: | 19-April-2013 |
Contents
This REP specifies a set of files which define ROS distributions and facilitate the building, packaging, testing and documenting process. The intention is to formalize the existing infrastructure and simplify hosting of (potentially customized) ROS buildfarms.
A ROS distribution consists of numerous software packages maintained by various contributors forming a coherent set. Until now there was only one buildfarm responsible for running unit tests and generating Debian packages for various Ubuntu versions and no formal description of the semantics of the files used in that process was given so far. Expanding the current capabilities to support other platforms and architectures will be important extensions.
This REP aims to specify all information and file formats necessary to release and package ROS distributions for various platforms and architectures. By formalizing these data structures it should be enabled to:
The use cases this REP is designed to address are:
The information formalized in this REP is used in four separate processes:
There should be a single configuration which contains (or references) all information required to run the above processes. The configuration must be easily readable and editable by both humans as well as machines and be extendable with future functionality.
The set of packages for which to build binary packages must be configurable for each platform and architecture.
The release process should stay independent of the build process. The testing can be performed on either the upstream source or on the released tarball (depending on if the upstream source contains enough information to run the test suite). The build process can only work on released packages.
Each configuration file must contain a label which identifies the semantics of the file as well as a version number to enable future format updates.
A single configuration containing or referencing all required information allows for a single entry point for automated processing in the above mentioned processes.
Specifying individual subsets of packages per platform and architecture is necessary since not all released packages can and should be build on all platforms and architectures.
The information for the various processes should be separated from each other to ease customizing individual processes. This is especially necessary since different processes could be run by separate entities.
This REP gives a formal specification for the files that are used for that. Currently the information is stored in: * distribution files (groovy.yaml) * targets.yaml * individual rosinstall files for documentation, and depends files
The changes to the distribution file are minimal, such as restructuring and adding type and version fields. The content of the targets.yaml file will be split and merged into the release, source and doc files and their corresponding building files.
The content of the individual rosinstall files is merged into a single file. The dependencies for documentation are replaced by referencing other repositories specified in the same file.
All current information can be converted into the new format using a script in the reference implementation.
Files use YAML 1.1 for the sake of human and machine readability and write-ability. As a good practice, the files should contain a header such as:
%YAML 1.1 # ROS index|release|release-build|source|source-build|doc|doc-build file # see REP 137: https://ros.org/reps/rep-0137.html ---
The index file acts as a single configuration entrypoint which lists all available ROS distributions, along with references pointing to further process specific information. The references can be either relative to the index file or absolute.
The information stored in the index file is:
distributions: a list of ROS distributions
For each distribution further information are referenced:
type: must be 'index'
version: version number, this REP describes version 1
An index file referencing multiple distribution with their release, source and doc files and their corresponding build files.
%YAML 1.1 # ROS index file # see REP 137: https://ros.org/reps/rep-0137.html --- distributions: groovy: release: groovy/release.yaml release_builds: [groovy/release-build-ubuntu.yaml, releases/release-build-arm.yaml] release_cache: http://www.example.com/groovy-cache source: groovy/source.yaml source_builds: [groovy/source-build.yaml] doc: groovy/doc.yaml doc_builds: [groovy/doc-build.yaml] hydro: ... type: index version: 1
A release is identified by the code name of the ROS distribution in the index file. Each release file contains the following information:
repositories: a list of GBP repositories which are identified by unique names
url: the URL of the release git repository The URL must be anonymously readable and (with the appropriate credentials) writable.
version: version number for which packages are released. This can be a tag, branch or hash.
status: defines the status of the packages of the repository. Can be one of the following: developed, maintained, unmaintained, end-of-life
status_description: an optional field describing in a short sentence the current status of the repository. For example detailing the reason for EOL and the recommended upgrade path.
packages: an optional list of package names. If no package is specified, one package with the name of the repository is assumed in the root of the repository. For each package name a dictionary with the following optional keys is possible:
tags: a dict of tags which can be used by tools like bloom and the rosinstall generator, preventing the need for those tools to guess about tags in release repositories, e.g. 'release/package/1.2.3' vs 'release/groovy/package/1.2.3-4'. This provides a useful future proofing mechanism for tools which use tags in the release repository, rather than guessing the format of the tags they can infer them directly from the tag templates.
tag_name {release, debian, etc...}: Format of tags are strings with {template_variables} e.g. 'release/groovy/{package}/{version}' A non-exhaustive list of possible template tags:
The only required tag_name is 'release', others like 'debian' are optional.
platforms: a dict of target platforms for which packages are released. Each key contains the OS name while the value is a list of OS code names. These OS names and OS code names are determined by rospkg.os_detect [4]. Each target platform will result in a different bloom release.
type: must be 'release'
version: version number, this REP describes version 1
Example: A release file listing GBP repositories and packages and the target platforms.
%YAML 1.1 # ROS release file # see REP 137: https://ros.org/reps/rep-0137.html --- repositories: actionlib: url: https://github.com/ros-gbp/actionlib-release.git version: 1.9.11-0 tags: release: release/groovy/actionlib/{version} ar_track_alvar: url: https://github.com/ros-gbp/ar_track_alvar-release.git version: 0.3.0-0 packages: ar_track_alvar: subfolder: artrackalvar tags: release: release/{package}/{upstream_version} bond_core: url: https://github.com/ros-gbp/bond_core-release.git version: 1.7.10-0 packages: bond: bond_core: bondcpp: bondpy: smclib: tags: release: release/groovy/{package}/{version} debian: debian/{debian_package_name}_{version}_{debian_distro} platforms: ubuntu: [oneiric, precise, quantal] debian: [wheezy] type: release version: 1
A release build file contains the information necessary to build packages of the packages specified in the release file:
Example: A build file selecting a subset of packages from the release or source file and specifying the platforms and architectures.
%YAML 1.1 # ROS release-build file # see REP 137: https://ros.org/reps/rep-0137.html --- package_whitelist: [ros_tutorials, common_tutorials] package_blacklist: [turtlesim] notifications: emails: [buildfarm-admin@example.com] maintainers: true committers: false targets: _config: apt_target_repository: http://archives.example.com/ros apt_mirrors: [http://archives.example.com/ros, http://packages.foo.org/repos/example] ubuntu: oneiric: amd64: i386: precise: amd64: i386: armel: jenkins_url: http://jenkins.example.com:8080 sync: packages: [ros_tutorials] type: release-build version: 1
Collection of all meta information of the ROS distribution, including all the information from the package.xml files. The cache must reference the release file and store a hash of the release file it was build from to be able to detect if the cache is invalid. The format of that cache is considered an implementation detail and is not specified in this REP.
The source file uses a specification similar to the release file, but does not have a list of platforms or additional metainformation for each repository (status, status_description, packages and tags). Since the repository type is not limited to git each repository has to specify a type.
The source build file uses a specification similar to the release build file, but does not have sync information. Also the white- and blacklist is on a repository level and does not consider any kind of dependencies.
The documentation file uses a specification similar to the source file. Additionally each repository can specify a list of other repositories it depends on.
The documentation build file uses a specification similar to the source build file.
This REP is to be implemented in a Python module called rosdistro. This module will serve as a reference implementation for this REP. Any ROS tool requesting information defined in this REP should use this reference API implementation.
Since the new files are stored under a different URL (not in a releases subfolder in the rosdistro repository) the old tools will fail at some point when the information is not fetchable anymore form the old URL.
A complete example for a ROS distribution called foo with all the above specified files can be found at [5].
[1] | (1, 2) Bloom: a release automation tool (http://www.ros.org/wiki/bloom) |
[2] | rosdep2: https://ros.org/reps/rep-0125.html |
[3] | roslocate: http://www.ros.org/reps/rep-0115.html |
[4] | rospkg.os_detect: http://www.ros.org/reps/rep-0114.html |
[5] | Example files specifying a ROS distro: https://github.com/ros-infrastructure/rosdistro/tree/master/test/files |
This document has been placed in the public domain.