The zounds repository format

Author: Julien T. Letessier
Revision: 1.1
Date: 2002-11-23


This document presents the directory and file format used by repositories of software packages that can be used by zounds, the user-friendly package manager for Zoularis.

Repository structure

Zounds repositories are meant to be a medium of distribution for free software packages.

Directory structure

A repository is defined by a file://, http:// or ftp:// resource locator that points to a directory. This directory contains at least a file named Repository.gz (details below), wich is a general description of the repository. Package files (with .tgz extension) are located in a subdirectory named All. Every other subdirectory contains excusively symbolic links to these packages, and a file named Files.list.gz (described below), which give details about the available packages.

A repository contains binary packages for one given operating system, version, architechture combination, e.g. SunOS-5.8/sparc. If a repository is available from a server, the URL of the All directories should be:


where <system> is given by the uname -s command, <revision> by uname -r, and <arch> by uname -p. These three fields correspond to the OPSYS, OS_VERSION and MACHINE_ARCH pkgsrc Makefile variables. Examples:

File syntax

These files share common properties: they are gzip-compressed ascii files, which are described by the following bnf grammar (in the spirit of Windows' .ini configuration files):

file    ::=     section*
section ::=     ignored* header (entry | ignored)*
header  ::=     <open> <alnum>+ <close> <lf>
ignored ::=     (comment | <space>*) <lf>
comment ::=     <comment> <char>*
entry   ::=     key <space>* <is> <space>* value
key     ::=     <alnum>+
value   ::=     (<alnum> | <space>)*

<open>      '['
<close>     ']'
<comment>   ';' or '#'
<char>      any printable ASCII character
<alnum>     letter, digit, dot, dash or underscore
<is>        ':' or '='
<lf>        the ASCII linefeed character
<space>     ASCII space or tab character

The semantics are fairly simple:

  • section names are unique within a file;
  • keys are unique within a section.

The Repository file

section name
a path to a directory containing packages and the associated description files, relative to the directory containing the Repository file.
a timestamp, in UTC time, giving when the preceding directory was last modified. Timestamp are integers expressed in seconds since the Epoch. This entry must immediately follow a Directory entry.

The Files file

section name
the concatenation of the package field, a hyphen and the version field (i.e. the package filename with the extension stripped off).
the name of the associated package.the name of the described package. Can contain upper and lowercase letters, digits, dashes and periods.
a one-line description of the package.
a long description of the package (e.g between 10 and 20 lines).
a space-separated list of tags (short, lower-caps and digits only string). The first tag has to be the NetBSD category of the package (it's pkgsrc directory).
a version string, a la pkgsrc (e.g. 1.0.35nb2). Mustn't contain any hyphen (-).
a space-sparated list of package names, a la pkgsrc (whith means, versions and alternatives can be precised). This is the list of packages the currently described package depends upon.
the installed package size, in bytes.
the compressed package size, in bytes.
a hash method. Supported methods are those supported by the digest(1) utility; the sha512 method is recommended.
the file's hash key.