Package Archive Layout

This page should be converted into a proper specification.

The package archive will be laid out like a Debian pool archive but use opkg's simpler package source list (a.k.a. "feed") structure.

For a tool that implements this package archive layout, see pro-archman, the ProteanOS Archive Manager.

Definitions

Package Archive

The package archive is a hierarchy of directories, package indices, and binary packages. It is accessible on mirror hosts over network protocols like HTTP and FTP. On each mirror host, it is stored under pub/proteanos, relative to the mirror site's document root.

Channel

A channel is a set of distributions in the package archive aimed at a particular set of users. There are two channels: dev for developers and rel for end users and their installed systems.

Packages may be directly uploaded to distributions in the dev channel. Distributions in the rel channel are simply static snapshots of distributions in the dev channel.

Distribution

A distribution is a set of feeds in the package archive with a certain release policy and life cycle. There is one rolling release: trunk. All other distributions are fixed release series distributions, e.g. rs1.

Normally, packages should be uploaded to the trunk distribution. Packages should only be uploaded to release series distributions to backport critical defect fixes into stable releases.

Suite

A suite is the combination of a channel and distribution. Example suites are dev/trunk and rel/rs1.

Platform

A platform is a set of package configurations representing a particular use case.

Architecture

An architecture is a particular combination of processing units, kernel, and system libraries for which packages are built.

The src architecture contains source packages.

The all architecture contains architecture-independent binary packages.

Section

A section is a set of packages organized by purpose. Example sections are base, dev, and dbg.

Feed

A feed is a set of packages of a particular channel, distribution, platform, architecture, and section in the package archive. It contains a package index that describes all contained packages.

Package

A package is a set of data and control files that can be installed on a user's system.

A source package is a set of source package data files and control files. It can be unpacked and built to generate binary packages.

A binary package is a set of compiled data files and control files. It can be installed by an end user and used by other binary and source packages.

Package Index

A package index is a detailed list of all packages in a feed in the package archive. It is either a UTF-8-encoded plain text file named Packages or a gzip-compressed UTF-8-encoded plain text file named Packages.gz.

Pool

The pool is the common storage area for all packages.

Hash

The hash of a source package name, as used in the pool structure, is the first character in the name or the first four characters in the name if the name begins with the string "lib".

A directory in the pool whose name is a source package name hash may be called a bucket.

Archive Layout

The layout of the package archive is given by the following tree:

<proto>://<mirror-domain>/pub/proteanos/
 +- feeds/
 |   +- <channel>/
 |       +- <distribution>/
 |           +- <platform>/
 |               +- <architecture>/
 |                   +- <section>/
 |                       +- Packages
 |                       +- Packages.gz
 +- pool/
     +- <component>/
         +- <hash>/
             +- <srcpkg>/
                 +- <binpkg>_<binver>_<arch>_<plat>.opk

Examples

The compressed packages index of the core-linux-eglibc architecture, dev platform, and base section would be located at the following path at a mirror site:

/pub/proteanos/feeds/dev/trunk/dev/core-linux-eglibc/base/Packages.gz

The compressed packages index of source packages would be located at the following path at a mirror site:

/pub/proteanos/feeds/dev/trunk/all/src/src/Packages.gz

The libexpat.1 binary package for the core-linux-eglibc architecture would be located at the following path at a mirror site:

/pub/proteanos/pool/e/expat/libexpat.1_2.1.0-2_core-linux-eglibc_all.opk

Packages Index Syntax

The packages index file syntax is that used by APT, opkg, etc. It consists of paragraphs of fields, with paragraphs separated by empty lines. Each field consists of the field name, a colon (:), and the field value. Some fields may have values spanning multiple lines; each line after the first in a value must begin with at least one space.

The fields in a paragraph are the control fields generated for binary packages by ob-gencontrol, plus Filename, Size, and MD5sum.

Example

An example paragraph of a packages index follows:

Package: libexpat.1
Source: expat
Version: 2.1.0-2
Architecture: core-linux-eglibc
Platform: all
Maintainer: "P. J. McDermott" <pjm@nac.net>
Installed-Size: 530
Description: XML parser library
 Expat is an XML parser library written in C. It is a stream-oriented parser in
 which an application registers handlers for things the parser might find in the
 XML document (like start tags).
Homepage: http://expat.sourceforge.net/
Filename: ../../../../../../pool/e/expat/libexpat.1_2.1.0-2_core-linux-eglibc_all.opk
Size: 176465
MD5sum: 7d7984ab0c910ba525410562cfdb5315

References

Examples of Debian pool archives are the official Debian archive and P. J.'s "Bootstrappable Debian" archive. An example of a set of opkg package source lists (a.k.a. "feeds") is the Ångström repository.