UnitedLinux package description

Motivation

An installation media provides a set of (rpm based) packages. In order to quickly have all information required by yast for package dependency resolving, a cache file should be present.

This document describes which kind of information this cache file should contain and it's syntax.

Requirements

Content requirements

  1. Name
    The package name (implicitly provided, e.g. "foo")
  2. Version
    The package version (e.g. "1.42")
  3. Release
    The package release (e.g. "13")
  4. Architecture
    The package archictecture (e.g. "i586")
  5. Requires
    list of tags required by this package
  6. PreRequires
    list of tags required by the pre-inst part of this package
  7. Provides
    list of tags provided by this package
  8. Conflicts
    list of tags which conflict with this package
  9. Obsoletes
    list of tags which are obsoleted by this package
  10. Recommends (opt.)
    list of optional tags which should be installed if possible (weak dependency)
  11. Suggests (opt.)
    list of optional tags which should be offered for installation
  12. Media number
    location of the package file if splitted media
  13. Filename
    name of the package file (which might be different from name-version-release.arch.rpm !)
  14. Path (opt.)
    path on media, defaults to <DATADIR>/<arch>/<filename<
  15. Package Size
    Size of package file
  16. Installed Size
    Size of unpacked package based on 'du.dir' sizes.
  17. BuildTime
    Time of build, used for determining updates (even if Version is lower)
  18. Source (opt.)
    source package used to build a binary package.
    Must specify name, version, release, (src,nosrc).
    To be omitted if the package itself is a source package.
  19. Group
    group tag as defined in package database
  20. License
    as defined in package database (shortcut !)
  21. Authors
    list of authors
  22. ShareWith
    specifies name,version,release,architecture of a package to share the cache file entry. All tags not provided by the current entry are taken from the 'ShareWith' package. Useful to 'link' multiple binary packages to a single translation file or a single 'base architecture' package with identical dependencies.
  23. Keywords
    List of keywords matching this package. Useful for package query interface in yast.

Other requirements

Implementation

The tags for define a Package and should be present in a single tag.

The tags for define a Location and should be present in a single tag.

The values src and nosrc for Architecture define a source package.

Syntax

For the syntactical representation of the data, several implementation were considered. E.g.
XML is a nice format because it gives structure and tools for reading and manipulation are widely available. However, for package data representation, RDF is preferred.

RDF is the proposed format by various source (i.e. rpm2html and LSB packagedata format). For the full format, the increase in overall size is enormous and not really suitable for a compact cache on a distribution CD. The current RDF package databases (meant for online access via the internet) contain a single file per package. For SuSE aaa_base the RDF description is 56kbytes and contains the full file list and changelog.
Since this document defines primarily the CD package cache for SuSE 8.1 and we're open to support other formats in the future, we should wait with RDF until a common format is defined by LSB.
Another promising project besides the LSB efforts is gnupdate, which will eventually supported in the future.

Binary data might be compact, but has endian problems and isn't readable with 'less'.

So a simple keyword, value representation is currently the best solution considering the above mentioned requirements. Esp. since it's an already known format from former SuSE distributions and parsers are available.

Further syntax thoughts:
File encoding is ASCII.
File is line based.
Lines starting with '#' are ignored.

Header keywords

The cache file starts with a header defining the version.
KeywordValueComment
=Ver2.0The old (common.pkd) format was 1.1, this one is 2.0

The old Encoding tag is not needed any more since the package data file is ASCII and does not contain any language-specific data.

Package entry keywords

KeywordValueComment
=Pkgname version release architectureThese four values identify a package unambiguously and are used as a key
+Req
-Req
tagsrequired for installation
+Prq
-Prq
tagstags required before installation
+Prv
-Prv
tagstags provided
+Con
-Con
tagstags conflicting
+Obs
-Obs
tagsobsoleted
+Rec
-Rec
tagsrecommended
+Sug
-Sug
tagssuggested
=Locmedia_nr filename[ path]location of the package file
path is optional and defaults to <DATADIR>/<arch>/<filename>
(see media description for <DATADIR>)
=Sizpkgsize instsizesize in bytes
=Timbuildtimebuild time in time_t format
=Srcname version release architectureof source package
architecture must be src or nosrc
If architecture in the Pkg line already is src or nosrc, the Src value is discarded.
=Grprpmgroup
=Liclicense
+Aut
-Aut
authors
=Shrname version release architectureof another package.
All values not explicitly set in the current package entry are shared with the mentioned package.
Useful e.g. for optimized versions of the same package (i.e. i686 and i486 versions exists).
It's just to save space.
+Key
-Key
keywordscoming from package database

Example

=Pkg: 3ddiag 0.494 16 i586
+Req:
/bin/cp
/bin/ln
/bin/ls
/bin/mkdir
/bin/mv
/bin/rm
/bin/cat
aaa_base
/bin/sh
/bin/sh
ld-linux.so.2
libc.so.6
libc.so.6(GLIBC_2.0)
libhd.so.5
rpmlib(PayloadIsBzip2) <= 3.0.5-1
-Req:
+Prq:
/bin/cp
/bin/ln
/bin/ls
/bin/mkdir
/bin/mv
/bin/rm
/bin/cat
aaa_base
/bin/sh
rpmlib(PayloadIsBzip2) <= 3.0.5-1
-Prq:
+Prv:
mesa:/etc/mesa.conf
-Prv:
=Loc: 1 3ddiag-0.494-16.i586.rpm
=Siz: 27958 64932
=Tim: 1028715372
=Src: 3ddiag 0.494 16 src
=Grp: System/Base
=Lic: GPL
+Aut:
Stefan Dirsch <sndirsch@suse.de>
-Aut: