openSUSE:Build Service Concept Download on Demand

Jump to: navigation, search

Download on Demand

Download on Demand (called 'DoD') is a convenience feature that makes it easier to use a set of binary packages in an existing repository as a build target.

WARNING: Once setup, the existing repository must be totally static. Changes made to rpms will not be picked up by OBS.

Download on demand feature in OBS

The code provided to download the packages bases and meta data for complete distributions on demand from Deb or Rpmmd trees is now incorporated into OBS to make it easier to target preexisting distribuitons. This can significantly reduce local storage requirements in your binary repository server. For example, openSUSE 11.0 needs ca. 16 GB of package space for the complete distro per architecture, where about 8 GB are shared packages between all architectures and about 8 GB are architecture specific packages needed for every architecture. Installing Debian:Etch for i586, x86_64, ppc and arm could result in 40 GB of needed disk space, while already sharing the noarch packages.


Setup

DoD must be enabled on the backend server and must be configured on the backend on a per-project basis.

To enable it, edit the BSConfig.pm file

RPM

Deb

Should you be using the download on demand feature, you do not have to get the complete packages from DVD mirror. In case of Deb meta data format (indicated by the mtype filed in the download directive, you grab a Packges file for each architecture and place it in :full directory:

.....
# cd /srv/obs/build/Debian:Etch/standard/armv4l/:full
# wget -c -q ftp://ftp.de.debian.org/debian/dists/etch/main/binary-arm/Packages.bz2
# bunzip2 Packages.bz2
.....

The project description for a Debian:Etch distro for arm, i586, ppc and x86_64 now contains fields as follows:

.....
  <download baseurl="http://ftp.de.debian.org/debian" metafile="Packages" mtype="debmd" arch="armv4l" />
  <download baseurl="http://ftp.de.debian.org/debian" metafile="Packages" mtype="debmd" arch="i586" />
  <download baseurl="http://ftp.de.debian.org/debian" metafile="Packages" mtype="debmd" arch="ppc" />
  <download baseurl="http://ftp.de.debian.org/debian" metafile="Packages" mtype="debmd" arch="x86_64" />
  <repository name="standard">
    <arch>armv4l<arch>
    <arch>i586<arch>
    <arch>ppc<arch>
    <arch>x86_64<arch>
  </repository>
.....