Software Repositories
From openSUSE
| Software Repositories: YaST - YaST Content - Metadata Descriptions - Media - Repomd |
Contents |
Software Repositories
What is a software repository ?
A software repository makes software available to the system. It does so in two parts
- metadata
- payload data (e.g. packages)
Most software repositories contain packages only. SUSE repositories also support patches, patterns, and products.
Metadata
Metadata represents the table of content for a software repository.
That metadata contains various information about the sofware (usually RPM packages) that is available in a repository, such as:
- (package) name, version, release, target architecture, distribution;
- summary, description, license, project website;
- what it requires;
- what it provides (, and the list of files contained in the package).
- the changelog of the software.
That metadata information is needed by package managers like zypper, rug, apt-rpm, smart, yum... to be able to compute how to perform package installations, upgrades, removals (the requires/provides information is particularly important here).
The metadata is not sufficient for the actual installation of software - packages are part of the payload (see below)
Metadata is downloaded completely when a repository is accessed the first time or refreshed when parts have changed (i.e. package added or upgraded).
The main difference between different types of repositories (see below) is the way the metadata represented. The content presented in the metadata is almost identical.
There are different metadata formats:
- REPOMD (Repository MetaData), also called "rpm-md" (RPM Metadata) , also called "yum" (because its the native format for the yum package manager);
- yast2;
- apt-rpm (for RPM) and apt-deb (for DEB);
- Red Carpet (also called Open Carpet);
- RPM-HDL (RPM Header List);
- URPMI (for Mandriva's package manager);
- slack, for Slackware's "package manager";
and maybe a few others.
So, unfortunately, there's more or less a metadata format for every single package manager.
Nowadays, most package managers seem to head for REPOMD support, which is more or less becoming a standard:
- YaST2 supports it in SUSE Linux 10.0;
- libzypp supports it in SUSE Linux 10.1;
- yum supports it, obviously, it's the yum-specific format ;);
- apt-rpm supports it too, since one or two releases (not the version shipped with SUSE Linux 10.1 though);
- smart supports it, of course ;) (more information about that below).
Payload data
The payload data - usually the packages - is only accessed on demand, e.g. when a package is to be installed.
Both parts - metadata and payload data - are usually kept together on the same server. But there's nothing which really requires this, packages could be hosted on several servers for load balancing or security reasons.
Other names for repositories
The following terms are used by different package managers and are all references to repositories. Such references usually contain information such as
- the base URL, where to retrieve the metadata and the packages
- a name
but also additional information, depending on what the package manager is capable of handling.
- YaST2 calls them "installation sources" or "software catalogs";
- ZMD/rug calls them "catalogs";
- smart calls them "channels" (Red Carpet calls them "channels" as well)
- apt-rpm calls them "sources";
- yum calls them "repos" (repositories)
but they're all the same thing: references to (RPM package) repositories ;).
Types of repositories
SUSE Linux supports two types of repositories
YaST
The YaST format is usually used for installation media, namely CD and DVD. Its also used online when installation media is copied to a server. This format is only used by SUSE Linux (resp. openSUSE).
repomd
rpm XML metadata repository format is a standardized, widely-used format for online package repositories. SUSE Linux supports an extended format which includes patches, patterns, and products. (repomd is sometimes still called yum, but this term is deprecated.)
(plaindir - a directory containing RPM packages - is also supported but it doesn't count as repository in the above definition.)
Accessing a repository
Access to a repository is specified by a URL, containing the protocol (e.g. http), the server (e.g. ftp.opensuse.org), and the directory on the server (e.g. pub/opensuse/10.1).
The URL does not specify the type of the repository as the following example illustrates.
(1) http://ftp.g(...).de/pub/linux/misc/suser-guru/rpm/10.1 (2) http://ftp.g(...).de/pub/linux/misc/suser-guru/rpm/10.1/RPMS (3) http://ftp.g(...).de/pub/linux/suse/apt/SuSE/10.1-i386
- (1) is a yast2 repository
- (2) is an REPOMD repository;
- (3) is an APT-RPM repository.

