The zounds repository format

Author: Julien T. Letessier
Contact: mezis@users.sourceforge.net
Revision: 1.1
Date: 2002-11-23

Abstract

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:

<protocol>://<server>/<root>/<system>-<revision>/<arch>/

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:

ftp://ftp.foo.com/bar/SunOS-5.8/sparc/
file://localhost/usr/pkgsrc/packages/NetBSD-1.5.3/i386/

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.
lastmodified
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).
package
the name of the associated package.the name of the described package. Can contain upper and lowercase letters, digits, dashes and periods.
shortdescription
a one-line description of the package.
longdescription
a long description of the package (e.g between 10 and 20 lines).
tags
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).
version
a version string, a la pkgsrc (e.g. 1.0.35nb2). Mustn't contain any hyphen (-).
predepends
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.
realsize
the installed package size, in bytes.
packsize
the compressed package size, in bytes.
hashmethod
a hash method. Supported methods are those supported by the digest(1) utility; the sha512 method is recommended.
hashkey
the file's hash key.